@lace-cloud/host 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.
package/dist/index.d.mts CHANGED
@@ -358,7 +358,7 @@ declare enum Reason {
358
358
  /** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
359
359
  REASON_CONFLICT = 6,
360
360
  /**
361
- * REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
361
+ * REASON_SOURCE_REFUSED - Every mutation, save, discard and generate: the session's source tf is refused
362
362
  * (`BundleState.source_refused`).
363
363
  * module convert and module import: the tree's tf does not parse, has a
364
364
  * non-empty residual report, or its Bundle fails its own validation.
@@ -449,6 +449,16 @@ declare enum Reason {
449
449
  * `.terraform.lock.hcl`; `lace module lock` writes it.
450
450
  */
451
451
  REASON_NO_LOCKFILE = 22,
452
+ /** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
453
+ REASON_NO_COMMIT = 23,
454
+ /**
455
+ * REASON_STALE_WORKING_STATE - Discard and Restore: the session's working IR is no longer the one the
456
+ * caller showed the developer (`BundleState.working_digest`) -- another
457
+ * holder edited, undid or redid since. Restore also: the saved IR or source
458
+ * tree is no longer the one the backup was captured against. Nothing was
459
+ * discarded or restored; re-read the state and ask again.
460
+ */
461
+ REASON_STALE_WORKING_STATE = 24,
452
462
  UNRECOGNIZED = -1
453
463
  }
454
464
 
@@ -1116,6 +1126,44 @@ declare const UndoAction: MessageFns<UndoAction>;
1116
1126
  interface RedoAction {
1117
1127
  }
1118
1128
  declare const RedoAction: MessageFns<RedoAction>;
1129
+ /**
1130
+ * DiscardAction returns the session's working IR to its saved IR (the
1131
+ * record `state.lace` holds), a working-IR action: it never saves, writes
1132
+ * `state.lace` or the tf, and leaves an open conflict open. The old working
1133
+ * IR becomes an undo entry (an Undo brings the discarded edits back) and the
1134
+ * redo history is cleared. `expected_working_digest` is required: the
1135
+ * `BundleState.working_digest` of the state the caller showed the developer.
1136
+ * The engine refuses (FailedPrecondition, `REASON_STALE_WORKING_STATE`) when
1137
+ * the working IR's digest differs, so an edit another holder made since is
1138
+ * never discarded unseen. A session with nothing unsaved changes nothing:
1139
+ * no frame and no undo entry. Refused while the session is source-refused
1140
+ * (`REASON_SOURCE_REFUSED`) and for an ephemeral session, which has no saved
1141
+ * IR. Like Undo and Redo it is the only action of its batch.
1142
+ */
1143
+ interface DiscardAction {
1144
+ expected_working_digest: string;
1145
+ }
1146
+ declare const DiscardAction: MessageFns<DiscardAction>;
1147
+ /**
1148
+ * RestoreAction restores a host's captured working IR into a root session.
1149
+ * The bundle, its working digest, saved digest and tree hash must come from
1150
+ * the same BundleState frame; every field is required. The engine verifies
1151
+ * the bundle's digest and refuses if the current session is not clean, is
1152
+ * source-refused, or its saved IR or tree differs from the capture. An open
1153
+ * conflict blocks only generate, so it does not refuse a restore. It also compares expected_working_digest with the current frame,
1154
+ * so another holder's edits are never overwritten unseen. A refusal changes
1155
+ * nothing; the host retains the capture for the developer to choose what to
1156
+ * do with it. A successful restore is undoable and writes neither state.lace
1157
+ * nor source tf. Like Discard it must be the only action in its batch.
1158
+ */
1159
+ interface RestoreAction {
1160
+ bundle: Bundle | undefined;
1161
+ captured_working_digest: string;
1162
+ captured_saved_digest: string;
1163
+ captured_tree_hash: string;
1164
+ expected_working_digest: string;
1165
+ }
1166
+ declare const RestoreAction: MessageFns<RestoreAction>;
1119
1167
  /**
1120
1168
  * PlaceModuleAction drops a registry module onto the canvas. Distinct from
1121
1169
  * Connect/UpdateInput/etc. in that it names a *source* module (registry
@@ -1156,6 +1204,8 @@ interface Action {
1156
1204
  set_directives?: SetDirectivesAction | undefined;
1157
1205
  set_meta_arguments?: SetMetaArgumentsAction | undefined;
1158
1206
  add_resource?: AddResourceAction | undefined;
1207
+ discard?: DiscardAction | undefined;
1208
+ restore?: RestoreAction | undefined;
1159
1209
  }
1160
1210
  declare const Action: MessageFns<Action>;
1161
1211
  interface ApplyActionRequest {
@@ -1168,8 +1218,8 @@ declare const ApplyActionRequest: MessageFns<ApplyActionRequest>;
1168
1218
  * two instances of one module: `source_instance`'s `output` could feed
1169
1219
  * `target_instance`'s `input`, a required input with no binding. `score`
1170
1220
  * is the matcher's: 100 for the same name, 90 for the same last
1171
- * `_`-separated word, 50 when one name contains the other, 30 for the
1172
- * same type alone; a pair that scores nothing is no candidate.
1221
+ * `_`-separated word, 50 when one name contains the other; a pair that
1222
+ * scores nothing is no candidate.
1173
1223
  */
