@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.
@@ -1,5 +1,5 @@
1
- import { A as ActionContribution, S as SourcePort } from '../registry-BhFAgvlq.mjs';
2
- export { aY as Action, k as ActionRunner, m as ActionRunnerOptions, f as ActionTarget, n as ApplyResult, o as ApplyUnobservedError, p as ArgsOf, q as BindingRuntime, d as BoundPath, r as BridgeEngineCaller, s as Busy, t as COMMANDS, b as CanvasPorts, h as CanvasSource, v as CommandBinding, w as CommandDetachedError, x as CommandExitError, y as CommandFailure, z as CommandPath, g as CommandResult, F as CommandRun, G as CommandUnobservedError, H as CommandsPort, I as ConfirmSpec, K as ConnectCallerOptions, M as ConnectError, T as ContextPort, U as CreatedRef, V as DirectEngineCaller, W as EMPTY_REPORT_FOLD, _ as EditorPort, $ as EngineCaller, a0 as EngineMethodResponse, a1 as EngineSession, a2 as EngineSessionOptions, a3 as EngineTarget, a4 as ErasedCommand, aZ as FailedCommand, a5 as FollowSlot, a6 as GateChangeRequest, a7 as GenerateEvent, a8 as GraphError, a9 as HostBinding, a_ as InputMode, aa as Invocation, J as JsonOf, a$ as LaceReason, b0 as LiveSlots, b1 as OnScreen, c as PendingForm, ad as PortName, ae as PresenterPort, af as PreviewSlot, ag as Reason, ah as ReportEntry, ai as ReportFold, aj as ReportPath, ak as ReportSlot, al as ResultKind, am as ResultSlots, R as ResultStore, an as RunCtx, ao as RunOutcome, b2 as RunPhase, b3 as RunPhaseStatus, ap as RunSlot, aq as RunnerPorts, ar as RunningMark, as as SCHEMAS, at as Sink, au as SinkInput, av as SlotContext, aw as SlotKind, ax as SourceConflict, i as SourceEnd, ay as StackRef, az as Started, aA as ViewStatePort, aB as WiringCandidate, aC as WiringQuery, aD as answering, aE as bridgeCaller, aF as carriesFailure, aG as connectCaller, aH as createActionRunner, aI as createResultStore, aJ as currentReport, aK as defineCommand, aL as diagnosticsOf, b4 as diagnosticsOfDocument, b5 as failureSays, aN as foldReport, aO as isBoundPath, b6 as liveSlots, aP as openEngineCommands, aQ as openEngineSession, aR as parseBound, aS as parseCommandFailure, b7 as reasonWire, b8 as reduceFollow, b9 as reducePreview, ba as reduceReport, bb as reduceRun, aT as reportDiagnostics, bc as settleRun, aW as toArgv, aX as uniqueDiagnostics } from '../registry-BhFAgvlq.mjs';
1
+ import { A as ActionContribution, S as SourcePort } from '../registry-LzXZx20m.mjs';
2
+ export { a_ as Action, k as ActionRunner, m as ActionRunnerOptions, f as ActionTarget, n as ApplyResult, o as ApplyUnobservedError, p as ArgsOf, q as BindingRuntime, d as BoundPath, r as BridgeEngineCaller, s as Busy, t as COMMANDS, b as CanvasPorts, h as CanvasSource, v as CommandBinding, w as CommandDetachedError, x as CommandExitError, y as CommandFailure, z as CommandPath, g as CommandResult, F as CommandRun, G as CommandUnobservedError, H as CommandsPort, I as ConfirmSpec, K as ConnectCallerOptions, M as ConnectError, T as ContextPort, U as CreatedRef, V as DirectEngineCaller, W as EMPTY_REPORT_FOLD, _ as EditorPort, $ as EngineCaller, a0 as EngineMethodResponse, a1 as EngineSession, a2 as EngineSessionOptions, a3 as EngineTarget, a4 as ErasedCommand, a5 as FollowSlot, a6 as GateChangeRequest, a7 as GenerateEvent, a8 as GraphError, a9 as HostBinding, a$ as InputMode, aa as Invocation, J as JsonOf, b0 as LaceReason, b1 as LiveSlots, b2 as OnScreen, c as PendingForm, ad as PortName, ae as PresenterPort, af as PreviewOutcome, ag as PreviewSlot, ah as Reason, ai as ReportEntry, aj as ReportFold, ak as ReportPath, al as ReportSlot, am as ResultKind, an as ResultSlots, R as ResultStore, ao as RunCtx, ap as RunOutcome, b3 as RunPhase, b4 as RunPhaseStatus, aq as RunSlot, ar as RunnerPorts, as as RunningMark, at as SCHEMAS, au as Sink, av as SinkInput, aw as SlotContext, ax as SlotKind, ay as SourceConflict, i as SourceEnd, az as StackRef, aA as Started, aB as ViewStatePort, aC as WiringCandidate, aD as WiringQuery, aE as answering, aF as bridgeCaller, aG as carriesFailure, aH as commandUnderWay, aI as connectCaller, aJ as createActionRunner, aK as createResultStore, aL as currentReport, aM as defineCommand, aN as diagnosticsOf, b5 as diagnosticsOfDocument, b6 as failureSays, aP as foldReport, aQ as isBoundPath, b7 as liveSlots, aR as openEngineCommands, aS as openEngineSession, aT as parseBound, aU as parseCommandFailure, b8 as reasonWire, b9 as reduceFollow, ba as reducePreview, bb as reduceReport, bc as reduceRun, aV as reportDiagnostics, bd as settleRun, aY as toArgv, aZ as uniqueDiagnostics } from '../registry-LzXZx20m.mjs';
3
3
  import '@lace-cloud/proto';
