@lace-cloud/canvas 0.35.0 → 0.37.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,4 +1,4 @@
1
- import { EngineMethod, EngineStreamMethod, BridgeMethod, MessageBridge, Diagnostic as Diagnostic$1, CanvasArrangement, CanvasView } from '@lace-cloud/proto';
1
+ import { EngineMethod, EngineStreamMethod, BridgeMethod, MessageBridge, Diagnostic as Diagnostic$1, CanvasArrangement, XY, CanvasView } from '@lace-cloud/proto';
2
2
  import { z } from 'zod';
3
3
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
4
4
 
@@ -157,6 +157,8 @@ declare enum Reason {
157
157
  * `.terraform.lock.hcl`; `lace module lock` writes it.
158
158
  */
159
159
  REASON_NO_LOCKFILE = 22,
160
+ /** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
161
+ REASON_NO_COMMIT = 23,
160
162
  UNRECOGNIZED = -1
161
163
  }
162
164
 
@@ -456,6 +458,13 @@ interface InitializeResponse {
456
458
  supported_protocols: string[];
457
459
  /** space-joined paths of the non-hidden command tree */
458
460
  command_paths: string[];
461
+ /**
462
+ * The digest of the contract the engine serves (scripts/lib/engine-contract.mjs):
463
+ * the command tree, the `--output json` documents and the failure
464
+ * envelopes the CLI's tests record. A client built from another contract
465
+ * refuses the engine; the engine compares no contract of the client's.
466
+ */
467
+ contract: string;
459
468
  }
460
469
  declare const InitializeResponse: MessageFns<InitializeResponse>;