1174
1224
  interface WiringCandidate {
1175
1225
  source_instance: string;
@@ -1380,7 +1430,12 @@ interface BundleState {
1380
1430
  bundle: Bundle | undefined;
1381
1431
  can_undo: boolean;
1382
1432
  can_redo: boolean;
1383
- /** True when the working IR differs from the saved IR in `state.lace`. */
1433
+ /**
1434
+ * True when the working IR differs from the saved IR in `state.lace`. A host
1435
+ * that mirrors a document's dirty state marks it clean only from a frame
1436
+ * whose `unsaved` is false, never from the promise of a save or discard it
1437
+ * requested: edits, saves, undo and Generate from any holder move this flag.
1438
+ */
1384
1439
  unsaved: boolean;
1385
1440
  /**
1386
1441
  * The engine validator's findings for this state, in the validator's
@@ -1434,6 +1489,17 @@ interface BundleState {
1434
1489
  * window is refused (FailedPrecondition).
1435
1490
  */
1436
1491
  generating: boolean;
1492
+ /**
1493
+ * The content identity of the working IR (`encoding.Digest`): the
1494
+ * value a DiscardAction's `expected_working_digest` names. Empty while
1495
+ * there is no working IR.
1496
+ */
1497
+ working_digest: string;
1498
+ /**
1499
+ * The content identity of the saved IR (`encoding.Digest`), captured with
1500
+ * this frame's working IR for RestoreAction. Empty if unavailable.
1501
+ */
1502
+ saved_digest: string;
1437
1503
  }
1438
1504
  declare const BundleState: MessageFns<BundleState>;
1439
1505
  /**
@@ -1490,6 +1556,11 @@ interface CreatedRef {
1490
1556
  * the source child ID. Empty otherwise.
1491
1557
  */
1492
1558
  source_id: string;
1559
+ /**
1560
+ * Set when the child was promoted out of a dissolved group (ungroup): the
1561
+ * group's id in `scope`, which with source_id names the child. Empty otherwise.
1562
+ */
1563
+ group_id: string;
1493
1564
  }
1494
1565
  declare const CreatedRef: MessageFns<CreatedRef>;
1495
1566
  /**
package/dist/index.d.ts CHANGED
@@ -358,7 +358,7 @@ declare enum Reason {
358
358
  /** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
359
359
  REASON_CONFLICT = 6,
360
360
  /**
361
- * REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
361
+ * REASON_SOURCE_REFUSED - Every mutation, save, discard and generate: the session's source tf is refused
362
362
  * (`BundleState.source_refused`).
363
363
  * module convert and module import: the tree's tf does not parse, has a
364
364
  * non-empty residual report, or its Bundle fails its own validation.
@@ -449,6 +449,16 @@ declare enum Reason {
449
449
  * `.terraform.lock.hcl`; `lace module lock` writes it.
450
450
  */
451
451
  REASON_NO_LOCKFILE = 22,
452
+ /** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
453
+ REASON_NO_COMMIT = 23,
454
+ /**
455
+ * REASON_STALE_WORKING_STATE - Discard and Restore: the session's working IR is no longer the one the
456
+ * caller showed the developer (`BundleState.working_digest`) -- another
457
+ * holder edited, undid or redid since. Restore also: the saved IR or source
458
+ * tree is no longer the one the backup was captured against. Nothing was
459
+ * discarded or restored; re-read the state and ask again.
460
+ */
461
+ REASON_STALE_WORKING_STATE = 24,
452
462
  UNRECOGNIZED = -1
453
463
  }
454
464
 
