@rotorsoft/act 1.37.4 → 1.37.5

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.cjs CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
 
42
42
 
43
- var _chunkUPKDCTS2cjs = require('./chunk-UPKDCTS2.cjs');
43
+ var _chunkPRDX3HP6cjs = require('./chunk-PRDX3HP6.cjs');
44
44
 
45
45
 
46
46
 
@@ -73,24 +73,25 @@ var _chunkUPKDCTS2cjs = require('./chunk-UPKDCTS2.cjs');
73
73
 
74
74
 
75
75
 
76
- var _chunkPN5GNW6Ecjs = require('./chunk-PN5GNW6E.cjs');
76
+
77
+ var _chunkH6KVPVP4cjs = require('./chunk-H6KVPVP4.cjs');
77
78
 
78
79
  // src/signals.ts
79
80
  process.once("SIGINT", async (arg) => {
80
- _chunkUPKDCTS2cjs.log.call(void 0, ).info(arg, "SIGINT");
81
- await _chunkUPKDCTS2cjs.disposeAndExit.call(void 0, "EXIT");
81
+ _chunkPRDX3HP6cjs.log.call(void 0, ).info(arg, "SIGINT");
82
+ await _chunkPRDX3HP6cjs.disposeAndExit.call(void 0, "EXIT");
82
83
  });
83
84
  process.once("SIGTERM", async (arg) => {
84
- _chunkUPKDCTS2cjs.log.call(void 0, ).info(arg, "SIGTERM");
85
- await _chunkUPKDCTS2cjs.disposeAndExit.call(void 0, "EXIT");
85
+ _chunkPRDX3HP6cjs.log.call(void 0, ).info(arg, "SIGTERM");
86
+ await _chunkPRDX3HP6cjs.disposeAndExit.call(void 0, "EXIT");
86
87
  });
87
88
  process.once("uncaughtException", async (arg) => {
88
- _chunkUPKDCTS2cjs.log.call(void 0, ).error(arg, "Uncaught Exception");
89
- await _chunkUPKDCTS2cjs.disposeAndExit.call(void 0, "ERROR");
89
+ _chunkPRDX3HP6cjs.log.call(void 0, ).error(arg, "Uncaught Exception");
90
+ await _chunkPRDX3HP6cjs.disposeAndExit.call(void 0, "ERROR");
90
91
  });
91
92
  process.once("unhandledRejection", async (arg) => {
92
- _chunkUPKDCTS2cjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
93
- await _chunkUPKDCTS2cjs.disposeAndExit.call(void 0, "ERROR");
93
+ _chunkPRDX3HP6cjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
94
+ await _chunkPRDX3HP6cjs.disposeAndExit.call(void 0, "ERROR");
94
95
  });
95
96
 
96
97
  // src/act.ts
