@yu_robotics/remote-cli 1.6.252 → 1.6.255

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 (72) hide show
  1. package/dist/client/WebSocketClient.d.ts +0 -3
  2. package/dist/client/WebSocketClient.d.ts.map +1 -1
  3. package/dist/client/WebSocketClient.js +1 -3
  4. package/dist/client/WebSocketClient.js.map +1 -1
  5. package/dist/commands/start.d.ts +0 -5
  6. package/dist/commands/start.d.ts.map +1 -1
  7. package/dist/commands/start.js +0 -25
  8. package/dist/commands/start.js.map +1 -1
  9. package/dist/executor/AgyExecutor.js +3 -3
  10. package/dist/executor/AgyExecutor.js.map +1 -1
  11. package/dist/executor/IExecutor.d.ts +1 -1
  12. package/dist/executor/IExecutor.d.ts.map +1 -1
  13. package/dist/index.js +0 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/maintenance/release-notes.json +1 -1
  16. package/dist/scheduling/ScheduleService.d.ts +3 -15
  17. package/dist/scheduling/ScheduleService.d.ts.map +1 -1
  18. package/dist/scheduling/ScheduleService.js +58 -93
  19. package/dist/scheduling/ScheduleService.js.map +1 -1
  20. package/native/prebuilds/darwin-arm64/managed_native.node +0 -0
  21. package/native/prebuilds/darwin-arm64/manifest.json +1 -1
  22. package/native/prebuilds/darwin-x64/managed_native.node +0 -0
  23. package/native/prebuilds/darwin-x64/manifest.json +1 -1
  24. package/native/prebuilds/win32-arm64/managed_native.node +0 -0
  25. package/native/prebuilds/win32-arm64/manifest.json +1 -1
  26. package/native/prebuilds/win32-x64/managed_native.node +0 -0
  27. package/native/prebuilds/win32-x64/manifest.json +1 -1
  28. package/package.json +1 -1
  29. package/dist/service/SessionHostSupervisor.d.ts +0 -63
  30. package/dist/service/SessionHostSupervisor.d.ts.map +0 -1
  31. package/dist/service/SessionHostSupervisor.js +0 -323
  32. package/dist/service/SessionHostSupervisor.js.map +0 -1
  33. package/dist/sessionHost/HostClient.d.ts +0 -49
  34. package/dist/sessionHost/HostClient.d.ts.map +0 -1
  35. package/dist/sessionHost/HostClient.js +0 -101
  36. package/dist/sessionHost/HostClient.js.map +0 -1
  37. package/dist/sessionHost/HostProtocol.d.ts +0 -65
  38. package/dist/sessionHost/HostProtocol.d.ts.map +0 -1
  39. package/dist/sessionHost/HostProtocol.js +0 -78
  40. package/dist/sessionHost/HostProtocol.js.map +0 -1
  41. package/dist/sessionHost/HostServer.d.ts +0 -52
  42. package/dist/sessionHost/HostServer.d.ts.map +0 -1
  43. package/dist/sessionHost/HostServer.js +0 -413
  44. package/dist/sessionHost/HostServer.js.map +0 -1
  45. package/dist/sessionHost/HostStore.d.ts +0 -43
  46. package/dist/sessionHost/HostStore.d.ts.map +0 -1
  47. package/dist/sessionHost/HostStore.js +0 -206
  48. package/dist/sessionHost/HostStore.js.map +0 -1
  49. package/dist/sessionHost/RetainedFrontend.d.ts +0 -63
  50. package/dist/sessionHost/RetainedFrontend.d.ts.map +0 -1
  51. package/dist/sessionHost/RetainedFrontend.js +0 -244
  52. package/dist/sessionHost/RetainedFrontend.js.map +0 -1
  53. package/dist/sessionHost/RetainedHostLauncher.d.ts +0 -25
  54. package/dist/sessionHost/RetainedHostLauncher.d.ts.map +0 -1
  55. package/dist/sessionHost/RetainedHostLauncher.js +0 -132
  56. package/dist/sessionHost/RetainedHostLauncher.js.map +0 -1
  57. package/dist/sessionHost/RetainedRuntime.d.ts +0 -62
  58. package/dist/sessionHost/RetainedRuntime.d.ts.map +0 -1
  59. package/dist/sessionHost/RetainedRuntime.js +0 -478
  60. package/dist/sessionHost/RetainedRuntime.js.map +0 -1
  61. package/dist/sessionHost/RuntimeJournal.d.ts +0 -47
  62. package/dist/sessionHost/RuntimeJournal.d.ts.map +0 -1
  63. package/dist/sessionHost/RuntimeJournal.js +0 -103
  64. package/dist/sessionHost/RuntimeJournal.js.map +0 -1
  65. package/dist/sessionHost/entry.d.ts +0 -13
  66. package/dist/sessionHost/entry.d.ts.map +0 -1
  67. package/dist/sessionHost/entry.js +0 -107
  68. package/dist/sessionHost/entry.js.map +0 -1
  69. package/dist/update/PinnedHostBundle.d.ts +0 -49
  70. package/dist/update/PinnedHostBundle.d.ts.map +0 -1
  71. package/dist/update/PinnedHostBundle.js +0 -309
  72. package/dist/update/PinnedHostBundle.js.map +0 -1
