@rotorsoft/act 1.33.9 → 1.33.11

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 _chunkO6QIJQRNcjs = require('./chunk-O6QIJQRN.cjs');
43
+ var _chunkHKC663W4cjs = require('./chunk-HKC663W4.cjs');
44
44
 
45
45
 
46
46
 
@@ -70,24 +70,24 @@ var _chunkO6QIJQRNcjs = require('./chunk-O6QIJQRN.cjs');
70
70
 
71
71
 
72
72
 
73
- var _chunk7AHW7FCNcjs = require('./chunk-7AHW7FCN.cjs');
73
+ var _chunkKB7D46CCcjs = require('./chunk-KB7D46CC.cjs');
74
74
 
75
75
  // src/signals.ts
76
76
  process.once("SIGINT", async (arg) => {
77
- _chunkO6QIJQRNcjs.log.call(void 0, ).info(arg, "SIGINT");
78
- await _chunkO6QIJQRNcjs.disposeAndExit.call(void 0, "EXIT");
77
+ _chunkHKC663W4cjs.log.call(void 0, ).info(arg, "SIGINT");
78
+ await _chunkHKC663W4cjs.disposeAndExit.call(void 0, "EXIT");
79
79
  });
80
80
  process.once("SIGTERM", async (arg) => {
81
- _chunkO6QIJQRNcjs.log.call(void 0, ).info(arg, "SIGTERM");
82
- await _chunkO6QIJQRNcjs.disposeAndExit.call(void 0, "EXIT");
81
+ _chunkHKC663W4cjs.log.call(void 0, ).info(arg, "SIGTERM");
82
+ await _chunkHKC663W4cjs.disposeAndExit.call(void 0, "EXIT");
83
83
  });
84
84
  process.once("uncaughtException", async (arg) => {
85
- _chunkO6QIJQRNcjs.log.call(void 0, ).error(arg, "Uncaught Exception");
86
- await _chunkO6QIJQRNcjs.disposeAndExit.call(void 0, "ERROR");
85
+ _chunkHKC663W4cjs.log.call(void 0, ).error(arg, "Uncaught Exception");
86
+ await _chunkHKC663W4cjs.disposeAndExit.call(void 0, "ERROR");
87
87
  });
