@rotorsoft/act 1.33.20 → 1.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
 
42
42
 
43
- var _chunkGEUBNZ3Bcjs = require('./chunk-GEUBNZ3B.cjs');
43
+ var _chunkBTLM7SW4cjs = require('./chunk-BTLM7SW4.cjs');
44
44
 
45
45
 
46
46
 
@@ -70,24 +70,24 @@ var _chunkGEUBNZ3Bcjs = require('./chunk-GEUBNZ3B.cjs');
70
70
 
71
71
 
72
72
 
73
- var _chunkDVYTKZD5cjs = require('./chunk-DVYTKZD5.cjs');
73
+ var _chunkRF5MV72Kcjs = require('./chunk-RF5MV72K.cjs');
74
74
 
75
75
  // src/signals.ts
76
76
  process.once("SIGINT", async (arg) => {
77
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).info(arg, "SIGINT");
78
- await _chunkGEUBNZ3Bcjs.disposeAndExit.call(void 0, "EXIT");
77
+ _chunkBTLM7SW4cjs.log.call(void 0, ).info(arg, "SIGINT");
78
+ await _chunkBTLM7SW4cjs.disposeAndExit.call(void 0, "EXIT");
79
79
  });
80
80
  process.once("SIGTERM", async (arg) => {
81
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).info(arg, "SIGTERM");
82
- await _chunkGEUBNZ3Bcjs.disposeAndExit.call(void 0, "EXIT");
81
+ _chunkBTLM7SW4cjs.log.call(void 0, ).info(arg, "SIGTERM");
82
+ await _chunkBTLM7SW4cjs.disposeAndExit.call(void 0, "EXIT");
83
83
  });
84
84
  process.once("uncaughtException", async (arg) => {
85
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).error(arg, "Uncaught Exception");
86
- await _chunkGEUBNZ3Bcjs.disposeAndExit.call(void 0, "ERROR");
85
+ _chunkBTLM7SW4cjs.log.call(void 0, ).error(arg, "Uncaught Exception");
86
+ await _chunkBTLM7SW4cjs.disposeAndExit.call(void 0, "ERROR");
87
87
  });
88
88
  process.once("unhandledRejection", async (arg) => {
89
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
90
- await _chunkGEUBNZ3Bcjs.disposeAndExit.call(void 0, "ERROR");
89
+ _chunkBTLM7SW4cjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
90
+ await _chunkBTLM7SW4cjs.disposeAndExit.call(void 0, "ERROR");
91
91
  });
92
92
 
93
93
  // src/act.ts