461
470
  interface ShutdownResponse {
@@ -869,8 +878,8 @@ declare const ApplyActionRequest: MessageFns<ApplyActionRequest>;
869
878
  * two instances of one module: `source_instance`'s `output` could feed
870
879
  * `target_instance`'s `input`, a required input with no binding. `score`
871
880
  * is the matcher's: 100 for the same name, 90 for the same last
872
- * `_`-separated word, 50 when one name contains the other, 30 for the
873
- * same type alone; a pair that scores nothing is no candidate.
881
+ * `_`-separated word, 50 when one name contains the other; a pair that
882
+ * scores nothing is no candidate.
874
883
  */
875
884
  interface WiringCandidate$1 {
876
885
  source_instance: string;
@@ -1191,6 +1200,11 @@ interface CreatedRef$1 {
1191
1200
  * the source child ID. Empty otherwise.
1192
1201
  */
1193
1202
  source_id: string;
1203
+ /**
1204
+ * Set when the child was promoted out of a dissolved group (ungroup): the
1205
+ * group's id in `scope`, which with source_id names the child. Empty otherwise.
1206
+ */
1207
+ group_id: string;
1194
1208
  }
1195
1209
  declare const CreatedRef$1: MessageFns<CreatedRef$1>;
1196
1210
  /**
@@ -2145,6 +2159,10 @@ declare const COMMANDS: {
2145
2159
  readonly readme: {
2146
2160
  readonly type: "string";
2147
2161
  };
2162
+ readonly visibility: {
2163
+ readonly type: "string";
2164
+ readonly values: readonly ["public", "org_private"];
2165
+ };
2148
2166
  };
2149
2167
  readonly effect: "read";
2150
2168
  readonly hidden: false;
@@ -2637,6 +2655,24 @@ declare const COMMANDS: {
2637
2655
  readonly hidden: false;
2638
2656
  readonly yes: false;
2639
2657
  };
2658
+ readonly "stack validate": {
2659
+ readonly path: "stack validate";
2660
+ readonly positionals: readonly [];
2661
+ readonly flags: {
2662
+ readonly output: {
2663
+ readonly type: "string";
2664
+ readonly values: readonly ["table", "json"];
2665
+ readonly short: "o";
2666
+ };
2667
+ readonly source: {
2668
+ readonly type: "string";
2669
+ readonly required: true;
2670
+ };
2671
+ };
2672
+ readonly effect: "read";
2673
+ readonly hidden: false;
2674
+ readonly yes: false;
2675
+ };
2640
2676
  readonly "team current": {
2641
2677
  readonly path: "team current";
2642
2678
  readonly positionals: readonly [];
@@ -2848,7 +2884,6 @@ declare const SCHEMAS: {
2848
2884
  deviation: z.ZodOptional<z.ZodObject<{
2849
2885
  notCompositional: z.ZodBoolean;
2850
2886
  clusters: z.ZodArray<z.ZodUnknown>;
2851
- residuals: z.ZodArray<z.ZodUnknown>;
2852
2887
  hasManagedBackend: z.ZodBoolean;
2853
2888
  backendFindings: z.ZodArray<z.ZodObject<{
2854
2889
  file: z.ZodString;
@@ -2939,7 +2974,6 @@ declare const SCHEMAS: {
2939
2974
  deviation: z.ZodOptional<z.ZodObject<{
2940
2975
  notCompositional: z.ZodBoolean;
2941
2976
  clusters: z.ZodArray<z.ZodUnknown>;
2942
- residuals: z.ZodArray<z.ZodUnknown>;
2943
2977
  hasManagedBackend: z.ZodBoolean;
2944
2978
  backendFindings: z.ZodArray<z.ZodObject<{
2945
2979
  file: z.ZodString;
@@ -3083,6 +3117,7 @@ declare const SCHEMAS: {
3083
3117
  }, z.core.$strip>>;
3084
3118
  truncated: z.ZodBoolean;
3085
3119
  publishingGuideUrl: z.ZodString;
3120
+ scopeNotice: z.ZodOptional<z.ZodString>;
3086
3121
  }, z.core.$strip>;
3087
3122
  'registry get': z.ZodObject<{
3088
3123
  axis: z.ZodString;
@@ -3712,6 +3747,12 @@ declare const SCHEMAS: {
3712
3747
  initiatedByName: z.ZodNullable<z.ZodString>;
3713
3748
  }, z.core.$strip>>;
3714
3749
  }, z.core.$strip>;
3750
+ 'stack validate': z.ZodObject<{
3751
+ kind: z.ZodLiteral<"git">;
3752
+ repoUrl: z.ZodString;
3753
+ ref: z.ZodOptional<z.ZodString>;
3754
+ path: z.ZodOptional<z.ZodString>;
3755
+ }, z.core.$strip>;
3715
3756
  'module import': z.ZodObject<{
3716
3757
  changed: z.ZodBoolean;
3717
3758
  written: z.ZodArray<z.ZodString>;
@@ -3745,7 +3786,6 @@ declare const SCHEMAS: {
3745
3786
  deviation: z.ZodOptional<z.ZodObject<{
3746
3787
  notCompositional: z.ZodBoolean;
3747
3788
  clusters: z.ZodArray<z.ZodUnknown>;
3748
- residuals: z.ZodArray<z.ZodUnknown>;
3749
3789
  hasManagedBackend: z.ZodBoolean;
3750
3790
  backendFindings: z.ZodArray<z.ZodObject<{
3751
3791
  file: z.ZodString;
@@ -4161,6 +4201,8 @@ type CreatedRef = {
4161
4201
  id: string;
4162
4202
  moduleKey: string;
4163
4203
  sourceId: string;
4204
+ /** The group the child was promoted out of by an ungroup, in `scope`; empty otherwise. */
4205
+ groupId: string;
4164
4206
  };
4165
4207
  /**
4166
4208
  * One output → input pair the engine's matcher scores between two instances
@@ -4295,6 +4337,20 @@ declare function openEngineCommands(caller: EngineCaller, { cwd }: {
4295
4337
  declare function openEngineSession(caller: DirectEngineCaller, target: EngineTarget, options?: EngineSessionOptions): Promise<EngineSession>;
4296
4338
  declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
4297
4339
 
4340
+ type DissolvedGroup = {
4341
+ path: string;
4342
+ moduleKey: string;
4343
+ at: XY;
4344
+ collapsed: boolean;
4345
+ };
4346
+ type Dissolution = {
4347
+ state: 'done' | 'undone';
4348
+ groups: readonly DissolvedGroup[];
4349
+ deleted: readonly string[];
4350
+ created: readonly CreatedRef[];
4351
+ content: unknown;
4352
+ };
4353
+
4298
4354
  /** The keys an action may bind with no modifier. */
4299
4355
  declare const BARE_KEYS: readonly ["Delete", "Backspace"];
4300
4356
  type BareKey = (typeof BARE_KEYS)[number];
@@ -4311,7 +4367,7 @@ type CanvasSelection = {
4311
4367
  nodes: readonly string[];
4312
4368
  edges: readonly string[];
4313
4369
  };
4314
- type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'unsaved' | 'resolved' | 'conflict' | 'sourceRefused' | 'needsConversion' | 'selection.node' | 'selection.several' | 'selection.entryScope' | 'selection.oneScope' | 'selection.edge' | 'selection.edges' | 'diagnostics' | 'settingsOpen' | 'generateIdle' | 'generating' | 'ungenerated' | 'undoable' | 'redoable';
4370
+ type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'unsaved' | 'resolved' | 'conflict' | 'sourceRefused' | 'needsConversion' | 'selection.node' | 'selection.several' | 'selection.entryScope' | 'selection.oneScope' | 'selection.edge' | 'selection.edges' | 'selection.disconnectable' | 'diagnostics' | 'settingsOpen' | 'generateIdle' | 'generating' | 'ungenerated' | 'undoable' | 'redoable';
4315
4371
  type RunCtx = {
4316
4372
  root?: string;
4317
4373
  sessionId?: string;
@@ -4406,6 +4462,12 @@ type CommandBinding<P extends BoundPath> = {
4406
4462
  kind: ResultFor<P>;
4407
4463
  };
4408
4464
  invalidates?: true | 'start+settle';
4465
+ preflight?: {
4466
+ [Q in BoundPath]: {
4467
+ path: Q;
4468
+ args: (ctx: RunCtx, target: ActionTarget) => Partial<ArgsOf<Q>>;
4469
+ };
4470
+ }[BoundPath];
4409
4471
  };
4410
4472
  type ClipboardStore = {
4411
4473
  get: () => {
@@ -4434,6 +4496,7 @@ type EditorEnv = {
4434
4496
  get: () => CanvasArrangement;
4435
4497
  update: (a: CanvasArrangement) => void;
4436
4498
  };
4499
+ dissolved?: (dissolution: Dissolution) => void;
4437
4500
  layout: LayoutHandle;
4438
4501
  };
4439
4502
  type EditorBinding = {
@@ -4461,8 +4524,10 @@ type ErasedCommand = {
4461
4524
  confirms: boolean;
4462
4525
  resultKind: ResultKind;
4463
4526
  invalidates?: true | 'start+settle';
4527
+ preflightPath?: BoundPath;
4464
4528
  partialArgs: (ctx: RunCtx, target: ActionTarget) => Record<string, unknown>;
4465
4529
  confirmSpec: (ctx: RunCtx, target: ActionTarget, formArgs: Record<string, unknown>) => ConfirmSpec | undefined;
4530
+ preflight: (rt: BindingRuntime, ctx: RunCtx, target: ActionTarget, signal: AbortSignal) => Promise<boolean>;
4466
4531
  start: (rt: BindingRuntime, ctx: RunCtx, target: ActionTarget, formArgs: Record<string, unknown>, signal: AbortSignal) => Promise<{
4467
4532
  cancel: () => Promise<void>;
4468
4533
  } | null>;
@@ -4701,6 +4766,7 @@ type CommandRun = {
4701
4766
  };
4702
4767
  type ActionRunnerOptions = {
4703
4768
  onPendingFormChange?(form: PendingForm): void;
4769
+ onDissolved?(dissolution: Dissolution): void;
4704
4770
  onRunLog?(line: string, run: CommandRun): void;
4705
4771
  };
4706
4772
  declare function createActionRunner(ports: RunnerPorts, store: ResultStore, options?: ActionRunnerOptions): ActionRunner;
@@ -4712,5 +4778,5 @@ declare function resolveContributions<P extends PanelSpec>(all: ContributionSet<
4712
4778
  /** Every resolved action placed in a given panel's row (a `row:<panel>` placement). */
4713
4779
  declare function rowActions(resolved: ContributionSet, panelId: string): readonly ActionContribution[];
4714
4780
 
4715
- export { COMMANDS as C, EMPTY_REPORT_FOLD as E, GENERATE_STAGES as O, InputMode as W, Action as a, Reason as a4, connectCaller as aA, createActionRunner as aB, createResultStore as aC, currentReport as aD, defineCommand as aE, diagnosticsOf as aF, diagnosticsOfDocument as aG, failureSays as aH, foldReport as aI, generatedTree as aJ, isBoundPath as aK, liveSlots as aL, openEngineCommands as aM, openEngineSession as aN, parseBound as aO, parseCommandFailure as aP, reasonWire as aQ, reduceFollow as aR, reducePreview as aS, reduceReport as aT, reduceRun as aU, reportDiagnostics as aV, settleRun as aW, toArgv as aX, uniqueDiagnostics as aY, SCHEMAS as aj, answering as av, bridgeCaller as aw, carriesFailure as ax, commandPathOf as ay, commandUnderWay as az, Bundle as b5, disabledReason as bg, resolveContributions as bh, rowActions as bi, ApplyUnobservedError as f, CommandDetachedError as n, CommandExitError as o, CommandUnobservedError as t, ConnectError as x };
4716
- export type { PendingForm as $, ActionContribution as A, BindingRuntime as B, DirectEngineCaller as D, EditorPort as F, EngineCaller as G, EngineMethodResponse as H, EngineSession as I, JsonOf as J, EngineSessionOptions as K, EngineTarget as L, ErasedCommand as M, FollowSlot as N, GateChangeRequest as P, GenerateEvent as Q, GenerateStage as R, SourcePort as S, GeneratedTree as T, GraphError as U, HostBinding as V, Invocation as X, LaceReason as Y, LiveSlots as Z, OnScreen as _, CanvasCtx as a$, PortName as a0, PresenterPort as a1, PreviewOutcome as a2, PreviewSlot as a3, ReportEntry as a5, ReportFold as a6, ReportPath as a7, ReportSlot as a8, ResultKind as a9, ContributionSet as aZ, PanelSpec as a_, ResultSlots as aa, ResultStore as ab, RunCtx as ac, RunOutcome as ad, RunSlot as ae, RunStage as af, RunStageStatus as ag, RunnerPorts as ah, RunningMark as ai, Sink as ak, SinkInput as al, SlotContext as am, SlotKind as an, SourceConflict as ao, SourceEnd as ap, StackRef as aq, Started as ar, ViewStatePort as as, WiringCandidate as at, WiringQuery as au, ActionRunner as b, Badge as b0, NodeDecoration as b1, Decorations as b2, CommandRead as b3, OverlayContribution as b4, CanvasSelection as b6, LayoutHandle as b7, ActionIcon as b8, ClipboardStore as b9, ContextKey as ba, EditorBinding as bb, EditorEnv as bc, EditorEnvExtras as bd, KeySpec as be, Placement as bf, ActionRunnerOptions as c, ActionTarget as d, ApplyResult as e, ArgsOf as g, BoundPath as h, BridgeEngineCaller as i, Busy as j, CanvasPorts as k, CanvasSource as l, CommandBinding as m, CommandFailure as p, CommandPath as q, CommandResult as r, CommandRun as s, CommandsPort as u, ConfirmSpec as v, ConnectCallerOptions as w, ContextPort as y, CreatedRef as z };
4781
+ export { COMMANDS as C, EMPTY_REPORT_FOLD as E, GENERATE_STAGES as O, InputMode as W, Action as a, Reason as a4, connectCaller as aA, createActionRunner as aB, createResultStore as aC, currentReport as aD, defineCommand as aE, diagnosticsOf as aF, diagnosticsOfDocument as aG, failureSays as aH, foldReport as aI, generatedTree as aJ, isBoundPath as aK, liveSlots as aL, openEngineCommands as aM, openEngineSession as aN, parseBound as aO, parseCommandFailure as aP, reasonWire as aQ, reduceFollow as aR, reducePreview as aS, reduceReport as aT, reduceRun as aU, reportDiagnostics as aV, settleRun as aW, toArgv as aX, uniqueDiagnostics as aY, SCHEMAS as aj, answering as av, bridgeCaller as aw, carriesFailure as ax, commandPathOf as ay, commandUnderWay as az, Bundle as b3, disabledReason as bg, resolveContributions as bh, rowActions as bi, ApplyUnobservedError as f, CommandDetachedError as n, CommandExitError as o, CommandUnobservedError as t, ConnectError as x };
4782
+ export type { PendingForm as $, ActionContribution as A, BindingRuntime as B, DirectEngineCaller as D, EditorPort as F, EngineCaller as G, EngineMethodResponse as H, EngineSession as I, JsonOf as J, EngineSessionOptions as K, EngineTarget as L, ErasedCommand as M, FollowSlot as N, GateChangeRequest as P, GenerateEvent as Q, GenerateStage as R, SourcePort as S, GeneratedTree as T, GraphError as U, HostBinding as V, Invocation as X, LaceReason as Y, LiveSlots as Z, OnScreen as _, CanvasCtx as a$, PortName as a0, PresenterPort as a1, PreviewOutcome as a2, PreviewSlot as a3, ReportEntry as a5, ReportFold as a6, ReportPath as a7, ReportSlot as a8, ResultKind as a9, ContributionSet as aZ, PanelSpec as a_, ResultSlots as aa, ResultStore as ab, RunCtx as ac, RunOutcome as ad, RunSlot as ae, RunStage as af, RunStageStatus as ag, RunnerPorts as ah, RunningMark as ai, Sink as ak, SinkInput as al, SlotContext as am, SlotKind as an, SourceConflict as ao, SourceEnd as ap, StackRef as aq, Started as ar, ViewStatePort as as, WiringCandidate as at, WiringQuery as au, ActionRunner as b, Badge as b0, NodeDecoration as b1, Decorations as b2, CommandRead as b4, OverlayContribution as b5, CanvasSelection as b6, LayoutHandle as b7, ActionIcon as b8, ClipboardStore as b9, ContextKey as ba, EditorBinding as bb, EditorEnv as bc, EditorEnvExtras as bd, KeySpec as be, Placement as bf, ActionRunnerOptions as c, ActionTarget as d, ApplyResult as e, ArgsOf as g, BoundPath as h, BridgeEngineCaller as i, Busy as j, CanvasPorts as k, CanvasSource as l, CommandBinding as m, CommandFailure as p, CommandPath as q, CommandResult as r, CommandRun as s, CommandsPort as u, ConfirmSpec as v, ConnectCallerOptions as w, ContextPort as y, CreatedRef as z };
@@ -1,4 +1,4 @@
1
- import { EngineMethod, EngineStreamMethod, BridgeMethod, MessageBridge, Diagnostic as Diagnostic$1, CanvasArrangement, CanvasView } from '@lace-cloud/proto';
1
+ import { EngineMethod, EngineStreamMethod, BridgeMethod, MessageBridge, Diagnostic as Diagnostic$1, CanvasArrangement, XY, CanvasView } from '@lace-cloud/proto';
2
2
  import { z } from 'zod';
3
3
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
4
4
 
@@ -157,6 +157,8 @@ declare enum Reason {
157
157
  * `.terraform.lock.hcl`; `lace module lock` writes it.
158
158
  */
159
159
  REASON_NO_LOCKFILE = 22,
160
+ /** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
161
+ REASON_NO_COMMIT = 23,
160
162
  UNRECOGNIZED = -1
161
163
  }
162
164
 
@@ -456,6 +458,13 @@ interface InitializeResponse {
456
458
  supported_protocols: string[];
457
459
  /** space-joined paths of the non-hidden command tree */
458
460
  command_paths: string[];
461
+ /**
462
+ * The digest of the contract the engine serves (scripts/lib/engine-contract.mjs):
463
+ * the command tree, the `--output json` documents and the failure
464
+ * envelopes the CLI's tests record. A client built from another contract
465
+ * refuses the engine; the engine compares no contract of the client's.
466
+ */
467
+ contract: string;
459
468
  }
460
469
  declare const InitializeResponse: MessageFns<InitializeResponse>;
461
470
  interface ShutdownResponse {
@@ -869,8 +878,8 @@ declare const ApplyActionRequest: MessageFns<ApplyActionRequest>;
869
878
  * two instances of one module: `source_instance`'s `output` could feed
870
879
  * `target_instance`'s `input`, a required input with no binding. `score`
871
880
  * is the matcher's: 100 for the same name, 90 for the same last
872
- * `_`-separated word, 50 when one name contains the other, 30 for the
873
- * same type alone; a pair that scores nothing is no candidate.
881
+ * `_`-separated word, 50 when one name contains the other; a pair that
882
+ * scores nothing is no candidate.
874
883
  */
875
884
  interface WiringCandidate$1 {
876
885
  source_instance: string;
@@ -1191,6 +1200,11 @@ interface CreatedRef$1 {
1191
1200
  * the source child ID. Empty otherwise.
1192
1201
  */
1193
1202
  source_id: string;
1203
+ /**
1204
+ * Set when the child was promoted out of a dissolved group (ungroup): the
1205
+ * group's id in `scope`, which with source_id names the child. Empty otherwise.
1206
+ */
1207
+ group_id: string;
1194
1208
  }
1195
1209
  declare const CreatedRef$1: MessageFns<CreatedRef$1>;
1196
1210
  /**
@@ -2145,6 +2159,10 @@ declare const COMMANDS: {
2145
2159
  readonly readme: {
2146
2160
  readonly type: "string";
2147
2161
  };
2162
+ readonly visibility: {
2163
+ readonly type: "string";
2164
+ readonly values: readonly ["public", "org_private"];
2165
+ };
2148
2166
  };
2149
2167
  readonly effect: "read";
2150
2168
  readonly hidden: false;
@@ -2637,6 +2655,24 @@ declare const COMMANDS: {
2637
2655
  readonly hidden: false;
2638
2656
  readonly yes: false;
2639
2657
  };
2658
+ readonly "stack validate": {
2659
+ readonly path: "stack validate";
2660
+ readonly positionals: readonly [];
2661
+ readonly flags: {
2662
+ readonly output: {
2663
+ readonly type: "string";
2664
+ readonly values: readonly ["table", "json"];
2665
+ readonly short: "o";
2666
+ };
2667
+ readonly source: {
2668
+ readonly type: "string";
2669
+ readonly required: true;
2670
+ };
2671
+ };
2672
+ readonly effect: "read";
2673
+ readonly hidden: false;
2674
+ readonly yes: false;
2675
+ };
2640
2676
  readonly "team current": {
2641
2677
  readonly path: "team current";
2642
2678
  readonly positionals: readonly [];
@@ -2848,7 +2884,6 @@ declare const SCHEMAS: {
2848
2884
  deviation: z.ZodOptional<z.ZodObject<{
2849
2885
  notCompositional: z.ZodBoolean;
2850
2886
  clusters: z.ZodArray<z.ZodUnknown>;
2851
- residuals: z.ZodArray<z.ZodUnknown>;
2852
2887
  hasManagedBackend: z.ZodBoolean;
2853
2888
  backendFindings: z.ZodArray<z.ZodObject<{
2854
2889
  file: z.ZodString;
@@ -2939,7 +2974,6 @@ declare const SCHEMAS: {
2939
2974
  deviation: z.ZodOptional<z.ZodObject<{
2940
2975
  notCompositional: z.ZodBoolean;
2941
2976
  clusters: z.ZodArray<z.ZodUnknown>;
2942
- residuals: z.ZodArray<z.ZodUnknown>;
2943
2977
  hasManagedBackend: z.ZodBoolean;
2944
2978
  backendFindings: z.ZodArray<z.ZodObject<{
2945
2979
  file: z.ZodString;
@@ -3083,6 +3117,7 @@ declare const SCHEMAS: {
3083
3117
  }, z.core.$strip>>;
3084
3118
  truncated: z.ZodBoolean;
3085
3119
  publishingGuideUrl: z.ZodString;
3120
+ scopeNotice: z.ZodOptional<z.ZodString>;
3086
3121
  }, z.core.$strip>;
3087
3122
  'registry get': z.ZodObject<{
3088
3123
  axis: z.ZodString;
@@ -3712,6 +3747,12 @@ declare const SCHEMAS: {
3712
3747
  initiatedByName: z.ZodNullable<z.ZodString>;
3713
3748
  }, z.core.$strip>>;
3714
3749
  }, z.core.$strip>;
3750
+ 'stack validate': z.ZodObject<{
3751
+ kind: z.ZodLiteral<"git">;
3752
+ repoUrl: z.ZodString;
3753
+ ref: z.ZodOptional<z.ZodString>;
3754
+ path: z.ZodOptional<z.ZodString>;
3755
+ }, z.core.$strip>;
3715
3756
  'module import': z.ZodObject<{
3716
3757
  changed: z.ZodBoolean;
3717
3758
  written: z.ZodArray<z.ZodString>;
@@ -3745,7 +3786,6 @@ declare const SCHEMAS: {
3745
3786
  deviation: z.ZodOptional<z.ZodObject<{
3746
3787
  notCompositional: z.ZodBoolean;
3747
3788
  clusters: z.ZodArray<z.ZodUnknown>;
3748
- residuals: z.ZodArray<z.ZodUnknown>;
3749
3789
  hasManagedBackend: z.ZodBoolean;
3750
3790
  backendFindings: z.ZodArray<z.ZodObject<{
3751
3791
  file: z.ZodString;
@@ -4161,6 +4201,8 @@ type CreatedRef = {
4161
4201
  id: string;
4162
4202
  moduleKey: string;
4163
4203
  sourceId: string;
4204
+ /** The group the child was promoted out of by an ungroup, in `scope`; empty otherwise. */
4205
+ groupId: string;
4164
4206
  };
4165
4207
  /**
4166
4208
  * One output → input pair the engine's matcher scores between two instances
@@ -4295,6 +4337,20 @@ declare function openEngineCommands(caller: EngineCaller, { cwd }: {
4295
4337
  declare function openEngineSession(caller: DirectEngineCaller, target: EngineTarget, options?: EngineSessionOptions): Promise<EngineSession>;
4296
4338
  declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
4297
4339
 
4340
+ type DissolvedGroup = {
4341
+ path: string;
4342
+ moduleKey: string;
4343
+ at: XY;
4344
+ collapsed: boolean;
4345
+ };
4346
+ type Dissolution = {
4347
+ state: 'done' | 'undone';
4348
+ groups: readonly DissolvedGroup[];
4349
+ deleted: readonly string[];
4350
+ created: readonly CreatedRef[];
4351
+ content: unknown;
4352
+ };
4353
+
4298
4354
  /** The keys an action may bind with no modifier. */
4299
4355
  declare const BARE_KEYS: readonly ["Delete", "Backspace"];
4300
4356
  type BareKey = (typeof BARE_KEYS)[number];
@@ -4311,7 +4367,7 @@ type CanvasSelection = {
4311
4367
  nodes: readonly string[];
4312
4368
  edges: readonly string[];
4313
4369
  };
4314
- type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'unsaved' | 'resolved' | 'conflict' | 'sourceRefused' | 'needsConversion' | 'selection.node' | 'selection.several' | 'selection.entryScope' | 'selection.oneScope' | 'selection.edge' | 'selection.edges' | 'diagnostics' | 'settingsOpen' | 'generateIdle' | 'generating' | 'ungenerated' | 'undoable' | 'redoable';
4370
+ type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'unsaved' | 'resolved' | 'conflict' | 'sourceRefused' | 'needsConversion' | 'selection.node' | 'selection.several' | 'selection.entryScope' | 'selection.oneScope' | 'selection.edge' | 'selection.edges' | 'selection.disconnectable' | 'diagnostics' | 'settingsOpen' | 'generateIdle' | 'generating' | 'ungenerated' | 'undoable' | 'redoable';
4315
4371
  type RunCtx = {
4316
4372
  root?: string;
4317
4373
  sessionId?: string;
@@ -4406,6 +4462,12 @@ type CommandBinding<P extends BoundPath> = {
4406
4462
  kind: ResultFor<P>;
4407
4463
  };
4408
4464
  invalidates?: true | 'start+settle';
4465
+ preflight?: {
4466
+ [Q in BoundPath]: {
4467
+ path: Q;
4468
+ args: (ctx: RunCtx, target: ActionTarget) => Partial<ArgsOf<Q>>;
4469
+ };
4470
+ }[BoundPath];
4409
4471
  };
4410
4472
  type ClipboardStore = {
4411
4473
  get: () => {
@@ -4434,6 +4496,7 @@ type EditorEnv = {
4434
4496
  get: () => CanvasArrangement;
4435
4497
  update: (a: CanvasArrangement) => void;
4436
4498
  };
4499
+ dissolved?: (dissolution: Dissolution) => void;
4437
4500
  layout: LayoutHandle;
4438
4501
  };
4439
4502
  type EditorBinding = {
@@ -4461,8 +4524,10 @@ type ErasedCommand = {
4461
4524
  confirms: boolean;
4462
4525
  resultKind: ResultKind;
4463
4526
  invalidates?: true | 'start+settle';
4527
+ preflightPath?: BoundPath;
4464
4528
  partialArgs: (ctx: RunCtx, target: ActionTarget) => Record<string, unknown>;
4465
4529
  confirmSpec: (ctx: RunCtx, target: ActionTarget, formArgs: Record<string, unknown>) => ConfirmSpec | undefined;
4530
+ preflight: (rt: BindingRuntime, ctx: RunCtx, target: ActionTarget, signal: AbortSignal) => Promise<boolean>;
4466
4531
  start: (rt: BindingRuntime, ctx: RunCtx, target: ActionTarget, formArgs: Record<string, unknown>, signal: AbortSignal) => Promise<{
4467
4532
  cancel: () => Promise<void>;
4468
4533
  } | null>;
@@ -4701,6 +4766,7 @@ type CommandRun = {
4701
4766
  };
4702
4767
  type ActionRunnerOptions = {
4703
4768
  onPendingFormChange?(form: PendingForm): void;
4769
+ onDissolved?(dissolution: Dissolution): void;
4704
4770
  onRunLog?(line: string, run: CommandRun): void;
4705
4771
  };
4706
4772
  declare function createActionRunner(ports: RunnerPorts, store: ResultStore, options?: ActionRunnerOptions): ActionRunner;
@@ -4712,5 +4778,5 @@ declare function resolveContributions<P extends PanelSpec>(all: ContributionSet<
4712
4778
  /** Every resolved action placed in a given panel's row (a `row:<panel>` placement). */
4713
4779
  declare function rowActions(resolved: ContributionSet, panelId: string): readonly ActionContribution[];
4714
4780
 
4715
- export { COMMANDS as C, EMPTY_REPORT_FOLD as E, GENERATE_STAGES as O, InputMode as W, Action as a, Reason as a4, connectCaller as aA, createActionRunner as aB, createResultStore as aC, currentReport as aD, defineCommand as aE, diagnosticsOf as aF, diagnosticsOfDocument as aG, failureSays as aH, foldReport as aI, generatedTree as aJ, isBoundPath as aK, liveSlots as aL, openEngineCommands as aM, openEngineSession as aN, parseBound as aO, parseCommandFailure as aP, reasonWire as aQ, reduceFollow as aR, reducePreview as aS, reduceReport as aT, reduceRun as aU, reportDiagnostics as aV, settleRun as aW, toArgv as aX, uniqueDiagnostics as aY, SCHEMAS as aj, answering as av, bridgeCaller as aw, carriesFailure as ax, commandPathOf as ay, commandUnderWay as az, Bundle as b5, disabledReason as bg, resolveContributions as bh, rowActions as bi, ApplyUnobservedError as f, CommandDetachedError as n, CommandExitError as o, CommandUnobservedError as t, ConnectError as x };
4716
- export type { PendingForm as $, ActionContribution as A, BindingRuntime as B, DirectEngineCaller as D, EditorPort as F, EngineCaller as G, EngineMethodResponse as H, EngineSession as I, JsonOf as J, EngineSessionOptions as K, EngineTarget as L, ErasedCommand as M, FollowSlot as N, GateChangeRequest as P, GenerateEvent as Q, GenerateStage as R, SourcePort as S, GeneratedTree as T, GraphError as U, HostBinding as V, Invocation as X, LaceReason as Y, LiveSlots as Z, OnScreen as _, CanvasCtx as a$, PortName as a0, PresenterPort as a1, PreviewOutcome as a2, PreviewSlot as a3, ReportEntry as a5, ReportFold as a6, ReportPath as a7, ReportSlot as a8, ResultKind as a9, ContributionSet as aZ, PanelSpec as a_, ResultSlots as aa, ResultStore as ab, RunCtx as ac, RunOutcome as ad, RunSlot as ae, RunStage as af, RunStageStatus as ag, RunnerPorts as ah, RunningMark as ai, Sink as ak, SinkInput as al, SlotContext as am, SlotKind as an, SourceConflict as ao, SourceEnd as ap, StackRef as aq, Started as ar, ViewStatePort as as, WiringCandidate as at, WiringQuery as au, ActionRunner as b, Badge as b0, NodeDecoration as b1, Decorations as b2, CommandRead as b3, OverlayContribution as b4, CanvasSelection as b6, LayoutHandle as b7, ActionIcon as b8, ClipboardStore as b9, ContextKey as ba, EditorBinding as bb, EditorEnv as bc, EditorEnvExtras as bd, KeySpec as be, Placement as bf, ActionRunnerOptions as c, ActionTarget as d, ApplyResult as e, ArgsOf as g, BoundPath as h, BridgeEngineCaller as i, Busy as j, CanvasPorts as k, CanvasSource as l, CommandBinding as m, CommandFailure as p, CommandPath as q, CommandResult as r, CommandRun as s, CommandsPort as u, ConfirmSpec as v, ConnectCallerOptions as w, ContextPort as y, CreatedRef as z };
4781
+ export { COMMANDS as C, EMPTY_REPORT_FOLD as E, GENERATE_STAGES as O, InputMode as W, Action as a, Reason as a4, connectCaller as aA, createActionRunner as aB, createResultStore as aC, currentReport as aD, defineCommand as aE, diagnosticsOf as aF, diagnosticsOfDocument as aG, failureSays as aH, foldReport as aI, generatedTree as aJ, isBoundPath as aK, liveSlots as aL, openEngineCommands as aM, openEngineSession as aN, parseBound as aO, parseCommandFailure as aP, reasonWire as aQ, reduceFollow as aR, reducePreview as aS, reduceReport as aT, reduceRun as aU, reportDiagnostics as aV, settleRun as aW, toArgv as aX, uniqueDiagnostics as aY, SCHEMAS as aj, answering as av, bridgeCaller as aw, carriesFailure as ax, commandPathOf as ay, commandUnderWay as az, Bundle as b3, disabledReason as bg, resolveContributions as bh, rowActions as bi, ApplyUnobservedError as f, CommandDetachedError as n, CommandExitError as o, CommandUnobservedError as t, ConnectError as x };
4782
+ export type { PendingForm as $, ActionContribution as A, BindingRuntime as B, DirectEngineCaller as D, EditorPort as F, EngineCaller as G, EngineMethodResponse as H, EngineSession as I, JsonOf as J, EngineSessionOptions as K, EngineTarget as L, ErasedCommand as M, FollowSlot as N, GateChangeRequest as P, GenerateEvent as Q, GenerateStage as R, SourcePort as S, GeneratedTree as T, GraphError as U, HostBinding as V, Invocation as X, LaceReason as Y, LiveSlots as Z, OnScreen as _, CanvasCtx as a$, PortName as a0, PresenterPort as a1, PreviewOutcome as a2, PreviewSlot as a3, ReportEntry as a5, ReportFold as a6, ReportPath as a7, ReportSlot as a8, ResultKind as a9, ContributionSet as aZ, PanelSpec as a_, ResultSlots as aa, ResultStore as ab, RunCtx as ac, RunOutcome as ad, RunSlot as ae, RunStage as af, RunStageStatus as ag, RunnerPorts as ah, RunningMark as ai, Sink as ak, SinkInput as al, SlotContext as am, SlotKind as an, SourceConflict as ao, SourceEnd as ap, StackRef as aq, Started as ar, ViewStatePort as as, WiringCandidate as at, WiringQuery as au, ActionRunner as b, Badge as b0, NodeDecoration as b1, Decorations as b2, CommandRead as b4, OverlayContribution as b5, CanvasSelection as b6, LayoutHandle as b7, ActionIcon as b8, ClipboardStore as b9, ContextKey as ba, EditorBinding as bb, EditorEnv as bc, EditorEnvExtras as bd, KeySpec as be, Placement as bf, ActionRunnerOptions as c, ActionTarget as d, ApplyResult as e, ArgsOf as g, BoundPath as h, BridgeEngineCaller as i, Busy as j, CanvasPorts as k, CanvasSource as l, CommandBinding as m, CommandFailure as p, CommandPath as q, CommandResult as r, CommandRun as s, CommandsPort as u, ConfirmSpec as v, ConnectCallerOptions as w, ContextPort as y, CreatedRef as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lace-cloud/canvas",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "lace": {
5
5
  "owner": "authoring"
6
6
  },
@@ -26,8 +26,8 @@
26
26
  "react": "^18.3.1",
27
27
  "react-dom": "^18.3.1",
28
28
  "zod": "^4.1.11",
29
- "@lace-cloud/proto": "0.35.0",
30
- "@lace-cloud/ui": "0.35.0"
29
+ "@lace-cloud/proto": "0.37.0",
30
+ "@lace-cloud/ui": "0.37.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@size-limit/file": "12.1.0",
@@ -38,9 +38,9 @@
38
38
  "tsx": "^4.19.0",
39
39
  "typescript": "^6.0.2",
40
40
  "vitest": "^4.1.0",
41
- "@lace-cloud/cast-ban-scanner": "0.0.0",
42
41
  "@lace-cloud/api-types": "0.0.0",
43
- "@lace-cloud/import-graph": "0.0.0"
42
+ "@lace-cloud/import-graph": "0.0.0",
43
+ "@lace-cloud/cast-ban-scanner": "0.0.0"
44
44
  },
45
45
  "publishConfig": {
46
46
  "registry": "https://registry.npmjs.org",