@lace-cloud/canvas 0.26.0 → 0.28.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.
@@ -2,6 +2,11 @@ import { Diagnostic as Diagnostic$1, CanvasArrangement, CanvasView, EngineMethod
2
2
  import { z } from 'zod';
3
3
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
4
4
 
5
+ /**
6
+ * Every command a host can invoke, as command-tree.golden declares it: its
7
+ * positionals, its flags and its effect (`read`, `write` or `rewrite`,
8
+ * as apps/cli/cmd/effect.go defines them).
9
+ */
5
10
  declare const COMMANDS: {
6
11
  readonly "chaos run": {
7
12
  readonly path: "chaos run";
@@ -70,6 +75,7 @@ declare const COMMANDS: {
70
75
  readonly type: "string";
71
76
  };
72
77
  };
78
+ readonly effect: "write";
73
79
  readonly hidden: false;
74
80
  readonly yes: false;
75
81
  };
@@ -91,6 +97,7 @@ declare const COMMANDS: {
91
97
  readonly type: "string";
92
98
  };
93
99
  };
100
+ readonly effect: "read";
94
101
  readonly hidden: false;
95
102
  readonly yes: false;
96
103
  };
@@ -112,6 +119,7 @@ declare const COMMANDS: {
112
119
  readonly type: "string";
113
120
  };
114
121
  };
122
+ readonly effect: "read";
115
123
  readonly hidden: false;
116
124
  readonly yes: false;
117
125
  };
@@ -126,6 +134,7 @@ declare const COMMANDS: {
126
134
  readonly type: "string";
127
135
  };
128
136
  };
137
+ readonly effect: "write";
129
138
  readonly hidden: false;
130
139
  readonly yes: false;
131
140
  };
@@ -137,6 +146,7 @@ declare const COMMANDS: {
137
146
  readonly type: "string";
138
147
  };
139
148
  };
149
+ readonly effect: "write";
140
150
  readonly hidden: false;
141
151
  readonly yes: false;
142
152
  };
@@ -148,6 +158,7 @@ declare const COMMANDS: {
148
158
  readonly type: "bool";
149
159
  };
150
160
  };
161
+ readonly effect: "read";
151
162
  readonly hidden: false;
152
163
  readonly yes: false;
153
164
  };
@@ -172,6 +183,7 @@ declare const COMMANDS: {
172
183
  readonly type: "string";
173
184
  };
174
185
  };
186
+ readonly effect: "write";
175
187
  readonly hidden: false;
176
188
  readonly yes: false;
177
189
  };
@@ -184,6 +196,7 @@ declare const COMMANDS: {
184
196
  readonly values: readonly ["table", "json"];
185
197
  };
186
198
  };
199
+ readonly effect: "write";
187
200
  readonly hidden: false;
188
201
  readonly yes: false;
189
202
  };
@@ -199,6 +212,7 @@ declare const COMMANDS: {
199
212
  readonly type: "string";
200
213
  };
201
214
  };
215
+ readonly effect: "rewrite";
202
216
  readonly hidden: false;
203
217
  readonly yes: false;
204
218
  };
@@ -217,6 +231,7 @@ declare const COMMANDS: {
217
231
  readonly type: "string";
218
232
  };
219
233
  };
234
+ readonly effect: "write";
220
235
  readonly hidden: false;
221
236
  readonly yes: false;
222
237
  };
@@ -241,6 +256,7 @@ declare const COMMANDS: {
241
256
  readonly type: "bool";
242
257
  };
243
258
  };
259
+ readonly effect: "rewrite";
244
260
  readonly hidden: false;
245
261
  readonly yes: false;
246
262
  };
@@ -263,6 +279,7 @@ declare const COMMANDS: {
263
279
  readonly type: "bool";
264
280
  };
265
281
  };
282
+ readonly effect: "read";
266
283
  readonly hidden: false;
267
284
  readonly yes: false;
268
285
  };
@@ -285,6 +302,7 @@ declare const COMMANDS: {
285
302
  readonly values: readonly ["public", "publication"];
286
303
  };
287
304
  };
305
+ readonly effect: "write";
288
306
  readonly hidden: false;
289
307
  readonly yes: false;
290
308
  };
@@ -297,6 +315,7 @@ declare const COMMANDS: {
297
315
  readonly values: readonly ["table", "json"];
298
316
  };
299
317
  };
