@noldova/checkpoints.protocol 0.0.3 → 0.0.4

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.
Files changed (69) hide show
  1. package/README.md +1 -1
  2. package/package.json +5 -4
  3. package/src/api/index.d.ts +175 -27
  4. package/src/api/index.js +3 -0
  5. package/src/api/index.js.map +1 -1
  6. package/src/exceptions/capture-content-mismatch.exception.js +17 -0
  7. package/src/exceptions/capture-content-mismatch.exception.js.map +1 -0
  8. package/src/exceptions/earlier-paths-mismatch.exception.js +17 -0
  9. package/src/exceptions/earlier-paths-mismatch.exception.js.map +1 -0
  10. package/src/exceptions/restore-content-mismatch.exception.js +17 -0
  11. package/src/exceptions/restore-content-mismatch.exception.js.map +1 -0
  12. package/src/models/capture-mode.js +2 -1
  13. package/src/models/capture-mode.js.map +1 -1
  14. package/src/models/capture-outcome.js +4 -2
  15. package/src/models/capture-outcome.js.map +1 -1
  16. package/src/models/capture-request.js +15 -5
  17. package/src/models/capture-request.js.map +1 -1
  18. package/src/models/capture-result.js +23 -9
  19. package/src/models/capture-result.js.map +1 -1
  20. package/src/models/change-side.js +3 -2
  21. package/src/models/change-side.js.map +1 -1
  22. package/src/models/change-status.js +2 -1
  23. package/src/models/change-status.js.map +1 -1
  24. package/src/models/change.js +7 -6
  25. package/src/models/change.js.map +1 -1
  26. package/src/models/checkpoint.js +3 -6
  27. package/src/models/checkpoint.js.map +1 -1
  28. package/src/models/compare-outcome.js +2 -1
  29. package/src/models/compare-outcome.js.map +1 -1
  30. package/src/models/compare-request.js +2 -1
  31. package/src/models/compare-request.js.map +1 -1
  32. package/src/models/delete-folder-outcome.js +2 -1
  33. package/src/models/delete-folder-outcome.js.map +1 -1
  34. package/src/models/diff-target.js +2 -1
  35. package/src/models/diff-target.js.map +1 -1
  36. package/src/models/folder-usage.js +2 -1
  37. package/src/models/folder-usage.js.map +1 -1
  38. package/src/models/keep-reason.js +4 -2
  39. package/src/models/keep-reason.js.map +1 -1
  40. package/src/models/path-kind.js +2 -1
  41. package/src/models/path-kind.js.map +1 -1
  42. package/src/models/preview-outcome.js +2 -1
  43. package/src/models/preview-outcome.js.map +1 -1
  44. package/src/models/preview-result.js +4 -3
  45. package/src/models/preview-result.js.map +1 -1
  46. package/src/models/read-outcome.js +2 -1
  47. package/src/models/read-outcome.js.map +1 -1
  48. package/src/models/read-request.js +3 -2
  49. package/src/models/read-request.js.map +1 -1
  50. package/src/models/restore-action.js +2 -1
  51. package/src/models/restore-action.js.map +1 -1
  52. package/src/models/restore-outcome.js +5 -2
  53. package/src/models/restore-outcome.js.map +1 -1
  54. package/src/models/restore-plan.js +13 -4
  55. package/src/models/restore-plan.js.map +1 -1
  56. package/src/models/restore-result.js +23 -6
  57. package/src/models/restore-result.js.map +1 -1
  58. package/src/models/restore-step.js +5 -4
  59. package/src/models/restore-step.js.map +1 -1
  60. package/src/models/unread-path.js +2 -1
  61. package/src/models/unread-path.js.map +1 -1
  62. package/src/models/unread-reason.js +4 -2
  63. package/src/models/unread-reason.js.map +1 -1
  64. package/src/resources.js +15 -2
  65. package/src/resources.js.map +1 -1
  66. package/src/services/scope-paths.js +3 -2
  67. package/src/services/scope-paths.js.map +1 -1
  68. package/src/services/wire-form.js +15 -4
  69. package/src/services/wire-form.js.map +1 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  The protocol of the checkpoints module's runtime methods: their requests, results and events, with the folders and checkpoints they name, and their JSON forms.
4
4
  Each model reads its JSON form through `@noldova/context.json`'s `JsonReader` and refuses a field it doesn't have; a value that isn't its JSON form throws context's `JsonException`, whose path starts at the model's name, such as `ReadRequest.limit`.
5
5
  A model built from values it refuses throws a subclass of `ProtocolException`, such as `InvalidCheckpointIdException`.
6
- It takes `@noldova/context.exceptions` and `@noldova/context.json` as peers.
6
+ It takes `@noldova/context.core`, `@noldova/context.exceptions` and `@noldova/context.json` as peers.
7
7
 