@@ -108,8 +108,6 @@ export declare class ScheduleService {
108
108
  private suspending;
109
109
  private handoffUnresolved;
110
110
  private suspension?;
111
- private hostRetirement?;
112
- private hostsRetired;
113
111
  constructor(options: ScheduleServiceOptions);
114
112
  initialize(): Promise<void>;
115
113
  /** Sequential startup/reconnect reconciliation. Never drives the native schedule clock. */
@@ -122,6 +120,9 @@ export declare class ScheduleService {
122
120
  private blockRecovery;
123
121
  create(owner: ScheduleOwner, input: NativeScheduleInput): Promise<ScheduleRecord>;
124
122
  private createSchedule;
123
+ /** Called under the catalog serial queue, never through output-erasing purge.
124
+ * A refusal is proof about this fresh attempt, not historical native absence. */
125
+ private compactRefusedCreation;
125
126
  /** Catalog lookup only; this does not probe or recreate native jobs. */
126
127
  list(owner: ScheduleOwner): Promise<ScheduleRecord[]>;
127
128
  /** Operational deletion ledger, separate from user history and never recoverable. */
@@ -145,19 +146,6 @@ export declare class ScheduleService {
145
146
  hasPendingResults(): boolean;
146
147
  /** Includes terminal jobs whose native process exit is still unconfirmed. */
147
148
  hasActiveSchedules(threadId?: string): boolean;
148
- /** Admission to explicit process retirement, NOT proof of native exit or queue
149
- * reconstruction. Only the original live handles can supply deletion receipts.
150
- */
151
- canRetireDrainedHosts(): boolean;
152
- /** Synchronous fence: no asynchronous gap between checking and revoking new
153
- * schedule operations. Retain exact pre-exit deletion receipts for finalization.
154
- */
155
- beginDrainedHostRetirement(): void;
156
- /** Called only after the owner joined its original executor groups and drained
157
- * native callback ingestion. Never calls stop/cancel/releaseForRestart on a
158
- * provider. Failure preserves the same retirement fence, handles and catalog.
159
- */
160
- finishDrainedHostRetirement(): Promise<void>;
161
149
  /** Card eligibility includes retryable cleanup even for a terminal catalog record. */
162
150
  canCancel(owner: ScheduleOwner, id: string): boolean;
163
151
  /** Newly observed cleanup facts never supply historical recovery proof. The optional
@@ -1 +1 @@
1
- {"version":3,"file":"ScheduleService.d.ts","sourceRoot":"","sources":["../../src/scheduling/ScheduleService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,sBAAsB,EAAsB,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAO/I,OAAO,KAAK,EAA6C,mBAAmB,EAAE,sBAAsB,EAClG,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAA4C,MAAM,SAAS,CAAC;AAI7G,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAY7D,MAAM,MAAM,sBAAsB,GAAG;IAAE,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,IAAI,CAAA;CAAE,CAAC;AACzG,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,kBAAkB,GAC7F,wBAAwB,GAAG,qBAAqB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AACzF;;6DAE6D;AAC7D,MAAM,MAAM,qBAAqB,GAC7B;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,SAAS,IAAI,OAAO,CAAA;CAAE,GAC5C;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1E,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,+FAA+F;IAC/F,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,uBAAuB,EAAE,sBAAsB,EAAE,CAAC;IAClD,wFAAwF;IACxF,mBAAmB,C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IAAI,OAAO;IAU/B,kGAAkG;IAClG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAkGlC,0FAA0F;IAC1F,uBAAuB,IAAI,OAAO;IAKlC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAiEV,YAAY;YAoCZ,OAAO;IA2GrB,OAAO,CAAC,iBAAiB;IAwCzB,OAAO,CAAC,IAAI;IAoCZ,OAAO,CAAC,eAAe;YAYT,aAAa;IAS3B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,KAAK;IASb,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,MAAM;YAMA,WAAW;IAgCzB,OAAO,CAAC,IAAI;YA+GE,OAAO;CA4BtB"}
@@ -144,8 +144,6 @@ class ScheduleService {
144
144
  suspending = false;
145
145
  handoffUnresolved = false;
146
146
  suspension;
147
- hostRetirement;
148
- hostsRetired = false;
149
147
  constructor(options) {
150
148
  this.options = { ...options };
151
149
  this.now = options.now ?? Date.now;
@@ -176,6 +174,10 @@ class ScheduleService {
176
174
  const data = await this.readCatalog();
177
175
  if (data !== undefined)
178
176
  this.load(data);
177
+ // Inspect the loaded outbox before ordinary startup pruning. Missing
178
+ // delivery ownership must not turn a refused row into an absence claim.
179
+ for (const record of [...this.records.values()])
180
+ await this.compactRefusedCreation(record);
179
181
  let changed = false;
180
182
  for (const record of this.records.values()) {
181
183
  if (['completed', 'cancelled', 'failed'].includes(record.state)) {
@@ -466,7 +468,19 @@ class ScheduleService {
466
468
  });
467
469
  }
468
470
  create(owner, input) {
469
- return this.operation(this.recordOperation(input.id, this.createSchedule(owner, input)));
471
+ const creation = this.recordOperation(input.id, this.createSchedule(owner, input));
472
+ return this.operation(creation.catch(async (error) => {
473
+ if (error instanceof types_1.NativeScheduleNotAdmittedError) {
474
+ // The create operation has settled. Concurrent cancel/purge operations
475
+ // retain their own record lease and must finish before any compaction.
476
+ await this.serial(async () => {
477
+ const record = this.records.get(input.id);
478
+ if (record && sameOwner(record, owner))
479
+ await this.compactRefusedCreation(record);
480
+ }).catch(() => { }); // Keep the original failure receipt; persistence faults remain fenced.
481
+ }
482
+ throw error;
483
+ }));
470
484
  }
471
485
  async createSchedule(owner, input) {
472
486
  this.checkReady();
@@ -526,6 +540,8 @@ class ScheduleService {
526
540
  return Promise.reject(new Error('Native rebound owner retired.'));
527
541
  return;
528
542
  }
543
+ if (event.type === 'started' || event.type === 'completed' || event.type === 'skipped')
544
+ runtime.observedOccurrence = true;
529
545
  const task = this.onEvent(nativeInput.id, structuredClone(event));
530
546
  this.track(task);
531
547
  return task;
@@ -568,7 +584,9 @@ class ScheduleService {
568
584
  record.state = 'failed';
569
585
  record.error = errorText(error);
570
586
  }
571
- if (error instanceof types_1.NativeScheduleNotAdmittedError && !runtime.handle && !runtime.running.size && !runtime.completed.size) {
587
+ if (error instanceof types_1.NativeScheduleNotAdmittedError && !runtime.handle && !runtime.observedOccurrence
588
+ && !record.nativeId && !runtime.running.size && !runtime.completed.size
589
+ && !record.completedOccurrences?.length && !record.skippedOccurrences?.length) {
572
590
  record.creationRefused = true;
573
591
  }
574
592
  if (!this.fault)
@@ -581,6 +599,35 @@ class ScheduleService {
581
599
  throw error;
582
600
  }
583
601
  }
602
+ /** Called under the catalog serial queue, never through output-erasing purge.
603
+ * A refusal is proof about this fresh attempt, not historical native absence. */
604
+ async compactRefusedCreation(record) {
605
+ const id = record.id, runtime = this.runtimes.get(id);
606
+ if (record.state !== 'failed' || record.creationRefused !== true || record.nativeId !== undefined
607
+ || record.cancelRequested || record.cleanupConfirmed || record.completedOccurrences?.length || record.skippedOccurrences?.length
608
+ || this.records.get(id) !== record || this.cleanup.has(id) || this.purged.has(id)
609
+ || this.fault || this.closing || this.suspending || this.recoveryRun || this.refreshes
610
+ || this.recordOperations.has(id) || this.retainedCancellations.has(id) || this.purges.has(id)
611
+ || this.delivering.has(id) || [...this.pending.values()].some(item => item.scheduleId === id)
612
+ || this.options.isNativeMutationPending?.(ownerOf(record))
613
+ || runtime && (!runtime.stopped || runtime.handle || runtime.observedOccurrence || runtime.running.size || runtime.completed.size
614
+ || runtime.heldDeliveries.size || runtime.cancelling || runtime.cancelPromise || runtime.stopPromise
615
+ || runtime.recoveryAbort || runtime.releasing || runtime.releasePromise || runtime.releaseAdmission)
616
+ || this.purged.size >= MAX_PURGED_IDS)
617
+ return;
618
+ this.purged.set(id, ownerOf(record));
619
+ this.records.delete(id);
620
+ try {
621
+ await this.persist();
622
+ }
623
+ catch (error) {
624
+ this.records.set(id, record);
625
+ this.purged.delete(id);
626
+ throw error;
627
+ }
628
+ if (runtime)
629
+ this.runtimes.delete(id);
630
+ }
584
631
  /** Catalog lookup only; this does not probe or recreate native jobs. */
585
632
  async list(owner) {
586
633
  this.checkReady();
@@ -924,80 +971,6 @@ class ScheduleService {
924
971
  return [...this.records.values()].some(record => (!threadId || record.threadId === threadId)
925
972
  && (LIVE.has(record.state) || recoveryOwnsWork(record) || (this.runtimes.has(record.id) && !this.runtimes.get(record.id).stopped)));
926
973
  }
927
- /** Admission to explicit process retirement, NOT proof of native exit or queue
928
- * reconstruction. Only the original live handles can supply deletion receipts.
929
- */
930
- canRetireDrainedHosts() {
931
- if (!this.initialized || this.closing || this.fault || this.hostRetirement || this.suspending
932
- || this.handoffUnresolved || this.recoveryRun || this.operations.size || this.tasks.size
933
- || this.recordOperations.size || this.pending.size || this.delivering.size || this.refreshes
934
- || this.retainedCancellations.size || this.purges.size || this.cleanup.size)
935
- return false;
936
- try {
937
- this.catalogGate?.verify();
938
- return [...this.records.values()].every(record => {
939
- if (record.error || record.recovery || !this.current(record) || this.options.isNativeMutationPending?.(ownerOf(record)))
940
- return false;
941
- const runtime = this.runtimes.get(record.id);
942
- if (!runtime)
943
- return record.state === 'cancelled' && record.cancelRequested === true && record.cleanupConfirmed === true;
944
- if (!runtime.handle || runtime.running.size || runtime.heldDeliveries.size || runtime.cancelling || runtime.releasing)
945
- return false;
946
- if (record.state === 'completed')
947
- return record.rule.kind === 'once' && runtime.completed.size > 0;
948
- return record.state === 'cancelled' && record.cancelRequested === true && runtime.removalConfirmed === true
949
- && (runtime.handle.nativeDefinitionAbsent === true || runtime.stopped && record.cleanupConfirmed === true);
950
- });
951
- }
952
- catch {
953
- return false;
954
- }
955
- }
956
- /** Synchronous fence: no asynchronous gap between checking and revoking new
957
- * schedule operations. Retain exact pre-exit deletion receipts for finalization.
958
- */
959
- beginDrainedHostRetirement() {
960
- if (this.hostRetirement)
961
- return;
962
- if (!this.canRetireDrainedHosts())
963
- throw new Error('Native schedules are not drained for explicit host retirement.');
964
- this.hostRetirement = new Map([...this.runtimes].map(([id, runtime]) => [id,
965
- { runtime, cancelled: this.records.get(id)?.cancelRequested === true && runtime.removalConfirmed === true }]));
966
- }
967
- /** Called only after the owner joined its original executor groups and drained
968
- * native callback ingestion. Never calls stop/cancel/releaseForRestart on a
969
- * provider. Failure preserves the same retirement fence, handles and catalog.
970
- */
971
- async finishDrainedHostRetirement() {
972
- if (!this.hostRetirement)
973
- throw new Error('Explicit host retirement was not admitted.');
974
- while (this.tasks.size)
975
- await Promise.allSettled([...this.tasks]);
976
- await this.deliveryTail;
977
- await this.serial(async () => {
978
- if (this.fault)
979
- throw this.fault;
980
- if (this.pending.size || this.operations.size || this.recordOperations.size || this.delivering.size)
981
- throw new Error('Native retirement still owns pending work or output.');
982
- for (const [id, proof] of this.hostRetirement) {
983
- const runtime = this.runtimes.get(id), record = this.records.get(id);
984
- if (runtime !== proof.runtime || !record || runtime.running.size || runtime.heldDeliveries.size
985
- || !(runtime.stopped || runtime.handle?.retirementConfirmed === true))
986
- throw new Error('Exact native host retirement is unconfirmed.');
987
- }
988
- for (const [id, proof] of this.hostRetirement) {
989
- proof.runtime.stopped = true;
990
- proof.runtime.releaseAdmission?.();
991
- proof.runtime.releaseAdmission = undefined;
992
- // AGY invalidates its inventory view after exit. Preserve the exact
993
- // deletion receipt captured BEFORE exit rather than querying a new host.
994
- if (proof.cancelled)
995
- this.records.get(id).cleanupConfirmed = true;
996
- }
997
- await this.persist();
998
- this.hostsRetired = true;
999
- });
1000
- }
1001
974
  /** Card eligibility includes retryable cleanup even for a terminal catalog record. */
1002
975
  canCancel(owner, id) {
1003
976
  this.checkReady();
@@ -1231,7 +1204,7 @@ class ScheduleService {
1231
1204
  }
1232
1205
  /** Snapshot eligibility is only admission to a handoff, never permission to install. */
1233
1206
  canSuspendForRestart() {
1234
- if (!this.initialized || this.closing || this.hostRetirement || this.fault || this.suspending || this.recoveryRun || this.operations.size || this.pending.size)
1207
+ if (!this.initialized || this.closing || this.fault || this.suspending || this.recoveryRun || this.operations.size || this.pending.size)
1235
1208
  return false;
1236
1209
  return [...this.records.values()].filter(record => LIVE.has(record.state) || recoveryOwnsWork(record)
1237
1210
  || !!this.runtimes.get(record.id) && !this.runtimes.get(record.id).stopped).every(record => {
@@ -1374,8 +1347,6 @@ class ScheduleService {
1374
1347
  && (!(record.state === 'failed' && record.recovery.futureOnly) || !!this.runtimes.get(record.id) && !this.runtimes.get(record.id).stopped));
1375
1348
  }
1376
1349
  destroy() {
1377
- if (this.hostRetirement && !this.hostsRetired)
1378
- return Promise.reject(new Error('Explicit native host retirement remains unresolved.'));
1379
1350
  if (this.destruction)
1380
1351
  return this.destruction;
1381
1352
  const preserve = !this.closing && this.hasActiveSchedules() && this.canSuspendForRestart();
@@ -1518,10 +1489,6 @@ class ScheduleService {
1518
1489
  if (this.fault)
1519
1490
  throw this.fault;
1520
1491
  const record = this.records.get(id);
1521
- if (this.hostRetirement && (event.type === 'started' || event.type === 'rebound'
1522
- || (event.type === 'completed' || event.type === 'skipped') && !runtime.completed.has(event.occurrenceId))) {
1523
- throw new Error('Unexpected native work during explicit retirement; retain the native event journal.');
1524
- }
1525
1492
  if (this.suspending && event.type === 'stopped') {
1526
1493
  if (event.exitConfirmed === false)
1527
1494
  throw new Error('Native handoff exit unconfirmed.');
@@ -1783,7 +1750,7 @@ class ScheduleService {
1783
1750
  }
1784
1751
  canAdmitOccurrence(id, runtime) {
1785
1752
  const record = this.records.get(id);
1786
- return !!record && this.runtimes.get(id) === runtime && !this.closing && !this.hostRetirement && !this.fault
1753
+ return !!record && this.runtimes.get(id) === runtime && !this.closing && !this.fault
1787
1754
  && !runtime.stopped && !runtime.cancelling && !runtime.recoveryAbort?.signal.aborted && !record.cancelRequested
1788
1755
  && LIVE.has(record.state) && this.current(record);
1789
1756
  }
@@ -1797,9 +1764,8 @@ class ScheduleService {
1797
1764
  void task.catch(error => {
1798
1765
  // Persistence/protocol failures fail closed and stop native producers.
1799
1766
  this.fault ??= error instanceof Error ? error : new Error('Schedule service failed.');
1800
- if (!this.hostRetirement)
1801
- for (const [id, runtime] of this.runtimes)
1802
- void this.stop(id, runtime).catch(() => { });
1767
+ for (const [id, runtime] of this.runtimes)
1768
+ void this.stop(id, runtime).catch(() => { });
1803
1769
  }).finally(() => this.tasks.delete(task));
1804
1770
  }
1805
1771
  operation(task) {
@@ -1839,7 +1805,7 @@ class ScheduleService {
1839
1805
  checkReady() {
1840
1806
  if (this.fault)
1841
1807
  throw this.fault;
1842
- if (!this.initialized || this.closing || this.hostRetirement || this.suspending)
1808
+ if (!this.initialized || this.closing || this.suspending)
1843
1809
  throw new Error('Schedule service is not initialized or is closed.');
1844
1810
  }
1845
1811
  serial(operation) {
@@ -2073,9 +2039,8 @@ class ScheduleService {
2073
2039
  }
2074
2040
  catch (error) {
2075
2041
  this.fault = error instanceof Error ? error : new Error('Schedule catalog write failed.');
2076
- if (!this.hostRetirement)
2077
- for (const [id, runtime] of this.runtimes)
2078
- void this.stop(id, runtime).catch(() => { });
2042
+ for (const [id, runtime] of this.runtimes)
2043
+ void this.stop(id, runtime).catch(() => { });
2079
2044
  throw this.fault;
2080
2045
  }
2081
2046
  finally {