@@ -1116,6 +1126,44 @@ declare const UndoAction: MessageFns<UndoAction>;
1116
1126
  interface RedoAction {
1117
1127
  }
1118
1128
  declare const RedoAction: MessageFns<RedoAction>;
1129
+ /**
1130
+ * DiscardAction returns the session's working IR to its saved IR (the
1131
+ * record `state.lace` holds), a working-IR action: it never saves, writes
1132
+ * `state.lace` or the tf, and leaves an open conflict open. The old working
1133
+ * IR becomes an undo entry (an Undo brings the discarded edits back) and the
1134
+ * redo history is cleared. `expected_working_digest` is required: the
1135
+ * `BundleState.working_digest` of the state the caller showed the developer.
1136
+ * The engine refuses (FailedPrecondition, `REASON_STALE_WORKING_STATE`) when
1137
+ * the working IR's digest differs, so an edit another holder made since is
1138
+ * never discarded unseen. A session with nothing unsaved changes nothing:
1139
+ * no frame and no undo entry. Refused while the session is source-refused
1140
+ * (`REASON_SOURCE_REFUSED`) and for an ephemeral session, which has no saved
1141
+ * IR. Like Undo and Redo it is the only action of its batch.
1142
+ */
1143
+ interface DiscardAction {
1144
+ expected_working_digest: string;
1145
+ }
1146
+ declare const DiscardAction: MessageFns<DiscardAction>;
1147
+ /**
1148
+ * RestoreAction restores a host's captured working IR into a root session.
1149
+ * The bundle, its working digest, saved digest and tree hash must come from
1150
+ * the same BundleState frame; every field is required. The engine verifies
1151
+ * the bundle's digest and refuses if the current session is not clean, is
1152
+ * source-refused, or its saved IR or tree differs from the capture. An open
1153
+ * conflict blocks only generate, so it does not refuse a restore. It also compares expected_working_digest with the current frame,
1154
+ * so another holder's edits are never overwritten unseen. A refusal changes
1155
+ * nothing; the host retains the capture for the developer to choose what to
1156
+ * do with it. A successful restore is undoable and writes neither state.lace
1157
+ * nor source tf. Like Discard it must be the only action in its batch.
1158
+ */
1159
+ interface RestoreAction {
1160
+ bundle: Bundle | undefined;
1161
+ captured_working_digest: string;
1162
+ captured_saved_digest: string;
1163
+ captured_tree_hash: string;
1164
+ expected_working_digest: string;
1165
+ }
1166
+ declare const RestoreAction: MessageFns<RestoreAction>;
1119
1167
  /**
1120
1168
  * PlaceModuleAction drops a registry module onto the canvas. Distinct from
1121
1169
  * Connect/UpdateInput/etc. in that it names a *source* module (registry
@@ -1156,6 +1204,8 @@ interface Action {
1156
1204
  set_directives?: SetDirectivesAction | undefined;
1157
1205
  set_meta_arguments?: SetMetaArgumentsAction | undefined;
1158
1206
  add_resource?: AddResourceAction | undefined;
1207
+ discard?: DiscardAction | undefined;
1208
+ restore?: RestoreAction | undefined;
1159
1209
  }
1160
1210
  declare const Action: MessageFns<Action>;
1161
1211
  interface ApplyActionRequest {
@@ -1168,8 +1218,8 @@ declare const ApplyActionRequest: MessageFns<ApplyActionRequest>;
1168
1218
  * two instances of one module: `source_instance`'s `output` could feed
1169
1219
  * `target_instance`'s `input`, a required input with no binding. `score`
1170
1220
  * is the matcher's: 100 for the same name, 90 for the same last
1171
- * `_`-separated word, 50 when one name contains the other, 30 for the
1172
- * same type alone; a pair that scores nothing is no candidate.
1221
+ * `_`-separated word, 50 when one name contains the other; a pair that
1222
+ * scores nothing is no candidate.
1173
1223
  */