8
8
  [`@noldova/checkpoints`](https://www.npmjs.com/package/@noldova/checkpoints) depends on it and pins it at its own version; an app that calls the module's methods builds their requests and reads their results with it.
9
9
  [documents/ARCHITECTURE.md](https://github.com/noldova-com/checkpoints/blob/main/documents/ARCHITECTURE.md) says what each method does, and the [README](https://github.com/noldova-com/checkpoints#readme) how to build and test it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noldova/checkpoints.protocol",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "The checkpoints module's protocol: the requests, results and events of its runtime methods, with the folders and checkpoints they name.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,8 +30,9 @@
30
30
  "registry": "https://registry.npmjs.org/"
31
31
  },
32
32
  "peerDependencies": {
33
- "@noldova/context.exceptions": ">=0.0.7 <0.1.0",
34
- "@noldova/context.json": ">=0.0.7 <0.1.0"
33
+ "@noldova/context.core": ">=0.0.12 <0.1.0",
34
+ "@noldova/context.exceptions": ">=0.0.12 <0.1.0",
35
+ "@noldova/context.json": ">=0.0.12 <0.1.0"
35
36
  },
36
- "gitHead": "77578fb7579ca157c2d59cb19e935d3e518bf44d"
37
+ "gitHead": "92115c9738699675becd88bfa8253a5584d0ac6d"
37
38
  }
@@ -70,6 +70,30 @@ export declare class CaptureCheckpointMismatchException extends ProtocolExceptio
70
70
  public constructor(outcome: CaptureOutcome);
71
71
  }
72
72
 
73
+ /**
74
+ * Thrown when a capture result holds the content size and its limit other than exactly when its outcome is TooLarge.
75
+ */
76
+ export declare class CaptureContentMismatchException extends ProtocolException {
77
+ /**
78
+ * The outcome the result was given.
79
+ */
80
+ public readonly outcome: CaptureOutcome;
81
+
82
+ /**
83
+ * Formats the exception's message from its facts.
84
+ *
85
+ * @param outcome The outcome the result was given.
86
+ * @example
87
+ * ```ts
88
+ * import { CaptureContentMismatchException, CaptureOutcome } from "@noldova/checkpoints.protocol";
89
+ *
90
+ * const exception = new CaptureContentMismatchException(CaptureOutcome.Captured);
91
+ * console.log(exception.message, exception.outcome);
92
+ * ```
93
+ */
94
+ public constructor(outcome: CaptureOutcome);
95
+ }
96
+
73
97
  /**
74
98
  * Thrown when a capture result holds the space free and the space needed other than exactly when its outcome is LowDiskSpace.
75
99
  */
@@ -142,6 +166,30 @@ export declare class CompareChangesMismatchException extends ProtocolException {
142
166
  public constructor(outcome: CompareOutcome);
143
167
  }
144
168
 
169
+ /**
170
+ * Thrown when a restore plan names an earlier path that none of its steps writes, or names one twice.
171
+ */
172
+ export declare class EarlierPathsMismatchException extends ProtocolException {
173
+ /**
174
+ * The earlier path the plan refused.
175
+ */
176
+ public readonly path: string;
177
+
178
+ /**
179
+ * Formats the exception's message from its facts.
180
+ *
181
+ * @param path The earlier path the plan refused.
182
+ * @example
183
+ * ```ts
184
+ * import { EarlierPathsMismatchException } from "@noldova/checkpoints.protocol";
185
+ *
186
+ * const exception = new EarlierPathsMismatchException("src/a.txt");
187
+ * console.log(exception.message, exception.path);
188
+ * ```
189
+ */
190
+ public constructor(path: string);
191
+ }
192
+
145
193
  /**
146
194
  * Thrown when a read result's content is longer than its size.
147
195
  */
@@ -255,7 +303,7 @@ export declare class InvalidFolderPathException extends ProtocolException {
255
303
  }
256
304
 
257
305
  /**
258
- * Thrown when a folder's identity isn't 1 to 64 letters, digits or hyphens.
306
+ * Thrown when a folder's identity isn't 1 to 64 lower-case letters, digits or hyphens.
259
307
  */