318
+ readonly effect: "read";
300
319
  readonly hidden: false;
301
320
  readonly yes: false;
302
321
  };
@@ -309,6 +328,7 @@ declare const COMMANDS: {
309
328
  readonly values: readonly ["table", "json"];
310
329
  };
311
330
  };
331
+ readonly effect: "read";
312
332
  readonly hidden: false;
313
333
  readonly yes: false;
314
334
  };
@@ -324,6 +344,7 @@ declare const COMMANDS: {
324
344
  readonly values: readonly ["table", "json"];
325
345
  };
326
346
  };
347
+ readonly effect: "write";
327
348
  readonly hidden: false;
328
349
  readonly yes: false;
329
350
  };
@@ -345,6 +366,7 @@ declare const COMMANDS: {
345
366
  readonly type: "string";
346
367
  };
347
368
  };
369
+ readonly effect: "read";
348
370
  readonly hidden: false;
349
371
  readonly yes: false;
350
372
  };
@@ -366,6 +388,7 @@ declare const COMMANDS: {
366
388
  readonly type: "string";
367
389
  };
368
390
  };
391
+ readonly effect: "read";
369
392
  readonly hidden: false;
370
393
  readonly yes: false;
371
394
  };
@@ -387,6 +410,7 @@ declare const COMMANDS: {
387
410
  readonly type: "string";
388
411
  };
389
412
  };
413
+ readonly effect: "read";
390
414
  readonly hidden: false;
391
415
  readonly yes: false;
392
416
  };
@@ -409,6 +433,7 @@ declare const COMMANDS: {
409
433
  readonly values: readonly ["public"];
410
434
  };
411
435
  };
436
+ readonly effect: "read";
412
437
  readonly hidden: false;
413
438
  readonly yes: false;
414
439
  };
@@ -443,6 +468,7 @@ declare const COMMANDS: {
443
468
  readonly type: "string";
444
469
  };
445
470
  };
471
+ readonly effect: "read";
446
472
  readonly hidden: false;
447
473
  readonly yes: false;
448
474
  };
@@ -467,6 +493,7 @@ declare const COMMANDS: {
467
493
  readonly type: "string";
468
494
  };
469
495
  };
496
+ readonly effect: "read";
470
497
  readonly hidden: false;
471
498
  readonly yes: false;
472
499
  };
@@ -488,6 +515,7 @@ declare const COMMANDS: {
488
515
  readonly type: "string";
489
516
  };
490
517
  };
518
+ readonly effect: "read";
491
519
  readonly hidden: false;
492
520
  readonly yes: false;
493
521
  };
@@ -512,6 +540,7 @@ declare const COMMANDS: {
512
540
  readonly type: "string";
513
541
  };
514
542
  };
543
+ readonly effect: "write";
515
544
  readonly hidden: false;
516
545
  readonly yes: false;
517
546
  };
@@ -536,6 +565,7 @@ declare const COMMANDS: {
536
565
  readonly type: "string";
537
566
  };
538
567
  };
568
+ readonly effect: "read";
539
569
  readonly hidden: false;
540
570
  readonly yes: false;
541
571
  };
@@ -575,6 +605,7 @@ declare const COMMANDS: {
575
605
  readonly type: "string";
576
606
  };
577
607
  };
608
+ readonly effect: "read";
578
609
  readonly hidden: false;
579
610
  readonly yes: false;
580
611
  };
@@ -599,6 +630,7 @@ declare const COMMANDS: {
599
630
  readonly type: "string";
600
631
  };
601
632
  };
633
+ readonly effect: "read";
602
634
  readonly hidden: false;
603
635
  readonly yes: false;
604
636
  };
@@ -620,6 +652,7 @@ declare const COMMANDS: {
620
652
  readonly type: "string";
621
653
  };
622
654
  };
655
+ readonly effect: "read";
623
656
  readonly hidden: false;
624
657
  readonly yes: false;
625
658
  };
@@ -661,6 +694,7 @@ declare const COMMANDS: {
661
694
  readonly repeated: true;
662
695
  };
663
696
  };
697
+ readonly effect: "write";
664
698
  readonly hidden: false;
665
699
  readonly yes: false;
666
700
  };
@@ -704,6 +738,7 @@ declare const COMMANDS: {
704
738
  readonly type: "string";
705
739
  };
706
740
  };
741
+ readonly effect: "write";
707
742
  readonly hidden: false;