1174
1224
  interface WiringCandidate {
1175
1225
  source_instance: string;
@@ -1380,7 +1430,12 @@ interface BundleState {
1380
1430
  bundle: Bundle | undefined;
1381
1431
  can_undo: boolean;
1382
1432
  can_redo: boolean;
1383
- /** True when the working IR differs from the saved IR in `state.lace`. */
1433
+ /**
1434
+ * True when the working IR differs from the saved IR in `state.lace`. A host
1435
+ * that mirrors a document's dirty state marks it clean only from a frame
1436
+ * whose `unsaved` is false, never from the promise of a save or discard it
1437
+ * requested: edits, saves, undo and Generate from any holder move this flag.
1438
+ */
1384
1439
  unsaved: boolean;
1385
1440
  /**
1386
1441
  * The engine validator's findings for this state, in the validator's
@@ -1434,6 +1489,17 @@ interface BundleState {
1434
1489
  * window is refused (FailedPrecondition).
1435
1490
  */
1436
1491
  generating: boolean;
1492
+ /**
1493
+ * The content identity of the working IR (`encoding.Digest`): the
1494
+ * value a DiscardAction's `expected_working_digest` names. Empty while
1495
+ * there is no working IR.
1496
+ */
1497
+ working_digest: string;
1498
+ /**
1499
+ * The content identity of the saved IR (`encoding.Digest`), captured with
1500
+ * this frame's working IR for RestoreAction. Empty if unavailable.
1501
+ */
1502
+ saved_digest: string;
1437
1503
  }
1438
1504
  declare const BundleState: MessageFns<BundleState>;
1439
1505
  /**
@@ -1490,6 +1556,11 @@ interface CreatedRef {
1490
1556
  * the source child ID. Empty otherwise.
1491
1557
  */
1492
1558
  source_id: string;
1559
+ /**
1560
+ * Set when the child was promoted out of a dissolved group (ungroup): the
1561
+ * group's id in `scope`, which with source_id names the child. Empty otherwise.
1562
+ */
1563
+ group_id: string;
1493
1564
  }
1494
1565
  declare const CreatedRef: MessageFns<CreatedRef>;
1495
1566
  /**
package/dist/index.mjs CHANGED
@@ -553,6 +553,12 @@ function reasonFromJSON(object) {
553
553
  case 22:
554
554
  case "REASON_NO_LOCKFILE":
555
555
  return 22 /* REASON_NO_LOCKFILE */;
556
+ case 23:
557
+ case "REASON_NO_COMMIT":
558
+ return 23 /* REASON_NO_COMMIT */;
559
+ case 24:
560
+ case "REASON_STALE_WORKING_STATE":
561
+ return 24 /* REASON_STALE_WORKING_STATE */;
556
562
  case -1:
557
563
  case "UNRECOGNIZED":
558
564
  default:
@@ -607,6 +613,10 @@ function reasonToJSON(object) {
607
613
  return "REASON_ALREADY_IMPORTED";
608
614
  case 22 /* REASON_NO_LOCKFILE */:
609
615
  return "REASON_NO_LOCKFILE";
616
+ case 23 /* REASON_NO_COMMIT */:
617
+ return "REASON_NO_COMMIT";
618
+ case 24 /* REASON_STALE_WORKING_STATE */:
619
+ return "REASON_STALE_WORKING_STATE";
610
620
  case -1 /* UNRECOGNIZED */:
611
621
  default:
612
622
  return "UNRECOGNIZED";
@@ -7043,6 +7053,178 @@ var RedoAction = {
7043
7053
  return message;
7044
7054
  }
7045
7055
  };