4
4
  import 'zod';
5
5
  import '@bufbuild/protobuf/wire';
@@ -1,5 +1,5 @@
1
- import { A as ActionContribution, S as SourcePort } from '../registry-BhFAgvlq.js';
2
- export { aY as Action, k as ActionRunner, m as ActionRunnerOptions, f as ActionTarget, n as ApplyResult, o as ApplyUnobservedError, p as ArgsOf, q as BindingRuntime, d as BoundPath, r as BridgeEngineCaller, s as Busy, t as COMMANDS, b as CanvasPorts, h as CanvasSource, v as CommandBinding, w as CommandDetachedError, x as CommandExitError, y as CommandFailure, z as CommandPath, g as CommandResult, F as CommandRun, G as CommandUnobservedError, H as CommandsPort, I as ConfirmSpec, K as ConnectCallerOptions, M as ConnectError, T as ContextPort, U as CreatedRef, V as DirectEngineCaller, W as EMPTY_REPORT_FOLD, _ as EditorPort, $ as EngineCaller, a0 as EngineMethodResponse, a1 as EngineSession, a2 as EngineSessionOptions, a3 as EngineTarget, a4 as ErasedCommand, aZ as FailedCommand, a5 as FollowSlot, a6 as GateChangeRequest, a7 as GenerateEvent, a8 as GraphError, a9 as HostBinding, a_ as InputMode, aa as Invocation, J as JsonOf, a$ as LaceReason, b0 as LiveSlots, b1 as OnScreen, c as PendingForm, ad as PortName, ae as PresenterPort, af as PreviewSlot, ag as Reason, ah as ReportEntry, ai as ReportFold, aj as ReportPath, ak as ReportSlot, al as ResultKind, am as ResultSlots, R as ResultStore, an as RunCtx, ao as RunOutcome, b2 as RunPhase, b3 as RunPhaseStatus, ap as RunSlot, aq as RunnerPorts, ar as RunningMark, as as SCHEMAS, at as Sink, au as SinkInput, av as SlotContext, aw as SlotKind, ax as SourceConflict, i as SourceEnd, ay as StackRef, az as Started, aA as ViewStatePort, aB as WiringCandidate, aC as WiringQuery, aD as answering, aE as bridgeCaller, aF as carriesFailure, aG as connectCaller, aH as createActionRunner, aI as createResultStore, aJ as currentReport, aK as defineCommand, aL as diagnosticsOf, b4 as diagnosticsOfDocument, b5 as failureSays, aN as foldReport, aO as isBoundPath, b6 as liveSlots, aP as openEngineCommands, aQ as openEngineSession, aR as parseBound, aS as parseCommandFailure, b7 as reasonWire, b8 as reduceFollow, b9 as reducePreview, ba as reduceReport, bb as reduceRun, aT as reportDiagnostics, bc as settleRun, aW as toArgv, aX as uniqueDiagnostics } from '../registry-BhFAgvlq.js';
1
+ import { A as ActionContribution, S as SourcePort } from '../registry-LzXZx20m.js';
2
+ export { a_ as Action, k as ActionRunner, m as ActionRunnerOptions, f as ActionTarget, n as ApplyResult, o as ApplyUnobservedError, p as ArgsOf, q as BindingRuntime, d as BoundPath, r as BridgeEngineCaller, s as Busy, t as COMMANDS, b as CanvasPorts, h as CanvasSource, v as CommandBinding, w as CommandDetachedError, x as CommandExitError, y as CommandFailure, z as CommandPath, g as CommandResult, F as CommandRun, G as CommandUnobservedError, H as CommandsPort, I as ConfirmSpec, K as ConnectCallerOptions, M as ConnectError, T as ContextPort, U as CreatedRef, V as DirectEngineCaller, W as EMPTY_REPORT_FOLD, _ as EditorPort, $ as EngineCaller, a0 as EngineMethodResponse, a1 as EngineSession, a2 as EngineSessionOptions, a3 as EngineTarget, a4 as ErasedCommand, a5 as FollowSlot, a6 as GateChangeRequest, a7 as GenerateEvent, a8 as GraphError, a9 as HostBinding, a$ as InputMode, aa as Invocation, J as JsonOf, b0 as LaceReason, b1 as LiveSlots, b2 as OnScreen, c as PendingForm, ad as PortName, ae as PresenterPort, af as PreviewOutcome, ag as PreviewSlot, ah as Reason, ai as ReportEntry, aj as ReportFold, ak as ReportPath, al as ReportSlot, am as ResultKind, an as ResultSlots, R as ResultStore, ao as RunCtx, ap as RunOutcome, b3 as RunPhase, b4 as RunPhaseStatus, aq as RunSlot, ar as RunnerPorts, as as RunningMark, at as SCHEMAS, au as Sink, av as SinkInput, aw as SlotContext, ax as SlotKind, ay as SourceConflict, i as SourceEnd, az as StackRef, aA as Started, aB as ViewStatePort, aC as WiringCandidate, aD as WiringQuery, aE as answering, aF as bridgeCaller, aG as carriesFailure, aH as commandUnderWay, aI as connectCaller, aJ as createActionRunner, aK as createResultStore, aL as currentReport, aM as defineCommand, aN as diagnosticsOf, b5 as diagnosticsOfDocument, b6 as failureSays, aP as foldReport, aQ as isBoundPath, b7 as liveSlots, aR as openEngineCommands, aS as openEngineSession, aT as parseBound, aU as parseCommandFailure, b8 as reasonWire, b9 as reduceFollow, ba as reducePreview, bb as reduceReport, bc as reduceRun, aV as reportDiagnostics, bd as settleRun, aY as toArgv, aZ as uniqueDiagnostics } from '../registry-LzXZx20m.js';
3
3
  import '@lace-cloud/proto';