@@ -195,7 +195,7 @@ async function* audit(deps, categories, options = {}) {
195
195
  if (need_stats) {
196
196
  const stats = await deps.store().query_stats(
197
197
  {},
198
- { count: true, names: true, exclude: [_chunkDVYTKZD5cjs.SNAP_EVENT] }
198
+ { count: true, names: true, exclude: [_chunkRF5MV72Kcjs.SNAP_EVENT] }
199
199
  );
200
200
  for (const [stream, s] of stats) {
201
201
  for (const p of passes) _optionalChain([p, 'access', _4 => _4.on_stat, 'optionalCall', _5 => _5(stream, s)]);
@@ -277,7 +277,7 @@ var make_schema_pass = (deps) => {
277
277
  return;
278
278
  }
279
279
  const schema = state2.events[name];
280
- const sensitive2 = _chunkDVYTKZD5cjs.pii_fields.call(void 0, schema);
280
+ const sensitive2 = _chunkRF5MV72Kcjs.pii_fields.call(void 0, schema);
281
281
  let parse_schema = schema;
282
282
  if (sensitive2.length > 0) {
283
283
  const omitter = schema.omit;
@@ -411,7 +411,7 @@ var make_restart_candidate_pass = (deps, options) => {
411
411
  {
412
412
  stream,
413
413
  stream_exact: true,
414
- names: [_chunkDVYTKZD5cjs.SNAP_EVENT],
414
+ names: [_chunkRF5MV72Kcjs.SNAP_EVENT],
415
415
  with_snaps: true
416
416
  }
417
417
  );
@@ -840,7 +840,7 @@ async function run_close_cycle(targets, deps) {
840
840
  deps,
841
841
  () => run_full_closes(full, target_map, deps, skipped)
842
842
  );
843
- const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkDVYTKZD5cjs.TOMBSTONE_EVENT).map(([stream]) => stream);
843
+ const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkRF5MV72Kcjs.TOMBSTONE_EVENT).map(([stream]) => stream);
844
844
  if (retired.length) _optionalChain([deps, 'access', _42 => _42.forget_subscribed, 'optionalCall', _43 => _43(retired)]);
845
845
  for (const [stream, entry] of windowed_result) truncated.set(stream, entry);
846
846
  return { truncated, skipped };
@@ -922,7 +922,7 @@ async function run_windowed_closes(windowed, deps, skipped) {
922
922
  if (!await windowed_prune_pending(t.stream, t.before, max_id))
923
923
  return void 0;
924
924
  if (t.archive) await t.archive();
925
- const result = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).truncate([
925
+ const result = await _chunkBTLM7SW4cjs.store.call(void 0, ).truncate([
926
926
  { stream: t.stream, before: t.before, max_id }
927
927
  ]);
928
928
  return result.get(t.stream);
@@ -935,10 +935,10 @@ async function run_windowed_closes(windowed, deps, skipped) {
935
935
  async function windowed_prune_pending(stream, before, max_id) {
936
936
  let boundary_id;
937
937
  let min_id;
938
- await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query(
938
+ await _chunkBTLM7SW4cjs.store.call(void 0, ).query(
939
939
  (event) => {
940
940
  if (min_id === void 0 || event.id < min_id) min_id = event.id;
941
- if (event.name === _chunkDVYTKZD5cjs.SNAP_EVENT && event.created < before && (max_id === void 0 || event.id <= max_id) && (boundary_id === void 0 || event.id > boundary_id))
941
+ if (event.name === _chunkRF5MV72Kcjs.SNAP_EVENT && event.created < before && (max_id === void 0 || event.id <= max_id) && (boundary_id === void 0 || event.id > boundary_id))
942
942
  boundary_id = event.id;
943
943
  },
944
944
  { stream, stream_exact: true, with_snaps: true, after: -1 }
@@ -949,7 +949,7 @@ async function probe_min_watermarks(streams, page_size, checkpoint) {
949
949
  const min_at = /* @__PURE__ */ new Map();
950
950
  const matches = source_matcher();
951
951
  await walk_streams(
952
- _chunkGEUBNZ3Bcjs.store.call(void 0, ),
952
+ _chunkBTLM7SW4cjs.store.call(void 0, ),
953
953
  (position) => {
954
954
  const pending = position.correlated_at === void 0 || position.at < position.correlated_at;
955
955
  const cap = pending ? position.at : Math.max(position.at, checkpoint);
@@ -977,17 +977,17 @@ function source_matcher() {
977
977
  };
978
978
  }
979
979
  async function scan_stream_heads(streams) {
980
- const stats = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query_stats(streams, {
981
- exclude: [_chunkDVYTKZD5cjs.SNAP_EVENT]
980
+ const stats = await _chunkBTLM7SW4cjs.store.call(void 0, ).query_stats(streams, {
981
+ exclude: [_chunkRF5MV72Kcjs.SNAP_EVENT]
982
982
  });
983
- const domain_heads = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query_stats(streams, {
984
- exclude: [_chunkDVYTKZD5cjs.SNAP_EVENT, _chunkDVYTKZD5cjs.TOMBSTONE_EVENT]
983
+ const domain_heads = await _chunkBTLM7SW4cjs.store.call(void 0, ).query_stats(streams, {
984
+ exclude: [_chunkRF5MV72Kcjs.SNAP_EVENT, _chunkRF5MV72Kcjs.TOMBSTONE_EVENT]
985
985
  });
986
- const true_heads = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query_stats(streams, {});
986
+ const true_heads = await _chunkBTLM7SW4cjs.store.call(void 0, ).query_stats(streams, {});
987
987
  const out = /* @__PURE__ */ new Map();
988
988
  for (const [stream, { head }] of domain_heads) {
989
989
  const marker_head = _optionalChain([stats, 'access', _45 => _45.get, 'call', _46 => _46(stream), 'optionalAccess', _47 => _47.head]);
990
- const interrupted = _optionalChain([marker_head, 'optionalAccess', _48 => _48.name]) === _chunkDVYTKZD5cjs.TOMBSTONE_EVENT;
990
+ const interrupted = _optionalChain([marker_head, 'optionalAccess', _48 => _48.name]) === _chunkRF5MV72Kcjs.TOMBSTONE_EVENT;
991
991
  out.set(stream, {
992
992
  max_id: head.id,
993
993
  version: true_heads.get(stream).head.version,
@@ -1011,7 +1011,7 @@ async function partition_by_safety(stream_info, reactive, skipped, page_size, ca
1011
1011
  const matches = source_matcher();
1012
1012
  const targets = [...stream_info.keys()];
1013
1013
  await walk_streams(
1014
- _chunkGEUBNZ3Bcjs.store.call(void 0, ),
1014
+ _chunkBTLM7SW4cjs.store.call(void 0, ),
1015
1015
  (position) => {
1016
1016
  const has_work = position.correlated_at !== void 0 && position.at < position.correlated_at;
1017
1017
  if (!has_work) return;
@@ -1077,7 +1077,7 @@ async function run_archive_callbacks(guarded, target_map) {
1077
1077
  }
1078
1078
  }
1079
1079
  async function heads_still_guarded(guarded, guard_events, skipped) {
1080
- const heads = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query_stats(guarded, {});
1080
+ const heads = await _chunkBTLM7SW4cjs.store.call(void 0, ).query_stats(guarded, {});
1081
1081
  return guarded.filter((stream) => {
1082
1082
  if (_optionalChain([heads, 'access', _55 => _55.get, 'call', _56 => _56(stream), 'optionalAccess', _57 => _57.head, 'access', _58 => _58.id]) === guard_events.get(stream).id)
1083
1083
  return true;
@@ -1095,18 +1095,18 @@ async function truncate_and_warm_cache(guarded, seed_states, guard_events, corre
1095
1095
  meta: {
1096
1096
  correlation,
1097
1097
  causation: {
1098
- event: { id: guard.id, name: _chunkDVYTKZD5cjs.TOMBSTONE_EVENT, stream: guard.stream }
1098
+ event: { id: guard.id, name: _chunkRF5MV72Kcjs.TOMBSTONE_EVENT, stream: guard.stream }
1099
1099
  }
1100
1100
  }
1101
1101
  };
1102
1102
  });
1103
- const truncated = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).truncate(trunc_targets);
1103
+ const truncated = await _chunkBTLM7SW4cjs.store.call(void 0, ).truncate(trunc_targets);
1104
1104
  await Promise.all(
1105
1105
  guarded.map(async (stream) => {
1106
1106
  const entry = truncated.get(stream);
1107
1107
  const state2 = seed_states.get(stream);
1108
1108
  if (state2 && entry) {
1109
- await _chunkGEUBNZ3Bcjs.cache.call(void 0, ).set(stream, {
1109
+ await _chunkBTLM7SW4cjs.cache.call(void 0, ).set(stream, {
1110
1110
  stream,
1111
1111
  state: state2,
1112
1112
  version: entry.committed.version,
@@ -1115,7 +1115,7 @@ async function truncate_and_warm_cache(guarded, seed_states, guard_events, corre
1115
1115
  snaps: 1
1116
1116
  });
1117
1117
  } else {
1118
- await _chunkGEUBNZ3Bcjs.cache.call(void 0, ).invalidate(stream);
1118
+ await _chunkBTLM7SW4cjs.cache.call(void 0, ).invalidate(stream);
1119
1119
  }
1120
1120
  })
1121
1121
  );
@@ -1129,7 +1129,7 @@ var _crypto = require('crypto');
1129
1129
  function report_once(seen, key, message) {
1130
1130
  if (seen.has(key)) return;
1131
1131
  seen.add(key);
1132
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).error(new Error(message));
1132
+ _chunkBTLM7SW4cjs.log.call(void 0, ).error(new Error(message));
1133
1133
  }
1134
1134
 
1135
1135
  // src/internal/correlate-cycle.ts
@@ -1180,7 +1180,7 @@ var CorrelateCycle = (_class3 = class {
1180
1180
  // never lets a resolution re-lane them.
1181
1181
 
1182
1182
  __init11() {this._static_subscriptions = /* @__PURE__ */ new Map()}
1183
- __init12() {this._patterns = new (0, _chunkGEUBNZ3Bcjs.LruMap)(PATTERN_CACHE_SIZE)}
1183
+ __init12() {this._patterns = new (0, _chunkBTLM7SW4cjs.LruMap)(PATTERN_CACHE_SIZE)}
1184
1184
 
1185
1185
 
1186
1186
 
@@ -1198,7 +1198,7 @@ var CorrelateCycle = (_class3 = class {
1198
1198
  on_init
1199
1199
  }) {;_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);
1200
1200
  this._key = shard ? `${registry_key(registry.events)}:${[...shard].sort().join(",")}` : registry_key(registry.events);
1201
- this._dynamic_subscriptions = new (0, _chunkGEUBNZ3Bcjs.LruMap)(max_subscribed_streams);
1201
+ this._dynamic_subscriptions = new (0, _chunkBTLM7SW4cjs.LruMap)(max_subscribed_streams);
1202
1202
  this._registry = registry;
1203
1203
  this._declared_lanes = declared_lanes;
1204
1204
  this._static_targets = static_targets;
@@ -1256,7 +1256,7 @@ var CorrelateCycle = (_class3 = class {
1256
1256
  /** Would the target's own `fetch` (filtered by `source`) return this event? */
1257
1257
  _in_fetch_window(source, stream) {
1258
1258
  if (source === void 0 || source === stream) return true;
1259
- if (_chunkGEUBNZ3Bcjs.is_literal_source.call(void 0, source)) return false;
1259
+ if (_chunkBTLM7SW4cjs.is_literal_source.call(void 0, source)) return false;
1260
1260
  let pattern = this._patterns.get(source);
1261
1261
  if (!pattern) {
1262
1262
  pattern = new RegExp(source);
@@ -1299,7 +1299,7 @@ var CorrelateCycle = (_class3 = class {
1299
1299
  const correlated = /* @__PURE__ */ new Map();
1300
1300
  let last_id = after;
1301
1301
  let stopped = false;
1302
- const found = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query(
1302
+ const found = await _chunkBTLM7SW4cjs.store.call(void 0, ).query(
1303
1303
  (event) => {
1304
1304
  if (stopped) return;
1305
1305
  const register = this._registry.events[event.name];
@@ -1344,9 +1344,9 @@ var CorrelateCycle = (_class3 = class {
1344
1344
  correlated_at: void 0
1345
1345
  };
1346
1346
  const seen_in_scan = correlated.has(resolved.target);
1347
- const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunkDVYTKZD5cjs.DEFAULT_LANE));
1347
+ const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunkRF5MV72Kcjs.DEFAULT_LANE));
1348
1348
  const held_priority = seen_in_scan ? entry.priority : _optionalChain([recorded, 'optionalAccess', _62 => _62.priority]);
1349
- const resolved_lane = _nullishCoalesce(lane, () => ( _chunkDVYTKZD5cjs.DEFAULT_LANE));
1349
+ const resolved_lane = _nullishCoalesce(lane, () => ( _chunkRF5MV72Kcjs.DEFAULT_LANE));
1350
1350
  if (held_priority === priority && held_lane !== resolved_lane)
1351
1351
  report_lane_conflict(
1352
1352
  this._reported,
@@ -1422,7 +1422,7 @@ var CorrelateCycle = (_class3 = class {
1422
1422
  await Promise.all(
1423
1423
  missed.map(async ([stream, entry]) => {
1424
1424
  let row;
1425
- await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query_streams(
1425
+ await _chunkBTLM7SW4cjs.store.call(void 0, ).query_streams(
1426
1426
  (position) => {
1427
1427
  row = position;
1428
1428
  },
@@ -1434,8 +1434,8 @@ var CorrelateCycle = (_class3 = class {
1434
1434
  lane: row.lane
1435
1435
  });
1436
1436
  if (entry.priority > row.priority) return;
1437
- const held_lane = _nullishCoalesce(row.lane, () => ( _chunkDVYTKZD5cjs.DEFAULT_LANE));
1438
- const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunkDVYTKZD5cjs.DEFAULT_LANE));
1437
+ const held_lane = _nullishCoalesce(row.lane, () => ( _chunkRF5MV72Kcjs.DEFAULT_LANE));
1438
+ const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunkRF5MV72Kcjs.DEFAULT_LANE));
1439
1439
  if (entry.priority === row.priority && held_lane !== resolved_lane)
1440
1440
  report_lane_conflict(
1441
1441
  this._reported,
@@ -1461,7 +1461,7 @@ var CorrelateCycle = (_class3 = class {
1461
1461
  millis: 0
1462
1462
  });
1463
1463
  } catch (error) {
1464
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).warn(
1464
+ _chunkBTLM7SW4cjs.log.call(void 0, ).warn(
1465
1465
  `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)}`
1466
1466
  );
1467
1467
  }
@@ -1614,14 +1614,14 @@ function compute_lag_lead_ratio(handled, lagging, leading) {
1614
1614
  }
1615
1615
 
1616
1616
  // src/internal/drain-ops.ts
1617
- var claim = (lagging, leading, by, millis, lane) => _chunkGEUBNZ3Bcjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1617
+ var claim = (lagging, leading, by, millis, lane) => _chunkBTLM7SW4cjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1618
1618
  async function fetch(leased, eventLimit) {
1619
1619
  return Promise.all(
1620
1620
  leased.map(async ({ stream, source, at, lagging }) => {
1621
1621
  const events = [];
1622
- const stream_exact = source !== void 0 && _chunkGEUBNZ3Bcjs.is_literal_source.call(void 0, source) ? true : void 0;
1622
+ const stream_exact = source !== void 0 && _chunkBTLM7SW4cjs.is_literal_source.call(void 0, source) ? true : void 0;
1623
1623
  try {
1624
- await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query((e) => events.push(e), {
1624
+ await _chunkBTLM7SW4cjs.store.call(void 0, ).query((e) => events.push(e), {
1625
1625
  stream: source,
1626
1626
  stream_exact,
1627
1627
  after: at,
@@ -1641,30 +1641,30 @@ async function fetch(leased, eventLimit) {
1641
1641
  })
1642
1642
  );
1643
1643
  }
1644
- var ack = (leases) => _chunkGEUBNZ3Bcjs.store.call(void 0, ).ack(leases);
1645
- var block = (leases) => _chunkGEUBNZ3Bcjs.store.call(void 0, ).block(leases);
1646
- var subscribe = (streams, correlated_at, correlator) => _chunkGEUBNZ3Bcjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1644
+ var ack = (leases) => _chunkBTLM7SW4cjs.store.call(void 0, ).ack(leases);
1645
+ var block = (leases) => _chunkBTLM7SW4cjs.store.call(void 0, ).block(leases);
1646
+ var subscribe = (streams, correlated_at, correlator) => _chunkBTLM7SW4cjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1647
1647
 
1648
1648
  // src/internal/event-sourcing.ts
1649
1649
  var _actpatch = require('@rotorsoft/act-patch');
1650
1650
  var bare_patch = (_me, state2, partial) => _actpatch.patch.call(void 0, state2, partial);
1651
1651
  var validating_patch = (me, state2, partial, event) => {
1652
1652
  const next = _actpatch.patch.call(void 0, state2, partial);
1653
- return _chunkGEUBNZ3Bcjs.validate.call(void 0,
1653
+ return _chunkBTLM7SW4cjs.validate.call(void 0,
1654
1654
  `${me.name}.${String(event.name)}#${event.id}`,
1655
1655
  next,
1656
1656
  me.state
1657
1657
  );
1658
1658
  };
1659
1659
  var DEFAULT_BATCH = 500;
1660
- var cache_put = (stream, entry) => _chunkGEUBNZ3Bcjs.cache.call(void 0, ).set(stream, entry).catch(
1661
- (err) => _chunkGEUBNZ3Bcjs.log.call(void 0, ).warn(
1660
+ var cache_put = (stream, entry) => _chunkBTLM7SW4cjs.cache.call(void 0, ).set(stream, entry).catch(
1661
+ (err) => _chunkBTLM7SW4cjs.log.call(void 0, ).warn(
1662
1662
  err,
1663
1663
  "cache set skipped; the next load re-folds from the store"
1664
1664
  )
1665
1665
  );
1666
- var cache_drop = (stream) => _chunkGEUBNZ3Bcjs.cache.call(void 0, ).invalidate(stream).catch(
1667
- (err) => _chunkGEUBNZ3Bcjs.log.call(void 0, ).warn(
1666
+ var cache_drop = (stream) => _chunkBTLM7SW4cjs.cache.call(void 0, ).invalidate(stream).catch(
1667
+ (err) => _chunkBTLM7SW4cjs.log.call(void 0, ).warn(
1668
1668
  err,
1669
1669
  "cache invalidate skipped; a stale checkpoint re-folds from its event_id"
1670
1670
  )
@@ -1672,9 +1672,9 @@ var cache_drop = (stream) => _chunkGEUBNZ3Bcjs.cache.call(void 0, ).invalidate(s
1672
1672
  async function snap(snapshot) {
1673
1673
  const { id, stream, name, meta, version } = snapshot.event;
1674
1674
  try {
1675
- const [committed] = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).commit(
1675
+ const [committed] = await _chunkBTLM7SW4cjs.store.call(void 0, ).commit(
1676
1676
  stream,
1677
- [{ name: _chunkDVYTKZD5cjs.SNAP_EVENT, data: snapshot.state }],
1677
+ [{ name: _chunkRF5MV72Kcjs.SNAP_EVENT, data: snapshot.state }],
1678
1678
  {
1679
1679
  correlation: meta.correlation,
1680
1680
  causation: { event: { id, name, stream } }
@@ -1685,22 +1685,22 @@ async function snap(snapshot) {
1685
1685
  return committed;
1686
1686
  } catch (error) {
1687
1687
  const reason = error instanceof Error ? error.message : String(error);
1688
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).warn(
1688
+ _chunkBTLM7SW4cjs.log.call(void 0, ).warn(
1689
1689
  `Snapshot write failed on stream "${stream}": ${reason} \u2014 cold starts will replay full history until snapshots succeed.`
1690
1690
  );
1691
1691
  }
1692
1692
  }
1693
1693
  async function tombstone(stream, expectedVersion, correlation) {
1694
1694
  try {
1695
- const [committed] = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).commit(
1695
+ const [committed] = await _chunkBTLM7SW4cjs.store.call(void 0, ).commit(
1696
1696
  stream,
1697
- [{ name: _chunkDVYTKZD5cjs.TOMBSTONE_EVENT, data: {} }],
1697
+ [{ name: _chunkRF5MV72Kcjs.TOMBSTONE_EVENT, data: {} }],
1698
1698
  { correlation, causation: {} },
1699
1699
  expectedVersion
1700
1700
  );
1701
1701
  return committed;
1702
1702
  } catch (error) {
1703
- if (error instanceof _chunkDVYTKZD5cjs.ConcurrencyError) return void 0;
1703
+ if (error instanceof _chunkRF5MV72Kcjs.ConcurrencyError) return void 0;
1704
1704
  throw error;
1705
1705
  }
1706
1706
  }
@@ -1730,9 +1730,9 @@ async function scan(source, opts = {}, callback) {
1730
1730
  if (drop_closed_streams) {
1731
1731
  await source.query(
1732
1732
  (e) => {
1733
- if (e.name === _chunkDVYTKZD5cjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1733
+ if (e.name === _chunkRF5MV72Kcjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1734
1734
  },
1735
- { names: [_chunkDVYTKZD5cjs.TOMBSTONE_EVENT] }
1735
+ { names: [_chunkRF5MV72Kcjs.TOMBSTONE_EVENT] }
1736
1736
  );
1737
1737
  }
1738
1738
  let max_id;
@@ -1754,11 +1754,11 @@ async function scan(source, opts = {}, callback) {
1754
1754
  if (!is_valid(event))
1755
1755
  throw new Error(`Invalid event at index ${processed}`);
1756
1756
  if (on_progress) on_progress({ processed, id: event.id, max_id });
1757
- if (drop_snapshots && event.name === _chunkDVYTKZD5cjs.SNAP_EVENT) {
1757
+ if (drop_snapshots && event.name === _chunkRF5MV72Kcjs.SNAP_EVENT) {
1758
1758
  dropped_snaps++;
1759
1759
  return;
1760
1760
  }
1761
- if (closed_streams.has(event.stream) && event.name !== _chunkDVYTKZD5cjs.TOMBSTONE_EVENT) {
1761
+ if (closed_streams.has(event.stream) && event.name !== _chunkRF5MV72Kcjs.TOMBSTONE_EVENT) {
1762
1762
  dropped_closed++;
1763
1763
  return;
1764
1764
  }
@@ -1825,17 +1825,17 @@ async function scan(source, opts = {}, callback) {
1825
1825
  async function load(me, target, callback, patch_fn = bare_patch) {
1826
1826
  const { stream, actor, asOf } = target;
1827
1827
  const time_travel = !!asOf && Object.values(asOf).some((v) => v !== void 0);
1828
- const cached = time_travel ? void 0 : await _chunkGEUBNZ3Bcjs.cache.call(void 0, ).get(stream);
1828
+ const cached = time_travel ? void 0 : await _chunkBTLM7SW4cjs.cache.call(void 0, ).get(stream);
1829
1829
  const cache_hit = !!cached;
1830
1830
  let state2 = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _72 => _72.state]), () => ( (me.init ? me.init() : {})));
1831
1831
  let patches = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _73 => _73.patches]), () => ( 0));
1832
1832
  let snaps = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _74 => _74.snaps]), () => ( 0));
1833
1833
  let replayed = 0;
1834
1834
  let event;
1835
- await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query(
1835
+ await _chunkBTLM7SW4cjs.store.call(void 0, ).query(
1836
1836
  (raw) => {
1837
1837
  event = me.view(raw, actor);
1838
- if (event.name === _chunkDVYTKZD5cjs.SNAP_EVENT) {
1838
+ if (event.name === _chunkRF5MV72Kcjs.SNAP_EVENT) {
1839
1839
  state2 = event.data;
1840
1840
  snaps++;
1841
1841
  patches = 0;
@@ -1844,8 +1844,8 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1844
1844
  state2 = patch_fn(me, state2, me.patch[event.name](event, state2), event);
1845
1845
  patches++;
1846
1846
  replayed++;
1847
- } else if (event.name !== _chunkDVYTKZD5cjs.TOMBSTONE_EVENT) {
1848
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).warn(
1847
+ } else if (event.name !== _chunkRF5MV72Kcjs.TOMBSTONE_EVENT) {
1848
+ _chunkBTLM7SW4cjs.log.call(void 0, ).warn(
1849
1849
  `Skipping unknown event "${String(event.name)}" on stream "${stream}" (id=${event.id}) \u2014 no reducer in state "${me.name}"`
1850
1850
  );
1851
1851
  }
@@ -1869,7 +1869,7 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1869
1869
  ...cached ? { after: cached.event_id, with_snaps: true } : { ...time_travel ? {} : { with_snaps: true }, ...asOf }
1870
1870
  }
1871
1871
  );
1872
- const head_is_tombstone = _optionalChain([event, 'optionalAccess', _76 => _76.name]) === _chunkDVYTKZD5cjs.TOMBSTONE_EVENT;
1872
+ const head_is_tombstone = _optionalChain([event, 'optionalAccess', _76 => _76.name]) === _chunkRF5MV72Kcjs.TOMBSTONE_EVENT;
1873
1873
  if (replayed > 0 && !time_travel && event && !me.pii_aware && !head_is_tombstone) {
1874
1874
  await cache_put(stream, {
1875
1875
  stream,
@@ -1897,7 +1897,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1897
1897
  if (!stream) throw new Error("Missing target stream");
1898
1898
  const reactingTo = _optionalChain([options, 'optionalAccess', _81 => _81.reactingTo]);
1899
1899
  const correlator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _82 => _82.correlator]), () => ( default_correlator));
1900
- const validated = _chunkGEUBNZ3Bcjs.validate.call(void 0, action2, payload, me.actions[action2]);
1900
+ const validated = _chunkBTLM7SW4cjs.validate.call(void 0, action2, payload, me.actions[action2]);
1901
1901
  const opts = _optionalChain([me, 'access', _83 => _83.options, 'optionalAccess', _84 => _84[action2]]);
1902
1902
  const max_retries = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _85 => _85.maxRetries]), () => ( 0));
1903
1903
  for (let attempt = 0; ; attempt++) {
@@ -1908,14 +1908,14 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1908
1908
  void 0,
1909
1909
  patch_fn
1910
1910
  );
1911
- if (_optionalChain([snapshot, 'access', _86 => _86.event, 'optionalAccess', _87 => _87.name]) === _chunkDVYTKZD5cjs.TOMBSTONE_EVENT)
1912
- throw new (0, _chunkDVYTKZD5cjs.StreamClosedError)(stream);
1911
+ if (_optionalChain([snapshot, 'access', _86 => _86.event, 'optionalAccess', _87 => _87.name]) === _chunkRF5MV72Kcjs.TOMBSTONE_EVENT)
1912
+ throw new (0, _chunkRF5MV72Kcjs.StreamClosedError)(stream);
1913
1913
  const expected = _nullishCoalesce(expectedVersion, () => ( (snapshot.version >= 0 ? snapshot.version : void 0)));
1914
1914
  if (me.given) {
1915
1915
  const invariants = me.given[action2] || [];
1916
1916
  invariants.forEach(({ valid: valid2, description }) => {
1917
1917
  if (!valid2(snapshot.state, actor))
1918
- throw new (0, _chunkDVYTKZD5cjs.InvariantError)(
1918
+ throw new (0, _chunkRF5MV72Kcjs.InvariantError)(
1919
1919
  action2,
1920
1920
  validated,
1921
1921
  target,
@@ -1924,6 +1924,19 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1924
1924
  );
1925
1925
  });
1926
1926
  }
1927
+ if (me.requires) {
1928
+ const preconditions = me.requires[action2] || [];
1929
+ for (const { holds, description } of preconditions)
1930
+ if (!holds(validated, snapshot.state, actor))
1931
+ throw new (0, _chunkRF5MV72Kcjs.InvariantError)(
1932
+ action2,
1933
+ validated,
1934
+ target,
1935
+ snapshot,
1936
+ description,
1937
+ "precondition"
1938
+ );
1939
+ }
1927
1940
  const result = me.on[action2](validated, snapshot, target);
1928
1941
  if (!result) return [snapshot];
1929
1942
  if (Array.isArray(result) && result.length === 0) {
@@ -1932,7 +1945,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1932
1945
  const tuples = Array.isArray(result[0]) ? result : [result];
1933
1946
  const valid = tuples.map(([name, data]) => ({
1934
1947
  name,
1935
- data: _chunkGEUBNZ3Bcjs.validate.call(void 0, name, data, me.events[name])
1948
+ data: _chunkBTLM7SW4cjs.validate.call(void 0, name, data, me.events[name])
1936
1949
  }));
1937
1950
  const emitted = valid.map((e) => me.message(e));
1938
1951
  const meta = {
@@ -1957,7 +1970,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1957
1970
  };
1958
1971
  let committed;
1959
1972
  try {
1960
- committed = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).commit(
1973
+ committed = await _chunkBTLM7SW4cjs.store.call(void 0, ).commit(
1961
1974
  stream,
1962
1975
  emitted,
1963
1976
  meta,
@@ -1966,7 +1979,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1966
1979
  reactingTo ? expectedVersion : expected
1967
1980
  );
1968
1981
  } catch (error) {
1969
- if (error instanceof _chunkDVYTKZD5cjs.ConcurrencyError) void cache_drop(stream);
1982
+ if (error instanceof _chunkRF5MV72Kcjs.ConcurrencyError) void cache_drop(stream);
1970
1983
  throw error;
1971
1984
  }
1972
1985
  let { state: state2, patches } = snapshot;
@@ -2005,19 +2018,19 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
2005
2018
  }
2006
2019
  return snapshots;
2007
2020
  } catch (error) {
2008
- if (!(error instanceof _chunkDVYTKZD5cjs.ConcurrencyError)) throw error;
2021
+ if (!(error instanceof _chunkRF5MV72Kcjs.ConcurrencyError)) throw error;
2009
2022
  if (expectedVersion !== void 0) throw error;
2010
2023
  if (attempt >= max_retries) throw error;
2011
2024
  if (_optionalChain([opts, 'optionalAccess', _94 => _94.backoff])) {
2012
2025
  const delay_ms = compute_backoff_delay(attempt, opts.backoff);
2013
- if (delay_ms > 0) await _chunkGEUBNZ3Bcjs.sleep.call(void 0, delay_ms);
2026
+ if (delay_ms > 0) await _chunkBTLM7SW4cjs.sleep.call(void 0, delay_ms);
2014
2027
  }
2015
2028
  }
2016
2029
  }
2017
2030
  }
2018
2031
 
2019
2032
  // src/internal/tracing.ts
2020
- var PRETTY = _chunkGEUBNZ3Bcjs.config.call(void 0, ).env !== "production";
2033
+ var PRETTY = _chunkBTLM7SW4cjs.config.call(void 0, ).env !== "production";
2021
2034
  var C_BLUE = "\x1B[38;5;39m";
2022
2035
  var C_ORANGE = "\x1B[38;5;208m";
2023
2036
  var C_GREEN = "\x1B[38;5;42m";
@@ -2203,7 +2216,7 @@ function budget_exhausted(lease, options, store_failing) {
2203
2216
  if (store_failing || !_optionalChain([options, 'optionalAccess', _104 => _104.blockOnError]) || lease.retry <= options.maxRetries)
2204
2217
  return void 0;
2205
2218
  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.`;
2206
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).error(error);
2219
+ _chunkBTLM7SW4cjs.log.call(void 0, ).error(error);
2207
2220
  return { lease, handled: 0, acked_at: lease.at, error, block: true };
2208
2221
  }
2209
2222
  function fetch_failure_policy(registry) {
@@ -2219,13 +2232,13 @@ function fetch_failure_policy(registry) {
2219
2232
  function finalize(lease, handled, at, error, options, logger, failed_at) {
2220
2233
  if (!error) return { lease, handled, acked_at: at };
2221
2234
  logger.error(error);
2222
- const non_retryable = error instanceof _chunkDVYTKZD5cjs.NonRetryableError;
2235
+ const non_retryable = error instanceof _chunkRF5MV72Kcjs.NonRetryableError;
2223
2236
  const block2 = options.blockOnError && (non_retryable || lease.retry >= options.maxRetries);
2224
2237
  if (block2)
2225
2238
  logger.error(
2226
2239
  non_retryable ? `Blocking ${lease.stream} on non-retryable error.` : `Blocking ${lease.stream} after ${lease.retry} retries.`
2227
2240
  );
2228
- const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunkGEUBNZ3Bcjs.DEFAULT_BACKOFF)));
2241
+ const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunkBTLM7SW4cjs.DEFAULT_BACKOFF)));
2229
2242
  return {
2230
2243
  lease,
2231
2244
  handled,
@@ -2353,7 +2366,7 @@ async function run_drain_cycle(deps, cycle) {
2353
2366
  const acked = submitted.length ? await ops.ack(submitted) : [];
2354
2367
  const expected = submitted.filter((l) => l.due === void 0).length;
2355
2368
  if (acked.length < expected)
2356
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).warn(
2369
+ _chunkBTLM7SW4cjs.log.call(void 0, ).warn(
2357
2370
  `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.`
2358
2371
  );
2359
2372
  const closeable = handled.filter((h) => h.close !== void 0).map((h) => h.close);
@@ -2453,9 +2466,9 @@ var DrainController = (_class5 = class {
2453
2466
  if (!this.armed || this._stopped || this._inflight)
2454
2467
  return EMPTY_DRAIN;
2455
2468
  const d = _nullishCoalesce(this._deps.defaults, () => ( {}));
2456
- const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunkGEUBNZ3Bcjs.DEFAULT_STREAM_LIMIT));
2457
- const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunkGEUBNZ3Bcjs.DEFAULT_EVENT_LIMIT));
2458
- const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunkGEUBNZ3Bcjs.DEFAULT_LEASE_MILLIS));
2469
+ const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunkBTLM7SW4cjs.DEFAULT_STREAM_LIMIT));
2470
+ const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunkBTLM7SW4cjs.DEFAULT_EVENT_LIMIT));
2471
+ const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunkBTLM7SW4cjs.DEFAULT_LEASE_MILLIS));
2459
2472
  if (this._deps.breaker.state(Date.now()) === "open")
2460
2473
  return EMPTY_DRAIN;
2461
2474
  const pass = this._pass(streamLimit, eventLimit, leaseMillis).finally(
@@ -2530,7 +2543,7 @@ function pii_gate(event, fields, predicate, actor) {
2530
2543
  const { pii, ...rest } = event;
2531
2544
  if (pii == null) {
2532
2545
  const shredded = { ...data };
2533
- for (const f of fields) shredded[f] = _chunkDVYTKZD5cjs.SHREDDED;
2546
+ for (const f of fields) shredded[f] = _chunkRF5MV72Kcjs.SHREDDED;
2534
2547
  return { ...rest, data: shredded };
2535
2548
  }
2536
2549
  const allowed = !!actor && !!predicate && predicate(event, actor);
@@ -2541,7 +2554,7 @@ function pii_gate(event, fields, predicate, actor) {
2541
2554
  };
2542
2555
  }
2543
2556
  const redacted = { ...data };
2544
- for (const f of fields) redacted[f] = _chunkDVYTKZD5cjs.REDACTED;
2557
+ for (const f of fields) redacted[f] = _chunkRF5MV72Kcjs.REDACTED;
2545
2558
  return { ...rest, data: redacted };
2546
2559
  }
2547
2560
  var IDENTITY_GATE = (event) => event;
@@ -2678,7 +2691,7 @@ function make_deferred(handler, schedule) {
2678
2691
  const call = handler;
2679
2692
  const deferred = async (event, stream, app) => {
2680
2693
  const when = typeof schedule === "function" ? schedule(event) : schedule;
2681
- if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunkDVYTKZD5cjs.DeferSignal)(when);
2694
+ if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunkRF5MV72Kcjs.DeferSignal)(when);
2682
2695
  return call(event, stream, app);
2683
2696
  };
2684
2697
  Object.defineProperty(deferred, "name", { value: handler.name });
@@ -2747,7 +2760,7 @@ function build_handle(deps) {
2747
2760
  handled++;
2748
2761
  }
2749
2762
  } catch (error) {
2750
- if (error instanceof _chunkDVYTKZD5cjs.DeferSignal) {
2763
+ if (error instanceof _chunkRF5MV72Kcjs.DeferSignal) {
2751
2764
  let defer;
2752
2765
  try {
2753
2766
  defer = resolve_defer_at(error.when, event);
@@ -3013,7 +3026,7 @@ var Act = (_class7 = class {
3013
3026
  /** Lanes to arm per event; `"all"` when a dynamic resolver hides the lane. */
3014
3027
 
3015
3028
 
3016
- __init27() {this._logger = _chunkGEUBNZ3Bcjs.log.call(void 0, )}
3029
+ __init27() {this._logger = _chunkBTLM7SW4cjs.log.call(void 0, )}
3017
3030
  /** This Act's ports: its own bag, or the singleton adapters. */
3018
3031
 
3019
3032
  /** Runs a body so internal `store()`/`cache()` calls resolve to `_ports`. */
@@ -3035,9 +3048,9 @@ var Act = (_class7 = class {
3035
3048
  this._lanes = lanes;
3036
3049
  this._declared_lanes = ["default", ...lanes.map((l) => l.name)];
3037
3050
  validate_only_lanes(options, lanes);
3038
- this._ports = _nullishCoalesce(options.scoped, () => ( _chunkGEUBNZ3Bcjs.default_scope.call(void 0, )));
3051
+ this._ports = _nullishCoalesce(options.scoped, () => ( _chunkBTLM7SW4cjs.default_scope.call(void 0, )));
3039
3052
  const ports = this._ports;
3040
- this._scoped = _chunkGEUBNZ3Bcjs.make_run_scoped.call(void 0, {
3053
+ this._scoped = _chunkBTLM7SW4cjs.make_run_scoped.call(void 0, {
3041
3054
  // Getters, not a spread: the singletons resolve lazily, so a later
3042
3055
  // `store(...)` / `cache(...)` still takes effect.
3043
3056
  get store() {
@@ -3047,14 +3060,14 @@ var Act = (_class7 = class {
3047
3060
  return ports.cache;
3048
3061
  },
3049
3062
  // Parsed per build, so a bad window throws on every build.
3050
- autoclose_window: _chunkGEUBNZ3Bcjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3063
+ autoclose_window: _chunkBTLM7SW4cjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3051
3064
  });
3052
3065
  this._correlator = _nullishCoalesce(options.correlator, () => ( default_correlator));
3053
3066
  this._es = build_es(this._logger, this._correlator, patch_fn);
3054
3067
  this._cd = build_drain(this._logger);
3055
3068
  const handle = build_handle({
3056
3069
  logger: this._logger,
3057
- reaction_scope: _chunkGEUBNZ3Bcjs.make_reaction_scope.call(void 0, {
3070
+ reaction_scope: _chunkBTLM7SW4cjs.make_reaction_scope.call(void 0, {
3058
3071
  do: this.do.bind(this),
3059
3072
  load: this.load.bind(this),
3060
3073
  query: this.query.bind(this),
@@ -3084,12 +3097,12 @@ var Act = (_class7 = class {
3084
3097
  this._ports.store,
3085
3098
  options.listen !== false
3086
3099
  );
3087
- _chunkGEUBNZ3Bcjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3100
+ _chunkBTLM7SW4cjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3088
3101
  }
3089
3102
  /** Shared by drain, settle and autoclose; bad knobs throw at build. */
3090
3103
  _build_breaker(options) {
3091
3104
  return new CircuitBreaker(
3092
- _chunkGEUBNZ3Bcjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3105
+ _chunkBTLM7SW4cjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3093
3106
  {
3094
3107
  on_error: (error, circuit) => this._emit_error(error, circuit),
3095
3108
  // When the cooldown elapses, settle once: its scan or claim is the
@@ -3123,7 +3136,7 @@ var Act = (_class7 = class {
3123
3136
  try {
3124
3137
  await this._run_close(targets);
3125
3138
  } catch (error) {
3126
- if (error instanceof _chunkDVYTKZD5cjs.StoreError) throw error;
3139
+ if (error instanceof _chunkRF5MV72Kcjs.StoreError) throw error;
3127
3140
  this._logger.error(
3128
3141
  error,
3129
3142
  `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.`
@@ -3158,7 +3171,7 @@ var Act = (_class7 = class {
3158
3171
  /** Audit deps, built after the controllers so the lane set is final. */
3159
3172
  _build_audit_deps() {
3160
3173
  return {
3161
- store: _chunkGEUBNZ3Bcjs.store,
3174
+ store: _chunkBTLM7SW4cjs.store,
3162
3175
  event_to_state: this._event_to_state,
3163
3176
  // Declared lanes, not this process's controllers: a lane another
3164
3177
  // worker drains is not `unknown-lane`.
@@ -3171,7 +3184,7 @@ var Act = (_class7 = class {
3171
3184
  registry: this.registry,
3172
3185
  static_targets: classification.static_targets,
3173
3186
  cd: this._cd,
3174
- max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunkDVYTKZD5cjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3187
+ max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunkRF5MV72Kcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3175
3188
  // Declared lanes (not active ones): a lane another process claims is
3176
3189
  // still a valid destination.
3177
3190
  declared_lanes: new Set(this._declared_lanes),
@@ -3187,7 +3200,7 @@ var Act = (_class7 = class {
3187
3200
  /** Cold start: an idle deferred stream still fires on time after a restart. */
3188
3201
  async _seed_persisted_defers() {
3189
3202
  const now = Date.now();
3190
- await walk_streams(_chunkGEUBNZ3Bcjs.store.call(void 0, ), (pos) => {
3203
+ await walk_streams(_chunkBTLM7SW4cjs.store.call(void 0, ), (pos) => {
3191
3204
  if (pos.deferred_at === void 0 || pos.deferred_at <= now) return;
3192
3205
  const controller = this._drain_controllers.get(_nullishCoalesce(pos.lane, () => ( "default")));
3193
3206
  _optionalChain([controller, 'optionalAccess', _124 => _124.seed_defer, 'call', _125 => _125(pos.stream, pos.deferred_at)]);
@@ -3206,7 +3219,7 @@ var Act = (_class7 = class {
3206
3219
  on_settled: (drain) => this.emit("settled", drain),
3207
3220
  breaker: this._breaker
3208
3221
  },
3209
- _nullishCoalesce(options.settleDebounceMs, () => ( _chunkDVYTKZD5cjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3222
+ _nullishCoalesce(options.settleDebounceMs, () => ( _chunkRF5MV72Kcjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3210
3223
  );
3211
3224
  }
3212
3225
 
@@ -3226,7 +3239,7 @@ var Act = (_class7 = class {
3226
3239
  */
3227
3240
  shutdown(options) {
3228
3241
  if (!this._shutdown_promise) {
3229
- _chunkGEUBNZ3Bcjs.resolveShutdownConfig.call(void 0, options);
3242
+ _chunkBTLM7SW4cjs.resolveShutdownConfig.call(void 0, options);
3230
3243
  this._shutdown_promise = (async () => {
3231
3244
  this.stop_correlations();
3232
3245
  this._settle.stop(true);
@@ -3246,10 +3259,10 @@ var Act = (_class7 = class {
3246
3259
  * default for none or 0, and for a running settle), capped.
3247
3260
  */
3248
3261
  _derive_grace_ms(running, settling) {
3249
- let max = settling ? _chunkGEUBNZ3Bcjs.DEFAULT_LEASE_MILLIS : 0;
3262
+ let max = settling ? _chunkBTLM7SW4cjs.DEFAULT_LEASE_MILLIS : 0;
3250
3263
  for (const c of running)
3251
- max = Math.max(max, c.lease_millis || _chunkGEUBNZ3Bcjs.DEFAULT_LEASE_MILLIS);
3252
- return Math.min(max, _chunkGEUBNZ3Bcjs.MAX_SHUTDOWN_GRACE_MS);
3264
+ max = Math.max(max, c.lease_millis || _chunkBTLM7SW4cjs.DEFAULT_LEASE_MILLIS);
3265
+ return Math.min(max, _chunkBTLM7SW4cjs.MAX_SHUTDOWN_GRACE_MS);
3253
3266
  }
3254
3267
  async _await_inflight(grace_ms) {
3255
3268
  const running = [...this._drain_controllers.values()].filter(
@@ -3330,7 +3343,7 @@ var Act = (_class7 = class {
3330
3343
  * @see {@link ValidationError}, {@link InvariantError}, {@link ConcurrencyError}
3331
3344
  */
3332
3345
  async do(action2, target, payload, options) {
3333
- const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _127 => _127.reactingTo]), () => ( _chunkGEUBNZ3Bcjs.current_reacting.call(void 0, )));
3346
+ const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _127 => _127.reactingTo]), () => ( _chunkBTLM7SW4cjs.current_reacting.call(void 0, )));
3334
3347
  const do_options = reacting_to === _optionalChain([options, 'optionalAccess', _128 => _128.reactingTo]) ? options : { ...options, reactingTo: reacting_to };
3335
3348
  return this._scoped(async () => {
3336
3349
  const snapshots = await this._es.action(
@@ -3391,7 +3404,7 @@ var Act = (_class7 = class {
3391
3404
  return this._scoped(async () => {
3392
3405
  let first;
3393
3406
  let last;
3394
- const count = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query((e) => {
3407
+ const count = await _chunkBTLM7SW4cjs.store.call(void 0, ).query((e) => {
3395
3408
  const gated = this.registry.query_gate(e.name)(e);
3396
3409
  if (!first) first = gated;
3397
3410
  last = gated;
@@ -3421,7 +3434,7 @@ var Act = (_class7 = class {
3421
3434
  async query_array(query) {
3422
3435
  return this._scoped(async () => {
3423
3436
  const events = [];
3424
- await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query((e) => {
3437
+ await _chunkBTLM7SW4cjs.store.call(void 0, ).query((e) => {
3425
3438
  events.push(this.registry.query_gate(e.name)(e));
3426
3439
  }, query);
3427
3440
  return events;
@@ -3441,14 +3454,14 @@ var Act = (_class7 = class {
3441
3454
  */
3442
3455
  async forget(stream) {
3443
3456
  return this._scoped(async () => {
3444
- const s = _chunkGEUBNZ3Bcjs.store.call(void 0, );
3457
+ const s = _chunkBTLM7SW4cjs.store.call(void 0, );
3445
3458
  if (!s.forget_pii) {
3446
3459
  throw new Error(
3447
3460
  `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).`
3448
3461
  );
3449
3462
  }
3450
3463
  const eventCount = await s.forget_pii(stream);
3451
- await _chunkGEUBNZ3Bcjs.cache.call(void 0, ).invalidate(stream);
3464
+ await _chunkBTLM7SW4cjs.cache.call(void 0, ).invalidate(stream);
3452
3465
  if (eventCount > 0) {
3453
3466
  this.emit("forgotten", { stream, at: /* @__PURE__ */ new Date(), eventCount });
3454
3467
  }
@@ -3482,7 +3495,7 @@ var Act = (_class7 = class {
3482
3495
  * @see {@link correlate} for dynamic stream discovery
3483
3496
  */
3484
3497
  async drain(options = {}) {
3485
- _chunkGEUBNZ3Bcjs.resolveDrainConfig.call(void 0, options);
3498
+ _chunkBTLM7SW4cjs.resolveDrainConfig.call(void 0, options);
3486
3499
  if (!this._drain)
3487
3500
  return { fetched: [], leased: [], acked: [], blocked: [] };
3488
3501
  return this._scoped(() => this._drain_all(options));
@@ -3662,7 +3675,7 @@ var Act = (_class7 = class {
3662
3675
  */
3663
3676
  async reset(input) {
3664
3677
  return this._scoped(async () => {
3665
- const count = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).reset(input);
3678
+ const count = await _chunkBTLM7SW4cjs.store.call(void 0, ).reset(input);
3666
3679
  for (const handler of this._batch_handlers.values())
3667
3680
  _optionalChain([handler, 'access', _135 => _135[FOLD_RESET], 'optionalCall', _136 => _136()]);
3668
3681
  if (count > 0) {
@@ -3698,7 +3711,7 @@ var Act = (_class7 = class {
3698
3711
  */
3699
3712
  async unblock(input) {
3700
3713
  return this._scoped(async () => {
3701
- const count = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).unblock(input);
3714
+ const count = await _chunkBTLM7SW4cjs.store.call(void 0, ).unblock(input);
3702
3715
  if (count > 0) {
3703
3716
  this._wake();
3704
3717
  }
@@ -3753,7 +3766,7 @@ var Act = (_class7 = class {
3753
3766
  return { ...partial, duration_ms: Date.now() - started };
3754
3767
  }
3755
3768
  const target = _nullishCoalesce(sink, () => ( (() => {
3756
- const s = _chunkGEUBNZ3Bcjs.store.call(void 0, );
3769
+ const s = _chunkBTLM7SW4cjs.store.call(void 0, );
3757
3770
  if (!s.restore) throw new Error("adapter has no restore capability");
3758
3771
  return s;
3759
3772
  })()));
@@ -3799,7 +3812,7 @@ var Act = (_class7 = class {
3799
3812
  async blocked_streams(options) {
3800
3813
  return this._scoped(async () => {
3801
3814
  const positions = [];
3802
- await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query_streams(
3815
+ await _chunkBTLM7SW4cjs.store.call(void 0, ).query_streams(
3803
3816
  (p) => {
3804
3817
  positions.push(p);
3805
3818
  },
@@ -3851,7 +3864,7 @@ var Act = (_class7 = class {
3851
3864
  * @see {@link Store.prioritize} for the underlying primitive
3852
3865
  */
3853
3866
  async prioritize(filter, priority) {
3854
- return this._scoped(() => _chunkGEUBNZ3Bcjs.store.call(void 0, ).prioritize(filter, priority));
3867
+ return this._scoped(() => _chunkBTLM7SW4cjs.store.call(void 0, ).prioritize(filter, priority));
3855
3868
  }
3856
3869
  /** Shared by `close()` and reaction-requested closes. */
3857
3870
  async _run_close(targets) {
@@ -3931,7 +3944,7 @@ var Act = (_class7 = class {
3931
3944
  * @see {@link correlate} for manual correlation
3932
3945
  */
3933
3946
  settle(options) {
3934
- _chunkGEUBNZ3Bcjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3947
+ _chunkBTLM7SW4cjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3935
3948
  this._schedule(options);
3936
3949
  }
3937
3950
  }, _class7);
@@ -4087,16 +4100,16 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4087
4100
  }),
4088
4101
  // Never block on autoclose: a transient query/store error should retry,
4089
4102
  // not quarantine the synthetic stream.
4090
- options: { blockOnError: false, maxRetries: _chunkGEUBNZ3Bcjs.DEFAULT_MAX_RETRIES },
4103
+ options: { blockOnError: false, maxRetries: _chunkBTLM7SW4cjs.DEFAULT_MAX_RETRIES },
4091
4104
  handler: async (event) => {
4092
4105
  const aggregate = event.stream;
4093
4106
  const window = read_window();
4094
4107
  if (!in_autoclose_window(window, /* @__PURE__ */ new Date()))
4095
- throw new (0, _chunkDVYTKZD5cjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4096
- const stats = await _chunkGEUBNZ3Bcjs.store.call(void 0, ).query_stats([aggregate], {
4108
+ throw new (0, _chunkRF5MV72Kcjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4109
+ const stats = await _chunkBTLM7SW4cjs.store.call(void 0, ).query_stats([aggregate], {
4097
4110
  count: true,
4098
4111
  tail: keep_days !== void 0 ? true : void 0,
4099
- exclude: [_chunkDVYTKZD5cjs.TOMBSTONE_EVENT, _chunkDVYTKZD5cjs.SNAP_EVENT]
4112
+ exclude: [_chunkRF5MV72Kcjs.TOMBSTONE_EVENT, _chunkRF5MV72Kcjs.SNAP_EVENT]
4100
4113
  });
4101
4114
  const entry = stats.get(aggregate);
4102
4115
  if (!entry) return;
@@ -4127,7 +4140,7 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4127
4140
  dues.push(days_after(entry.tail.created, keep_days));
4128
4141
  const future = dues.map((d) => d.getTime()).filter((t) => t > Date.now());
4129
4142
  if (future.length)
4130
- throw new (0, _chunkDVYTKZD5cjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4143
+ throw new (0, _chunkRF5MV72Kcjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4131
4144
  }
4132
4145
  };
4133
4146
  const key = `__autoclose_${st.name}`;
@@ -4239,6 +4252,7 @@ function merge_into_existing(state2, existing, states, actions, events) {
4239
4252
  patch: merged_patch,
4240
4253
  on: { ...existing.on, ...state2.on },
4241
4254
  given: { ...existing.given, ...state2.given },
4255
+ requires: { ...existing.requires, ...state2.requires },
4242
4256
  snap: pick_declared(existing.snap, state2.snap, "snap strategy", state2.name),
4243
4257
  // Per-action retry policy is keyed by action name, so the two partials'
4244
4258
  // maps combine. Left `undefined` when neither declared one, so the
@@ -4331,9 +4345,9 @@ var _this_ = ({ stream }) => ({
4331
4345
 
4332
4346
  // src/builders/builder-utils.ts
4333
4347
  function register_lane(config2, lanes) {
4334
- _chunkGEUBNZ3Bcjs.resolveLaneConfig.call(void 0, config2);
4335
- if (config2.name === _chunkDVYTKZD5cjs.DEFAULT_LANE)
4336
- throw new Error(`Lane "${_chunkDVYTKZD5cjs.DEFAULT_LANE}" is reserved`);
4348
+ _chunkBTLM7SW4cjs.resolveLaneConfig.call(void 0, config2);
4349
+ if (config2.name === _chunkRF5MV72Kcjs.DEFAULT_LANE)
4350
+ throw new Error(`Lane "${_chunkRF5MV72Kcjs.DEFAULT_LANE}" is reserved`);
4337
4351
  const existing = lanes.find((l) => l.name === config2.name);
4338
4352
  if (!existing) return void lanes.push(config2);
4339
4353
  if (existing.leaseMillis !== config2.leaseMillis || existing.streamLimit !== config2.streamLimit || existing.cycleMs !== config2.cycleMs)
@@ -4375,9 +4389,9 @@ function reaction_on(event, events, builder) {
4375
4389
  // Validate the whole bag at the declaration site so a bad
4376
4390
  // `maxRetries`/`backoff`/`blockOnError` throws ZodError at build,
4377
4391
  // not a NaN gate on the first retry.
4378
- options: _chunkGEUBNZ3Bcjs.resolveReactionConfig.call(void 0, {
4379
- blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _151 => _151.blockOnError]), () => ( _chunkGEUBNZ3Bcjs.DEFAULT_BLOCK_ON_ERROR)),
4380
- maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _152 => _152.maxRetries]), () => ( _chunkGEUBNZ3Bcjs.DEFAULT_MAX_RETRIES)),
4392
+ options: _chunkBTLM7SW4cjs.resolveReactionConfig.call(void 0, {
4393
+ blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _151 => _151.blockOnError]), () => ( _chunkBTLM7SW4cjs.DEFAULT_BLOCK_ON_ERROR)),
4394
+ maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _152 => _152.maxRetries]), () => ( _chunkBTLM7SW4cjs.DEFAULT_MAX_RETRIES)),
4381
4395
  backoff: _optionalChain([options, 'optionalAccess', _153 => _153.backoff])
4382
4396
  })
4383
4397
  };
@@ -4462,7 +4476,7 @@ function date_reviver_schema(schema) {
4462
4476
 
4463
4477
  // src/builders/event-builder.ts
4464
4478
  function event_tags(schema) {
4465
- const pii = _chunkDVYTKZD5cjs.pii_schemas.call(void 0, schema);
4479
+ const pii = _chunkRF5MV72Kcjs.pii_schemas.call(void 0, schema);
4466
4480
  const pii_dates = {};
4467
4481
  for (const [key, field] of Object.entries(pii)) {
4468
4482
  const dates = date_reviver_schema(field);
@@ -4499,7 +4513,7 @@ function make_event_reader(tags, disclosure, predicate = null) {
4499
4513
  });
4500
4514
  }
4501
4515
  function build_events(registry, states, lanes, owners) {
4502
- const declared = /* @__PURE__ */ new Set([_chunkDVYTKZD5cjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4516
+ const declared = /* @__PURE__ */ new Set([_chunkRF5MV72Kcjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4503
4517
  const lane_errors = [];
4504
4518
  const tags = /* @__PURE__ */ new Map();
4505
4519
  const sensitive2 = /* @__PURE__ */ new Map();
@@ -4563,7 +4577,7 @@ function build_events(registry, states, lanes, owners) {
4563
4577
  if (reader) readers.set(event_name, reader);
4564
4578
  }
4565
4579
  const snap2 = make_event_reader(event_tags(state2.state), "redact", null);
4566
- if (snap2) readers.set(_chunkDVYTKZD5cjs.SNAP_EVENT, snap2);
4580
+ if (snap2) readers.set(_chunkRF5MV72Kcjs.SNAP_EVENT, snap2);
4567
4581
  if (readers.size === 0) continue;
4568
4582
  state2.view = (event, actor) => (_nullishCoalesce(readers.get(event.name), () => ( IDENTITY_GATE)))(event, actor);
4569
4583
  }
@@ -4679,7 +4693,7 @@ function act() {
4679
4693
  const list = deprecation_summary.map(
4680
4694
  (d) => `"${d.deprecated}" (current: "${d.current}", state: "${d.state_name}")`
4681
4695
  ).join(", ");
4682
- _chunkGEUBNZ3Bcjs.log.call(void 0, ).info(
4696
+ _chunkBTLM7SW4cjs.log.call(void 0, ).info(
4683
4697
  `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.`
4684
4698
  );
4685
4699
  }
@@ -4721,7 +4735,7 @@ function act() {
4721
4735
  return reaction_on(event, registry.events, builder);
4722
4736
  },
4723
4737
  build: (options) => {
4724
- _chunkGEUBNZ3Bcjs.resolveActConfig.call(void 0, options);
4738
+ _chunkBTLM7SW4cjs.resolveActConfig.call(void 0, options);
4725
4739
  const patch_fn = _optionalChain([options, 'optionalAccess', _165 => _165.validateFoldedState]) === true ? validating_patch : bare_patch;
4726
4740
  if (!_built) {
4727
4741
  for (const proj of pending_projections) add_projection(proj);
@@ -4773,7 +4787,7 @@ function act() {
4773
4787
  synthesize_autoclose_reactions(
4774
4788
  registry,
4775
4789
  states,
4776
- _chunkGEUBNZ3Bcjs.current_autoclose_window
4790
+ _chunkBTLM7SW4cjs.current_autoclose_window
4777
4791
  );
4778
4792
  Object.freeze(registry.actions);
4779
4793
  Object.freeze(registry.events);
@@ -4822,8 +4836,8 @@ function _projection(target) {
4822
4836
  handler,
4823
4837
  resolver: _nullishCoalesce(default_resolver, () => ( _this_)),
4824
4838
  options: {
4825
- blockOnError: _chunkGEUBNZ3Bcjs.DEFAULT_BLOCK_ON_ERROR,
4826
- maxRetries: _chunkGEUBNZ3Bcjs.DEFAULT_MAX_RETRIES
4839
+ blockOnError: _chunkBTLM7SW4cjs.DEFAULT_BLOCK_ON_ERROR,
4840
+ maxRetries: _chunkBTLM7SW4cjs.DEFAULT_MAX_RETRIES
4827
4841
  }
4828
4842
  }),
4829
4843
  widened
@@ -4864,7 +4878,7 @@ function _projection(target) {
4864
4878
  throw new Error(
4865
4879
  `Projection "${target}" .of() partials must share one state name \u2014 got "${name}" and "${partial.name}"`
4866
4880
  );
4867
- const config2 = _chunkGEUBNZ3Bcjs.resolveFoldConfig.call(void 0, options);
4881
+ const config2 = _chunkBTLM7SW4cjs.resolveFoldConfig.call(void 0, options);
4868
4882
  const fold_events = {};
4869
4883
  for (const partial of partials)
4870
4884
  for (const [event_name, schema] of Object.entries(partial.events)) {
@@ -4882,8 +4896,8 @@ function _projection(target) {
4882
4896
  handler: noop,
4883
4897
  resolver: { target },
4884
4898
  options: {
4885
- blockOnError: _chunkGEUBNZ3Bcjs.DEFAULT_BLOCK_ON_ERROR,
4886
- maxRetries: _chunkGEUBNZ3Bcjs.DEFAULT_MAX_RETRIES
4899
+ blockOnError: _chunkBTLM7SW4cjs.DEFAULT_BLOCK_ON_ERROR,
4900
+ maxRetries: _chunkBTLM7SW4cjs.DEFAULT_MAX_RETRIES
4887
4901
  }
4888
4902
  }
4889
4903
  ]
@@ -4999,13 +5013,18 @@ function action_builder(state2) {
4999
5013
  throw new Error(`Duplicate action "${action2}"`);
5000
5014
  internal.actions[action2] = schema;
5001
5015
  if (options) {
5002
- _chunkGEUBNZ3Bcjs.resolveActionConfig.call(void 0, options);
5016
+ _chunkBTLM7SW4cjs.resolveActionConfig.call(void 0, options);
5003
5017
  internal.options ??= {};
5004
5018
  internal.options[action2] = options;
5005
5019
  }
5006
5020
  function given(rules) {
5007
5021
  internal.given ??= {};
5008
5022
  internal.given[action2] = rules;
5023
+ return { requires, emit };
5024
+ }
5025
+ function requires(rules) {
5026
+ internal.requires ??= {};
5027
+ internal.requires[action2] = rules;
5009
5028
  return { emit };
5010
5029
  }
5011
5030
  function emit(handler) {
@@ -5023,7 +5042,7 @@ function action_builder(state2) {
5023
5042
  }
5024
5043
  return builder;
5025
5044
  }
5026
- return { given, emit };
5045
+ return { given, requires, emit };
5027
5046
  },
5028
5047
  snap(snap2) {
5029
5048
  internal.snap = snap2;
@@ -5288,5 +5307,5 @@ function write_line(writer, line) {
5288
5307
 
5289
5308
 
5290
5309
 
5291
- exports.Act = Act; exports.ActorSchema = _chunkDVYTKZD5cjs.ActorSchema; exports.CausationEventSchema = _chunkDVYTKZD5cjs.CausationEventSchema; exports.CommittedMetaSchema = _chunkDVYTKZD5cjs.CommittedMetaSchema; exports.ConcurrencyError = _chunkDVYTKZD5cjs.ConcurrencyError; exports.ConsoleLogger = _chunkGEUBNZ3Bcjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunkDVYTKZD5cjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunkDVYTKZD5cjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunkDVYTKZD5cjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunkDVYTKZD5cjs.DeferSignal; exports.Environments = _chunkDVYTKZD5cjs.Environments; exports.Errors = _chunkDVYTKZD5cjs.Errors; exports.EventMetaSchema = _chunkDVYTKZD5cjs.EventMetaSchema; exports.ExitCodes = _chunkDVYTKZD5cjs.ExitCodes; exports.InMemoryCache = _chunkGEUBNZ3Bcjs.InMemoryCache; exports.InMemoryStore = _chunkGEUBNZ3Bcjs.InMemoryStore; exports.InvariantError = _chunkDVYTKZD5cjs.InvariantError; exports.LogLevels = _chunkDVYTKZD5cjs.LogLevels; exports.NonRetryableError = _chunkDVYTKZD5cjs.NonRetryableError; exports.PackageSchema = _chunkGEUBNZ3Bcjs.PackageSchema; exports.QuerySchema = _chunkDVYTKZD5cjs.QuerySchema; exports.REDACTED = _chunkDVYTKZD5cjs.REDACTED; exports.SHREDDED = _chunkDVYTKZD5cjs.SHREDDED; exports.SNAP_EVENT = _chunkDVYTKZD5cjs.SNAP_EVENT; exports.StoreError = _chunkDVYTKZD5cjs.StoreError; exports.StreamClosedError = _chunkDVYTKZD5cjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunkDVYTKZD5cjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunkDVYTKZD5cjs.TargetSchema; exports.ValidationError = _chunkDVYTKZD5cjs.ValidationError; exports.ZodEmpty = _chunkDVYTKZD5cjs.ZodEmpty; exports.act = act; exports.cache = _chunkGEUBNZ3Bcjs.cache; exports.config = _chunkGEUBNZ3Bcjs.config; exports.dateReviver = _chunkGEUBNZ3Bcjs.dateReviver; exports.default_scope = _chunkGEUBNZ3Bcjs.default_scope; exports.dispose = _chunkGEUBNZ3Bcjs.dispose; exports.disposeAndExit = _chunkGEUBNZ3Bcjs.disposeAndExit; exports.extend = _chunkGEUBNZ3Bcjs.extend; exports.is_literal_source = _chunkGEUBNZ3Bcjs.is_literal_source; exports.log = _chunkGEUBNZ3Bcjs.log; exports.pii_fields = _chunkDVYTKZD5cjs.pii_fields; exports.port = _chunkGEUBNZ3Bcjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunkGEUBNZ3Bcjs.resolveAutocloseConfig2; exports.sensitive = _chunkDVYTKZD5cjs.sensitive; exports.sleep = _chunkGEUBNZ3Bcjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunkGEUBNZ3Bcjs.store; exports.validate = _chunkGEUBNZ3Bcjs.validate;
5310
+ exports.Act = Act; exports.ActorSchema = _chunkRF5MV72Kcjs.ActorSchema; exports.CausationEventSchema = _chunkRF5MV72Kcjs.CausationEventSchema; exports.CommittedMetaSchema = _chunkRF5MV72Kcjs.CommittedMetaSchema; exports.ConcurrencyError = _chunkRF5MV72Kcjs.ConcurrencyError; exports.ConsoleLogger = _chunkBTLM7SW4cjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunkRF5MV72Kcjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunkRF5MV72Kcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunkRF5MV72Kcjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunkRF5MV72Kcjs.DeferSignal; exports.Environments = _chunkRF5MV72Kcjs.Environments; exports.Errors = _chunkRF5MV72Kcjs.Errors; exports.EventMetaSchema = _chunkRF5MV72Kcjs.EventMetaSchema; exports.ExitCodes = _chunkRF5MV72Kcjs.ExitCodes; exports.InMemoryCache = _chunkBTLM7SW4cjs.InMemoryCache; exports.InMemoryStore = _chunkBTLM7SW4cjs.InMemoryStore; exports.InvariantError = _chunkRF5MV72Kcjs.InvariantError; exports.LogLevels = _chunkRF5MV72Kcjs.LogLevels; exports.NonRetryableError = _chunkRF5MV72Kcjs.NonRetryableError; exports.PackageSchema = _chunkBTLM7SW4cjs.PackageSchema; exports.QuerySchema = _chunkRF5MV72Kcjs.QuerySchema; exports.REDACTED = _chunkRF5MV72Kcjs.REDACTED; exports.SHREDDED = _chunkRF5MV72Kcjs.SHREDDED; exports.SNAP_EVENT = _chunkRF5MV72Kcjs.SNAP_EVENT; exports.StoreError = _chunkRF5MV72Kcjs.StoreError; exports.StreamClosedError = _chunkRF5MV72Kcjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunkRF5MV72Kcjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunkRF5MV72Kcjs.TargetSchema; exports.ValidationError = _chunkRF5MV72Kcjs.ValidationError; exports.ZodEmpty = _chunkRF5MV72Kcjs.ZodEmpty; exports.act = act; exports.cache = _chunkBTLM7SW4cjs.cache; exports.config = _chunkBTLM7SW4cjs.config; exports.dateReviver = _chunkBTLM7SW4cjs.dateReviver; exports.default_scope = _chunkBTLM7SW4cjs.default_scope; exports.dispose = _chunkBTLM7SW4cjs.dispose; exports.disposeAndExit = _chunkBTLM7SW4cjs.disposeAndExit; exports.extend = _chunkBTLM7SW4cjs.extend; exports.is_literal_source = _chunkBTLM7SW4cjs.is_literal_source; exports.log = _chunkBTLM7SW4cjs.log; exports.pii_fields = _chunkRF5MV72Kcjs.pii_fields; exports.port = _chunkBTLM7SW4cjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunkBTLM7SW4cjs.resolveAutocloseConfig2; exports.sensitive = _chunkRF5MV72Kcjs.sensitive; exports.sleep = _chunkBTLM7SW4cjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunkBTLM7SW4cjs.store; exports.validate = _chunkBTLM7SW4cjs.validate;
5292
5311
  //# sourceMappingURL=index.cjs.map