@remnic/core 9.3.723 → 9.3.724
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-boundary.d.ts +6 -11
- package/dist/access-boundary.js +9 -9
- package/dist/access-cli.js +29 -23
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +5 -5
- package/dist/access-http.js +19 -14
- package/dist/access-mcp.d.ts +5 -5
- package/dist/access-mcp.js +18 -13
- package/dist/access-operations-batch.js +16 -10
- package/dist/access-operations.d.ts +5 -5
- package/dist/access-operations.js +17 -11
- package/dist/{access-service-Dj3I-VBS.d.ts → access-service-B2PlPtxh.d.ts} +3 -3
- package/dist/access-service.d.ts +5 -5
- package/dist/access-service.js +8 -8
- package/dist/access-surface-catalog.d.ts +5 -5
- package/dist/access-surface-catalog.js +82 -82
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +4 -4
- package/dist/briefing.d.ts +1 -1
- package/dist/briefing.js +3 -3
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-F-OEVbRQ.d.ts → catalog-CzUb-GyD.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +4 -4
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-EVPNWN7Z.js → chunk-4R3CGCI5.js} +2 -2
- package/dist/{chunk-UO5ZHIIH.js → chunk-4WZ3J7M6.js} +2 -2
- package/dist/{chunk-PD42EYQN.js → chunk-5OPYYPJN.js} +2 -2
- package/dist/{chunk-EEJMD2L2.js → chunk-6CWGS2LY.js} +2 -2
- package/dist/{chunk-7CTNUVHZ.js → chunk-6SQQOJ4U.js} +2 -2
- package/dist/{chunk-ILFSEIRT.js → chunk-7AG54AF3.js} +1 -1
- package/dist/{chunk-ILFSEIRT.js.map → chunk-7AG54AF3.js.map} +1 -1
- package/dist/{chunk-UIXXE6NI.js → chunk-C6BWLYW5.js} +24 -15
- package/dist/chunk-C6BWLYW5.js.map +1 -0
- package/dist/{chunk-A5XNBK2D.js → chunk-DF3I6JGP.js} +6 -6
- package/dist/{chunk-GJSL4WG2.js → chunk-F3XZN24Z.js} +2 -2
- package/dist/{chunk-J3JPB7ZI.js → chunk-FACTVMXQ.js} +2 -2
- package/dist/{chunk-B7WISIAJ.js → chunk-FN6QP7JQ.js} +154 -1067
- package/dist/chunk-FN6QP7JQ.js.map +1 -0
- package/dist/{chunk-EBDA5TYA.js → chunk-FXCIOLRB.js} +2 -2
- package/dist/{chunk-TXQCG6SE.js → chunk-H7HUQIY7.js} +3 -3
- package/dist/{chunk-QD6QP5P6.js → chunk-I2HL5M6T.js} +17 -17
- package/dist/{chunk-M7R5R6OJ.js → chunk-IAIPNEHD.js} +20 -2
- package/dist/{chunk-M7R5R6OJ.js.map → chunk-IAIPNEHD.js.map} +1 -1
- package/dist/{chunk-Z4RU5VPM.js → chunk-J334N6QV.js} +2 -2
- package/dist/{chunk-NXRUUDUF.js → chunk-JJJCVCCQ.js} +2 -2
- package/dist/{chunk-GDUOCHCD.js → chunk-KGZF2VO3.js} +10 -10
- package/dist/{chunk-LA3HZKES.js → chunk-KLFYKC3K.js} +448 -49
- package/dist/chunk-KLFYKC3K.js.map +1 -0
- package/dist/{chunk-LLUGAZ3B.js → chunk-NT36GU6X.js} +30 -4
- package/dist/chunk-NT36GU6X.js.map +1 -0
- package/dist/{chunk-OHTOPFRF.js → chunk-SC2YAWRF.js} +2 -2
- package/dist/{chunk-YEE5KJQQ.js → chunk-T55EGZSJ.js} +2 -2
- package/dist/{chunk-N77ELJ2D.js → chunk-TT5U3UDO.js} +4 -4
- package/dist/{chunk-6FAMMBQ3.js → chunk-UBHVAGO7.js} +2 -2
- package/dist/chunk-VI5SGGXB.js +420 -0
- package/dist/chunk-VI5SGGXB.js.map +1 -0
- package/dist/{chunk-EDOQM4E4.js → chunk-WAFDHKES.js} +2 -2
- package/dist/{chunk-EXUCUPV2.js → chunk-WM7DNKBD.js} +2 -2
- package/dist/{dreams-ledger-3WSCI5V4.js → chunk-YF6FMLBT.js} +5 -6
- package/dist/{dreams-ledger-3WSCI5V4.js.map → chunk-YF6FMLBT.js.map} +1 -1
- package/dist/{chunk-WQYSDPMA.js → chunk-YQMPUYHE.js} +2 -2
- package/dist/{chunk-5O42UKXI.js → chunk-YUYPWJD3.js} +2 -2
- package/dist/{chunk-VCLGUIFM.js → chunk-Z3FGC3QE.js} +2 -2
- package/dist/{chunk-A7TJZLPK.js → chunk-ZK2L72VN.js} +2 -2
- package/dist/{chunk-BXEOHV7K.js → chunk-ZOHMPFOB.js} +3 -3
- package/dist/{graph-edge-decay-QPRJQ7DL.js → chunk-ZQNCHPTZ.js} +4 -5
- package/dist/{graph-edge-decay-QPRJQ7DL.js.map → chunk-ZQNCHPTZ.js.map} +1 -1
- package/dist/{cli-P_GaYcCY.d.ts → cli-IOlDHSBT.d.ts} +3 -3
- package/dist/cli.d.ts +6 -6
- package/dist/cli.js +31 -26
- package/dist/compounding/engine.d.ts +1 -1
- package/dist/compounding/engine.js +3 -3
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +3 -3
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +3 -3
- package/dist/consolidation-provenance-check.d.ts +1 -1
- package/dist/consolidation-undo.d.ts +1 -1
- package/dist/contradiction/index.d.ts +1 -1
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/dreams-ledger-6UODQOX6.js +22 -0
- package/dist/dreams-ledger-6UODQOX6.js.map +1 -0
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +1 -1
- package/dist/entity-retrieval.js +3 -3
- package/dist/entity-schema.d.ts +1 -1
- package/dist/event-time.d.ts +33 -1
- package/dist/event-time.js +3 -1
- package/dist/explicit-capture.d.ts +4 -4
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction.d.ts +1 -1
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-decay-RXUCJIN4.js +22 -0
- package/dist/graph-edge-decay-RXUCJIN4.js.map +1 -0
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +58 -56
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +3 -3
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
- package/dist/maintenance/rebuild-memory-projection.js +4 -4
- package/dist/mcp-memory-inspector-app.d.ts +5 -5
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +1 -1
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +2 -2
- package/dist/namespaces/migrate.js +4 -4
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/storage.d.ts +2 -2
- package/dist/namespaces/storage.js +3 -3
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +8 -8
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +5 -5
- package/dist/{orchestrator-f5xv19kp.d.ts → orchestrator-C_OMSIMZ.d.ts} +34 -3
- package/dist/orchestrator.d.ts +4 -4
- package/dist/orchestrator.js +17 -17
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/schemas.d.ts +22 -22
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/index.d.ts +1 -1
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-BQm1e1Pn.d.ts → semantic-consolidation-B8LiYtvx.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +4 -4
- package/dist/semantic-rule-promotion.js +3 -3
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +3 -3
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/storage.d.ts +1 -1
- package/dist/storage.js +2 -2
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +1 -1
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/types.d.ts +12 -12
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-DwO1Ot4n.d.ts → types-DmTaqob2.d.ts} +14 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +3 -3
- package/package.json +2 -2
- package/src/access-boundary.ts +36 -2
- package/src/access-http.ts +17 -8
- package/src/access-mcp.ts +149 -1189
- package/src/access-operations-batch.ts +227 -1439
- package/src/access-surface-catalog.test.ts +4 -15
- package/src/access-surface-catalog.ts +82 -82
- package/src/bitemporal-dedup-backfill.test.ts +169 -0
- package/src/event-time.ts +57 -0
- package/src/extraction-eventtime-wiring.test.ts +101 -1
- package/src/orchestrator.ts +238 -43
- package/src/recall/archive-scoring.ts +526 -0
- package/src/types.ts +14 -0
- package/dist/chunk-B7WISIAJ.js.map +0 -1
- package/dist/chunk-EM2LDXJ2.js +0 -1315
- package/dist/chunk-EM2LDXJ2.js.map +0 -1
- package/dist/chunk-LA3HZKES.js.map +0 -1
- package/dist/chunk-LLUGAZ3B.js.map +0 -1
- package/dist/chunk-UIXXE6NI.js.map +0 -1
- /package/dist/{chunk-EVPNWN7Z.js.map → chunk-4R3CGCI5.js.map} +0 -0
- /package/dist/{chunk-UO5ZHIIH.js.map → chunk-4WZ3J7M6.js.map} +0 -0
- /package/dist/{chunk-PD42EYQN.js.map → chunk-5OPYYPJN.js.map} +0 -0
- /package/dist/{chunk-EEJMD2L2.js.map → chunk-6CWGS2LY.js.map} +0 -0
- /package/dist/{chunk-7CTNUVHZ.js.map → chunk-6SQQOJ4U.js.map} +0 -0
- /package/dist/{chunk-A5XNBK2D.js.map → chunk-DF3I6JGP.js.map} +0 -0
- /package/dist/{chunk-GJSL4WG2.js.map → chunk-F3XZN24Z.js.map} +0 -0
- /package/dist/{chunk-J3JPB7ZI.js.map → chunk-FACTVMXQ.js.map} +0 -0
- /package/dist/{chunk-EBDA5TYA.js.map → chunk-FXCIOLRB.js.map} +0 -0
- /package/dist/{chunk-TXQCG6SE.js.map → chunk-H7HUQIY7.js.map} +0 -0
- /package/dist/{chunk-QD6QP5P6.js.map → chunk-I2HL5M6T.js.map} +0 -0
- /package/dist/{chunk-Z4RU5VPM.js.map → chunk-J334N6QV.js.map} +0 -0
- /package/dist/{chunk-NXRUUDUF.js.map → chunk-JJJCVCCQ.js.map} +0 -0
- /package/dist/{chunk-GDUOCHCD.js.map → chunk-KGZF2VO3.js.map} +0 -0
- /package/dist/{chunk-OHTOPFRF.js.map → chunk-SC2YAWRF.js.map} +0 -0
- /package/dist/{chunk-YEE5KJQQ.js.map → chunk-T55EGZSJ.js.map} +0 -0
- /package/dist/{chunk-N77ELJ2D.js.map → chunk-TT5U3UDO.js.map} +0 -0
- /package/dist/{chunk-6FAMMBQ3.js.map → chunk-UBHVAGO7.js.map} +0 -0
- /package/dist/{chunk-EDOQM4E4.js.map → chunk-WAFDHKES.js.map} +0 -0
- /package/dist/{chunk-EXUCUPV2.js.map → chunk-WM7DNKBD.js.map} +0 -0
- /package/dist/{chunk-WQYSDPMA.js.map → chunk-YQMPUYHE.js.map} +0 -0
- /package/dist/{chunk-5O42UKXI.js.map → chunk-YUYPWJD3.js.map} +0 -0
- /package/dist/{chunk-VCLGUIFM.js.map → chunk-Z3FGC3QE.js.map} +0 -0
- /package/dist/{chunk-A7TJZLPK.js.map → chunk-ZK2L72VN.js.map} +0 -0
- /package/dist/{chunk-BXEOHV7K.js.map → chunk-ZOHMPFOB.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/maintenance/graph-edge-decay.ts"],"sourcesContent":["/**\n * Graph-edge decay maintenance job (issue #681 PR 2/3).\n *\n * For each edge in the on-disk JSONL graph stores\n * (`<memoryDir>/state/graphs/{entity,time,causal}.jsonl`) call\n * {@link decayEdgeConfidence} from PR 1/3 and write the decayed edge\n * back to disk via the temp+rename atomic-replace pattern (CLAUDE.md\n * gotcha #54: never delete-before-write).\n *\n * Emits a structured telemetry record per run that the doctor surface\n * (`remnic doctor`) and a tail of the maintenance ledger can consume.\n *\n * Pure-helper-style API (the function takes a `memoryDir` + opts and\n * returns a record); callers wire the cron / MCP tool / CLI surfaces.\n */\n\nimport {\n mkdir,\n readdir,\n readFile,\n rename,\n writeFile,\n} from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport {\n decayEdgeConfidence,\n DEFAULT_DECAY_FLOOR,\n DEFAULT_DECAY_PER_WINDOW,\n DEFAULT_DECAY_WINDOW_MS,\n readEdgeConfidence,\n type DecayOptions,\n} from \"../graph-edge-reinforcement.js\";\nimport {\n graphFilePath,\n graphsDir,\n readEdgesStrict,\n withGraphWriteLock,\n type GraphEdge,\n type GraphType,\n} from \"../graph.js\";\nimport { isSafeRouteNamespace } from \"../routing/engine.js\";\n\n/** Default visibility threshold for the \"below visibility\" telemetry counter. */\nexport const DEFAULT_VISIBILITY_THRESHOLD = 0.2;\n\nconst GRAPH_TYPES: readonly GraphType[] = [\"entity\", \"time\", \"causal\"] as const;\n\n/** Per-edge-type breakdown emitted by {@link runGraphEdgeDecayMaintenance}. */\nexport interface GraphEdgeDecayPerTypeStats {\n type: GraphType;\n edgesTotal: number;\n edgesDecayed: number;\n edgesBelowVisibilityThreshold: number;\n}\n\n/** Top-decayed-entity entry (label + total confidence drop summed across edges). */\nexport interface GraphEdgeDecayTopEntity {\n label: string;\n totalDrop: number;\n edgeCount: number;\n}\n\n/**\n * Telemetry record emitted by every run of the decay job. Persisted to\n * `<memoryDir>/state/graph-edge-decay-status.json` for doctor consumption\n * and (optionally) appended to the maintenance ledger by callers.\n */\nexport interface GraphEdgeDecayTelemetry {\n ranAt: string;\n durationMs: number;\n edgesTotal: number;\n edgesDecayed: number;\n edgesBelowVisibilityThreshold: number;\n topDecayedEntities: GraphEdgeDecayTopEntity[];\n perType: GraphEdgeDecayPerTypeStats[];\n windowMs: number;\n perWindow: number;\n floor: number;\n visibilityThreshold: number;\n}\n\nexport interface GraphEdgeDecayOptions extends DecayOptions {\n /** Confidence threshold below which an edge counts as \"low visibility\". */\n visibilityThreshold?: number;\n /** Override \"now\" for deterministic testing. Defaults to `new Date().toISOString()`. */\n now?: string;\n /** When `true`, do not write decayed edges back — just compute telemetry. */\n dryRun?: boolean;\n}\n\n/** Path of the latest-run status file. */\nexport function graphEdgeDecayStatusPath(memoryDir: string): string {\n return path.join(memoryDir, \"state\", \"graph-edge-decay-status.json\");\n}\n\n/** Write a JSONL file atomically using temp+rename (CLAUDE.md gotcha #54). */\nasync function writeJsonlAtomic(filePath: string, edges: GraphEdge[]): Promise<void> {\n await mkdir(path.dirname(filePath), { recursive: true });\n const body = edges.length === 0 ? \"\" : edges.map((e) => JSON.stringify(e)).join(\"\\n\") + \"\\n\";\n // Codex P2 / gotcha #54: write to temp then rename. Never rmSync(target)\n // before the rename succeeds; rename is atomic on the same filesystem.\n // Include pid + monotonic-ish suffix so concurrent runs cannot collide.\n const tempPath = `${filePath}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;\n await writeFile(tempPath, body, \"utf-8\");\n await rename(tempPath, filePath);\n}\n\n/**\n * Run a single decay pass over every edge type.\n *\n * Idempotency: PR 1/3's `decayEdgeConfidence` advances `lastReinforcedAt`\n * by exactly the windows it just charged for, so a second run with the\n * same `now` (or any `now` inside the new grace window) is a no-op.\n *\n * Returns the telemetry record. The record is also persisted to\n * {@link graphEdgeDecayStatusPath} so doctor / CLI can read the last run\n * without re-scanning the graphs.\n */\nexport async function runGraphEdgeDecayMaintenance(\n memoryDir: string,\n options: GraphEdgeDecayOptions = {},\n): Promise<GraphEdgeDecayTelemetry> {\n const startedAt = Date.now();\n const ranAt = options.now ?? new Date().toISOString();\n const windowMs = options.windowMs ?? DEFAULT_DECAY_WINDOW_MS;\n const perWindow = options.perWindow ?? DEFAULT_DECAY_PER_WINDOW;\n const floor = options.floor ?? DEFAULT_DECAY_FLOOR;\n const visibilityThreshold =\n typeof options.visibilityThreshold === \"number\" && Number.isFinite(options.visibilityThreshold)\n ? Math.max(0, Math.min(1, options.visibilityThreshold))\n : DEFAULT_VISIBILITY_THRESHOLD;\n const dryRun = options.dryRun === true;\n\n await mkdir(graphsDir(memoryDir), { recursive: true });\n\n const perType: GraphEdgeDecayPerTypeStats[] = [];\n // Aggregate per-label decay drops across ALL graph types so the\n // \"top decayed entities\" list reflects whichever label dominated\n // each edge (entity name, threadId, or causal phrase). Sorting by\n // total confidence drop highlights the edges decay actually moved\n // most in this pass.\n const dropByLabel = new Map<string, { totalDrop: number; edgeCount: number }>();\n\n let edgesTotal = 0;\n let edgesDecayed = 0;\n let edgesBelowVisibilityThreshold = 0;\n\n for (const type of GRAPH_TYPES) {\n const filePath = graphFilePath(memoryDir, type);\n\n // Hold the per-graph-file write lock across BOTH the read-snapshot\n // and the atomic rewrite so concurrent `appendEdge()` calls cannot\n // sneak in between (issue #729 / Codex P1, line 224). Without this\n // lock the snapshot rewrite would silently drop any edge appended\n // by extraction during the same window. Read failures other than\n // ENOENT are surfaced via `readEdgesStrict` so I/O outages cannot\n // be reported as \"no edges to decay\" (Codex P1, line 120).\n const {\n typeDecayed,\n typeBelow,\n typeTotal,\n } = await withGraphWriteLock(filePath, async () => {\n const edges = await readEdgesStrict(memoryDir, type);\n const updated: GraphEdge[] = new Array(edges.length);\n\n let localDecayed = 0;\n let localBelow = 0;\n let localChangedAny = false;\n\n for (let i = 0; i < edges.length; i += 1) {\n const edge = edges[i];\n const before = readEdgeConfidence(edge);\n const decayed = decayEdgeConfidence(edge, ranAt, { windowMs, perWindow, floor });\n const after = readEdgeConfidence(decayed);\n\n // Only count as \"decayed\" when the confidence actually dropped.\n // `decayEdgeConfidence` may return an unchanged copy (still inside\n // the grace window, or already at/below the floor) — those are\n // visited but not decayed.\n if (after < before) {\n localDecayed += 1;\n const drop = before - after;\n const label = typeof edge.label === \"string\" ? edge.label : \"\";\n // Skip empty labels in the top list — surfacing them produces\n // a meaningless \"\" entry that crowds the report.\n if (label.length > 0) {\n const prev = dropByLabel.get(label);\n if (prev) {\n prev.totalDrop += drop;\n prev.edgeCount += 1;\n } else {\n dropByLabel.set(label, { totalDrop: drop, edgeCount: 1 });\n }\n }\n }\n if (after < visibilityThreshold) {\n localBelow += 1;\n }\n updated[i] = decayed;\n // Detect any structural change (confidence OR lastReinforcedAt anchor advance)\n // so we only rewrite the JSONL when there's something to persist.\n if (\n decayed.confidence !== edge.confidence ||\n decayed.lastReinforcedAt !== edge.lastReinforcedAt\n ) {\n localChangedAny = true;\n }\n }\n\n if (!dryRun && localChangedAny && edges.length > 0) {\n await writeJsonlAtomic(filePath, updated);\n }\n\n return {\n typeDecayed: localDecayed,\n typeBelow: localBelow,\n typeTotal: edges.length,\n };\n });\n\n edgesDecayed += typeDecayed;\n edgesBelowVisibilityThreshold += typeBelow;\n edgesTotal += typeTotal;\n perType.push({\n type,\n edgesTotal: typeTotal,\n edgesDecayed: typeDecayed,\n edgesBelowVisibilityThreshold: typeBelow,\n });\n }\n\n // Stable secondary key on label keeps ordering deterministic when two\n // labels happen to have exactly the same totalDrop (gotcha #19).\n const topDecayedEntities: GraphEdgeDecayTopEntity[] = [...dropByLabel.entries()]\n .map(([label, agg]) => ({ label, totalDrop: agg.totalDrop, edgeCount: agg.edgeCount }))\n .sort((a, b) => {\n if (b.totalDrop !== a.totalDrop) return b.totalDrop - a.totalDrop;\n return a.label.localeCompare(b.label);\n })\n .slice(0, 5);\n\n const telemetry: GraphEdgeDecayTelemetry = {\n ranAt,\n durationMs: Date.now() - startedAt,\n edgesTotal,\n edgesDecayed,\n edgesBelowVisibilityThreshold,\n topDecayedEntities,\n perType,\n windowMs,\n perWindow,\n floor,\n visibilityThreshold,\n };\n\n if (!dryRun) {\n await persistTelemetry(memoryDir, telemetry);\n }\n\n return telemetry;\n}\n\nasync function persistTelemetry(\n memoryDir: string,\n telemetry: GraphEdgeDecayTelemetry,\n): Promise<void> {\n const statusPath = graphEdgeDecayStatusPath(memoryDir);\n await mkdir(path.dirname(statusPath), { recursive: true });\n const tempPath = `${statusPath}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;\n // Wrap I/O in try/catch (gotcha #13) — failing to persist telemetry must\n // not blow up the maintenance run; the in-memory record is still returned.\n try {\n await writeFile(tempPath, JSON.stringify(telemetry, null, 2) + \"\\n\", \"utf-8\");\n await rename(tempPath, statusPath);\n } catch {\n // Best-effort: callers still receive the in-memory telemetry record.\n }\n}\n\n/** Read the last persisted decay-run telemetry, if any. */\nexport async function readGraphEdgeDecayStatus(\n memoryDir: string,\n): Promise<GraphEdgeDecayTelemetry | null> {\n try {\n const raw = await readFile(graphEdgeDecayStatusPath(memoryDir), \"utf-8\");\n const parsed = JSON.parse(raw);\n // Validate the parsed payload is a plain object (gotcha #18: JSON.parse('null') is valid).\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n return null;\n }\n return parsed as GraphEdgeDecayTelemetry;\n } catch {\n return null;\n }\n}\n\n/**\n * Per-namespace telemetry record returned by\n * {@link runGraphEdgeDecayMaintenanceAcrossNamespaces}. Each entry\n * pairs the namespace name with its decay telemetry (or an error\n * string if that namespace's run failed). Allows operators to spot\n * I/O outages on a single namespace without masking the rest.\n */\nexport interface GraphEdgeDecayNamespaceResult {\n namespace: string;\n storageRoot: string;\n telemetry?: GraphEdgeDecayTelemetry;\n error?: string;\n}\n\n/**\n * Discover every namespace storage root that may contain graph files.\n *\n * Returns a list of `{ namespace, storageRoot }` entries:\n * - The default namespace at `memoryDir` (always present).\n * - Each subdirectory under `memoryDir/namespaces/` that passes\n * `isSafeRouteNamespace`.\n *\n * Per gotcha #42: read paths must enumerate the same namespace layer\n * as write paths so non-default namespaces don't get skipped during\n * maintenance. Issue #729 / Codex P2.\n */\nexport async function discoverGraphNamespaceRoots(\n memoryDir: string,\n options: { namespacesEnabled: boolean; defaultNamespace: string },\n): Promise<{ namespace: string; storageRoot: string }[]> {\n const seen = new Map<string, string>();\n // Default namespace always lives at memoryDir (NamespaceStorageRouter\n // falls back to memoryDir when memoryDir/namespaces/<default> does\n // not exist).\n seen.set(options.defaultNamespace, memoryDir);\n\n if (!options.namespacesEnabled) {\n return [...seen.entries()].map(([namespace, storageRoot]) => ({ namespace, storageRoot }));\n }\n\n const namespacesDir = path.join(memoryDir, \"namespaces\");\n let entries: import(\"node:fs\").Dirent[];\n try {\n entries = await readdir(namespacesDir, { withFileTypes: true });\n } catch {\n // No namespaces dir yet — only the default namespace exists.\n return [...seen.entries()].map(([namespace, storageRoot]) => ({ namespace, storageRoot }));\n }\n for (const entry of entries) {\n if (!entry.isDirectory()) continue;\n if (!isSafeRouteNamespace(entry.name)) continue;\n const root = path.join(namespacesDir, entry.name);\n seen.set(entry.name, root);\n }\n\n return [...seen.entries()].map(([namespace, storageRoot]) => ({ namespace, storageRoot }));\n}\n\n/**\n * Run the decay maintenance pass against every namespace storage root.\n *\n * In namespaces-enabled deployments, non-default namespaces store\n * their graph JSONLs under `memoryDir/namespaces/<ns>/state/graphs/`,\n * so a single-root run only updates the default namespace and silently\n * skips the rest (issue #729 / Codex P2).\n *\n * Failures in one namespace do not block other namespaces; per-root\n * errors are surfaced in the `error` field of each result.\n */\nexport async function runGraphEdgeDecayMaintenanceAcrossNamespaces(\n memoryDir: string,\n options: GraphEdgeDecayOptions & {\n namespacesEnabled: boolean;\n defaultNamespace: string;\n },\n): Promise<GraphEdgeDecayNamespaceResult[]> {\n const { namespacesEnabled, defaultNamespace, ...decayOptions } = options;\n const roots = await discoverGraphNamespaceRoots(memoryDir, {\n namespacesEnabled,\n defaultNamespace,\n });\n\n const results: GraphEdgeDecayNamespaceResult[] = [];\n for (const { namespace, storageRoot } of roots) {\n try {\n const telemetry = await runGraphEdgeDecayMaintenance(storageRoot, decayOptions);\n results.push({ namespace, storageRoot, telemetry });\n } catch (err) {\n results.push({\n namespace,\n storageRoot,\n error: err instanceof Error ? err.message : String(err),\n });\n }\n }\n return results;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK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AY,KAAK,OAAO;AAC9C,QAAI;AACF,YAAM,YAAY,MAAM,6BAA6B,aAAa,YAAY;AAC9E,cAAQ,KAAK,EAAE,WAAW,aAAa,UAAU,CAAC;AAAA,IACpD,SAAS,KAAK;AACZ,cAAQ,KAAK;AAAA,QACX;AAAA,QACA;AAAA,QACA,OAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MACxD,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/maintenance/graph-edge-decay.ts"],"sourcesContent":["/**\n * Graph-edge decay maintenance job (issue #681 PR 2/3).\n *\n * For each edge in the on-disk JSONL graph stores\n * (`<memoryDir>/state/graphs/{entity,time,causal}.jsonl`) call\n * {@link decayEdgeConfidence} from PR 1/3 and write the decayed edge\n * back to disk via the temp+rename atomic-replace pattern (CLAUDE.md\n * gotcha #54: never delete-before-write).\n *\n * Emits a structured telemetry record per run that the doctor surface\n * (`remnic doctor`) and a tail of the maintenance ledger can consume.\n *\n * Pure-helper-style API (the function takes a `memoryDir` + opts and\n * returns a record); callers wire the cron / MCP tool / CLI surfaces.\n */\n\nimport {\n mkdir,\n readdir,\n readFile,\n rename,\n writeFile,\n} from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport {\n decayEdgeConfidence,\n DEFAULT_DECAY_FLOOR,\n DEFAULT_DECAY_PER_WINDOW,\n DEFAULT_DECAY_WINDOW_MS,\n readEdgeConfidence,\n type DecayOptions,\n} from \"../graph-edge-reinforcement.js\";\nimport {\n graphFilePath,\n graphsDir,\n readEdgesStrict,\n withGraphWriteLock,\n type GraphEdge,\n type GraphType,\n} from \"../graph.js\";\nimport { isSafeRouteNamespace } from \"../routing/engine.js\";\n\n/** Default visibility threshold for the \"below visibility\" telemetry counter. */\nexport const DEFAULT_VISIBILITY_THRESHOLD = 0.2;\n\nconst GRAPH_TYPES: readonly GraphType[] = [\"entity\", \"time\", \"causal\"] as const;\n\n/** Per-edge-type breakdown emitted by {@link runGraphEdgeDecayMaintenance}. */\nexport interface GraphEdgeDecayPerTypeStats {\n type: GraphType;\n edgesTotal: number;\n edgesDecayed: number;\n edgesBelowVisibilityThreshold: number;\n}\n\n/** Top-decayed-entity entry (label + total confidence drop summed across edges). */\nexport interface GraphEdgeDecayTopEntity {\n label: string;\n totalDrop: number;\n edgeCount: number;\n}\n\n/**\n * Telemetry record emitted by every run of the decay job. Persisted to\n * `<memoryDir>/state/graph-edge-decay-status.json` for doctor consumption\n * and (optionally) appended to the maintenance ledger by callers.\n */\nexport interface GraphEdgeDecayTelemetry {\n ranAt: string;\n durationMs: number;\n edgesTotal: number;\n edgesDecayed: number;\n edgesBelowVisibilityThreshold: number;\n topDecayedEntities: GraphEdgeDecayTopEntity[];\n perType: GraphEdgeDecayPerTypeStats[];\n windowMs: number;\n perWindow: number;\n floor: number;\n visibilityThreshold: number;\n}\n\nexport interface GraphEdgeDecayOptions extends DecayOptions {\n /** Confidence threshold below which an edge counts as \"low visibility\". */\n visibilityThreshold?: number;\n /** Override \"now\" for deterministic testing. Defaults to `new Date().toISOString()`. */\n now?: string;\n /** When `true`, do not write decayed edges back — just compute telemetry. */\n dryRun?: boolean;\n}\n\n/** Path of the latest-run status file. */\nexport function graphEdgeDecayStatusPath(memoryDir: string): string {\n return path.join(memoryDir, \"state\", \"graph-edge-decay-status.json\");\n}\n\n/** Write a JSONL file atomically using temp+rename (CLAUDE.md gotcha #54). */\nasync function writeJsonlAtomic(filePath: string, edges: GraphEdge[]): Promise<void> {\n await mkdir(path.dirname(filePath), { recursive: true });\n const body = edges.length === 0 ? \"\" : edges.map((e) => JSON.stringify(e)).join(\"\\n\") + \"\\n\";\n // Codex P2 / gotcha #54: write to temp then rename. Never rmSync(target)\n // before the rename succeeds; rename is atomic on the same filesystem.\n // Include pid + monotonic-ish suffix so concurrent runs cannot collide.\n const tempPath = `${filePath}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;\n await writeFile(tempPath, body, \"utf-8\");\n await rename(tempPath, filePath);\n}\n\n/**\n * Run a single decay pass over every edge type.\n *\n * Idempotency: PR 1/3's `decayEdgeConfidence` advances `lastReinforcedAt`\n * by exactly the windows it just charged for, so a second run with the\n * same `now` (or any `now` inside the new grace window) is a no-op.\n *\n * Returns the telemetry record. The record is also persisted to\n * {@link graphEdgeDecayStatusPath} so doctor / CLI can read the last run\n * without re-scanning the graphs.\n */\nexport async function runGraphEdgeDecayMaintenance(\n memoryDir: string,\n options: GraphEdgeDecayOptions = {},\n): Promise<GraphEdgeDecayTelemetry> {\n const startedAt = Date.now();\n const ranAt = options.now ?? new Date().toISOString();\n const windowMs = options.windowMs ?? DEFAULT_DECAY_WINDOW_MS;\n const perWindow = options.perWindow ?? DEFAULT_DECAY_PER_WINDOW;\n const floor = options.floor ?? DEFAULT_DECAY_FLOOR;\n const visibilityThreshold =\n typeof options.visibilityThreshold === \"number\" && Number.isFinite(options.visibilityThreshold)\n ? Math.max(0, Math.min(1, options.visibilityThreshold))\n : DEFAULT_VISIBILITY_THRESHOLD;\n const dryRun = options.dryRun === true;\n\n await mkdir(graphsDir(memoryDir), { recursive: true });\n\n const perType: GraphEdgeDecayPerTypeStats[] = [];\n // Aggregate per-label decay drops across ALL graph types so the\n // \"top decayed entities\" list reflects whichever label dominated\n // each edge (entity name, threadId, or causal phrase). Sorting by\n // total confidence drop highlights the edges decay actually moved\n // most in this pass.\n const dropByLabel = new Map<string, { totalDrop: number; edgeCount: number }>();\n\n let edgesTotal = 0;\n let edgesDecayed = 0;\n let edgesBelowVisibilityThreshold = 0;\n\n for (const type of GRAPH_TYPES) {\n const filePath = graphFilePath(memoryDir, type);\n\n // Hold the per-graph-file write lock across BOTH the read-snapshot\n // and the atomic rewrite so concurrent `appendEdge()` calls cannot\n // sneak in between (issue #729 / Codex P1, line 224). Without this\n // lock the snapshot rewrite would silently drop any edge appended\n // by extraction during the same window. Read failures other than\n // ENOENT are surfaced via `readEdgesStrict` so I/O outages cannot\n // be reported as \"no edges to decay\" (Codex P1, line 120).\n const {\n typeDecayed,\n typeBelow,\n typeTotal,\n } = await withGraphWriteLock(filePath, async () => {\n const edges = await readEdgesStrict(memoryDir, type);\n const updated: GraphEdge[] = new Array(edges.length);\n\n let localDecayed = 0;\n let localBelow = 0;\n let localChangedAny = false;\n\n for (let i = 0; i < edges.length; i += 1) {\n const edge = edges[i];\n const before = readEdgeConfidence(edge);\n const decayed = decayEdgeConfidence(edge, ranAt, { windowMs, perWindow, floor });\n const after = readEdgeConfidence(decayed);\n\n // Only count as \"decayed\" when the confidence actually dropped.\n // `decayEdgeConfidence` may return an unchanged copy (still inside\n // the grace window, or already at/below the floor) — those are\n // visited but not decayed.\n if (after < before) {\n localDecayed += 1;\n const drop = before - after;\n const label = typeof edge.label === \"string\" ? edge.label : \"\";\n // Skip empty labels in the top list — surfacing them produces\n // a meaningless \"\" entry that crowds the report.\n if (label.length > 0) {\n const prev = dropByLabel.get(label);\n if (prev) {\n prev.totalDrop += drop;\n prev.edgeCount += 1;\n } else {\n dropByLabel.set(label, { totalDrop: drop, edgeCount: 1 });\n }\n }\n }\n if (after < visibilityThreshold) {\n localBelow += 1;\n }\n updated[i] = decayed;\n // Detect any structural change (confidence OR lastReinforcedAt anchor advance)\n // so we only rewrite the JSONL when there's something to persist.\n if (\n decayed.confidence !== edge.confidence ||\n decayed.lastReinforcedAt !== edge.lastReinforcedAt\n ) {\n localChangedAny = true;\n }\n }\n\n if (!dryRun && localChangedAny && edges.length > 0) {\n await writeJsonlAtomic(filePath, updated);\n }\n\n return {\n typeDecayed: localDecayed,\n typeBelow: localBelow,\n typeTotal: edges.length,\n };\n });\n\n edgesDecayed += typeDecayed;\n edgesBelowVisibilityThreshold += typeBelow;\n edgesTotal += typeTotal;\n perType.push({\n type,\n edgesTotal: typeTotal,\n edgesDecayed: typeDecayed,\n edgesBelowVisibilityThreshold: typeBelow,\n });\n }\n\n // Stable secondary key on label keeps ordering deterministic when two\n // labels happen to have exactly the same totalDrop (gotcha #19).\n const topDecayedEntities: GraphEdgeDecayTopEntity[] = [...dropByLabel.entries()]\n .map(([label, agg]) => ({ label, totalDrop: agg.totalDrop, edgeCount: agg.edgeCount }))\n .sort((a, b) => {\n if (b.totalDrop !== a.totalDrop) return b.totalDrop - a.totalDrop;\n return a.label.localeCompare(b.label);\n })\n .slice(0, 5);\n\n const telemetry: GraphEdgeDecayTelemetry = {\n ranAt,\n durationMs: Date.now() - startedAt,\n edgesTotal,\n edgesDecayed,\n edgesBelowVisibilityThreshold,\n topDecayedEntities,\n perType,\n windowMs,\n perWindow,\n floor,\n visibilityThreshold,\n };\n\n if (!dryRun) {\n await persistTelemetry(memoryDir, telemetry);\n }\n\n return telemetry;\n}\n\nasync function persistTelemetry(\n memoryDir: string,\n telemetry: GraphEdgeDecayTelemetry,\n): Promise<void> {\n const statusPath = graphEdgeDecayStatusPath(memoryDir);\n await mkdir(path.dirname(statusPath), { recursive: true });\n const tempPath = `${statusPath}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;\n // Wrap I/O in try/catch (gotcha #13) — failing to persist telemetry must\n // not blow up the maintenance run; the in-memory record is still returned.\n try {\n await writeFile(tempPath, JSON.stringify(telemetry, null, 2) + \"\\n\", \"utf-8\");\n await rename(tempPath, statusPath);\n } catch {\n // Best-effort: callers still receive the in-memory telemetry record.\n }\n}\n\n/** Read the last persisted decay-run telemetry, if any. */\nexport async function readGraphEdgeDecayStatus(\n memoryDir: string,\n): Promise<GraphEdgeDecayTelemetry | null> {\n try {\n const raw = await readFile(graphEdgeDecayStatusPath(memoryDir), \"utf-8\");\n const parsed = JSON.parse(raw);\n // Validate the parsed payload is a plain object (gotcha #18: JSON.parse('null') is valid).\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n return null;\n }\n return parsed as GraphEdgeDecayTelemetry;\n } catch {\n return null;\n }\n}\n\n/**\n * Per-namespace telemetry record returned by\n * {@link runGraphEdgeDecayMaintenanceAcrossNamespaces}. Each entry\n * pairs the namespace name with its decay telemetry (or an error\n * string if that namespace's run failed). Allows operators to spot\n * I/O outages on a single namespace without masking the rest.\n */\nexport interface GraphEdgeDecayNamespaceResult {\n namespace: string;\n storageRoot: string;\n telemetry?: GraphEdgeDecayTelemetry;\n error?: string;\n}\n\n/**\n * Discover every namespace storage root that may contain graph files.\n *\n * Returns a list of `{ namespace, storageRoot }` entries:\n * - The default namespace at `memoryDir` (always present).\n * - Each subdirectory under `memoryDir/namespaces/` that passes\n * `isSafeRouteNamespace`.\n *\n * Per gotcha #42: read paths must enumerate the same namespace layer\n * as write paths so non-default namespaces don't get skipped during\n * maintenance. Issue #729 / Codex P2.\n */\nexport async function discoverGraphNamespaceRoots(\n memoryDir: string,\n options: { namespacesEnabled: boolean; defaultNamespace: string },\n): Promise<{ namespace: string; storageRoot: string }[]> {\n const seen = new Map<string, string>();\n // Default namespace always lives at memoryDir (NamespaceStorageRouter\n // falls back to memoryDir when memoryDir/namespaces/<default> does\n // not exist).\n seen.set(options.defaultNamespace, memoryDir);\n\n if (!options.namespacesEnabled) {\n return [...seen.entries()].map(([namespace, storageRoot]) => ({ namespace, storageRoot }));\n }\n\n const namespacesDir = path.join(memoryDir, \"namespaces\");\n let entries: import(\"node:fs\").Dirent[];\n try {\n entries = await readdir(namespacesDir, { withFileTypes: true });\n } catch {\n // No namespaces dir yet — only the default namespace exists.\n return [...seen.entries()].map(([namespace, storageRoot]) => ({ namespace, storageRoot }));\n }\n for (const entry of entries) {\n if (!entry.isDirectory()) continue;\n if (!isSafeRouteNamespace(entry.name)) continue;\n const root = path.join(namespacesDir, entry.name);\n seen.set(entry.name, root);\n }\n\n return [...seen.entries()].map(([namespace, storageRoot]) => ({ namespace, storageRoot }));\n}\n\n/**\n * Run the decay maintenance pass against every namespace storage root.\n *\n * In namespaces-enabled deployments, non-default namespaces store\n * their graph JSONLs under `memoryDir/namespaces/<ns>/state/graphs/`,\n * so a single-root run only updates the default namespace and silently\n * skips the rest (issue #729 / Codex P2).\n *\n * Failures in one namespace do not block other namespaces; per-root\n * errors are surfaced in the `error` field of each result.\n */\nexport async function runGraphEdgeDecayMaintenanceAcrossNamespaces(\n memoryDir: string,\n options: GraphEdgeDecayOptions & {\n namespacesEnabled: boolean;\n defaultNamespace: string;\n },\n): Promise<GraphEdgeDecayNamespaceResult[]> {\n const { namespacesEnabled, defaultNamespace, ...decayOptions } = options;\n const roots = await discoverGraphNamespaceRoots(memoryDir, {\n namespacesEnabled,\n defaultNamespace,\n });\n\n const results: GraphEdgeDecayNamespaceResult[] = [];\n for (const { namespace, storageRoot } of roots) {\n try {\n const telemetry = await runGraphEdgeDecayMaintenance(storageRoot, decayOptions);\n results.push({ namespace, storageRoot, telemetry });\n } catch (err) {\n results.push({\n namespace,\n storageRoot,\n error: err instanceof Error ? err.message : String(err),\n });\n }\n }\n return results;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,UAAU;AAqBV,IAAM,+BAA+B;AAE5C,IAAM,cAAoC,CAAC,UAAU,QAAQ,QAAQ;AA8C9D,SAAS,yBAAyB,WAA2B;AAClE,SAAO,KAAK,KAAK,WAAW,SAAS,8BAA8B;AACrE;AAGA,eAAe,iBAAiB,UAAkB,OAAmC;AACnF,QAAM,MAAM,KAAK,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;AACvD,QAAM,OAAO,MAAM,WAAW,IAAI,KAAK,MAAM,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,EAAE,KAAK,IAAI,IAAI;AAIxF,QAAM,WAAW,GAAG,QAAQ,IAAI,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAChG,QAAM,UAAU,UAAU,MAAM,OAAO;AACvC,QAAM,OAAO,UAAU,QAAQ;AACjC;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G,KAAK,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,WAAW,WAAW,OAAO,EAAE,WAAW,YAAY,EAAE;AAAA,EAC3F;AACA,aAAW,SAAS,SAAS;AAC3B,QAAI,CAAC,MAAM,YAAY,EAAG;AAC1B,QAAI,CAAC,qBAAqB,MAAM,IAAI,EAAG;AACvC,UAAM,OAAO,KAAK,KAAK,eAAe,MAAM,IAAI;AAChD,SAAK,IAAI,MAAM,MAAM,IAAI;AAAA,EAC3B;AAEA,SAAO,CAAC,GAAG,KAAK,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,WAAW,WAAW,OAAO,EAAE,WAAW,YAAY,EAAE;AAC3F;AAaA,eAAsB,6CACpB,WACA,SAI0C;AAC1C,QAAM,EAAE,mBAAmB,kBAAkB,GAAG,aAAa,IAAI;AACjE,QAAM,QAAQ,MAAM,4BAA4B,WAAW;AAAA,IACzD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UAA2C,CAAC;AAClD,aAAW,EAAE,WAAW,YAAY,KAAK,OAAO;AAC9C,QAAI;AACF,YAAM,YAAY,MAAM,6BAA6B,aAAa,YAAY;AAC9E,cAAQ,KAAK,EAAE,WAAW,aAAa,UAAU,CAAC;AAAA,IACpD,SAAS,KAAK;AACZ,cAAQ,KAAK;AAAA,QACX;AAAA,QACA;AAAA,QACA,OAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MACxD,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CompoundingPromotionReport } from './compounding/engine.js';
|
|
2
2
|
import { MigrateObservationsResult } from './maintenance/migrate-observations.js';
|
|
3
3
|
import { MemoryGovernanceRunResult, MemoryGovernanceSummary, MemoryGovernanceMetrics, MemoryGovernanceQualityScore, MemoryGovernanceReviewQueueEntry, MemoryGovernanceAppliedAction, MemoryGovernanceTransitionReport, MemoryGovernanceManifest, MemoryGovernanceRestoreManifest, RestoreMemoryGovernanceRunResult } from './maintenance/memory-governance.js';
|
|
4
|
-
import { f as MemoryStatus, g as MemoryFile, B as BehaviorSignalEvent, Q as QmdSearchResult, W as MemoryActionEvent, m as MemoryLifecycleEvent } from './types-
|
|
4
|
+
import { f as MemoryStatus, g as MemoryFile, B as BehaviorSignalEvent, Q as QmdSearchResult, W as MemoryActionEvent, m as MemoryLifecycleEvent } from './types-DmTaqob2.js';
|
|
5
5
|
import { RebuildMemoryProjectionResult, RepairMemoryProjectionResult, VerifyMemoryProjectionResult } from './maintenance/rebuild-memory-projection.js';
|
|
6
6
|
import { RebuildMemoryLifecycleLedgerResult } from './maintenance/rebuild-memory-lifecycle-ledger.js';
|
|
7
7
|
import { RebuildObservationsResult } from './maintenance/rebuild-observations.js';
|
|
8
8
|
import { ArchiveObservationsResult } from './maintenance/archive-observations.js';
|
|
9
9
|
import { Writable, Readable } from 'node:stream';
|
|
10
|
-
import { O as Orchestrator } from './orchestrator-
|
|
10
|
+
import { O as Orchestrator } from './orchestrator-C_OMSIMZ.js';
|
|
11
11
|
import { ReplayRunSummary } from './replay/runner.js';
|
|
12
12
|
import { ReplaySource, ReplayTurn } from './replay/types.js';
|
|
13
13
|
import { b as BulkImportResult } from './types-gb_SNtjR.js';
|
|
@@ -16,7 +16,7 @@ import { WorkProjectStatus, WorkTaskStatus, WorkTaskPriority } from './work/type
|
|
|
16
16
|
import { RoutePatternType } from './routing/engine.js';
|
|
17
17
|
import { TailscaleSyncOptions } from './network/tailscale.js';
|
|
18
18
|
import { DashboardStatus } from './dashboard-runtime.js';
|
|
19
|
-
import { g as EngramAccessService } from './access-service-
|
|
19
|
+
import { g as EngramAccessService } from './access-service-B2PlPtxh.js';
|
|
20
20
|
import { ResolveSecretRefFn } from './resolve-auth-token.js';
|
|
21
21
|
import { CompatRunner, CompatReport } from './compat/types.js';
|
|
22
22
|
import { EvalBaselineDeltaReport, EvalBaselineSnapshot, EvalCiGateReport, EvalBenchmarkPackSummary, EvalHarnessStatus, EvalStoredBaselineCiGateReport } from './evals.js';
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './compounding/engine.js';
|
|
2
2
|
import './maintenance/migrate-observations.js';
|
|
3
3
|
import './maintenance/memory-governance.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-DmTaqob2.js';
|
|
5
5
|
import './maintenance/rebuild-memory-projection.js';
|
|
6
6
|
import './maintenance/rebuild-memory-lifecycle-ledger.js';
|
|
7
7
|
import './maintenance/rebuild-observations.js';
|
|
8
8
|
import './maintenance/archive-observations.js';
|
|
9
9
|
import 'node:stream';
|
|
10
|
-
import './orchestrator-
|
|
10
|
+
import './orchestrator-C_OMSIMZ.js';
|
|
11
11
|
import './replay/runner.js';
|
|
12
12
|
import './replay/types.js';
|
|
13
13
|
import './types-gb_SNtjR.js';
|
|
@@ -16,7 +16,7 @@ import './work/types.js';
|
|
|
16
16
|
import './routing/engine.js';
|
|
17
17
|
import './network/tailscale.js';
|
|
18
18
|
import './dashboard-runtime.js';
|
|
19
|
-
import './access-service-
|
|
19
|
+
import './access-service-B2PlPtxh.js';
|
|
20
20
|
import './resolve-auth-token.js';
|
|
21
21
|
import './compat/types.js';
|
|
22
22
|
import './evals.js';
|
|
@@ -38,7 +38,7 @@ import './trust-zones.js';
|
|
|
38
38
|
import './session-integrity.js';
|
|
39
39
|
import './recall-state.js';
|
|
40
40
|
import './policy-runtime.js';
|
|
41
|
-
export { A as AccessHttpServeCliCommandOptions, a as ArchiveObservationsCliCommandOptions, B as BulkImportCliCommandOptions, C as CliApi, b as CliCommand, c as CliProgram, d as CompatCliCommandOptions, e as ConnectorsRunCliOutputOptions, f as ConversationIndexHealthCliOrchestrator, D as DashboardStartCliCommandOptions, g as DedupeCandidate, E as ExactDedupePlan, G as GraphHealthCliCommandOptions, M as MemoryActionAuditCliCommandOptions, h as MemoryActionAuditCliNamespaceSummary, i as MemoryActionAuditCliReport, j as MemoryGovernanceCliCommandOptions, k as MemoryGovernanceReportCliCommandOptions, l as MemoryGovernanceRestoreCliCommandOptions, m as MemoryReviewDispositionCliCommandOptions, n as MemoryTimelineCliCommandOptions, o as MigrateCliOrchestrator, q as MigrateCliReport, s as MigrateObservationsCliCommandOptions, P as PolicyDiffCliReport, t as PolicyDiffEntry, u as PolicyRollbackCliReport, v as PolicyStatusCliReport, w as PolicyTuningCliOrchestrator, R as RebuildMemoryLifecycleLedgerCliCommandOptions, x as RebuildMemoryProjectionCliCommandOptions, y as RebuildObservationsCliCommandOptions, z as RepairMemoryProjectionCliCommandOptions, F as ReplayCliCommandOptions, H as ReplayCliOrchestrator, I as RouteCliCommandOptions, S as SessionIntegrityCliCommandOptions, J as SessionRepairCliCommandOptions, T as TailscaleStatusCliCommandOptions, K as TailscaleSyncCliCommandOptions, L as TierMigrationCliOrchestrator, N as TrainingExportCliCommandOptions, V as VerifyMemoryProjectionCliCommandOptions, W as WebDavServeCliCommandOptions, O as WorkProjectCliCommandOptions, Q as WorkTaskCliCommandOptions, U as emitConnectorsRunCliResult, X as filterNormalMemorySearchResults, Y as hasDestructivePurgeFailures, Z as isNormalRetrievalVisibleMemory, _ as listMemoryMarkdownFilePaths, $ as parseDurationToMs, a0 as parseStrictCliDate, a1 as planAggressiveDuplicateDeletions, a2 as planExactDuplicateDeletions, a3 as registerCli, a4 as resolveAccessPrincipalOverride, a5 as resolveMemoryDirForNamespace, a6 as runAbstractionNodeStatusCliCommand, a7 as runAccessHttpServeCliCommand, a8 as runAccessHttpStatusCliCommand, a9 as runAccessHttpStopCliCommand, aa as runAccessMcpServeCliCommand, ab as runArchiveObservationsCliCommand, ac as runBenchmarkBaselineReportCliCommand, ad as runBenchmarkBaselineSnapshotCliCommand, ae as runBenchmarkCiGateCliCommand, af as runBenchmarkImportCliCommand, ag as runBenchmarkStatusCliCommand, ah as runBenchmarkStoredBaselineCiGateCliCommand, ai as runBenchmarkValidateCliCommand, r as runBulkImportCliCommand, aj as runCausalTrajectoryStatusCliCommand, ak as runCommitmentLifecycleCliCommand, al as runCommitmentRecordCliCommand, am as runCommitmentSetStateCliCommand, an as runCommitmentStatusCliCommand, ao as runCompatCliCommand, ap as runCompoundingPromoteCliCommand, aq as runConversationIndexHealthCliCommand, ar as runConversationIndexInspectCliCommand, as as runConversationIndexRebuildCliCommand, at as runCueAnchorStatusCliCommand, au as runDashboardStartCliCommand, av as runDashboardStatusCliCommand, aw as runDashboardStopCliCommand, ax as runGraphHealthCliCommand, ay as runHarmonicSearchCliCommand, az as runMemoryActionAuditCliCommand, aA as runMemoryGovernanceCliCommand, aB as runMemoryGovernanceReportCliCommand, aC as runMemoryGovernanceRestoreCliCommand, aD as runMemoryReviewDispositionCliCommand, aE as runMemoryTimelineCliCommand, aF as runMigrateNormalizeFrontmatterCliCommand, aG as runMigrateObservationsCliCommand, aH as runMigrateRechunkCliCommand, aI as runMigrateReextractCliCommand, aJ as runMigrateRescoreImportanceCliCommand, aK as runObjectiveStateStatusCliCommand, aL as runPolicyDiffCliCommand, aM as runPolicyRollbackCliCommand, aN as runPolicyStatusCliCommand, aO as runRebuildMemoryLifecycleLedgerCliCommand, aP as runRebuildMemoryProjectionCliCommand, aQ as runRebuildObservationsCliCommand, aR as runRepairMemoryProjectionCliCommand, aS as runReplayCliCommand, aT as runResumeBundleBuildCliCommand, aU as runResumeBundleRecordCliCommand, aV as runResumeBundleStatusCliCommand, aW as runRouteCliCommand, aX as runSemanticRulePromoteCliCommand, aY as runSemanticRuleVerifyCliCommand, aZ as runSessionCheckCliCommand, a_ as runSessionRepairCliCommand, a$ as runTailscaleStatusCliCommand, b0 as runTailscaleSyncCliCommand, b1 as runTierMigrateCliCommand, b2 as runTierStatusCliCommand, b3 as runTrainingExportCliCommand, b4 as runTrustZoneDemoSeedCliCommand, b5 as runTrustZonePromoteCliCommand, b6 as runTrustZoneStatusCliCommand, b7 as runUtilityLearningCliCommand, b8 as runUtilityLearningStatusCliCommand, b9 as runUtilityTelemetryRecordCliCommand, ba as runUtilityTelemetryStatusCliCommand, bb as runVerifiedRecallSearchCliCommand, bc as runVerifyMemoryProjectionCliCommand, bd as runWebDavServeCliCommand, be as runWebDavStopCliCommand, bf as runWorkProductRecallSearchCliCommand, bg as runWorkProductRecordCliCommand, bh as runWorkProductStatusCliCommand, bi as runWorkProjectCliCommand, bj as runWorkTaskCliCommand } from './cli-
|
|
41
|
+
export { A as AccessHttpServeCliCommandOptions, a as ArchiveObservationsCliCommandOptions, B as BulkImportCliCommandOptions, C as CliApi, b as CliCommand, c as CliProgram, d as CompatCliCommandOptions, e as ConnectorsRunCliOutputOptions, f as ConversationIndexHealthCliOrchestrator, D as DashboardStartCliCommandOptions, g as DedupeCandidate, E as ExactDedupePlan, G as GraphHealthCliCommandOptions, M as MemoryActionAuditCliCommandOptions, h as MemoryActionAuditCliNamespaceSummary, i as MemoryActionAuditCliReport, j as MemoryGovernanceCliCommandOptions, k as MemoryGovernanceReportCliCommandOptions, l as MemoryGovernanceRestoreCliCommandOptions, m as MemoryReviewDispositionCliCommandOptions, n as MemoryTimelineCliCommandOptions, o as MigrateCliOrchestrator, q as MigrateCliReport, s as MigrateObservationsCliCommandOptions, P as PolicyDiffCliReport, t as PolicyDiffEntry, u as PolicyRollbackCliReport, v as PolicyStatusCliReport, w as PolicyTuningCliOrchestrator, R as RebuildMemoryLifecycleLedgerCliCommandOptions, x as RebuildMemoryProjectionCliCommandOptions, y as RebuildObservationsCliCommandOptions, z as RepairMemoryProjectionCliCommandOptions, F as ReplayCliCommandOptions, H as ReplayCliOrchestrator, I as RouteCliCommandOptions, S as SessionIntegrityCliCommandOptions, J as SessionRepairCliCommandOptions, T as TailscaleStatusCliCommandOptions, K as TailscaleSyncCliCommandOptions, L as TierMigrationCliOrchestrator, N as TrainingExportCliCommandOptions, V as VerifyMemoryProjectionCliCommandOptions, W as WebDavServeCliCommandOptions, O as WorkProjectCliCommandOptions, Q as WorkTaskCliCommandOptions, U as emitConnectorsRunCliResult, X as filterNormalMemorySearchResults, Y as hasDestructivePurgeFailures, Z as isNormalRetrievalVisibleMemory, _ as listMemoryMarkdownFilePaths, $ as parseDurationToMs, a0 as parseStrictCliDate, a1 as planAggressiveDuplicateDeletions, a2 as planExactDuplicateDeletions, a3 as registerCli, a4 as resolveAccessPrincipalOverride, a5 as resolveMemoryDirForNamespace, a6 as runAbstractionNodeStatusCliCommand, a7 as runAccessHttpServeCliCommand, a8 as runAccessHttpStatusCliCommand, a9 as runAccessHttpStopCliCommand, aa as runAccessMcpServeCliCommand, ab as runArchiveObservationsCliCommand, ac as runBenchmarkBaselineReportCliCommand, ad as runBenchmarkBaselineSnapshotCliCommand, ae as runBenchmarkCiGateCliCommand, af as runBenchmarkImportCliCommand, ag as runBenchmarkStatusCliCommand, ah as runBenchmarkStoredBaselineCiGateCliCommand, ai as runBenchmarkValidateCliCommand, r as runBulkImportCliCommand, aj as runCausalTrajectoryStatusCliCommand, ak as runCommitmentLifecycleCliCommand, al as runCommitmentRecordCliCommand, am as runCommitmentSetStateCliCommand, an as runCommitmentStatusCliCommand, ao as runCompatCliCommand, ap as runCompoundingPromoteCliCommand, aq as runConversationIndexHealthCliCommand, ar as runConversationIndexInspectCliCommand, as as runConversationIndexRebuildCliCommand, at as runCueAnchorStatusCliCommand, au as runDashboardStartCliCommand, av as runDashboardStatusCliCommand, aw as runDashboardStopCliCommand, ax as runGraphHealthCliCommand, ay as runHarmonicSearchCliCommand, az as runMemoryActionAuditCliCommand, aA as runMemoryGovernanceCliCommand, aB as runMemoryGovernanceReportCliCommand, aC as runMemoryGovernanceRestoreCliCommand, aD as runMemoryReviewDispositionCliCommand, aE as runMemoryTimelineCliCommand, aF as runMigrateNormalizeFrontmatterCliCommand, aG as runMigrateObservationsCliCommand, aH as runMigrateRechunkCliCommand, aI as runMigrateReextractCliCommand, aJ as runMigrateRescoreImportanceCliCommand, aK as runObjectiveStateStatusCliCommand, aL as runPolicyDiffCliCommand, aM as runPolicyRollbackCliCommand, aN as runPolicyStatusCliCommand, aO as runRebuildMemoryLifecycleLedgerCliCommand, aP as runRebuildMemoryProjectionCliCommand, aQ as runRebuildObservationsCliCommand, aR as runRepairMemoryProjectionCliCommand, aS as runReplayCliCommand, aT as runResumeBundleBuildCliCommand, aU as runResumeBundleRecordCliCommand, aV as runResumeBundleStatusCliCommand, aW as runRouteCliCommand, aX as runSemanticRulePromoteCliCommand, aY as runSemanticRuleVerifyCliCommand, aZ as runSessionCheckCliCommand, a_ as runSessionRepairCliCommand, a$ as runTailscaleStatusCliCommand, b0 as runTailscaleSyncCliCommand, b1 as runTierMigrateCliCommand, b2 as runTierStatusCliCommand, b3 as runTrainingExportCliCommand, b4 as runTrustZoneDemoSeedCliCommand, b5 as runTrustZonePromoteCliCommand, b6 as runTrustZoneStatusCliCommand, b7 as runUtilityLearningCliCommand, b8 as runUtilityLearningStatusCliCommand, b9 as runUtilityTelemetryRecordCliCommand, ba as runUtilityTelemetryStatusCliCommand, bb as runVerifiedRecallSearchCliCommand, bc as runVerifyMemoryProjectionCliCommand, bd as runWebDavServeCliCommand, be as runWebDavStopCliCommand, bf as runWorkProductRecallSearchCliCommand, bg as runWorkProductRecordCliCommand, bh as runWorkProductStatusCliCommand, bi as runWorkProjectCliCommand, bj as runWorkTaskCliCommand } from './cli-IOlDHSBT.js';
|
|
42
42
|
import './connectors-cli-2iaQ5tX2.js';
|
|
43
43
|
import './storage.js';
|
|
44
44
|
import './page-versioning.js';
|
|
@@ -62,7 +62,7 @@ import './transcript.js';
|
|
|
62
62
|
import './summarizer.js';
|
|
63
63
|
import './orchestration/maintenance.js';
|
|
64
64
|
import './namespaces/search.js';
|
|
65
|
-
import './catalog-
|
|
65
|
+
import './catalog-CzUb-GyD.js';
|
|
66
66
|
import './utility-runtime.js';
|
|
67
67
|
import './tier-routing.js';
|
|
68
68
|
import './lifecycle.js';
|
|
@@ -83,7 +83,7 @@ import './lcm/archive.js';
|
|
|
83
83
|
import './lcm/summarizer.js';
|
|
84
84
|
import './lcm/dag.js';
|
|
85
85
|
import './lcm/queue.js';
|
|
86
|
-
import './semantic-consolidation-
|
|
86
|
+
import './semantic-consolidation-B8LiYtvx.js';
|
|
87
87
|
import './connectors/codex-materialize.js';
|
|
88
88
|
import './logger.js';
|
|
89
89
|
import './conversation-index/backend.js';
|
package/dist/cli.js
CHANGED
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
runWorkProductStatusCliCommand,
|
|
91
91
|
runWorkProjectCliCommand,
|
|
92
92
|
runWorkTaskCliCommand
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-I2HL5M6T.js";
|
|
94
94
|
import "./chunk-MC4FJXPA.js";
|
|
95
95
|
import "./chunk-LQHDIS7L.js";
|
|
96
96
|
import "./chunk-7F7Z6MOS.js";
|
|
@@ -109,8 +109,8 @@ import "./chunk-HOJZMQ4J.js";
|
|
|
109
109
|
import "./chunk-EEC4PCG5.js";
|
|
110
110
|
import "./chunk-PYIFUBRK.js";
|
|
111
111
|
import "./chunk-D6RIFG4O.js";
|
|
112
|
-
import "./chunk-
|
|
113
|
-
import "./chunk-
|
|
112
|
+
import "./chunk-UBHVAGO7.js";
|
|
113
|
+
import "./chunk-H7HUQIY7.js";
|
|
114
114
|
import "./chunk-LZZNTPLR.js";
|
|
115
115
|
import "./chunk-JCK7V6SN.js";
|
|
116
116
|
import "./chunk-WMWVO45V.js";
|
|
@@ -118,12 +118,12 @@ import "./chunk-KJTKLXTH.js";
|
|
|
118
118
|
import "./chunk-CKITWVWJ.js";
|
|
119
119
|
import "./chunk-OUELRE5E.js";
|
|
120
120
|
import "./chunk-GQL52GQ5.js";
|
|
121
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-FACTVMXQ.js";
|
|
122
122
|
import "./chunk-TGQ2NTWH.js";
|
|
123
123
|
import "./chunk-D7EBTQ24.js";
|
|
124
|
-
import "./chunk-
|
|
125
|
-
import "./chunk-
|
|
126
|
-
import "./chunk-
|
|
124
|
+
import "./chunk-ZOHMPFOB.js";
|
|
125
|
+
import "./chunk-DF3I6JGP.js";
|
|
126
|
+
import "./chunk-6CWGS2LY.js";
|
|
127
127
|
import "./chunk-3T74IZB3.js";
|
|
128
128
|
import "./chunk-HL4DB7TO.js";
|
|
129
129
|
import "./chunk-7XH7VJN4.js";
|
|
@@ -136,16 +136,16 @@ import "./chunk-2PRQG7PV.js";
|
|
|
136
136
|
import "./chunk-WIWPSQYU.js";
|
|
137
137
|
import "./chunk-2F6NP3NT.js";
|
|
138
138
|
import "./chunk-TERNBNJB.js";
|
|
139
|
-
import "./chunk-
|
|
139
|
+
import "./chunk-FXCIOLRB.js";
|
|
140
140
|
import "./chunk-QRDOSYOR.js";
|
|
141
|
-
import "./chunk-
|
|
141
|
+
import "./chunk-T55EGZSJ.js";
|
|
142
142
|
import "./chunk-ZRWB5D4H.js";
|
|
143
143
|
import "./chunk-GY3SKOS4.js";
|
|
144
144
|
import "./chunk-SFQ6QNL7.js";
|
|
145
145
|
import "./chunk-33JBK2XP.js";
|
|
146
|
-
import "./chunk-
|
|
147
|
-
import "./chunk-
|
|
148
|
-
import "./chunk-
|
|
146
|
+
import "./chunk-5OPYYPJN.js";
|
|
147
|
+
import "./chunk-WM7DNKBD.js";
|
|
148
|
+
import "./chunk-SC2YAWRF.js";
|
|
149
149
|
import "./chunk-KFY3SGN7.js";
|
|
150
150
|
import "./chunk-CMTINOFS.js";
|
|
151
151
|
import "./chunk-TQNRI55H.js";
|
|
@@ -169,7 +169,7 @@ import "./chunk-C4X4QGIO.js";
|
|
|
169
169
|
import "./chunk-OO42R444.js";
|
|
170
170
|
import "./chunk-K6MV3TRQ.js";
|
|
171
171
|
import "./chunk-OADWQ5CR.js";
|
|
172
|
-
import "./chunk-
|
|
172
|
+
import "./chunk-C6BWLYW5.js";
|
|
173
173
|
import "./chunk-SEDEKFYQ.js";
|
|
174
174
|
import "./chunk-RKNJBZ55.js";
|
|
175
175
|
import "./chunk-J64TK33U.js";
|
|
@@ -178,14 +178,19 @@ import "./chunk-42NQ7AVG.js";
|
|
|
178
178
|
import "./chunk-TMSXWOBZ.js";
|
|
179
179
|
import "./chunk-7RXCMVFQ.js";
|
|
180
180
|
import "./chunk-7WV3F5DQ.js";
|
|
181
|
-
import "./chunk-
|
|
182
|
-
import "./chunk-T4WDJPEZ.js";
|
|
181
|
+
import "./chunk-FN6QP7JQ.js";
|
|
183
182
|
import "./chunk-D24OXEPB.js";
|
|
184
|
-
import "./chunk-
|
|
185
|
-
import "./chunk-
|
|
183
|
+
import "./chunk-TT5U3UDO.js";
|
|
184
|
+
import "./chunk-VI5SGGXB.js";
|
|
185
|
+
import "./chunk-ZQNCHPTZ.js";
|
|
186
|
+
import "./chunk-YF6FMLBT.js";
|
|
187
|
+
import "./chunk-R6OVFAX6.js";
|
|
188
|
+
import "./chunk-PLBIPT6I.js";
|
|
189
|
+
import "./chunk-35NN3ZFA.js";
|
|
190
|
+
import "./chunk-T4WDJPEZ.js";
|
|
186
191
|
import "./chunk-FVZ2ISIX.js";
|
|
187
|
-
import "./chunk-
|
|
188
|
-
import "./chunk-
|
|
192
|
+
import "./chunk-NT36GU6X.js";
|
|
193
|
+
import "./chunk-KGZF2VO3.js";
|
|
189
194
|
import "./chunk-GDASG7NC.js";
|
|
190
195
|
import "./chunk-GDB4J2H3.js";
|
|
191
196
|
import "./chunk-ARV3AUOM.js";
|
|
@@ -194,15 +199,15 @@ import "./chunk-ERA5RSMZ.js";
|
|
|
194
199
|
import "./chunk-IQ7WCZRW.js";
|
|
195
200
|
import "./chunk-BT7NVCML.js";
|
|
196
201
|
import "./chunk-H7XKCNR6.js";
|
|
197
|
-
import "./chunk-
|
|
202
|
+
import "./chunk-6SQQOJ4U.js";
|
|
198
203
|
import "./chunk-SOBJ6NEY.js";
|
|
199
|
-
import "./chunk-
|
|
200
|
-
import "./chunk-
|
|
204
|
+
import "./chunk-WAFDHKES.js";
|
|
205
|
+
import "./chunk-Z3FGC3QE.js";
|
|
201
206
|
import "./chunk-RS25QOKZ.js";
|
|
202
207
|
import "./chunk-JGSKJHF7.js";
|
|
203
208
|
import "./chunk-S4DDLTPX.js";
|
|
204
209
|
import "./chunk-FF4KLI5W.js";
|
|
205
|
-
import "./chunk-
|
|
210
|
+
import "./chunk-F3XZN24Z.js";
|
|
206
211
|
import "./chunk-QR67FU5G.js";
|
|
207
212
|
import "./chunk-HCVWF657.js";
|
|
208
213
|
import "./chunk-SANZHXY2.js";
|
|
@@ -241,8 +246,8 @@ import "./chunk-2LSZVONP.js";
|
|
|
241
246
|
import "./chunk-DEUNUKTD.js";
|
|
242
247
|
import "./chunk-TBBDFYXW.js";
|
|
243
248
|
import "./chunk-ZBJMUXZH.js";
|
|
244
|
-
import "./chunk-
|
|
245
|
-
import "./chunk-
|
|
249
|
+
import "./chunk-4WZ3J7M6.js";
|
|
250
|
+
import "./chunk-4R3CGCI5.js";
|
|
246
251
|
import "./chunk-L2B3EE7B.js";
|
|
247
252
|
import "./chunk-M7XQSUBB.js";
|
|
248
253
|
import "./chunk-5UZXUTVO.js";
|
|
@@ -252,7 +257,7 @@ import "./chunk-6CIAGZ6X.js";
|
|
|
252
257
|
import "./chunk-J6A3CX5N.js";
|
|
253
258
|
import "./chunk-SVOZFLIQ.js";
|
|
254
259
|
import "./chunk-LTJAMRGI.js";
|
|
255
|
-
import "./chunk-
|
|
260
|
+
import "./chunk-7AG54AF3.js";
|
|
256
261
|
import "./chunk-AWJ2FHCF.js";
|
|
257
262
|
import "./chunk-42JKGUFJ.js";
|
|
258
263
|
import "./chunk-RULE4VG5.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageManager } from '../storage.js';
|
|
2
|
-
import { P as PluginConfig } from '../types-
|
|
2
|
+
import { P as PluginConfig } from '../types-DmTaqob2.js';
|
|
3
3
|
import { SharedFeedbackEntry } from '../shared-context/manager.js';
|
|
4
4
|
import '../page-versioning.js';
|
|
5
5
|
import '../consolidation-operator.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompoundingEngine,
|
|
3
3
|
defaultTierMigrationCycleBudget
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-YQMPUYHE.js";
|
|
5
5
|
import "../chunk-UFS7OXGL.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-4R3CGCI5.js";
|
|
7
7
|
import "../chunk-L2B3EE7B.js";
|
|
8
8
|
import "../chunk-M7XQSUBB.js";
|
|
9
9
|
import "../chunk-5UZXUTVO.js";
|
|
@@ -13,7 +13,7 @@ import "../chunk-6CIAGZ6X.js";
|
|
|
13
13
|
import "../chunk-J6A3CX5N.js";
|
|
14
14
|
import "../chunk-SVOZFLIQ.js";
|
|
15
15
|
import "../chunk-LTJAMRGI.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-7AG54AF3.js";
|
|
17
17
|
import "../chunk-AWJ2FHCF.js";
|
|
18
18
|
import "../chunk-42JKGUFJ.js";
|
|
19
19
|
import "../chunk-RULE4VG5.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MemoryCategory, g as MemoryFile } from '../types-
|
|
1
|
+
import { M as MemoryCategory, g as MemoryFile } from '../types-DmTaqob2.js';
|
|
2
2
|
import { LcmEngine } from '../lcm/engine.js';
|
|
3
3
|
import '../types-gb_SNtjR.js';
|
|
4
4
|
import '../message-parts/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as CompressionGuidelineOptimizerEventCounts, N as CompressionGuidelineOptimizerActionSummary, O as CompressionGuidelineOptimizerRuleUpdate, U as MemoryActionType, W as MemoryActionEvent, X as CompressionGuidelineOptimizerState } from './types-
|
|
1
|
+
import { K as CompressionGuidelineOptimizerEventCounts, N as CompressionGuidelineOptimizerActionSummary, O as CompressionGuidelineOptimizerRuleUpdate, U as MemoryActionType, W as MemoryActionEvent, X as CompressionGuidelineOptimizerState } from './types-DmTaqob2.js';
|
|
2
2
|
import './types-gb_SNtjR.js';
|
|
3
3
|
import './message-parts/index.js';
|
|
4
4
|
|
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PluginConfig, g as MemoryFile } from '../types-
|
|
1
|
+
import { P as PluginConfig, g as MemoryFile } from '../types-DmTaqob2.js';
|
|
2
2
|
import { RolloutSummaryInput, MaterializeResult } from './codex-materialize.js';
|
|
3
3
|
import '../types-gb_SNtjR.js';
|
|
4
4
|
import '../message-parts/index.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runCodexMaterialize,
|
|
3
3
|
runPostConsolidationMaterialize
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-ZK2L72VN.js";
|
|
5
5
|
import "../chunk-UUH4YQOF.js";
|
|
6
6
|
import "../chunk-3UXOZBHV.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-4R3CGCI5.js";
|
|
8
8
|
import "../chunk-L2B3EE7B.js";
|
|
9
9
|
import "../chunk-M7XQSUBB.js";
|
|
10
10
|
import "../chunk-5UZXUTVO.js";
|
|
@@ -14,7 +14,7 @@ import "../chunk-6CIAGZ6X.js";
|
|
|
14
14
|
import "../chunk-J6A3CX5N.js";
|
|
15
15
|
import "../chunk-SVOZFLIQ.js";
|
|
16
16
|
import "../chunk-LTJAMRGI.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-7AG54AF3.js";
|
|
18
18
|
import "../chunk-AWJ2FHCF.js";
|
|
19
19
|
import "../chunk-42JKGUFJ.js";
|
|
20
20
|
import "../chunk-RULE4VG5.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { MATERIALIZE_VERSION, MaterializeOptions, MaterializeResult, MemoryMdValidation, RolloutSummaryInput, SENTINEL_FILE, TMP_DIR, approximateTokenCount, describeMemoriesDir, ensureSentinel, materializeForNamespace, renderMemoryMd, renderMemorySummary, renderRawMemories, renderRolloutSummary, truncateToTokenBudget, validateMemoryMd } from './codex-materialize.js';
|
|
2
2
|
export { RunMaterializeOptions, runCodexMaterialize } from './codex-materialize-runner.js';
|
|
3
|
-
import { P as PluginConfig } from '../types-
|
|
3
|
+
import { P as PluginConfig } from '../types-DmTaqob2.js';
|
|
4
4
|
import '../types-gb_SNtjR.js';
|
|
5
5
|
import '../message-parts/index.js';
|
|
6
6
|
|
package/dist/connectors/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import "../chunk-UG274TNV.js";
|
|
27
27
|
import {
|
|
28
28
|
runCodexMaterialize
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-ZK2L72VN.js";
|
|
30
30
|
import {
|
|
31
31
|
MATERIALIZE_VERSION,
|
|
32
32
|
SENTINEL_FILE,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
getRegistryPath
|
|
49
49
|
} from "../chunk-K6MV3TRQ.js";
|
|
50
50
|
import "../chunk-O75CRYGF.js";
|
|
51
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-4R3CGCI5.js";
|
|
52
52
|
import "../chunk-L2B3EE7B.js";
|
|
53
53
|
import "../chunk-M7XQSUBB.js";
|
|
54
54
|
import "../chunk-5UZXUTVO.js";
|
|
@@ -58,7 +58,7 @@ import "../chunk-6CIAGZ6X.js";
|
|
|
58
58
|
import "../chunk-J6A3CX5N.js";
|
|
59
59
|
import "../chunk-SVOZFLIQ.js";
|
|
60
60
|
import "../chunk-LTJAMRGI.js";
|
|
61
|
-
import "../chunk-
|
|
61
|
+
import "../chunk-7AG54AF3.js";
|
|
62
62
|
import "../chunk-AWJ2FHCF.js";
|
|
63
63
|
import "../chunk-42JKGUFJ.js";
|
|
64
64
|
import "../chunk-RULE4VG5.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
2
|
import { VersioningConfig } from './page-versioning.js';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-DmTaqob2.js';
|
|
4
4
|
import './types-gb_SNtjR.js';
|
|
5
5
|
import './message-parts/index.js';
|
|
6
6
|
import './consolidation-operator.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageManager } from '../storage.js';
|
|
2
|
-
import { f as MemoryStatus, P as PluginConfig, M as MemoryCategory } from '../types-
|
|
2
|
+
import { f as MemoryStatus, P as PluginConfig, M as MemoryCategory } from '../types-DmTaqob2.js';
|
|
3
3
|
import { a as SemanticDedupLookup } from '../semantic-SLAa_prH.js';
|
|
4
4
|
import { LocalLlmClient } from '../local-llm.js';
|
|
5
5
|
import { FallbackLlmClient } from '../fallback-llm.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchBackend, SearchExecutionOptions } from '../search/port.js';
|
|
2
2
|
import { ConversationChunk } from './chunker.js';
|
|
3
3
|
import { C as ConversationSearchResult, F as FaissConversationIndexAdapter } from '../faiss-adapter-BHecI1fF.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-DmTaqob2.js';
|
|
5
5
|
import '../types-gb_SNtjR.js';
|
|
6
6
|
import '../message-parts/index.js';
|
|
7
7
|
import '../runtime/child-process.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './chunker.js';
|
|
2
2
|
export { b as FaissAdapterConfig, c as FaissAdapterError, F as FaissConversationIndexAdapter, d as FaissHealthResult, e as FaissInspectResult, f as failOpenFaissHealth, r as resolveDefaultFaissScriptPath } from '../faiss-adapter-BHecI1fF.js';
|
|
3
3
|
import '../runtime/child-process.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-DmTaqob2.js';
|
|
5
5
|
import '../types-gb_SNtjR.js';
|
|
6
6
|
import '../message-parts/index.js';
|
|
7
7
|
import '../search/port.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { F as FaissConversationIndexAdapter } from '../faiss-adapter-BHecI1fF.js';
|
|
2
2
|
import { ConversationChunk } from './chunker.js';
|
|
3
3
|
import '../search/port.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-DmTaqob2.js';
|
|
5
5
|
import '../types-gb_SNtjR.js';
|
|
6
6
|
import '../message-parts/index.js';
|
|
7
7
|
import '../runtime/child-process.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../search/port.js';
|
|
2
2
|
export { C as ConversationSearchResult, s as searchConversationIndex, a as searchConversationIndexFaissFailOpen } from '../faiss-adapter-BHecI1fF.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-DmTaqob2.js';
|
|
4
4
|
import '../types-gb_SNtjR.js';
|
|
5
5
|
import '../message-parts/index.js';
|
|
6
6
|
import './chunker.js';
|
package/dist/day-summary.d.ts
CHANGED
package/dist/delinearize.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MemoryFile, P as PluginConfig } from './types-
|
|
1
|
+
import { g as MemoryFile, P as PluginConfig } from './types-DmTaqob2.js';
|
|
2
2
|
import { TrustZoneName } from './trust-zones.js';
|
|
3
3
|
import { T as Taxonomy } from './types-DJhqDJUV.js';
|
|
4
4
|
import { DirectAnswerResult } from './direct-answer.js';
|
package/dist/direct-answer.d.ts
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
appendDreamsLedgerEntry,
|
|
3
|
+
dreamsLedgerPath,
|
|
4
|
+
getDreamsStatus,
|
|
5
|
+
normalizeDreamsStatusWindowHours,
|
|
6
|
+
readDreamsLedgerEntries,
|
|
7
|
+
recordDreamsPhaseRun,
|
|
8
|
+
runDreamsPhase,
|
|
9
|
+
summarizeGovernanceResultForDreams
|
|
10
|
+
} from "./chunk-YF6FMLBT.js";
|
|
11
|
+
import "./chunk-PZ5AY32C.js";
|
|
12
|
+
export {
|
|
13
|
+
appendDreamsLedgerEntry,
|
|
14
|
+
dreamsLedgerPath,
|
|
15
|
+
getDreamsStatus,
|
|
16
|
+
normalizeDreamsStatusWindowHours,
|
|
17
|
+
readDreamsLedgerEntries,
|
|
18
|
+
recordDreamsPhaseRun,
|
|
19
|
+
runDreamsPhase,
|
|
20
|
+
summarizeGovernanceResultForDreams
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=dreams-ledger-6UODQOX6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MemoryCategory, y as ImportanceLevel } from '../types-
|
|
1
|
+
import { M as MemoryCategory, y as ImportanceLevel } from '../types-DmTaqob2.js';
|
|
2
2
|
import { LoggerBackend } from '../logger.js';
|
|
3
3
|
import '../types-gb_SNtjR.js';
|
|
4
4
|
import '../message-parts/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
|
-
import { P as PluginConfig, T as TranscriptEntry } from './types-
|
|
2
|
+
import { P as PluginConfig, T as TranscriptEntry } from './types-DmTaqob2.js';
|
|
3
3
|
import './page-versioning.js';
|
|
4
4
|
import './consolidation-operator.js';
|
|
5
5
|
import './memory-projection-store.js';
|