708
743
  readonly yes: false;
709
744
  };
@@ -728,6 +763,7 @@ declare const COMMANDS: {
728
763
  readonly type: "bool";
729
764
  };
730
765
  };
766
+ readonly effect: "write";
731
767
  readonly hidden: false;
732
768
  readonly yes: true;
733
769
  };
@@ -755,6 +791,7 @@ declare const COMMANDS: {
755
791
  readonly type: "string";
756
792
  };
757
793
  };
794
+ readonly effect: "read";
758
795
  readonly hidden: false;
759
796
  readonly yes: false;
760
797
  };
@@ -802,6 +839,7 @@ declare const COMMANDS: {
802
839
  readonly type: "bool";
803
840
  };
804
841
  };
842
+ readonly effect: "write";
805
843
  readonly hidden: false;
806
844
  readonly yes: true;
807
845
  };
@@ -826,6 +864,7 @@ declare const COMMANDS: {
826
864
  readonly type: "string";
827
865
  };
828
866
  };
867
+ readonly effect: "read";
829
868
  readonly hidden: false;
830
869
  readonly yes: false;
831
870
  };
@@ -857,6 +896,7 @@ declare const COMMANDS: {
857
896
  readonly type: "string";
858
897
  };
859
898
  };
899
+ readonly effect: "rewrite";
860
900
  readonly hidden: false;
861
901
  readonly yes: false;
862
902
  };
@@ -887,6 +927,7 @@ declare const COMMANDS: {
887
927
  readonly type: "string";
888
928
  };
889
929
  };
930
+ readonly effect: "read";
890
931
  readonly hidden: false;
891
932
  readonly yes: false;
892
933
  };
@@ -916,6 +957,7 @@ declare const COMMANDS: {
916
957
  readonly repeated: true;
917
958
  };
918
959
  };
960
+ readonly effect: "write";
919
961
  readonly hidden: false;
920
962
  readonly yes: false;
921
963
  };
@@ -946,6 +988,7 @@ declare const COMMANDS: {
946
988
  readonly type: "duration";
947
989
  };
948
990
  };
991
+ readonly effect: "write";
949
992
  readonly hidden: false;
950
993
  readonly yes: false;
951
994
  };
@@ -982,6 +1025,7 @@ declare const COMMANDS: {
982
1025
  readonly type: "string";
983
1026
  };
984
1027
  };
1028
+ readonly effect: "write";
985
1029
  readonly hidden: false;
986
1030
  readonly yes: false;
987
1031
  };
@@ -997,6 +1041,7 @@ declare const COMMANDS: {
997
1041
  readonly values: readonly ["table", "json"];
998
1042
  };
999
1043
  };
1044
+ readonly effect: "read";
1000
1045
  readonly hidden: false;
1001
1046
  readonly yes: false;
1002
1047
  };
@@ -1018,6 +1063,7 @@ declare const COMMANDS: {
1018
1063
  readonly values: readonly ["table", "json"];
1019
1064
  };
1020
1065
  };
1066
+ readonly effect: "read";
1021
1067
  readonly hidden: false;
1022
1068
  readonly yes: false;
1023
1069
  };
@@ -1036,6 +1082,7 @@ declare const COMMANDS: {
1036
1082
  readonly values: readonly ["table", "json"];
1037
1083
  };
1038
1084
  };
1085
+ readonly effect: "write";
1039
1086
  readonly hidden: false;
1040
1087
  readonly yes: false;
1041
1088
  };
@@ -1048,6 +1095,7 @@ declare const COMMANDS: {
1048
1095
  readonly values: readonly ["table", "json"];
1049
1096
  };
1050
1097
  };
1098
+ readonly effect: "read";
1051
1099
  readonly hidden: false;
1052
1100
  readonly yes: false;
1053
1101
  };
@@ -1060,6 +1108,7 @@ declare const COMMANDS: {
1060
1108
  readonly values: readonly ["table", "json"];
1061
1109
  };
1062
1110
  };
1111
+ readonly effect: "read";
1063
1112
  readonly hidden: false;
1064
1113
  readonly yes: false;
1065
1114
  };
@@ -3879,7 +3928,8 @@ declare class CommandDetachedError extends Error {
3879
3928
  constructor();
3880
3929
  }
3881
3930
  declare class CommandUnobservedError extends Error {
3882
- constructor();
3931
+ readonly path: BoundPath;
3932
+ constructor(path: BoundPath);
3883
3933
  }
