@directive-run/core 1.20.2 → 1.22.0

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 (82) hide show
  1. package/README.md +33 -0
  2. package/dist/adapter-utils.cjs +1 -1
  3. package/dist/adapter-utils.d.cts +2 -2
  4. package/dist/adapter-utils.d.ts +2 -2
  5. package/dist/adapter-utils.js +1 -1
  6. package/dist/chunk-6NCC6RBC.js +3 -0
  7. package/dist/chunk-6NCC6RBC.js.map +1 -0
  8. package/dist/chunk-6PF2FRBG.js +7 -0
  9. package/dist/chunk-6PF2FRBG.js.map +1 -0
  10. package/dist/{chunk-RWFKUNF7.cjs → chunk-GACC2DMS.cjs} +2 -2
  11. package/dist/{chunk-RWFKUNF7.cjs.map → chunk-GACC2DMS.cjs.map} +1 -1
  12. package/dist/{chunk-4MNQDXH7.cjs → chunk-GBCWXTXW.cjs} +3 -3
  13. package/dist/chunk-GBCWXTXW.cjs.map +1 -0
  14. package/dist/chunk-GKMJ7NMP.cjs +7 -0
  15. package/dist/chunk-GKMJ7NMP.cjs.map +1 -0
  16. package/dist/{chunk-WKCMOU2F.js → chunk-KGTBTGOY.js} +2 -2
  17. package/dist/{chunk-WKCMOU2F.js.map → chunk-KGTBTGOY.js.map} +1 -1
  18. package/dist/{chunk-4QCKAJCX.cjs → chunk-MARZI3EY.cjs} +2 -2
  19. package/dist/{chunk-4QCKAJCX.cjs.map → chunk-MARZI3EY.cjs.map} +1 -1
  20. package/dist/chunk-OAPD3HIG.cjs +16 -0
  21. package/dist/chunk-OAPD3HIG.cjs.map +1 -0
  22. package/dist/chunk-QTY2FXZY.cjs +3 -0
  23. package/dist/chunk-QTY2FXZY.cjs.map +1 -0
  24. package/dist/{chunk-O4GQEV4G.js → chunk-RBF653NR.js} +2 -2
  25. package/dist/{chunk-O4GQEV4G.js.map → chunk-RBF653NR.js.map} +1 -1
  26. package/dist/{chunk-PXRV64PA.js → chunk-SFUVPP4L.js} +3 -3
  27. package/dist/chunk-SFUVPP4L.js.map +1 -0
  28. package/dist/chunk-YJEDX2JX.js +16 -0
  29. package/dist/chunk-YJEDX2JX.js.map +1 -0
  30. package/dist/{index-D_K7eEOF.d.ts → index-BgKC_ZT_.d.ts} +1 -1
  31. package/dist/{index-DApsqJ0h.d.cts → index-DRPkZ8HE.d.cts} +1 -1
  32. package/dist/index.cjs +2 -2
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +47 -43
  35. package/dist/index.d.ts +47 -43
  36. package/dist/index.js +2 -2
  37. package/dist/index.js.map +1 -1
  38. package/dist/internals.cjs +1 -1
  39. package/dist/internals.d.cts +60 -28
  40. package/dist/internals.d.ts +60 -28
  41. package/dist/internals.js +1 -1
  42. package/dist/plugins/index.cjs +2 -2
  43. package/dist/plugins/index.cjs.map +1 -1
  44. package/dist/plugins/index.d.cts +159 -3
  45. package/dist/plugins/index.d.ts +159 -3
  46. package/dist/plugins/index.js +2 -2
  47. package/dist/plugins/index.js.map +1 -1
  48. package/dist/{plugins-C6MxOvot.d.cts → plugins-5Supk7it.d.cts} +174 -43
  49. package/dist/{plugins-C6MxOvot.d.ts → plugins-5Supk7it.d.ts} +174 -43
  50. package/dist/{predicate-C92yT5IR.d.ts → predicate-C9oMO_ny.d.ts} +1 -1
  51. package/dist/{predicate-CV3YJDup.d.cts → predicate-DYb-3Mvl.d.cts} +1 -1
  52. package/dist/system-5FKUBLLV.cjs +2 -0
  53. package/dist/{system-BXCEQBBS.cjs.map → system-5FKUBLLV.cjs.map} +1 -1
  54. package/dist/system-6YWCXQOQ.js +2 -0
  55. package/dist/{system-AWEKWMNI.js.map → system-6YWCXQOQ.js.map} +1 -1
  56. package/dist/testing.cjs +1 -1
  57. package/dist/testing.d.cts +1 -1
  58. package/dist/testing.d.ts +1 -1
  59. package/dist/testing.js +1 -1
  60. package/dist/{utils-BZBBwS5A.d.cts → utils-DY8KTiD6.d.cts} +20 -7
  61. package/dist/{utils-BZBBwS5A.d.ts → utils-DY8KTiD6.d.ts} +20 -7
  62. package/dist/worker.cjs +1 -1
  63. package/dist/worker.d.cts +1 -1
  64. package/dist/worker.d.ts +1 -1
  65. package/dist/worker.js +1 -1
  66. package/package.json +1 -1
  67. package/dist/chunk-3ETCZLAY.js +0 -7
  68. package/dist/chunk-3ETCZLAY.js.map +0 -1
  69. package/dist/chunk-4MNQDXH7.cjs.map +0 -1
  70. package/dist/chunk-CLJMEU2A.js +0 -3
  71. package/dist/chunk-CLJMEU2A.js.map +0 -1
  72. package/dist/chunk-JGPPJV5P.cjs +0 -7
  73. package/dist/chunk-JGPPJV5P.cjs.map +0 -1
  74. package/dist/chunk-MDMMMZUZ.cjs +0 -3
  75. package/dist/chunk-MDMMMZUZ.cjs.map +0 -1
  76. package/dist/chunk-PNB73G3E.cjs +0 -16
  77. package/dist/chunk-PNB73G3E.cjs.map +0 -1
  78. package/dist/chunk-PXRV64PA.js.map +0 -1
  79. package/dist/chunk-QQEXRNAI.js +0 -16
  80. package/dist/chunk-QQEXRNAI.js.map +0 -1
  81. package/dist/system-AWEKWMNI.js +0 -2
  82. package/dist/system-BXCEQBBS.cjs +0 -2
