@rotorsoft/act 1.36.0 → 1.37.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.
Files changed (34) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/@types/act.d.ts +0 -38
  3. package/dist/@types/act.d.ts.map +1 -1
  4. package/dist/@types/adapters/in-memory-store.d.ts +0 -4
  5. package/dist/@types/adapters/in-memory-store.d.ts.map +1 -1
  6. package/dist/@types/builders/act-builder.d.ts.map +1 -1
  7. package/dist/@types/internal/circuit-breaker.d.ts +0 -7
  8. package/dist/@types/internal/circuit-breaker.d.ts.map +1 -1
  9. package/dist/@types/internal/correlate-cycle.d.ts +0 -18
  10. package/dist/@types/internal/correlate-cycle.d.ts.map +1 -1
  11. package/dist/@types/internal/drain-cycle.d.ts +0 -14
  12. package/dist/@types/internal/drain-cycle.d.ts.map +1 -1
  13. package/dist/@types/internal/settle.d.ts +0 -9
  14. package/dist/@types/internal/settle.d.ts.map +1 -1
  15. package/dist/@types/sensitive.d.ts.map +1 -1
  16. package/dist/{chunk-A3XDAB7T.js → chunk-2H5MBVSQ.js} +3 -2
  17. package/dist/{chunk-A3XDAB7T.js.map → chunk-2H5MBVSQ.js.map} +1 -1
  18. package/dist/{chunk-VWUO5CEG.cjs → chunk-5OU5CTJZ.cjs} +19 -19
  19. package/dist/{chunk-VWUO5CEG.cjs.map → chunk-5OU5CTJZ.cjs.map} +1 -1
  20. package/dist/{chunk-NXURHBSB.cjs → chunk-J6G7UKZA.cjs} +4 -3
  21. package/dist/chunk-J6G7UKZA.cjs.map +1 -0
  22. package/dist/{chunk-P7FXHUMP.js → chunk-SIOPY6HT.js} +8 -8
  23. package/dist/chunk-SIOPY6HT.js.map +1 -0
  24. package/dist/index.cjs +233 -230
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.js +91 -88
  27. package/dist/index.js.map +1 -1
  28. package/dist/test/index.cjs +4 -4
  29. package/dist/test/index.js +2 -2
  30. package/dist/types/index.cjs +2 -2
  31. package/dist/types/index.js +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunk-NXURHBSB.cjs.map +0 -1
  34. package/dist/chunk-P7FXHUMP.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
 
42
42
 
43
- var _chunkVWUO5CEGcjs = require('./chunk-VWUO5CEG.cjs');
43
+ var _chunk5OU5CTJZcjs = require('./chunk-5OU5CTJZ.cjs');
44
44
 
45
45
 
46
46
 
@@ -71,24 +71,24 @@ var _chunkVWUO5CEGcjs = require('./chunk-VWUO5CEG.cjs');
71
71
 
72
72
 
73
73
 
74
- var _chunkNXURHBSBcjs = require('./chunk-NXURHBSB.cjs');
74
+ var _chunkJ6G7UKZAcjs = require('./chunk-J6G7UKZA.cjs');
75
75
 
76
76
  // src/signals.ts
77
77
  process.once("SIGINT", async (arg) => {
78
- _chunkVWUO5CEGcjs.log.call(void 0, ).info(arg, "SIGINT");
79
- await _chunkVWUO5CEGcjs.disposeAndExit.call(void 0, "EXIT");
78
+ _chunk5OU5CTJZcjs.log.call(void 0, ).info(arg, "SIGINT");
79
+ await _chunk5OU5CTJZcjs.disposeAndExit.call(void 0, "EXIT");
80
80
  });
81
81
  process.once("SIGTERM", async (arg) => {
82
- _chunkVWUO5CEGcjs.log.call(void 0, ).info(arg, "SIGTERM");
83
- await _chunkVWUO5CEGcjs.disposeAndExit.call(void 0, "EXIT");
82
+ _chunk5OU5CTJZcjs.log.call(void 0, ).info(arg, "SIGTERM");
83
+ await _chunk5OU5CTJZcjs.disposeAndExit.call(void 0, "EXIT");
84
84
  });
85
85
  process.once("uncaughtException", async (arg) => {
86
- _chunkVWUO5CEGcjs.log.call(void 0, ).error(arg, "Uncaught Exception");
87
- await _chunkVWUO5CEGcjs.disposeAndExit.call(void 0, "ERROR");
86
+ _chunk5OU5CTJZcjs.log.call(void 0, ).error(arg, "Uncaught Exception");
87
+ await _chunk5OU5CTJZcjs.disposeAndExit.call(void 0, "ERROR");
88
88
  });
89
89
  process.once("unhandledRejection", async (arg) => {
90
- _chunkVWUO5CEGcjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
91
- await _chunkVWUO5CEGcjs.disposeAndExit.call(void 0, "ERROR");
90
+ _chunk5OU5CTJZcjs.log.call(void 0, ).error(arg, "Unhandled Rejection");
91
+ await _chunk5OU5CTJZcjs.disposeAndExit.call(void 0, "ERROR");
92
92
  });
93
93
 
94
94
  // src/act.ts