7056
+ function createBaseDiscardAction() {
7057
+ return { expected_working_digest: "" };
7058
+ }
7059
+ var DiscardAction = {
7060
+ encode(message, writer = new BinaryWriter4()) {
7061
+ if (message.expected_working_digest !== "") {
7062
+ writer.uint32(10).string(message.expected_working_digest);
7063
+ }
7064
+ return writer;
7065
+ },
7066
+ decode(input, length) {
7067
+ const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
7068
+ const end = length === void 0 ? reader.len : reader.pos + length;
7069
+ const message = createBaseDiscardAction();
7070
+ while (reader.pos < end) {
7071
+ const tag = reader.uint32();
7072
+ switch (tag >>> 3) {
7073
+ case 1: {
7074
+ if (tag !== 10) {
7075
+ break;
7076
+ }
7077
+ message.expected_working_digest = reader.string();
7078
+ continue;
7079
+ }
7080
+ }
7081
+ if ((tag & 7) === 4 || tag === 0) {
7082
+ break;
7083
+ }
7084
+ reader.skip(tag & 7);
7085
+ }
7086
+ return message;
7087
+ },
7088
+ fromJSON(object) {
7089
+ return {
7090
+ expected_working_digest: isSet3(object.expectedWorkingDigest) ? globalThis.String(object.expectedWorkingDigest) : isSet3(object.expected_working_digest) ? globalThis.String(object.expected_working_digest) : ""
7091
+ };
7092
+ },
7093
+ toJSON(message) {
7094
+ const obj = {};
7095
+ if (message.expected_working_digest !== "") {
7096
+ obj.expectedWorkingDigest = message.expected_working_digest;
7097
+ }
7098
+ return obj;
7099
+ },
7100
+ create(base) {
7101
+ return DiscardAction.fromPartial(base ?? {});
7102
+ },
7103
+ fromPartial(object) {
7104
+ const message = createBaseDiscardAction();
7105
+ message.expected_working_digest = object.expected_working_digest ?? "";
7106
+ return message;
7107
+ }
7108
+ };
7109
+ function createBaseRestoreAction() {
7110
+ return {
7111
+ bundle: void 0,
7112
+ captured_working_digest: "",
7113
+ captured_saved_digest: "",
7114
+ captured_tree_hash: "",
7115
+ expected_working_digest: ""
7116
+ };
7117
+ }
7118
+ var RestoreAction = {
7119
+ encode(message, writer = new BinaryWriter4()) {
7120
+ if (message.bundle !== void 0) {
7121
+ Bundle.encode(message.bundle, writer.uint32(10).fork()).join();
7122
+ }
7123
+ if (message.captured_working_digest !== "") {
7124
+ writer.uint32(18).string(message.captured_working_digest);
7125
+ }
7126
+ if (message.captured_saved_digest !== "") {
7127
+ writer.uint32(26).string(message.captured_saved_digest);
7128
+ }
7129
+ if (message.captured_tree_hash !== "") {
7130
+ writer.uint32(34).string(message.captured_tree_hash);
7131
+ }
7132
+ if (message.expected_working_digest !== "") {
7133
+ writer.uint32(42).string(message.expected_working_digest);
7134
+ }
7135
+ return writer;
7136
+ },
7137
+ decode(input, length) {
7138
+ const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
7139
+ const end = length === void 0 ? reader.len : reader.pos + length;
7140
+ const message = createBaseRestoreAction();
7141
+ while (reader.pos < end) {
7142
+ const tag = reader.uint32();
7143
+ switch (tag >>> 3) {
7144
+ case 1: {
7145
+ if (tag !== 10) {
7146
+ break;
7147
+ }
7148
+ message.bundle = Bundle.decode(reader, reader.uint32());
7149
+ continue;
7150
+ }
7151
+ case 2: {
7152
+ if (tag !== 18) {
7153
+ break;
7154
+ }
7155
+ message.captured_working_digest = reader.string();
7156
+ continue;
7157
+ }
7158
+ case 3: {
7159
+ if (tag !== 26) {
7160
+ break;
7161
+ }
7162
+ message.captured_saved_digest = reader.string();
7163
+ continue;
7164
+ }
7165
+ case 4: {
7166
+ if (tag !== 34) {
7167
+ break;
7168
+ }
7169
+ message.captured_tree_hash = reader.string();
7170
+ continue;
7171
+ }
7172
+ case 5: {
7173
+ if (tag !== 42) {
7174
+ break;
7175
+ }
7176
+ message.expected_working_digest = reader.string();
7177
+ continue;
7178
+ }
7179
+ }
7180
+ if ((tag & 7) === 4 || tag === 0) {
7181
+ break;
7182
+ }
7183
+ reader.skip(tag & 7);
7184
+ }
7185
+ return message;
7186
+ },
7187
+ fromJSON(object) {
7188
+ return {
7189
+ bundle: isSet3(object.bundle) ? Bundle.fromJSON(object.bundle) : void 0,
7190
+ captured_working_digest: isSet3(object.capturedWorkingDigest) ? globalThis.String(object.capturedWorkingDigest) : isSet3(object.captured_working_digest) ? globalThis.String(object.captured_working_digest) : "",
7191
+ captured_saved_digest: isSet3(object.capturedSavedDigest) ? globalThis.String(object.capturedSavedDigest) : isSet3(object.captured_saved_digest) ? globalThis.String(object.captured_saved_digest) : "",
7192
+ captured_tree_hash: isSet3(object.capturedTreeHash) ? globalThis.String(object.capturedTreeHash) : isSet3(object.captured_tree_hash) ? globalThis.String(object.captured_tree_hash) : "",
7193
+ expected_working_digest: isSet3(object.expectedWorkingDigest) ? globalThis.String(object.expectedWorkingDigest) : isSet3(object.expected_working_digest) ? globalThis.String(object.expected_working_digest) : ""
7194
+ };
7195
+ },
7196
+ toJSON(message) {
7197
+ const obj = {};
7198
+ if (message.bundle !== void 0) {
7199
+ obj.bundle = Bundle.toJSON(message.bundle);
7200
+ }
7201
+ if (message.captured_working_digest !== "") {
7202
+ obj.capturedWorkingDigest = message.captured_working_digest;
7203
+ }
7204
+ if (message.captured_saved_digest !== "") {
7205
+ obj.capturedSavedDigest = message.captured_saved_digest;
7206
+ }
7207
+ if (message.captured_tree_hash !== "") {
7208
+ obj.capturedTreeHash = message.captured_tree_hash;
7209
+ }
7210
+ if (message.expected_working_digest !== "") {
7211
+ obj.expectedWorkingDigest = message.expected_working_digest;
7212
+ }
7213
+ return obj;
7214
+ },
7215
+ create(base) {
7216
+ return RestoreAction.fromPartial(base ?? {});
7217
+ },
7218
+ fromPartial(object) {
7219
+ const message = createBaseRestoreAction();
7220
+ message.bundle = object.bundle !== void 0 && object.bundle !== null ? Bundle.fromPartial(object.bundle) : void 0;
7221
+ message.captured_working_digest = object.captured_working_digest ?? "";
7222
+ message.captured_saved_digest = object.captured_saved_digest ?? "";
7223
+ message.captured_tree_hash = object.captured_tree_hash ?? "";
7224
+ message.expected_working_digest = object.expected_working_digest ?? "";
7225
+ return message;
7226
+ }
7227
+ };
7046
7228
  function createBasePlaceModuleAction() {
7047
7229
  return { author: "", name: "", version: "" };
7048
7230
  }