4
4
  import 'zod';
5
5
  import '@bufbuild/protobuf/wire';
@@ -15,6 +15,7 @@ import {
15
15
  autosave,
16
16
  bridgeCaller,
17
17
  carriesFailure,
18
+ commandUnderWay,
18
19
  connectCaller,
19
20
  createActionRunner,
20
21
  createResultStore,
@@ -39,7 +40,7 @@ import {
39
40
  settleRun,
40
41
  toArgv,
41
42
  uniqueDiagnostics
42
- } from "../chunk-ID563WHD.mjs";
43
+ } from "../chunk-DYTLLFEM.mjs";
43
44
  export {
44
45
  ApplyUnobservedError,
45
46
  AutosaveEndedError,
@@ -57,6 +58,7 @@ export {
57
58
  autosave,
58
59
  bridgeCaller,
59
60
  carriesFailure,
61
+ commandUnderWay,
60
62
  connectCaller,
61
63
  createActionRunner,
62
64
  createResultStore,
package/dist/index.cjs CHANGED
@@ -69,6 +69,7 @@ __export(index_exports, {
69
69
  answering: () => answering,
70
70
  bridgeCaller: () => bridgeCaller,
71
71
  carriesFailure: () => carriesFailure,
72
+ commandUnderWay: () => commandUnderWay,
72
73
  conflictPanel: () => conflictPanel,
73
74
  connectCaller: () => connectCaller,
74
75
  createActionRunner: () => createActionRunner,
@@ -11324,10 +11325,9 @@ var CommandDetachedError = class extends Error {
11324
11325
  }
11325
11326
  };
11326
11327
  var CommandUnobservedError = class extends Error {
11327
- constructor() {
11328
- super(
11329
- "the engine's stream ended before the command exited: the command ran and may have made changes, but its outcome is unknown"
11330
- );
11328
+ constructor(path) {
11329
+ super(`the engine's stream ended before \`lace ${path}\` exited`);
11330
+ this.path = path;
11331
11331
  }
11332
11332
  };
11333
11333
 
@@ -13754,6 +13754,7 @@ var COMMANDS = {
13754
13754
  "type": "string"
13755
13755
  }
13756
13756
  },
13757
+ "effect": "write",
13757
13758
  "hidden": false,
13758
13759
  "yes": false
13759
13760
  },
@@ -13780,6 +13781,7 @@ var COMMANDS = {
13780
13781
  "type": "string"
13781
13782
  }
13782
13783
  },
13784
+ "effect": "read",
13783
13785
  "hidden": false,
13784
13786
  "yes": false
13785
13787
  },