@@ -198,7 +199,7 @@ async function* audit(deps, categories, options = {}) {
198
199
  if (need_stats) {
199
200
  const stats = await deps.store().query_stats(
200
201
  {},
201
- { count: true, names: true, exclude: [_chunkPN5GNW6Ecjs.SNAP_EVENT] }
202
+ { count: true, names: true, exclude: [_chunkH6KVPVP4cjs.SNAP_EVENT] }
202
203
  );
203
204
  for (const [stream, s] of stats) {
204
205
  for (const p of passes) _optionalChain([p, 'access', _4 => _4.on_stat, 'optionalCall', _5 => _5(stream, s)]);
@@ -280,7 +281,7 @@ var make_schema_pass = (deps) => {
280
281
  return;
281
282
  }
282
283
  const schema = state2.events[name];
283
- const sensitive2 = _chunkPN5GNW6Ecjs.pii_fields.call(void 0, schema);
284
+ const sensitive2 = _chunkH6KVPVP4cjs.pii_fields.call(void 0, schema);
284
285
  let parse_schema = schema;
285
286
  if (sensitive2.length > 0) {
286
287
  const omitter = schema.omit;
@@ -414,7 +415,7 @@ var make_restart_candidate_pass = (deps, options) => {
414
415
  {
415
416
  stream,
416
417
  stream_exact: true,
417
- names: [_chunkPN5GNW6Ecjs.SNAP_EVENT],
418
+ names: [_chunkH6KVPVP4cjs.SNAP_EVENT],
418
419
  with_snaps: true
419
420
  }
420
421
  );
@@ -841,7 +842,7 @@ async function run_close_cycle(targets, deps) {
841
842
  deps,
842
843
  () => run_full_closes(full, target_map, deps, skipped)
843
844
  );
844
- const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT).map(([stream]) => stream);
845
+ const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkH6KVPVP4cjs.TOMBSTONE_EVENT).map(([stream]) => stream);
845
846
  if (retired.length) _optionalChain([deps, 'access', _42 => _42.forget_subscribed, 'optionalCall', _43 => _43(retired)]);
846
847
  for (const [stream, entry] of windowed_result) truncated.set(stream, entry);
847
848
  return { truncated, skipped };
@@ -923,7 +924,7 @@ async function run_windowed_closes(windowed, deps, skipped) {
923
924
  if (!await windowed_prune_pending(t.stream, t.before, max_id))
924
925
  return void 0;
925
926
  if (t.archive) await t.archive();
926
- const result = await _chunkUPKDCTS2cjs.store.call(void 0, ).truncate([
927
+ const result = await _chunkPRDX3HP6cjs.store.call(void 0, ).truncate([
927
928
  { stream: t.stream, before: t.before, max_id }
928
929
  ]);
929
930
  return result.get(t.stream);
@@ -936,10 +937,10 @@ async function run_windowed_closes(windowed, deps, skipped) {
936
937
  async function windowed_prune_pending(stream, before, max_id) {
937
938
  let boundary_id;
938
939
  let min_id;
939
- await _chunkUPKDCTS2cjs.store.call(void 0, ).query(
940
+ await _chunkPRDX3HP6cjs.store.call(void 0, ).query(
940
941
  (event) => {
941
942
  if (min_id === void 0 || event.id < min_id) min_id = event.id;
942
- if (event.name === _chunkPN5GNW6Ecjs.SNAP_EVENT && event.created < before && (max_id === void 0 || event.id <= max_id) && (boundary_id === void 0 || event.id > boundary_id))
943
+ if (event.name === _chunkH6KVPVP4cjs.SNAP_EVENT && event.created < before && (max_id === void 0 || event.id <= max_id) && (boundary_id === void 0 || event.id > boundary_id))
943
944
  boundary_id = event.id;
944
945
  },
945
946
  { stream, stream_exact: true, with_snaps: true, after: -1 }
@@ -950,7 +951,7 @@ async function probe_min_watermarks(streams, page_size, checkpoint) {
950
951
  const min_at = /* @__PURE__ */ new Map();
951
952
  const matches = source_matcher();
952
953
  await walk_streams(
953
- _chunkUPKDCTS2cjs.store.call(void 0, ),
954
+ _chunkPRDX3HP6cjs.store.call(void 0, ),
954
955
  (position) => {
955
956
  const pending = position.correlated_at === void 0 || position.at < position.correlated_at;
956
957
  const cap = pending ? position.at : Math.max(position.at, checkpoint);
@@ -978,17 +979,17 @@ function source_matcher() {
978
979
  };
979
980
  }
980
981
  async function scan_stream_heads(streams) {
981
- const stats = await _chunkUPKDCTS2cjs.store.call(void 0, ).query_stats(streams, {
982
- exclude: [_chunkPN5GNW6Ecjs.SNAP_EVENT]
982
+ const stats = await _chunkPRDX3HP6cjs.store.call(void 0, ).query_stats(streams, {
983
+ exclude: [_chunkH6KVPVP4cjs.SNAP_EVENT]
983
984
  });
984
- const domain_heads = await _chunkUPKDCTS2cjs.store.call(void 0, ).query_stats(streams, {
985
- exclude: [_chunkPN5GNW6Ecjs.SNAP_EVENT, _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT]
985
+ const domain_heads = await _chunkPRDX3HP6cjs.store.call(void 0, ).query_stats(streams, {
986
+ exclude: [_chunkH6KVPVP4cjs.SNAP_EVENT, _chunkH6KVPVP4cjs.TOMBSTONE_EVENT]
986
987
  });
987
- const true_heads = await _chunkUPKDCTS2cjs.store.call(void 0, ).query_stats(streams, {});
988
+ const true_heads = await _chunkPRDX3HP6cjs.store.call(void 0, ).query_stats(streams, {});
988
989
  const out = /* @__PURE__ */ new Map();
989
990
  for (const [stream, { head }] of domain_heads) {
990
991
  const marker_head = _optionalChain([stats, 'access', _45 => _45.get, 'call', _46 => _46(stream), 'optionalAccess', _47 => _47.head]);
991
- const interrupted = _optionalChain([marker_head, 'optionalAccess', _48 => _48.name]) === _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT;
992
+ const interrupted = _optionalChain([marker_head, 'optionalAccess', _48 => _48.name]) === _chunkH6KVPVP4cjs.TOMBSTONE_EVENT;
992
993
  out.set(stream, {
993
994
  max_id: head.id,
994
995
  version: true_heads.get(stream).head.version,
@@ -1012,7 +1013,7 @@ async function partition_by_safety(stream_info, reactive, skipped, page_size, ca
1012
1013
  const matches = source_matcher();
1013
1014
  const targets = [...stream_info.keys()];
1014
1015
  await walk_streams(
1015
- _chunkUPKDCTS2cjs.store.call(void 0, ),
1016
+ _chunkPRDX3HP6cjs.store.call(void 0, ),
1016
1017
  (position) => {
1017
1018
  const has_work = position.correlated_at !== void 0 && position.at < position.correlated_at;
1018
1019
  if (!has_work) return;
@@ -1078,7 +1079,7 @@ async function run_archive_callbacks(guarded, target_map) {
1078
1079
  }
1079
1080
  }
1080
1081
  async function heads_still_guarded(guarded, guard_events, skipped) {
1081
- const heads = await _chunkUPKDCTS2cjs.store.call(void 0, ).query_stats(guarded, {});
1082
+ const heads = await _chunkPRDX3HP6cjs.store.call(void 0, ).query_stats(guarded, {});
1082
1083
  return guarded.filter((stream) => {
1083
1084
  if (_optionalChain([heads, 'access', _55 => _55.get, 'call', _56 => _56(stream), 'optionalAccess', _57 => _57.head, 'access', _58 => _58.id]) === guard_events.get(stream).id)
1084
1085
  return true;
@@ -1096,18 +1097,18 @@ async function truncate_and_warm_cache(guarded, seed_states, guard_events, corre
1096
1097
  meta: {
1097
1098
  correlation,
1098
1099
  causation: {
1099
- event: { id: guard.id, name: _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT, stream: guard.stream }
1100
+ event: { id: guard.id, name: _chunkH6KVPVP4cjs.TOMBSTONE_EVENT, stream: guard.stream }
1100
1101
  }
1101
1102
  }
1102
1103
  };
1103
1104
  });
1104
- const truncated = await _chunkUPKDCTS2cjs.store.call(void 0, ).truncate(trunc_targets);
1105
+ const truncated = await _chunkPRDX3HP6cjs.store.call(void 0, ).truncate(trunc_targets);
1105
1106
  await Promise.all(
1106
1107
  guarded.map(async (stream) => {
1107
1108
  const entry = truncated.get(stream);
1108
1109
  const state2 = seed_states.get(stream);
1109
1110
  if (state2 && entry) {
1110
- await _chunkUPKDCTS2cjs.cache.call(void 0, ).set(stream, {
1111
+ await _chunkPRDX3HP6cjs.cache.call(void 0, ).set(stream, {
1111
1112
  stream,
1112
1113
  state: state2,
1113
1114
  version: entry.committed.version,
@@ -1116,7 +1117,7 @@ async function truncate_and_warm_cache(guarded, seed_states, guard_events, corre
1116
1117
  snaps: 1
1117
1118
  });
1118
1119
  } else {
1119
- await _chunkUPKDCTS2cjs.cache.call(void 0, ).invalidate(stream);
1120
+ await _chunkPRDX3HP6cjs.cache.call(void 0, ).invalidate(stream);
1120
1121
  }
1121
1122
  })
1122
1123
  );
@@ -1130,7 +1131,7 @@ var _crypto = require('crypto');
1130
1131
  function report_once(seen, key, message) {
1131
1132
  if (seen.has(key)) return;
1132
1133
  seen.add(key);
1133
- _chunkUPKDCTS2cjs.log.call(void 0, ).error(new Error(message));
1134
+ _chunkPRDX3HP6cjs.log.call(void 0, ).error(new Error(message));
1134
1135
  }
1135
1136
 
1136
1137
  // src/internal/correlate-cycle.ts
@@ -1177,7 +1178,7 @@ var CorrelateCycle = (_class3 = class {
1177
1178
  // never lets a resolution re-lane them.
1178
1179
 
1179
1180
  __init11() {this._static_subscriptions = /* @__PURE__ */ new Map()}
1180
- __init12() {this._patterns = new (0, _chunkUPKDCTS2cjs.LruMap)(PATTERN_CACHE_SIZE)}
1181
+ __init12() {this._patterns = new (0, _chunkPRDX3HP6cjs.LruMap)(PATTERN_CACHE_SIZE)}
1181
1182
 
1182
1183
 
1183
1184
 
@@ -1195,7 +1196,7 @@ var CorrelateCycle = (_class3 = class {
1195
1196
  on_init
1196
1197
  }) {;_class3.prototype.__init3.call(this);_class3.prototype.__init4.call(this);_class3.prototype.__init5.call(this);_class3.prototype.__init6.call(this);_class3.prototype.__init7.call(this);_class3.prototype.__init8.call(this);_class3.prototype.__init9.call(this);_class3.prototype.__init10.call(this);_class3.prototype.__init11.call(this);_class3.prototype.__init12.call(this);_class3.prototype.__init13.call(this);
1197
1198
  this._key = shard ? `${registry_key(registry.events)}:${[...shard].sort().join(",")}` : registry_key(registry.events);
1198
- this._dynamic_subscriptions = new (0, _chunkUPKDCTS2cjs.LruMap)(max_subscribed_streams);
1199
+ this._dynamic_subscriptions = new (0, _chunkPRDX3HP6cjs.LruMap)(max_subscribed_streams);
1199
1200
  this._registry = registry;
1200
1201
  this._declared_lanes = declared_lanes;
1201
1202
  this._static_targets = static_targets;
@@ -1253,7 +1254,7 @@ var CorrelateCycle = (_class3 = class {
1253
1254
  // Would the target's own `fetch` (filtered by `source`) return this event?
1254
1255
  _in_fetch_window(source, stream) {
1255
1256
  if (source === void 0 || source === stream) return true;
1256
- if (_chunkUPKDCTS2cjs.is_literal_source.call(void 0, source)) return false;
1257
+ if (_chunkPRDX3HP6cjs.is_literal_source.call(void 0, source)) return false;
1257
1258
  let pattern = this._patterns.get(source);
1258
1259
  if (!pattern) {
1259
1260
  pattern = new RegExp(source);
@@ -1296,7 +1297,7 @@ var CorrelateCycle = (_class3 = class {
1296
1297
  const correlated = /* @__PURE__ */ new Map();
1297
1298
  let last_id = after;
1298
1299
  let stopped = false;
1299
- const found = await _chunkUPKDCTS2cjs.store.call(void 0, ).query(
1300
+ const found = await _chunkPRDX3HP6cjs.store.call(void 0, ).query(
1300
1301
  (event) => {
1301
1302
  if (stopped) return;
1302
1303
  const register = this._registry.events[event.name];
@@ -1341,9 +1342,9 @@ var CorrelateCycle = (_class3 = class {
1341
1342
  correlated_at: void 0
1342
1343
  };
1343
1344
  const seen_in_scan = correlated.has(resolved.target);
1344
- const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunkPN5GNW6Ecjs.DEFAULT_LANE));
1345
+ const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunkH6KVPVP4cjs.DEFAULT_LANE));
1345
1346
  const held_priority = seen_in_scan ? entry.priority : _optionalChain([recorded, 'optionalAccess', _62 => _62.priority]);
1346
- const resolved_lane = _nullishCoalesce(lane, () => ( _chunkPN5GNW6Ecjs.DEFAULT_LANE));
1347
+ const resolved_lane = _nullishCoalesce(lane, () => ( _chunkH6KVPVP4cjs.DEFAULT_LANE));
1347
1348
  if (held_priority === priority && held_lane !== resolved_lane)
1348
1349
  report_lane_conflict(
1349
1350
  this._reported,
@@ -1417,7 +1418,7 @@ var CorrelateCycle = (_class3 = class {
1417
1418
  await Promise.all(
1418
1419
  missed.map(async ([stream, entry]) => {
1419
1420
  let row;
1420
- await _chunkUPKDCTS2cjs.store.call(void 0, ).query_streams(
1421
+ await _chunkPRDX3HP6cjs.store.call(void 0, ).query_streams(
1421
1422
  (position) => {
1422
1423
  row = position;
1423
1424
  },
@@ -1429,8 +1430,8 @@ var CorrelateCycle = (_class3 = class {
1429
1430
  lane: row.lane
1430
1431
  });
1431
1432
  if (entry.priority > row.priority) return;
1432
- const held_lane = _nullishCoalesce(row.lane, () => ( _chunkPN5GNW6Ecjs.DEFAULT_LANE));
1433
- const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunkPN5GNW6Ecjs.DEFAULT_LANE));
1433
+ const held_lane = _nullishCoalesce(row.lane, () => ( _chunkH6KVPVP4cjs.DEFAULT_LANE));
1434
+ const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunkH6KVPVP4cjs.DEFAULT_LANE));
1434
1435
  if (entry.priority === row.priority && held_lane !== resolved_lane)
1435
1436
  report_lane_conflict(
1436
1437
  this._reported,
@@ -1456,7 +1457,7 @@ var CorrelateCycle = (_class3 = class {
1456
1457
  millis: 0
1457
1458
  });
1458
1459
  } catch (error) {
1459
- _chunkUPKDCTS2cjs.log.call(void 0, ).warn(
1460
+ _chunkPRDX3HP6cjs.log.call(void 0, ).warn(
1460
1461
  `Could not hand back the correlation lease during shutdown; it expires on its own within ${CORRELATION_LEASE_MS}ms and correlation resumes normally after that. On a single-writer store this usually means another connection holds the database. Cause: ${String(error)}`
1461
1462
  );
1462
1463
  }
@@ -1609,14 +1610,14 @@ function compute_lag_lead_ratio(handled, lagging, leading) {
1609
1610
  }
1610
1611
 
1611
1612
  // src/internal/drain-ops.ts
1612
- var claim = (lagging, leading, by, millis, lane) => _chunkUPKDCTS2cjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1613
+ var claim = (lagging, leading, by, millis, lane) => _chunkPRDX3HP6cjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1613
1614
  async function fetch(leased, eventLimit) {
1614
1615
  return Promise.all(
1615
1616
  leased.map(async ({ stream, source, at, lagging }) => {
1616
1617
  const events = [];
1617
- const stream_exact = source !== void 0 && _chunkUPKDCTS2cjs.is_literal_source.call(void 0, source) ? true : void 0;
1618
+ const stream_exact = source !== void 0 && _chunkPRDX3HP6cjs.is_literal_source.call(void 0, source) ? true : void 0;
1618
1619
  try {
1619
- await _chunkUPKDCTS2cjs.store.call(void 0, ).query((e) => events.push(e), {
1620
+ await _chunkPRDX3HP6cjs.store.call(void 0, ).query((e) => events.push(e), {
1620
1621
  stream: source,
1621
1622
  stream_exact,
1622
1623
  after: at,
@@ -1636,9 +1637,9 @@ async function fetch(leased, eventLimit) {
1636
1637
  })
1637
1638
  );
1638
1639
  }
1639
- var ack = (leases) => _chunkUPKDCTS2cjs.store.call(void 0, ).ack(leases);
1640
- var block = (leases) => _chunkUPKDCTS2cjs.store.call(void 0, ).block(leases);
1641
- var subscribe = (streams, correlated_at, correlator) => _chunkUPKDCTS2cjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1640
+ var ack = (leases) => _chunkPRDX3HP6cjs.store.call(void 0, ).ack(leases);
1641
+ var block = (leases) => _chunkPRDX3HP6cjs.store.call(void 0, ).block(leases);
1642
+ var subscribe = (streams, correlated_at, correlator) => _chunkPRDX3HP6cjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1642
1643
 
1643
1644
  // src/internal/event-sourcing.ts
1644
1645
  var _actpatch = require('@rotorsoft/act-patch');
@@ -1653,29 +1654,29 @@ var check_invariants = (target, state2, schema, pii_aware) => {
1653
1654
  try {
1654
1655
  result = schema.safeParse(state2);
1655
1656
  } catch (error) {
1656
- throw new (0, _chunkPN5GNW6Ecjs.ValidationError)(target, state2, error);
1657
+ throw new (0, _chunkH6KVPVP4cjs.ValidationError)(target, state2, error);
1657
1658
  }
1658
1659
  if (result.success) return;
1659
1660
  const issues = pii_aware ? result.error.issues.filter((issue) => {
1660
1661
  const value = value_at(state2, issue.path);
1661
- return value !== _chunkPN5GNW6Ecjs.REDACTED && value !== _chunkPN5GNW6Ecjs.SHREDDED;
1662
+ return value !== _chunkH6KVPVP4cjs.REDACTED && value !== _chunkH6KVPVP4cjs.SHREDDED;
1662
1663
  }) : result.error.issues;
1663
1664
  if (issues.length)
1664
- throw new (0, _chunkPN5GNW6Ecjs.ValidationError)(
1665
+ throw new (0, _chunkH6KVPVP4cjs.ValidationError)(
1665
1666
  target,
1666
1667
  state2,
1667
1668
  _zod.prettifyError.call(void 0, new (0, _zod.ZodError)(issues))
1668
1669
  );
1669
1670
  };
1670
1671
  var DEFAULT_BATCH = 500;
1671
- var cache_put = (stream, entry) => _chunkUPKDCTS2cjs.cache.call(void 0, ).set(stream, entry).catch(
1672
- (err) => _chunkUPKDCTS2cjs.log.call(void 0, ).warn(
1672
+ var cache_put = (stream, entry) => _chunkPRDX3HP6cjs.cache.call(void 0, ).set(stream, entry).catch(
1673
+ (err) => _chunkPRDX3HP6cjs.log.call(void 0, ).warn(
1673
1674
  err,
1674
1675
  "cache set skipped; the next load re-folds from the store"
1675
1676
  )
1676
1677
  );
1677
- var cache_drop = (stream) => _chunkUPKDCTS2cjs.cache.call(void 0, ).invalidate(stream).catch(
1678
- (err) => _chunkUPKDCTS2cjs.log.call(void 0, ).warn(
1678
+ var cache_drop = (stream) => _chunkPRDX3HP6cjs.cache.call(void 0, ).invalidate(stream).catch(
1679
+ (err) => _chunkPRDX3HP6cjs.log.call(void 0, ).warn(
1679
1680
  err,
1680
1681
  "cache invalidate skipped; a stale checkpoint re-folds from its event_id"
1681
1682
  )
@@ -1683,9 +1684,9 @@ var cache_drop = (stream) => _chunkUPKDCTS2cjs.cache.call(void 0, ).invalidate(s
1683
1684
  async function snap(snapshot) {
1684
1685
  const { id, stream, name, meta, version } = snapshot.event;
1685
1686
  try {
1686
- const [committed] = await _chunkUPKDCTS2cjs.store.call(void 0, ).commit(
1687
+ const [committed] = await _chunkPRDX3HP6cjs.store.call(void 0, ).commit(
1687
1688
  stream,
1688
- [{ name: _chunkPN5GNW6Ecjs.SNAP_EVENT, data: snapshot.state }],
1689
+ [{ name: _chunkH6KVPVP4cjs.SNAP_EVENT, data: snapshot.state }],
1689
1690
  {
1690
1691
  correlation: meta.correlation,
1691
1692
  causation: { event: { id, name, stream } }
@@ -1696,22 +1697,22 @@ async function snap(snapshot) {
1696
1697
  return committed;
1697
1698
  } catch (error) {
1698
1699
  const reason = error instanceof Error ? error.message : String(error);
1699
- _chunkUPKDCTS2cjs.log.call(void 0, ).warn(
1700
+ _chunkPRDX3HP6cjs.log.call(void 0, ).warn(
1700
1701
  `Snapshot write failed on stream "${stream}": ${reason} \u2014 cold starts will replay full history until snapshots succeed.`
1701
1702
  );
1702
1703
  }
1703
1704
  }
1704
1705
  async function tombstone(stream, expectedVersion, correlation) {
1705
1706
  try {
1706
- const [committed] = await _chunkUPKDCTS2cjs.store.call(void 0, ).commit(
1707
+ const [committed] = await _chunkPRDX3HP6cjs.store.call(void 0, ).commit(
1707
1708
  stream,
1708
- [{ name: _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT, data: {} }],
1709
+ [{ name: _chunkH6KVPVP4cjs.TOMBSTONE_EVENT, data: {} }],
1709
1710
  { correlation, causation: {} },
1710
1711
  expectedVersion
1711
1712
  );
1712
1713
  return committed;
1713
1714
  } catch (error) {
1714
- if (error instanceof _chunkPN5GNW6Ecjs.ConcurrencyError) return void 0;
1715
+ if (error instanceof _chunkH6KVPVP4cjs.ConcurrencyError) return void 0;
1715
1716
  throw error;
1716
1717
  }
1717
1718
  }
@@ -1741,9 +1742,9 @@ async function scan(source, opts = {}, callback) {
1741
1742
  if (drop_closed_streams) {
1742
1743
  await source.query(
1743
1744
  (e) => {
1744
- if (e.name === _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1745
+ if (e.name === _chunkH6KVPVP4cjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1745
1746
  },
1746
- { names: [_chunkPN5GNW6Ecjs.TOMBSTONE_EVENT] }
1747
+ { names: [_chunkH6KVPVP4cjs.TOMBSTONE_EVENT] }
1747
1748
  );
1748
1749
  }
1749
1750
  let max_id;
@@ -1765,11 +1766,11 @@ async function scan(source, opts = {}, callback) {
1765
1766
  if (!is_valid(event))
1766
1767
  throw new Error(`Invalid event at index ${processed}`);
1767
1768
  if (on_progress) on_progress({ processed, id: event.id, max_id });
1768
- if (drop_snapshots && event.name === _chunkPN5GNW6Ecjs.SNAP_EVENT) {
1769
+ if (drop_snapshots && event.name === _chunkH6KVPVP4cjs.SNAP_EVENT) {
1769
1770
  dropped_snaps++;
1770
1771
  return;
1771
1772
  }
1772
- if (closed_streams.has(event.stream) && event.name !== _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT) {
1773
+ if (closed_streams.has(event.stream) && event.name !== _chunkH6KVPVP4cjs.TOMBSTONE_EVENT) {
1773
1774
  dropped_closed++;
1774
1775
  return;
1775
1776
  }
@@ -1836,17 +1837,17 @@ async function scan(source, opts = {}, callback) {
1836
1837
  async function load(me, target, callback, patch_fn = bare_patch) {
1837
1838
  const { stream, actor, asOf } = target;
1838
1839
  const time_travel = !!asOf && Object.values(asOf).some((v) => v !== void 0);
1839
- const cached = time_travel ? void 0 : await _chunkUPKDCTS2cjs.cache.call(void 0, ).get(stream);
1840
+ const cached = time_travel ? void 0 : await _chunkPRDX3HP6cjs.cache.call(void 0, ).get(stream);
1840
1841
  const cache_hit = !!cached;
1841
1842
  let state2 = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _73 => _73.state]), () => ( (me.init ? me.init() : {})));
1842
1843
  let patches = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _74 => _74.patches]), () => ( 0));
1843
1844
  let snaps = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _75 => _75.snaps]), () => ( 0));
1844
1845
  let replayed = 0;
1845
1846
  let event;
1846
- await _chunkUPKDCTS2cjs.store.call(void 0, ).query(
1847
+ await _chunkPRDX3HP6cjs.store.call(void 0, ).query(
1847
1848
  (raw) => {
1848
1849
  event = me.view(raw, actor);
1849
- if (event.name === _chunkPN5GNW6Ecjs.SNAP_EVENT) {
1850
+ if (event.name === _chunkH6KVPVP4cjs.SNAP_EVENT) {
1850
1851
  state2 = event.data;
1851
1852
  snaps++;
1852
1853
  patches = 0;
@@ -1855,8 +1856,8 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1855
1856
  state2 = patch_fn(me, state2, me.patch[event.name](event, state2), event);
1856
1857
  patches++;
1857
1858
  replayed++;
1858
- } else if (event.name !== _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT) {
1859
- _chunkUPKDCTS2cjs.log.call(void 0, ).warn(
1859
+ } else if (event.name !== _chunkH6KVPVP4cjs.TOMBSTONE_EVENT) {
1860
+ _chunkPRDX3HP6cjs.log.call(void 0, ).warn(
1860
1861
  `Skipping unknown event "${String(event.name)}" on stream "${stream}" (id=${event.id}) \u2014 no reducer in state "${me.name}"`
1861
1862
  );
1862
1863
  }
@@ -1880,7 +1881,7 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1880
1881
  ...cached ? { after: cached.event_id, with_snaps: true } : { ...time_travel ? {} : { with_snaps: true }, ...asOf }
1881
1882
  }
1882
1883
  );
1883
- const head_is_tombstone = _optionalChain([event, 'optionalAccess', _77 => _77.name]) === _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT;
1884
+ const head_is_tombstone = _optionalChain([event, 'optionalAccess', _77 => _77.name]) === _chunkH6KVPVP4cjs.TOMBSTONE_EVENT;
1884
1885
  if (replayed > 0 && !time_travel && event && !me.pii_aware && !head_is_tombstone) {
1885
1886
  await cache_put(stream, {
1886
1887
  stream,
@@ -1908,7 +1909,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1908
1909
  if (!stream) throw new Error("Missing target stream");
1909
1910
  const reactingTo = _optionalChain([options, 'optionalAccess', _82 => _82.reactingTo]);
1910
1911
  const correlator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _83 => _83.correlator]), () => ( default_correlator));
1911
- const validated = _chunkUPKDCTS2cjs.validate.call(void 0, action2, payload, me.actions[action2]);
1912
+ const validated = _chunkPRDX3HP6cjs.validate.call(void 0, action2, payload, me.actions[action2]);
1912
1913
  const opts = _optionalChain([me, 'access', _84 => _84.options, 'optionalAccess', _85 => _85[action2]]);
1913
1914
  const max_retries = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _86 => _86.maxRetries]), () => ( 0));
1914
1915
  for (let attempt = 0; ; attempt++) {
@@ -1919,12 +1920,12 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1919
1920
  void 0,
1920
1921
  patch_fn
1921
1922
  );
1922
- if (_optionalChain([snapshot, 'access', _87 => _87.event, 'optionalAccess', _88 => _88.name]) === _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT)
1923
- throw new (0, _chunkPN5GNW6Ecjs.StreamClosedError)(stream);
1923
+ if (_optionalChain([snapshot, 'access', _87 => _87.event, 'optionalAccess', _88 => _88.name]) === _chunkH6KVPVP4cjs.TOMBSTONE_EVENT)
1924
+ throw new (0, _chunkH6KVPVP4cjs.StreamClosedError)(stream);
1924
1925
  const expected = _nullishCoalesce(expectedVersion, () => ( snapshot.version));
1925
1926
  for (const { valid, description } of _nullishCoalesce(_optionalChain([me, 'access', _89 => _89.given, 'optionalAccess', _90 => _90[action2]]), () => ( [])))
1926
1927
  if (!valid(snapshot.state, actor))
1927
- throw new (0, _chunkPN5GNW6Ecjs.InvariantError)(
1928
+ throw new (0, _chunkH6KVPVP4cjs.InvariantError)(
1928
1929
  action2,
1929
1930
  validated,
1930
1931
  target,
@@ -1933,7 +1934,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1933
1934
  );
1934
1935
  for (const { holds, description } of _nullishCoalesce(_optionalChain([me, 'access', _91 => _91.requires, 'optionalAccess', _92 => _92[action2]]), () => ( [])))
1935
1936
  if (!holds(validated, snapshot.state, actor))
1936
- throw new (0, _chunkPN5GNW6Ecjs.PreconditionError)(
1937
+ throw new (0, _chunkH6KVPVP4cjs.PreconditionError)(
1937
1938
  action2,
1938
1939
  validated,
1939
1940
  target,
@@ -1946,7 +1947,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1946
1947
  const tuples = Array.isArray(result[0]) ? result : [result];
1947
1948
  const events = tuples.map(([name, data]) => ({
1948
1949
  name,
1949
- data: _chunkUPKDCTS2cjs.validate.call(void 0, name, data, me.events[name])
1950
+ data: _chunkPRDX3HP6cjs.validate.call(void 0, name, data, me.events[name])
1950
1951
  }));
1951
1952
  const emitted = events.map((e) => me.message(e));
1952
1953
  const meta = {
@@ -1993,9 +1994,9 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1993
1994
  );
1994
1995
  let committed;
1995
1996
  try {
1996
- committed = await _chunkUPKDCTS2cjs.store.call(void 0, ).commit(stream, emitted, meta, expected);
1997
+ committed = await _chunkPRDX3HP6cjs.store.call(void 0, ).commit(stream, emitted, meta, expected);
1997
1998
  } catch (error) {
1998
- if (error instanceof _chunkPN5GNW6Ecjs.ConcurrencyError) void cache_drop(stream);
1999
+ if (error instanceof _chunkH6KVPVP4cjs.ConcurrencyError) void cache_drop(stream);
1999
2000
  throw error;
2000
2001
  }
2001
2002
  const snapshots = committed.map((row, i) => ({
@@ -2022,19 +2023,19 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
2022
2023
  });
2023
2024
  return snapshots;
2024
2025
  } catch (error) {
2025
- if (!(error instanceof _chunkPN5GNW6Ecjs.ConcurrencyError)) throw error;
2026
+ if (!(error instanceof _chunkH6KVPVP4cjs.ConcurrencyError)) throw error;
2026
2027
  if (expectedVersion !== void 0) throw error;
2027
2028
  if (attempt >= max_retries) throw error;
2028
2029
  if (_optionalChain([opts, 'optionalAccess', _99 => _99.backoff])) {
2029
2030
  const delay_ms = compute_backoff_delay(attempt, opts.backoff);
2030
- if (delay_ms > 0) await _chunkUPKDCTS2cjs.sleep.call(void 0, delay_ms);
2031
+ if (delay_ms > 0) await _chunkPRDX3HP6cjs.sleep.call(void 0, delay_ms);
2031
2032
  }
2032
2033
  }
2033
2034
  }
2034
2035
  }
2035
2036
 
2036
2037
  // src/internal/tracing.ts
2037
- var PRETTY = _chunkUPKDCTS2cjs.config.call(void 0, ).env !== "production";
2038
+ var PRETTY = _chunkPRDX3HP6cjs.config.call(void 0, ).env !== "production";
2038
2039
  var C_BLUE = "\x1B[38;5;39m";
2039
2040
  var C_ORANGE = "\x1B[38;5;208m";
2040
2041
  var C_GREEN = "\x1B[38;5;42m";
@@ -2218,7 +2219,7 @@ function budget_exhausted(lease, options, store_failing) {
2218
2219
  if (store_failing || !_optionalChain([options, 'optionalAccess', _110 => _110.blockOnError]) || lease.retry <= options.maxRetries)
2219
2220
  return void 0;
2220
2221
  const error = `Blocking ${lease.stream} after ${lease.retry} claims with no acknowledged progress \u2014 the retry budget (${options.maxRetries}) was spent without the handler ever reporting an error. That means every attempt lost its lease before it could ack: move the reaction to a lane whose leaseMillis covers the handler, then unblock the stream.`;
2221
- _chunkUPKDCTS2cjs.log.call(void 0, ).error(error);
2222
+ _chunkPRDX3HP6cjs.log.call(void 0, ).error(error);
2222
2223
  return { lease, handled: 0, acked_at: lease.at, error, block: true };
2223
2224
  }
2224
2225
  function fetch_failure_policy(registry) {
@@ -2234,13 +2235,13 @@ function fetch_failure_policy(registry) {
2234
2235
  function finalize(lease, handled, at, error, options, logger, failed_at) {
2235
2236
  if (!error) return { lease, handled, acked_at: at };
2236
2237
  logger.error(error);
2237
- const non_retryable = error instanceof _chunkPN5GNW6Ecjs.NonRetryableError;
2238
+ const non_retryable = error instanceof _chunkH6KVPVP4cjs.NonRetryableError;
2238
2239
  const block2 = options.blockOnError && (non_retryable || lease.retry >= options.maxRetries);
2239
2240
  if (block2)
2240
2241
  logger.error(
2241
2242
  non_retryable ? `Blocking ${lease.stream} on non-retryable error.` : `Blocking ${lease.stream} after ${lease.retry} retries.`
2242
2243
  );
2243
- const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunkUPKDCTS2cjs.DEFAULT_BACKOFF)));
2244
+ const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunkPRDX3HP6cjs.DEFAULT_BACKOFF)));
2244
2245
  return {
2245
2246
  lease,
2246
2247
  handled,
@@ -2368,7 +2369,7 @@ async function run_drain_cycle(deps, cycle) {
2368
2369
  const acked = submitted.length ? await ops.ack(submitted) : [];
2369
2370
  const expected = submitted.filter((l) => l.due === void 0).length;
2370
2371
  if (acked.length < expected)
2371
- _chunkUPKDCTS2cjs.log.call(void 0, ).warn(
2372
+ _chunkPRDX3HP6cjs.log.call(void 0, ).warn(
2372
2373
  `drain: ${expected - acked.length} of ${expected} acks were dropped \u2014 the lease was taken by another worker mid-handler. That work will be redelivered (at-least-once), but persistent drops mean leaseMillis is too short for this handler.`
2373
2374
  );
2374
2375
  const closeable = handled.filter((h) => h.close !== void 0).map((h) => h.close);
@@ -2464,9 +2465,9 @@ var DrainController = (_class5 = class {
2464
2465
  if (!this.armed || this._stopped || this._inflight)
2465
2466
  return EMPTY_DRAIN;
2466
2467
  const d = _nullishCoalesce(this._deps.defaults, () => ( {}));
2467
- const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunkUPKDCTS2cjs.DEFAULT_STREAM_LIMIT));
2468
- const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunkUPKDCTS2cjs.DEFAULT_EVENT_LIMIT));
2469
- const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunkUPKDCTS2cjs.DEFAULT_LEASE_MILLIS));
2468
+ const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunkPRDX3HP6cjs.DEFAULT_STREAM_LIMIT));
2469
+ const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunkPRDX3HP6cjs.DEFAULT_EVENT_LIMIT));
2470
+ const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunkPRDX3HP6cjs.DEFAULT_LEASE_MILLIS));
2470
2471
  if (this._deps.breaker.state(Date.now()) === "open")
2471
2472
  return EMPTY_DRAIN;
2472
2473
  const pass = this._pass(streamLimit, eventLimit, leaseMillis).finally(
@@ -2541,7 +2542,7 @@ function pii_gate(event, fields, predicate, actor) {
2541
2542
  const { pii, ...rest } = event;
2542
2543
  if (pii == null) {
2543
2544
  const shredded = { ...data };
2544
- for (const f of fields) shredded[f] = _chunkPN5GNW6Ecjs.SHREDDED;
2545
+ for (const f of fields) shredded[f] = _chunkH6KVPVP4cjs.SHREDDED;
2545
2546
  return { ...rest, data: shredded };
2546
2547
  }
2547
2548
  const allowed = !!actor && !!predicate && predicate(event, actor);
@@ -2552,7 +2553,7 @@ function pii_gate(event, fields, predicate, actor) {
2552
2553
  };
2553
2554
  }
2554
2555
  const redacted = { ...data };
2555
- for (const f of fields) redacted[f] = _chunkPN5GNW6Ecjs.REDACTED;
2556
+ for (const f of fields) redacted[f] = _chunkH6KVPVP4cjs.REDACTED;
2556
2557
  return { ...rest, data: redacted };
2557
2558
  }
2558
2559
  var IDENTITY_GATE = (event) => event;
@@ -2689,7 +2690,7 @@ function make_deferred(handler, schedule) {
2689
2690
  const call = handler;
2690
2691
  const deferred = async (event, stream, app) => {
2691
2692
  const when = typeof schedule === "function" ? schedule(event) : schedule;
2692
- if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunkPN5GNW6Ecjs.DeferSignal)(when);
2693
+ if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunkH6KVPVP4cjs.DeferSignal)(when);
2693
2694
  return call(event, stream, app);
2694
2695
  };
2695
2696
  Object.defineProperty(deferred, "name", { value: handler.name });
@@ -2758,7 +2759,7 @@ function build_handle(deps) {
2758
2759
  handled++;
2759
2760
  }
2760
2761
  } catch (error) {
2761
- if (error instanceof _chunkPN5GNW6Ecjs.DeferSignal) {
2762
+ if (error instanceof _chunkH6KVPVP4cjs.DeferSignal) {
2762
2763
  let defer;
2763
2764
  try {
2764
2765
  defer = resolve_defer_at(error.when, event);
@@ -3030,7 +3031,7 @@ var Act = (_class7 = class {
3030
3031
  // Lanes to arm per event; `"all"` when a dynamic resolver hides the lane.
3031
3032
 
3032
3033
 
3033
- __init27() {this._logger = _chunkUPKDCTS2cjs.log.call(void 0, )}
3034
+ __init27() {this._logger = _chunkPRDX3HP6cjs.log.call(void 0, )}
3034
3035
  // This Act's ports: its own bag, or the singleton adapters.
3035
3036
 
3036
3037
  // Runs a body so internal `store()`/`cache()` calls resolve to `_ports`.
@@ -3052,9 +3053,9 @@ var Act = (_class7 = class {
3052
3053
  this._lanes = lanes;
3053
3054
  this._declared_lanes = ["default", ...lanes.map((l) => l.name)];
3054
3055
  validate_only_lanes(options.onlyLanes, this._declared_lanes);
3055
- this._ports = _nullishCoalesce(options.scoped, () => ( _chunkUPKDCTS2cjs.default_scope.call(void 0, )));
3056
+ this._ports = _nullishCoalesce(options.scoped, () => ( _chunkPRDX3HP6cjs.default_scope.call(void 0, )));
3056
3057
  const ports = this._ports;
3057
- this._scoped = _chunkUPKDCTS2cjs.make_run_scoped.call(void 0, {
3058
+ this._scoped = _chunkPRDX3HP6cjs.make_run_scoped.call(void 0, {
3058
3059
  // Getters, not a spread: the singletons resolve lazily, so a later
3059
3060
  // `store(...)` / `cache(...)` still takes effect.
3060
3061
  get store() {
@@ -3064,14 +3065,14 @@ var Act = (_class7 = class {
3064
3065
  return ports.cache;
3065
3066
  },
3066
3067
  // Parsed per build, so a bad window throws on every build.
3067
- autoclose_window: _chunkUPKDCTS2cjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3068
+ autoclose_window: _chunkPRDX3HP6cjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3068
3069
  });
3069
3070
  this._correlator = _nullishCoalesce(options.correlator, () => ( default_correlator));
3070
3071
  this._es = build_es(this._logger, this._correlator, patch_fn);
3071
3072
  this._cd = build_drain(this._logger);
3072
3073
  const handle = build_handle({
3073
3074
  logger: this._logger,
3074
- reaction_scope: _chunkUPKDCTS2cjs.make_reaction_scope.call(void 0, {
3075
+ reaction_scope: _chunkPRDX3HP6cjs.make_reaction_scope.call(void 0, {
3075
3076
  do: this.do.bind(this),
3076
3077
  load: this.load.bind(this),
3077
3078
  query: this.query.bind(this),
@@ -3101,12 +3102,12 @@ var Act = (_class7 = class {
3101
3102
  this._ports.store,
3102
3103
  options.listen !== false
3103
3104
  );
3104
- _chunkUPKDCTS2cjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3105
+ _chunkPRDX3HP6cjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3105
3106
  }
3106
3107
  // Shared by drain, settle and autoclose; bad knobs throw at build.
3107
3108
  _build_breaker(options) {
3108
3109
  return new CircuitBreaker(
3109
- _chunkUPKDCTS2cjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3110
+ _chunkPRDX3HP6cjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3110
3111
  {
3111
3112
  on_error: (error, circuit) => this._emit_error(error, circuit),
3112
3113
  // When the cooldown elapses, settle once: its scan or claim is the
@@ -3140,7 +3141,7 @@ var Act = (_class7 = class {
3140
3141
  try {
3141
3142
  await this._run_close(targets);
3142
3143
  } catch (error) {
3143
- if (error instanceof _chunkPN5GNW6Ecjs.StoreError) throw error;
3144
+ if (error instanceof _chunkH6KVPVP4cjs.StoreError) throw error;
3144
3145
  this._logger.error(
3145
3146
  error,
3146
3147
  `Reaction-requested close of ${targets.map((t) => `"${t.stream}"`).join(", ")} failed and was not retried; close it with app.close(...) once the cause is fixed.`
@@ -3174,7 +3175,7 @@ var Act = (_class7 = class {
3174
3175
  // Audit deps, built after the controllers so the lane set is final.
3175
3176
  _build_audit_deps() {
3176
3177
  return {
3177
- store: _chunkUPKDCTS2cjs.store,
3178
+ store: _chunkPRDX3HP6cjs.store,
3178
3179
  event_to_state: this._event_to_state,
3179
3180
  // Declared lanes, not this process's controllers: a lane another
3180
3181
  // worker drains is not `unknown-lane`.
@@ -3187,7 +3188,7 @@ var Act = (_class7 = class {
3187
3188
  registry: this.registry,
3188
3189
  static_targets: classification.static_targets,
3189
3190
  cd: this._cd,
3190
- max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunkPN5GNW6Ecjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3191
+ max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunkH6KVPVP4cjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3191
3192
  // Declared lanes (not active ones): a lane another process claims is
3192
3193
  // still a valid destination.
3193
3194
  declared_lanes: new Set(this._declared_lanes),
@@ -3203,7 +3204,7 @@ var Act = (_class7 = class {
3203
3204
  // Cold start: an idle deferred stream still fires on time after a restart.
3204
3205
  async _seed_persisted_defers() {
3205
3206
  const now = Date.now();
3206
- await walk_streams(_chunkUPKDCTS2cjs.store.call(void 0, ), (pos) => {
3207
+ await walk_streams(_chunkPRDX3HP6cjs.store.call(void 0, ), (pos) => {
3207
3208
  if (pos.deferred_at === void 0 || pos.deferred_at <= now) return;
3208
3209
  const controller = this._drain_controllers.get(_nullishCoalesce(pos.lane, () => ( "default")));
3209
3210
  _optionalChain([controller, 'optionalAccess', _132 => _132.seed_defer, 'call', _133 => _133(pos.stream, pos.deferred_at)]);
@@ -3219,7 +3220,7 @@ var Act = (_class7 = class {
3219
3220
  on_settled: (drain) => this.emit("settled", drain),
3220
3221
  breaker: this._breaker
3221
3222
  },
3222
- _nullishCoalesce(options.settleDebounceMs, () => ( _chunkPN5GNW6Ecjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3223
+ _nullishCoalesce(options.settleDebounceMs, () => ( _chunkH6KVPVP4cjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3223
3224
  );
3224
3225
  }
3225
3226
 
@@ -3239,7 +3240,7 @@ var Act = (_class7 = class {
3239
3240
  */
3240
3241
  shutdown(options) {
3241
3242
  if (!this._shutdown_promise) {
3242
- _chunkUPKDCTS2cjs.resolveShutdownConfig.call(void 0, options);
3243
+ _chunkPRDX3HP6cjs.resolveShutdownConfig.call(void 0, options);
3243
3244
  this._shutdown_promise = (async () => {
3244
3245
  this.stop_correlations();
3245
3246
  this._settle.stop(true);
@@ -3257,10 +3258,10 @@ var Act = (_class7 = class {
3257
3258
  // The largest `leaseMillis` among lanes with a cycle in flight (the
3258
3259
  // default for none or 0, and for a running settle), capped.
3259
3260
  _derive_grace_ms(running, settling) {
3260
- let max = settling ? _chunkUPKDCTS2cjs.DEFAULT_LEASE_MILLIS : 0;
3261
+ let max = settling ? _chunkPRDX3HP6cjs.DEFAULT_LEASE_MILLIS : 0;
3261
3262
  for (const c of running)
3262
- max = Math.max(max, c.lease_millis || _chunkUPKDCTS2cjs.DEFAULT_LEASE_MILLIS);
3263
- return Math.min(max, _chunkUPKDCTS2cjs.MAX_SHUTDOWN_GRACE_MS);
3263
+ max = Math.max(max, c.lease_millis || _chunkPRDX3HP6cjs.DEFAULT_LEASE_MILLIS);
3264
+ return Math.min(max, _chunkPRDX3HP6cjs.MAX_SHUTDOWN_GRACE_MS);
3264
3265
  }
3265
3266
  async _await_inflight(grace_ms) {
3266
3267
  const running = [...this._drain_controllers.values()].filter(
@@ -3343,7 +3344,7 @@ var Act = (_class7 = class {
3343
3344
  * @see {@link ValidationError}, {@link PreconditionError}, {@link ConcurrencyError}
3344
3345
  */
3345
3346
  async do(action2, target, payload, options) {
3346
- const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.reactingTo]), () => ( _chunkUPKDCTS2cjs.current_reacting.call(void 0, )));
3347
+ const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.reactingTo]), () => ( _chunkPRDX3HP6cjs.current_reacting.call(void 0, )));
3347
3348
  const do_options = reacting_to === _optionalChain([options, 'optionalAccess', _136 => _136.reactingTo]) ? options : { ...options, reactingTo: reacting_to };
3348
3349
  return this._scoped(async () => {
3349
3350
  const snapshots = await this._es.action(
@@ -3409,7 +3410,7 @@ var Act = (_class7 = class {
3409
3410
  return this._scoped(async () => {
3410
3411
  let first;
3411
3412
  let last;
3412
- const count = await _chunkUPKDCTS2cjs.store.call(void 0, ).query((e) => {
3413
+ const count = await _chunkPRDX3HP6cjs.store.call(void 0, ).query((e) => {
3413
3414
  const gated = this.registry.query_gate(e.name)(e);
3414
3415
  if (!first) first = gated;
3415
3416
  last = gated;
@@ -3439,7 +3440,7 @@ var Act = (_class7 = class {
3439
3440
  async query_array(query) {
3440
3441
  return this._scoped(async () => {
3441
3442
  const events = [];
3442
- await _chunkUPKDCTS2cjs.store.call(void 0, ).query((e) => {
3443
+ await _chunkPRDX3HP6cjs.store.call(void 0, ).query((e) => {
3443
3444
  events.push(this.registry.query_gate(e.name)(e));
3444
3445
  }, query);
3445
3446
  return events;
@@ -3459,14 +3460,14 @@ var Act = (_class7 = class {
3459
3460
  */
3460
3461
  async forget(stream) {
3461
3462
  return this._scoped(async () => {
3462
- const s = _chunkUPKDCTS2cjs.store.call(void 0, );
3463
+ const s = _chunkPRDX3HP6cjs.store.call(void 0, );
3463
3464
  if (!s.forget_pii) {
3464
3465
  throw new Error(
3465
3466
  `Store does not implement forget_pii \u2014 adapter cannot comply with sensitive-data erasure. Use an adapter that declares pii_isolation: true (e.g. @rotorsoft/act on the in-memory store).`
3466
3467
  );
3467
3468
  }
3468
3469
  const eventCount = await s.forget_pii(stream);
3469
- await _chunkUPKDCTS2cjs.cache.call(void 0, ).invalidate(stream);
3470
+ await _chunkPRDX3HP6cjs.cache.call(void 0, ).invalidate(stream);
3470
3471
  if (eventCount > 0) {
3471
3472
  this.emit("forgotten", { stream, at: /* @__PURE__ */ new Date(), eventCount });
3472
3473
  }
@@ -3500,7 +3501,7 @@ var Act = (_class7 = class {
3500
3501
  * @see {@link correlate} for dynamic stream discovery
3501
3502
  */
3502
3503
  async drain(options = {}) {
3503
- _chunkUPKDCTS2cjs.resolveDrainConfig.call(void 0, options);
3504
+ _chunkPRDX3HP6cjs.resolveDrainConfig.call(void 0, options);
3504
3505
  if (!this._drain)
3505
3506
  return { fetched: [], leased: [], acked: [], blocked: [] };
3506
3507
  return this._scoped(() => this._drain_all(options));
@@ -3680,7 +3681,7 @@ var Act = (_class7 = class {
3680
3681
  */
3681
3682
  async reset(input) {
3682
3683
  return this._scoped(async () => {
3683
- const count = await _chunkUPKDCTS2cjs.store.call(void 0, ).reset(input);
3684
+ const count = await _chunkPRDX3HP6cjs.store.call(void 0, ).reset(input);
3684
3685
  for (const handler of this._batch_handlers.values())
3685
3686
  _optionalChain([handler, 'access', _143 => _143[FOLD_RESET], 'optionalCall', _144 => _144()]);
3686
3687
  if (count > 0) {
@@ -3716,7 +3717,7 @@ var Act = (_class7 = class {
3716
3717
  */
3717
3718
  async unblock(input) {
3718
3719
  return this._scoped(async () => {
3719
- const count = await _chunkUPKDCTS2cjs.store.call(void 0, ).unblock(input);
3720
+ const count = await _chunkPRDX3HP6cjs.store.call(void 0, ).unblock(input);
3720
3721
  if (count > 0) {
3721
3722
  this._wake();
3722
3723
  }
@@ -3771,7 +3772,7 @@ var Act = (_class7 = class {
3771
3772
  return { ...partial, duration_ms: Date.now() - started };
3772
3773
  }
3773
3774
  const target = _nullishCoalesce(sink, () => ( (() => {
3774
- const s = _chunkUPKDCTS2cjs.store.call(void 0, );
3775
+ const s = _chunkPRDX3HP6cjs.store.call(void 0, );
3775
3776
  if (!s.restore) throw new Error("adapter has no restore capability");
3776
3777
  return s;
3777
3778
  })()));
@@ -3817,7 +3818,7 @@ var Act = (_class7 = class {
3817
3818
  async blocked_streams(options) {
3818
3819
  return this._scoped(async () => {
3819
3820
  const positions = [];
3820
- await _chunkUPKDCTS2cjs.store.call(void 0, ).query_streams(
3821
+ await _chunkPRDX3HP6cjs.store.call(void 0, ).query_streams(
3821
3822
  (p) => {
3822
3823
  positions.push(p);
3823
3824
  },
@@ -3869,7 +3870,7 @@ var Act = (_class7 = class {
3869
3870
  * @see {@link Store.prioritize} for the underlying primitive
3870
3871
  */
3871
3872
  async prioritize(filter, priority) {
3872
- return this._scoped(() => _chunkUPKDCTS2cjs.store.call(void 0, ).prioritize(filter, priority));
3873
+ return this._scoped(() => _chunkPRDX3HP6cjs.store.call(void 0, ).prioritize(filter, priority));
3873
3874
  }
3874
3875
  // Shared by `close()` and reaction-requested closes.
3875
3876
  async _run_close(targets) {
@@ -3949,7 +3950,7 @@ var Act = (_class7 = class {
3949
3950
  * @see {@link correlate} for manual correlation
3950
3951
  */
3951
3952
  settle(options) {
3952
- _chunkUPKDCTS2cjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3953
+ _chunkPRDX3HP6cjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3953
3954
  this._schedule(options);
3954
3955
  }
3955
3956
  }, _class7);
@@ -4105,16 +4106,16 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4105
4106
  }),
4106
4107
  // Never block on autoclose: a transient query/store error should retry,
4107
4108
  // not quarantine the synthetic stream.
4108
- options: { blockOnError: false, maxRetries: _chunkUPKDCTS2cjs.DEFAULT_MAX_RETRIES },
4109
+ options: { blockOnError: false, maxRetries: _chunkPRDX3HP6cjs.DEFAULT_MAX_RETRIES },
4109
4110
  handler: async (event) => {
4110
4111
  const aggregate = event.stream;
4111
4112
  const window = read_window();
4112
4113
  if (!in_autoclose_window(window, /* @__PURE__ */ new Date()))
4113
- throw new (0, _chunkPN5GNW6Ecjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4114
- const stats = await _chunkUPKDCTS2cjs.store.call(void 0, ).query_stats([aggregate], {
4114
+ throw new (0, _chunkH6KVPVP4cjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4115
+ const stats = await _chunkPRDX3HP6cjs.store.call(void 0, ).query_stats([aggregate], {
4115
4116
  count: true,
4116
4117
  tail: keep_days !== void 0 ? true : void 0,
4117
- exclude: [_chunkPN5GNW6Ecjs.TOMBSTONE_EVENT, _chunkPN5GNW6Ecjs.SNAP_EVENT]
4118
+ exclude: [_chunkH6KVPVP4cjs.TOMBSTONE_EVENT, _chunkH6KVPVP4cjs.SNAP_EVENT]
4118
4119
  });
4119
4120
  const entry = stats.get(aggregate);
4120
4121
  if (!entry) return;
@@ -4145,7 +4146,7 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4145
4146
  dues.push(days_after(entry.tail.created, keep_days));
4146
4147
  const future = dues.map((d) => d.getTime()).filter((t) => t > Date.now());
4147
4148
  if (future.length)
4148
- throw new (0, _chunkPN5GNW6Ecjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4149
+ throw new (0, _chunkH6KVPVP4cjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4149
4150
  }
4150
4151
  };
4151
4152
  const key = `__autoclose_${st.name}`;
@@ -4350,9 +4351,9 @@ var _this_ = ({ stream }) => ({
4350
4351
 
4351
4352
  // src/builders/builder-utils.ts
4352
4353
  function register_lane(config2, lanes) {
4353
- _chunkUPKDCTS2cjs.resolveLaneConfig.call(void 0, config2);
4354
- if (config2.name === _chunkPN5GNW6Ecjs.DEFAULT_LANE)
4355
- throw new Error(`Lane "${_chunkPN5GNW6Ecjs.DEFAULT_LANE}" is reserved`);
4354
+ _chunkPRDX3HP6cjs.resolveLaneConfig.call(void 0, config2);
4355
+ if (config2.name === _chunkH6KVPVP4cjs.DEFAULT_LANE)
4356
+ throw new Error(`Lane "${_chunkH6KVPVP4cjs.DEFAULT_LANE}" is reserved`);
4356
4357
  const existing = lanes.find((l) => l.name === config2.name);
4357
4358
  if (!existing) return void lanes.push(config2);
4358
4359
  if (existing.leaseMillis !== config2.leaseMillis || existing.streamLimit !== config2.streamLimit || existing.cycleMs !== config2.cycleMs)
@@ -4394,9 +4395,9 @@ function reaction_on(event, events, builder) {
4394
4395
  // Validate the whole bag at the declaration site so a bad
4395
4396
  // `maxRetries`/`backoff`/`blockOnError` throws ZodError at build,
4396
4397
  // not a NaN gate on the first retry.
4397
- options: _chunkUPKDCTS2cjs.resolveReactionConfig.call(void 0, {
4398
- blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _159 => _159.blockOnError]), () => ( _chunkUPKDCTS2cjs.DEFAULT_BLOCK_ON_ERROR)),
4399
- maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _160 => _160.maxRetries]), () => ( _chunkUPKDCTS2cjs.DEFAULT_MAX_RETRIES)),
4398
+ options: _chunkPRDX3HP6cjs.resolveReactionConfig.call(void 0, {
4399
+ blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _159 => _159.blockOnError]), () => ( _chunkPRDX3HP6cjs.DEFAULT_BLOCK_ON_ERROR)),
4400
+ maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _160 => _160.maxRetries]), () => ( _chunkPRDX3HP6cjs.DEFAULT_MAX_RETRIES)),
4400
4401
  backoff: _optionalChain([options, 'optionalAccess', _161 => _161.backoff])
4401
4402
  })
4402
4403
  };
@@ -4417,7 +4418,7 @@ function reaction_on(event, events, builder) {
4417
4418
  // src/internal/date-reviver.ts
4418
4419
 
4419
4420
  function variant_schema(schema) {
4420
- const shape = _optionalChain([_chunkPN5GNW6Ecjs.def_of.call(void 0, schema), 'optionalAccess', _162 => _162.shape]);
4421
+ const shape = _optionalChain([_chunkH6KVPVP4cjs.def_of.call(void 0, schema), 'optionalAccess', _162 => _162.shape]);
4421
4422
  if (!shape) {
4422
4423
  const dates = date_reviver_schema(schema);
4423
4424
  return { schema: _nullishCoalesce(dates, () => ( schema)), dated: !!dates };
@@ -4432,7 +4433,7 @@ function variant_schema(schema) {
4432
4433
  return { schema: _zod.z.looseObject(next), dated };
4433
4434
  }
4434
4435
  function date_reviver_schema(schema) {
4435
- const def = _chunkPN5GNW6Ecjs.def_of.call(void 0, schema);
4436
+ const def = _chunkH6KVPVP4cjs.def_of.call(void 0, schema);
4436
4437
  if (!def) return void 0;
4437
4438
  const inner = () => date_reviver_schema(def.innerType);
4438
4439
  switch (def.type) {
@@ -4468,21 +4469,14 @@ function date_reviver_schema(schema) {
4468
4469
  return _optionalChain([inner, 'call', _163 => _163(), 'optionalAccess', _164 => _164.nullable, 'call', _165 => _165()]);
4469
4470
  case "pipe":
4470
4471
  return date_reviver_schema(def.out);
4471
- case "optional":
4472
- case "nonoptional":
4473
- case "readonly":
4474
- case "default":
4475
- case "prefault":
4476
- case "catch":
4477
- return inner();
4478
4472
  default:
4479
- return void 0;
4473
+ return _chunkH6KVPVP4cjs.inner_of.call(void 0, def) ? inner() : void 0;
4480
4474
  }
4481
4475
  }
4482
4476
 
4483
4477
  // src/builders/event-builder.ts
4484
4478
  function event_tags(schema) {
4485
- const pii = _chunkPN5GNW6Ecjs.pii_schemas.call(void 0, schema);
4479
+ const pii = _chunkH6KVPVP4cjs.pii_schemas.call(void 0, schema);
4486
4480
  const pii_dates = {};
4487
4481
  for (const [key, field] of Object.entries(pii)) {
4488
4482
  const dates = date_reviver_schema(field);
@@ -4520,7 +4514,7 @@ function make_event_reader(tags, disclosure, predicate = null) {
4520
4514
  });
4521
4515
  }
4522
4516
  function build_events(registry, states, lanes, owners) {
4523
- const declared = /* @__PURE__ */ new Set([_chunkPN5GNW6Ecjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4517
+ const declared = /* @__PURE__ */ new Set([_chunkH6KVPVP4cjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4524
4518
  const lane_errors = [];
4525
4519
  const tags = /* @__PURE__ */ new Map();
4526
4520
  const sensitive2 = /* @__PURE__ */ new Map();
@@ -4595,7 +4589,7 @@ function build_events(registry, states, lanes, owners) {
4595
4589
  if (reader) readers.set(event_name, reader);
4596
4590
  }
4597
4591
  const snap2 = make_event_reader(event_tags(state2.state), "redact", null);
4598
- if (snap2) readers.set(_chunkPN5GNW6Ecjs.SNAP_EVENT, snap2);
4592
+ if (snap2) readers.set(_chunkH6KVPVP4cjs.SNAP_EVENT, snap2);
4599
4593
  if (readers.size === 0) continue;
4600
4594
  state2.view = (event, actor) => (_nullishCoalesce(readers.get(event.name), () => ( IDENTITY_GATE)))(event, actor);
4601
4595
  }
@@ -4603,7 +4597,7 @@ function build_events(registry, states, lanes, owners) {
4603
4597
  return { sensitive: sensitive2, advisory, query_readers, handler_readers };
4604
4598
  }
4605
4599
  function reads_as_string(schema) {
4606
- const type = _optionalChain([_chunkPN5GNW6Ecjs.def_of.call(void 0, _chunkPN5GNW6Ecjs.output_of.call(void 0, schema)), 'optionalAccess', _166 => _166.type]);
4600
+ const type = _optionalChain([_chunkH6KVPVP4cjs.def_of.call(void 0, _chunkH6KVPVP4cjs.output_of.call(void 0, schema)), 'optionalAccess', _166 => _166.type]);
4607
4601
  return type === "string" || type === "transform";
4608
4602
  }
4609
4603
 
@@ -4715,7 +4709,7 @@ function act() {
4715
4709
  const list = deprecation_summary.map(
4716
4710
  (d) => `"${d.deprecated}" (current: "${d.current}", state: "${d.state_name}")`
4717
4711
  ).join(", ");
4718
- _chunkUPKDCTS2cjs.log.call(void 0, ).info(
4712
+ _chunkPRDX3HP6cjs.log.call(void 0, ).info(
4719
4713
  `Act registered ${deprecation_summary.length} deprecated event(s): ${list}. These are legacy versions kept for the read path. Consider truncating closed streams via app.close() when feasible to reduce historical event load. See docs/docs/architecture/event-schema-evolution.md.`
4720
4714
  );
4721
4715
  }
@@ -4757,7 +4751,7 @@ function act() {
4757
4751
  return reaction_on(event, registry.events, builder);
4758
4752
  },
4759
4753
  build: (options) => {
4760
- _chunkUPKDCTS2cjs.resolveActConfig.call(void 0, options);
4754
+ _chunkPRDX3HP6cjs.resolveActConfig.call(void 0, options);
4761
4755
  if (!_built) {
4762
4756
  for (const proj of pending_projections) add_projection(proj);
4763
4757
  for (const proj of fold_projections) {
@@ -4797,7 +4791,7 @@ function act() {
4797
4791
  for (const [name, gate] of built.query_readers) _qg.set(name, gate);
4798
4792
  for (const [name, gate] of built.handler_readers) _hr.set(name, gate);
4799
4793
  finalize_deprecations();
4800
- if (built.advisory) _chunkUPKDCTS2cjs.log.call(void 0, ).warn(built.advisory);
4794
+ if (built.advisory) _chunkPRDX3HP6cjs.log.call(void 0, ).warn(built.advisory);
4801
4795
  for (const state2 of states.values()) {
4802
4796
  if (state2.disclose) _dp.set(state2.name, state2.disclose);
4803
4797
  if (state2.autoclose) _ac.set(state2.name, state2.autoclose);
@@ -4809,7 +4803,7 @@ function act() {
4809
4803
  synthesize_autoclose_reactions(
4810
4804
  registry,
4811
4805
  states,
4812
- _chunkUPKDCTS2cjs.current_autoclose_window
4806
+ _chunkPRDX3HP6cjs.current_autoclose_window
4813
4807
  );
4814
4808
  Object.freeze(registry.actions);
4815
4809
  Object.freeze(registry.events);
@@ -4857,8 +4851,8 @@ function _projection(target) {
4857
4851
  handler,
4858
4852
  resolver: _nullishCoalesce(default_resolver, () => ( _this_)),
4859
4853
  options: {
4860
- blockOnError: _chunkUPKDCTS2cjs.DEFAULT_BLOCK_ON_ERROR,
4861
- maxRetries: _chunkUPKDCTS2cjs.DEFAULT_MAX_RETRIES
4854
+ blockOnError: _chunkPRDX3HP6cjs.DEFAULT_BLOCK_ON_ERROR,
4855
+ maxRetries: _chunkPRDX3HP6cjs.DEFAULT_MAX_RETRIES
4862
4856
  }
4863
4857
  }),
4864
4858
  widened
@@ -4899,7 +4893,7 @@ function _projection(target) {
4899
4893
  throw new Error(
4900
4894
  `Projection "${target}" .of() partials must share one state name \u2014 got "${name}" and "${partial.name}"`
4901
4895
  );
4902
- const config2 = _chunkUPKDCTS2cjs.resolveFoldConfig.call(void 0, options);
4896
+ const config2 = _chunkPRDX3HP6cjs.resolveFoldConfig.call(void 0, options);
4903
4897
  const fold_events = {};
4904
4898
  for (const partial of partials)
4905
4899
  for (const [event_name, schema] of Object.entries(partial.events)) {
@@ -4917,8 +4911,8 @@ function _projection(target) {
4917
4911
  handler: noop,
4918
4912
  resolver: { target },
4919
4913
  options: {
4920
- blockOnError: _chunkUPKDCTS2cjs.DEFAULT_BLOCK_ON_ERROR,
4921
- maxRetries: _chunkUPKDCTS2cjs.DEFAULT_MAX_RETRIES
4914
+ blockOnError: _chunkPRDX3HP6cjs.DEFAULT_BLOCK_ON_ERROR,
4915
+ maxRetries: _chunkPRDX3HP6cjs.DEFAULT_MAX_RETRIES
4922
4916
  }
4923
4917
  }
4924
4918
  ]
@@ -5034,7 +5028,7 @@ function action_builder(state2) {
5034
5028
  throw new Error(`Duplicate action "${action2}"`);
5035
5029
  internal.actions[action2] = schema;
5036
5030
  if (options) {
5037
- _chunkUPKDCTS2cjs.resolveActionConfig.call(void 0, options);
5031
+ _chunkPRDX3HP6cjs.resolveActionConfig.call(void 0, options);
5038
5032
  internal.options ??= {};
5039
5033
  internal.options[action2] = options;
5040
5034
  }
@@ -5327,5 +5321,5 @@ function write_line(writer, line) {
5327
5321
 
5328
5322
 
5329
5323
 
5330
- exports.Act = Act; exports.ActorSchema = _chunkPN5GNW6Ecjs.ActorSchema; exports.CausationEventSchema = _chunkPN5GNW6Ecjs.CausationEventSchema; exports.CommittedMetaSchema = _chunkPN5GNW6Ecjs.CommittedMetaSchema; exports.ConcurrencyError = _chunkPN5GNW6Ecjs.ConcurrencyError; exports.ConsoleLogger = _chunkUPKDCTS2cjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunkPN5GNW6Ecjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunkPN5GNW6Ecjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunkPN5GNW6Ecjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunkPN5GNW6Ecjs.DeferSignal; exports.Environments = _chunkPN5GNW6Ecjs.Environments; exports.Errors = _chunkPN5GNW6Ecjs.Errors; exports.EventMetaSchema = _chunkPN5GNW6Ecjs.EventMetaSchema; exports.ExitCodes = _chunkPN5GNW6Ecjs.ExitCodes; exports.InMemoryCache = _chunkUPKDCTS2cjs.InMemoryCache; exports.InMemoryStore = _chunkUPKDCTS2cjs.InMemoryStore; exports.InvariantError = _chunkPN5GNW6Ecjs.InvariantError; exports.LogLevels = _chunkPN5GNW6Ecjs.LogLevels; exports.NonRetryableError = _chunkPN5GNW6Ecjs.NonRetryableError; exports.PackageSchema = _chunkUPKDCTS2cjs.PackageSchema; exports.PreconditionError = _chunkPN5GNW6Ecjs.PreconditionError; exports.QuerySchema = _chunkPN5GNW6Ecjs.QuerySchema; exports.REDACTED = _chunkPN5GNW6Ecjs.REDACTED; exports.SHREDDED = _chunkPN5GNW6Ecjs.SHREDDED; exports.SNAP_EVENT = _chunkPN5GNW6Ecjs.SNAP_EVENT; exports.StoreError = _chunkPN5GNW6Ecjs.StoreError; exports.StreamClosedError = _chunkPN5GNW6Ecjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunkPN5GNW6Ecjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunkPN5GNW6Ecjs.TargetSchema; exports.ValidationError = _chunkPN5GNW6Ecjs.ValidationError; exports.ZodEmpty = _chunkPN5GNW6Ecjs.ZodEmpty; exports.act = act; exports.cache = _chunkUPKDCTS2cjs.cache; exports.config = _chunkUPKDCTS2cjs.config; exports.dateReviver = _chunkUPKDCTS2cjs.dateReviver; exports.default_scope = _chunkUPKDCTS2cjs.default_scope; exports.dispose = _chunkUPKDCTS2cjs.dispose; exports.disposeAndExit = _chunkUPKDCTS2cjs.disposeAndExit; exports.extend = _chunkUPKDCTS2cjs.extend; exports.is_literal_source = _chunkUPKDCTS2cjs.is_literal_source; exports.log = _chunkUPKDCTS2cjs.log; exports.pii_fields = _chunkPN5GNW6Ecjs.pii_fields; exports.port = _chunkUPKDCTS2cjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunkUPKDCTS2cjs.resolveAutocloseConfig2; exports.sensitive = _chunkPN5GNW6Ecjs.sensitive; exports.sleep = _chunkUPKDCTS2cjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunkUPKDCTS2cjs.store; exports.validate = _chunkUPKDCTS2cjs.validate;
5324
+ exports.Act = Act; exports.ActorSchema = _chunkH6KVPVP4cjs.ActorSchema; exports.CausationEventSchema = _chunkH6KVPVP4cjs.CausationEventSchema; exports.CommittedMetaSchema = _chunkH6KVPVP4cjs.CommittedMetaSchema; exports.ConcurrencyError = _chunkH6KVPVP4cjs.ConcurrencyError; exports.ConsoleLogger = _chunkPRDX3HP6cjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunkH6KVPVP4cjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunkH6KVPVP4cjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunkH6KVPVP4cjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunkH6KVPVP4cjs.DeferSignal; exports.Environments = _chunkH6KVPVP4cjs.Environments; exports.Errors = _chunkH6KVPVP4cjs.Errors; exports.EventMetaSchema = _chunkH6KVPVP4cjs.EventMetaSchema; exports.ExitCodes = _chunkH6KVPVP4cjs.ExitCodes; exports.InMemoryCache = _chunkPRDX3HP6cjs.InMemoryCache; exports.InMemoryStore = _chunkPRDX3HP6cjs.InMemoryStore; exports.InvariantError = _chunkH6KVPVP4cjs.InvariantError; exports.LogLevels = _chunkH6KVPVP4cjs.LogLevels; exports.NonRetryableError = _chunkH6KVPVP4cjs.NonRetryableError; exports.PackageSchema = _chunkPRDX3HP6cjs.PackageSchema; exports.PreconditionError = _chunkH6KVPVP4cjs.PreconditionError; exports.QuerySchema = _chunkH6KVPVP4cjs.QuerySchema; exports.REDACTED = _chunkH6KVPVP4cjs.REDACTED; exports.SHREDDED = _chunkH6KVPVP4cjs.SHREDDED; exports.SNAP_EVENT = _chunkH6KVPVP4cjs.SNAP_EVENT; exports.StoreError = _chunkH6KVPVP4cjs.StoreError; exports.StreamClosedError = _chunkH6KVPVP4cjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunkH6KVPVP4cjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunkH6KVPVP4cjs.TargetSchema; exports.ValidationError = _chunkH6KVPVP4cjs.ValidationError; exports.ZodEmpty = _chunkH6KVPVP4cjs.ZodEmpty; exports.act = act; exports.cache = _chunkPRDX3HP6cjs.cache; exports.config = _chunkPRDX3HP6cjs.config; exports.dateReviver = _chunkPRDX3HP6cjs.dateReviver; exports.default_scope = _chunkPRDX3HP6cjs.default_scope; exports.dispose = _chunkPRDX3HP6cjs.dispose; exports.disposeAndExit = _chunkPRDX3HP6cjs.disposeAndExit; exports.extend = _chunkPRDX3HP6cjs.extend; exports.is_literal_source = _chunkPRDX3HP6cjs.is_literal_source; exports.log = _chunkPRDX3HP6cjs.log; exports.pii_fields = _chunkH6KVPVP4cjs.pii_fields; exports.port = _chunkPRDX3HP6cjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunkPRDX3HP6cjs.resolveAutocloseConfig2; exports.sensitive = _chunkH6KVPVP4cjs.sensitive; exports.sleep = _chunkPRDX3HP6cjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunkPRDX3HP6cjs.store; exports.validate = _chunkPRDX3HP6cjs.validate;
5331
5325
  //# sourceMappingURL=index.cjs.map