@@ -1,5 +1,5 @@
1
- export { A as AuditEntry, a as AuditEntryKind, b as AuditLedger, c as AuditLedgerOptions, d as AuditLedgerSink, Q as QueryFilter, e as createAuditLedger, m as memorySink } from '../index-DApsqJ0h.cjs';
2
- import { M as ModuleSchema, P as Plugin, ao as System } from '../plugins-C6MxOvot.cjs';
1
+ export { A as AuditEntry, a as AuditEntryKind, b as AuditLedger, c as AuditLedgerOptions, d as AuditLedgerSink, Q as QueryFilter, e as createAuditLedger, m as memorySink } from '../index-DRPkZ8HE.cjs';
2
+ import { M as ModuleSchema, P as Plugin, ap as System } from '../plugins-5Supk7it.cjs';
3
3
 
4
4
  /**
5
5
  * Logging Plugin - Console logging for Directive events
@@ -845,4 +845,160 @@ declare class CircuitBreakerOpenError extends Error {
845
845
  */
846
846
  declare function createCircuitBreaker(config?: CircuitBreakerConfig): CircuitBreaker;
847
847
 
848
- export { type AggregatedMetric, type AlertConfig, type AlertEvent, type CircuitBreaker, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitBreakerStats, type CircuitState, type ConstraintMetrics, DEVTOOLS_EVENT_NAME, type DashboardData, type DevtoolsPluginOptions, type EffectMetrics, type HistogramBucket, type LoggingPluginOptions, type MetricDataPoint, type MetricType, type OTLPExporter, type OTLPExporterConfig, type ObservabilityConfig, type ObservabilityInstance, type PerformancePluginOptions, type PerformanceSnapshot, type PersistencePluginOptions, type ReconcileMetrics, type ResolverMetrics, type TraceEvent, type TraceSpan, createAgentMetrics, createCircuitBreaker, createOTLPExporter, createObservability, devtoolsPlugin, emitDevToolsEvent, loggingPlugin, performancePlugin, persistencePlugin };
848
+ /**
849
+ * Clobber Alert Plugin – default high-severity alerting for
850
+ * `resolver.write.rejected { reason: "clobbered" }` events landing on
851
+ * facts tagged irreversible.
852
+ *
853
+ * The audit ledger already records every clobber event with full
854
+ * forensic detail (fact, expected, actual, resolver, requirementId).
855
+ * But a clobber on a fact tagged `"money"` / `"pii"` / `"irreversible"`
856
+ * is operationally far more urgent than a clobber on a UI status fact.
857
+ * Without this plugin, a consumer has to write their own SIEM rule to
858
+ * separate "noise" from "page an engineer NOW."
859
+ *
860
+ * Default behaviour: fire `console.error` on every clobber whose fact's
861
+ * schema meta carries any tag in `irreversibleTags`. Replace the
862
+ * `onAlert` callback to route to PagerDuty / Slack / Sentry / your SIEM
863
+ * of choice.
864
+ *
865
+ * @public
866
+ */
867
+
868
+ /** Configuration for the {@link clobberAlertPlugin}. */
869
+ interface ClobberAlertPluginOptions {
870
+ /**
871
+ * Fact-meta tags that promote a clobber event from "noise" to
872
+ * "high-severity alert." A clobber whose fact's schema meta carries
873
+ * ANY of these tags fires `onAlert`.
874
+ *
875
+ * **Why tag the fact, not the resolver?** A clobber is detected at
876
+ * fact-write time. The audit event payload (`fact`, `expected`,
877
+ * `actual`) names the fact, not the side effect — the fact is the
878
+ * trigger surface for any irreversible work the resolver is about
879
+ * to do (a charge, a send, a delete). Tagging `payment.amount` with
880
+ * `"money"` marks the fact whose race-loss should page someone.
881
+ *
882
+ * If your model puts the irreversibility on the resolver rather than
883
+ * the fact, use `irreversibleResolvers` — both filters OR.
884
+ *
885
+ * Default: `["money", "pii", "irreversible"]`.
886
+ */
887
+ irreversibleTags?: readonly string[];
888
+ /**
889
+ * Resolver IDs whose clobbered writes should always alert, regardless
890
+ * of fact tags. Use this when irreversibility is modeled on the
891
+ * resolver (e.g. `stripeCharge`) rather than on the trigger fact.
892
+ * Defaults to empty — the fact-tag path covers most cases.
893
+ */
894
+ irreversibleResolvers?: readonly string[];
895
+ /**
896
+ * Callback fired when a clobber lands on a fact whose tags overlap
897
+ * `irreversibleTags`, or whose resolver is in `irreversibleResolvers`.
898
+ * Default: `console.error(...)`.
899
+ */
900
+ onAlert?: (event: ClobberAlertEvent) => void;
901
+ /**
902
+ * Callback fired when the engine's per-resolver rate limit aggregates
903
+ * multiple per-write clobber events into a single
904
+ * `kind: "summary"` event (default cap: 10 per-resolver-instance).
905
+ * The summary names the resolver + dropped count but loses per-fact
906
+ * attribution — the engine has no way to enumerate every dropped
907
+ * write inside the cap.
908
+ *
909
+ * Only fires when EITHER:
910
+ * - the resolver is listed in `irreversibleResolvers`, OR
911
+ * - this plugin has previously fired `onAlert` for the resolver
912
+ * (i.e. the resolver has touched an irreversible fact in this
913
+ * session, so a follow-on burst is operationally relevant)
914
+ *
915
+ * Default: undefined (no summary alerts). Set this to preserve
916
+ * SIEM telemetry past the engine's rate-limit cap on a hot
917
+ * resolver fighting an irreversible fact.
918
+ */
919
+ onSummary?: (event: ClobberSummaryEvent) => void;
920
+ /**
921
+ * Cooldown window keyed by `(fact, resolver)` pair. A second clobber
922
+ * from the same resolver on the same fact within this window does not
923
+ * re-fire `onAlert`. A clobber from a *different* resolver on the
924
+ * same fact still fires — fighting writers are a different
925
+ * operational incident than a single resolver retrying.
926
+ *
927
+ * The audit ledger records every clobber regardless of cooldown.
928
+ *
929
+ * Default: `0` (no cooldown — every event alerts).
930
+ */
931
+ cooldownMs?: number;
932
+ }
933
+ /** Payload passed to {@link ClobberAlertPluginOptions.onAlert}. */
934
+ interface ClobberAlertEvent {
935
+ readonly fact: string;
936
+ /**
937
+ * Fact-meta tags that matched `irreversibleTags`. Empty when the alert
938
+ * fired only because the resolver matched `irreversibleResolvers`.
939
+ * Use {@link matchedBy} to distinguish without checking length.
940
+ */
941
+ readonly tags: readonly string[];
942
+ /**
943
+ * Which filter triggered the alert:
944
+ * - `"tag"` — fact-meta tags overlapped `irreversibleTags`
945
+ * - `"resolver"` — resolver ID matched `irreversibleResolvers`
946
+ * - `"both"` — both filters matched
947
+ */
948
+ readonly matchedBy: "tag" | "resolver" | "both";
949
+ readonly resolver: string;
950
+ readonly requirementId: string;
951
+ readonly expected: unknown;
952
+ readonly actual: unknown;
953
+ /** `Date.now()` at the moment the alert fired. */
954
+ readonly timestamp: number;
955
+ }
956
+ /**
957
+ * Payload passed to {@link ClobberAlertPluginOptions.onSummary}.
958
+ *
959
+ * Fired when the engine's per-resolver clobber rate-limit aggregates
960
+ * multiple per-write events into one summary. Per-fact attribution is
961
+ * lost (the engine cannot enumerate every dropped write inside the
962
+ * cap), but the resolver + dropped count are preserved so SIEM can
963
+ * page on "this resolver is still fighting an irreversible fact
964
+ * past the cap."
965
+ */
966
+ interface ClobberSummaryEvent {
967
+ readonly resolver: string;
968
+ readonly requirementId: string;
969
+ /** Number of per-write clobber events the engine suppressed under the cap. */
970
+ readonly dropped: number;
971
+ /**
972
+ * Why the summary surfaced from this plugin's filter:
973
+ * - `"resolver-listed"` — the resolver was in `irreversibleResolvers`
974
+ * - `"prior-irreversible-alert"` — the resolver had already fired
975
+ * `onAlert` on an irreversible fact in this session
976
+ */
977
+ readonly matchedBy: "resolver-listed" | "prior-irreversible-alert";
978
+ /** `Date.now()` at the moment the summary fired. */
979
+ readonly timestamp: number;
980
+ }
981
+ /**
982
+ * Create a plugin that fires high-severity alerts for clobber events
983
+ * landing on irreversible-tagged facts.
984
+ *
985
+ * @example
986
+ * ```ts
987
+ * createSystem({
988
+ * module: myModule,
989
+ * plugins: [
990
+ * clobberAlertPlugin({
991
+ * irreversibleTags: ["money", "pii"],
992
+ * onAlert: (e) => pagerduty.trigger({
993
+ * severity: "critical",
994
+ * summary: `Clobber on ${e.fact} (${e.tags.join(", ")})`,
995
+ * details: e,
996
+ * }),
997
+ * }),
998
+ * ],
999
+ * });
1000
+ * ```
1001
+ */
1002
+ declare function clobberAlertPlugin<M extends ModuleSchema>(options?: ClobberAlertPluginOptions): Plugin<M>;
1003
+
1004
+ export { type AggregatedMetric, type AlertConfig, type AlertEvent, type CircuitBreaker, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitBreakerStats, type CircuitState, type ClobberAlertEvent, type ClobberAlertPluginOptions, type ConstraintMetrics, DEVTOOLS_EVENT_NAME, type DashboardData, type DevtoolsPluginOptions, type EffectMetrics, type HistogramBucket, type LoggingPluginOptions, type MetricDataPoint, type MetricType, type OTLPExporter, type OTLPExporterConfig, type ObservabilityConfig, type ObservabilityInstance, type PerformancePluginOptions, type PerformanceSnapshot, type PersistencePluginOptions, type ReconcileMetrics, type ResolverMetrics, type TraceEvent, type TraceSpan, clobberAlertPlugin, createAgentMetrics, createCircuitBreaker, createOTLPExporter, createObservability, devtoolsPlugin, emitDevToolsEvent, loggingPlugin, performancePlugin, persistencePlugin };
@@ -1,5 +1,5 @@
1
- export { A as AuditEntry, a as AuditEntryKind, b as AuditLedger, c as AuditLedgerOptions, d as AuditLedgerSink, Q as QueryFilter, e as createAuditLedger, m as memorySink } from '../index-D_K7eEOF.js';
2
- import { M as ModuleSchema, P as Plugin, ao as System } from '../plugins-C6MxOvot.js';
1
+ export { A as AuditEntry, a as AuditEntryKind, b as AuditLedger, c as AuditLedgerOptions, d as AuditLedgerSink, Q as QueryFilter, e as createAuditLedger, m as memorySink } from '../index-BgKC_ZT_.js';
2
+ import { M as ModuleSchema, P as Plugin, ap as System } from '../plugins-5Supk7it.js';
3
3
 