@@ -7151,7 +7333,9 @@ function createBaseAction() {
7151
7333
  set_blocks: void 0,
7152
7334
  set_directives: void 0,
7153
7335
  set_meta_arguments: void 0,
7154
- add_resource: void 0
7336
+ add_resource: void 0,
7337
+ discard: void 0,
7338
+ restore: void 0
7155
7339
  };
7156
7340
  }
7157
7341
  var Action = {
@@ -7228,6 +7412,12 @@ var Action = {
7228
7412
  if (message.add_resource !== void 0) {
7229
7413
  AddResourceAction.encode(message.add_resource, writer.uint32(226).fork()).join();
7230
7414
  }
7415
+ if (message.discard !== void 0) {
7416
+ DiscardAction.encode(message.discard, writer.uint32(234).fork()).join();
7417
+ }
7418
+ if (message.restore !== void 0) {
7419
+ RestoreAction.encode(message.restore, writer.uint32(242).fork()).join();
7420
+ }
7231
7421
  return writer;
7232
7422
  },
7233
7423
  decode(input, length) {
@@ -7405,6 +7595,20 @@ var Action = {
7405
7595
  message.add_resource = AddResourceAction.decode(reader, reader.uint32());
7406
7596
  continue;
7407
7597
  }
7598
+ case 29: {
7599
+ if (tag !== 234) {
7600
+ break;
7601
+ }
7602
+ message.discard = DiscardAction.decode(reader, reader.uint32());
7603
+ continue;
7604
+ }
7605
+ case 30: {
7606
+ if (tag !== 242) {
7607
+ break;
7608
+ }
7609
+ message.restore = RestoreAction.decode(reader, reader.uint32());
7610
+ continue;
7611
+ }
7408
7612
  }
7409
7613
  if ((tag & 7) === 4 || tag === 0) {
7410
7614
  break;
@@ -7438,7 +7642,9 @@ var Action = {
7438
7642
  set_blocks: isSet3(object.setBlocks) ? SetBlocksAction.fromJSON(object.setBlocks) : isSet3(object.set_blocks) ? SetBlocksAction.fromJSON(object.set_blocks) : void 0,
7439
7643
  set_directives: isSet3(object.setDirectives) ? SetDirectivesAction.fromJSON(object.setDirectives) : isSet3(object.set_directives) ? SetDirectivesAction.fromJSON(object.set_directives) : void 0,
7440
7644
  set_meta_arguments: isSet3(object.setMetaArguments) ? SetMetaArgumentsAction.fromJSON(object.setMetaArguments) : isSet3(object.set_meta_arguments) ? SetMetaArgumentsAction.fromJSON(object.set_meta_arguments) : void 0,
7441
- add_resource: isSet3(object.addResource) ? AddResourceAction.fromJSON(object.addResource) : isSet3(object.add_resource) ? AddResourceAction.fromJSON(object.add_resource) : void 0
7645
+ add_resource: isSet3(object.addResource) ? AddResourceAction.fromJSON(object.addResource) : isSet3(object.add_resource) ? AddResourceAction.fromJSON(object.add_resource) : void 0,
7646
+ discard: isSet3(object.discard) ? DiscardAction.fromJSON(object.discard) : void 0,
7647
+ restore: isSet3(object.restore) ? RestoreAction.fromJSON(object.restore) : void 0
7442
7648
  };
7443
7649
  },
7444
7650
  toJSON(message) {
@@ -7515,6 +7721,12 @@ var Action = {
7515
7721
  if (message.add_resource !== void 0) {
7516
7722
  obj.addResource = AddResourceAction.toJSON(message.add_resource);
7517
7723
  }
7724
+ if (message.discard !== void 0) {
7725
+ obj.discard = DiscardAction.toJSON(message.discard);
7726
+ }
7727
+ if (message.restore !== void 0) {
7728
+ obj.restore = RestoreAction.toJSON(message.restore);
7729
+ }
7518
7730
  return obj;
7519
7731
  },
7520
7732
  create(base) {
@@ -7546,6 +7758,8 @@ var Action = {
7546
7758
  message.set_directives = object.set_directives !== void 0 && object.set_directives !== null ? SetDirectivesAction.fromPartial(object.set_directives) : void 0;
7547
7759
  message.set_meta_arguments = object.set_meta_arguments !== void 0 && object.set_meta_arguments !== null ? SetMetaArgumentsAction.fromPartial(object.set_meta_arguments) : void 0;
7548
7760
  message.add_resource = object.add_resource !== void 0 && object.add_resource !== null ? AddResourceAction.fromPartial(object.add_resource) : void 0;
7761
+ message.discard = object.discard !== void 0 && object.discard !== null ? DiscardAction.fromPartial(object.discard) : void 0;
7762
+ message.restore = object.restore !== void 0 && object.restore !== null ? RestoreAction.fromPartial(object.restore) : void 0;
7549
7763
  return message;
7550
7764
  }
7551
7765
  };
@@ -8960,7 +9174,9 @@ function createBaseBundleState() {
8960
9174
  source_refused: false,
8961
9175
  tree_hash: "",
8962
9176
  revision: 0,
8963
- generating: false
9177
+ generating: false,
9178
+ working_digest: "",
9179
+ saved_digest: ""
8964
9180
  };
8965
9181
  }
8966
9182
  var BundleState = {
@@ -8998,6 +9214,12 @@ var BundleState = {
8998
9214
  if (message.generating !== false) {
8999
9215
  writer.uint32(96).bool(message.generating);
9000
9216
  }
9217
+ if (message.working_digest !== "") {
9218
+ writer.uint32(106).string(message.working_digest);
9219
+ }
9220
+ if (message.saved_digest !== "") {
9221
+ writer.uint32(114).string(message.saved_digest);
9222
+ }
9001
9223
  return writer;
9002
9224
  },
9003
9225
  decode(input, length) {
@@ -9084,6 +9306,20 @@ var BundleState = {
9084
9306
  message.generating = reader.bool();
9085
9307
  continue;
9086
9308
  }
9309
+ case 13: {
9310
+ if (tag !== 106) {
9311
+ break;
9312
+ }
9313
+ message.working_digest = reader.string();
9314
+ continue;
9315
+ }
9316
+ case 14: {
9317
+ if (tag !== 114) {
9318
+ break;
9319
+ }
9320
+ message.saved_digest = reader.string();
9321
+ continue;
9322
+ }
9087
9323
  }
9088
9324
  if ((tag & 7) === 4 || tag === 0) {
9089
9325
  break;
@@ -9104,7 +9340,9 @@ var BundleState = {
9104
9340
  source_refused: isSet3(object.sourceRefused) ? globalThis.Boolean(object.sourceRefused) : isSet3(object.source_refused) ? globalThis.Boolean(object.source_refused) : false,
9105
9341
  tree_hash: isSet3(object.treeHash) ? globalThis.String(object.treeHash) : isSet3(object.tree_hash) ? globalThis.String(object.tree_hash) : "",
9106
9342
  revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0,
9107
- generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false
9343
+ generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false,
9344
+ working_digest: isSet3(object.workingDigest) ? globalThis.String(object.workingDigest) : isSet3(object.working_digest) ? globalThis.String(object.working_digest) : "",
9345
+ saved_digest: isSet3(object.savedDigest) ? globalThis.String(object.savedDigest) : isSet3(object.saved_digest) ? globalThis.String(object.saved_digest) : ""
9108
9346
  };
9109
9347
  },
9110
9348
  toJSON(message) {
@@ -9142,6 +9380,12 @@ var BundleState = {
9142
9380
  if (message.generating !== false) {
9143
9381
  obj.generating = message.generating;
9144
9382
  }
9383
+ if (message.working_digest !== "") {
9384
+ obj.workingDigest = message.working_digest;
9385
+ }
9386
+ if (message.saved_digest !== "") {
9387
+ obj.savedDigest = message.saved_digest;
9388
+ }
9145
9389
  return obj;
9146
9390
  },
9147
9391
  create(base) {
@@ -9160,6 +9404,8 @@ var BundleState = {
9160
9404
  message.tree_hash = object.tree_hash ?? "";
9161
9405
  message.revision = object.revision ?? 0;
9162
9406
  message.generating = object.generating ?? false;
9407
+ message.working_digest = object.working_digest ?? "";
9408
+ message.saved_digest = object.saved_digest ?? "";
9163
9409
  return message;
9164
9410
  }
9165
9411
  };
@@ -9277,7 +9523,7 @@ var BundleApplyResult = {
9277
9523
  }
9278
9524
  };
9279
9525
  function createBaseCreatedRef() {
9280
- return { scope: "", id: "", module_key: "", source_id: "" };
9526
+ return { scope: "", id: "", module_key: "", source_id: "", group_id: "" };
9281
9527
  }
9282
9528
  var CreatedRef = {
9283
9529
  encode(message, writer = new BinaryWriter4()) {
@@ -9293,6 +9539,9 @@ var CreatedRef = {
9293
9539
  if (message.source_id !== "") {
9294
9540
  writer.uint32(34).string(message.source_id);
9295
9541
  }
9542
+ if (message.group_id !== "") {
9543
+ writer.uint32(42).string(message.group_id);
9544
+ }
9296
9545
  return writer;
9297
9546
  },
9298
9547
  decode(input, length) {
@@ -9330,6 +9579,13 @@ var CreatedRef = {
9330
9579
  message.source_id = reader.string();
9331
9580
  continue;
9332
9581
  }
9582
+ case 5: {
9583
+ if (tag !== 42) {
9584
+ break;
9585
+ }
9586
+ message.group_id = reader.string();
9587
+ continue;
9588
+ }
9333
9589
  }
9334
9590
  if ((tag & 7) === 4 || tag === 0) {
9335
9591
  break;
@@ -9343,7 +9599,8 @@ var CreatedRef = {
9343
9599
  scope: isSet3(object.scope) ? globalThis.String(object.scope) : "",
9344
9600
  id: isSet3(object.id) ? globalThis.String(object.id) : "",
9345
9601
  module_key: isSet3(object.moduleKey) ? globalThis.String(object.moduleKey) : isSet3(object.module_key) ? globalThis.String(object.module_key) : "",
9346
- source_id: isSet3(object.sourceId) ? globalThis.String(object.sourceId) : isSet3(object.source_id) ? globalThis.String(object.source_id) : ""
9602
+ source_id: isSet3(object.sourceId) ? globalThis.String(object.sourceId) : isSet3(object.source_id) ? globalThis.String(object.source_id) : "",
9603
+ group_id: isSet3(object.groupId) ? globalThis.String(object.groupId) : isSet3(object.group_id) ? globalThis.String(object.group_id) : ""
9347
9604
  };
9348
9605
  },
9349
9606
  toJSON(message) {
@@ -9360,6 +9617,9 @@ var CreatedRef = {
9360
9617
  if (message.source_id !== "") {
9361
9618
  obj.sourceId = message.source_id;
9362
9619
  }
9620
+ if (message.group_id !== "") {
9621
+ obj.groupId = message.group_id;
9622
+ }
9363
9623
  return obj;
9364
9624
  },
9365
9625
  create(base) {
@@ -9371,6 +9631,7 @@ var CreatedRef = {
9371
9631
  message.id = object.id ?? "";
9372
9632
  message.module_key = object.module_key ?? "";
9373
9633
  message.source_id = object.source_id ?? "";
9634
+ message.group_id = object.group_id ?? "";
9374
9635
  return message;
9375
9636
  }
9376
9637
  };