@lace-cloud/canvas 0.36.0 → 0.37.1

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.
@@ -492,6 +492,8 @@ var Reason = /* @__PURE__ */ ((Reason3) => {
492
492
  Reason3[Reason3["REASON_IMPORT_UNDECLARED"] = 20] = "REASON_IMPORT_UNDECLARED";
493
493
  Reason3[Reason3["REASON_ALREADY_IMPORTED"] = 21] = "REASON_ALREADY_IMPORTED";
494
494
  Reason3[Reason3["REASON_NO_LOCKFILE"] = 22] = "REASON_NO_LOCKFILE";
495
+ Reason3[Reason3["REASON_NO_COMMIT"] = 23] = "REASON_NO_COMMIT";
496
+ Reason3[Reason3["REASON_STALE_WORKING_STATE"] = 24] = "REASON_STALE_WORKING_STATE";
495
497
  Reason3[Reason3["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
496
498
  return Reason3;
497
499
  })(Reason || {});
@@ -566,6 +568,12 @@ function reasonFromJSON(object) {
566
568
  case 22:
567
569
  case "REASON_NO_LOCKFILE":
568
570
  return 22 /* REASON_NO_LOCKFILE */;
571
+ case 23:
572
+ case "REASON_NO_COMMIT":
573
+ return 23 /* REASON_NO_COMMIT */;
574
+ case 24:
575
+ case "REASON_STALE_WORKING_STATE":
576
+ return 24 /* REASON_STALE_WORKING_STATE */;
569
577
  case -1:
570
578
  case "UNRECOGNIZED":
571
579
  default:
@@ -620,6 +628,10 @@ function reasonToJSON(object) {
620
628
  return "REASON_ALREADY_IMPORTED";
621
629
  case 22 /* REASON_NO_LOCKFILE */:
622
630
  return "REASON_NO_LOCKFILE";
631
+ case 23 /* REASON_NO_COMMIT */:
632
+ return "REASON_NO_COMMIT";
633
+ case 24 /* REASON_STALE_WORKING_STATE */:
634
+ return "REASON_STALE_WORKING_STATE";
623
635
  case -1 /* UNRECOGNIZED */:
624
636
  default:
625
637
  return "UNRECOGNIZED";
@@ -7066,6 +7078,178 @@ var RedoAction = {
7066
7078
  return message;
7067
7079
  }
7068
7080
  };
7081
+ function createBaseDiscardAction() {
7082
+ return { expected_working_digest: "" };
7083
+ }
7084
+ var DiscardAction = {
7085
+ encode(message, writer = new BinaryWriter4()) {
7086
+ if (message.expected_working_digest !== "") {
7087
+ writer.uint32(10).string(message.expected_working_digest);
7088
+ }
7089
+ return writer;
7090
+ },
7091
+ decode(input, length) {
7092
+ const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
7093
+ const end = length === void 0 ? reader.len : reader.pos + length;
7094
+ const message = createBaseDiscardAction();
7095
+ while (reader.pos < end) {
7096
+ const tag = reader.uint32();
7097
+ switch (tag >>> 3) {
7098
+ case 1: {
7099
+ if (tag !== 10) {
7100
+ break;
7101
+ }
7102
+ message.expected_working_digest = reader.string();
7103
+ continue;
7104
+ }
7105
+ }
7106
+ if ((tag & 7) === 4 || tag === 0) {
7107
+ break;
7108
+ }
7109
+ reader.skip(tag & 7);
7110
+ }
7111
+ return message;
7112
+ },
7113
+ fromJSON(object) {
7114
+ return {
7115
+ expected_working_digest: isSet3(object.expectedWorkingDigest) ? globalThis.String(object.expectedWorkingDigest) : isSet3(object.expected_working_digest) ? globalThis.String(object.expected_working_digest) : ""
7116
+ };
7117
+ },
7118
+ toJSON(message) {
7119
+ const obj = {};
7120
+ if (message.expected_working_digest !== "") {
7121
+ obj.expectedWorkingDigest = message.expected_working_digest;
7122
+ }
7123
+ return obj;
7124
+ },
7125
+ create(base) {
7126
+ return DiscardAction.fromPartial(base ?? {});
7127
+ },
7128
+ fromPartial(object) {
7129
+ const message = createBaseDiscardAction();
7130
+ message.expected_working_digest = object.expected_working_digest ?? "";
7131
+ return message;
7132
+ }
7133
+ };
7134
+ function createBaseRestoreAction() {
7135
+ return {
7136
+ bundle: void 0,
7137
+ captured_working_digest: "",
7138
+ captured_saved_digest: "",
7139
+ captured_tree_hash: "",
7140
+ expected_working_digest: ""
7141
+ };
7142
+ }
7143
+ var RestoreAction = {
7144
+ encode(message, writer = new BinaryWriter4()) {
7145
+ if (message.bundle !== void 0) {
7146
+ Bundle.encode(message.bundle, writer.uint32(10).fork()).join();
7147
+ }
7148
+ if (message.captured_working_digest !== "") {
7149
+ writer.uint32(18).string(message.captured_working_digest);
7150
+ }
7151
+ if (message.captured_saved_digest !== "") {
7152
+ writer.uint32(26).string(message.captured_saved_digest);
7153
+ }
7154
+ if (message.captured_tree_hash !== "") {
7155
+ writer.uint32(34).string(message.captured_tree_hash);
7156
+ }
7157
+ if (message.expected_working_digest !== "") {
7158
+ writer.uint32(42).string(message.expected_working_digest);
7159
+ }
7160
+ return writer;
7161
+ },
7162
+ decode(input, length) {
7163
+ const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
7164
+ const end = length === void 0 ? reader.len : reader.pos + length;
7165
+ const message = createBaseRestoreAction();
7166
+ while (reader.pos < end) {
7167
+ const tag = reader.uint32();
7168
+ switch (tag >>> 3) {
7169
+ case 1: {
7170
+ if (tag !== 10) {
7171
+ break;
7172
+ }
7173
+ message.bundle = Bundle.decode(reader, reader.uint32());
7174
+ continue;
7175
+ }
7176
+ case 2: {
7177
+ if (tag !== 18) {
7178
+ break;
7179
+ }
7180
+ message.captured_working_digest = reader.string();
7181
+ continue;
7182
+ }
7183
+ case 3: {
7184
+ if (tag !== 26) {
7185
+ break;
7186
+ }
7187
+ message.captured_saved_digest = reader.string();
7188
+ continue;
7189
+ }
7190
+ case 4: {
7191
+ if (tag !== 34) {
7192
+ break;
7193
+ }
7194
+ message.captured_tree_hash = reader.string();
7195
+ continue;
7196
+ }
7197
+ case 5: {
7198
+ if (tag !== 42) {
7199
+ break;
7200
+ }
7201
+ message.expected_working_digest = reader.string();
7202
+ continue;
7203
+ }
7204
+ }
7205
+ if ((tag & 7) === 4 || tag === 0) {
7206
+ break;
7207
+ }
7208
+ reader.skip(tag & 7);
7209
+ }
7210
+ return message;
7211
+ },
7212
+ fromJSON(object) {
7213
+ return {
7214
+ bundle: isSet3(object.bundle) ? Bundle.fromJSON(object.bundle) : void 0,
7215
+ captured_working_digest: isSet3(object.capturedWorkingDigest) ? globalThis.String(object.capturedWorkingDigest) : isSet3(object.captured_working_digest) ? globalThis.String(object.captured_working_digest) : "",
7216
+ captured_saved_digest: isSet3(object.capturedSavedDigest) ? globalThis.String(object.capturedSavedDigest) : isSet3(object.captured_saved_digest) ? globalThis.String(object.captured_saved_digest) : "",
7217
+ captured_tree_hash: isSet3(object.capturedTreeHash) ? globalThis.String(object.capturedTreeHash) : isSet3(object.captured_tree_hash) ? globalThis.String(object.captured_tree_hash) : "",
7218
+ expected_working_digest: isSet3(object.expectedWorkingDigest) ? globalThis.String(object.expectedWorkingDigest) : isSet3(object.expected_working_digest) ? globalThis.String(object.expected_working_digest) : ""
7219
+ };
7220
+ },
7221
+ toJSON(message) {
7222
+ const obj = {};
7223
+ if (message.bundle !== void 0) {
7224
+ obj.bundle = Bundle.toJSON(message.bundle);
7225
+ }
7226
+ if (message.captured_working_digest !== "") {
7227
+ obj.capturedWorkingDigest = message.captured_working_digest;
7228
+ }
7229
+ if (message.captured_saved_digest !== "") {
7230
+ obj.capturedSavedDigest = message.captured_saved_digest;
7231
+ }
7232
+ if (message.captured_tree_hash !== "") {
7233
+ obj.capturedTreeHash = message.captured_tree_hash;
7234
+ }
7235
+ if (message.expected_working_digest !== "") {
7236
+ obj.expectedWorkingDigest = message.expected_working_digest;
7237
+ }
7238
+ return obj;
7239
+ },
7240
+ create(base) {
7241
+ return RestoreAction.fromPartial(base ?? {});
7242
+ },
7243
+ fromPartial(object) {
7244
+ const message = createBaseRestoreAction();
7245
+ message.bundle = object.bundle !== void 0 && object.bundle !== null ? Bundle.fromPartial(object.bundle) : void 0;
7246
+ message.captured_working_digest = object.captured_working_digest ?? "";
7247
+ message.captured_saved_digest = object.captured_saved_digest ?? "";
7248
+ message.captured_tree_hash = object.captured_tree_hash ?? "";
7249
+ message.expected_working_digest = object.expected_working_digest ?? "";
7250
+ return message;
7251
+ }
7252
+ };
7069
7253
  function createBasePlaceModuleAction() {
7070
7254
  return { author: "", name: "", version: "" };
7071
7255
  }
@@ -7174,7 +7358,9 @@ function createBaseAction() {
7174
7358
  set_blocks: void 0,
7175
7359
  set_directives: void 0,
7176
7360
  set_meta_arguments: void 0,
7177
- add_resource: void 0
7361
+ add_resource: void 0,
7362
+ discard: void 0,
7363
+ restore: void 0
7178
7364
  };
7179
7365
  }
7180
7366
  var Action = {
@@ -7251,6 +7437,12 @@ var Action = {
7251
7437
  if (message.add_resource !== void 0) {
7252
7438
  AddResourceAction.encode(message.add_resource, writer.uint32(226).fork()).join();
7253
7439
  }
7440
+ if (message.discard !== void 0) {
7441
+ DiscardAction.encode(message.discard, writer.uint32(234).fork()).join();
7442
+ }
7443
+ if (message.restore !== void 0) {
7444
+ RestoreAction.encode(message.restore, writer.uint32(242).fork()).join();
7445
+ }
7254
7446
  return writer;
7255
7447
  },
7256
7448
  decode(input, length) {
@@ -7428,6 +7620,20 @@ var Action = {
7428
7620
  message.add_resource = AddResourceAction.decode(reader, reader.uint32());
7429
7621
  continue;
7430
7622
  }
7623
+ case 29: {
7624
+ if (tag !== 234) {
7625
+ break;
7626
+ }
7627
+ message.discard = DiscardAction.decode(reader, reader.uint32());
7628
+ continue;
7629
+ }
7630
+ case 30: {
7631
+ if (tag !== 242) {
7632
+ break;
7633
+ }
7634
+ message.restore = RestoreAction.decode(reader, reader.uint32());
7635
+ continue;
7636
+ }
7431
7637
  }
7432
7638
  if ((tag & 7) === 4 || tag === 0) {
7433
7639
  break;
@@ -7461,7 +7667,9 @@ var Action = {
7461
7667
  set_blocks: isSet3(object.setBlocks) ? SetBlocksAction.fromJSON(object.setBlocks) : isSet3(object.set_blocks) ? SetBlocksAction.fromJSON(object.set_blocks) : void 0,
7462
7668
  set_directives: isSet3(object.setDirectives) ? SetDirectivesAction.fromJSON(object.setDirectives) : isSet3(object.set_directives) ? SetDirectivesAction.fromJSON(object.set_directives) : void 0,
7463
7669
  set_meta_arguments: isSet3(object.setMetaArguments) ? SetMetaArgumentsAction.fromJSON(object.setMetaArguments) : isSet3(object.set_meta_arguments) ? SetMetaArgumentsAction.fromJSON(object.set_meta_arguments) : void 0,
7464
- add_resource: isSet3(object.addResource) ? AddResourceAction.fromJSON(object.addResource) : isSet3(object.add_resource) ? AddResourceAction.fromJSON(object.add_resource) : void 0
7670
+ add_resource: isSet3(object.addResource) ? AddResourceAction.fromJSON(object.addResource) : isSet3(object.add_resource) ? AddResourceAction.fromJSON(object.add_resource) : void 0,
7671
+ discard: isSet3(object.discard) ? DiscardAction.fromJSON(object.discard) : void 0,
7672
+ restore: isSet3(object.restore) ? RestoreAction.fromJSON(object.restore) : void 0
7465
7673
  };
7466
7674
  },
7467
7675
  toJSON(message) {
@@ -7538,6 +7746,12 @@ var Action = {
7538
7746
  if (message.add_resource !== void 0) {
7539
7747
  obj.addResource = AddResourceAction.toJSON(message.add_resource);
7540
7748
  }
7749
+ if (message.discard !== void 0) {
7750
+ obj.discard = DiscardAction.toJSON(message.discard);
7751
+ }
7752
+ if (message.restore !== void 0) {
7753
+ obj.restore = RestoreAction.toJSON(message.restore);
7754
+ }
7541
7755
  return obj;
7542
7756
  },
7543
7757
  create(base) {
@@ -7569,6 +7783,8 @@ var Action = {
7569
7783
  message.set_directives = object.set_directives !== void 0 && object.set_directives !== null ? SetDirectivesAction.fromPartial(object.set_directives) : void 0;
7570
7784
  message.set_meta_arguments = object.set_meta_arguments !== void 0 && object.set_meta_arguments !== null ? SetMetaArgumentsAction.fromPartial(object.set_meta_arguments) : void 0;
7571
7785
  message.add_resource = object.add_resource !== void 0 && object.add_resource !== null ? AddResourceAction.fromPartial(object.add_resource) : void 0;
7786
+ message.discard = object.discard !== void 0 && object.discard !== null ? DiscardAction.fromPartial(object.discard) : void 0;
7787
+ message.restore = object.restore !== void 0 && object.restore !== null ? RestoreAction.fromPartial(object.restore) : void 0;
7572
7788
  return message;
7573
7789
  }
7574
7790
  };
@@ -8983,7 +9199,9 @@ function createBaseBundleState() {
8983
9199
  source_refused: false,
8984
9200
  tree_hash: "",
8985
9201
  revision: 0,
8986
- generating: false
9202
+ generating: false,
9203
+ working_digest: "",
9204
+ saved_digest: ""
8987
9205
  };
8988
9206
  }
8989
9207
  var BundleState = {
@@ -9021,6 +9239,12 @@ var BundleState = {
9021
9239
  if (message.generating !== false) {
9022
9240
  writer.uint32(96).bool(message.generating);
9023
9241
  }
9242
+ if (message.working_digest !== "") {
9243
+ writer.uint32(106).string(message.working_digest);
9244
+ }
9245
+ if (message.saved_digest !== "") {
9246
+ writer.uint32(114).string(message.saved_digest);
9247
+ }
9024
9248
  return writer;
9025
9249
  },
9026
9250
  decode(input, length) {
@@ -9107,6 +9331,20 @@ var BundleState = {
9107
9331
  message.generating = reader.bool();
9108
9332
  continue;
9109
9333
  }
9334
+ case 13: {
9335
+ if (tag !== 106) {
9336
+ break;
9337
+ }
9338
+ message.working_digest = reader.string();
9339
+ continue;
9340
+ }
9341
+ case 14: {
9342
+ if (tag !== 114) {
9343
+ break;
9344
+ }
9345
+ message.saved_digest = reader.string();
9346
+ continue;
9347
+ }
9110
9348
  }
9111
9349
  if ((tag & 7) === 4 || tag === 0) {
9112
9350
  break;
@@ -9127,7 +9365,9 @@ var BundleState = {
9127
9365
  source_refused: isSet3(object.sourceRefused) ? globalThis.Boolean(object.sourceRefused) : isSet3(object.source_refused) ? globalThis.Boolean(object.source_refused) : false,
9128
9366
  tree_hash: isSet3(object.treeHash) ? globalThis.String(object.treeHash) : isSet3(object.tree_hash) ? globalThis.String(object.tree_hash) : "",
9129
9367
  revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0,
9130
- generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false
9368
+ generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false,
9369
+ working_digest: isSet3(object.workingDigest) ? globalThis.String(object.workingDigest) : isSet3(object.working_digest) ? globalThis.String(object.working_digest) : "",
9370
+ saved_digest: isSet3(object.savedDigest) ? globalThis.String(object.savedDigest) : isSet3(object.saved_digest) ? globalThis.String(object.saved_digest) : ""
9131
9371
  };
9132
9372
  },
9133
9373
  toJSON(message) {
@@ -9165,6 +9405,12 @@ var BundleState = {
9165
9405
  if (message.generating !== false) {
9166
9406
  obj.generating = message.generating;
9167
9407
  }
9408
+ if (message.working_digest !== "") {
9409
+ obj.workingDigest = message.working_digest;
9410
+ }
9411
+ if (message.saved_digest !== "") {
9412
+ obj.savedDigest = message.saved_digest;
9413
+ }
9168
9414
  return obj;
9169
9415
  },
9170
9416
  create(base) {
@@ -9183,6 +9429,8 @@ var BundleState = {
9183
9429
  message.tree_hash = object.tree_hash ?? "";
9184
9430
  message.revision = object.revision ?? 0;
9185
9431
  message.generating = object.generating ?? false;
9432
+ message.working_digest = object.working_digest ?? "";
9433
+ message.saved_digest = object.saved_digest ?? "";
9186
9434
  return message;
9187
9435
  }
9188
9436
  };
@@ -9300,7 +9548,7 @@ var BundleApplyResult = {
9300
9548
  }
9301
9549
  };
9302
9550
  function createBaseCreatedRef() {
9303
- return { scope: "", id: "", module_key: "", source_id: "" };
9551
+ return { scope: "", id: "", module_key: "", source_id: "", group_id: "" };
9304
9552
  }
9305
9553
  var CreatedRef = {
9306
9554
  encode(message, writer = new BinaryWriter4()) {
@@ -9316,6 +9564,9 @@ var CreatedRef = {
9316
9564
  if (message.source_id !== "") {
9317
9565
  writer.uint32(34).string(message.source_id);
9318
9566
  }
9567
+ if (message.group_id !== "") {
9568
+ writer.uint32(42).string(message.group_id);
9569
+ }
9319
9570
  return writer;
9320
9571
  },
9321
9572
  decode(input, length) {
@@ -9353,6 +9604,13 @@ var CreatedRef = {
9353
9604
  message.source_id = reader.string();
9354
9605
  continue;
9355
9606
  }
9607
+ case 5: {
9608
+ if (tag !== 42) {
9609
+ break;
9610
+ }
9611
+ message.group_id = reader.string();
9612
+ continue;
9613
+ }
9356
9614
  }
9357
9615
  if ((tag & 7) === 4 || tag === 0) {
9358
9616
  break;
@@ -9366,7 +9624,8 @@ var CreatedRef = {
9366
9624
  scope: isSet3(object.scope) ? globalThis.String(object.scope) : "",
9367
9625
  id: isSet3(object.id) ? globalThis.String(object.id) : "",
9368
9626
  module_key: isSet3(object.moduleKey) ? globalThis.String(object.moduleKey) : isSet3(object.module_key) ? globalThis.String(object.module_key) : "",
9369
- source_id: isSet3(object.sourceId) ? globalThis.String(object.sourceId) : isSet3(object.source_id) ? globalThis.String(object.source_id) : ""
9627
+ source_id: isSet3(object.sourceId) ? globalThis.String(object.sourceId) : isSet3(object.source_id) ? globalThis.String(object.source_id) : "",
9628
+ group_id: isSet3(object.groupId) ? globalThis.String(object.groupId) : isSet3(object.group_id) ? globalThis.String(object.group_id) : ""
9370
9629
  };
9371
9630
  },
9372
9631
  toJSON(message) {
@@ -9383,6 +9642,9 @@ var CreatedRef = {
9383
9642
  if (message.source_id !== "") {
9384
9643
  obj.sourceId = message.source_id;
9385
9644
  }
9645
+ if (message.group_id !== "") {
9646
+ obj.groupId = message.group_id;
9647
+ }
9386
9648
  return obj;
9387
9649
  },
9388
9650
  create(base) {
@@ -9394,6 +9656,7 @@ var CreatedRef = {
9394
9656
  message.id = object.id ?? "";
9395
9657
  message.module_key = object.module_key ?? "";
9396
9658
  message.source_id = object.source_id ?? "";
9659
+ message.group_id = object.group_id ?? "";
9397
9660
  return message;
9398
9661
  }
9399
9662
  };
@@ -11165,6 +11428,47 @@ var COMMANDS = {
11165
11428
  "hidden": false,
11166
11429
  "yes": false
11167
11430
  },
11431
+ "events list": {
11432
+ "path": "events list",
11433
+ "positionals": [],
11434
+ "flags": {
11435
+ "cursor": {
11436
+ "type": "string"
11437
+ },
11438
+ "limit": {
11439
+ "type": "int"
11440
+ },
11441
+ "org": {
11442
+ "type": "string"
11443
+ },
11444
+ "output": {
11445
+ "type": "string",
11446
+ "values": [
11447
+ "table",
11448
+ "json"
11449
+ ],
11450
+ "short": "o"
11451
+ },
11452
+ "since": {
11453
+ "type": "string"
11454
+ },
11455
+ "subjectId": {
11456
+ "type": "string"
11457
+ },
11458
+ "subjectKind": {
11459
+ "type": "string"
11460
+ },
11461
+ "type": {
11462
+ "type": "string"
11463
+ },
11464
+ "until": {
11465
+ "type": "string"
11466
+ }
11467
+ },
11468
+ "effect": "read",
11469
+ "hidden": false,
11470
+ "yes": false
11471
+ },
11168
11472
  "hooks install": {
11169
11473
  "path": "hooks install",
11170
11474
  "positionals": [],
@@ -12274,6 +12578,27 @@ var COMMANDS = {
12274
12578
  "hidden": false,
12275
12579
  "yes": false
12276
12580
  },
12581
+ "stack validate": {
12582
+ "path": "stack validate",
12583
+ "positionals": [],
12584
+ "flags": {
12585
+ "output": {
12586
+ "type": "string",
12587
+ "values": [
12588
+ "table",
12589
+ "json"
12590
+ ],
12591
+ "short": "o"
12592
+ },
12593
+ "source": {
12594
+ "type": "string",
12595
+ "required": true
12596
+ }
12597
+ },
12598
+ "effect": "read",
12599
+ "hidden": false,
12600
+ "yes": false
12601
+ },
12277
12602
  "team current": {
12278
12603
  "path": "team current",
12279
12604
  "positionals": [],
@@ -12837,15 +13162,29 @@ var planSummarySchema = z.object({
12837
13162
  resourceChange: z.number(),
12838
13163
  resourceDestroy: z.number()
12839
13164
  });
12840
- var previewAdvisorySchema = z.object({
12841
- id: z.string(),
12842
- manifestation: z.string(),
12843
- emittedByInstallId: z.string(),
12844
- emittedByDisplayName: z.string(),
12845
- confidenceScore: z.number(),
12846
- producedAt: z.string(),
12847
- outputJson: z.unknown()
12848
- });
13165
+ var previewAdvisorySchema = reads()(
13166
+ z.object({
13167
+ id: z.string(),
13168
+ orgId: z.string(),
13169
+ contextRunId: z.string().nullable(),
13170
+ contextInstallId: z.string().nullable(),
13171
+ contextStackId: z.string().nullable(),
13172
+ contextTreeHash: z.string().nullable(),
13173
+ actedOn: z.string().nullable(),
13174
+ actedAt: z.string().nullable(),
13175
+ actedByUserId: z.string().nullable(),
13176
+ feedbackThumbs: z.string().nullable(),
13177
+ feedbackText: z.string().nullable(),
13178
+ emitterKind: z.string(),
13179
+ emitterHeededRate: z.number(),
13180
+ manifestation: z.string(),
13181
+ emittedByInstallId: z.string(),
13182
+ emittedByDisplayName: z.string(),
13183
+ confidenceScore: z.number(),
13184
+ producedAt: z.string(),
13185
+ outputJson: z.unknown()
13186
+ })
13187
+ );
12849
13188
  var previewEntrySchema = z.discriminatedUnion("kind", [
12850
13189
  z.object({
12851
13190
  kind: z.literal("consensus"),
@@ -13082,6 +13421,7 @@ var SCHEMAS = {
13082
13421
  "stack destroy": runEventSchema,
13083
13422
  "drift scan": driftScanSchema,
13084
13423
  "stack create": stackSchema,
13424
+ "stack validate": stackSourceSchema,
13085
13425
  "module import": moduleImportSchema,
13086
13426
  "run get": runSchema,
13087
13427
  "run plan": runPlanSchema,
@@ -13197,6 +13537,8 @@ async function openEngineSession(caller, target, options = {}) {
13197
13537
  canUndo: state.can_undo,
13198
13538
  canRedo: state.can_redo,
13199
13539
  unsaved: state.unsaved,
13540
+ workingDigest: state.working_digest,
13541
+ savedDigest: state.saved_digest,
13200
13542
  ungenerated: state.ungenerated,
13201
13543
  conflict: state.conflict ? { baseTreeHash: state.conflict.base_tree_hash, treeHash: state.conflict.tree_hash } : null,
13202
13544
  sourceRefused: state.source_refused,
@@ -13507,7 +13849,13 @@ function convertGraphError(e) {
13507
13849
  };
13508
13850
  }
13509
13851
  function convertCreatedRef(r) {
13510
- return { scope: r.scope, id: r.id, moduleKey: r.module_key, sourceId: r.source_id };
13852
+ return {
13853
+ scope: r.scope,
13854
+ id: r.id,
13855
+ moduleKey: r.module_key,
13856
+ sourceId: r.source_id,
13857
+ groupId: r.group_id
13858
+ };
13511
13859
  }
13512
13860
 
13513
13861
  // src/utils/counted.ts
@@ -13748,6 +14096,14 @@ function failureSays(error) {
13748
14096
  }
13749
14097
  return { message: error instanceof Error ? error.message : String(error) };
13750
14098
  }
14099
+ function notifyFailure(presenter, error, label) {
14100
+ const { message, failure } = failureSays(error);
14101
+ presenter.notify(
14102
+ "error",
14103
+ label ? `${label}: ${message}` : message,
14104
+ ...failure ? [failure] : []
14105
+ );
14106
+ }
13751
14107
  function settleRun(prev, token, error) {
13752
14108
  const carried = prev && prev.token === token ? prev : null;
13753
14109
  const run = carried?.run ?? null;
@@ -13892,6 +14248,7 @@ function defineCommand(binding) {
13892
14248
  kind: "command",
13893
14249
  path: binding.path,
13894
14250
  confirms: binding.confirm !== void 0,
14251
+ preflightPath: binding.preflight?.path,
13895
14252
  resultKind: binding.result.kind,
13896
14253
  invalidates: binding.invalidates,
13897
14254
  partialArgs(ctx, target) {
@@ -13903,6 +14260,24 @@ function defineCommand(binding) {
13903
14260
  if (!merged.ok) return void 0;
13904
14261
  return binding.confirm(ctx, merged.args, target);
13905
14262
  },
14263
+ async preflight(rt, ctx, target, signal) {
14264
+ const commands = rt.ports.commands;
14265
+ if (!binding.preflight || !commands) return true;
14266
+ const { path, args } = binding.preflight;
14267
+ const merged = completeArgs(path, args(ctx, target));
14268
+ if (!merged.ok) return true;
14269
+ try {
14270
+ const events = commands.invoke(path, merged.args, signal, rt.cwd).events;
14271
+ const read = events[Symbol.asyncIterator]();
14272
+ let step = await read.next();
14273
+ while (!step.done) step = await read.next();
14274
+ return true;
14275
+ } catch (err) {
14276
+ if (err instanceof CommandDetachedError) return false;
14277
+ notifyFailure(rt.ports.presenter, err);
14278
+ return false;
14279
+ }
14280
+ },
13906
14281
  async start(rt, ctx, target, formArgs, signal) {
13907
14282
  const merged = completeArgs(binding.path, { ...binding.args(ctx, target), ...formArgs });
13908
14283
  if (!merged.ok) return null;
@@ -13922,8 +14297,7 @@ function defineCommand(binding) {
13922
14297
  } catch (err) {
13923
14298
  const settledByDocument = rendered && binding.result.kind === "notify" && (err instanceof CommandExitError || err instanceof CommandUnobservedError);
13924
14299
  if (!rt.fail(err) && !(err instanceof CommandDetachedError) && !settledByDocument) {
13925
- const { message, failure } = failureSays(err);
13926
- rt.ports.presenter.notify("error", message, ...failure ? [failure] : []);
14300
+ notifyFailure(rt.ports.presenter, err);
13927
14301
  }
13928
14302
  if (binding.invalidates) rt.tick();
13929
14303
  } finally {
@@ -14030,6 +14404,7 @@ var create = defineCommand({
14030
14404
  kind: "command",
14031
14405
  path: "stack create",
14032
14406
  args: (ctx) => ({ source: ctx.root }),
14407
+ preflight: { path: "stack validate", args: (ctx) => ({ source: ctx.root }) },
14033
14408
  invalidates: true,
14034
14409
  result: {
14035
14410
  kind: "notify",
@@ -14313,6 +14688,31 @@ function inEntryScope(view, ids) {
14313
14688
  return ids.filter((id) => entry.has(id));
14314
14689
  }
14315
14690
 
14691
+ // src/utils/handleId.ts
14692
+ var NODE_HANDLE = "node";
14693
+ function parseHandleId(handleId, prefix) {
14694
+ if (!handleId) return null;
14695
+ const marker = `${prefix}:`;
14696
+ if (!handleId.startsWith(marker)) return null;
14697
+ const name = handleId.slice(marker.length);
14698
+ return name.length > 0 ? name : null;
14699
+ }
14700
+ function sourceHandleId(output) {
14701
+ return `out:${output}`;
14702
+ }
14703
+ function targetHandleId(input) {
14704
+ return `in:${input}`;
14705
+ }
14706
+ function edgeHandles(e) {
14707
+ return {
14708
+ sourceHandle: e.source_pin ? targetHandleId(e.source_output) : sourceHandleId(e.source_output),
14709
+ targetHandle: e.target_pin ? sourceHandleId(e.target_input) : targetHandleId(e.target_input)
14710
+ };
14711
+ }
14712
+ function isDisconnectable(e) {
14713
+ return !e.target_pin;
14714
+ }
14715
+
14316
14716
  // src/registry.ts
14317
14717
  var CONTEXT_NEEDS = {
14318
14718
  root: "an authoring root",
@@ -14331,6 +14731,7 @@ var CONTEXT_NEEDS = {
14331
14731
  "selection.oneScope": "selected nodes that share one scope",
14332
14732
  "selection.edge": "one selected connection",
14333
14733
  "selection.edges": "selected connections",
14734
+ "selection.disconnectable": "a selected connection that feeds an input",
14334
14735
  diagnostics: "diagnostics to show",
14335
14736
  settingsOpen: "the settings panel open",
14336
14737
  generateIdle: "no Generate running",
@@ -14384,6 +14785,10 @@ function keySatisfied(ctx, key) {
14384
14785
  return ctx.view !== void 0 && ctx.selection !== void 0 && inOneScope(ctx.view, ctx.selection.nodes);
14385
14786
  if (key === "selection.edge") return wiresAlone(ctx) === 1;
14386
14787
  if (key === "selection.edges") return wiresAlone(ctx) > 0;
14788
+ if (key === "selection.disconnectable")
14789
+ return wiresAlone(ctx) > 0 && (ctx.view?.edges ?? []).some(
14790
+ (e) => ctx.selection?.edges.includes(e.id) && isDisconnectable(e)
14791
+ );
14387
14792
  if (key === "diagnostics") return ctx.diagnostics !== void 0 && ctx.diagnostics.length > 0;
14388
14793
  if (key === "settingsOpen") return ctx.settingsOpen === true;
14389
14794
  if (key === "generateIdle") return ctx.generating === false;
@@ -14476,8 +14881,13 @@ function unmetRequirement(action, ports, ctx, target) {
14476
14881
  if (target.failure === void 0) return `${label} needs ${TARGET_NEEDS.failure}`;
14477
14882
  if (!answersFailure(action, target.failure)) return `${label} does not answer this failure`;
14478
14883
  }
14479
- if (binding.kind === "command" && !availableCommands(ports).has(binding.path)) {
14480
- return `${label} runs lace ${binding.path}, which this host does not route`;
14884
+ if (binding.kind === "command") {
14885
+ const available = availableCommands(ports);
14886
+ for (const path of [binding.path, binding.preflightPath]) {
14887
+ if (path !== void 0 && !available.has(path)) {
14888
+ return `${label} runs lace ${path}, which this host does not route`;
14889
+ }
14890
+ }
14481
14891
  }
14482
14892
  return void 0;
14483
14893
  }
@@ -14529,6 +14939,8 @@ function createActionRunner(ports, store, options = {}) {
14529
14939
  const tokens = /* @__PURE__ */ new Map();
14530
14940
  const clipboard = createClipboardStore();
14531
14941
  const notifyControllers = /* @__PURE__ */ new Map();
14942
+ const preflighting = /* @__PURE__ */ new Set();
14943
+ const preflightControllers = /* @__PURE__ */ new Set();
14532
14944
  let edits = 0;
14533
14945
  const editingListeners = /* @__PURE__ */ new Set();
14534
14946
  const tickListeners = /* @__PURE__ */ new Set();
@@ -14603,6 +15015,15 @@ function createActionRunner(ports, store, options = {}) {
14603
15015
  settled: onSettle
14604
15016
  };
14605
15017
  }
15018
+ function invocationOf(action, binding, ctx, target, on) {
15019
+ const token = {};
15020
+ const run = { token, path: binding.path, resultKind: binding.resultKind, ctx, target };
15021
+ const started = { target, on, path: binding.path, label: action.label };
15022
+ return {
15023
+ token,
15024
+ runtime: (onSettle) => runtimeFor(token, readOverOf(ctx), cwdOf(action, ctx), { run, started }, onSettle)
15025
+ };
15026
+ }
14606
15027
  function readOverOf(ctx) {
14607
15028
  return { stack: ctx.stack?.id };
14608
15029
  }
@@ -14635,7 +15056,7 @@ function createActionRunner(ports, store, options = {}) {
14635
15056
  }
14636
15057
  function tellFailure(error) {
14637
15058
  if (error instanceof CommandDetachedError) return;
14638
- ports.presenter.notify("error", error instanceof Error ? error.message : String(error));
15059
+ notifyFailure(ports.presenter, error);
14639
15060
  }
14640
15061
  async function startCommand(action, ctx, target, formArgs) {
14641
15062
  const binding = action.binding;
@@ -14647,16 +15068,12 @@ function createActionRunner(ports, store, options = {}) {
14647
15068
  ports.presenter.notify("warn", busyReason(busy));
14648
15069
  return;
14649
15070
  }
14650
- const readOver = readOverOf(ctx);
14651
- const cwd = cwdOf(action, ctx);
14652
- const token = {};
14653
- const run = { token, path: binding.path, resultKind: binding.resultKind, ctx, target };
14654
- const started = { target, on, path: binding.path, label: action.label };
15071
+ const { token, runtime } = invocationOf(action, binding, ctx, target, on);
14655
15072
  const controller = new AbortController();
14656
15073
  if (binding.resultKind === "notify") {
14657
15074
  notifyControllers.set(controller, token);
14658
15075
  await binding.start(
14659
- runtimeFor(token, readOver, cwd, { run, started }, () => {
15076
+ runtime(() => {
14660
15077
  notifyControllers.delete(controller);
14661
15078
  store.detach("notify", token);
14662
15079
  }),
@@ -14670,18 +15087,33 @@ function createActionRunner(ports, store, options = {}) {
14670
15087
  detachSlot(binding.resultKind);
14671
15088
  controllers.set(binding.resultKind, controller);
14672
15089
  tokens.set(binding.resultKind, token);
14673
- const handle = await binding.start(
14674
- runtimeFor(token, readOver, cwd, { run, started }),
14675
- ctx,
14676
- target,
14677
- formArgs,
14678
- controller.signal
14679
- );
15090
+ const handle = await binding.start(runtime(), ctx, target, formArgs, controller.signal);
14680
15091
  if (handle) handles.set(binding.resultKind, handle);
14681
15092
  }
14682
15093
  async function runCommand(action, ctx, target) {
14683
15094
  const binding = action.binding;
14684
15095
  if (binding.kind !== "command") return;
15096
+ if (binding.preflightPath !== void 0) {
15097
+ if (preflighting.has(action.id)) return;
15098
+ preflighting.add(action.id);
15099
+ const { token, runtime } = invocationOf(
15100
+ action,
15101
+ binding,
15102
+ ctx,
15103
+ target,
15104
+ runsOn(action, ctx, target)
15105
+ );
15106
+ const rt = runtime(() => store.detach("notify", token));
15107
+ const controller = new AbortController();
15108
+ preflightControllers.add(controller);
15109
+ if (binding.resultKind === "notify") rt.begin();
15110
+ const proceed = await binding.preflight(rt, ctx, target, controller.signal).finally(() => {
15111
+ if (binding.resultKind === "notify") rt.settled?.();
15112
+ preflighting.delete(action.id);
15113
+ preflightControllers.delete(controller);
15114
+ });
15115
+ if (!proceed) return;
15116
+ }
14685
15117
  const completion = completeArgs(binding.path, binding.partialArgs(ctx, target));
14686
15118
  if (!completion.ok) {
14687
15119
  if (!options.onPendingFormChange) {
@@ -14717,6 +15149,7 @@ function createActionRunner(ports, store, options = {}) {
14717
15149
  ctx,
14718
15150
  target,
14719
15151
  clipboard,
15152
+ dissolved: options.onDissolved,
14720
15153
  ...envExtras
14721
15154
  };
14722
15155
  if (binding.result === "apply") {
@@ -14814,6 +15247,7 @@ function createActionRunner(ports, store, options = {}) {
14814
15247
  store.detach("notify", token);
14815
15248
  }
14816
15249
  notifyControllers.clear();
15250
+ for (const controller of preflightControllers) controller.abort();
14817
15251
  tickListeners.clear();
14818
15252
  }
14819
15253
  };
@@ -14837,6 +15271,28 @@ function proposeStackSlug(folder) {
14837
15271
  return "";
14838
15272
  }
14839
15273
 
15274
+ // src/utils/wire-end.ts
15275
+ import { callText, groupPinText } from "@lace-cloud/proto";
15276
+ function wireEnd(wire, end) {
15277
+ const source = end === "source";
15278
+ const node = source ? wire.source : wire.target;
15279
+ const pin = source ? wire.source_output : wire.target_input;
15280
+ if (source ? wire.source_pin : wire.target_pin) return { kind: "group-pin", node, pin };
15281
+ if (source && !pin) return { kind: "call", node };
15282
+ return { kind: "pin", node, pin };
15283
+ }
15284
+ function wireEndText(wire, end, pinText) {
15285
+ const part = wireEnd(wire, end);
15286
+ switch (part.kind) {
15287
+ case "group-pin":
15288
+ return groupPinText(part.node, end, part.pin);
15289
+ case "call":
15290
+ return callText(part.node);
15291
+ case "pin":
15292
+ return pinText(part.node, part.pin, end);
15293
+ }
15294
+ }
15295
+
14840
15296
  // src/engine/autosave.ts
14841
15297
  var AutosaveEndedError = class extends Error {
14842
15298
  constructor(reason) {
@@ -14929,6 +15385,12 @@ export {
14929
15385
  diagnosticsOf,
14930
15386
  entryScopeIds,
14931
15387
  inEntryScope,
15388
+ NODE_HANDLE,
15389
+ parseHandleId,
15390
+ sourceHandleId,
15391
+ targetHandleId,
15392
+ edgeHandles,
15393
+ isDisconnectable,
14932
15394
  keySatisfied,
14933
15395
  disabledReason,
14934
15396
  actionState,
@@ -14936,6 +15398,8 @@ export {
14936
15398
  answering,
14937
15399
  resolveContributions,
14938
15400
  rowActions,
15401
+ isPlainObject,
15402
+ deepEqual,
14939
15403
  counted,
14940
15404
  Reason,
14941
15405
  Bundle,
@@ -14967,6 +15431,7 @@ export {
14967
15431
  commandUnderWay,
14968
15432
  reduceRun,
14969
15433
  failureSays,
15434
+ notifyFailure,
14970
15435
  settleRun,
14971
15436
  reducePreview,
14972
15437
  reduceReport,
@@ -14981,8 +15446,8 @@ export {
14981
15446
  LOCK_LABEL,
14982
15447
  MODULE_COMMAND_ACTIONS,
14983
15448
  CORE_COMMAND_ACTIONS,
14984
- isPlainObject,
14985
- deepEqual,
15449
+ wireEnd,
15450
+ wireEndText,
14986
15451
  createActionRunner,
14987
15452
  connectCaller,
14988
15453
  bridgeCaller,
@@ -14993,4 +15458,4 @@ export {
14993
15458
  AutosaveEndedError,
14994
15459
  autosave
14995
15460
  };
14996
- //# sourceMappingURL=chunk-XPHDFIKV.mjs.map
15461
+ //# sourceMappingURL=chunk-323MYV3H.mjs.map