4
4
  /**
5
5
  * Logging Plugin - Console logging for Directive events
@@ -845,4 +845,160 @@ declare class CircuitBreakerOpenError extends Error {
845
845
  */
846
846
  declare function createCircuitBreaker(config?: CircuitBreakerConfig): CircuitBreaker;
847
847
 
848
- export { type AggregatedMetric, type AlertConfig, type AlertEvent, type CircuitBreaker, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitBreakerStats, type CircuitState, type ConstraintMetrics, DEVTOOLS_EVENT_NAME, type DashboardData, type DevtoolsPluginOptions, type EffectMetrics, type HistogramBucket, type LoggingPluginOptions, type MetricDataPoint, type MetricType, type OTLPExporter, type OTLPExporterConfig, type ObservabilityConfig, type ObservabilityInstance, type PerformancePluginOptions, type PerformanceSnapshot, type PersistencePluginOptions, type ReconcileMetrics, type ResolverMetrics, type TraceEvent, type TraceSpan, createAgentMetrics, createCircuitBreaker, createOTLPExporter, createObservability, devtoolsPlugin, emitDevToolsEvent, loggingPlugin, performancePlugin, persistencePlugin };
848
+ /**
849
+ * Clobber Alert Plugin – default high-severity alerting for
850
+ * `resolver.write.rejected { reason: "clobbered" }` events landing on
851
+ * facts tagged irreversible.
852
+ *
853
+ * The audit ledger already records every clobber event with full
854
+ * forensic detail (fact, expected, actual, resolver, requirementId).
855
+ * But a clobber on a fact tagged `"money"` / `"pii"` / `"irreversible"`
856
+ * is operationally far more urgent than a clobber on a UI status fact.
857
+ * Without this plugin, a consumer has to write their own SIEM rule to
858
+ * separate "noise" from "page an engineer NOW."
859
+ *
860
+ * Default behaviour: fire `console.error` on every clobber whose fact's
861
+ * schema meta carries any tag in `irreversibleTags`. Replace the
862
+ * `onAlert` callback to route to PagerDuty / Slack / Sentry / your SIEM
863
+ * of choice.
864
+ *
865
+ * @public
866
+ */
867
+
868
+ /** Configuration for the {@link clobberAlertPlugin}. */
869
+ interface ClobberAlertPluginOptions {
870
+ /**
871
+ * Fact-meta tags that promote a clobber event from "noise" to
872
+ * "high-severity alert." A clobber whose fact's schema meta carries
873
+ * ANY of these tags fires `onAlert`.
874
+ *
875
+ * **Why tag the fact, not the resolver?** A clobber is detected at
876
+ * fact-write time. The audit event payload (`fact`, `expected`,
877
+ * `actual`) names the fact, not the side effect — the fact is the
878
+ * trigger surface for any irreversible work the resolver is about
879
+ * to do (a charge, a send, a delete). Tagging `payment.amount` with
880
+ * `"money"` marks the fact whose race-loss should page someone.
881
+ *
882
+ * If your model puts the irreversibility on the resolver rather than
883
+ * the fact, use `irreversibleResolvers` — both filters OR.
884
+ *
885
+ * Default: `["money", "pii", "irreversible"]`.
886
+ */
887
+ irreversibleTags?: readonly string[];
888
+ /**
889
+ * Resolver IDs whose clobbered writes should always alert, regardless
890
+ * of fact tags. Use this when irreversibility is modeled on the
891
+ * resolver (e.g. `stripeCharge`) rather than on the trigger fact.
892
+ * Defaults to empty — the fact-tag path covers most cases.
893
+ */
894
+ irreversibleResolvers?: readonly string[];
895
+ /**
896
+ * Callback fired when a clobber lands on a fact whose tags overlap
897
+ * `irreversibleTags`, or whose resolver is in `irreversibleResolvers`.
898
+ * Default: `console.error(...)`.
899
+ */
900
+ onAlert?: (event: ClobberAlertEvent) => void;
901
+ /**
902
+ * Callback fired when the engine's per-resolver rate limit aggregates
903
+ * multiple per-write clobber events into a single
904
+ * `kind: "summary"` event (default cap: 10 per-resolver-instance).
905
+ * The summary names the resolver + dropped count but loses per-fact
906
+ * attribution — the engine has no way to enumerate every dropped
907
+ * write inside the cap.
908
+ *
909
+ * Only fires when EITHER:
910
+ * - the resolver is listed in `irreversibleResolvers`, OR
911
+ * - this plugin has previously fired `onAlert` for the resolver
912
+ * (i.e. the resolver has touched an irreversible fact in this
913
+ * session, so a follow-on burst is operationally relevant)
914
+ *
915
+ * Default: undefined (no summary alerts). Set this to preserve
916
+ * SIEM telemetry past the engine's rate-limit cap on a hot
917
+ * resolver fighting an irreversible fact.
918
+ */
919
+ onSummary?: (event: ClobberSummaryEvent) => void;
920
+ /**
921
+ * Cooldown window keyed by `(fact, resolver)` pair. A second clobber
922
+ * from the same resolver on the same fact within this window does not
923
+ * re-fire `onAlert`. A clobber from a *different* resolver on the
924
+ * same fact still fires — fighting writers are a different
925
+ * operational incident than a single resolver retrying.
926
+ *
927
+ * The audit ledger records every clobber regardless of cooldown.
928
+ *
929
+ * Default: `0` (no cooldown — every event alerts).
930
+ */
931
+ cooldownMs?: number;
932
+ }
933
+ /** Payload passed to {@link ClobberAlertPluginOptions.onAlert}. */
934
+ interface ClobberAlertEvent {
935
+ readonly fact: string;
936
+ /**
937
+ * Fact-meta tags that matched `irreversibleTags`. Empty when the alert
938
+ * fired only because the resolver matched `irreversibleResolvers`.
939
+ * Use {@link matchedBy} to distinguish without checking length.
940
+ */
941
+ readonly tags: readonly string[];
942
+ /**
943
+ * Which filter triggered the alert:
944
+ * - `"tag"` — fact-meta tags overlapped `irreversibleTags`
945
+ * - `"resolver"` — resolver ID matched `irreversibleResolvers`
946
+ * - `"both"` — both filters matched
947
+ */
948
+ readonly matchedBy: "tag" | "resolver" | "both";
949
+ readonly resolver: string;
950
+ readonly requirementId: string;
951
+ readonly expected: unknown;
952
+ readonly actual: unknown;
953
+ /** `Date.now()` at the moment the alert fired. */
954
+ readonly timestamp: number;
955
+ }
956
+ /**
957
+ * Payload passed to {@link ClobberAlertPluginOptions.onSummary}.
958
+ *
959
+ * Fired when the engine's per-resolver clobber rate-limit aggregates
960
+ * multiple per-write events into one summary. Per-fact attribution is
961
+ * lost (the engine cannot enumerate every dropped write inside the
962
+ * cap), but the resolver + dropped count are preserved so SIEM can
963
+ * page on "this resolver is still fighting an irreversible fact
964
+ * past the cap."
965
+ */
966
+ interface ClobberSummaryEvent {
967
+ readonly resolver: string;
968
+ readonly requirementId: string;
969
+ /** Number of per-write clobber events the engine suppressed under the cap. */
970
+ readonly dropped: number;
971
+ /**
972
+ * Why the summary surfaced from this plugin's filter:
973
+ * - `"resolver-listed"` — the resolver was in `irreversibleResolvers`
974
+ * - `"prior-irreversible-alert"` — the resolver had already fired
975
+ * `onAlert` on an irreversible fact in this session
976
+ */
977
+ readonly matchedBy: "resolver-listed" | "prior-irreversible-alert";
978
+ /** `Date.now()` at the moment the summary fired. */
979
+ readonly timestamp: number;
980
+ }
981
+ /**
982
+ * Create a plugin that fires high-severity alerts for clobber events
983
+ * landing on irreversible-tagged facts.
984
+ *
985
+ * @example
986
+ * ```ts
987
+ * createSystem({
988
+ * module: myModule,
989
+ * plugins: [
990
+ * clobberAlertPlugin({
991
+ * irreversibleTags: ["money", "pii"],
992
+ * onAlert: (e) => pagerduty.trigger({
993
+ * severity: "critical",
994
+ * summary: `Clobber on ${e.fact} (${e.tags.join(", ")})`,
995
+ * details: e,
996
+ * }),
997
+ * }),
998
+ * ],
999
+ * });
1000
+ * ```
1001
+ */
1002
+ declare function clobberAlertPlugin<M extends ModuleSchema>(options?: ClobberAlertPluginOptions): Plugin<M>;
1003
+
1004
+ export { type AggregatedMetric, type AlertConfig, type AlertEvent, type CircuitBreaker, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitBreakerStats, type CircuitState, type ClobberAlertEvent, type ClobberAlertPluginOptions, type ConstraintMetrics, DEVTOOLS_EVENT_NAME, type DashboardData, type DevtoolsPluginOptions, type EffectMetrics, type HistogramBucket, type LoggingPluginOptions, type MetricDataPoint, type MetricType, type OTLPExporter, type OTLPExporterConfig, type ObservabilityConfig, type ObservabilityInstance, type PerformancePluginOptions, type PerformanceSnapshot, type PersistencePluginOptions, type ReconcileMetrics, type ResolverMetrics, type TraceEvent, type TraceSpan, clobberAlertPlugin, createAgentMetrics, createCircuitBreaker, createOTLPExporter, createObservability, devtoolsPlugin, emitDevToolsEvent, loggingPlugin, performancePlugin, persistencePlugin };