@datasynx/agentic-ai-cartography 2.6.0 → 2.8.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.
@@ -10,7 +10,7 @@ import {
10
10
  defaultAllowedHosts,
11
11
  normalizeTenant,
12
12
  resolvePrincipal
13
- } from "./chunk-GA4427LB.js";
13
+ } from "./chunk-YVV6NIT2.js";
14
14
  import {
15
15
  ANOMALY_KINDS,
16
16
  ANOMALY_SEVERITIES,
@@ -1249,4 +1249,4 @@ export {
1249
1249
  parseApiArgs,
1250
1250
  startApi
1251
1251
  };
1252
- //# sourceMappingURL=chunk-PQ7Q6MI5.js.map
1252
+ //# sourceMappingURL=chunk-TBPGFEMQ.js.map
@@ -1521,6 +1521,7 @@ function newAnomalies(base, current) {
1521
1521
 
1522
1522
  // src/db.ts
1523
1523
  var DEFAULT_TENANT = "local";
1524
+ var SCHEMA_VERSION = 15;
1524
1525
  function normalizeTenant(raw) {
1525
1526
  if (raw == null) return DEFAULT_TENANT;
1526
1527
  const cleaned = sanitizeUntrusted(String(raw)).trim().slice(0, 128);
@@ -2925,6 +2926,14 @@ var CartographyDB = class {
2925
2926
  }
2926
2927
  return rows.length;
2927
2928
  }
2929
+ /**
2930
+ * Retention/compaction (4.7): delete audit events older than `olderThan` (ISO 8601).
2931
+ * The audit trail grows unbounded on a busy collector; this bounds it without touching
2932
+ * sessions/nodes/edges. Returns the number of events removed.
2933
+ */
2934
+ pruneEventsOlderThan(olderThan) {
2935
+ return this.db.prepare("DELETE FROM activity_events WHERE timestamp < ?").run(olderThan).changes;
2936
+ }
2928
2937
  // ── Graph queries (read-only context layer) ─────────────────────────────────
2929
2938
  /** Fetch a single node by id within a session. */
2930
2939
  getNode(sessionId, nodeId) {
@@ -3389,6 +3398,7 @@ export {
3389
3398
  stableStringify,
3390
3399
  diffTopology,
3391
3400
  DEFAULT_TENANT,
3401
+ SCHEMA_VERSION,
3392
3402
  normalizeTenant,
3393
3403
  keyMetaOf,
3394
3404
  contentHash,
@@ -3404,4 +3414,4 @@ export {
3404
3414
  AuthorizationError,
3405
3415
  authorize
3406
3416
  };
3407
- //# sourceMappingURL=chunk-GA4427LB.js.map
3417
+ //# sourceMappingURL=chunk-YVV6NIT2.js.map