@@ -13804,6 +13806,7 @@ var COMMANDS = {
13804
13806
  "type": "string"
13805
13807
  }
13806
13808
  },
13809
+ "effect": "read",
13807
13810
  "hidden": false,
13808
13811
  "yes": false
13809
13812
  },
@@ -13818,6 +13821,7 @@ var COMMANDS = {
13818
13821
  "type": "string"
13819
13822
  }
13820
13823
  },
13824
+ "effect": "write",
13821
13825
  "hidden": false,
13822
13826
  "yes": false
13823
13827
  },
@@ -13829,6 +13833,7 @@ var COMMANDS = {
13829
13833
  "type": "string"
13830
13834
  }
13831
13835
  },
13836
+ "effect": "write",
13832
13837
  "hidden": false,
13833
13838
  "yes": false
13834
13839
  },
@@ -13840,6 +13845,7 @@ var COMMANDS = {
13840
13845
  "type": "bool"
13841
13846
  }
13842
13847
  },
13848
+ "effect": "read",
13843
13849
  "hidden": false,
13844
13850
  "yes": false
13845
13851
  },
@@ -13867,6 +13873,7 @@ var COMMANDS = {
13867
13873
  "type": "string"
13868
13874
  }
13869
13875
  },
13876
+ "effect": "write",
13870
13877
  "hidden": false,
13871
13878
  "yes": false
13872
13879
  },
@@ -13882,6 +13889,7 @@ var COMMANDS = {
13882
13889
  ]
13883
13890
  }
13884
13891
  },
13892
+ "effect": "write",
13885
13893
  "hidden": false,
13886
13894
  "yes": false
13887
13895
  },
@@ -13900,6 +13908,7 @@ var COMMANDS = {
13900
13908
  "type": "string"
13901
13909
  }
13902
13910
  },
13911
+ "effect": "rewrite",
13903
13912
  "hidden": false,
13904
13913
  "yes": false
13905
13914
  },
@@ -13923,6 +13932,7 @@ var COMMANDS = {
13923
13932
  "type": "string"
13924
13933
  }
13925
13934
  },
13935
+ "effect": "write",
13926
13936
  "hidden": false,
13927
13937
  "yes": false
13928
13938
  },
@@ -13950,6 +13960,7 @@ var COMMANDS = {
13950
13960
  "type": "bool"
13951
13961
  }
13952
13962
  },
13963
+ "effect": "rewrite",
13953
13964
  "hidden": false,
13954
13965
  "yes": false
13955
13966
  },
@@ -13984,6 +13995,7 @@ var COMMANDS = {
13984
13995
  "type": "bool"
13985
13996
  }
13986
13997
  },
13998
+ "effect": "read",
13987
13999
  "hidden": false,
13988
14000
  "yes": false
13989
14001
  },
@@ -14012,6 +14024,7 @@ var COMMANDS = {
14012
14024
  ]
14013
14025
  }
14014
14026
  },
14027
+ "effect": "write",
14015
14028
  "hidden": false,
14016
14029
  "yes": false
14017
14030
  },
@@ -14027,6 +14040,7 @@ var COMMANDS = {
14027
14040
  ]
14028
14041
  }
14029
14042
  },
14043
+ "effect": "read",
14030
14044
  "hidden": false,
14031
14045
  "yes": false
14032
14046
  },
@@ -14042,6 +14056,7 @@ var COMMANDS = {
14042
14056
  ]
14043
14057
  }
14044
14058
  },
14059
+ "effect": "read",
14045
14060
  "hidden": false,
14046
14061
  "yes": false
14047
14062
  },
@@ -14062,6 +14077,7 @@ var COMMANDS = {
14062
14077
  ]