88
88
  process.once("unhandledRejection", async (arg) => {
89
- _chunkO6QIJQRNcjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
90
- await _chunkO6QIJQRNcjs.disposeAndExit.call(void 0, "ERROR");
89
+ _chunkHKC663W4cjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
90
+ await _chunkHKC663W4cjs.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: [_chunk7AHW7FCNcjs.SNAP_EVENT] }
198
+ { count: true, names: true, exclude: [_chunkKB7D46CCcjs.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 = _chunk7AHW7FCNcjs.pii_fields.call(void 0, schema);
280
+ const sensitive2 = _chunkKB7D46CCcjs.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: [_chunk7AHW7FCNcjs.SNAP_EVENT],
414
+ names: [_chunkKB7D46CCcjs.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 === _chunk7AHW7FCNcjs.TOMBSTONE_EVENT).map(([stream]) => stream);
843
+ const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkKB7D46CCcjs.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 _chunkO6QIJQRNcjs.store.call(void 0, ).truncate([
925
+ const result = await _chunkHKC663W4cjs.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 _chunkO6QIJQRNcjs.store.call(void 0, ).query(
938
+ await _chunkHKC663W4cjs.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 === _chunk7AHW7FCNcjs.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 === _chunkKB7D46CCcjs.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
- _chunkO6QIJQRNcjs.store.call(void 0, ),
952
+ _chunkHKC663W4cjs.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 _chunkO6QIJQRNcjs.store.call(void 0, ).query_stats(streams, {
981
- exclude: [_chunk7AHW7FCNcjs.SNAP_EVENT]
980
+ const stats = await _chunkHKC663W4cjs.store.call(void 0, ).query_stats(streams, {
981
+ exclude: [_chunkKB7D46CCcjs.SNAP_EVENT]
982
982
  });
983
- const domain_heads = await _chunkO6QIJQRNcjs.store.call(void 0, ).query_stats(streams, {
984
- exclude: [_chunk7AHW7FCNcjs.SNAP_EVENT, _chunk7AHW7FCNcjs.TOMBSTONE_EVENT]
983
+ const domain_heads = await _chunkHKC663W4cjs.store.call(void 0, ).query_stats(streams, {
984
+ exclude: [_chunkKB7D46CCcjs.SNAP_EVENT, _chunkKB7D46CCcjs.TOMBSTONE_EVENT]
985
985
  });
986
- const true_heads = await _chunkO6QIJQRNcjs.store.call(void 0, ).query_stats(streams, {});
986
+ const true_heads = await _chunkHKC663W4cjs.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]) === _chunk7AHW7FCNcjs.TOMBSTONE_EVENT;
990
+ const interrupted = _optionalChain([marker_head, 'optionalAccess', _48 => _48.name]) === _chunkKB7D46CCcjs.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
- _chunkO6QIJQRNcjs.store.call(void 0, ),
1014
+ _chunkHKC663W4cjs.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 _chunkO6QIJQRNcjs.store.call(void 0, ).query_stats(guarded, {});
1080
+ const heads = await _chunkHKC663W4cjs.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: _chunk7AHW7FCNcjs.TOMBSTONE_EVENT, stream: guard.stream }
1098
+ event: { id: guard.id, name: _chunkKB7D46CCcjs.TOMBSTONE_EVENT, stream: guard.stream }
1099
1099
  }
1100
1100
  }
1101
1101
  };
1102
1102
  });
1103
- const truncated = await _chunkO6QIJQRNcjs.store.call(void 0, ).truncate(trunc_targets);
1103
+ const truncated = await _chunkHKC663W4cjs.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 _chunkO6QIJQRNcjs.cache.call(void 0, ).set(stream, {
1109
+ await _chunkHKC663W4cjs.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 _chunkO6QIJQRNcjs.cache.call(void 0, ).invalidate(stream);
1118
+ await _chunkHKC663W4cjs.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
- _chunkO6QIJQRNcjs.log.call(void 0, ).error(new Error(message));
1132
+ _chunkHKC663W4cjs.log.call(void 0, ).error(new Error(message));
1133
1133
  }
1134
1134
 
1135
1135
  // src/internal/correlate-cycle.ts
@@ -1168,14 +1168,17 @@ var CorrelateCycle = (_class3 = class {
1168
1168
  */
1169
1169
  __init7() {this._raised = 1}
1170
1170
  __init8() {this._lowered = 0}
1171
- /** Counts releases, so a lease reply that lands after one is dropped. */
1172
- __init9() {this._releases = 0}
1171
+ /**
1172
+ * Bumped by a release (shutdown) and a restart (restore), so a scan or
1173
+ * lease reply that was out across one writes nothing.
1174
+ */
1175
+ __init9() {this._epoch = 0}
1173
1176
 
1174
1177
  // Bounded by `maxSubscribedStreams`; static records live apart so eviction
1175
1178
  // never drops their +Infinity floor.
1176
1179
 
1177
1180
  __init10() {this._static_subscriptions = /* @__PURE__ */ new Map()}
1178
- __init11() {this._patterns = new (0, _chunkO6QIJQRNcjs.LruMap)(PATTERN_CACHE_SIZE)}
1181
+ __init11() {this._patterns = new (0, _chunkHKC663W4cjs.LruMap)(PATTERN_CACHE_SIZE)}
1179
1182
 
1180
1183
 
1181
1184
 
@@ -1193,7 +1196,7 @@ var CorrelateCycle = (_class3 = class {
1193
1196
  on_init
1194
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);
1195
1198
  this._key = shard ? `${registry_key(registry.events)}:${[...shard].sort().join(",")}` : registry_key(registry.events);
1196
- this._dynamic_subscriptions = new (0, _chunkO6QIJQRNcjs.LruMap)(max_subscribed_streams);
1199
+ this._dynamic_subscriptions = new (0, _chunkHKC663W4cjs.LruMap)(max_subscribed_streams);
1197
1200
  this._registry = registry;
1198
1201
  this._declared_lanes = declared_lanes;
1199
1202
  this._static_targets = static_targets;
@@ -1240,6 +1243,7 @@ var CorrelateCycle = (_class3 = class {
1240
1243
  this._dynamic_subscriptions.clear();
1241
1244
  this._static_subscriptions.clear();
1242
1245
  this._raised++;
1246
+ this._epoch++;
1243
1247
  }
1244
1248
  /** Forget dynamic targets whose rows a full close deleted, so they re-subscribe. */
1245
1249
  forget_subscribed(streams) {
@@ -1248,7 +1252,7 @@ var CorrelateCycle = (_class3 = class {
1248
1252
  /** Would the target's own `fetch` (filtered by `source`) return this event? */
1249
1253
  _in_fetch_window(source, stream) {
1250
1254
  if (source === void 0 || source === stream) return true;
1251
- if (_chunkO6QIJQRNcjs.is_literal_source.call(void 0, source)) return false;
1255
+ if (_chunkHKC663W4cjs.is_literal_source.call(void 0, source)) return false;
1252
1256
  let pattern = this._patterns.get(source);
1253
1257
  if (!pattern) {
1254
1258
  pattern = new RegExp(source);
@@ -1259,38 +1263,31 @@ var CorrelateCycle = (_class3 = class {
1259
1263
  /** Scan past the checkpoint, subscribe new targets and raise their work marks. */
1260
1264
  async correlate(query = { after: -1, limit: 10 }, lease = false) {
1261
1265
  await this.init();
1262
- if (this._raised === this._lowered)
1263
- return {
1264
- subscribed: 0,
1265
- last_id: this._checkpoint,
1266
- marked: 0,
1267
- scanned: false
1268
- };
1266
+ const epoch = this._epoch;
1267
+ const idle = () => ({
1268
+ subscribed: 0,
1269
+ last_id: this._checkpoint,
1270
+ marked: 0,
1271
+ scanned: false
1272
+ });
1273
+ if (this._raised === this._lowered) return idle();
1269
1274
  const raised = this._raised;
1270
1275
  const now = Date.now();
1271
1276
  if (lease && now >= this._lease_until - CORRELATION_LEASE_MS / 2) {
1272
- const releases = this._releases;
1273
1277
  const { correlating } = await this._cd.subscribe([], void 0, {
1274
1278
  key: this._key,
1275
1279
  by: this._by,
1276
1280
  millis: CORRELATION_LEASE_MS
1277
1281
  });
1278
- const released = this._releases !== releases;
1279
- if (!released)
1280
- this._lease_until = correlating ? now + CORRELATION_LEASE_MS : 0;
1281
- if (correlating === false || released)
1282
- return {
1283
- subscribed: 0,
1284
- last_id: this._checkpoint,
1285
- marked: 0,
1286
- scanned: false
1287
- };
1282
+ if (this._epoch !== epoch) return idle();
1283
+ this._lease_until = correlating ? now + CORRELATION_LEASE_MS : 0;
1284
+ if (correlating === false) return idle();
1288
1285
  }
1289
1286
  const after = Math.max(this._checkpoint, query.after || -1);
1290
1287
  const correlated = /* @__PURE__ */ new Map();
1291
1288
  let last_id = after;
1292
1289
  let stopped = false;
1293
- const found = await _chunkO6QIJQRNcjs.store.call(void 0, ).query(
1290
+ const found = await _chunkHKC663W4cjs.store.call(void 0, ).query(
1294
1291
  (event) => {
1295
1292
  if (stopped) return;
1296
1293
  const register = this._registry.events[event.name];
@@ -1334,9 +1331,9 @@ var CorrelateCycle = (_class3 = class {
1334
1331
  correlated_at: void 0
1335
1332
  };
1336
1333
  const seen_in_scan = correlated.has(resolved.target);
1337
- const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunk7AHW7FCNcjs.DEFAULT_LANE));
1334
+ const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunkKB7D46CCcjs.DEFAULT_LANE));
1338
1335
  const held_priority = seen_in_scan ? entry.priority : _optionalChain([recorded, 'optionalAccess', _62 => _62.priority]);
1339
- const resolved_lane = _nullishCoalesce(lane, () => ( _chunk7AHW7FCNcjs.DEFAULT_LANE));
1336
+ const resolved_lane = _nullishCoalesce(lane, () => ( _chunkKB7D46CCcjs.DEFAULT_LANE));
1340
1337
  if (held_priority === priority && held_lane !== resolved_lane)
1341
1338
  report_lane_conflict(
1342
1339
  this._reported,
@@ -1363,6 +1360,7 @@ var CorrelateCycle = (_class3 = class {
1363
1360
  { ...query, after, with_pii: false }
1364
1361
  );
1365
1362
  if (this._declared_lanes.size > 1) await this._recall(correlated);
1363
+ if (this._epoch !== epoch) return idle();
1366
1364
  const streams = [];
1367
1365
  for (const [stream, entry] of correlated) {
1368
1366
  if (entry.upgraded || entry.correlated_at !== void 0)
@@ -1375,14 +1373,13 @@ var CorrelateCycle = (_class3 = class {
1375
1373
  });
1376
1374
  }
1377
1375
  if (streams.length) {
1378
- const held = lease && this._lease_until > 0;
1379
1376
  const renewed_at = Date.now();
1380
1377
  const { subscribed, correlating } = await this._cd.subscribe(
1381
1378
  streams,
1382
1379
  last_id,
1383
- held ? { key: this._key, by: this._by, millis: CORRELATION_LEASE_MS } : void 0
1380
+ lease ? { key: this._key, by: this._by, millis: CORRELATION_LEASE_MS } : void 0
1384
1381
  );
1385
- if (held && correlating !== false)
1382
+ if (lease && correlating !== false)
1386
1383
  this._lease_until = renewed_at + CORRELATION_LEASE_MS;
1387
1384
  const marked = streams.filter(
1388
1385
  (entry) => entry.correlated_at !== void 0
@@ -1412,7 +1409,7 @@ var CorrelateCycle = (_class3 = class {
1412
1409
  await Promise.all(
1413
1410
  missed.map(async ([stream, entry]) => {
1414
1411
  let row;
1415
- await _chunkO6QIJQRNcjs.store.call(void 0, ).query_streams(
1412
+ await _chunkHKC663W4cjs.store.call(void 0, ).query_streams(
1416
1413
  (position) => {
1417
1414
  row = position;
1418
1415
  },
@@ -1425,8 +1422,8 @@ var CorrelateCycle = (_class3 = class {
1425
1422
  lane: row.lane
1426
1423
  });
1427
1424
  if (entry.priority > row.priority) return;
1428
- const held_lane = _nullishCoalesce(row.lane, () => ( _chunk7AHW7FCNcjs.DEFAULT_LANE));
1429
- const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunk7AHW7FCNcjs.DEFAULT_LANE));
1425
+ const held_lane = _nullishCoalesce(row.lane, () => ( _chunkKB7D46CCcjs.DEFAULT_LANE));
1426
+ const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunkKB7D46CCcjs.DEFAULT_LANE));
1430
1427
  if (entry.priority === row.priority && held_lane !== resolved_lane)
1431
1428
  report_lane_conflict(
1432
1429
  this._reported,
@@ -1445,14 +1442,14 @@ var CorrelateCycle = (_class3 = class {
1445
1442
  async release_correlation() {
1446
1443
  try {
1447
1444
  this._lease_until = 0;
1448
- this._releases++;
1445
+ this._epoch++;
1449
1446
  await this._cd.subscribe([], void 0, {
1450
1447
  key: this._key,
1451
1448
  by: this._by,
1452
1449
  millis: 0
1453
1450
  });
1454
1451
  } catch (error) {
1455
- _chunkO6QIJQRNcjs.log.call(void 0, ).warn(
1452
+ _chunkHKC663W4cjs.log.call(void 0, ).warn(
1456
1453
  `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)}`
1457
1454
  );
1458
1455
  }
@@ -1605,14 +1602,14 @@ function compute_lag_lead_ratio(handled, lagging, leading) {
1605
1602
  }
1606
1603
 
1607
1604
  // src/internal/drain-ops.ts
1608
- var claim = (lagging, leading, by, millis, lane) => _chunkO6QIJQRNcjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1605
+ var claim = (lagging, leading, by, millis, lane) => _chunkHKC663W4cjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1609
1606
  async function fetch(leased, eventLimit) {
1610
1607
  return Promise.all(
1611
1608
  leased.map(async ({ stream, source, at, lagging }) => {
1612
1609
  const events = [];
1613
- const stream_exact = source !== void 0 && _chunkO6QIJQRNcjs.is_literal_source.call(void 0, source) ? true : void 0;
1610
+ const stream_exact = source !== void 0 && _chunkHKC663W4cjs.is_literal_source.call(void 0, source) ? true : void 0;
1614
1611
  try {
1615
- await _chunkO6QIJQRNcjs.store.call(void 0, ).query((e) => events.push(e), {
1612
+ await _chunkHKC663W4cjs.store.call(void 0, ).query((e) => events.push(e), {
1616
1613
  stream: source,
1617
1614
  stream_exact,
1618
1615
  after: at,
@@ -1632,30 +1629,30 @@ async function fetch(leased, eventLimit) {
1632
1629
  })
1633
1630
  );
1634
1631
  }
1635
- var ack = (leases) => _chunkO6QIJQRNcjs.store.call(void 0, ).ack(leases);
1636
- var block = (leases) => _chunkO6QIJQRNcjs.store.call(void 0, ).block(leases);
1637
- var subscribe = (streams, correlated_at, correlator) => _chunkO6QIJQRNcjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1632
+ var ack = (leases) => _chunkHKC663W4cjs.store.call(void 0, ).ack(leases);
1633
+ var block = (leases) => _chunkHKC663W4cjs.store.call(void 0, ).block(leases);
1634
+ var subscribe = (streams, correlated_at, correlator) => _chunkHKC663W4cjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1638
1635
 
1639
1636
  // src/internal/event-sourcing.ts
1640
1637
  var _actpatch = require('@rotorsoft/act-patch');
1641
1638
  var bare_patch = (_me, state2, partial) => _actpatch.patch.call(void 0, state2, partial);
1642
1639
  var validating_patch = (me, state2, partial, event) => {
1643
1640
  const next = _actpatch.patch.call(void 0, state2, partial);
1644
- return _chunkO6QIJQRNcjs.validate.call(void 0,
1641
+ return _chunkHKC663W4cjs.validate.call(void 0,
1645
1642
  `${me.name}.${String(event.name)}#${event.id}`,
1646
1643
  next,
1647
1644
  me.state
1648
1645
  );
1649
1646
  };
1650
1647
  var DEFAULT_BATCH = 500;
1651
- var cache_put = (stream, entry) => _chunkO6QIJQRNcjs.cache.call(void 0, ).set(stream, entry).catch(
1652
- (err) => _chunkO6QIJQRNcjs.log.call(void 0, ).warn(
1648
+ var cache_put = (stream, entry) => _chunkHKC663W4cjs.cache.call(void 0, ).set(stream, entry).catch(
1649
+ (err) => _chunkHKC663W4cjs.log.call(void 0, ).warn(
1653
1650
  err,
1654
1651
  "cache set skipped; the next load re-folds from the store"
1655
1652
  )
1656
1653
  );
1657
- var cache_drop = (stream) => _chunkO6QIJQRNcjs.cache.call(void 0, ).invalidate(stream).catch(
1658
- (err) => _chunkO6QIJQRNcjs.log.call(void 0, ).warn(
1654
+ var cache_drop = (stream) => _chunkHKC663W4cjs.cache.call(void 0, ).invalidate(stream).catch(
1655
+ (err) => _chunkHKC663W4cjs.log.call(void 0, ).warn(
1659
1656
  err,
1660
1657
  "cache invalidate skipped; a stale checkpoint re-folds from its event_id"
1661
1658
  )
@@ -1663,9 +1660,9 @@ var cache_drop = (stream) => _chunkO6QIJQRNcjs.cache.call(void 0, ).invalidate(s
1663
1660
  async function snap(snapshot) {
1664
1661
  const { id, stream, name, meta, version } = snapshot.event;
1665
1662
  try {
1666
- const [committed] = await _chunkO6QIJQRNcjs.store.call(void 0, ).commit(
1663
+ const [committed] = await _chunkHKC663W4cjs.store.call(void 0, ).commit(
1667
1664
  stream,
1668
- [{ name: _chunk7AHW7FCNcjs.SNAP_EVENT, data: snapshot.state }],
1665
+ [{ name: _chunkKB7D46CCcjs.SNAP_EVENT, data: snapshot.state }],
1669
1666
  {
1670
1667
  correlation: meta.correlation,
1671
1668
  causation: { event: { id, name, stream } }
@@ -1676,22 +1673,22 @@ async function snap(snapshot) {
1676
1673
  return committed;
1677
1674
  } catch (error) {
1678
1675
  const reason = error instanceof Error ? error.message : String(error);
1679
- _chunkO6QIJQRNcjs.log.call(void 0, ).warn(
1676
+ _chunkHKC663W4cjs.log.call(void 0, ).warn(
1680
1677
  `Snapshot write failed on stream "${stream}": ${reason} \u2014 cold starts will replay full history until snapshots succeed.`
1681
1678
  );
1682
1679
  }
1683
1680
  }
1684
1681
  async function tombstone(stream, expectedVersion, correlation) {
1685
1682
  try {
1686
- const [committed] = await _chunkO6QIJQRNcjs.store.call(void 0, ).commit(
1683
+ const [committed] = await _chunkHKC663W4cjs.store.call(void 0, ).commit(
1687
1684
  stream,
1688
- [{ name: _chunk7AHW7FCNcjs.TOMBSTONE_EVENT, data: {} }],
1685
+ [{ name: _chunkKB7D46CCcjs.TOMBSTONE_EVENT, data: {} }],
1689
1686
  { correlation, causation: {} },
1690
1687
  expectedVersion
1691
1688
  );
1692
1689
  return committed;
1693
1690
  } catch (error) {
1694
- if (error instanceof _chunk7AHW7FCNcjs.ConcurrencyError) return void 0;
1691
+ if (error instanceof _chunkKB7D46CCcjs.ConcurrencyError) return void 0;
1695
1692
  throw error;
1696
1693
  }
1697
1694
  }
@@ -1721,9 +1718,9 @@ async function scan(source, opts = {}, callback) {
1721
1718
  if (drop_closed_streams) {
1722
1719
  await source.query(
1723
1720
  (e) => {
1724
- if (e.name === _chunk7AHW7FCNcjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1721
+ if (e.name === _chunkKB7D46CCcjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1725
1722
  },
1726
- { names: [_chunk7AHW7FCNcjs.TOMBSTONE_EVENT] }
1723
+ { names: [_chunkKB7D46CCcjs.TOMBSTONE_EVENT] }
1727
1724
  );
1728
1725
  }
1729
1726
  let max_id;
@@ -1745,11 +1742,11 @@ async function scan(source, opts = {}, callback) {
1745
1742
  if (!is_valid(event))
1746
1743
  throw new Error(`Invalid event at index ${processed}`);
1747
1744
  if (on_progress) on_progress({ processed, id: event.id, max_id });
1748
- if (drop_snapshots && event.name === _chunk7AHW7FCNcjs.SNAP_EVENT) {
1745
+ if (drop_snapshots && event.name === _chunkKB7D46CCcjs.SNAP_EVENT) {
1749
1746
  dropped_snaps++;
1750
1747
  return;
1751
1748
  }
1752
- if (closed_streams.has(event.stream) && event.name !== _chunk7AHW7FCNcjs.TOMBSTONE_EVENT) {
1749
+ if (closed_streams.has(event.stream) && event.name !== _chunkKB7D46CCcjs.TOMBSTONE_EVENT) {
1753
1750
  dropped_closed++;
1754
1751
  return;
1755
1752
  }
@@ -1816,17 +1813,17 @@ async function scan(source, opts = {}, callback) {
1816
1813
  async function load(me, target, callback, patch_fn = bare_patch) {
1817
1814
  const { stream, actor, asOf } = target;
1818
1815
  const time_travel = !!asOf && Object.values(asOf).some((v) => v !== void 0);
1819
- const cached = time_travel ? void 0 : await _chunkO6QIJQRNcjs.cache.call(void 0, ).get(stream);
1816
+ const cached = time_travel ? void 0 : await _chunkHKC663W4cjs.cache.call(void 0, ).get(stream);
1820
1817
  const cache_hit = !!cached;
1821
1818
  let state2 = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _72 => _72.state]), () => ( (me.init ? me.init() : {})));
1822
1819
  let patches = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _73 => _73.patches]), () => ( 0));
1823
1820
  let snaps = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _74 => _74.snaps]), () => ( 0));
1824
1821
  let replayed = 0;
1825
1822
  let event;
1826
- await _chunkO6QIJQRNcjs.store.call(void 0, ).query(
1823
+ await _chunkHKC663W4cjs.store.call(void 0, ).query(
1827
1824
  (raw) => {
1828
1825
  event = me.view(raw, actor);
1829
- if (event.name === _chunk7AHW7FCNcjs.SNAP_EVENT) {
1826
+ if (event.name === _chunkKB7D46CCcjs.SNAP_EVENT) {
1830
1827
  state2 = event.data;
1831
1828
  snaps++;
1832
1829
  patches = 0;
@@ -1835,8 +1832,8 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1835
1832
  state2 = patch_fn(me, state2, me.patch[event.name](event, state2), event);
1836
1833
  patches++;
1837
1834
  replayed++;
1838
- } else if (event.name !== _chunk7AHW7FCNcjs.TOMBSTONE_EVENT) {
1839
- _chunkO6QIJQRNcjs.log.call(void 0, ).warn(
1835
+ } else if (event.name !== _chunkKB7D46CCcjs.TOMBSTONE_EVENT) {
1836
+ _chunkHKC663W4cjs.log.call(void 0, ).warn(
1840
1837
  `Skipping unknown event "${String(event.name)}" on stream "${stream}" (id=${event.id}) \u2014 no reducer in state "${me.name}"`
1841
1838
  );
1842
1839
  }
@@ -1860,7 +1857,7 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1860
1857
  ...cached ? { after: cached.event_id, with_snaps: true } : { ...time_travel ? {} : { with_snaps: true }, ...asOf }
1861
1858
  }
1862
1859
  );
1863
- const head_is_tombstone = _optionalChain([event, 'optionalAccess', _76 => _76.name]) === _chunk7AHW7FCNcjs.TOMBSTONE_EVENT;
1860
+ const head_is_tombstone = _optionalChain([event, 'optionalAccess', _76 => _76.name]) === _chunkKB7D46CCcjs.TOMBSTONE_EVENT;
1864
1861
  if (replayed > 0 && !time_travel && event && !me.pii_aware && !head_is_tombstone) {
1865
1862
  await cache_put(stream, {
1866
1863
  stream,
@@ -1888,7 +1885,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1888
1885
  if (!stream) throw new Error("Missing target stream");
1889
1886
  const reactingTo = _optionalChain([options, 'optionalAccess', _81 => _81.reactingTo]);
1890
1887
  const correlator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _82 => _82.correlator]), () => ( default_correlator));
1891
- const validated = _chunkO6QIJQRNcjs.validate.call(void 0, action2, payload, me.actions[action2]);
1888
+ const validated = _chunkHKC663W4cjs.validate.call(void 0, action2, payload, me.actions[action2]);
1892
1889
  const opts = _optionalChain([me, 'access', _83 => _83.options, 'optionalAccess', _84 => _84[action2]]);
1893
1890
  const max_retries = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _85 => _85.maxRetries]), () => ( 0));
1894
1891
  for (let attempt = 0; ; attempt++) {
@@ -1899,14 +1896,14 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1899
1896
  void 0,
1900
1897
  patch_fn
1901
1898
  );
1902
- if (_optionalChain([snapshot, 'access', _86 => _86.event, 'optionalAccess', _87 => _87.name]) === _chunk7AHW7FCNcjs.TOMBSTONE_EVENT)
1903
- throw new (0, _chunk7AHW7FCNcjs.StreamClosedError)(stream);
1899
+ if (_optionalChain([snapshot, 'access', _86 => _86.event, 'optionalAccess', _87 => _87.name]) === _chunkKB7D46CCcjs.TOMBSTONE_EVENT)
1900
+ throw new (0, _chunkKB7D46CCcjs.StreamClosedError)(stream);
1904
1901
  const expected = _nullishCoalesce(expectedVersion, () => ( (snapshot.version >= 0 ? snapshot.version : void 0)));
1905
1902
  if (me.given) {
1906
1903
  const invariants = me.given[action2] || [];
1907
1904
  invariants.forEach(({ valid: valid2, description }) => {
1908
1905
  if (!valid2(snapshot.state, actor))
1909
- throw new (0, _chunk7AHW7FCNcjs.InvariantError)(
1906
+ throw new (0, _chunkKB7D46CCcjs.InvariantError)(
1910
1907
  action2,
1911
1908
  validated,
1912
1909
  target,
@@ -1923,7 +1920,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1923
1920
  const tuples = Array.isArray(result[0]) ? result : [result];
1924
1921
  const valid = tuples.map(([name, data]) => ({
1925
1922
  name,
1926
- data: _chunkO6QIJQRNcjs.validate.call(void 0, name, data, me.events[name])
1923
+ data: _chunkHKC663W4cjs.validate.call(void 0, name, data, me.events[name])
1927
1924
  }));
1928
1925
  const emitted = valid.map((e) => me.message(e));
1929
1926
  const meta = {
@@ -1948,7 +1945,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1948
1945
  };
1949
1946
  let committed;
1950
1947
  try {
1951
- committed = await _chunkO6QIJQRNcjs.store.call(void 0, ).commit(
1948
+ committed = await _chunkHKC663W4cjs.store.call(void 0, ).commit(
1952
1949
  stream,
1953
1950
  emitted,
1954
1951
  meta,
@@ -1957,7 +1954,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1957
1954
  reactingTo ? expectedVersion : expected
1958
1955
  );
1959
1956
  } catch (error) {
1960
- if (error instanceof _chunk7AHW7FCNcjs.ConcurrencyError) void cache_drop(stream);
1957
+ if (error instanceof _chunkKB7D46CCcjs.ConcurrencyError) void cache_drop(stream);
1961
1958
  throw error;
1962
1959
  }
1963
1960
  let { state: state2, patches } = snapshot;
@@ -1996,19 +1993,19 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1996
1993
  }
1997
1994
  return snapshots;
1998
1995
  } catch (error) {
1999
- if (!(error instanceof _chunk7AHW7FCNcjs.ConcurrencyError)) throw error;
1996
+ if (!(error instanceof _chunkKB7D46CCcjs.ConcurrencyError)) throw error;
2000
1997
  if (expectedVersion !== void 0) throw error;
2001
1998
  if (attempt >= max_retries) throw error;
2002
1999
  if (_optionalChain([opts, 'optionalAccess', _94 => _94.backoff])) {
2003
2000
  const delay_ms = compute_backoff_delay(attempt, opts.backoff);
2004
- if (delay_ms > 0) await _chunkO6QIJQRNcjs.sleep.call(void 0, delay_ms);
2001
+ if (delay_ms > 0) await _chunkHKC663W4cjs.sleep.call(void 0, delay_ms);
2005
2002
  }
2006
2003
  }
2007
2004
  }
2008
2005
  }
2009
2006
 
2010
2007
  // src/internal/tracing.ts
2011
- var PRETTY = _chunkO6QIJQRNcjs.config.call(void 0, ).env !== "production";
2008
+ var PRETTY = _chunkHKC663W4cjs.config.call(void 0, ).env !== "production";
2012
2009
  var C_BLUE = "\x1B[38;5;39m";
2013
2010
  var C_ORANGE = "\x1B[38;5;208m";
2014
2011
  var C_GREEN = "\x1B[38;5;42m";
@@ -2194,7 +2191,7 @@ function budget_exhausted(lease, options, store_failing) {
2194
2191
  if (store_failing || !_optionalChain([options, 'optionalAccess', _104 => _104.blockOnError]) || lease.retry <= options.maxRetries)
2195
2192
  return void 0;
2196
2193
  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.`;
2197
- _chunkO6QIJQRNcjs.log.call(void 0, ).error(error);
2194
+ _chunkHKC663W4cjs.log.call(void 0, ).error(error);
2198
2195
  return { lease, handled: 0, acked_at: lease.at, error, block: true };
2199
2196
  }
2200
2197
  function fetch_failure_policy(registry) {
@@ -2210,13 +2207,13 @@ function fetch_failure_policy(registry) {
2210
2207
  function finalize(lease, handled, at, error, options, logger, failed_at) {
2211
2208
  if (!error) return { lease, handled, acked_at: at };
2212
2209
  logger.error(error);
2213
- const non_retryable = error instanceof _chunk7AHW7FCNcjs.NonRetryableError;
2210
+ const non_retryable = error instanceof _chunkKB7D46CCcjs.NonRetryableError;
2214
2211
  const block2 = options.blockOnError && (non_retryable || lease.retry >= options.maxRetries);
2215
2212
  if (block2)
2216
2213
  logger.error(
2217
2214
  non_retryable ? `Blocking ${lease.stream} on non-retryable error.` : `Blocking ${lease.stream} after ${lease.retry} retries.`
2218
2215
  );
2219
- const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunkO6QIJQRNcjs.DEFAULT_BACKOFF)));
2216
+ const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunkHKC663W4cjs.DEFAULT_BACKOFF)));
2220
2217
  return {
2221
2218
  lease,
2222
2219
  handled,
@@ -2345,7 +2342,7 @@ async function run_drain_cycle(deps, cycle) {
2345
2342
  const acked = await ops.ack(submitted);
2346
2343
  const expected = submitted.filter((l) => l.due === void 0).length;
2347
2344
  if (acked.length < expected)
2348
- _chunkO6QIJQRNcjs.log.call(void 0, ).warn(
2345
+ _chunkHKC663W4cjs.log.call(void 0, ).warn(
2349
2346
  `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.`
2350
2347
  );
2351
2348
  const closeable = handled.filter((h) => h.close !== void 0).map((h) => h.close);
@@ -2436,9 +2433,9 @@ var DrainController = (_class5 = class {
2436
2433
  if (!this.armed || this._stopped || this._inflight)
2437
2434
  return EMPTY_DRAIN;
2438
2435
  const d = _nullishCoalesce(this._deps.defaults, () => ( {}));
2439
- const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunkO6QIJQRNcjs.DEFAULT_STREAM_LIMIT));
2440
- const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunkO6QIJQRNcjs.DEFAULT_EVENT_LIMIT));
2441
- const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunkO6QIJQRNcjs.DEFAULT_LEASE_MILLIS));
2436
+ const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunkHKC663W4cjs.DEFAULT_STREAM_LIMIT));
2437
+ const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunkHKC663W4cjs.DEFAULT_EVENT_LIMIT));
2438
+ const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunkHKC663W4cjs.DEFAULT_LEASE_MILLIS));
2442
2439
  if (this._deps.breaker.state(Date.now()) === "open")
2443
2440
  return EMPTY_DRAIN;
2444
2441
  try {
@@ -2509,7 +2506,7 @@ function pii_gate(event, fields, predicate, actor) {
2509
2506
  const { pii, ...rest } = event;
2510
2507
  if (pii == null) {
2511
2508
  const shredded = { ...data };
2512
- for (const f of fields) shredded[f] = _chunk7AHW7FCNcjs.SHREDDED;
2509
+ for (const f of fields) shredded[f] = _chunkKB7D46CCcjs.SHREDDED;
2513
2510
  return { ...rest, data: shredded };
2514
2511
  }
2515
2512
  const allowed = !!actor && !!predicate && predicate(event, actor);
@@ -2520,7 +2517,7 @@ function pii_gate(event, fields, predicate, actor) {
2520
2517
  };
2521
2518
  }
2522
2519
  const redacted = { ...data };
2523
- for (const f of fields) redacted[f] = _chunk7AHW7FCNcjs.REDACTED;
2520
+ for (const f of fields) redacted[f] = _chunkKB7D46CCcjs.REDACTED;
2524
2521
  return { ...rest, data: redacted };
2525
2522
  }
2526
2523
  var IDENTITY_GATE = (event) => event;
@@ -2657,7 +2654,7 @@ function make_deferred(handler, schedule) {
2657
2654
  const call = handler;
2658
2655
  const deferred = async (event, stream, app) => {
2659
2656
  const when = typeof schedule === "function" ? schedule(event) : schedule;
2660
- if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunk7AHW7FCNcjs.DeferSignal)(when);
2657
+ if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunkKB7D46CCcjs.DeferSignal)(when);
2661
2658
  return call(event, stream, app);
2662
2659
  };
2663
2660
  Object.defineProperty(deferred, "name", { value: handler.name });
@@ -2726,7 +2723,7 @@ function build_handle(deps) {
2726
2723
  handled++;
2727
2724
  }
2728
2725
  } catch (error) {
2729
- if (error instanceof _chunk7AHW7FCNcjs.DeferSignal) {
2726
+ if (error instanceof _chunkKB7D46CCcjs.DeferSignal) {
2730
2727
  let defer;
2731
2728
  try {
2732
2729
  defer = resolve_defer_at(error.when, event);
@@ -3002,7 +2999,7 @@ var Act = (_class7 = class {
3002
2999
  /** Lanes to arm per event; `"all"` when a dynamic resolver hides the lane. */
3003
3000
 
3004
3001
 
3005
- __init26() {this._logger = _chunkO6QIJQRNcjs.log.call(void 0, )}
3002
+ __init26() {this._logger = _chunkHKC663W4cjs.log.call(void 0, )}
3006
3003
  /** This Act's ports: its own bag, or the singleton adapters. */
3007
3004
 
3008
3005
  /** Runs a body so internal `store()`/`cache()` calls resolve to `_ports`. */
@@ -3024,9 +3021,9 @@ var Act = (_class7 = class {
3024
3021
  this._lanes = lanes;
3025
3022
  this._declared_lanes = ["default", ...lanes.map((l) => l.name)];
3026
3023
  validate_only_lanes(options, lanes);
3027
- this._ports = _nullishCoalesce(options.scoped, () => ( _chunkO6QIJQRNcjs.default_scope.call(void 0, )));
3024
+ this._ports = _nullishCoalesce(options.scoped, () => ( _chunkHKC663W4cjs.default_scope.call(void 0, )));
3028
3025
  const ports = this._ports;
3029
- this._scoped = _chunkO6QIJQRNcjs.make_run_scoped.call(void 0, {
3026
+ this._scoped = _chunkHKC663W4cjs.make_run_scoped.call(void 0, {
3030
3027
  // Getters, not a spread: the singletons resolve lazily, so a later
3031
3028
  // `store(...)` / `cache(...)` still takes effect.
3032
3029
  get store() {
@@ -3036,14 +3033,14 @@ var Act = (_class7 = class {
3036
3033
  return ports.cache;
3037
3034
  },
3038
3035
  // Parsed per build, so a bad window throws on every build.
3039
- autoclose_window: _chunkO6QIJQRNcjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3036
+ autoclose_window: _chunkHKC663W4cjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3040
3037
  });
3041
3038
  this._correlator = _nullishCoalesce(options.correlator, () => ( default_correlator));
3042
3039
  this._es = build_es(this._logger, this._correlator, patch_fn);
3043
3040
  this._cd = build_drain(this._logger);
3044
3041
  const handle = build_handle({
3045
3042
  logger: this._logger,
3046
- reaction_scope: _chunkO6QIJQRNcjs.make_reaction_scope.call(void 0, {
3043
+ reaction_scope: _chunkHKC663W4cjs.make_reaction_scope.call(void 0, {
3047
3044
  do: this.do.bind(this),
3048
3045
  load: this.load.bind(this),
3049
3046
  query: this.query.bind(this),
@@ -3073,12 +3070,12 @@ var Act = (_class7 = class {
3073
3070
  this._ports.store,
3074
3071
  options.listen !== false
3075
3072
  );
3076
- _chunkO6QIJQRNcjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3073
+ _chunkHKC663W4cjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3077
3074
  }
3078
3075
  /** Shared by drain, settle and autoclose; bad knobs throw at build. */
3079
3076
  _build_breaker(options) {
3080
3077
  return new CircuitBreaker(
3081
- _chunkO6QIJQRNcjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3078
+ _chunkHKC663W4cjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3082
3079
  {
3083
3080
  on_error: (error, circuit) => this._emit_error(error, circuit),
3084
3081
  // When the cooldown elapses, settle once: its scan or claim is the
@@ -3112,7 +3109,7 @@ var Act = (_class7 = class {
3112
3109
  try {
3113
3110
  await this._run_close(targets);
3114
3111
  } catch (error) {
3115
- if (error instanceof _chunk7AHW7FCNcjs.StoreError) throw error;
3112
+ if (error instanceof _chunkKB7D46CCcjs.StoreError) throw error;
3116
3113
  this._logger.error(
3117
3114
  error,
3118
3115
  `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.`
@@ -3147,7 +3144,7 @@ var Act = (_class7 = class {
3147
3144
  /** Audit deps, built after the controllers so the lane set is final. */
3148
3145
  _build_audit_deps() {
3149
3146
  return {
3150
- store: _chunkO6QIJQRNcjs.store,
3147
+ store: _chunkHKC663W4cjs.store,
3151
3148
  event_to_state: this._event_to_state,
3152
3149
  // Declared lanes, not this process's controllers: a lane another
3153
3150
  // worker drains is not `unknown-lane`.
@@ -3160,7 +3157,7 @@ var Act = (_class7 = class {
3160
3157
  registry: this.registry,
3161
3158
  static_targets: classification.static_targets,
3162
3159
  cd: this._cd,
3163
- max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunk7AHW7FCNcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3160
+ max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunkKB7D46CCcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3164
3161
  // Declared lanes (not active ones): a lane another process claims is
3165
3162
  // still a valid destination.
3166
3163
  declared_lanes: new Set(this._declared_lanes),
@@ -3176,7 +3173,7 @@ var Act = (_class7 = class {
3176
3173
  /** Cold start: an idle deferred stream still fires on time after a restart. */
3177
3174
  async _seed_persisted_defers() {
3178
3175
  const now = Date.now();
3179
- await walk_streams(_chunkO6QIJQRNcjs.store.call(void 0, ), (pos) => {
3176
+ await walk_streams(_chunkHKC663W4cjs.store.call(void 0, ), (pos) => {
3180
3177
  if (pos.deferred_at === void 0 || pos.deferred_at <= now) return;
3181
3178
  const controller = this._drain_controllers.get(_nullishCoalesce(pos.lane, () => ( "default")));
3182
3179
  _optionalChain([controller, 'optionalAccess', _126 => _126.seed_defer, 'call', _127 => _127(pos.stream, pos.deferred_at)]);
@@ -3197,7 +3194,7 @@ var Act = (_class7 = class {
3197
3194
  on_settled: (drain) => this.emit("settled", drain),
3198
3195
  breaker: this._breaker
3199
3196
  },
3200
- _nullishCoalesce(options.settleDebounceMs, () => ( _chunk7AHW7FCNcjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3197
+ _nullishCoalesce(options.settleDebounceMs, () => ( _chunkKB7D46CCcjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3201
3198
  );
3202
3199
  }
3203
3200
 
@@ -3216,7 +3213,7 @@ var Act = (_class7 = class {
3216
3213
  */
3217
3214
  shutdown(options) {
3218
3215
  if (!this._shutdown_promise) {
3219
- _chunkO6QIJQRNcjs.resolveShutdownConfig.call(void 0, options);
3216
+ _chunkHKC663W4cjs.resolveShutdownConfig.call(void 0, options);
3220
3217
  this._shutdown_promise = (async () => {
3221
3218
  this.stop_correlations();
3222
3219
  this._settle.stop(true);
@@ -3236,10 +3233,10 @@ var Act = (_class7 = class {
3236
3233
  * default for none or 0, and for a running settle), capped.
3237
3234
  */
3238
3235
  _derive_grace_ms(running, settling) {
3239
- let max = settling ? _chunkO6QIJQRNcjs.DEFAULT_LEASE_MILLIS : 0;
3236
+ let max = settling ? _chunkHKC663W4cjs.DEFAULT_LEASE_MILLIS : 0;
3240
3237
  for (const c of running)
3241
- max = Math.max(max, c.lease_millis || _chunkO6QIJQRNcjs.DEFAULT_LEASE_MILLIS);
3242
- return Math.min(max, _chunkO6QIJQRNcjs.MAX_SHUTDOWN_GRACE_MS);
3238
+ max = Math.max(max, c.lease_millis || _chunkHKC663W4cjs.DEFAULT_LEASE_MILLIS);
3239
+ return Math.min(max, _chunkHKC663W4cjs.MAX_SHUTDOWN_GRACE_MS);
3243
3240
  }
3244
3241
  async _await_inflight(grace_ms) {
3245
3242
  const running = [...this._drain_controllers.values()].filter(
@@ -3319,7 +3316,7 @@ var Act = (_class7 = class {
3319
3316
  * @see {@link ValidationError}, {@link InvariantError}, {@link ConcurrencyError}
3320
3317
  */
3321
3318
  async do(action2, target, payload, options) {
3322
- const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.reactingTo]), () => ( _chunkO6QIJQRNcjs.current_reacting.call(void 0, )));
3319
+ const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.reactingTo]), () => ( _chunkHKC663W4cjs.current_reacting.call(void 0, )));
3323
3320
  const do_options = reacting_to === _optionalChain([options, 'optionalAccess', _130 => _130.reactingTo]) ? options : { ...options, reactingTo: reacting_to };
3324
3321
  return this._scoped(async () => {
3325
3322
  const snapshots = await this._es.action(
@@ -3380,7 +3377,7 @@ var Act = (_class7 = class {
3380
3377
  return this._scoped(async () => {
3381
3378
  let first;
3382
3379
  let last;
3383
- const count = await _chunkO6QIJQRNcjs.store.call(void 0, ).query((e) => {
3380
+ const count = await _chunkHKC663W4cjs.store.call(void 0, ).query((e) => {
3384
3381
  const gated = this.registry.query_gate(e.name)(e);
3385
3382
  if (!first) first = gated;
3386
3383
  last = gated;
@@ -3410,7 +3407,7 @@ var Act = (_class7 = class {
3410
3407
  async query_array(query) {
3411
3408
  return this._scoped(async () => {
3412
3409
  const events = [];
3413
- await _chunkO6QIJQRNcjs.store.call(void 0, ).query((e) => {
3410
+ await _chunkHKC663W4cjs.store.call(void 0, ).query((e) => {
3414
3411
  events.push(this.registry.query_gate(e.name)(e));
3415
3412
  }, query);
3416
3413
  return events;
@@ -3430,14 +3427,14 @@ var Act = (_class7 = class {
3430
3427
  */
3431
3428
  async forget(stream) {
3432
3429
  return this._scoped(async () => {
3433
- const s = _chunkO6QIJQRNcjs.store.call(void 0, );
3430
+ const s = _chunkHKC663W4cjs.store.call(void 0, );
3434
3431
  if (!s.forget_pii) {
3435
3432
  throw new Error(
3436
3433
  `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).`
3437
3434
  );
3438
3435
  }
3439
3436
  const eventCount = await s.forget_pii(stream);
3440
- await _chunkO6QIJQRNcjs.cache.call(void 0, ).invalidate(stream);
3437
+ await _chunkHKC663W4cjs.cache.call(void 0, ).invalidate(stream);
3441
3438
  if (eventCount > 0) {
3442
3439
  this.emit("forgotten", { stream, at: /* @__PURE__ */ new Date(), eventCount });
3443
3440
  }
@@ -3471,7 +3468,7 @@ var Act = (_class7 = class {
3471
3468
  * @see {@link correlate} for dynamic stream discovery
3472
3469
  */
3473
3470
  async drain(options = {}) {
3474
- _chunkO6QIJQRNcjs.resolveDrainConfig.call(void 0, options);
3471
+ _chunkHKC663W4cjs.resolveDrainConfig.call(void 0, options);
3475
3472
  if (!this._drain)
3476
3473
  return { fetched: [], leased: [], acked: [], blocked: [] };
3477
3474
  return this._scoped(() => this._drain_all(options));
@@ -3654,7 +3651,7 @@ var Act = (_class7 = class {
3654
3651
  */
3655
3652
  async reset(input) {
3656
3653
  return this._scoped(async () => {
3657
- const count = await _chunkO6QIJQRNcjs.store.call(void 0, ).reset(input);
3654
+ const count = await _chunkHKC663W4cjs.store.call(void 0, ).reset(input);
3658
3655
  for (const handler of this._batch_handlers.values())
3659
3656
  _optionalChain([handler, 'access', _137 => _137[FOLD_RESET], 'optionalCall', _138 => _138()]);
3660
3657
  if (count > 0) {
@@ -3690,7 +3687,7 @@ var Act = (_class7 = class {
3690
3687
  */
3691
3688
  async unblock(input) {
3692
3689
  return this._scoped(async () => {
3693
- const count = await _chunkO6QIJQRNcjs.store.call(void 0, ).unblock(input);
3690
+ const count = await _chunkHKC663W4cjs.store.call(void 0, ).unblock(input);
3694
3691
  if (count > 0) {
3695
3692
  this._wake();
3696
3693
  }
@@ -3739,7 +3736,7 @@ var Act = (_class7 = class {
3739
3736
  return { ...partial, duration_ms: Date.now() - started };
3740
3737
  }
3741
3738
  const target = _nullishCoalesce(sink, () => ( (() => {
3742
- const s = _chunkO6QIJQRNcjs.store.call(void 0, );
3739
+ const s = _chunkHKC663W4cjs.store.call(void 0, );
3743
3740
  if (!s.restore) throw new Error("adapter has no restore capability");
3744
3741
  return s;
3745
3742
  })()));
@@ -3784,7 +3781,7 @@ var Act = (_class7 = class {
3784
3781
  async blocked_streams(options) {
3785
3782
  return this._scoped(async () => {
3786
3783
  const positions = [];
3787
- await _chunkO6QIJQRNcjs.store.call(void 0, ).query_streams(
3784
+ await _chunkHKC663W4cjs.store.call(void 0, ).query_streams(
3788
3785
  (p) => {
3789
3786
  positions.push(p);
3790
3787
  },
@@ -3836,7 +3833,7 @@ var Act = (_class7 = class {
3836
3833
  * @see {@link Store.prioritize} for the underlying primitive
3837
3834
  */
3838
3835
  async prioritize(filter, priority) {
3839
- return this._scoped(() => _chunkO6QIJQRNcjs.store.call(void 0, ).prioritize(filter, priority));
3836
+ return this._scoped(() => _chunkHKC663W4cjs.store.call(void 0, ).prioritize(filter, priority));
3840
3837
  }
3841
3838
  /** Shared by `close()` and reaction-requested closes. */
3842
3839
  async _run_close(targets) {
@@ -3918,7 +3915,7 @@ var Act = (_class7 = class {
3918
3915
  * @see {@link correlate} for manual correlation
3919
3916
  */
3920
3917
  settle(options) {
3921
- _chunkO6QIJQRNcjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3918
+ _chunkHKC663W4cjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3922
3919
  this._schedule(options);
3923
3920
  }
3924
3921
  }, _class7);
@@ -4074,16 +4071,16 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4074
4071
  }),
4075
4072
  // Never block on autoclose: a transient query/store error should retry,
4076
4073
  // not quarantine the synthetic stream.
4077
- options: { blockOnError: false, maxRetries: _chunkO6QIJQRNcjs.DEFAULT_MAX_RETRIES },
4074
+ options: { blockOnError: false, maxRetries: _chunkHKC663W4cjs.DEFAULT_MAX_RETRIES },
4078
4075
  handler: async (event) => {
4079
4076
  const aggregate = event.stream;
4080
4077
  const window = read_window();
4081
4078
  if (!in_autoclose_window(window, /* @__PURE__ */ new Date()))
4082
- throw new (0, _chunk7AHW7FCNcjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4083
- const stats = await _chunkO6QIJQRNcjs.store.call(void 0, ).query_stats([aggregate], {
4079
+ throw new (0, _chunkKB7D46CCcjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4080
+ const stats = await _chunkHKC663W4cjs.store.call(void 0, ).query_stats([aggregate], {
4084
4081
  count: true,
4085
4082
  tail: keep_days !== void 0 ? true : void 0,
4086
- exclude: [_chunk7AHW7FCNcjs.TOMBSTONE_EVENT, _chunk7AHW7FCNcjs.SNAP_EVENT]
4083
+ exclude: [_chunkKB7D46CCcjs.TOMBSTONE_EVENT, _chunkKB7D46CCcjs.SNAP_EVENT]
4087
4084
  });
4088
4085
  const entry = stats.get(aggregate);
4089
4086
  if (!entry) return;
@@ -4114,7 +4111,7 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4114
4111
  dues.push(days_after(entry.tail.created, keep_days));
4115
4112
  const future = dues.map((d) => d.getTime()).filter((t) => t > Date.now());
4116
4113
  if (future.length)
4117
- throw new (0, _chunk7AHW7FCNcjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4114
+ throw new (0, _chunkKB7D46CCcjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4118
4115
  }
4119
4116
  };
4120
4117
  const key = `__autoclose_${st.name}`;
@@ -4318,9 +4315,9 @@ var _this_ = ({ stream }) => ({
4318
4315
 
4319
4316
  // src/builders/builder-utils.ts
4320
4317
  function register_lane(config2, lanes) {
4321
- _chunkO6QIJQRNcjs.resolveLaneConfig.call(void 0, config2);
4322
- if (config2.name === _chunk7AHW7FCNcjs.DEFAULT_LANE)
4323
- throw new Error(`Lane "${_chunk7AHW7FCNcjs.DEFAULT_LANE}" is reserved`);
4318
+ _chunkHKC663W4cjs.resolveLaneConfig.call(void 0, config2);
4319
+ if (config2.name === _chunkKB7D46CCcjs.DEFAULT_LANE)
4320
+ throw new Error(`Lane "${_chunkKB7D46CCcjs.DEFAULT_LANE}" is reserved`);
4324
4321
  const existing = lanes.find((l) => l.name === config2.name);
4325
4322
  if (!existing) return void lanes.push(config2);
4326
4323
  if (existing.leaseMillis !== config2.leaseMillis || existing.streamLimit !== config2.streamLimit || existing.cycleMs !== config2.cycleMs)
@@ -4362,9 +4359,9 @@ function reaction_on(event, events, builder) {
4362
4359
  // Validate the whole bag at the declaration site so a bad
4363
4360
  // `maxRetries`/`backoff`/`blockOnError` throws ZodError at build,
4364
4361
  // not a NaN gate on the first retry.
4365
- options: _chunkO6QIJQRNcjs.resolveReactionConfig.call(void 0, {
4366
- blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _153 => _153.blockOnError]), () => ( _chunkO6QIJQRNcjs.DEFAULT_BLOCK_ON_ERROR)),
4367
- maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _154 => _154.maxRetries]), () => ( _chunkO6QIJQRNcjs.DEFAULT_MAX_RETRIES)),
4362
+ options: _chunkHKC663W4cjs.resolveReactionConfig.call(void 0, {
4363
+ blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _153 => _153.blockOnError]), () => ( _chunkHKC663W4cjs.DEFAULT_BLOCK_ON_ERROR)),
4364
+ maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _154 => _154.maxRetries]), () => ( _chunkHKC663W4cjs.DEFAULT_MAX_RETRIES)),
4368
4365
  backoff: _optionalChain([options, 'optionalAccess', _155 => _155.backoff])
4369
4366
  })
4370
4367
  };
@@ -4449,7 +4446,7 @@ function date_reviver_schema(schema) {
4449
4446
 
4450
4447
  // src/builders/event-builder.ts
4451
4448
  function event_tags(schema) {
4452
- const pii = _chunk7AHW7FCNcjs.pii_schemas.call(void 0, schema);
4449
+ const pii = _chunkKB7D46CCcjs.pii_schemas.call(void 0, schema);
4453
4450
  const pii_dates = {};
4454
4451
  for (const [key, field] of Object.entries(pii)) {
4455
4452
  const dates = date_reviver_schema(field);
@@ -4486,7 +4483,7 @@ function make_event_reader(tags, disclosure, predicate = null) {
4486
4483
  });
4487
4484
  }
4488
4485
  function build_events(registry, states, lanes, owners) {
4489
- const declared = /* @__PURE__ */ new Set([_chunk7AHW7FCNcjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4486
+ const declared = /* @__PURE__ */ new Set([_chunkKB7D46CCcjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4490
4487
  const lane_errors = [];
4491
4488
  const tags = /* @__PURE__ */ new Map();
4492
4489
  const sensitive2 = /* @__PURE__ */ new Map();
@@ -4550,7 +4547,7 @@ function build_events(registry, states, lanes, owners) {
4550
4547
  if (reader) readers.set(event_name, reader);
4551
4548
  }
4552
4549
  const snap2 = make_event_reader(event_tags(state2.state), "redact", null);
4553
- if (snap2) readers.set(_chunk7AHW7FCNcjs.SNAP_EVENT, snap2);
4550
+ if (snap2) readers.set(_chunkKB7D46CCcjs.SNAP_EVENT, snap2);
4554
4551
  if (readers.size === 0) continue;
4555
4552
  state2.view = (event, actor) => (_nullishCoalesce(readers.get(event.name), () => ( IDENTITY_GATE)))(event, actor);
4556
4553
  }
@@ -4666,7 +4663,7 @@ function act() {
4666
4663
  const list = deprecation_summary.map(
4667
4664
  (d) => `"${d.deprecated}" (current: "${d.current}", state: "${d.state_name}")`
4668
4665
  ).join(", ");
4669
- _chunkO6QIJQRNcjs.log.call(void 0, ).info(
4666
+ _chunkHKC663W4cjs.log.call(void 0, ).info(
4670
4667
  `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.`
4671
4668
  );
4672
4669
  }
@@ -4708,7 +4705,7 @@ function act() {
4708
4705
  return reaction_on(event, registry.events, builder);
4709
4706
  },
4710
4707
  build: (options) => {
4711
- _chunkO6QIJQRNcjs.resolveActConfig.call(void 0, options);
4708
+ _chunkHKC663W4cjs.resolveActConfig.call(void 0, options);
4712
4709
  const patch_fn = _optionalChain([options, 'optionalAccess', _167 => _167.validateFoldedState]) === true ? validating_patch : bare_patch;
4713
4710
  if (!_built) {
4714
4711
  for (const proj of pending_projections) add_projection(proj);
@@ -4760,7 +4757,7 @@ function act() {
4760
4757
  synthesize_autoclose_reactions(
4761
4758
  registry,
4762
4759
  states,
4763
- _chunkO6QIJQRNcjs.current_autoclose_window
4760
+ _chunkHKC663W4cjs.current_autoclose_window
4764
4761
  );
4765
4762
  Object.freeze(registry.actions);
4766
4763
  Object.freeze(registry.events);
@@ -4809,8 +4806,8 @@ function _projection(target) {
4809
4806
  handler,
4810
4807
  resolver: _nullishCoalesce(default_resolver, () => ( _this_)),
4811
4808
  options: {
4812
- blockOnError: _chunkO6QIJQRNcjs.DEFAULT_BLOCK_ON_ERROR,
4813
- maxRetries: _chunkO6QIJQRNcjs.DEFAULT_MAX_RETRIES
4809
+ blockOnError: _chunkHKC663W4cjs.DEFAULT_BLOCK_ON_ERROR,
4810
+ maxRetries: _chunkHKC663W4cjs.DEFAULT_MAX_RETRIES
4814
4811
  }
4815
4812
  }),
4816
4813
  widened
@@ -4851,7 +4848,7 @@ function _projection(target) {
4851
4848
  throw new Error(
4852
4849
  `Projection "${target}" .of() partials must share one state name \u2014 got "${name}" and "${partial.name}"`
4853
4850
  );
4854
- const config2 = _chunkO6QIJQRNcjs.resolveFoldConfig.call(void 0, options);
4851
+ const config2 = _chunkHKC663W4cjs.resolveFoldConfig.call(void 0, options);
4855
4852
  const fold_events = {};
4856
4853
  for (const partial of partials)
4857
4854
  for (const [event_name, schema] of Object.entries(partial.events)) {
@@ -4869,8 +4866,8 @@ function _projection(target) {
4869
4866
  handler: noop,
4870
4867
  resolver: { target },
4871
4868
  options: {
4872
- blockOnError: _chunkO6QIJQRNcjs.DEFAULT_BLOCK_ON_ERROR,
4873
- maxRetries: _chunkO6QIJQRNcjs.DEFAULT_MAX_RETRIES
4869
+ blockOnError: _chunkHKC663W4cjs.DEFAULT_BLOCK_ON_ERROR,
4870
+ maxRetries: _chunkHKC663W4cjs.DEFAULT_MAX_RETRIES
4874
4871
  }
4875
4872
  }
4876
4873
  ]
@@ -4986,7 +4983,7 @@ function action_builder(state2) {
4986
4983
  throw new Error(`Duplicate action "${action2}"`);
4987
4984
  internal.actions[action2] = schema;
4988
4985
  if (options) {
4989
- _chunkO6QIJQRNcjs.resolveActionConfig.call(void 0, options);
4986
+ _chunkHKC663W4cjs.resolveActionConfig.call(void 0, options);
4990
4987
  internal.options ??= {};
4991
4988
  internal.options[action2] = options;
4992
4989
  }
@@ -5275,5 +5272,5 @@ function write_line(writer, line) {
5275
5272
 
5276
5273
 
5277
5274
 
5278
- exports.Act = Act; exports.ActorSchema = _chunk7AHW7FCNcjs.ActorSchema; exports.CausationEventSchema = _chunk7AHW7FCNcjs.CausationEventSchema; exports.CommittedMetaSchema = _chunk7AHW7FCNcjs.CommittedMetaSchema; exports.ConcurrencyError = _chunk7AHW7FCNcjs.ConcurrencyError; exports.ConsoleLogger = _chunkO6QIJQRNcjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunk7AHW7FCNcjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunk7AHW7FCNcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunk7AHW7FCNcjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunk7AHW7FCNcjs.DeferSignal; exports.Environments = _chunk7AHW7FCNcjs.Environments; exports.Errors = _chunk7AHW7FCNcjs.Errors; exports.EventMetaSchema = _chunk7AHW7FCNcjs.EventMetaSchema; exports.ExitCodes = _chunk7AHW7FCNcjs.ExitCodes; exports.InMemoryCache = _chunkO6QIJQRNcjs.InMemoryCache; exports.InMemoryStore = _chunkO6QIJQRNcjs.InMemoryStore; exports.InvariantError = _chunk7AHW7FCNcjs.InvariantError; exports.LogLevels = _chunk7AHW7FCNcjs.LogLevels; exports.NonRetryableError = _chunk7AHW7FCNcjs.NonRetryableError; exports.PackageSchema = _chunkO6QIJQRNcjs.PackageSchema; exports.QuerySchema = _chunk7AHW7FCNcjs.QuerySchema; exports.REDACTED = _chunk7AHW7FCNcjs.REDACTED; exports.SHREDDED = _chunk7AHW7FCNcjs.SHREDDED; exports.SNAP_EVENT = _chunk7AHW7FCNcjs.SNAP_EVENT; exports.StoreError = _chunk7AHW7FCNcjs.StoreError; exports.StreamClosedError = _chunk7AHW7FCNcjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunk7AHW7FCNcjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunk7AHW7FCNcjs.TargetSchema; exports.ValidationError = _chunk7AHW7FCNcjs.ValidationError; exports.ZodEmpty = _chunk7AHW7FCNcjs.ZodEmpty; exports.act = act; exports.cache = _chunkO6QIJQRNcjs.cache; exports.config = _chunkO6QIJQRNcjs.config; exports.dateReviver = _chunkO6QIJQRNcjs.dateReviver; exports.default_scope = _chunkO6QIJQRNcjs.default_scope; exports.dispose = _chunkO6QIJQRNcjs.dispose; exports.disposeAndExit = _chunkO6QIJQRNcjs.disposeAndExit; exports.extend = _chunkO6QIJQRNcjs.extend; exports.is_literal_source = _chunkO6QIJQRNcjs.is_literal_source; exports.log = _chunkO6QIJQRNcjs.log; exports.pii_fields = _chunk7AHW7FCNcjs.pii_fields; exports.port = _chunkO6QIJQRNcjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunkO6QIJQRNcjs.resolveAutocloseConfig2; exports.sensitive = _chunk7AHW7FCNcjs.sensitive; exports.sleep = _chunkO6QIJQRNcjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunkO6QIJQRNcjs.store; exports.validate = _chunkO6QIJQRNcjs.validate;
5275
+ exports.Act = Act; exports.ActorSchema = _chunkKB7D46CCcjs.ActorSchema; exports.CausationEventSchema = _chunkKB7D46CCcjs.CausationEventSchema; exports.CommittedMetaSchema = _chunkKB7D46CCcjs.CommittedMetaSchema; exports.ConcurrencyError = _chunkKB7D46CCcjs.ConcurrencyError; exports.ConsoleLogger = _chunkHKC663W4cjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunkKB7D46CCcjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunkKB7D46CCcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunkKB7D46CCcjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunkKB7D46CCcjs.DeferSignal; exports.Environments = _chunkKB7D46CCcjs.Environments; exports.Errors = _chunkKB7D46CCcjs.Errors; exports.EventMetaSchema = _chunkKB7D46CCcjs.EventMetaSchema; exports.ExitCodes = _chunkKB7D46CCcjs.ExitCodes; exports.InMemoryCache = _chunkHKC663W4cjs.InMemoryCache; exports.InMemoryStore = _chunkHKC663W4cjs.InMemoryStore; exports.InvariantError = _chunkKB7D46CCcjs.InvariantError; exports.LogLevels = _chunkKB7D46CCcjs.LogLevels; exports.NonRetryableError = _chunkKB7D46CCcjs.NonRetryableError; exports.PackageSchema = _chunkHKC663W4cjs.PackageSchema; exports.QuerySchema = _chunkKB7D46CCcjs.QuerySchema; exports.REDACTED = _chunkKB7D46CCcjs.REDACTED; exports.SHREDDED = _chunkKB7D46CCcjs.SHREDDED; exports.SNAP_EVENT = _chunkKB7D46CCcjs.SNAP_EVENT; exports.StoreError = _chunkKB7D46CCcjs.StoreError; exports.StreamClosedError = _chunkKB7D46CCcjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunkKB7D46CCcjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunkKB7D46CCcjs.TargetSchema; exports.ValidationError = _chunkKB7D46CCcjs.ValidationError; exports.ZodEmpty = _chunkKB7D46CCcjs.ZodEmpty; exports.act = act; exports.cache = _chunkHKC663W4cjs.cache; exports.config = _chunkHKC663W4cjs.config; exports.dateReviver = _chunkHKC663W4cjs.dateReviver; exports.default_scope = _chunkHKC663W4cjs.default_scope; exports.dispose = _chunkHKC663W4cjs.dispose; exports.disposeAndExit = _chunkHKC663W4cjs.disposeAndExit; exports.extend = _chunkHKC663W4cjs.extend; exports.is_literal_source = _chunkHKC663W4cjs.is_literal_source; exports.log = _chunkHKC663W4cjs.log; exports.pii_fields = _chunkKB7D46CCcjs.pii_fields; exports.port = _chunkHKC663W4cjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunkHKC663W4cjs.resolveAutocloseConfig2; exports.sensitive = _chunkKB7D46CCcjs.sensitive; exports.sleep = _chunkHKC663W4cjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunkHKC663W4cjs.store; exports.validate = _chunkHKC663W4cjs.validate;
5279
5276
  //# sourceMappingURL=index.cjs.map