260
308
  export declare class InvalidIdentityException extends ProtocolException {
261
309
  /**
@@ -519,6 +567,30 @@ export declare class RestoreCheckpointsMismatchException extends ProtocolExcepti
519
567
  public constructor(outcome: RestoreOutcome);
520
568
  }
521
569
 
570
+ /**
571
+ * Thrown when a restore result holds the content size and its limit other than exactly when its outcome is TooLarge.
572
+ */
573
+ export declare class RestoreContentMismatchException extends ProtocolException {
574
+ /**
575
+ * The outcome the result was given.
576
+ */
577
+ public readonly outcome: RestoreOutcome;
578
+
579
+ /**
580
+ * Formats the exception's message from its facts.
581
+ *
582
+ * @param outcome The outcome the result was given.
583
+ * @example
584
+ * ```ts
585
+ * import { RestoreContentMismatchException, RestoreOutcome } from "@noldova/checkpoints.protocol";
586
+ *
587
+ * const exception = new RestoreContentMismatchException(RestoreOutcome.MovedOn);
588
+ * console.log(exception.message, exception.outcome);
589
+ * ```
590
+ */
591
+ public constructor(outcome: RestoreOutcome);
592
+ }
593
+
522
594
  /**
523
595
  * Thrown when a side has a size other than exactly when it isn't a folder, or is a folder taken as text.
524
596
  */
@@ -961,7 +1033,7 @@ export declare class CaptureOutcome {
961
1033
  public static readonly Captured: CaptureOutcome;
962
1034
 
963
1035
  /**
964
- * The folder's path is missing, so no checkpoint was taken; a missing folder is never captured as empty.
1036
+ * The folder's path is missing, or the folder was deleted or renamed while it was walked, so no checkpoint was taken; a missing folder is never captured as empty.
965
1037
  */
966
1038
  public static readonly FolderMissing: CaptureOutcome;
967
1039
 
@@ -976,6 +1048,12 @@ export declare class CaptureOutcome {
976
1048
  */
977
1049
  public static readonly LowDiskSpace: CaptureOutcome;
978
1050
 
1051
+ /**
1052
+ * The new and changed content the checkpoint would write is over 1 GiB, so no checkpoint was taken; the result says the content's size
1053
+ * and the limit. Nothing was written.
1054
+ */
1055
+ public static readonly TooLarge: CaptureOutcome;
1056
+
979
1057
  /**
980
1058
  * Whether the capture took a checkpoint.
981
1059
  */
@@ -1034,6 +1112,11 @@ export declare class UnreadReason {
1034
1112
  */
1035
1113
  public static readonly InvalidName: UnreadReason;
1036
1114
 
1115
+ /**
1116
+ * The file is over 10 MiB, more than a checkpoint keeps, so its content isn't read or kept; a restore leaves it as it is.
1117
+ */
1118
+ public static readonly TooLarge: UnreadReason;
1119
+
1037
1120
  /**
1038
1121
  * The system gave an error reading the path that is about this one path only, such as a name too long for it, a network share that timed out,
1039
1122
  * or a cloud file that isn't on the computer; {@link UnreadPath.code} holds the error's code.
@@ -1224,7 +1307,7 @@ export declare class Checkpoint {
1224
1307
  */
1225
1308
  export declare class FolderReference {
1226
1309
  /**
1227
- * The identity the app owns, 1 to 64 letters, digits and `-`, such as a project's id.
1310
+ * The identity the app owns, 1 to 64 lower-case letters, digits and `-`, such as a project's id.
1228
1311
  */
1229
1312
  public readonly identity: string;
1230
1313
 
@@ -1236,7 +1319,7 @@ export declare class FolderReference {
1236
1319
  /**
1237
1320
  * @param identity The identity the app owns.
1238
1321
  * @param path The folder's absolute path on this device now.
1239
- * @throws {ProtocolException} Thrown synchronously when the identity isn't 1 to 64 letters, digits and `-`, or the path isn't absolute.
1322
+ * @throws {ProtocolException} Thrown synchronously when the identity isn't 1 to 64 lower-case letters, digits and `-`, or the path isn't absolute.
1240
1323
  * @example
1241
1324
  * ```ts
1242
1325
  * import { FolderReference } from "@noldova/checkpoints.protocol";
@@ -1286,6 +1369,17 @@ export declare class CaptureRequest {
1286
1369
  */
1287
1370
  public static readonly method: string;
1288
1371
 
1372
+ /**
1373
+ * The time the checkpoint stands for, such as when an agent's turn started, or `null` for the folder as the capture reads it. A file
1374
+ * whose modification or change time is at or after it, less 2 seconds for file systems that keep times to 2 seconds, isn't read, nor is
1375
+ * one gone, rewritten or retargeted by the time it's read, nor one gone from a folder changed at or after it, nor one replaced by such a
1376
+ * folder: the checkpoint keeps the earlier checkpoint's copy,
1377
+ * or leaves the file out when that has none. So a capture taken beside the turn, which finishes after the turn changed files, keeps
1378
+ * the folder as the turn began, but for a file changed both since the earlier checkpoint and as the turn began, which it keeps as the
1379
+ * earlier checkpoint had it.
1380
+ */
1381
+ public readonly asOf: Date | null;
1382
+
1289
1383
  /**
1290
1384
  * The folder to take a checkpoint of.
1291
1385
  */
@@ -1299,7 +1393,9 @@ export declare class CaptureRequest {
1299
1393
  /**
1300
1394
  * @param folder The folder to take a checkpoint of.
1301
1395
  * @param label The label to attach, of up to 1,024 characters, or `null`.
1302
- * @throws {ProtocolException} Thrown synchronously when the label is longer than 1,024 characters.
1396
+ * @param asOf The time the checkpoint stands for, or `null`, the default, for the folder as the capture reads it; the request keeps a
1397
+ * copy.
1398
+ * @throws {ProtocolException} Thrown synchronously when the label is longer than 1,024 characters, or the time is no date.
1303
1399
  * @example
1304
1400
  * ```ts
1305
1401
  * import { CaptureRequest, FolderReference } from "@noldova/checkpoints.protocol";
@@ -1308,7 +1404,7 @@ export declare class CaptureRequest {
1308
1404
  * console.log(CaptureRequest.method, request.toJson());
1309
1405
  * ```
1310
1406
  */
1311
- public constructor(folder: FolderReference, label: string | null);
1407
+ public constructor(folder: FolderReference, label: string | null, asOf?: Date | null);
1312
1408
 
1313
1409
  /**
1314
1410
  * Reads a request from its wire form.
@@ -1322,7 +1418,7 @@ export declare class CaptureRequest {
1322
1418
  * import { CaptureRequest } from "@noldova/checkpoints.protocol";
1323
1419
  *
1324
1420
  * const folderJson = { identity: "project-1", path: "/work/project" };
1325
- * const request = CaptureRequest.fromJson({ folder: folderJson, label: null });
1421
+ * const request = CaptureRequest.fromJson({ folder: folderJson, label: null, asOf: "2026-11-19T03:30:00.000Z" });
1326
1422
  * console.log(request.label);
1327
1423
  * ```
1328
1424
  */
@@ -1344,7 +1440,7 @@ export declare class CaptureRequest {
1344
1440
 
1345
1441
  /**
1346
1442
  * What a capture did: the checkpoint it took, or why it took none, with the space free and the space needed when it took none for want
1347
- * of space.
1443
+ * of space, and the content's size and its limit when it took none for having too much to write.
1348
1444
  */
1349
1445
  export declare class CaptureResult {
1350
1446
  /**
@@ -1352,6 +1448,16 @@ export declare class CaptureResult {
1352
1448
  */
1353
1449
  public readonly checkpoint: Checkpoint | null;
1354
1450
 
1451
+ /**
1452
+ * The most new and changed content a checkpoint writes, 1 GiB, when the outcome is `TooLarge`, or `null`.
1453
+ */
1454
+ public readonly contentLimit: number | null;
1455
+
1456
+ /**
1457
+ * The bytes of new and changed content the checkpoint would have written, when the outcome is `TooLarge`, or `null`.
1458
+ */
1459
+ public readonly contentSize: number | null;
1460
+
1355
1461
  /**
1356
1462
  * Whether the capture took a checkpoint.
1357
1463
  */
@@ -1372,8 +1478,10 @@ export declare class CaptureResult {
1372
1478
  * @param checkpoint The checkpoint taken, or `null` when none was.
1373
1479
  * @param spaceFree The bytes free, when the outcome is `LowDiskSpace`, or `null`.
1374
1480
  * @param spaceNeeded The bytes needed, when the outcome is `LowDiskSpace`, or `null`.
1375
- * @throws {ProtocolException} Thrown synchronously when the outcome and the checkpoint or the space disagree, or a size isn't a whole
1376
- * number of bytes.
1481
+ * @param contentSize The bytes of content to write, when the outcome is `TooLarge`, or `null`, the default.
1482
+ * @param contentLimit The content limit in bytes, when the outcome is `TooLarge`, or `null`, the default.
1483
+ * @throws {ProtocolException} Thrown synchronously when the outcome and the checkpoint, the space or the content disagree, or a size
1484
+ * isn't a whole number of bytes.
1377
1485
  * @example
1378
1486
  * ```ts
1379
1487
  * import { CaptureOutcome, CaptureResult } from "@noldova/checkpoints.protocol";
@@ -1382,7 +1490,9 @@ export declare class CaptureResult {
1382
1490
  * console.log(result.spaceNeeded);
1383
1491
  * ```
1384
1492
  */
1385
- public constructor(outcome: CaptureOutcome, checkpoint: Checkpoint | null, spaceFree: number | null, spaceNeeded: number | null);
1493
+ public constructor(
1494
+ outcome: CaptureOutcome, checkpoint: Checkpoint | null, spaceFree: number | null, spaceNeeded: number | null, contentSize?: number | null,
1495
+ contentLimit?: number | null);
1386
1496
 
1387
1497
  /**
1388
1498
  * Reads a result from its wire form.
@@ -1395,7 +1505,9 @@ export declare class CaptureResult {
1395
1505
  * ```ts
1396
1506
  * import { CaptureResult } from "@noldova/checkpoints.protocol";
1397
1507
  *
1398
- * const result = CaptureResult.fromJson({ outcome: "FolderMissing", checkpoint: null, spaceFree: null, spaceNeeded: null });
1508
+ * const result = CaptureResult.fromJson({
1509
+ * outcome: "FolderMissing", checkpoint: null, spaceFree: null, spaceNeeded: null, contentSize: null, contentLimit: null
1510
+ * });
1399
1511
  * console.log(result.outcome.isCaptured);
1400
1512
  * ```
1401
1513
  */
@@ -1797,7 +1909,7 @@ export declare class CompareOutcome {
1797
1909
  public static readonly Compared: CompareOutcome;
1798
1910
 
1799
1911
  /**
1800
- * The comparison was with the folder now, and the folder's path is missing; a missing folder is never compared as empty.
1912
+ * The comparison was with the folder now, and the folder's path is missing, or the folder was deleted or renamed while it was walked; a missing folder is never compared as empty.
1801
1913
  */
1802
1914
  public static readonly FolderMissing: CompareOutcome;
1803
1915
 
@@ -2350,6 +2462,11 @@ export declare class KeepReason {
2350
2462
  */
2351
2463
  public static readonly LinkUnsupported: KeepReason;
2352
2464
 
2465
+ /**
2466
+ * The checkpoint didn't keep the file, since it was over 10 MiB when the checkpoint was taken.
2467
+ */
2468
+ public static readonly TooLarge: KeepReason;
2469
+
2353
2470
  /**
2354
2471
  * The reason's wire value.
2355
2472
  */
@@ -2527,6 +2644,13 @@ export declare class RestorePlan {
2527
2644
  */
2528
2645
  public readonly checkpoint: string;
2529
2646
 
2647
+ /**
2648
+ * The paths among the steps' that the restore writes as the earlier checkpoint had them, since they changed as the checkpoint's time
2649
+ * began, in their paths' byte order; such a file, if the person also changed it since the earlier checkpoint, comes back as it was
2650
+ * then rather than as the checkpoint's time found it.
2651
+ */
2652
+ public readonly earlierPaths: readonly string[];
2653
+
2530
2654
  /**
2531
2655
  * The paths the restore is limited to, as its preview asked, or `null` for the whole folder; the restore plans again with them. The
2532
2656
  * wire form always holds the paths, as `null` for the whole folder, and a wire form without them is refused.
@@ -2562,8 +2686,10 @@ export declare class RestorePlan {
2562
2686
  * @param spaceNeeded The free space in bytes the restore needs.
2563
2687
  * @param state The SHA-256 of the folder's state when planned.
2564
2688
  * @param paths The paths the restore is limited to, or `null` for the whole folder.
2689
+ * @param earlierPaths The steps' paths that the restore writes as the earlier checkpoint had them; none by default.
2565
2690
  * @throws {ProtocolException} Thrown synchronously when the id isn't a lowercase UUID version 7, a size isn't a whole number of 0 or
2566
- * more, the state isn't a lowercase SHA-256 in hexadecimal, or a path has an empty name, "." or "..", or holds "\" on any system.
2691
+ * more, the state isn't a lowercase SHA-256 in hexadecimal, a path has an empty name, "." or "..", or holds "\" on any system, or an
2692
+ * earlier path is no step's or is named twice.
2567
2693
  * @example
2568
2694
  * ```ts
2569
2695
  * import { KeepReason, KeptPath, RestorePlan } from "@noldova/checkpoints.protocol";
@@ -2576,7 +2702,7 @@ export declare class RestorePlan {
2576
2702
  */
2577
2703
  public constructor(
2578
2704
  checkpoint: string, steps: readonly RestoreStep[], stays: readonly KeptPath[], bytesToWrite: number, spaceNeeded: number, state: string,
2579
- paths: readonly string[] | null);
2705
+ paths: readonly string[] | null, earlierPaths?: readonly string[]);
2580
2706
 
2581
2707
  /**
2582
2708
  * Reads a plan from its wire form.
@@ -2591,7 +2717,9 @@ export declare class RestorePlan {
2591
2717
  *
2592
2718
  * const id = "01928f6e-7a3b-7c4d-8e5f-0a1b2c3d4e5f";
2593
2719
  * const state = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
2594
- * const plan = RestorePlan.fromJson({ checkpoint: id, steps: [], stays: [], bytesToWrite: 0, spaceNeeded: 0, state, paths: ["src"] });
2720
+ * const plan = RestorePlan.fromJson({
2721
+ * checkpoint: id, steps: [], stays: [], bytesToWrite: 0, spaceNeeded: 0, state, paths: ["src"], earlierPaths: []
2722
+ * });
2595
2723
  * console.log(plan.paths);
2596
2724
  * ```
2597
2725
  */
@@ -2627,7 +2755,7 @@ export declare class PreviewOutcome {
2627
2755
  public static readonly CheckpointMissing: PreviewOutcome;
2628
2756
 
2629
2757
  /**
2630
- * The folder's path is missing.
2758
+ * The folder's path is missing, or the folder was deleted or renamed while it was walked.
2631
2759
  */
2632
2760
  public static readonly FolderMissing: PreviewOutcome;
2633
2761
 
@@ -2835,7 +2963,7 @@ export declare class RestoreOutcome {
2835
2963
  public static readonly CheckpointMissing: RestoreOutcome;
2836
2964
 
2837
2965
  /**
2838
- * The folder's path is missing.
2966
+ * The folder's path is missing, or the folder was deleted or renamed while it was walked; nothing was restored.
2839
2967
  */
2840
2968
  public static readonly FolderMissing: RestoreOutcome;
2841
2969
 
@@ -2855,6 +2983,12 @@ export declare class RestoreOutcome {
2855
2983
  */
2856
2984
  public static readonly RolledBack: RestoreOutcome;
2857
2985
 
2986
+ /**
2987
+ * The checkpoint taken before the restore would write over 1 GiB of new and changed content, so it wasn't taken and nothing was
2988
+ * changed; the result gives that size and the limit.
2989
+ */
2990
+ public static readonly TooLarge: RestoreOutcome;
2991
+
2858
2992
  /**
2859
2993
  * Whether the restore finished.
2860
2994
  */
@@ -2943,7 +3077,7 @@ export declare class RestoreRequest {
2943
3077
  * const id = "01928f6e-7a3b-7c4d-8e5f-0a1b2c3d4e5f";
2944
3078
  * const state = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
2945
3079
  * const folderJson = { identity: "project-1", path: "/work/project" };
2946
- * const request = RestoreRequest.fromJson({ folder: folderJson, plan: { checkpoint: id, steps: [], stays: [], bytesToWrite: 0, spaceNeeded: 0, state, paths: null } });
3080
+ * const request = RestoreRequest.fromJson({ folder: folderJson, plan: { checkpoint: id, steps: [], stays: [], bytesToWrite: 0, spaceNeeded: 0, state, paths: null, earlierPaths: [] } });
2947
3081
  * console.log(request.plan.checkpoint);
2948
3082
  * ```
2949
3083
  */
@@ -2976,6 +3110,17 @@ export declare class RestoreResult {
2976
3110
  */
2977
3111
  public readonly before: Checkpoint | null;
2978
3112
 
3113
+ /**
3114
+ * The most new and changed content a checkpoint writes, 1 GiB, when the outcome is {@link RestoreOutcome.TooLarge}, or `null`.
3115
+ */
3116
+ public readonly contentLimit: number | null;
3117
+
3118
+ /**
3119
+ * The bytes of new and changed content the checkpoint taken before the restore would have written, when the outcome is
3120
+ * {@link RestoreOutcome.TooLarge}, or `null`.
3121
+ */
3122
+ public readonly contentSize: number | null;
3123
+
2979
3124
  /**
2980
3125
  * Whether the restore finished.
2981
3126
  */
@@ -2991,8 +3136,11 @@ export declare class RestoreResult {
2991
3136
  * @param outcome Whether the restore finished.
2992
3137
  * @param before The checkpoint taken before the restore, or `null`.
2993
3138
  * @param recovered The checkpoint that keeps what another program wrote, or `null`.
3139
+ * @param contentSize The bytes of content to write, when the outcome is {@link RestoreOutcome.TooLarge}, or `null`, the default.
3140
+ * @param contentLimit The content limit in bytes, when the outcome is {@link RestoreOutcome.TooLarge}, or `null`, the default.
2994
3141
  * @throws {ProtocolException} Thrown synchronously when the result holds a checkpoint before other than exactly when its outcome is
2995
- * {@link RestoreOutcome.Restored} or {@link RestoreOutcome.RolledBack}, or a recovered one when it isn't Restored.
3142
+ * {@link RestoreOutcome.Restored} or {@link RestoreOutcome.RolledBack}, a recovered one when it isn't Restored, or the content size
3143
+ * and its limit other than exactly when it is TooLarge, or a size isn't a whole number of bytes.
2996
3144
  * @example
2997
3145
  * ```ts
2998
3146
  * import { RestoreOutcome, RestoreResult } from "@noldova/checkpoints.protocol";
@@ -3001,7 +3149,7 @@ export declare class RestoreResult {
3001
3149
  * console.log(result.outcome.isRestored);
3002
3150
  * ```
3003
3151
  */
3004
- public constructor(outcome: RestoreOutcome, before: Checkpoint | null, recovered: Checkpoint | null);
3152
+ public constructor(outcome: RestoreOutcome, before: Checkpoint | null, recovered: Checkpoint | null, contentSize?: number | null, contentLimit?: number | null);
3005
3153
 
3006
3154
  /**
3007
3155
  * Reads a result from its wire form.
@@ -3014,7 +3162,7 @@ export declare class RestoreResult {
3014
3162
  * ```ts
3015
3163
  * import { RestoreResult } from "@noldova/checkpoints.protocol";
3016
3164
  *
3017
- * const result = RestoreResult.fromJson({ outcome: "HeldUp", before: null, recovered: null });
3165
+ * const result = RestoreResult.fromJson({ outcome: "HeldUp", before: null, recovered: null, contentSize: null, contentLimit: null });
3018
3166
  * console.log(result.before);
3019
3167
  * ```
3020
3168
  */
@@ -3105,7 +3253,7 @@ export declare class FolderUsage {
3105
3253
  public readonly path: string | null;
3106
3254
 
3107
3255
  /**
3108
- * @param identity The identity, 1 to 64 letters, digits and `-`.
3256
+ * @param identity The identity, 1 to 64 lower-case letters, digits and `-`.
3109
3257
  * @param path The folder's absolute path at its last capture, or `null`.
3110
3258
  * @param bytes The space used, a whole number of bytes, 0 or more.
3111
3259
  * @throws {ProtocolException} Thrown synchronously when the identity, the path or the size isn't valid.
@@ -3384,7 +3532,7 @@ export declare class RestoredEvent {
3384
3532
  public readonly identity: string;
3385
3533
 
3386
3534
  /**
3387
- * @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
3535
+ * @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
3388
3536
  * @param checkpoint The id of the checkpoint restored.
3389
3537
  * @param before The id of the checkpoint taken before the restore.
3390
3538
  * @throws {ProtocolException} Thrown synchronously when the identity or an id isn't one.
@@ -3460,7 +3608,7 @@ export declare class CapturePausedEvent {
3460
3608
  public readonly spaceNeeded: number;
3461
3609
 
3462
3610
  /**
3463
- * @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
3611
+ * @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
3464
3612
  * @param spaceFree The bytes free.
3465
3613
  * @param spaceNeeded The bytes needed.
3466
3614
  * @throws {ProtocolException} Thrown synchronously when the identity isn't one, or a size isn't a whole number of bytes.
@@ -3520,7 +3668,7 @@ export declare class CaptureResumedEvent {
3520
3668
  public readonly identity: string;
3521
3669
 
3522
3670
  /**
3523
- * @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
3671
+ * @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
3524
3672
  * @throws {ProtocolException} Thrown synchronously when the identity isn't one.
3525
3673
  * @example
3526
3674
  * ```ts
@@ -3583,7 +3731,7 @@ export declare class RestoreHeldUpEvent {
3583
3731
  public readonly paths: readonly string[];
3584
3732
 
3585
3733
  /**
3586
- * @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
3734
+ * @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
3587
3735
  * @param paths The paths the module couldn't change.
3588
3736
  * @throws {ProtocolException} Thrown synchronously when the identity isn't one, or a path isn't relative to the folder.
3589
3737
  * @example
package/src/api/index.js CHANGED
@@ -6,10 +6,12 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  export { CaptureCheckpointMismatchException } from "../exceptions/capture-checkpoint-mismatch.exception.js";
9
+ export { CaptureContentMismatchException } from "../exceptions/capture-content-mismatch.exception.js";
9
10
  export { CaptureSpaceMismatchException } from "../exceptions/capture-space-mismatch.exception.js";
10
11
  export { ChangeSidesMismatchException } from "../exceptions/change-sides-mismatch.exception.js";
11
12
  export { CompareChangesMismatchException } from "../exceptions/compare-changes-mismatch.exception.js";
12
13
  export { ContentTooLongException } from "../exceptions/content-too-long.exception.js";
14
+ export { EarlierPathsMismatchException } from "../exceptions/earlier-paths-mismatch.exception.js";
13
15
  export { InvalidBase64Exception } from "../exceptions/invalid-base64.exception.js";
14
16
  export { InvalidCheckpointIdException } from "../exceptions/invalid-checkpoint-id.exception.js";
15
17
  export { InvalidDateException } from "../exceptions/invalid-date.exception.js";
@@ -26,6 +28,7 @@ export { ProtocolException } from "../exceptions/protocol.exception.js";
26
28
  export { ReadCutMismatchException } from "../exceptions/read-cut-mismatch.exception.js";
27
29
  export { ReadOutcomeMismatchException } from "../exceptions/read-outcome-mismatch.exception.js";
28
30
  export { RestoreCheckpointsMismatchException } from "../exceptions/restore-checkpoints-mismatch.exception.js";
31
+ export { RestoreContentMismatchException } from "../exceptions/restore-content-mismatch.exception.js";
29
32
  export { SideSizeMismatchException } from "../exceptions/side-size-mismatch.exception.js";
30
33
  export { StepSidesMismatchException } from "../exceptions/step-sides-mismatch.exception.js";
31
34
  export { UnknownCaptureModeException } from "../exceptions/unknown-capture-mode.exception.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kCAAkC,EAAE,MAAM,wDAAwD,CAAC;AAC5G,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAClG,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,EAAE,+BAA+B,EAAE,MAAM,q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,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Resources } from "../resources.js";
9
+ import { ProtocolException } from "./protocol.exception.js";
10
+ export class CaptureContentMismatchException extends ProtocolException {
11
+ outcome;
12
+ constructor(outcome) {
13
+ super(Resources.formatContentMismatch(outcome.value));
14
+ this.outcome = outcome;
15
+ }
16
+ }
17
+ //# sourceMappingURL=capture-content-mismatch.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-content-mismatch.exception.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/exceptions/capture-content-mismatch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,+BAAgC,SAAQ,iBAAiB;IACpD,OAAO,CAAiB;IAExC,YAAmB,OAAuB;QACxC,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAEtD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Resources } from "../resources.js";
9
+ import { ProtocolException } from "./protocol.exception.js";
10
+ export class EarlierPathsMismatchException extends ProtocolException {
11
+ path;
12
+ constructor(path) {
13
+ super(Resources.formatEarlierPathsMismatch(path));
14
+ this.path = path;
15
+ }
16
+ }
17
+ //# sourceMappingURL=earlier-paths-mismatch.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"earlier-paths-mismatch.exception.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/exceptions/earlier-paths-mismatch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,6BAA8B,SAAQ,iBAAiB;IAClD,IAAI,CAAS;IAE7B,YAAmB,IAAY;QAC7B,KAAK,CAAC,SAAS,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC;QAElD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Resources } from "../resources.js";
9
+ import { ProtocolException } from "./protocol.exception.js";
10
+ export class RestoreContentMismatchException extends ProtocolException {
11
+ outcome;
12
+ constructor(outcome) {
13
+ super(Resources.formatRestoreContentMismatch(outcome.value));
14
+ this.outcome = outcome;
15
+ }
16
+ }
17
+ //# sourceMappingURL=restore-content-mismatch.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restore-content-mismatch.exception.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/exceptions/restore-content-mismatch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,+BAAgC,SAAQ,iBAAiB;IACpD,OAAO,CAAiB;IAExC,YAAmB,OAAuB;QACxC,KAAK,CAAC,SAAS,CAAC,4BAA4B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAE7D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
@@ -5,6 +5,7 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
+ import "@noldova/context.core";
8
9
  import { UnknownCaptureModeException } from "../exceptions/unknown-capture-mode.exception.js";
9
10
  export class CaptureMode {
10
11
  static EveryFile = new CaptureMode("EveryFile");
@@ -16,7 +17,7 @@ export class CaptureMode {
16
17
  }
17
18
  static fromJson(value) {
18
19
  const mode = CaptureMode.ALL.find(t => t.value === value);
19
- if (mode === undefined)
20
+ if (Object.isUndefined(mode))
20
21
  throw new UnknownCaptureModeException(String(value));
21
22
  return mode;
22
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"capture-mode.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/models/capture-mode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAE9F,MAAM,OAAO,WAAW;IACf,MAAM,CAAU,SAAS,GAAgB,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;IACtE,MAAM,CAAU,WAAW,GAAgB,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;IACzE,MAAM,CAAU,GAAG,GAA2B,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACvF,KAAK,CAAS;IAE9B,YAAoB,KAAa;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,KAAc;QACnC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QAC1D,IAAI,IAAI,KAAK,SAAS;YACpB,MAAM,IAAI,2BAA2B,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
1
+ {"version":3,"file":"capture-mode.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/models/capture-mode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAE9F,MAAM,OAAO,WAAW;IACf,MAAM,CAAU,SAAS,GAAgB,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;IACtE,MAAM,CAAU,WAAW,GAAgB,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;IACzE,MAAM,CAAU,GAAG,GAA2B,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACvF,KAAK,CAAS;IAE9B,YAAoB,KAAa;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,KAAc;QACnC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QAC1D,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;YAC1B,MAAM,IAAI,2BAA2B,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
@@ -5,13 +5,15 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
+ import "@noldova/context.core";
8
9
  import { UnknownCaptureOutcomeException } from "../exceptions/unknown-capture-outcome.exception.js";
9
10
  export class CaptureOutcome {
10
11
  static Captured = new CaptureOutcome("Captured", true);
11
12
  static FolderMissing = new CaptureOutcome("FolderMissing", false);
12
13
  static HeldUp = new CaptureOutcome("HeldUp", false);
13
14
  static LowDiskSpace = new CaptureOutcome("LowDiskSpace", false);
14
- static ALL = [CaptureOutcome.Captured, CaptureOutcome.FolderMissing, CaptureOutcome.HeldUp, CaptureOutcome.LowDiskSpace];
15
+ static TooLarge = new CaptureOutcome("TooLarge", false);
16
+ static ALL = [CaptureOutcome.Captured, CaptureOutcome.FolderMissing, CaptureOutcome.HeldUp, CaptureOutcome.LowDiskSpace, CaptureOutcome.TooLarge];
15
17
  isCaptured;
16
18
  value;
17
19
  constructor(value, isCaptured) {
@@ -20,7 +22,7 @@ export class CaptureOutcome {
20
22
  }
21
23
  static fromJson(value) {
22
24
  const outcome = CaptureOutcome.ALL.find(t => t.value === value);
23
- if (outcome === undefined)
25
+ if (Object.isUndefined(outcome))
24
26
  throw new UnknownCaptureOutcomeException(String(value));
25
27
  return outcome;
26
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"capture-outcome.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/models/capture-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AAEpG,MAAM,OAAO,cAAc;IAClB,MAAM,CAAU,QAAQ,GAAmB,IAAI,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAChF,MAAM,CAAU,aAAa,GAAmB,IAAI,cAAc,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAC3F,MAAM,CAAU,MAAM,GAAmB,IAAI,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC7E,MAAM,CAAU,YAAY,GAAmB,IAAI,cAAc,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACxF,MAAM,CAAU,GAAG,GAA8B,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,aAAa,EAAE,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACrJ,UAAU,CAAU;IACpB,KAAK,CAAS;IAE9B,YAAoB,KAAa,EAAE,UAAmB;QACpD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,KAAc;QACnC,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CA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