14063
14078
  }
14064
14079
  },
14080
+ "effect": "write",
14065
14081
  "hidden": false,
14066
14082
  "yes": false
14067
14083
  },
@@ -14088,6 +14104,7 @@ var COMMANDS = {
14088
14104
  "type": "string"
14089
14105
  }
14090
14106
  },
14107
+ "effect": "read",
14091
14108
  "hidden": false,
14092
14109
  "yes": false
14093
14110
  },
@@ -14112,6 +14129,7 @@ var COMMANDS = {
14112
14129
  "type": "string"
14113
14130
  }
14114
14131
  },
14132
+ "effect": "read",
14115
14133
  "hidden": false,
14116
14134
  "yes": false
14117
14135
  },
@@ -14138,6 +14156,7 @@ var COMMANDS = {
14138
14156
  "type": "string"
14139
14157
  }
14140
14158
  },
14159
+ "effect": "read",
14141
14160
  "hidden": false,
14142
14161
  "yes": false
14143
14162
  },
@@ -14167,6 +14186,7 @@ var COMMANDS = {
14167
14186
  ]
14168
14187
  }
14169
14188
  },
14189
+ "effect": "read",
14170
14190
  "hidden": false,
14171
14191
  "yes": false
14172
14192
  },
@@ -14209,6 +14229,7 @@ var COMMANDS = {
14209
14229
  "type": "string"
14210
14230
  }
14211
14231
  },
14232
+ "effect": "read",
14212
14233
  "hidden": false,
14213
14234
  "yes": false
14214
14235
  },
@@ -14241,6 +14262,7 @@ var COMMANDS = {
14241
14262
  "type": "string"
14242
14263
  }
14243
14264
  },
14265
+ "effect": "read",
14244
14266
  "hidden": false,
14245
14267
  "yes": false
14246
14268
  },
@@ -14266,6 +14288,7 @@ var COMMANDS = {
14266
14288
  "type": "string"
14267
14289
  }
14268
14290
  },
14291
+ "effect": "read",
14269
14292
  "hidden": false,
14270
14293
  "yes": false
14271
14294
  },
@@ -14295,6 +14318,7 @@ var COMMANDS = {
14295
14318
  "type": "string"
14296
14319
  }
14297
14320
  },
14321
+ "effect": "write",
14298
14322
  "hidden": false,
14299
14323
  "yes": false
14300
14324
  },
@@ -14324,6 +14348,7 @@ var COMMANDS = {
14324
14348
  "type": "string"
14325
14349
  }
14326
14350
  },
14351
+ "effect": "read",
14327
14352
  "hidden": false,
14328
14353
  "yes": false
14329
14354
  },
@@ -14366,6 +14391,7 @@ var COMMANDS = {
14366
14391
  "type": "string"
14367
14392
  }
14368
14393
  },
14394
+ "effect": "read",
14369
14395
  "hidden": false,
14370
14396
  "yes": false
14371
14397
  },
@@ -14395,6 +14421,7 @@ var COMMANDS = {
14395
14421
  "type": "string"
14396
14422
  }
14397
14423
  },
14424
+ "effect": "read",
14398
14425
  "hidden": false,
14399
14426
  "yes": false
14400
14427
  },
@@ -14421,6 +14448,7 @@ var COMMANDS = {
14421
14448
  "type": "string"
14422
14449
  }
14423
14450
  },
14451
+ "effect": "read",
14424
14452
  "hidden": false,
14425
14453
  "yes": false
14426
14454
  },
@@ -14467,6 +14495,7 @@ var COMMANDS = {
14467
14495
  "repeated": true
14468
14496
  }
14469
14497
  },
14498
+ "effect": "write",
14470
14499
  "hidden": false,
14471
14500
  "yes": false
14472
14501
  },
@@ -14515,6 +14544,7 @@ var COMMANDS = {
14515
14544
  "type": "string"
14516
14545
  }
14517
14546
  },
14547
+ "effect": "write",
14518
14548
  "hidden": false,
14519
14549
  "yes": false
14520
14550
  },
@@ -14544,6 +14574,7 @@ var COMMANDS = {
14544
14574
  "type": "bool"
14545
14575
  }
14546
14576
  },
14577
+ "effect": "write",
14547
14578
  "hidden": false,
14548
14579
  "yes": true
14549
14580
  },
@@ -14576,6 +14607,7 @@ var COMMANDS = {
14576
14607
  "type": "string"
14577
14608
  }