3884
3934
  type Invocation<P extends BoundPath> = {
3885
3935
  events: AsyncIterable<JsonOf<P>>;
@@ -4200,9 +4250,15 @@ type RunSlot = {
4200
4250
  submitted: boolean;
4201
4251
  phases: readonly RunPhase[];
4202
4252
  } | null;
4253
+ type PreviewOutcome = {
4254
+ kind: 'running';
4255
+ } | {
4256
+ kind: 'succeeded';
4257
+ data: JsonOf<'stack preview'>;
4258
+ };
4203
4259
  type PreviewSlot = {
4204
4260
  token: object;
4205
- data: JsonOf<'stack preview'>;
4261
+ outcome: PreviewOutcome;
4206
4262
  } | null;
4207
4263
  type ReportSlot = {
4208
4264
  sessions: ReadonlyMap<object, ReportFold>;
@@ -4249,14 +4305,9 @@ type LiveSlots = Omit<ResultSlots, 'report'> & {
4249
4305
  };
4250
4306
 
4251
4307
  declare function liveSlots(slots: ResultSlots, current: OnScreen): LiveSlots;
4308
+ declare function commandUnderWay({ run, preview, running, }: Pick<ResultSlots, 'run' | 'preview' | 'running'>): boolean;
4252
4309
  declare function reduceRun(prev: RunSlot, token: object, event: JsonOf<'stack apply'>): RunSlot;
4253
- type FailedCommand = {
4254
- kind: 'read';
4255
- path: BoundPath;
4256
- } | {
4257
- kind: 'write';
4258
- };
4259
- declare function failureSays(error: unknown, command: FailedCommand): {
4310
+ declare function failureSays(error: unknown): {
4260
4311
  message: string;
4261
4312
  failure?: CommandFailure;
4262
4313
  };
@@ -4413,4 +4464,4 @@ declare function resolveContributions<P extends PanelSpec>(all: ContributionSet<
4413
4464
  /** Every resolved action placed in a given panel's row (a `row:<panel>` placement). */
4414
4465
  declare function rowActions(resolved: ContributionSet, panelId: string): readonly ActionContribution[];
4415
4466
 
4416
- export { type EngineCaller as $, type ActionContribution as A, type Badge as B, type ContributionSet as C, type Decorations as D, type EdgeRef as E, type CommandRun as F, CommandUnobservedError as G, type CommandsPort as H, type ConfirmSpec as I, type JsonOf as J, type ConnectCallerOptions as K, type LayoutHandle as L, ConnectError as M, type NodeDecoration as N, type OverlayContribution as O, type PanelSpec as P, type ContextKey as Q, type ResultStore as R, type SourcePort as S, type ContextPort as T, type CreatedRef as U, type DirectEngineCaller as V, EMPTY_REPORT_FOLD as W, type EditorBinding as X, type EditorEnv as Y, type EditorEnvExtras as Z, type EditorPort as _, type CanvasCtx as a, type LaceReason as a$, type EngineMethodResponse as a0, type EngineSession as a1, type EngineSessionOptions as a2, type EngineTarget as a3, type ErasedCommand as a4, type FollowSlot as a5, type GateChangeRequest as a6, type GenerateEvent as a7, type GraphError as a8, type HostBinding as a9, type ViewStatePort as aA, type WiringCandidate as aB, type WiringQuery as aC, answering as aD, bridgeCaller as aE, carriesFailure as aF, connectCaller as aG, createActionRunner as aH, createResultStore as aI, currentReport as aJ, defineCommand as aK, diagnosticsOf as aL, disabledReason as aM, foldReport as aN, isBoundPath as aO, openEngineCommands as aP, openEngineSession as aQ, parseBound as aR, parseCommandFailure as aS, reportDiagnostics as aT, resolveContributions as aU, rowActions as aV, toArgv as aW, uniqueDiagnostics as aX, Action as aY, type FailedCommand as aZ, InputMode as a_, type Invocation as aa, type KeySpec as ab, type Placement as ac, type PortName as ad, type PresenterPort as ae, type PreviewSlot as af, Reason as ag, type ReportEntry as ah, type ReportFold as ai, type ReportPath as aj, type ReportSlot as ak, type ResultKind as al, type ResultSlots as am, type RunCtx as an, type RunOutcome as ao, type RunSlot as ap, type RunnerPorts as aq, type RunningMark as ar, SCHEMAS as as, type Sink as at, type SinkInput as au, type SlotContext as av, type SlotKind as aw, type SourceConflict as ax, type StackRef as ay, type Started as az, type CanvasPorts as b, type LiveSlots as b0, type OnScreen as b1, type RunPhase as b2, type RunPhaseStatus as b3, diagnosticsOfDocument as b4, failureSays as b5, liveSlots as b6, reasonWire as b7, reduceFollow as b8, reducePreview as b9, reduceReport as ba, reduceRun as bb, settleRun as bc, 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, Bundle as j, type ActionRunner as k, type ActionIcon 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, type Busy as s, COMMANDS as t, type ClipboardStore as u, type CommandBinding as v, CommandDetachedError as w, CommandExitError as x, type CommandFailure as y, type CommandPath as z };
4467
+ export { type EngineCaller as $, type ActionContribution as A, type Badge as B, type ContributionSet as C, type Decorations as D, type EdgeRef as E, type CommandRun as F, CommandUnobservedError as G, type CommandsPort as H, type ConfirmSpec as I, type JsonOf as J, type ConnectCallerOptions as K, type LayoutHandle as L, ConnectError as M, type NodeDecoration as N, type OverlayContribution as O, type PanelSpec as P, type ContextKey as Q, type ResultStore as R, type SourcePort as S, type ContextPort as T, type CreatedRef as U, type DirectEngineCaller as V, EMPTY_REPORT_FOLD as W, type EditorBinding as X, type EditorEnv as Y, type EditorEnvExtras as Z, type EditorPort as _, type CanvasCtx as a, InputMode as a$, type EngineMethodResponse as a0, type EngineSession as a1, type EngineSessionOptions as a2, type EngineTarget as a3, type ErasedCommand as a4, type FollowSlot as a5, type GateChangeRequest as a6, type GenerateEvent as a7, type GraphError as a8, type HostBinding as a9, type Started as aA, type ViewStatePort as aB, type WiringCandidate as aC, type WiringQuery as aD, answering as aE, bridgeCaller as aF, carriesFailure as aG, commandUnderWay as aH, connectCaller as aI, createActionRunner as aJ, createResultStore as aK, currentReport as aL, defineCommand as aM, diagnosticsOf as aN, disabledReason as aO, foldReport as aP, isBoundPath as aQ, openEngineCommands as aR, openEngineSession as aS, parseBound as aT, parseCommandFailure as aU, reportDiagnostics as aV, resolveContributions as aW, rowActions as aX, toArgv as aY, uniqueDiagnostics as aZ, Action as a_, type Invocation as aa, type KeySpec as ab, type Placement as ac, type PortName as ad, type PresenterPort as ae, type PreviewOutcome as af, type PreviewSlot as ag, Reason as ah, type ReportEntry as ai, type ReportFold as aj, type ReportPath as ak, type ReportSlot as al, type ResultKind as am, type ResultSlots as an, type RunCtx as ao, type RunOutcome as ap, type RunSlot as aq, type RunnerPorts as ar, type RunningMark as as, SCHEMAS as at, type Sink as au, type SinkInput as av, type SlotContext as aw, type SlotKind as ax, type SourceConflict as ay, type StackRef as az, type CanvasPorts as b, type LaceReason as b0, type LiveSlots as b1, type OnScreen as b2, type RunPhase as b3, type RunPhaseStatus as b4, diagnosticsOfDocument as b5, failureSays as b6, liveSlots as b7, reasonWire as b8, reduceFollow as b9, reducePreview as ba, reduceReport as bb, reduceRun as bc, settleRun as bd, 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, Bundle as j, type ActionRunner as k, type ActionIcon 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, type Busy as s, COMMANDS as t, type ClipboardStore as u, type CommandBinding as v, CommandDetachedError as w, CommandExitError as x, type CommandFailure as y, type CommandPath as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lace-cloud/canvas",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "license": "BUSL-1.1",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "react": "^18.3.1",
24
24
  "react-dom": "^18.3.1",
25
25
  "zod": "^4.1.11",
26
- "@lace-cloud/proto": "0.26.0",
27
- "@lace-cloud/ui": "0.26.0"
26
+ "@lace-cloud/ui": "0.28.0",
27
+ "@lace-cloud/proto": "0.28.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/react": "^18.3.12",