@@ -196,7 +196,7 @@ async function* audit(deps, categories, options = {}) {
196
196
  if (need_stats) {
197
197
  const stats = await deps.store().query_stats(
198
198
  {},
199
- { count: true, names: true, exclude: [_chunkNXURHBSBcjs.SNAP_EVENT] }
199
+ { count: true, names: true, exclude: [_chunkJ6G7UKZAcjs.SNAP_EVENT] }
200
200
  );
201
201
  for (const [stream, s] of stats) {
202
202
  for (const p of passes) _optionalChain([p, 'access', _4 => _4.on_stat, 'optionalCall', _5 => _5(stream, s)]);
@@ -278,7 +278,7 @@ var make_schema_pass = (deps) => {
278
278
  return;
279
279
  }
280
280
  const schema = state2.events[name];
281
- const sensitive2 = _chunkNXURHBSBcjs.pii_fields.call(void 0, schema);
281
+ const sensitive2 = _chunkJ6G7UKZAcjs.pii_fields.call(void 0, schema);
282
282
  let parse_schema = schema;
283
283
  if (sensitive2.length > 0) {
284
284
  const omitter = schema.omit;
@@ -412,7 +412,7 @@ var make_restart_candidate_pass = (deps, options) => {
412
412
  {
413
413
  stream,
414
414
  stream_exact: true,
415
- names: [_chunkNXURHBSBcjs.SNAP_EVENT],
415
+ names: [_chunkJ6G7UKZAcjs.SNAP_EVENT],
416
416
  with_snaps: true
417
417
  }
418
418
  );
@@ -709,12 +709,10 @@ var CircuitBreaker = (_class = class {
709
709
  stop() {
710
710
  this._clear_wake();
711
711
  }
712
- /**
713
- * Schedule the `on_retry` wake `cooldownMs` out so the breaker re-trials
714
- * the store on its own. No-op when no `on_retry` hook is wired (e.g. unit
715
- * tests of the pure state machine). The timer is `unref`'d so it never
716
- * keeps the process alive.
717
- */
712
+ // Schedule the `on_retry` wake `cooldownMs` out so the breaker re-trials
713
+ // the store on its own. No-op when no `on_retry` hook is wired (e.g. unit
714
+ // tests of the pure state machine). The timer is `unref`'d so it never
715
+ // keeps the process alive.
718
716
  _schedule_wake() {
719
717
  if (!this._hooks.on_retry) return;
720
718
  this._clear_wake();
@@ -730,7 +728,7 @@ var CircuitBreaker = (_class = class {
730
728
  this._wake = void 0;
731
729
  }
732
730
  }
733
- /** Pure state transition for a failure — no side effects. */
731
+ // Pure state transition for a failure — no side effects.
734
732
  _advance(now) {
735
733
  if (this._opened_at !== void 0) {
736
734
  this._opened_at = now;
@@ -841,7 +839,7 @@ async function run_close_cycle(targets, deps) {
841
839
  deps,
842
840
  () => run_full_closes(full, target_map, deps, skipped)
843
841
  );
844
- const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkNXURHBSBcjs.TOMBSTONE_EVENT).map(([stream]) => stream);
842
+ const retired = [...truncated.entries()].filter(([, r]) => r.committed.name === _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT).map(([stream]) => stream);
845
843
  if (retired.length) _optionalChain([deps, 'access', _42 => _42.forget_subscribed, 'optionalCall', _43 => _43(retired)]);
846
844
  for (const [stream, entry] of windowed_result) truncated.set(stream, entry);
847
845
  return { truncated, skipped };
@@ -923,7 +921,7 @@ async function run_windowed_closes(windowed, deps, skipped) {
923
921
  if (!await windowed_prune_pending(t.stream, t.before, max_id))
924
922
  return void 0;
925
923
  if (t.archive) await t.archive();
926
- const result = await _chunkVWUO5CEGcjs.store.call(void 0, ).truncate([
924
+ const result = await _chunk5OU5CTJZcjs.store.call(void 0, ).truncate([
927
925
  { stream: t.stream, before: t.before, max_id }
928
926
  ]);
929
927
  return result.get(t.stream);
@@ -936,10 +934,10 @@ async function run_windowed_closes(windowed, deps, skipped) {
936
934
  async function windowed_prune_pending(stream, before, max_id) {
937
935
  let boundary_id;
938
936
  let min_id;
939
- await _chunkVWUO5CEGcjs.store.call(void 0, ).query(
937
+ await _chunk5OU5CTJZcjs.store.call(void 0, ).query(
940
938
  (event) => {
941
939
  if (min_id === void 0 || event.id < min_id) min_id = event.id;
942
- if (event.name === _chunkNXURHBSBcjs.SNAP_EVENT && event.created < before && (max_id === void 0 || event.id <= max_id) && (boundary_id === void 0 || event.id > boundary_id))
940
+ if (event.name === _chunkJ6G7UKZAcjs.SNAP_EVENT && event.created < before && (max_id === void 0 || event.id <= max_id) && (boundary_id === void 0 || event.id > boundary_id))
943
941
  boundary_id = event.id;
944
942
  },
945
943
  { stream, stream_exact: true, with_snaps: true, after: -1 }
@@ -950,7 +948,7 @@ async function probe_min_watermarks(streams, page_size, checkpoint) {
950
948
  const min_at = /* @__PURE__ */ new Map();
951
949
  const matches = source_matcher();
952
950
  await walk_streams(
953
- _chunkVWUO5CEGcjs.store.call(void 0, ),
951
+ _chunk5OU5CTJZcjs.store.call(void 0, ),
954
952
  (position) => {
955
953
  const pending = position.correlated_at === void 0 || position.at < position.correlated_at;
956
954
  const cap = pending ? position.at : Math.max(position.at, checkpoint);
@@ -978,17 +976,17 @@ function source_matcher() {
978
976
  };
979
977
  }
980
978
  async function scan_stream_heads(streams) {
981
- const stats = await _chunkVWUO5CEGcjs.store.call(void 0, ).query_stats(streams, {
982
- exclude: [_chunkNXURHBSBcjs.SNAP_EVENT]
979
+ const stats = await _chunk5OU5CTJZcjs.store.call(void 0, ).query_stats(streams, {
980
+ exclude: [_chunkJ6G7UKZAcjs.SNAP_EVENT]
983
981
  });
984
- const domain_heads = await _chunkVWUO5CEGcjs.store.call(void 0, ).query_stats(streams, {
985
- exclude: [_chunkNXURHBSBcjs.SNAP_EVENT, _chunkNXURHBSBcjs.TOMBSTONE_EVENT]
982
+ const domain_heads = await _chunk5OU5CTJZcjs.store.call(void 0, ).query_stats(streams, {
983
+ exclude: [_chunkJ6G7UKZAcjs.SNAP_EVENT, _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT]
986
984
  });
987
- const true_heads = await _chunkVWUO5CEGcjs.store.call(void 0, ).query_stats(streams, {});
985
+ const true_heads = await _chunk5OU5CTJZcjs.store.call(void 0, ).query_stats(streams, {});
988
986
  const out = /* @__PURE__ */ new Map();
989
987
  for (const [stream, { head }] of domain_heads) {
990
988
  const marker_head = _optionalChain([stats, 'access', _45 => _45.get, 'call', _46 => _46(stream), 'optionalAccess', _47 => _47.head]);
991
- const interrupted = _optionalChain([marker_head, 'optionalAccess', _48 => _48.name]) === _chunkNXURHBSBcjs.TOMBSTONE_EVENT;
989
+ const interrupted = _optionalChain([marker_head, 'optionalAccess', _48 => _48.name]) === _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT;
992
990
  out.set(stream, {
993
991
  max_id: head.id,
994
992
  version: true_heads.get(stream).head.version,
@@ -1012,7 +1010,7 @@ async function partition_by_safety(stream_info, reactive, skipped, page_size, ca
1012
1010
  const matches = source_matcher();
1013
1011
  const targets = [...stream_info.keys()];
1014
1012
  await walk_streams(
1015
- _chunkVWUO5CEGcjs.store.call(void 0, ),
1013
+ _chunk5OU5CTJZcjs.store.call(void 0, ),
1016
1014
  (position) => {
1017
1015
  const has_work = position.correlated_at !== void 0 && position.at < position.correlated_at;
1018
1016
  if (!has_work) return;
@@ -1078,7 +1076,7 @@ async function run_archive_callbacks(guarded, target_map) {
1078
1076
  }
1079
1077
  }
1080
1078
  async function heads_still_guarded(guarded, guard_events, skipped) {
1081
- const heads = await _chunkVWUO5CEGcjs.store.call(void 0, ).query_stats(guarded, {});
1079
+ const heads = await _chunk5OU5CTJZcjs.store.call(void 0, ).query_stats(guarded, {});
1082
1080
  return guarded.filter((stream) => {
1083
1081
  if (_optionalChain([heads, 'access', _55 => _55.get, 'call', _56 => _56(stream), 'optionalAccess', _57 => _57.head, 'access', _58 => _58.id]) === guard_events.get(stream).id)
1084
1082
  return true;
@@ -1096,18 +1094,18 @@ async function truncate_and_warm_cache(guarded, seed_states, guard_events, corre
1096
1094
  meta: {
1097
1095
  correlation,
1098
1096
  causation: {
1099
- event: { id: guard.id, name: _chunkNXURHBSBcjs.TOMBSTONE_EVENT, stream: guard.stream }
1097
+ event: { id: guard.id, name: _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT, stream: guard.stream }
1100
1098
  }
1101
1099
  }
1102
1100
  };
1103
1101
  });
1104
- const truncated = await _chunkVWUO5CEGcjs.store.call(void 0, ).truncate(trunc_targets);
1102
+ const truncated = await _chunk5OU5CTJZcjs.store.call(void 0, ).truncate(trunc_targets);
1105
1103
  await Promise.all(
1106
1104
  guarded.map(async (stream) => {
1107
1105
  const entry = truncated.get(stream);
1108
1106
  const state2 = seed_states.get(stream);
1109
1107
  if (state2 && entry) {
1110
- await _chunkVWUO5CEGcjs.cache.call(void 0, ).set(stream, {
1108
+ await _chunk5OU5CTJZcjs.cache.call(void 0, ).set(stream, {
1111
1109
  stream,
1112
1110
  state: state2,
1113
1111
  version: entry.committed.version,
@@ -1116,7 +1114,7 @@ async function truncate_and_warm_cache(guarded, seed_states, guard_events, corre
1116
1114
  snaps: 1
1117
1115
  });
1118
1116
  } else {
1119
- await _chunkVWUO5CEGcjs.cache.call(void 0, ).invalidate(stream);
1117
+ await _chunk5OU5CTJZcjs.cache.call(void 0, ).invalidate(stream);
1120
1118
  }
1121
1119
  })
1122
1120
  );
@@ -1130,7 +1128,7 @@ var _crypto = require('crypto');
1130
1128
  function report_once(seen, key, message) {
1131
1129
  if (seen.has(key)) return;
1132
1130
  seen.add(key);
1133
- _chunkVWUO5CEGcjs.log.call(void 0, ).error(new Error(message));
1131
+ _chunk5OU5CTJZcjs.log.call(void 0, ).error(new Error(message));
1134
1132
  }
1135
1133
 
1136
1134
  // src/internal/correlate-cycle.ts
@@ -1157,23 +1155,19 @@ function report_lane_conflict(seen, handler, target, kept, dropped) {
1157
1155
  }
1158
1156
  var CorrelateCycle = (_class3 = class {
1159
1157
  __init3() {this._checkpoint = -1}
1160
- /** Lease holder id; per instance, so a restart never inherits a stale claim. */
1158
+ // Lease holder id; per instance, so a restart never inherits a stale claim.
1161
1159
  __init4() {this._by = _crypto.randomUUID.call(void 0, )}
1162
1160
 
1163
- /** Local expiry of the held lease (0 = none); stale only costs a duplicate scan. */
1161
+ // Local expiry of the held lease (0 = none); stale only costs a duplicate scan.
1164
1162
  __init5() {this._lease_until = 0}
1165
- /**
1166
- * Armed while `_raised` (bumped by a commit or notification) is ahead of
1167
- * `_lowered` (the raise count the last short page saw). Starts armed.
1168
- */
1163
+ // Armed while `_raised` (bumped by a commit or notification) is ahead of
1164
+ // `_lowered` (the raise count the last short page saw). Starts armed.
1169
1165
  __init6() {this._raised = 1}
1170
1166
  __init7() {this._lowered = 0}
1171
- /**
1172
- * Bumped by a release (shutdown), so a scan or lease reply that was out
1173
- * across one writes nothing.
1174
- */
1167
+ // Bumped by a release (shutdown), so a scan or lease reply that was out
1168
+ // across one writes nothing.
1175
1169
  __init8() {this._epoch = 0}
1176
- /** Passes in flight: a restore waits for them, and refuses new ones. */
1170
+ // Passes in flight: a restore waits for them, and refuses new ones.
1177
1171
  __init9() {this._passes = /* @__PURE__ */ new Set()}
1178
1172
  __init10() {this._restoring = false}
1179
1173
 
@@ -1181,13 +1175,13 @@ var CorrelateCycle = (_class3 = class {
1181
1175
  // never lets a resolution re-lane them.
1182
1176
 
1183
1177
  __init11() {this._static_subscriptions = /* @__PURE__ */ new Map()}
1184
- __init12() {this._patterns = new (0, _chunkVWUO5CEGcjs.LruMap)(PATTERN_CACHE_SIZE)}
1178
+ __init12() {this._patterns = new (0, _chunk5OU5CTJZcjs.LruMap)(PATTERN_CACHE_SIZE)}
1185
1179
 
1186
1180
 
1187
1181
 
1188
1182
 
1189
1183
 
1190
- /** Report-once keys; per instance because `internal/` holds no module state. */
1184
+ // Report-once keys; per instance because `internal/` holds no module state.
1191
1185
  __init13() {this._reported = /* @__PURE__ */ new Set()}
1192
1186
  constructor({
1193
1187
  registry,
@@ -1199,7 +1193,7 @@ var CorrelateCycle = (_class3 = class {
1199
1193
  on_init
1200
1194
  }) {;_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);
1201
1195
  this._key = shard ? `${registry_key(registry.events)}:${[...shard].sort().join(",")}` : registry_key(registry.events);
1202
- this._dynamic_subscriptions = new (0, _chunkVWUO5CEGcjs.LruMap)(max_subscribed_streams);
1196
+ this._dynamic_subscriptions = new (0, _chunk5OU5CTJZcjs.LruMap)(max_subscribed_streams);
1203
1197
  this._registry = registry;
1204
1198
  this._declared_lanes = declared_lanes;
1205
1199
  this._static_targets = static_targets;
@@ -1254,10 +1248,10 @@ var CorrelateCycle = (_class3 = class {
1254
1248
  forget_subscribed(streams) {
1255
1249
  for (const stream of streams) this._dynamic_subscriptions.delete(stream);
1256
1250
  }
1257
- /** Would the target's own `fetch` (filtered by `source`) return this event? */
1251
+ // Would the target's own `fetch` (filtered by `source`) return this event?
1258
1252
  _in_fetch_window(source, stream) {
1259
1253
  if (source === void 0 || source === stream) return true;
1260
- if (_chunkVWUO5CEGcjs.is_literal_source.call(void 0, source)) return false;
1254
+ if (_chunk5OU5CTJZcjs.is_literal_source.call(void 0, source)) return false;
1261
1255
  let pattern = this._patterns.get(source);
1262
1256
  if (!pattern) {
1263
1257
  pattern = new RegExp(source);
@@ -1300,7 +1294,7 @@ var CorrelateCycle = (_class3 = class {
1300
1294
  const correlated = /* @__PURE__ */ new Map();
1301
1295
  let last_id = after;
1302
1296
  let stopped = false;
1303
- const found = await _chunkVWUO5CEGcjs.store.call(void 0, ).query(
1297
+ const found = await _chunk5OU5CTJZcjs.store.call(void 0, ).query(
1304
1298
  (event) => {
1305
1299
  if (stopped) return;
1306
1300
  const register = this._registry.events[event.name];
@@ -1345,9 +1339,9 @@ var CorrelateCycle = (_class3 = class {
1345
1339
  correlated_at: void 0
1346
1340
  };
1347
1341
  const seen_in_scan = correlated.has(resolved.target);
1348
- const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunkNXURHBSBcjs.DEFAULT_LANE));
1342
+ const held_lane = _nullishCoalesce((seen_in_scan ? entry.lane : _optionalChain([recorded, 'optionalAccess', _61 => _61.lane])), () => ( _chunkJ6G7UKZAcjs.DEFAULT_LANE));
1349
1343
  const held_priority = seen_in_scan ? entry.priority : _optionalChain([recorded, 'optionalAccess', _62 => _62.priority]);
1350
- const resolved_lane = _nullishCoalesce(lane, () => ( _chunkNXURHBSBcjs.DEFAULT_LANE));
1344
+ const resolved_lane = _nullishCoalesce(lane, () => ( _chunkJ6G7UKZAcjs.DEFAULT_LANE));
1351
1345
  if (held_priority === priority && held_lane !== resolved_lane)
1352
1346
  report_lane_conflict(
1353
1347
  this._reported,
@@ -1413,17 +1407,15 @@ var CorrelateCycle = (_class3 = class {
1413
1407
  if (!stopped && found !== limit) this._lowered = raised;
1414
1408
  return { kind: "scanned", last_id, subscribed: 0, marked: 0, read };
1415
1409
  }
1416
- /**
1417
- * Read the row of each target this scan had no record of (new or evicted),
1418
- * so a resolution that doesn't beat its priority keeps the row's lane.
1419
- * Only called with more than one lane declared.
1420
- */
1410
+ // Read the row of each target this scan had no record of (new or evicted),
1411
+ // so a resolution that doesn't beat its priority keeps the row's lane.
1412
+ // Only called with more than one lane declared.
1421
1413
  async _recall(correlated) {
1422
1414
  const missed = [...correlated].filter(([, entry]) => entry.missed);
1423
1415
  await Promise.all(
1424
1416
  missed.map(async ([stream, entry]) => {
1425
1417
  let row;
1426
- await _chunkVWUO5CEGcjs.store.call(void 0, ).query_streams(
1418
+ await _chunk5OU5CTJZcjs.store.call(void 0, ).query_streams(
1427
1419
  (position) => {
1428
1420
  row = position;
1429
1421
  },
@@ -1435,8 +1427,8 @@ var CorrelateCycle = (_class3 = class {
1435
1427
  lane: row.lane
1436
1428
  });
1437
1429
  if (entry.priority > row.priority) return;
1438
- const held_lane = _nullishCoalesce(row.lane, () => ( _chunkNXURHBSBcjs.DEFAULT_LANE));
1439
- const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunkNXURHBSBcjs.DEFAULT_LANE));
1430
+ const held_lane = _nullishCoalesce(row.lane, () => ( _chunkJ6G7UKZAcjs.DEFAULT_LANE));
1431
+ const resolved_lane = _nullishCoalesce(entry.lane, () => ( _chunkJ6G7UKZAcjs.DEFAULT_LANE));
1440
1432
  if (entry.priority === row.priority && held_lane !== resolved_lane)
1441
1433
  report_lane_conflict(
1442
1434
  this._reported,
@@ -1462,7 +1454,7 @@ var CorrelateCycle = (_class3 = class {
1462
1454
  millis: 0
1463
1455
  });
1464
1456
  } catch (error) {
1465
- _chunkVWUO5CEGcjs.log.call(void 0, ).warn(
1457
+ _chunk5OU5CTJZcjs.log.call(void 0, ).warn(
1466
1458
  `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)}`
1467
1459
  );
1468
1460
  }
@@ -1615,14 +1607,14 @@ function compute_lag_lead_ratio(handled, lagging, leading) {
1615
1607
  }
1616
1608
 
1617
1609
  // src/internal/drain-ops.ts
1618
- var claim = (lagging, leading, by, millis, lane) => _chunkVWUO5CEGcjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1610
+ var claim = (lagging, leading, by, millis, lane) => _chunk5OU5CTJZcjs.store.call(void 0, ).claim(lagging, leading, by, millis, lane);
1619
1611
  async function fetch(leased, eventLimit) {
1620
1612
  return Promise.all(
1621
1613
  leased.map(async ({ stream, source, at, lagging }) => {
1622
1614
  const events = [];
1623
- const stream_exact = source !== void 0 && _chunkVWUO5CEGcjs.is_literal_source.call(void 0, source) ? true : void 0;
1615
+ const stream_exact = source !== void 0 && _chunk5OU5CTJZcjs.is_literal_source.call(void 0, source) ? true : void 0;
1624
1616
  try {
1625
- await _chunkVWUO5CEGcjs.store.call(void 0, ).query((e) => events.push(e), {
1617
+ await _chunk5OU5CTJZcjs.store.call(void 0, ).query((e) => events.push(e), {
1626
1618
  stream: source,
1627
1619
  stream_exact,
1628
1620
  after: at,
@@ -1642,9 +1634,9 @@ async function fetch(leased, eventLimit) {
1642
1634
  })
1643
1635
  );
1644
1636
  }
1645
- var ack = (leases) => _chunkVWUO5CEGcjs.store.call(void 0, ).ack(leases);
1646
- var block = (leases) => _chunkVWUO5CEGcjs.store.call(void 0, ).block(leases);
1647
- var subscribe = (streams, correlated_at, correlator) => _chunkVWUO5CEGcjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1637
+ var ack = (leases) => _chunk5OU5CTJZcjs.store.call(void 0, ).ack(leases);
1638
+ var block = (leases) => _chunk5OU5CTJZcjs.store.call(void 0, ).block(leases);
1639
+ var subscribe = (streams, correlated_at, correlator) => _chunk5OU5CTJZcjs.store.call(void 0, ).subscribe(streams, correlated_at, correlator);
1648
1640
 
1649
1641
  // src/internal/event-sourcing.ts
1650
1642
  var _actpatch = require('@rotorsoft/act-patch');
@@ -1659,29 +1651,29 @@ var check_invariants = (target, state2, schema, pii_aware) => {
1659
1651
  try {
1660
1652
  result = schema.safeParse(state2);
1661
1653
  } catch (error) {
1662
- throw new (0, _chunkNXURHBSBcjs.ValidationError)(target, state2, error);
1654
+ throw new (0, _chunkJ6G7UKZAcjs.ValidationError)(target, state2, error);
1663
1655
  }
1664
1656
  if (result.success) return;
1665
1657
  const issues = pii_aware ? result.error.issues.filter((issue) => {
1666
1658
  const value = value_at(state2, issue.path);
1667
- return value !== _chunkNXURHBSBcjs.REDACTED && value !== _chunkNXURHBSBcjs.SHREDDED;
1659
+ return value !== _chunkJ6G7UKZAcjs.REDACTED && value !== _chunkJ6G7UKZAcjs.SHREDDED;
1668
1660
  }) : result.error.issues;
1669
1661
  if (issues.length)
1670
- throw new (0, _chunkNXURHBSBcjs.ValidationError)(
1662
+ throw new (0, _chunkJ6G7UKZAcjs.ValidationError)(
1671
1663
  target,
1672
1664
  state2,
1673
1665
  _zod2.prettifyError.call(void 0, new (0, _zod2.ZodError)(issues))
1674
1666
  );
1675
1667
  };
1676
1668
  var DEFAULT_BATCH = 500;
1677
- var cache_put = (stream, entry) => _chunkVWUO5CEGcjs.cache.call(void 0, ).set(stream, entry).catch(
1678
- (err) => _chunkVWUO5CEGcjs.log.call(void 0, ).warn(
1669
+ var cache_put = (stream, entry) => _chunk5OU5CTJZcjs.cache.call(void 0, ).set(stream, entry).catch(
1670
+ (err) => _chunk5OU5CTJZcjs.log.call(void 0, ).warn(
1679
1671
  err,
1680
1672
  "cache set skipped; the next load re-folds from the store"
1681
1673
  )
1682
1674
  );
1683
- var cache_drop = (stream) => _chunkVWUO5CEGcjs.cache.call(void 0, ).invalidate(stream).catch(
1684
- (err) => _chunkVWUO5CEGcjs.log.call(void 0, ).warn(
1675
+ var cache_drop = (stream) => _chunk5OU5CTJZcjs.cache.call(void 0, ).invalidate(stream).catch(
1676
+ (err) => _chunk5OU5CTJZcjs.log.call(void 0, ).warn(
1685
1677
  err,
1686
1678
  "cache invalidate skipped; a stale checkpoint re-folds from its event_id"
1687
1679
  )
@@ -1689,9 +1681,9 @@ var cache_drop = (stream) => _chunkVWUO5CEGcjs.cache.call(void 0, ).invalidate(s
1689
1681
  async function snap(snapshot) {
1690
1682
  const { id, stream, name, meta, version } = snapshot.event;
1691
1683
  try {
1692
- const [committed] = await _chunkVWUO5CEGcjs.store.call(void 0, ).commit(
1684
+ const [committed] = await _chunk5OU5CTJZcjs.store.call(void 0, ).commit(
1693
1685
  stream,
1694
- [{ name: _chunkNXURHBSBcjs.SNAP_EVENT, data: snapshot.state }],
1686
+ [{ name: _chunkJ6G7UKZAcjs.SNAP_EVENT, data: snapshot.state }],
1695
1687
  {
1696
1688
  correlation: meta.correlation,
1697
1689
  causation: { event: { id, name, stream } }
@@ -1702,22 +1694,22 @@ async function snap(snapshot) {
1702
1694
  return committed;
1703
1695
  } catch (error) {
1704
1696
  const reason = error instanceof Error ? error.message : String(error);
1705
- _chunkVWUO5CEGcjs.log.call(void 0, ).warn(
1697
+ _chunk5OU5CTJZcjs.log.call(void 0, ).warn(
1706
1698
  `Snapshot write failed on stream "${stream}": ${reason} \u2014 cold starts will replay full history until snapshots succeed.`
1707
1699
  );
1708
1700
  }
1709
1701
  }
1710
1702
  async function tombstone(stream, expectedVersion, correlation) {
1711
1703
  try {
1712
- const [committed] = await _chunkVWUO5CEGcjs.store.call(void 0, ).commit(
1704
+ const [committed] = await _chunk5OU5CTJZcjs.store.call(void 0, ).commit(
1713
1705
  stream,
1714
- [{ name: _chunkNXURHBSBcjs.TOMBSTONE_EVENT, data: {} }],
1706
+ [{ name: _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT, data: {} }],
1715
1707
  { correlation, causation: {} },
1716
1708
  expectedVersion
1717
1709
  );
1718
1710
  return committed;
1719
1711
  } catch (error) {
1720
- if (error instanceof _chunkNXURHBSBcjs.ConcurrencyError) return void 0;
1712
+ if (error instanceof _chunkJ6G7UKZAcjs.ConcurrencyError) return void 0;
1721
1713
  throw error;
1722
1714
  }
1723
1715
  }
@@ -1747,9 +1739,9 @@ async function scan(source, opts = {}, callback) {
1747
1739
  if (drop_closed_streams) {
1748
1740
  await source.query(
1749
1741
  (e) => {
1750
- if (e.name === _chunkNXURHBSBcjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1742
+ if (e.name === _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT) closed_streams.add(e.stream);
1751
1743
  },
1752
- { names: [_chunkNXURHBSBcjs.TOMBSTONE_EVENT] }
1744
+ { names: [_chunkJ6G7UKZAcjs.TOMBSTONE_EVENT] }
1753
1745
  );
1754
1746
  }
1755
1747
  let max_id;
@@ -1771,11 +1763,11 @@ async function scan(source, opts = {}, callback) {
1771
1763
  if (!is_valid(event))
1772
1764
  throw new Error(`Invalid event at index ${processed}`);
1773
1765
  if (on_progress) on_progress({ processed, id: event.id, max_id });
1774
- if (drop_snapshots && event.name === _chunkNXURHBSBcjs.SNAP_EVENT) {
1766
+ if (drop_snapshots && event.name === _chunkJ6G7UKZAcjs.SNAP_EVENT) {
1775
1767
  dropped_snaps++;
1776
1768
  return;
1777
1769
  }
1778
- if (closed_streams.has(event.stream) && event.name !== _chunkNXURHBSBcjs.TOMBSTONE_EVENT) {
1770
+ if (closed_streams.has(event.stream) && event.name !== _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT) {
1779
1771
  dropped_closed++;
1780
1772
  return;
1781
1773
  }
@@ -1842,17 +1834,17 @@ async function scan(source, opts = {}, callback) {
1842
1834
  async function load(me, target, callback, patch_fn = bare_patch) {
1843
1835
  const { stream, actor, asOf } = target;
1844
1836
  const time_travel = !!asOf && Object.values(asOf).some((v) => v !== void 0);
1845
- const cached = time_travel ? void 0 : await _chunkVWUO5CEGcjs.cache.call(void 0, ).get(stream);
1837
+ const cached = time_travel ? void 0 : await _chunk5OU5CTJZcjs.cache.call(void 0, ).get(stream);
1846
1838
  const cache_hit = !!cached;
1847
1839
  let state2 = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _73 => _73.state]), () => ( (me.init ? me.init() : {})));
1848
1840
  let patches = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _74 => _74.patches]), () => ( 0));
1849
1841
  let snaps = _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _75 => _75.snaps]), () => ( 0));
1850
1842
  let replayed = 0;
1851
1843
  let event;
1852
- await _chunkVWUO5CEGcjs.store.call(void 0, ).query(
1844
+ await _chunk5OU5CTJZcjs.store.call(void 0, ).query(
1853
1845
  (raw) => {
1854
1846
  event = me.view(raw, actor);
1855
- if (event.name === _chunkNXURHBSBcjs.SNAP_EVENT) {
1847
+ if (event.name === _chunkJ6G7UKZAcjs.SNAP_EVENT) {
1856
1848
  state2 = event.data;
1857
1849
  snaps++;
1858
1850
  patches = 0;
@@ -1861,8 +1853,8 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1861
1853
  state2 = patch_fn(me, state2, me.patch[event.name](event, state2), event);
1862
1854
  patches++;
1863
1855
  replayed++;
1864
- } else if (event.name !== _chunkNXURHBSBcjs.TOMBSTONE_EVENT) {
1865
- _chunkVWUO5CEGcjs.log.call(void 0, ).warn(
1856
+ } else if (event.name !== _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT) {
1857
+ _chunk5OU5CTJZcjs.log.call(void 0, ).warn(
1866
1858
  `Skipping unknown event "${String(event.name)}" on stream "${stream}" (id=${event.id}) \u2014 no reducer in state "${me.name}"`
1867
1859
  );
1868
1860
  }
@@ -1886,7 +1878,7 @@ async function load(me, target, callback, patch_fn = bare_patch) {
1886
1878
  ...cached ? { after: cached.event_id, with_snaps: true } : { ...time_travel ? {} : { with_snaps: true }, ...asOf }
1887
1879
  }
1888
1880
  );
1889
- const head_is_tombstone = _optionalChain([event, 'optionalAccess', _77 => _77.name]) === _chunkNXURHBSBcjs.TOMBSTONE_EVENT;
1881
+ const head_is_tombstone = _optionalChain([event, 'optionalAccess', _77 => _77.name]) === _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT;
1890
1882
  if (replayed > 0 && !time_travel && event && !me.pii_aware && !head_is_tombstone) {
1891
1883
  await cache_put(stream, {
1892
1884
  stream,
@@ -1914,7 +1906,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1914
1906
  if (!stream) throw new Error("Missing target stream");
1915
1907
  const reactingTo = _optionalChain([options, 'optionalAccess', _82 => _82.reactingTo]);
1916
1908
  const correlator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _83 => _83.correlator]), () => ( default_correlator));
1917
- const validated = _chunkVWUO5CEGcjs.validate.call(void 0, action2, payload, me.actions[action2]);
1909
+ const validated = _chunk5OU5CTJZcjs.validate.call(void 0, action2, payload, me.actions[action2]);
1918
1910
  const opts = _optionalChain([me, 'access', _84 => _84.options, 'optionalAccess', _85 => _85[action2]]);
1919
1911
  const max_retries = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _86 => _86.maxRetries]), () => ( 0));
1920
1912
  for (let attempt = 0; ; attempt++) {
@@ -1925,12 +1917,12 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1925
1917
  void 0,
1926
1918
  patch_fn
1927
1919
  );
1928
- if (_optionalChain([snapshot, 'access', _87 => _87.event, 'optionalAccess', _88 => _88.name]) === _chunkNXURHBSBcjs.TOMBSTONE_EVENT)
1929
- throw new (0, _chunkNXURHBSBcjs.StreamClosedError)(stream);
1920
+ if (_optionalChain([snapshot, 'access', _87 => _87.event, 'optionalAccess', _88 => _88.name]) === _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT)
1921
+ throw new (0, _chunkJ6G7UKZAcjs.StreamClosedError)(stream);
1930
1922
  const expected = _nullishCoalesce(expectedVersion, () => ( snapshot.version));
1931
1923
  for (const { valid, description } of _nullishCoalesce(_optionalChain([me, 'access', _89 => _89.given, 'optionalAccess', _90 => _90[action2]]), () => ( [])))
1932
1924
  if (!valid(snapshot.state, actor))
1933
- throw new (0, _chunkNXURHBSBcjs.InvariantError)(
1925
+ throw new (0, _chunkJ6G7UKZAcjs.InvariantError)(
1934
1926
  action2,
1935
1927
  validated,
1936
1928
  target,
@@ -1939,7 +1931,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1939
1931
  );
1940
1932
  for (const { holds, description } of _nullishCoalesce(_optionalChain([me, 'access', _91 => _91.requires, 'optionalAccess', _92 => _92[action2]]), () => ( [])))
1941
1933
  if (!holds(validated, snapshot.state, actor))
1942
- throw new (0, _chunkNXURHBSBcjs.PreconditionError)(
1934
+ throw new (0, _chunkJ6G7UKZAcjs.PreconditionError)(
1943
1935
  action2,
1944
1936
  validated,
1945
1937
  target,
@@ -1952,7 +1944,7 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1952
1944
  const tuples = Array.isArray(result[0]) ? result : [result];
1953
1945
  const events = tuples.map(([name, data]) => ({
1954
1946
  name,
1955
- data: _chunkVWUO5CEGcjs.validate.call(void 0, name, data, me.events[name])
1947
+ data: _chunk5OU5CTJZcjs.validate.call(void 0, name, data, me.events[name])
1956
1948
  }));
1957
1949
  const emitted = events.map((e) => me.message(e));
1958
1950
  const meta = {
@@ -1999,9 +1991,9 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
1999
1991
  );
2000
1992
  let committed;
2001
1993
  try {
2002
- committed = await _chunkVWUO5CEGcjs.store.call(void 0, ).commit(stream, emitted, meta, expected);
1994
+ committed = await _chunk5OU5CTJZcjs.store.call(void 0, ).commit(stream, emitted, meta, expected);
2003
1995
  } catch (error) {
2004
- if (error instanceof _chunkNXURHBSBcjs.ConcurrencyError) void cache_drop(stream);
1996
+ if (error instanceof _chunkJ6G7UKZAcjs.ConcurrencyError) void cache_drop(stream);
2005
1997
  throw error;
2006
1998
  }
2007
1999
  const snapshots = committed.map((row, i) => ({
@@ -2028,19 +2020,19 @@ async function action(me, action2, target, payload, options, patch_fn = bare_pat
2028
2020
  });
2029
2021
  return snapshots;
2030
2022
  } catch (error) {
2031
- if (!(error instanceof _chunkNXURHBSBcjs.ConcurrencyError)) throw error;
2023
+ if (!(error instanceof _chunkJ6G7UKZAcjs.ConcurrencyError)) throw error;
2032
2024
  if (expectedVersion !== void 0) throw error;
2033
2025
  if (attempt >= max_retries) throw error;
2034
2026
  if (_optionalChain([opts, 'optionalAccess', _99 => _99.backoff])) {
2035
2027
  const delay_ms = compute_backoff_delay(attempt, opts.backoff);
2036
- if (delay_ms > 0) await _chunkVWUO5CEGcjs.sleep.call(void 0, delay_ms);
2028
+ if (delay_ms > 0) await _chunk5OU5CTJZcjs.sleep.call(void 0, delay_ms);
2037
2029
  }
2038
2030
  }
2039
2031
  }
2040
2032
  }
2041
2033
 
2042
2034
  // src/internal/tracing.ts
2043
- var PRETTY = _chunkVWUO5CEGcjs.config.call(void 0, ).env !== "production";
2035
+ var PRETTY = _chunk5OU5CTJZcjs.config.call(void 0, ).env !== "production";
2044
2036
  var C_BLUE = "\x1B[38;5;39m";
2045
2037
  var C_ORANGE = "\x1B[38;5;208m";
2046
2038
  var C_GREEN = "\x1B[38;5;42m";
@@ -2224,7 +2216,7 @@ function budget_exhausted(lease, options, store_failing) {
2224
2216
  if (store_failing || !_optionalChain([options, 'optionalAccess', _110 => _110.blockOnError]) || lease.retry <= options.maxRetries)
2225
2217
  return void 0;
2226
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.`;
2227
- _chunkVWUO5CEGcjs.log.call(void 0, ).error(error);
2219
+ _chunk5OU5CTJZcjs.log.call(void 0, ).error(error);
2228
2220
  return { lease, handled: 0, acked_at: lease.at, error, block: true };
2229
2221
  }
2230
2222
  function fetch_failure_policy(registry) {
@@ -2240,13 +2232,13 @@ function fetch_failure_policy(registry) {
2240
2232
  function finalize(lease, handled, at, error, options, logger, failed_at) {
2241
2233
  if (!error) return { lease, handled, acked_at: at };
2242
2234
  logger.error(error);
2243
- const non_retryable = error instanceof _chunkNXURHBSBcjs.NonRetryableError;
2235
+ const non_retryable = error instanceof _chunkJ6G7UKZAcjs.NonRetryableError;
2244
2236
  const block2 = options.blockOnError && (non_retryable || lease.retry >= options.maxRetries);
2245
2237
  if (block2)
2246
2238
  logger.error(
2247
2239
  non_retryable ? `Blocking ${lease.stream} on non-retryable error.` : `Blocking ${lease.stream} after ${lease.retry} retries.`
2248
2240
  );
2249
- const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunkVWUO5CEGcjs.DEFAULT_BACKOFF)));
2241
+ const next_attempt_at = block2 ? void 0 : Date.now() + compute_backoff_delay(lease.retry, _nullishCoalesce(options.backoff, () => ( _chunk5OU5CTJZcjs.DEFAULT_BACKOFF)));
2250
2242
  return {
2251
2243
  lease,
2252
2244
  handled,
@@ -2374,7 +2366,7 @@ async function run_drain_cycle(deps, cycle) {
2374
2366
  const acked = submitted.length ? await ops.ack(submitted) : [];
2375
2367
  const expected = submitted.filter((l) => l.due === void 0).length;
2376
2368
  if (acked.length < expected)
2377
- _chunkVWUO5CEGcjs.log.call(void 0, ).warn(
2369
+ _chunk5OU5CTJZcjs.log.call(void 0, ).warn(
2378
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.`
2379
2371
  );
2380
2372
  const closeable = handled.filter((h) => h.close !== void 0).map((h) => h.close);
@@ -2396,21 +2388,17 @@ function merge_drains(drains) {
2396
2388
  }
2397
2389
  var RETRY = "";
2398
2390
  var DrainController = (_class5 = class {
2399
- /**
2400
- * Armed while `_raised` is ahead of `_lowered` (the raise count the last
2401
- * empty claim saw), so a claim never lowers over a raise that landed
2402
- * during it.
2403
- */
2391
+ // Armed while `_raised` is ahead of `_lowered` (the raise count the last
2392
+ // empty claim saw), so a claim never lowers over a raise that landed
2393
+ // during it.
2404
2394
  __init15() {this._raised = 0}
2405
2395
  __init16() {this._lowered = 0}
2406
2396
  __init17() {this._ratio = 0.5}
2407
- /**
2408
- * Local wake at the earliest parked (backoff or defer) visit, or at the
2409
- * lease expiry after a failed pass (the {@link RETRY} key); the schedule
2410
- * itself is persisted. On an idle app nothing else would drain it. It
2411
- * drains until a pass leases nothing or the controller stops, and an entry
2412
- * stays until handled or until a later pass claims nothing.
2413
- */
2397
+ // Local wake at the earliest parked (backoff or defer) visit, or at the
2398
+ // lease expiry after a failed pass (the {@link RETRY} key); the schedule
2399
+ // itself is persisted. On an idle app nothing else would drain it. It
2400
+ // drains until a pass leases nothing or the controller stops, and an entry
2401
+ // stays until handled or until a later pass claims nothing.
2414
2402
  __init18() {this._defer = new DeferTimer(() => {
2415
2403
  this.arm();
2416
2404
  void this._deps.run_scoped(async () => {
@@ -2420,7 +2408,7 @@ var DrainController = (_class5 = class {
2420
2408
 
2421
2409
  __init19() {this._misrouted = /* @__PURE__ */ new Set()}
2422
2410
  __init20() {this._stopped = false}
2423
- /** The pass in flight. Never rejects; graceful shutdown waits on it. */
2411
+ // The pass in flight. Never rejects; graceful shutdown waits on it.
2424
2412
 
2425
2413
 
2426
2414
  constructor(deps) {;_class5.prototype.__init15.call(this);_class5.prototype.__init16.call(this);_class5.prototype.__init17.call(this);_class5.prototype.__init18.call(this);_class5.prototype.__init19.call(this);_class5.prototype.__init20.call(this);
@@ -2474,9 +2462,9 @@ var DrainController = (_class5 = class {
2474
2462
  if (!this.armed || this._stopped || this._inflight)
2475
2463
  return EMPTY_DRAIN;
2476
2464
  const d = _nullishCoalesce(this._deps.defaults, () => ( {}));
2477
- const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunkVWUO5CEGcjs.DEFAULT_STREAM_LIMIT));
2478
- const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunkVWUO5CEGcjs.DEFAULT_EVENT_LIMIT));
2479
- const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunkVWUO5CEGcjs.DEFAULT_LEASE_MILLIS));
2465
+ const streamLimit = _nullishCoalesce(_nullishCoalesce(d.streamLimit, () => ( options.streamLimit)), () => ( _chunk5OU5CTJZcjs.DEFAULT_STREAM_LIMIT));
2466
+ const eventLimit = _nullishCoalesce(options.eventLimit, () => ( _chunk5OU5CTJZcjs.DEFAULT_EVENT_LIMIT));
2467
+ const leaseMillis = _nullishCoalesce(_nullishCoalesce(d.leaseMillis, () => ( options.leaseMillis)), () => ( _chunk5OU5CTJZcjs.DEFAULT_LEASE_MILLIS));
2480
2468
  if (this._deps.breaker.state(Date.now()) === "open")
2481
2469
  return EMPTY_DRAIN;
2482
2470
  const pass = this._pass(streamLimit, eventLimit, leaseMillis).finally(
@@ -2487,7 +2475,7 @@ var DrainController = (_class5 = class {
2487
2475
  this._inflight = pass;
2488
2476
  return pass;
2489
2477
  }
2490
- /** One claim → fetch → handle → ack pass. Never throws. */
2478
+ // One claim → fetch → handle → ack pass. Never throws.
2491
2479
  async _pass(streamLimit, eventLimit, leaseMillis) {
2492
2480
  try {
2493
2481
  const lagging = Math.ceil(streamLimit * this._ratio);
@@ -2551,7 +2539,7 @@ function pii_gate(event, fields, predicate, actor) {
2551
2539
  const { pii, ...rest } = event;
2552
2540
  if (pii == null) {
2553
2541
  const shredded = { ...data };
2554
- for (const f of fields) shredded[f] = _chunkNXURHBSBcjs.SHREDDED;
2542
+ for (const f of fields) shredded[f] = _chunkJ6G7UKZAcjs.SHREDDED;
2555
2543
  return { ...rest, data: shredded };
2556
2544
  }
2557
2545
  const allowed = !!actor && !!predicate && predicate(event, actor);
@@ -2562,7 +2550,7 @@ function pii_gate(event, fields, predicate, actor) {
2562
2550
  };
2563
2551
  }
2564
2552
  const redacted = { ...data };
2565
- for (const f of fields) redacted[f] = _chunkNXURHBSBcjs.REDACTED;
2553
+ for (const f of fields) redacted[f] = _chunkJ6G7UKZAcjs.REDACTED;
2566
2554
  return { ...rest, data: redacted };
2567
2555
  }
2568
2556
  var IDENTITY_GATE = (event) => event;
@@ -2699,7 +2687,7 @@ function make_deferred(handler, schedule) {
2699
2687
  const call = handler;
2700
2688
  const deferred = async (event, stream, app) => {
2701
2689
  const when = typeof schedule === "function" ? schedule(event) : schedule;
2702
- if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunkNXURHBSBcjs.DeferSignal)(when);
2690
+ if (Date.now() < resolve_defer_at(when, event)) throw new (0, _chunkJ6G7UKZAcjs.DeferSignal)(when);
2703
2691
  return call(event, stream, app);
2704
2692
  };
2705
2693
  Object.defineProperty(deferred, "name", { value: handler.name });
@@ -2768,7 +2756,7 @@ function build_handle(deps) {
2768
2756
  handled++;
2769
2757
  }
2770
2758
  } catch (error) {
2771
- if (error instanceof _chunkNXURHBSBcjs.DeferSignal) {
2759
+ if (error instanceof _chunkJ6G7UKZAcjs.DeferSignal) {
2772
2760
  let defer;
2773
2761
  try {
2774
2762
  defer = resolve_defer_at(error.when, event);
@@ -2848,21 +2836,19 @@ function build_handle_batch(logger) {
2848
2836
  // src/internal/settle.ts
2849
2837
  var SettleLoop = (_class6 = class {
2850
2838
  __init21() {this._timer = void 0}
2851
- /**
2852
- * The cycle in flight, set while one runs. Shutdown waits for it
2853
- * (`stop()` cancels scheduling only). Never rejects.
2854
- */
2839
+ // The cycle in flight, set while one runs. Shutdown waits for it
2840
+ // (`stop()` cancels scheduling only). Never rejects.
2855
2841
 
2856
- /** A wake-up arrived while a cycle ran: run one more pass after it. */
2842
+ // A wake-up arrived while a cycle ran: run one more pass after it.
2857
2843
  __init22() {this._pending = false}
2858
- /** The last caller's options, used by the next pass. */
2844
+ // The last caller's options, used by the next pass.
2859
2845
  __init23() {this._next = void 0}
2860
- /** When the scheduled pass fires (epoch ms). */
2846
+ // When the scheduled pass fires (epoch ms).
2861
2847
  __init24() {this._due = 0}
2862
- /** Set at shutdown: nothing schedules again. */
2848
+ // Set at shutdown: nothing schedules again.
2863
2849
  __init25() {this._stopped = false}
2864
2850
 
2865
- /** Debounce window applied when the caller doesn't override via `SettleOptions.debounceMs`. */
2851
+ // Debounce window applied when the caller doesn't override via `SettleOptions.debounceMs`.
2866
2852
 
2867
2853
  constructor(deps, default_debounce_ms) {;_class6.prototype.__init21.call(this);_class6.prototype.__init22.call(this);_class6.prototype.__init23.call(this);_class6.prototype.__init24.call(this);_class6.prototype.__init25.call(this);
2868
2854
  this._deps = deps;
@@ -2960,18 +2946,16 @@ var Act = (_class7 = class {
2960
2946
 
2961
2947
 
2962
2948
 
2963
- /** Whether any event has a reaction; nothing arms without one. */
2949
+ // Whether any event has a reaction; nothing arms without one.
2964
2950
 
2965
2951
 
2966
2952
 
2967
2953
 
2968
2954
 
2969
- /** The poll's correlate `limit`, used by every settle pass while it runs. */
2955
+ // The poll's correlate `limit`, used by every settle pass while it runs.
2970
2956
 
2971
- /**
2972
- * Wired at construction against the store current then, so a store
2973
- * injected after `build()` is never notified.
2974
- */
2957
+ // Wired at construction against the store current then, so a store
2958
+ // injected after `build()` is never notified.
2975
2959
 
2976
2960
  /** Public registry — kept as-is per the no-prefix-on-public convention. */
2977
2961
 
@@ -3010,11 +2994,9 @@ var Act = (_class7 = class {
3010
2994
  throw new Error(`committed: "${name}" is not a state of this app`);
3011
2995
  return `committed:${name}`;
3012
2996
  }
3013
- /**
3014
- * The one place a store failure is logged and emitted (the breaker's
3015
- * `on_error`). The emit is guarded: an unhandled `"error"` emission
3016
- * would crash the process.
3017
- */
2997
+ // The one place a store failure is logged and emitted (the breaker's
2998
+ // `on_error`). The emit is guarded: an unhandled `"error"` emission
2999
+ // would crash the process.
3018
3000
  _emit_error(error, circuit) {
3019
3001
  this._logger.error(error);
3020
3002
  if (this._emitter.listenerCount("error") > 0)
@@ -3041,20 +3023,20 @@ var Act = (_class7 = class {
3041
3023
 
3042
3024
 
3043
3025
 
3044
- /** Unambiguous: merge rejects an event name declared by two states. */
3026
+ // Unambiguous: merge rejects an event name declared by two states.
3045
3027
 
3046
- /** Lanes to arm per event; `"all"` when a dynamic resolver hides the lane. */
3028
+ // Lanes to arm per event; `"all"` when a dynamic resolver hides the lane.
3047
3029
 
3048
3030
 
3049
- __init27() {this._logger = _chunkVWUO5CEGcjs.log.call(void 0, )}
3050
- /** This Act's ports: its own bag, or the singleton adapters. */
3031
+ __init27() {this._logger = _chunk5OU5CTJZcjs.log.call(void 0, )}
3032
+ // This Act's ports: its own bag, or the singleton adapters.
3051
3033
 
3052
- /** Runs a body so internal `store()`/`cache()` calls resolve to `_ports`. */
3034
+ // Runs a body so internal `store()`/`cache()` calls resolve to `_ports`.
3053
3035
 
3054
3036
 
3055
3037
 
3056
3038
  __init28() {this._close_lock = new CloseLock()}
3057
- /** Every lane a controller can exist for: `"default"` plus each declared one. */
3039
+ // Every lane a controller can exist for: `"default"` plus each declared one.
3058
3040
 
3059
3041
  /** Drain lanes declared via `.withLane(...)`. Implicit default not included. */
3060
3042
  get lanes() {
@@ -3068,9 +3050,9 @@ var Act = (_class7 = class {
3068
3050
  this._lanes = lanes;
3069
3051
  this._declared_lanes = ["default", ...lanes.map((l) => l.name)];
3070
3052
  validate_only_lanes(options.onlyLanes, this._declared_lanes);
3071
- this._ports = _nullishCoalesce(options.scoped, () => ( _chunkVWUO5CEGcjs.default_scope.call(void 0, )));
3053
+ this._ports = _nullishCoalesce(options.scoped, () => ( _chunk5OU5CTJZcjs.default_scope.call(void 0, )));
3072
3054
  const ports = this._ports;
3073
- this._scoped = _chunkVWUO5CEGcjs.make_run_scoped.call(void 0, {
3055
+ this._scoped = _chunk5OU5CTJZcjs.make_run_scoped.call(void 0, {
3074
3056
  // Getters, not a spread: the singletons resolve lazily, so a later
3075
3057
  // `store(...)` / `cache(...)` still takes effect.
3076
3058
  get store() {
@@ -3080,14 +3062,14 @@ var Act = (_class7 = class {
3080
3062
  return ports.cache;
3081
3063
  },
3082
3064
  // Parsed per build, so a bad window throws on every build.
3083
- autoclose_window: _chunkVWUO5CEGcjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3065
+ autoclose_window: _chunk5OU5CTJZcjs.resolveAutocloseConfig.call(void 0, options).autocloseWindow
3084
3066
  });
3085
3067
  this._correlator = _nullishCoalesce(options.correlator, () => ( default_correlator));
3086
3068
  this._es = build_es(this._logger, this._correlator, patch_fn);
3087
3069
  this._cd = build_drain(this._logger);
3088
3070
  const handle = build_handle({
3089
3071
  logger: this._logger,
3090
- reaction_scope: _chunkVWUO5CEGcjs.make_reaction_scope.call(void 0, {
3072
+ reaction_scope: _chunk5OU5CTJZcjs.make_reaction_scope.call(void 0, {
3091
3073
  do: this.do.bind(this),
3092
3074
  load: this.load.bind(this),
3093
3075
  query: this.query.bind(this),
@@ -3117,12 +3099,12 @@ var Act = (_class7 = class {
3117
3099
  this._ports.store,
3118
3100
  options.listen !== false
3119
3101
  );
3120
- _chunkVWUO5CEGcjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3102
+ _chunk5OU5CTJZcjs.register_weak_disposer.call(void 0, new WeakRef(this), (self) => self.shutdown());
3121
3103
  }
3122
- /** Shared by drain, settle and autoclose; bad knobs throw at build. */
3104
+ // Shared by drain, settle and autoclose; bad knobs throw at build.
3123
3105
  _build_breaker(options) {
3124
3106
  return new CircuitBreaker(
3125
- _chunkVWUO5CEGcjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3107
+ _chunk5OU5CTJZcjs.resolveCircuitBreakerConfig.call(void 0, options.circuitBreaker),
3126
3108
  {
3127
3109
  on_error: (error, circuit) => this._emit_error(error, circuit),
3128
3110
  // When the cooldown elapses, settle once: its scan or claim is the
@@ -3131,7 +3113,7 @@ var Act = (_class7 = class {
3131
3113
  }
3132
3114
  );
3133
3115
  }
3134
- /** Apps that declare no lanes pass no lane filter to `claim`. */
3116
+ // Apps that declare no lanes pass no lane filter to `claim`.
3135
3117
  _build_drain_controllers(options, lanes, handle, handle_batch) {
3136
3118
  const all_lanes = this._declared_lanes;
3137
3119
  const only_set = _optionalChain([options, 'access', _129 => _129.onlyLanes, 'optionalAccess', _130 => _130.length]) ? new Set(options.onlyLanes) : void 0;
@@ -3156,7 +3138,7 @@ var Act = (_class7 = class {
3156
3138
  try {
3157
3139
  await this._run_close(targets);
3158
3140
  } catch (error) {
3159
- if (error instanceof _chunkNXURHBSBcjs.StoreError) throw error;
3141
+ if (error instanceof _chunkJ6G7UKZAcjs.StoreError) throw error;
3160
3142
  this._logger.error(
3161
3143
  error,
3162
3144
  `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.`
@@ -3177,7 +3159,7 @@ var Act = (_class7 = class {
3177
3159
  }
3178
3160
  return controllers;
3179
3161
  }
3180
- /** One process can't see the cluster, so it reports its own lane gaps. */
3162
+ // One process can't see the cluster, so it reports its own lane gaps.
3181
3163
  _advise_orphaned_lanes() {
3182
3164
  const active = new Set(this._drain_controllers.keys());
3183
3165
  const orphaned = this._declared_lanes.filter((name) => !active.has(name));
@@ -3187,10 +3169,10 @@ var Act = (_class7 = class {
3187
3169
  `Act declared ${orphaned.length} orphaned lane(s) on this instance: ${list}. onlyLanes excludes them, so no DrainController claims their streams here \u2014 their reactions accumulate un-drained unless a peer worker deploys with these lanes in its onlyLanes. Ensure the cluster invariant holds: the union of every worker's onlyLanes must cover every declared lane. See docs/docs/guides/production-checklist.md \xA7 Sizing lanes.`
3188
3170
  );
3189
3171
  }
3190
- /** Audit deps, built after the controllers so the lane set is final. */
3172
+ // Audit deps, built after the controllers so the lane set is final.
3191
3173
  _build_audit_deps() {
3192
3174
  return {
3193
- store: _chunkVWUO5CEGcjs.store,
3175
+ store: _chunk5OU5CTJZcjs.store,
3194
3176
  event_to_state: this._event_to_state,
3195
3177
  // Declared lanes, not this process's controllers: a lane another
3196
3178
  // worker drains is not `unknown-lane`.
@@ -3203,7 +3185,7 @@ var Act = (_class7 = class {
3203
3185
  registry: this.registry,
3204
3186
  static_targets: classification.static_targets,
3205
3187
  cd: this._cd,
3206
- max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunkNXURHBSBcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3188
+ max_subscribed_streams: _nullishCoalesce(options.maxSubscribedStreams, () => ( _chunkJ6G7UKZAcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS)),
3207
3189
  // Declared lanes (not active ones): a lane another process claims is
3208
3190
  // still a valid destination.
3209
3191
  declared_lanes: new Set(this._declared_lanes),
@@ -3216,10 +3198,10 @@ var Act = (_class7 = class {
3216
3198
  }
3217
3199
  });
3218
3200
  }
3219
- /** Cold start: an idle deferred stream still fires on time after a restart. */
3201
+ // Cold start: an idle deferred stream still fires on time after a restart.
3220
3202
  async _seed_persisted_defers() {
3221
3203
  const now = Date.now();
3222
- await walk_streams(_chunkVWUO5CEGcjs.store.call(void 0, ), (pos) => {
3204
+ await walk_streams(_chunk5OU5CTJZcjs.store.call(void 0, ), (pos) => {
3223
3205
  if (pos.deferred_at === void 0 || pos.deferred_at <= now) return;
3224
3206
  const controller = this._drain_controllers.get(_nullishCoalesce(pos.lane, () => ( "default")));
3225
3207
  _optionalChain([controller, 'optionalAccess', _132 => _132.seed_defer, 'call', _133 => _133(pos.stream, pos.deferred_at)]);
@@ -3235,7 +3217,7 @@ var Act = (_class7 = class {
3235
3217
  on_settled: (drain) => this.emit("settled", drain),
3236
3218
  breaker: this._breaker
3237
3219
  },
3238
- _nullishCoalesce(options.settleDebounceMs, () => ( _chunkNXURHBSBcjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3220
+ _nullishCoalesce(options.settleDebounceMs, () => ( _chunkJ6G7UKZAcjs.DEFAULT_SETTLE_DEBOUNCE_MS))
3239
3221
  );
3240
3222
  }
3241
3223
 
@@ -3255,7 +3237,7 @@ var Act = (_class7 = class {
3255
3237
  */
3256
3238
  shutdown(options) {
3257
3239
  if (!this._shutdown_promise) {
3258
- _chunkVWUO5CEGcjs.resolveShutdownConfig.call(void 0, options);
3240
+ _chunk5OU5CTJZcjs.resolveShutdownConfig.call(void 0, options);
3259
3241
  this._shutdown_promise = (async () => {
3260
3242
  this.stop_correlations();
3261
3243
  this._settle.stop(true);
@@ -3270,15 +3252,13 @@ var Act = (_class7 = class {
3270
3252
  }
3271
3253
  return this._shutdown_promise;
3272
3254
  }
3273
- /**
3274
- * The largest `leaseMillis` among lanes with a cycle in flight (the
3275
- * default for none or 0, and for a running settle), capped.
3276
- */
3255
+ // The largest `leaseMillis` among lanes with a cycle in flight (the
3256
+ // default for none or 0, and for a running settle), capped.
3277
3257
  _derive_grace_ms(running, settling) {
3278
- let max = settling ? _chunkVWUO5CEGcjs.DEFAULT_LEASE_MILLIS : 0;
3258
+ let max = settling ? _chunk5OU5CTJZcjs.DEFAULT_LEASE_MILLIS : 0;
3279
3259
  for (const c of running)
3280
- max = Math.max(max, c.lease_millis || _chunkVWUO5CEGcjs.DEFAULT_LEASE_MILLIS);
3281
- return Math.min(max, _chunkVWUO5CEGcjs.MAX_SHUTDOWN_GRACE_MS);
3260
+ max = Math.max(max, c.lease_millis || _chunk5OU5CTJZcjs.DEFAULT_LEASE_MILLIS);
3261
+ return Math.min(max, _chunk5OU5CTJZcjs.MAX_SHUTDOWN_GRACE_MS);
3282
3262
  }
3283
3263
  async _await_inflight(grace_ms) {
3284
3264
  const running = [...this._drain_controllers.values()].filter(
@@ -3302,7 +3282,7 @@ var Act = (_class7 = class {
3302
3282
  clearTimeout(timer);
3303
3283
  }
3304
3284
  }
3305
- /** Failures are logged, never thrown: `notify` is a hint. */
3285
+ // Failures are logged, never thrown: `notify` is a hint.
3306
3286
  async _wire_notify(s, listen) {
3307
3287
  if (!this._reactive) return void 0;
3308
3288
  if (!s.notify) return void 0;
@@ -3361,7 +3341,7 @@ var Act = (_class7 = class {
3361
3341
  * @see {@link ValidationError}, {@link PreconditionError}, {@link ConcurrencyError}
3362
3342
  */
3363
3343
  async do(action2, target, payload, options) {
3364
- const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.reactingTo]), () => ( _chunkVWUO5CEGcjs.current_reacting.call(void 0, )));
3344
+ const reacting_to = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.reactingTo]), () => ( _chunk5OU5CTJZcjs.current_reacting.call(void 0, )));
3365
3345
  const do_options = reacting_to === _optionalChain([options, 'optionalAccess', _136 => _136.reactingTo]) ? options : { ...options, reactingTo: reacting_to };
3366
3346
  return this._scoped(async () => {
3367
3347
  const snapshots = await this._es.action(
@@ -3427,7 +3407,7 @@ var Act = (_class7 = class {
3427
3407
  return this._scoped(async () => {
3428
3408
  let first;
3429
3409
  let last;
3430
- const count = await _chunkVWUO5CEGcjs.store.call(void 0, ).query((e) => {
3410
+ const count = await _chunk5OU5CTJZcjs.store.call(void 0, ).query((e) => {
3431
3411
  const gated = this.registry.query_gate(e.name)(e);
3432
3412
  if (!first) first = gated;
3433
3413
  last = gated;
@@ -3457,7 +3437,7 @@ var Act = (_class7 = class {
3457
3437
  async query_array(query) {
3458
3438
  return this._scoped(async () => {
3459
3439
  const events = [];
3460
- await _chunkVWUO5CEGcjs.store.call(void 0, ).query((e) => {
3440
+ await _chunk5OU5CTJZcjs.store.call(void 0, ).query((e) => {
3461
3441
  events.push(this.registry.query_gate(e.name)(e));
3462
3442
  }, query);
3463
3443
  return events;
@@ -3477,14 +3457,14 @@ var Act = (_class7 = class {
3477
3457
  */
3478
3458
  async forget(stream) {
3479
3459
  return this._scoped(async () => {
3480
- const s = _chunkVWUO5CEGcjs.store.call(void 0, );
3460
+ const s = _chunk5OU5CTJZcjs.store.call(void 0, );
3481
3461
  if (!s.forget_pii) {
3482
3462
  throw new Error(
3483
3463
  `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).`
3484
3464
  );
3485
3465
  }
3486
3466
  const eventCount = await s.forget_pii(stream);
3487
- await _chunkVWUO5CEGcjs.cache.call(void 0, ).invalidate(stream);
3467
+ await _chunk5OU5CTJZcjs.cache.call(void 0, ).invalidate(stream);
3488
3468
  if (eventCount > 0) {
3489
3469
  this.emit("forgotten", { stream, at: /* @__PURE__ */ new Date(), eventCount });
3490
3470
  }
@@ -3518,33 +3498,31 @@ var Act = (_class7 = class {
3518
3498
  * @see {@link correlate} for dynamic stream discovery
3519
3499
  */
3520
3500
  async drain(options = {}) {
3521
- _chunkVWUO5CEGcjs.resolveDrainConfig.call(void 0, options);
3501
+ _chunk5OU5CTJZcjs.resolveDrainConfig.call(void 0, options);
3522
3502
  if (!this._drain)
3523
3503
  return { fetched: [], leased: [], acked: [], blocked: [] };
3524
3504
  return this._scoped(() => this._drain_all(options));
3525
3505
  }
3526
- /** Arms correlate and every lane; false on an app with no reactions. */
3506
+ // Arms correlate and every lane; false on an app with no reactions.
3527
3507
  _arm_all() {
3528
3508
  if (!this._reactive) return false;
3529
3509
  this._correlate.arm();
3530
3510
  for (const c of this._drain_controllers.values()) c.arm();
3531
3511
  return true;
3532
3512
  }
3533
- /**
3534
- * Wakes what a change freed (a commit, a reset, an unblock, a restore,
3535
- * a notification from another process): arms the lanes these events
3536
- * react on, or every lane without names, and settles them unless the app
3537
- * walks the pipeline itself (`autoSettle: false`).
3538
- */
3513
+ // Wakes what a change freed (a commit, a reset, an unblock, a restore,
3514
+ // a notification from another process): arms the lanes these events
3515
+ // react on, or every lane without names, and settles them unless the app
3516
+ // walks the pipeline itself (`autoSettle: false`).
3539
3517
  _wake(names) {
3540
3518
  const armed = names ? this._arm_for_event_names(names) : this._arm_all();
3541
3519
  if (armed && this._auto_settle) this._schedule();
3542
3520
  }
3543
- /** Schedules a settle pass; writer-only instances (`drain: false`) skip it. */
3521
+ // Schedules a settle pass; writer-only instances (`drain: false`) skip it.
3544
3522
  _schedule(options) {
3545
3523
  if (this._drain) this._settle.schedule(options);
3546
3524
  }
3547
- /** Arms only the lanes these events react on; true when any was armed. */
3525
+ // Arms only the lanes these events react on; true when any was armed.
3548
3526
  _arm_for_event_names(names) {
3549
3527
  const to_arm = /* @__PURE__ */ new Set();
3550
3528
  for (const name of names) {
@@ -3561,7 +3539,7 @@ var Act = (_class7 = class {
3561
3539
  for (const lane of to_arm) _optionalChain([this, 'access', _138 => _138._drain_controllers, 'access', _139 => _139.get, 'call', _140 => _140(lane), 'optionalAccess', _141 => _141.arm, 'call', _142 => _142()]);
3562
3540
  return true;
3563
3541
  }
3564
- /** In parallel, so a slow lane never holds up a fast one. */
3542
+ // In parallel, so a slow lane never holds up a fast one.
3565
3543
  async _drain_all(options) {
3566
3544
  const merged = merge_drains(
3567
3545
  await Promise.all(
@@ -3603,7 +3581,7 @@ var Act = (_class7 = class {
3603
3581
  last_id: pass.last_id
3604
3582
  };
3605
3583
  }
3606
- /** One correlate pass; arms every lane when it found work. */
3584
+ // One correlate pass; arms every lane when it found work.
3607
3585
  async _correlate_pass(limit, lease = false) {
3608
3586
  if (!this._drain) return { kind: "idle", last_id: -1 };
3609
3587
  return this._scoped(async () => {
@@ -3700,7 +3678,7 @@ var Act = (_class7 = class {
3700
3678
  */
3701
3679
  async reset(input) {
3702
3680
  return this._scoped(async () => {
3703
- const count = await _chunkVWUO5CEGcjs.store.call(void 0, ).reset(input);
3681
+ const count = await _chunk5OU5CTJZcjs.store.call(void 0, ).reset(input);
3704
3682
  for (const handler of this._batch_handlers.values())
3705
3683
  _optionalChain([handler, 'access', _143 => _143[FOLD_RESET], 'optionalCall', _144 => _144()]);
3706
3684
  if (count > 0) {
@@ -3736,7 +3714,7 @@ var Act = (_class7 = class {
3736
3714
  */
3737
3715
  async unblock(input) {
3738
3716
  return this._scoped(async () => {
3739
- const count = await _chunkVWUO5CEGcjs.store.call(void 0, ).unblock(input);
3717
+ const count = await _chunk5OU5CTJZcjs.store.call(void 0, ).unblock(input);
3740
3718
  if (count > 0) {
3741
3719
  this._wake();
3742
3720
  }
@@ -3791,7 +3769,7 @@ var Act = (_class7 = class {
3791
3769
  return { ...partial, duration_ms: Date.now() - started };
3792
3770
  }
3793
3771
  const target = _nullishCoalesce(sink, () => ( (() => {
3794
- const s = _chunkVWUO5CEGcjs.store.call(void 0, );
3772
+ const s = _chunk5OU5CTJZcjs.store.call(void 0, );
3795
3773
  if (!s.restore) throw new Error("adapter has no restore capability");
3796
3774
  return s;
3797
3775
  })()));
@@ -3837,7 +3815,7 @@ var Act = (_class7 = class {
3837
3815
  async blocked_streams(options) {
3838
3816
  return this._scoped(async () => {
3839
3817
  const positions = [];
3840
- await _chunkVWUO5CEGcjs.store.call(void 0, ).query_streams(
3818
+ await _chunk5OU5CTJZcjs.store.call(void 0, ).query_streams(
3841
3819
  (p) => {
3842
3820
  positions.push(p);
3843
3821
  },
@@ -3889,9 +3867,9 @@ var Act = (_class7 = class {
3889
3867
  * @see {@link Store.prioritize} for the underlying primitive
3890
3868
  */
3891
3869
  async prioritize(filter, priority) {
3892
- return this._scoped(() => _chunkVWUO5CEGcjs.store.call(void 0, ).prioritize(filter, priority));
3870
+ return this._scoped(() => _chunk5OU5CTJZcjs.store.call(void 0, ).prioritize(filter, priority));
3893
3871
  }
3894
- /** Shared by `close()` and reaction-requested closes. */
3872
+ // Shared by `close()` and reaction-requested closes.
3895
3873
  async _run_close(targets) {
3896
3874
  const close_actor = { id: "$close", name: "close" };
3897
3875
  const result = await run_close_cycle(targets, {
@@ -3969,7 +3947,7 @@ var Act = (_class7 = class {
3969
3947
  * @see {@link correlate} for manual correlation
3970
3948
  */
3971
3949
  settle(options) {
3972
- _chunkVWUO5CEGcjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3950
+ _chunk5OU5CTJZcjs.resolveSettleConfig.call(void 0, _nullishCoalesce(options, () => ( {})));
3973
3951
  this._schedule(options);
3974
3952
  }
3975
3953
  }, _class7);
@@ -4125,16 +4103,16 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4125
4103
  }),
4126
4104
  // Never block on autoclose: a transient query/store error should retry,
4127
4105
  // not quarantine the synthetic stream.
4128
- options: { blockOnError: false, maxRetries: _chunkVWUO5CEGcjs.DEFAULT_MAX_RETRIES },
4106
+ options: { blockOnError: false, maxRetries: _chunk5OU5CTJZcjs.DEFAULT_MAX_RETRIES },
4129
4107
  handler: async (event) => {
4130
4108
  const aggregate = event.stream;
4131
4109
  const window = read_window();
4132
4110
  if (!in_autoclose_window(window, /* @__PURE__ */ new Date()))
4133
- throw new (0, _chunkNXURHBSBcjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4134
- const stats = await _chunkVWUO5CEGcjs.store.call(void 0, ).query_stats([aggregate], {
4111
+ throw new (0, _chunkJ6G7UKZAcjs.DeferSignal)({ at: next_window_open(window, /* @__PURE__ */ new Date()) });
4112
+ const stats = await _chunk5OU5CTJZcjs.store.call(void 0, ).query_stats([aggregate], {
4135
4113
  count: true,
4136
4114
  tail: keep_days !== void 0 ? true : void 0,
4137
- exclude: [_chunkNXURHBSBcjs.TOMBSTONE_EVENT, _chunkNXURHBSBcjs.SNAP_EVENT]
4115
+ exclude: [_chunkJ6G7UKZAcjs.TOMBSTONE_EVENT, _chunkJ6G7UKZAcjs.SNAP_EVENT]
4138
4116
  });
4139
4117
  const entry = stats.get(aggregate);
4140
4118
  if (!entry) return;
@@ -4165,7 +4143,7 @@ function synthesize_autoclose_reactions(registry, states, read_window) {
4165
4143
  dues.push(days_after(entry.tail.created, keep_days));
4166
4144
  const future = dues.map((d) => d.getTime()).filter((t) => t > Date.now());
4167
4145
  if (future.length)
4168
- throw new (0, _chunkNXURHBSBcjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4146
+ throw new (0, _chunkJ6G7UKZAcjs.DeferSignal)({ at: new Date(Math.min(...future)) });
4169
4147
  }
4170
4148
  };
4171
4149
  const key = `__autoclose_${st.name}`;
@@ -4370,9 +4348,9 @@ var _this_ = ({ stream }) => ({
4370
4348
 
4371
4349
  // src/builders/builder-utils.ts
4372
4350
  function register_lane(config2, lanes) {
4373
- _chunkVWUO5CEGcjs.resolveLaneConfig.call(void 0, config2);
4374
- if (config2.name === _chunkNXURHBSBcjs.DEFAULT_LANE)
4375
- throw new Error(`Lane "${_chunkNXURHBSBcjs.DEFAULT_LANE}" is reserved`);
4351
+ _chunk5OU5CTJZcjs.resolveLaneConfig.call(void 0, config2);
4352
+ if (config2.name === _chunkJ6G7UKZAcjs.DEFAULT_LANE)
4353
+ throw new Error(`Lane "${_chunkJ6G7UKZAcjs.DEFAULT_LANE}" is reserved`);
4376
4354
  const existing = lanes.find((l) => l.name === config2.name);
4377
4355
  if (!existing) return void lanes.push(config2);
4378
4356
  if (existing.leaseMillis !== config2.leaseMillis || existing.streamLimit !== config2.streamLimit || existing.cycleMs !== config2.cycleMs)
@@ -4414,9 +4392,9 @@ function reaction_on(event, events, builder) {
4414
4392
  // Validate the whole bag at the declaration site so a bad
4415
4393
  // `maxRetries`/`backoff`/`blockOnError` throws ZodError at build,
4416
4394
  // not a NaN gate on the first retry.
4417
- options: _chunkVWUO5CEGcjs.resolveReactionConfig.call(void 0, {
4418
- blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _159 => _159.blockOnError]), () => ( _chunkVWUO5CEGcjs.DEFAULT_BLOCK_ON_ERROR)),
4419
- maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _160 => _160.maxRetries]), () => ( _chunkVWUO5CEGcjs.DEFAULT_MAX_RETRIES)),
4395
+ options: _chunk5OU5CTJZcjs.resolveReactionConfig.call(void 0, {
4396
+ blockOnError: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _159 => _159.blockOnError]), () => ( _chunk5OU5CTJZcjs.DEFAULT_BLOCK_ON_ERROR)),
4397
+ maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _160 => _160.maxRetries]), () => ( _chunk5OU5CTJZcjs.DEFAULT_MAX_RETRIES)),
4420
4398
  backoff: _optionalChain([options, 'optionalAccess', _161 => _161.backoff])
4421
4399
  })
4422
4400
  };
@@ -4501,7 +4479,7 @@ function date_reviver_schema(schema) {
4501
4479
 
4502
4480
  // src/builders/event-builder.ts
4503
4481
  function event_tags(schema) {
4504
- const pii = _chunkNXURHBSBcjs.pii_schemas.call(void 0, schema);
4482
+ const pii = _chunkJ6G7UKZAcjs.pii_schemas.call(void 0, schema);
4505
4483
  const pii_dates = {};
4506
4484
  for (const [key, field] of Object.entries(pii)) {
4507
4485
  const dates = date_reviver_schema(field);
@@ -4538,7 +4516,7 @@ function make_event_reader(tags, disclosure, predicate = null) {
4538
4516
  });
4539
4517
  }
4540
4518
  function build_events(registry, states, lanes, owners) {
4541
- const declared = /* @__PURE__ */ new Set([_chunkNXURHBSBcjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4519
+ const declared = /* @__PURE__ */ new Set([_chunkJ6G7UKZAcjs.DEFAULT_LANE, ...lanes.map((l) => l.name)]);
4542
4520
  const lane_errors = [];
4543
4521
  const tags = /* @__PURE__ */ new Map();
4544
4522
  const sensitive2 = /* @__PURE__ */ new Map();
@@ -4602,7 +4580,7 @@ function build_events(registry, states, lanes, owners) {
4602
4580
  if (reader) readers.set(event_name, reader);
4603
4581
  }
4604
4582
  const snap2 = make_event_reader(event_tags(state2.state), "redact", null);
4605
- if (snap2) readers.set(_chunkNXURHBSBcjs.SNAP_EVENT, snap2);
4583
+ if (snap2) readers.set(_chunkJ6G7UKZAcjs.SNAP_EVENT, snap2);
4606
4584
  if (readers.size === 0) continue;
4607
4585
  state2.view = (event, actor) => (_nullishCoalesce(readers.get(event.name), () => ( IDENTITY_GATE)))(event, actor);
4608
4586
  }
@@ -4661,6 +4639,24 @@ function act() {
4661
4639
  const fold_specs = [];
4662
4640
  const lanes = [];
4663
4641
  let _built = false;
4642
+ const advise_pii_types = () => {
4643
+ const fields = /* @__PURE__ */ new Set();
4644
+ for (const state2 of states.values()) {
4645
+ const shape = _nullishCoalesce(state2.state.shape, () => ( {}));
4646
+ for (const [event, schema] of Object.entries(state2.events))
4647
+ for (const [field, field_schema] of Object.entries(
4648
+ _chunkJ6G7UKZAcjs.pii_schemas.call(void 0, schema)
4649
+ )) {
4650
+ if (!reads_as_string(field_schema)) fields.add(`${event}.${field}`);
4651
+ if (shape[field] && !reads_as_string(shape[field]))
4652
+ fields.add(`${state2.name}.${field}`);
4653
+ }
4654
+ }
4655
+ if (fields.size > 0)
4656
+ _chunk5OU5CTJZcjs.log.call(void 0, ).warn(
4657
+ `Act has ${fields.size} sensitive field(s) whose type isn't a string: ${[...fields].join(", ")}. A caller who may not see one reads "[REDACTED]" or "[SHREDDED]" there instead, which its type doesn't allow. Declare sensitive fields as strings. See docs/docs/guides/sensitive-data.md.`
4658
+ );
4659
+ };
4664
4660
  const read_wrap = (original) => {
4665
4661
  const wrapped = async (events, stream) => {
4666
4662
  const read = events.map((e) => _nullishCoalesce(_optionalChain([_hr, 'access', _169 => _169.get, 'call', _170 => _170(e.name), 'optionalCall', _171 => _171(e)]), () => ( e)));
@@ -4717,7 +4713,7 @@ function act() {
4717
4713
  const list = deprecation_summary.map(
4718
4714
  (d) => `"${d.deprecated}" (current: "${d.current}", state: "${d.state_name}")`
4719
4715
  ).join(", ");
4720
- _chunkVWUO5CEGcjs.log.call(void 0, ).info(
4716
+ _chunk5OU5CTJZcjs.log.call(void 0, ).info(
4721
4717
  `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.`
4722
4718
  );
4723
4719
  }
@@ -4759,7 +4755,7 @@ function act() {
4759
4755
  return reaction_on(event, registry.events, builder);
4760
4756
  },
4761
4757
  build: (options) => {
4762
- _chunkVWUO5CEGcjs.resolveActConfig.call(void 0, options);
4758
+ _chunk5OU5CTJZcjs.resolveActConfig.call(void 0, options);
4763
4759
  if (!_built) {
4764
4760
  for (const proj of pending_projections) add_projection(proj);
4765
4761
  for (const proj of fold_projections) {
@@ -4799,6 +4795,7 @@ function act() {
4799
4795
  for (const [name, gate] of built.query_readers) _qg.set(name, gate);
4800
4796
  for (const [name, gate] of built.handler_readers) _hr.set(name, gate);
4801
4797
  finalize_deprecations();
4798
+ advise_pii_types();
4802
4799
  for (const state2 of states.values()) {
4803
4800
  if (state2.disclose) _dp.set(state2.name, state2.disclose);
4804
4801
  if (state2.autoclose) _ac.set(state2.name, state2.autoclose);
@@ -4810,7 +4807,7 @@ function act() {
4810
4807
  synthesize_autoclose_reactions(
4811
4808
  registry,
4812
4809
  states,
4813
- _chunkVWUO5CEGcjs.current_autoclose_window
4810
+ _chunk5OU5CTJZcjs.current_autoclose_window
4814
4811
  );
4815
4812
  Object.freeze(registry.actions);
4816
4813
  Object.freeze(registry.events);
@@ -4829,6 +4826,12 @@ function act() {
4829
4826
  };
4830
4827
  return builder;
4831
4828
  }
4829
+ function reads_as_string(schema) {
4830
+ const def = schema._zod.def;
4831
+ if (def.type === "string" || def.type === "transform") return true;
4832
+ if (def.out) return reads_as_string(def.out);
4833
+ return def.innerType ? reads_as_string(def.innerType) : false;
4834
+ }
4832
4835
 
4833
4836
  // src/builders/projection-builder.ts
4834
4837
  function _projection(target) {
@@ -4858,8 +4861,8 @@ function _projection(target) {
4858
4861
  handler,
4859
4862
  resolver: _nullishCoalesce(default_resolver, () => ( _this_)),
4860
4863
  options: {
4861
- blockOnError: _chunkVWUO5CEGcjs.DEFAULT_BLOCK_ON_ERROR,
4862
- maxRetries: _chunkVWUO5CEGcjs.DEFAULT_MAX_RETRIES
4864
+ blockOnError: _chunk5OU5CTJZcjs.DEFAULT_BLOCK_ON_ERROR,
4865
+ maxRetries: _chunk5OU5CTJZcjs.DEFAULT_MAX_RETRIES
4863
4866
  }
4864
4867
  }),
4865
4868
  widened
@@ -4900,7 +4903,7 @@ function _projection(target) {
4900
4903
  throw new Error(
4901
4904
  `Projection "${target}" .of() partials must share one state name \u2014 got "${name}" and "${partial.name}"`
4902
4905
  );
4903
- const config2 = _chunkVWUO5CEGcjs.resolveFoldConfig.call(void 0, options);
4906
+ const config2 = _chunk5OU5CTJZcjs.resolveFoldConfig.call(void 0, options);
4904
4907
  const fold_events = {};
4905
4908
  for (const partial of partials)
4906
4909
  for (const [event_name, schema] of Object.entries(partial.events)) {
@@ -4918,8 +4921,8 @@ function _projection(target) {
4918
4921
  handler: noop,
4919
4922
  resolver: { target },
4920
4923
  options: {
4921
- blockOnError: _chunkVWUO5CEGcjs.DEFAULT_BLOCK_ON_ERROR,
4922
- maxRetries: _chunkVWUO5CEGcjs.DEFAULT_MAX_RETRIES
4924
+ blockOnError: _chunk5OU5CTJZcjs.DEFAULT_BLOCK_ON_ERROR,
4925
+ maxRetries: _chunk5OU5CTJZcjs.DEFAULT_MAX_RETRIES
4923
4926
  }
4924
4927
  }
4925
4928
  ]
@@ -5035,7 +5038,7 @@ function action_builder(state2) {
5035
5038
  throw new Error(`Duplicate action "${action2}"`);
5036
5039
  internal.actions[action2] = schema;
5037
5040
  if (options) {
5038
- _chunkVWUO5CEGcjs.resolveActionConfig.call(void 0, options);
5041
+ _chunk5OU5CTJZcjs.resolveActionConfig.call(void 0, options);
5039
5042
  internal.options ??= {};
5040
5043
  internal.options[action2] = options;
5041
5044
  }
@@ -5328,5 +5331,5 @@ function write_line(writer, line) {
5328
5331
 
5329
5332
 
5330
5333
 
5331
- exports.Act = Act; exports.ActorSchema = _chunkNXURHBSBcjs.ActorSchema; exports.CausationEventSchema = _chunkNXURHBSBcjs.CausationEventSchema; exports.CommittedMetaSchema = _chunkNXURHBSBcjs.CommittedMetaSchema; exports.ConcurrencyError = _chunkNXURHBSBcjs.ConcurrencyError; exports.ConsoleLogger = _chunkVWUO5CEGcjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunkNXURHBSBcjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunkNXURHBSBcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunkNXURHBSBcjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunkNXURHBSBcjs.DeferSignal; exports.Environments = _chunkNXURHBSBcjs.Environments; exports.Errors = _chunkNXURHBSBcjs.Errors; exports.EventMetaSchema = _chunkNXURHBSBcjs.EventMetaSchema; exports.ExitCodes = _chunkNXURHBSBcjs.ExitCodes; exports.InMemoryCache = _chunkVWUO5CEGcjs.InMemoryCache; exports.InMemoryStore = _chunkVWUO5CEGcjs.InMemoryStore; exports.InvariantError = _chunkNXURHBSBcjs.InvariantError; exports.LogLevels = _chunkNXURHBSBcjs.LogLevels; exports.NonRetryableError = _chunkNXURHBSBcjs.NonRetryableError; exports.PackageSchema = _chunkVWUO5CEGcjs.PackageSchema; exports.PreconditionError = _chunkNXURHBSBcjs.PreconditionError; exports.QuerySchema = _chunkNXURHBSBcjs.QuerySchema; exports.REDACTED = _chunkNXURHBSBcjs.REDACTED; exports.SHREDDED = _chunkNXURHBSBcjs.SHREDDED; exports.SNAP_EVENT = _chunkNXURHBSBcjs.SNAP_EVENT; exports.StoreError = _chunkNXURHBSBcjs.StoreError; exports.StreamClosedError = _chunkNXURHBSBcjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunkNXURHBSBcjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunkNXURHBSBcjs.TargetSchema; exports.ValidationError = _chunkNXURHBSBcjs.ValidationError; exports.ZodEmpty = _chunkNXURHBSBcjs.ZodEmpty; exports.act = act; exports.cache = _chunkVWUO5CEGcjs.cache; exports.config = _chunkVWUO5CEGcjs.config; exports.dateReviver = _chunkVWUO5CEGcjs.dateReviver; exports.default_scope = _chunkVWUO5CEGcjs.default_scope; exports.dispose = _chunkVWUO5CEGcjs.dispose; exports.disposeAndExit = _chunkVWUO5CEGcjs.disposeAndExit; exports.extend = _chunkVWUO5CEGcjs.extend; exports.is_literal_source = _chunkVWUO5CEGcjs.is_literal_source; exports.log = _chunkVWUO5CEGcjs.log; exports.pii_fields = _chunkNXURHBSBcjs.pii_fields; exports.port = _chunkVWUO5CEGcjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunkVWUO5CEGcjs.resolveAutocloseConfig2; exports.sensitive = _chunkNXURHBSBcjs.sensitive; exports.sleep = _chunkVWUO5CEGcjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunkVWUO5CEGcjs.store; exports.validate = _chunkVWUO5CEGcjs.validate;
5334
+ exports.Act = Act; exports.ActorSchema = _chunkJ6G7UKZAcjs.ActorSchema; exports.CausationEventSchema = _chunkJ6G7UKZAcjs.CausationEventSchema; exports.CommittedMetaSchema = _chunkJ6G7UKZAcjs.CommittedMetaSchema; exports.ConcurrencyError = _chunkJ6G7UKZAcjs.ConcurrencyError; exports.ConsoleLogger = _chunk5OU5CTJZcjs.ConsoleLogger; exports.CsvFile = CsvFile; exports.DEFAULT_LANE = _chunkJ6G7UKZAcjs.DEFAULT_LANE; exports.DEFAULT_MAX_SUBSCRIBED_STREAMS = _chunkJ6G7UKZAcjs.DEFAULT_MAX_SUBSCRIBED_STREAMS; exports.DEFAULT_SETTLE_DEBOUNCE_MS = _chunkJ6G7UKZAcjs.DEFAULT_SETTLE_DEBOUNCE_MS; exports.DeferSignal = _chunkJ6G7UKZAcjs.DeferSignal; exports.Environments = _chunkJ6G7UKZAcjs.Environments; exports.Errors = _chunkJ6G7UKZAcjs.Errors; exports.EventMetaSchema = _chunkJ6G7UKZAcjs.EventMetaSchema; exports.ExitCodes = _chunkJ6G7UKZAcjs.ExitCodes; exports.InMemoryCache = _chunk5OU5CTJZcjs.InMemoryCache; exports.InMemoryStore = _chunk5OU5CTJZcjs.InMemoryStore; exports.InvariantError = _chunkJ6G7UKZAcjs.InvariantError; exports.LogLevels = _chunkJ6G7UKZAcjs.LogLevels; exports.NonRetryableError = _chunkJ6G7UKZAcjs.NonRetryableError; exports.PackageSchema = _chunk5OU5CTJZcjs.PackageSchema; exports.PreconditionError = _chunkJ6G7UKZAcjs.PreconditionError; exports.QuerySchema = _chunkJ6G7UKZAcjs.QuerySchema; exports.REDACTED = _chunkJ6G7UKZAcjs.REDACTED; exports.SHREDDED = _chunkJ6G7UKZAcjs.SHREDDED; exports.SNAP_EVENT = _chunkJ6G7UKZAcjs.SNAP_EVENT; exports.StoreError = _chunkJ6G7UKZAcjs.StoreError; exports.StreamClosedError = _chunkJ6G7UKZAcjs.StreamClosedError; exports.TOMBSTONE_EVENT = _chunkJ6G7UKZAcjs.TOMBSTONE_EVENT; exports.TargetSchema = _chunkJ6G7UKZAcjs.TargetSchema; exports.ValidationError = _chunkJ6G7UKZAcjs.ValidationError; exports.ZodEmpty = _chunkJ6G7UKZAcjs.ZodEmpty; exports.act = act; exports.cache = _chunk5OU5CTJZcjs.cache; exports.config = _chunk5OU5CTJZcjs.config; exports.dateReviver = _chunk5OU5CTJZcjs.dateReviver; exports.default_scope = _chunk5OU5CTJZcjs.default_scope; exports.dispose = _chunk5OU5CTJZcjs.dispose; exports.disposeAndExit = _chunk5OU5CTJZcjs.disposeAndExit; exports.extend = _chunk5OU5CTJZcjs.extend; exports.is_literal_source = _chunk5OU5CTJZcjs.is_literal_source; exports.log = _chunk5OU5CTJZcjs.log; exports.pii_fields = _chunkJ6G7UKZAcjs.pii_fields; exports.port = _chunk5OU5CTJZcjs.port; exports.projection = projection; exports.resolveAutocloseConfig = _chunk5OU5CTJZcjs.resolveAutocloseConfig2; exports.sensitive = _chunkJ6G7UKZAcjs.sensitive; exports.sleep = _chunk5OU5CTJZcjs.sleep; exports.slice = slice; exports.state = state; exports.store = _chunk5OU5CTJZcjs.store; exports.validate = _chunk5OU5CTJZcjs.validate;
5332
5335
  //# sourceMappingURL=index.cjs.map