14578
14609
  },
14610
+ "effect": "read",
14579
14611
  "hidden": false,
14580
14612
  "yes": false
14581
14613
  },
@@ -14628,6 +14660,7 @@ var COMMANDS = {
14628
14660
  "type": "bool"
14629
14661
  }
14630
14662
  },
14663
+ "effect": "write",
14631
14664
  "hidden": false,
14632
14665
  "yes": true
14633
14666
  },
@@ -14657,6 +14690,7 @@ var COMMANDS = {
14657
14690
  "type": "string"
14658
14691
  }
14659
14692
  },
14693
+ "effect": "read",
14660
14694
  "hidden": false,
14661
14695
  "yes": false
14662
14696
  },
@@ -14693,6 +14727,7 @@ var COMMANDS = {
14693
14727
  "type": "string"
14694
14728
  }
14695
14729
  },
14730
+ "effect": "rewrite",
14696
14731
  "hidden": false,
14697
14732
  "yes": false
14698
14733
  },
@@ -14726,6 +14761,7 @@ var COMMANDS = {
14726
14761
  "type": "string"
14727
14762
  }
14728
14763
  },
14764
+ "effect": "read",
14729
14765
  "hidden": false,
14730
14766
  "yes": false
14731
14767
  },
@@ -14760,6 +14796,7 @@ var COMMANDS = {
14760
14796
  "repeated": true
14761
14797
  }
14762
14798
  },
14799
+ "effect": "write",
14763
14800
  "hidden": false,
14764
14801
  "yes": false
14765
14802
  },
@@ -14795,6 +14832,7 @@ var COMMANDS = {
14795
14832
  "type": "duration"
14796
14833
  }
14797
14834
  },
14835
+ "effect": "write",
14798
14836
  "hidden": false,
14799
14837
  "yes": false
14800
14838
  },
@@ -14836,6 +14874,7 @@ var COMMANDS = {
14836
14874
  "type": "string"
14837
14875
  }
14838
14876
  },
14877
+ "effect": "write",
14839
14878
  "hidden": false,
14840
14879
  "yes": false
14841
14880
  },
@@ -14854,6 +14893,7 @@ var COMMANDS = {
14854
14893
  ]
14855
14894
  }
14856
14895
  },
14896
+ "effect": "read",
14857
14897
  "hidden": false,
14858
14898
  "yes": false
14859
14899
  },
@@ -14878,6 +14918,7 @@ var COMMANDS = {
14878
14918
  ]
14879
14919
  }
14880
14920
  },
14921
+ "effect": "read",
14881
14922
  "hidden": false,
14882
14923
  "yes": false
14883
14924
  },
@@ -14901,6 +14942,7 @@ var COMMANDS = {
14901
14942
  ]
14902
14943
  }
14903
14944
  },
14945
+ "effect": "write",
14904
14946
  "hidden": false,
14905
14947
  "yes": false
14906
14948
  },
@@ -14916,6 +14958,7 @@ var COMMANDS = {
14916
14958
  ]
14917
14959
  }
14918
14960
  },
14961
+ "effect": "read",
14919
14962
  "hidden": false,
14920
14963
  "yes": false
14921
14964
  },
@@ -14931,6 +14974,7 @@ var COMMANDS = {
14931
14974
  ]
14932
14975
  }
14933
14976
  },
14977
+ "effect": "read",
14934
14978
  "hidden": false,
14935
14979
  "yes": false
14936
14980
  }
@@ -15734,6 +15778,13 @@ function liveSlots(slots, current) {
15734
15778
  report: liveReport(report, current)
15735
15779
  };
15736
15780
  }
15781
+ function commandUnderWay({
15782
+ run,
15783
+ preview: preview2,
15784
+ running
15785
+ }) {
15786
+ return run?.outcome.kind === "running" || preview2?.outcome.kind === "running" || running.size > 0;
15787
+ }
15737
15788
  function withPhase(phases, name) {
15738
15789
  return [...phases.map((p) => ({ ...p, status: "done" })), { name, status: "current" }];
15739
15790
  }
@@ -15764,34 +15815,34 @@ function reduceRun(prev, token, event) {
15764
15815
  phases
15765
15816
  };
15766
15817
  }
15767
- if (event.error)
15818
+ if (!event.error)
15768
15819
  return {
15769
15820
  token,
15770
- outcome: { kind: "failed", message: event.error },
15821
+ outcome: { kind: "succeeded" },
15771
15822
  lastLog,
15772
15823
  submitted,
15773
15824
  phases: closePhases(phases)
15774
15825
  };
15775
- return {
15776
- token,
15777
- outcome: { kind: "succeeded" },
15778
- lastLog,
15779
- submitted,
15780
- phases: closePhases(phases)
15781
- };
15782
15826
  }
15783
15827
  return { token, outcome: { kind: "running" }, lastLog, submitted, phases };
15784
15828
  }
15785
- function failureSays(error, command) {
15829
+ function runningFor(slot, token) {
15830
+ if (slot?.token !== token) return false;
15831
+ return "done" in slot ? !slot.done : slot.outcome.kind === "running";
15832
+ }
15833
+ function failureSays(error) {
15786
15834
  if (error instanceof CommandExitError) {
15787
- return error.failure ? { message: error.failure.message, failure: error.failure } : { message: error.stderrTail };
15835
+ if (error.failure) return { message: error.failure.message, failure: error.failure };
15836
+ const stderr = error.stderrTail.trim();
15837
+ return { message: stderr || `the command exited with code ${error.code} and wrote nothing` };
15788
15838
  }
15789
- if (error instanceof CommandUnobservedError && command.kind === "read") {
15790
- return { message: `the stream ended before \`lace ${command.path}\` finished; run it again` };
15839
+ if (error instanceof CommandUnobservedError) {
15840
+ return {
15841
+ message: COMMANDS[error.path].effect === "read" ? `${error.message}; run it again` : `${error.message}: it ran and may have made changes, but its outcome is unknown`
15842
+ };
15791
15843
  }
15792
15844
  return { message: error instanceof Error ? error.message : String(error) };
15793
15845
  }
15794
- var RUN = { kind: "write" };
15795
15846
  function settleRun(prev, token, error) {
15796
15847
  const carried = prev && prev.token === token ? prev : null;
15797
15848
  const lastLog = carried?.lastLog ?? null;
@@ -15807,7 +15858,7 @@ function settleRun(prev, token, error) {
15807
15858
  if (error.code === 7)
15808
15859
  return {
15809
15860
  token,
15810
- outcome: { kind: "blocked", ...failureSays(error, RUN) },
15861
+ outcome: { kind: "blocked", ...failureSays(error) },
15811
15862
  lastLog,
15812
15863
  submitted,
15813
15864
  phases
@@ -15815,14 +15866,14 @@ function settleRun(prev, token, error) {
15815
15866
  }
15816
15867
  return {
15817
15868
  token,
15818
- outcome: { kind: "failed", ...failureSays(error, RUN) },
15869
+ outcome: { kind: "failed", ...failureSays(error) },
15819
15870
  lastLog,
15820
15871
  submitted,
15821
15872
  phases
15822
15873
  };
15823
15874
  }
15824
15875
  function reducePreview(_prev, token, event) {
15825
- return { token, data: event };
15876
+ return { token, outcome: { kind: "succeeded", data: event } };
15826
15877
  }
15827
15878
  function reduceReport(prev, session, result) {
15828
15879
  const fold = foldReport(prev?.sessions.get(session) ?? EMPTY_REPORT_FOLD, result);
@@ -15835,6 +15886,15 @@ function reduceFollow(prev, token, event) {
15835
15886
  if (event.type === "log") return { token, runId, lines: [...lines, event.text], done: false };
15836
15887
  return { token, runId, lines, done: true };
15837
15888
  }
15889
+ function endStream(current, kind, token, error) {
15890
+ const { run, preview: preview2, follow } = current;
15891
+ if (kind === "run" && runningFor(run, token))
15892
+ return { ...current, run: stamp(settleRun(run, token, error), run.readOver) };
15893
+ if (kind === "preview" && runningFor(preview2, token)) return { ...current, preview: null };
15894
+ if (kind === "follow" && runningFor(follow, token))
15895
+ return { ...current, follow: { ...follow, done: true } };
15896
+ return current;
15897
+ }
15838
15898
  function createResultStore() {
15839
15899
  let slots = {
15840
15900
  run: null,
@@ -15866,11 +15926,14 @@ function createResultStore() {
15866
15926
  notify();
15867
15927
  },
15868
15928
  fail(kind, token, error) {
15869
- if (kind !== "run") return false;
15870
- if (retiredTokens.has(token) || !slots.run) return true;
15871
- slots = { ...slots, run: stamp(settleRun(slots.run, token, error), slots.run.readOver) };
15872
- notify();
15873
- return true;
15929
+ const rendered = kind === "run";
15930
+ if (retiredTokens.has(token)) return rendered;
15931
+ const next = endStream(slots, kind, token, error);
15932
+ if (next !== slots) {
15933
+ slots = next;
15934
+ notify();
15935
+ }
15936
+ return rendered;
15874
15937
  },
15875
15938
  begin(kind, token, readOver, started) {
15876
15939
  if (kind === "run") {
@@ -15885,6 +15948,8 @@ function createResultStore() {
15885
15948
  readOver
15886
15949
  }
15887
15950
  };
15951
+ } else if (kind === "preview") {
15952
+ slots = { ...slots, preview: { token, outcome: { kind: "running" }, readOver } };
15888
15953
  } else if (kind === "follow") {
15889
15954
  slots = {
15890
15955
  ...slots,
@@ -15899,27 +15964,23 @@ function createResultStore() {
15899
15964
  notify();
15900
15965
  },
15901
15966
  detach(kind, token) {
15902
- if (kind === "follow" && slots.follow?.token === token) {
15903
- slots = { ...slots, follow: null };
15904
- notify();
15905
- } else if (kind === "report" && slots.report?.sessions.has(token)) {
15906
- const sessions = new Map(slots.report.sessions);
15967
+ let next = endStream(slots, kind, token, new CommandDetachedError());
15968
+ if (kind === "follow" && next.follow?.token === token) {
15969
+ next = { ...next, follow: null };
15970
+ } else if (kind === "report" && next.report?.sessions.has(token)) {
15971
+ const sessions = new Map(next.report.sessions);
15907
15972
  sessions.delete(token);
15908
- slots = {
15909
- ...slots,
15910
- report: sessions.size > 0 ? { sessions, readOver: slots.report.readOver } : null
15973
+ next = {
15974
+ ...next,
15975
+ report: sessions.size > 0 ? { sessions, readOver: next.report.readOver } : null
15911
15976
  };
15912
- notify();
15913
- } else if (kind === "run" && slots.run?.token === token) {
15914
- const settled = settleRun(slots.run, token, new CommandDetachedError());
15915
- slots = { ...slots, run: stamp(settled, slots.run.readOver) };
15916
- notify();
15917
15977
  } else if (kind === "notify") {
15918
- const running = new Map([...slots.running].filter(([, mark]) => mark.token !== token));
15919
- if (running.size !== slots.running.size) {
15920
- slots = { ...slots, running };
15921
- notify();
15922
- }
15978
+ const running = new Map([...next.running].filter(([, mark]) => mark.token !== token));
15979
+ if (running.size !== next.running.size) next = { ...next, running };
15980
+ }
15981
+ if (next !== slots) {
15982
+ slots = next;
15983
+ notify();
15923
15984
  }
15924
15985
  retiredTokens.add(token);
15925
15986
  },
@@ -15974,10 +16035,7 @@ function defineCommand(binding) {
15974
16035
  } catch (err) {
15975
16036
  const settledByDocument = rendered && binding.result.kind === "notify" && (err instanceof CommandExitError || err instanceof CommandUnobservedError);
15976
16037
  if (!rt.fail(err) && !(err instanceof CommandDetachedError) && !settledByDocument) {
15977
- const { message, failure } = failureSays(
15978
- err,
15979
- binding.result.kind === "preview" || binding.result.kind === "follow" ? { kind: "read", path: binding.path } : { kind: "write" }
15980
- );
16038
+ const { message, failure } = failureSays(err);
15981
16039
  rt.ports.presenter.notify("error", message, ...failure ? [failure] : []);
15982
16040
  }
15983
16041
  if (binding.invalidates) rt.tick();
@@ -20317,7 +20375,7 @@ function commandsPort(caller, commandPaths, ownCwd) {
20317
20375
  let started = false;
20318
20376
  const stopped = (error) => {
20319
20377
  if (signal.aborted) return new CommandDetachedError();
20320
- if (started) return new CommandUnobservedError();
20378
+ if (started) return new CommandUnobservedError(path);
20321
20379
  return error;
20322
20380
  };
20323
20381
  try {
@@ -20447,6 +20505,7 @@ function convertCreatedRef(r) {
20447
20505
  answering,
20448
20506
  bridgeCaller,
20449
20507
  carriesFailure,
20508
+ commandUnderWay,
20450
20509
  conflictPanel,
20451
20510
  connectCaller,
20452
20511
  createActionRunner,