@remnic/core 9.22.0 → 9.22.2
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-admin-ops-surface.d.ts +15 -12
- package/dist/access-admin-ops-surface.js +25 -24
- package/dist/access-audit.js +2 -2
- package/dist/access-boundary.d.ts +13 -10
- package/dist/access-boundary.js +25 -24
- package/dist/access-cli.js +84 -82
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +16 -9
- package/dist/access-http.js +33 -32
- package/dist/access-identity-continuity-surface.d.ts +9 -7
- package/dist/access-identity-continuity-surface.js +25 -24
- package/dist/access-lcm-surface.d.ts +12 -9
- package/dist/access-lcm-surface.js +25 -24
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +22 -10
- package/dist/access-mcp.js +31 -30
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-tmwQgCT6.d.ts → access-namespace-preflight-CmErR03h.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +25 -24
- package/dist/access-observe-write-surface.d.ts +12 -9
- package/dist/access-observe-write-surface.js +25 -24
- package/dist/access-operations-batch.js +27 -26
- package/dist/access-operations.d.ts +16 -13
- package/dist/access-operations.js +28 -27
- package/dist/access-recall-concurrency.d.ts +12 -9
- package/dist/access-recall-concurrency.js +25 -24
- package/dist/access-recall-response.d.ts +12 -9
- package/dist/access-recall-response.js +25 -24
- package/dist/access-recall-surface.d.ts +14 -11
- package/dist/access-recall-surface.js +25 -24
- package/dist/access-schema.d.ts +76 -76
- package/dist/{access-service-BtxW52vv.d.ts → access-service-CKEROeFP.d.ts} +22 -11
- package/dist/access-service.d.ts +13 -10
- package/dist/access-service.js +25 -24
- package/dist/access-surface-catalog.d.ts +12 -9
- package/dist/access-surface-catalog.js +6 -0
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +78 -0
- package/dist/access-wearables-meetings-surface.js +22 -0
- package/dist/access-wearables-meetings-surface.js.map +1 -0
- 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/active-recall.js +2 -2
- package/dist/{auto-sync-UPTUVE4X.js → auto-sync-5OE5QOZB.js} +3 -3
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -7
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +5 -5
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-iWvWz61I.d.ts → catalog-BFTVo2Ez.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +9 -9
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-GF22HWS2.js → chunk-2PHX3I5C.js} +7 -7
- package/dist/{chunk-JFDEYXF7.js → chunk-3NAHZQU3.js} +2 -2
- package/dist/{chunk-XBRPEGXF.js → chunk-3UOSVTFR.js} +5 -5
- package/dist/{chunk-TTKWTT72.js → chunk-3ZW6ZQO6.js} +3 -3
- package/dist/{chunk-UV72DEZD.js → chunk-4B77XSG5.js} +5 -5
- package/dist/{chunk-IC2TCZJ2.js → chunk-57QKLRBV.js} +3 -1
- package/dist/chunk-57QKLRBV.js.map +1 -0
- package/dist/{chunk-LMHDFOVV.js → chunk-5CPI2QWG.js} +3 -3
- package/dist/{chunk-P72WZMWQ.js → chunk-5FZQ74K5.js} +2 -2
- package/dist/{chunk-BRT7KEXU.js → chunk-6TWXQ4E2.js} +5 -5
- package/dist/{chunk-CV6ZYXK3.js → chunk-7I7AYIUQ.js} +3 -3
- package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
- package/dist/{chunk-MONWCSVL.js → chunk-7RAJ3GXO.js} +2 -1
- package/dist/chunk-7RAJ3GXO.js.map +1 -0
- package/dist/{chunk-SQEDDWAM.js → chunk-A2RFKL3V.js} +5 -34
- package/dist/chunk-A2RFKL3V.js.map +1 -0
- package/dist/{chunk-JN57HZCD.js → chunk-ATEAL5EI.js} +6 -6
- package/dist/{chunk-4PYLBXX6.js → chunk-AYAROCWD.js} +2 -2
- package/dist/chunk-BLDBT6HZ.js +39 -0
- package/dist/chunk-BLDBT6HZ.js.map +1 -0
- package/dist/{chunk-NB2P47N7.js → chunk-CUUY5CC4.js} +6 -6
- package/dist/{chunk-KL5Y6PEV.js → chunk-E3ZMFFQZ.js} +2 -2
- package/dist/{chunk-55FDQYPS.js → chunk-ES5IHQ6M.js} +2 -2
- package/dist/{chunk-N47ZWQBO.js → chunk-G2NSSQES.js} +2 -2
- package/dist/{chunk-GSWPU5CR.js → chunk-GD3QOBMB.js} +2 -2
- package/dist/{chunk-6ANPNUVL.js → chunk-IIXLB5E7.js} +58 -36
- package/dist/chunk-IIXLB5E7.js.map +1 -0
- package/dist/{chunk-SACPRJ7F.js → chunk-JNIJBXVK.js} +2 -2
- package/dist/{chunk-W3XT32W7.js → chunk-JVGUY2AU.js} +23 -13
- package/dist/chunk-JVGUY2AU.js.map +1 -0
- package/dist/{chunk-DGLON3AL.js → chunk-KNRG6ZGJ.js} +6 -6
- package/dist/{chunk-GEUDRENF.js → chunk-MMTG3SCJ.js} +2 -2
- package/dist/{chunk-WZFAPHIK.js → chunk-MU7ZHSZE.js} +2 -2
- package/dist/{chunk-W4FBGYGK.js → chunk-NRV4Y3PM.js} +1 -1
- package/dist/{chunk-QTO2FGBT.js → chunk-OUW4PAY4.js} +191 -117
- package/dist/chunk-OUW4PAY4.js.map +1 -0
- package/dist/{chunk-KQ2XCQYN.js → chunk-P2BLHUL2.js} +2 -2
- package/dist/{chunk-ACGGTPU4.js → chunk-QCKQEBIY.js} +17 -9
- package/dist/chunk-QCKQEBIY.js.map +1 -0
- package/dist/{chunk-6L775BUB.js → chunk-QE63OHLB.js} +2 -2
- package/dist/{chunk-ONHRRJZM.js → chunk-QJAQNXWI.js} +6 -6
- package/dist/{chunk-EQYBHXRR.js → chunk-ROUL7RZU.js} +385 -59
- package/dist/chunk-ROUL7RZU.js.map +1 -0
- package/dist/{chunk-N6M7MRVN.js → chunk-RT4TSR2C.js} +9034 -8726
- package/dist/chunk-RT4TSR2C.js.map +1 -0
- package/dist/{chunk-6NZ7U4R4.js → chunk-SCOT5DTA.js} +1 -1
- package/dist/chunk-SCOT5DTA.js.map +1 -0
- package/dist/{chunk-6RYWNBSA.js → chunk-SVZGA2MK.js} +2 -2
- package/dist/chunk-SYOIVK7K.js +63 -0
- package/dist/chunk-SYOIVK7K.js.map +1 -0
- package/dist/{chunk-DM5A4ZFL.js → chunk-TWCOYET2.js} +11 -1
- package/dist/chunk-TWCOYET2.js.map +1 -0
- package/dist/{chunk-7S5OMI76.js → chunk-WS32QRLO.js} +109 -44
- package/dist/chunk-WS32QRLO.js.map +1 -0
- package/dist/{chunk-OCMLGND7.js → chunk-WWZ35GWW.js} +5 -5
- package/dist/{chunk-QMGIQUBG.js → chunk-XWPFZX6S.js} +503 -139
- package/dist/chunk-XWPFZX6S.js.map +1 -0
- package/dist/{chunk-A5N6ISRK.js → chunk-ZN4UZWMT.js} +2 -2
- package/dist/{chunk-7M6APKJL.js → chunk-ZYU7ZFLT.js} +2 -2
- package/dist/{cli-D9vXgWwM.d.ts → cli-BrwT9YMD.d.ts} +5 -5
- package/dist/cli.d.ts +14 -11
- package/dist/cli.js +57 -56
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +5 -5
- 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/config.js +2 -2
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +5 -5
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +5 -5
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +2 -2
- 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/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +5 -5
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -7
- package/dist/extraction-error-classification.d.ts +22 -0
- package/dist/extraction-error-classification.js +11 -0
- package/dist/extraction-error-classification.js.map +1 -0
- 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 +3 -17
- package/dist/extraction.js +5 -3
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-LEXL3XYL.js → first-start-migration-BKNGOFED.js} +4 -4
- 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-reinforcement.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/index.d.ts +713 -923
- package/dist/index.js +176 -140
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +11 -11
- 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 +6 -6
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +5 -5
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +7 -7
- package/dist/maintenance-C98njYb8.d.ts +366 -0
- package/dist/mcp-memory-inspector-app.d.ts +12 -9
- package/dist/mcp-read-only-tools.js +1 -1
- 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 +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +12 -12
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +6 -6
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +5 -5
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +2 -2
- package/dist/operator-toolkit.js +18 -18
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +6 -223
- package/dist/orchestration/maintenance.js +12 -12
- package/dist/{orchestrator-DB93S48I.d.ts → orchestrator-C9ZVppNh.d.ts} +12 -481
- package/dist/orchestrator.d.ts +10 -8
- package/dist/orchestrator.js +84 -82
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-DmGc-H66.d.ts → pipeline-id_-sqYm.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{qmd-cJT0crkF.d.ts → qmd-R6XaQOZK.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/qmd.js +4 -4
- package/dist/recall-concurrency-config.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-memory-map.d.ts +1 -1
- 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-timings.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/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +4 -4
- package/dist/retrieval-agents.d.ts +2 -2
- 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/salvage-envelope.d.ts +1 -1
- package/dist/schemas.d.ts +76 -76
- package/dist/{scope-profiles-KG2nODX7.d.ts → scope-profiles-EhyuAKkd.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +5 -5
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +9 -9
- 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-BaZlg0D8.d.ts → semantic-consolidation-B2xo26UQ.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +7 -7
- package/dist/semantic-rule-promotion.js +5 -5
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +6 -6
- package/dist/service-DgFWlZ-r.d.ts +835 -0
- 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 +9 -9
- package/dist/signal.d.ts +1 -1
- package/dist/{storage-BKhHHnRo.d.ts → storage-XGawwqXE.d.ts} +131 -2
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +4 -4
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.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 +2 -2
- 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 +66 -66
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-GBQZuT7l.d.ts → types-Bbs0qz6b.d.ts} +2 -3
- 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 +6 -6
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-boundary.ts +3 -0
- package/src/access-http.test.ts +63 -0
- package/src/access-http.ts +26 -37
- package/src/access-mcp-output-schemas.ts +10 -0
- package/src/access-mcp.ts +4 -121
- package/src/access-operations-batch.ts +10 -5
- package/src/access-service.ts +43 -46
- package/src/access-surface-catalog.ts +6 -0
- package/src/access-wearables-meetings-surface.ts +139 -0
- package/src/activity/digest.ts +1 -1
- package/src/activity/runner.test.ts +37 -0
- package/src/activity/runner.ts +12 -0
- package/src/activity/scheduler.test.ts +1 -0
- package/src/activity/sync-registration.ts +13 -0
- package/src/cli/meetings-commands.ts +70 -0
- package/src/cli.ts +7 -6
- package/src/extraction-error-classification.ts +52 -0
- package/src/extraction.ts +2 -50
- package/src/mcp-read-only-tools.ts +2 -0
- package/src/meetings/build-memory.test.ts +364 -0
- package/src/meetings/build-scheduler.test.ts +55 -0
- package/src/meetings/build-scheduler.ts +96 -0
- package/src/meetings/day-source.test.ts +275 -0
- package/src/meetings/day-source.ts +352 -0
- package/src/meetings/http-glue.ts +126 -0
- package/src/meetings/index.ts +5 -4
- package/src/meetings/manual-sync-flush.test.ts +72 -0
- package/src/meetings/mcp-tools.ts +65 -0
- package/src/meetings/memory-gen.test.ts +498 -0
- package/src/meetings/memory-gen.ts +549 -0
- package/src/meetings/memory-generator.ts +5 -0
- package/src/meetings/namespace-isolation.test.ts +159 -0
- package/src/meetings/service.test.ts +195 -0
- package/src/meetings/service.ts +157 -0
- package/src/meetings/summary-extractor.test.ts +287 -0
- package/src/meetings/summary-extractor.ts +264 -0
- package/src/orchestration/maintenance.ts +8 -0
- package/src/orchestration/orchestrator-init.ts +6 -1
- package/src/orchestration/workspace-ops.ts +172 -8
- package/src/orchestrator.ts +12 -13
- package/src/storage.ts +21 -0
- package/src/testing/subjects/meetings-namespace-harness.ts +159 -0
- package/src/testing/subjects/meetings-namespace.test.ts +93 -0
- package/src/types.ts +1 -2
- package/src/wearables/cli.ts +2 -1
- package/src/wearables/index.ts +1 -0
- package/src/wearables/mcp-tools.ts +143 -0
- package/src/wearables/registry.test.ts +11 -0
- package/src/wearables/registry.ts +13 -0
- package/src/wearables/service.test.ts +62 -1
- package/src/wearables/service.ts +30 -2
- package/src/wearables/transcript-search-namespace-isolation.test.ts +98 -0
- package/dist/chunk-6ANPNUVL.js.map +0 -1
- package/dist/chunk-6NZ7U4R4.js.map +0 -1
- package/dist/chunk-7S5OMI76.js.map +0 -1
- package/dist/chunk-ACGGTPU4.js.map +0 -1
- package/dist/chunk-DM5A4ZFL.js.map +0 -1
- package/dist/chunk-EQYBHXRR.js.map +0 -1
- package/dist/chunk-IC2TCZJ2.js.map +0 -1
- package/dist/chunk-MONWCSVL.js.map +0 -1
- package/dist/chunk-N6M7MRVN.js.map +0 -1
- package/dist/chunk-QMGIQUBG.js.map +0 -1
- package/dist/chunk-QTO2FGBT.js.map +0 -1
- package/dist/chunk-SQEDDWAM.js.map +0 -1
- package/dist/chunk-W3XT32W7.js.map +0 -1
- /package/dist/{auto-sync-UPTUVE4X.js.map → auto-sync-5OE5QOZB.js.map} +0 -0
- /package/dist/{chunk-GF22HWS2.js.map → chunk-2PHX3I5C.js.map} +0 -0
- /package/dist/{chunk-JFDEYXF7.js.map → chunk-3NAHZQU3.js.map} +0 -0
- /package/dist/{chunk-XBRPEGXF.js.map → chunk-3UOSVTFR.js.map} +0 -0
- /package/dist/{chunk-TTKWTT72.js.map → chunk-3ZW6ZQO6.js.map} +0 -0
- /package/dist/{chunk-UV72DEZD.js.map → chunk-4B77XSG5.js.map} +0 -0
- /package/dist/{chunk-LMHDFOVV.js.map → chunk-5CPI2QWG.js.map} +0 -0
- /package/dist/{chunk-P72WZMWQ.js.map → chunk-5FZQ74K5.js.map} +0 -0
- /package/dist/{chunk-BRT7KEXU.js.map → chunk-6TWXQ4E2.js.map} +0 -0
- /package/dist/{chunk-CV6ZYXK3.js.map → chunk-7I7AYIUQ.js.map} +0 -0
- /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
- /package/dist/{chunk-JN57HZCD.js.map → chunk-ATEAL5EI.js.map} +0 -0
- /package/dist/{chunk-4PYLBXX6.js.map → chunk-AYAROCWD.js.map} +0 -0
- /package/dist/{chunk-NB2P47N7.js.map → chunk-CUUY5CC4.js.map} +0 -0
- /package/dist/{chunk-KL5Y6PEV.js.map → chunk-E3ZMFFQZ.js.map} +0 -0
- /package/dist/{chunk-55FDQYPS.js.map → chunk-ES5IHQ6M.js.map} +0 -0
- /package/dist/{chunk-N47ZWQBO.js.map → chunk-G2NSSQES.js.map} +0 -0
- /package/dist/{chunk-GSWPU5CR.js.map → chunk-GD3QOBMB.js.map} +0 -0
- /package/dist/{chunk-SACPRJ7F.js.map → chunk-JNIJBXVK.js.map} +0 -0
- /package/dist/{chunk-DGLON3AL.js.map → chunk-KNRG6ZGJ.js.map} +0 -0
- /package/dist/{chunk-GEUDRENF.js.map → chunk-MMTG3SCJ.js.map} +0 -0
- /package/dist/{chunk-WZFAPHIK.js.map → chunk-MU7ZHSZE.js.map} +0 -0
- /package/dist/{chunk-W4FBGYGK.js.map → chunk-NRV4Y3PM.js.map} +0 -0
- /package/dist/{chunk-KQ2XCQYN.js.map → chunk-P2BLHUL2.js.map} +0 -0
- /package/dist/{chunk-6L775BUB.js.map → chunk-QE63OHLB.js.map} +0 -0
- /package/dist/{chunk-ONHRRJZM.js.map → chunk-QJAQNXWI.js.map} +0 -0
- /package/dist/{chunk-6RYWNBSA.js.map → chunk-SVZGA2MK.js.map} +0 -0
- /package/dist/{chunk-OCMLGND7.js.map → chunk-WWZ35GWW.js.map} +0 -0
- /package/dist/{chunk-A5N6ISRK.js.map → chunk-ZN4UZWMT.js.map} +0 -0
- /package/dist/{chunk-7M6APKJL.js.map → chunk-ZYU7ZFLT.js.map} +0 -0
- /package/dist/{first-start-migration-LEXL3XYL.js.map → first-start-migration-BKNGOFED.js.map} +0 -0
package/dist/intent.d.ts
CHANGED
package/dist/lcm/engine.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LcmStructuredRecallMatch } from './archive.js';
|
|
|
2
2
|
import { SummarizeFn } from './summarizer.js';
|
|
3
3
|
import { LcmRecallWithTraceResult } from './recall.js';
|
|
4
4
|
import { LcmObserveMessage } from './queue.js';
|
|
5
|
-
import { P as PluginConfig } from '../types-
|
|
5
|
+
import { P as PluginConfig } from '../types-Bbs0qz6b.js';
|
|
6
6
|
import 'better-sqlite3';
|
|
7
7
|
import '../message-parts/index.js';
|
|
8
8
|
import './dag.js';
|
package/dist/lcm/engine.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LcmEngine,
|
|
3
3
|
extractLcmConfig
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2PHX3I5C.js";
|
|
5
|
+
import "../chunk-PBGWYM3H.js";
|
|
6
|
+
import "../chunk-LTAVSOZW.js";
|
|
5
7
|
import "../chunk-7N4KAIGN.js";
|
|
6
8
|
import "../chunk-TPDBFYEG.js";
|
|
7
9
|
import "../chunk-UXPUUL3G.js";
|
|
8
10
|
import "../chunk-DDA47TES.js";
|
|
9
|
-
import "../chunk-PBGWYM3H.js";
|
|
10
|
-
import "../chunk-LTAVSOZW.js";
|
|
11
11
|
import "../chunk-4RA3C3EV.js";
|
|
12
12
|
import "../chunk-AQEJKOKI.js";
|
|
13
13
|
import "../chunk-RL6NEVXT.js";
|
package/dist/lcm/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { registerLcmTools } from './tools.js';
|
|
|
7
7
|
export { ensureLcmStateDir, openLcmDatabase } from './schema.js';
|
|
8
8
|
import './queue.js';
|
|
9
9
|
import '../message-parts/index.js';
|
|
10
|
-
import '../types-
|
|
10
|
+
import '../types-Bbs0qz6b.js';
|
|
11
11
|
import '../bounded-jsonl-state.js';
|
|
12
12
|
import '../types-continuity.js';
|
|
13
13
|
import 'better-sqlite3';
|
package/dist/lcm/index.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import "../chunk-VDC6RZI4.js";
|
|
2
|
+
import {
|
|
3
|
+
registerLcmTools
|
|
4
|
+
} from "../chunk-UWK5OXUJ.js";
|
|
2
5
|
import {
|
|
3
6
|
LcmEngine,
|
|
4
7
|
extractLcmConfig
|
|
5
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-2PHX3I5C.js";
|
|
9
|
+
import {
|
|
10
|
+
LcmSummarizer
|
|
11
|
+
} from "../chunk-PBGWYM3H.js";
|
|
12
|
+
import {
|
|
13
|
+
LcmArchive,
|
|
14
|
+
estimateTokens
|
|
15
|
+
} from "../chunk-LTAVSOZW.js";
|
|
6
16
|
import {
|
|
7
17
|
LcmDag
|
|
8
18
|
} from "../chunk-7N4KAIGN.js";
|
|
@@ -15,16 +25,6 @@ import {
|
|
|
15
25
|
ensureLcmStateDir,
|
|
16
26
|
openLcmDatabase
|
|
17
27
|
} from "../chunk-DDA47TES.js";
|
|
18
|
-
import {
|
|
19
|
-
LcmSummarizer
|
|
20
|
-
} from "../chunk-PBGWYM3H.js";
|
|
21
|
-
import {
|
|
22
|
-
registerLcmTools
|
|
23
|
-
} from "../chunk-UWK5OXUJ.js";
|
|
24
|
-
import {
|
|
25
|
-
LcmArchive,
|
|
26
|
-
estimateTokens
|
|
27
|
-
} from "../chunk-LTAVSOZW.js";
|
|
28
28
|
import "../chunk-4RA3C3EV.js";
|
|
29
29
|
import "../chunk-AQEJKOKI.js";
|
|
30
30
|
import {
|
package/dist/lcm/tools.d.ts
CHANGED
package/dist/lifecycle.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as LifecycleState, w as MemoryCategory, M as MemoryFile, o as MemoryFrontmatter } from './types-Bbs0qz6b.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
3
|
import './bounded-jsonl-state.js';
|
|
4
4
|
import './types-continuity.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as LiveConnector, C as ConnectorConfig, a as ConnectorDocument } from './framework-CNDn2164.js';
|
|
2
|
-
import { L as LiveConnectorsConfig } from './types-
|
|
2
|
+
import { L as LiveConnectorsConfig } from './types-Bbs0qz6b.js';
|
|
3
3
|
import './message-parts/index.js';
|
|
4
4
|
import './bounded-jsonl-state.js';
|
|
5
5
|
import './types-continuity.js';
|
package/dist/local-llm.d.ts
CHANGED
|
@@ -7,16 +7,17 @@ import {
|
|
|
7
7
|
readMemoryGovernanceRunArtifact,
|
|
8
8
|
restoreMemoryGovernanceRun,
|
|
9
9
|
runMemoryGovernance
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-6TWXQ4E2.js";
|
|
11
|
+
import "../chunk-TBBDFYXW.js";
|
|
12
|
+
import "../chunk-XWPFZX6S.js";
|
|
13
13
|
import "../chunk-2QMKMVHH.js";
|
|
14
|
+
import "../chunk-UHVXE24Y.js";
|
|
14
15
|
import "../chunk-DEBHXHJR.js";
|
|
15
16
|
import "../chunk-DNHVPZOD.js";
|
|
16
17
|
import "../chunk-6CIAGZ6X.js";
|
|
17
18
|
import "../chunk-J6A3CX5N.js";
|
|
18
19
|
import "../chunk-HKF5VASQ.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-SCOT5DTA.js";
|
|
20
21
|
import "../chunk-XKGPIWGI.js";
|
|
21
22
|
import "../chunk-EGGE52UU.js";
|
|
22
23
|
import "../chunk-GCASGYIO.js";
|
|
@@ -25,8 +26,8 @@ import "../chunk-ILGC6JH6.js";
|
|
|
25
26
|
import "../chunk-SCU65EZI.js";
|
|
26
27
|
import "../chunk-3CSX3ETE.js";
|
|
27
28
|
import "../chunk-RL6NEVXT.js";
|
|
28
|
-
import "../chunk-DM2T26WE.js";
|
|
29
29
|
import "../chunk-LDXUBPMO.js";
|
|
30
|
+
import "../chunk-DM2T26WE.js";
|
|
30
31
|
import "../chunk-JYIJNNN3.js";
|
|
31
32
|
import "../chunk-AAD2ZS6P.js";
|
|
32
33
|
import "../chunk-CGASUJVP.js";
|
|
@@ -57,7 +58,6 @@ import "../chunk-JUC24CTX.js";
|
|
|
57
58
|
import "../chunk-P7FMDTKL.js";
|
|
58
59
|
import "../chunk-6MKAMLQL.js";
|
|
59
60
|
import "../chunk-JAKIDQB2.js";
|
|
60
|
-
import "../chunk-TBBDFYXW.js";
|
|
61
61
|
import "../chunk-RDQGLJRR.js";
|
|
62
62
|
import "../chunk-FF4KLI5W.js";
|
|
63
63
|
import "../chunk-AIK5W3IW.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageManager } from '../storage-
|
|
2
|
-
import { z as MemoryLifecycleEvent } from '../types-
|
|
1
|
+
import { S as StorageManager } from '../storage-XGawwqXE.js';
|
|
2
|
+
import { z as MemoryLifecycleEvent } from '../types-Bbs0qz6b.js';
|
|
3
3
|
import { HeldFileLockOptions } from '../utils/serialize-mutations.js';
|
|
4
4
|
import '../page-versioning.js';
|
|
5
5
|
import '../consolidation-operator.js';
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
backupExistingLedger,
|
|
3
3
|
boundLifecycleEventsToByteCap,
|
|
4
4
|
rebuildMemoryLifecycleLedger
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-ES5IHQ6M.js";
|
|
6
6
|
import "../chunk-KJTKLXTH.js";
|
|
7
7
|
import "../chunk-R6YJI3HE.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-UHVXE24Y.js";
|
|
8
|
+
import "../chunk-XWPFZX6S.js";
|
|
10
9
|
import "../chunk-2QMKMVHH.js";
|
|
10
|
+
import "../chunk-UHVXE24Y.js";
|
|
11
11
|
import "../chunk-DEBHXHJR.js";
|
|
12
12
|
import "../chunk-DNHVPZOD.js";
|
|
13
13
|
import "../chunk-6CIAGZ6X.js";
|
|
14
14
|
import "../chunk-J6A3CX5N.js";
|
|
15
15
|
import "../chunk-HKF5VASQ.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-SCOT5DTA.js";
|
|
17
17
|
import "../chunk-XKGPIWGI.js";
|
|
18
18
|
import "../chunk-EGGE52UU.js";
|
|
19
19
|
import "../chunk-GCASGYIO.js";
|
|
@@ -22,8 +22,8 @@ import "../chunk-ILGC6JH6.js";
|
|
|
22
22
|
import "../chunk-SCU65EZI.js";
|
|
23
23
|
import "../chunk-3CSX3ETE.js";
|
|
24
24
|
import "../chunk-RL6NEVXT.js";
|
|
25
|
-
import "../chunk-DM2T26WE.js";
|
|
26
25
|
import "../chunk-LDXUBPMO.js";
|
|
26
|
+
import "../chunk-DM2T26WE.js";
|
|
27
27
|
import "../chunk-JYIJNNN3.js";
|
|
28
28
|
import "../chunk-AAD2ZS6P.js";
|
|
29
29
|
import "../chunk-CGASUJVP.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageManager } from '../storage-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { S as StorageManager } from '../storage-XGawwqXE.js';
|
|
2
|
+
import '../types-Bbs0qz6b.js';
|
|
3
3
|
import '../message-parts/index.js';
|
|
4
4
|
import '../bounded-jsonl-state.js';
|
|
5
5
|
import '../types-continuity.js';
|
|
@@ -3,20 +3,21 @@ import {
|
|
|
3
3
|
rebuildMemoryProjection,
|
|
4
4
|
repairMemoryProjection,
|
|
5
5
|
verifyMemoryProjection
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-3ZW6ZQO6.js";
|
|
7
7
|
import "../chunk-KJTKLXTH.js";
|
|
8
8
|
import "../chunk-2DQ2XREU.js";
|
|
9
9
|
import "../chunk-R6YJI3HE.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-6TWXQ4E2.js";
|
|
11
|
+
import "../chunk-TBBDFYXW.js";
|
|
12
|
+
import "../chunk-XWPFZX6S.js";
|
|
13
13
|
import "../chunk-2QMKMVHH.js";
|
|
14
|
+
import "../chunk-UHVXE24Y.js";
|
|
14
15
|
import "../chunk-DEBHXHJR.js";
|
|
15
16
|
import "../chunk-DNHVPZOD.js";
|
|
16
17
|
import "../chunk-6CIAGZ6X.js";
|
|
17
18
|
import "../chunk-J6A3CX5N.js";
|
|
18
19
|
import "../chunk-HKF5VASQ.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-SCOT5DTA.js";
|
|
20
21
|
import "../chunk-XKGPIWGI.js";
|
|
21
22
|
import "../chunk-EGGE52UU.js";
|
|
22
23
|
import "../chunk-GCASGYIO.js";
|
|
@@ -25,8 +26,8 @@ import "../chunk-ILGC6JH6.js";
|
|
|
25
26
|
import "../chunk-SCU65EZI.js";
|
|
26
27
|
import "../chunk-3CSX3ETE.js";
|
|
27
28
|
import "../chunk-RL6NEVXT.js";
|
|
28
|
-
import "../chunk-DM2T26WE.js";
|
|
29
29
|
import "../chunk-LDXUBPMO.js";
|
|
30
|
+
import "../chunk-DM2T26WE.js";
|
|
30
31
|
import "../chunk-JYIJNNN3.js";
|
|
31
32
|
import "../chunk-AAD2ZS6P.js";
|
|
32
33
|
import "../chunk-CGASUJVP.js";
|
|
@@ -57,7 +58,6 @@ import "../chunk-JUC24CTX.js";
|
|
|
57
58
|
import "../chunk-P7FMDTKL.js";
|
|
58
59
|
import "../chunk-6MKAMLQL.js";
|
|
59
60
|
import "../chunk-JAKIDQB2.js";
|
|
60
|
-
import "../chunk-TBBDFYXW.js";
|
|
61
61
|
import "../chunk-RDQGLJRR.js";
|
|
62
62
|
import "../chunk-FF4KLI5W.js";
|
|
63
63
|
import "../chunk-AIK5W3IW.js";
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { au as ActivitySnapshot, av as ActivityConfig, aw as ActivitySourceConfig, ax as ActivitySourceClient, P as PluginConfig } from './types-Bbs0qz6b.js';
|
|
2
|
+
import { SearchBackend } from './search/port.js';
|
|
3
|
+
import { S as StorageManager } from './storage-XGawwqXE.js';
|
|
4
|
+
import { N as NamespaceCatalog } from './catalog-BFTVo2Ez.js';
|
|
5
|
+
import { NamespaceSearchRouter } from './namespaces/search.js';
|
|
6
|
+
import { BetterSqlite3Database } from './runtime/better-sqlite.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Screen-activity SQLite store (issue #1899).
|
|
10
|
+
*
|
|
11
|
+
* Durable, capture-machine-agnostic store for on-screen text snapshots plus a
|
|
12
|
+
* per-machine sync cursor. Mirrors the LCM store conventions
|
|
13
|
+
* (packages/remnic-core/src/lcm/schema.ts): WAL, a `<name>_meta` schema-version
|
|
14
|
+
* row, `CREATE TABLE IF NOT EXISTS`, and an FTS5 virtual table created
|
|
15
|
+
* separately. better-sqlite3 is synchronous.
|
|
16
|
+
*
|
|
17
|
+
* Snapshots dedup on `(machine, content_hash)` so a re-sync is idempotent, and
|
|
18
|
+
* day queries use half-open [start, end) UTC bounds (AGENTS.md §23).
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
declare function activityDatabasePath(memoryDir: string): string;
|
|
22
|
+
declare function ensureActivityStateDir(memoryDir: string): Promise<void>;
|
|
23
|
+
declare function openActivityDatabase(memoryDir: string): BetterSqlite3Database;
|
|
24
|
+
/** Apply the activity schema on an already-open handle (test/in-memory use). */
|
|
25
|
+
declare function applyActivitySchema(db: BetterSqlite3Database): void;
|
|
26
|
+
declare class ActivityStore {
|
|
27
|
+
private readonly db;
|
|
28
|
+
constructor(db: BetterSqlite3Database);
|
|
29
|
+
static open(memoryDir: string): ActivityStore;
|
|
30
|
+
/**
|
|
31
|
+
* Insert a snapshot, idempotent on (machine, captured_at_utc, content_hash):
|
|
32
|
+
* the same screen content recurring at a *different* time is kept; only an
|
|
33
|
+
* exact re-ingestion of the same capture dedups. Returns `inserted: false`
|
|
34
|
+
* for a duplicate. The FTS row is written only on a real insert (atomically),
|
|
35
|
+
* so it never drifts from the base table.
|
|
36
|
+
*/
|
|
37
|
+
insertSnapshot(snapshot: ActivitySnapshot): {
|
|
38
|
+
inserted: boolean;
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
/** Snapshots whose capture instant is in the half-open [start, end) window. */
|
|
42
|
+
listSnapshotsForDay(machine: string | null, startUtcInclusive: string, endUtcExclusive: string): ActivitySnapshot[];
|
|
43
|
+
getCursor(machine: string): string | null;
|
|
44
|
+
setCursor(machine: string, cursor: string | null, updatedAtUtc?: string): void;
|
|
45
|
+
/** Full-text search over snapshot text/app/window/url; newest first. */
|
|
46
|
+
searchSnapshots(query: string, limit: number): ActivitySnapshot[];
|
|
47
|
+
/** Retention: drop snapshots captured strictly before `cutoffUtc`. */
|
|
48
|
+
pruneOlderThan(cutoffUtc: string): number;
|
|
49
|
+
close(): void;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Host-agnostic activity sync runner (issue #1900).
|
|
54
|
+
*
|
|
55
|
+
* Bridges parsed `config.activity` to the durable sync pipeline: the parser
|
|
56
|
+
* (config.ts) validates settings but never contacts a daemon, and
|
|
57
|
+
* `syncActivitySource` (pipeline.ts) syncs one source for one day. This runner
|
|
58
|
+
* is the missing middle — it instantiates one `ActivityHttpSourceClient` per
|
|
59
|
+
* configured source from the parsed config and drives a sync across the
|
|
60
|
+
* `syncDays` local-day window, but ONLY when the feature is enabled.
|
|
61
|
+
*
|
|
62
|
+
* The feature is master default-off: source config alone never starts a sync.
|
|
63
|
+
* When `config.enabled` is false the runner opens no store, builds no client,
|
|
64
|
+
* and makes no HTTP call or write — it returns a disabled summary. This mirrors
|
|
65
|
+
* `runLiveConnectorsOnce`'s disabled-vs-result reporting so a host scheduler
|
|
66
|
+
* (CLI, cron) can trigger it through the runtime with no OpenClaw imports.
|
|
67
|
+
*
|
|
68
|
+
* Cursor semantics are delegated wholesale to `syncActivitySource`: the
|
|
69
|
+
* per-machine cursor advances only after every page and the digest are durable,
|
|
70
|
+
* so a runtime failure (or an aborted stop) leaves the cursor unadvanced and a
|
|
71
|
+
* restart resumes from the persisted position. A per-source failure is captured
|
|
72
|
+
* as an error item and never aborts the other sources or the host flow.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
type ActivityNow = Date | (() => Date);
|
|
76
|
+
/** One configured source's aggregate result across the synced day window. */
|
|
77
|
+
interface ActivitySourceRunItem {
|
|
78
|
+
machineLabel: string;
|
|
79
|
+
/** True when at least one day synced durably (no error). */
|
|
80
|
+
ran: boolean;
|
|
81
|
+
fetched: number;
|
|
82
|
+
inserted: number;
|
|
83
|
+
duplicates: number;
|
|
84
|
+
digestsWritten: number;
|
|
85
|
+
/** Persisted cursor after the run; unadvanced from prior on failure. */
|
|
86
|
+
cursor: string | null;
|
|
87
|
+
/** Set when the source failed; distinguishes a fault from an empty page. */
|
|
88
|
+
error?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Set when a durable day synced but its post-digest search reindex failed.
|
|
91
|
+
* The rows/digest/cursor are committed; the index is stale until the next
|
|
92
|
+
* refresh, so this is a signal (not a sync failure) for the scheduler.
|
|
93
|
+
*/
|
|
94
|
+
reindexError?: string;
|
|
95
|
+
}
|
|
96
|
+
interface ActivitySyncRunSummary {
|
|
97
|
+
ranAt: string;
|
|
98
|
+
/** False means the feature is off: no client built, no HTTP, no write. */
|
|
99
|
+
enabled: boolean;
|
|
100
|
+
ranCount: number;
|
|
101
|
+
errorCount: number;
|
|
102
|
+
/** Sources whose durable sync succeeded but whose search reindex failed. */
|
|
103
|
+
reindexErrorCount: number;
|
|
104
|
+
totalInserted: number;
|
|
105
|
+
results: ActivitySourceRunItem[];
|
|
106
|
+
/**
|
|
107
|
+
* Local dates (YYYY-MM-DD, in the sync timezone) that gained new snapshots
|
|
108
|
+
* this run — a backfill/rolling window can touch several. Meetings rebuild
|
|
109
|
+
* uses this so a change to an OLDER day rebuilds that day, not just today.
|
|
110
|
+
*/
|
|
111
|
+
touchedDates: string[];
|
|
112
|
+
}
|
|
113
|
+
interface ActivitySyncRunOptions {
|
|
114
|
+
config: ActivityConfig;
|
|
115
|
+
memoryDir: string;
|
|
116
|
+
/** Injectable store; opened from memoryDir when omitted (and closed here). */
|
|
117
|
+
store?: ActivityStore;
|
|
118
|
+
/** Clock injection for deterministic day-window resolution in tests. */
|
|
119
|
+
now?: ActivityNow;
|
|
120
|
+
/** Abort a run in flight (stop); an aborted source leaves its cursor intact. */
|
|
121
|
+
signal?: AbortSignal;
|
|
122
|
+
/** Injectable client factory; builds an ActivityHttpSourceClient by default. */
|
|
123
|
+
createSourceClient?: (source: ActivitySourceConfig) => ActivitySourceClient;
|
|
124
|
+
/**
|
|
125
|
+
* Search-index refresh forwarded to each source sync as `afterWrites`, run
|
|
126
|
+
* after a digest is (re)written so it becomes discoverable (rule 31).
|
|
127
|
+
* Host wires the core index seam (SearchBackend.update); best-effort.
|
|
128
|
+
*/
|
|
129
|
+
reindexSearch?: (signal?: AbortSignal) => Promise<void>;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The local-day window to sync, oldest first: today back `syncDays` calendar
|
|
133
|
+
* days in the configured timezone. Walking by calendar days (not fixed 24h
|
|
134
|
+
* intervals) keeps the window correct across DST transitions.
|
|
135
|
+
*/
|
|
136
|
+
declare function resolveActivitySyncDates(syncDays: number, timezone: string, now: Date): string[];
|
|
137
|
+
/**
|
|
138
|
+
* Run one activity sync pass across every configured source. Disabled config
|
|
139
|
+
* short-circuits before any store/client/HTTP work; an enabled config syncs
|
|
140
|
+
* each source across the `syncDays` window and isolates per-source faults.
|
|
141
|
+
*/
|
|
142
|
+
declare function runActivitySyncOnce(options: ActivitySyncRunOptions): Promise<ActivitySyncRunSummary>;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Maintenance scheduler — extracted from the orchestrator (issue #1526 PR1).
|
|
146
|
+
*
|
|
147
|
+
* Owns the WHEN of memory maintenance:
|
|
148
|
+
* - cron auto-registration (writes jobs.json entries the OpenClaw cron
|
|
149
|
+
* daemon picks up)
|
|
150
|
+
* - debounced + singleflight QMD index maintenance (re-index + embed
|
|
151
|
+
* after writes)
|
|
152
|
+
* - consolidation scheduling trigger (count + interval gated)
|
|
153
|
+
*
|
|
154
|
+
* Does NOT own the WHAT — the actual job runners (runSemanticConsolidation,
|
|
155
|
+
* runPatternReinforcement, runDeepSleepGovernanceNow, runConsolidation)
|
|
156
|
+
* remain on the orchestrator because they need the full LLM + extraction
|
|
157
|
+
* dependency surface. The scheduler invokes consolidation through a
|
|
158
|
+
* callback so the orchestrator stays the source of truth for that work.
|
|
159
|
+
*
|
|
160
|
+
* Behavior-preserving move from orchestrator.ts. No logic changes — the
|
|
161
|
+
* orchestrator keeps thin delegating methods so existing tests that stub
|
|
162
|
+
* `orchestrator.requestQmdMaintenance` etc. continue to work.
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/** Dependencies injected by the orchestrator. All stable references. */
|
|
166
|
+
interface MaintenanceSchedulerDeps {
|
|
167
|
+
config: PluginConfig;
|
|
168
|
+
/** Live accessor — the orchestrator can reassign its qmd backend after
|
|
169
|
+
* construction (e.g. swap to NoopSearchBackend when the collection is
|
|
170
|
+
* missing), and the scheduler must always observe the current backend. */
|
|
171
|
+
getQmd: () => SearchBackend;
|
|
172
|
+
namespaceSearchRouter: NamespaceSearchRouter;
|
|
173
|
+
namespaceCatalog: NamespaceCatalog;
|
|
174
|
+
/**
|
|
175
|
+
* Root storage (secure-store configured). Threaded so lifecycle-ledger
|
|
176
|
+
* auto-compaction (#1910) rebuilds through the live secure context: encrypted
|
|
177
|
+
* memories stay decryptable and the rewritten ledger stays encrypted at rest.
|
|
178
|
+
* Omitted in focused tests, where compaction falls back to a fresh plaintext
|
|
179
|
+
* StorageManager (the CLI-equivalent path).
|
|
180
|
+
*/
|
|
181
|
+
getStorage?: () => StorageManager;
|
|
182
|
+
/**
|
|
183
|
+
* Resolve a namespace's (secure-store aware) storage. Threaded so
|
|
184
|
+
* auto-compaction also bounds per-namespace lifecycle ledgers under
|
|
185
|
+
* `memoryDir/namespaces/<token>/state/`, not just the root state path
|
|
186
|
+
* (#1910). Consulted only when namespaces are enabled.
|
|
187
|
+
*/
|
|
188
|
+
storageForNamespace?: (namespace: string) => Promise<StorageManager>;
|
|
189
|
+
/**
|
|
190
|
+
* Tail step (issue #1900): observe a durable activity sync tick so the
|
|
191
|
+
* meetings builder can rebuild the affected day(s). Optional; omitted by
|
|
192
|
+
* hosts that do not build meetings.
|
|
193
|
+
*/
|
|
194
|
+
onActivitySynced?: (summary: ActivitySyncRunSummary) => void;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Schedules and debounces memory maintenance work. Owns the cadence +
|
|
198
|
+
* singleflight state that previously lived as private orchestrator fields.
|
|
199
|
+
*
|
|
200
|
+
* The orchestrator constructs one instance in its constructor and delegates
|
|
201
|
+
* the public scheduling entrypoints to it. Job execution stays on the
|
|
202
|
+
* orchestrator (LLM-heavy) and is invoked through callbacks.
|
|
203
|
+
*/
|
|
204
|
+
declare class MaintenanceScheduler {
|
|
205
|
+
private readonly deps;
|
|
206
|
+
private nonZeroExtractionsSinceConsolidation;
|
|
207
|
+
private lastConsolidationRunAtMs;
|
|
208
|
+
private consolidationInFlight;
|
|
209
|
+
private qmdMaintenanceTimer;
|
|
210
|
+
private qmdMaintenancePending;
|
|
211
|
+
private qmdMaintenanceInFlight;
|
|
212
|
+
private lastQmdEmbedAtMs;
|
|
213
|
+
private lastQmdEmbedAtMsByNamespace;
|
|
214
|
+
private lifecycleCompactionInFlight;
|
|
215
|
+
private lastLifecycleCompactionAtMs;
|
|
216
|
+
private lifecycleLedgerMaxBytes;
|
|
217
|
+
private readonly projectionRebuild;
|
|
218
|
+
private readonly activityRegistrar;
|
|
219
|
+
constructor(deps: MaintenanceSchedulerDeps);
|
|
220
|
+
/**
|
|
221
|
+
* Register every cron job the daemon should run, gated by its config flag.
|
|
222
|
+
* Each registration is independent and non-fatal — a failure in one does
|
|
223
|
+
* not block the others (mirrors the orchestrator's prior sequential try/
|
|
224
|
+
* catch behavior exactly).
|
|
225
|
+
*
|
|
226
|
+
* Returns when all eligible registrations have completed so callers that
|
|
227
|
+
* `await deferredReady` can rely on jobs.json being current.
|
|
228
|
+
*/
|
|
229
|
+
autoRegisterCrons(signal: AbortSignal): Promise<void>;
|
|
230
|
+
autoRegisterDaySummaryCron(): Promise<void>;
|
|
231
|
+
autoRegisterNightlyGovernanceCron(): Promise<void>;
|
|
232
|
+
autoRegisterProceduralMiningCron(): Promise<void>;
|
|
233
|
+
autoRegisterContradictionScanCron(): Promise<void>;
|
|
234
|
+
autoRegisterPatternReinforcementCron(): Promise<void>;
|
|
235
|
+
autoRegisterGraphEdgeDecayCron(): Promise<void>;
|
|
236
|
+
/**
|
|
237
|
+
* Maybe trigger a background consolidation pass after an extraction.
|
|
238
|
+
* Counted + interval gated so a burst of extractions does not fan into a
|
|
239
|
+
* burst of consolidation passes. The consolidation runner itself is
|
|
240
|
+
* passed in as a callback because it lives on the orchestrator (LLM +
|
|
241
|
+
* storage dependency surface) and is not owned by this module.
|
|
242
|
+
*/
|
|
243
|
+
maybeScheduleConsolidation(nonZeroExtraction: boolean, runConsolidation: () => Promise<unknown>): void;
|
|
244
|
+
/** Whether a background consolidation pass is currently running. Exposed so
|
|
245
|
+
* the orchestrator's waitForConsolidationIdle can poll idle state without
|
|
246
|
+
* owning the cadence state (issue #1526 PR1). */
|
|
247
|
+
isConsolidationInFlight(): boolean;
|
|
248
|
+
/** Whether a debounced QMD maintenance pass is armed and waiting for the
|
|
249
|
+
* debounce timer. Exposed so drain/teardown diagnostics (e.g. the bench
|
|
250
|
+
* adapter) can observe scheduler idle state after the #1526 PR1 extraction
|
|
251
|
+
* moved this flag off the orchestrator. */
|
|
252
|
+
isQmdMaintenancePending(): boolean;
|
|
253
|
+
/** Whether a QMD maintenance pass is currently running (singleflight guard).
|
|
254
|
+
* Exposed for drain/teardown diagnostics (see isQmdMaintenancePending). */
|
|
255
|
+
isQmdMaintenanceInFlight(): boolean;
|
|
256
|
+
/** Internal: queue a debounced QMD maintenance pass. */
|
|
257
|
+
private requestQmdMaintenance;
|
|
258
|
+
/**
|
|
259
|
+
* Public entrypoint for tool-driven QMD maintenance requests.
|
|
260
|
+
* Routes through existing debounced/singleflight maintenance controls.
|
|
261
|
+
*/
|
|
262
|
+
requestQmdMaintenanceForTool(reason: string): void;
|
|
263
|
+
/** Internal: run a single QMD maintenance pass under singleflight guard. */
|
|
264
|
+
runQmdMaintenance(): Promise<void>;
|
|
265
|
+
/**
|
|
266
|
+
* Size-gated, throttled, single-flighted auto-compaction of the lifecycle
|
|
267
|
+
* ledger (issue #1910). Compacts the root ledger AND every namespace ledger
|
|
268
|
+
* (`memoryDir/namespaces/<token>/state/`) when namespaces are enabled, each
|
|
269
|
+
* through the existing `rebuildMemoryLifecycleLedger` so the
|
|
270
|
+
* archive-then-atomic-write discipline is reused verbatim. `0` disables.
|
|
271
|
+
*
|
|
272
|
+
* Before compacting, drain EVERY target's durable pending-append spill (the
|
|
273
|
+
* root ledger AND each namespace ledger) so a lifecycle event that spilled
|
|
274
|
+
* while a prior long rewrite held the lock is folded back into its ledger and
|
|
275
|
+
* cannot be silently lost (issue #2033). Draining is independent of both the
|
|
276
|
+
* compaction threshold and the min-interval throttle: targets are enumerated
|
|
277
|
+
* through the same safe (symlink/containment-checked) resolver and every
|
|
278
|
+
* eligible queue is drained BEFORE any throttle return, so a namespace spill
|
|
279
|
+
* created after the previous pass never waits out the whole interval.
|
|
280
|
+
* Encrypted-store safety is preserved — a keyed target drains through its
|
|
281
|
+
* secure StorageManager, a filesystem-fallback target only through a plaintext
|
|
282
|
+
* context that refuses encrypted ledgers/spills. Work stays bounded: one
|
|
283
|
+
* target enumeration plus a bounded per-queue drain.
|
|
284
|
+
*
|
|
285
|
+
* The min-interval throttle timestamp advances ONLY after real, fully
|
|
286
|
+
* successful compaction work: a failed OR deferred target leaves the throttle
|
|
287
|
+
* un-advanced so it stays eligible on the next maintenance pass, while
|
|
288
|
+
* `lifecycleCompactionInFlight` still prevents overlapping runs. A "deferred"
|
|
289
|
+
* target is oversized but could not be compacted because its encrypted ledger
|
|
290
|
+
* has no unlocked secure store — arming the throttle for it would suppress the
|
|
291
|
+
* retry of that still-oversized ledger for the whole interval (#2033).
|
|
292
|
+
*
|
|
293
|
+
* The min-interval throttle is bypassed for one case: an encrypted ledger
|
|
294
|
+
* already at/over the whole-file decrypt cap is unreadable, so it must be
|
|
295
|
+
* clamped on the next pass rather than wait out the interval. Ordinary
|
|
296
|
+
* below-cap (or plaintext) targets stay throttled (#2033).
|
|
297
|
+
*/
|
|
298
|
+
private maybeCompactMemoryLifecycleLedger;
|
|
299
|
+
/**
|
|
300
|
+
* True when any lifecycle target's ledger is encrypted at rest AND its
|
|
301
|
+
* on-disk size is at/over the whole-file decrypt cap. Such a ledger is already
|
|
302
|
+
* unreadable (the secure reader refuses at/over the cap), so it must reach the
|
|
303
|
+
* bounded compaction path on the next maintenance pass regardless of the
|
|
304
|
+
* global min-interval throttle — otherwise the throttle could keep an
|
|
305
|
+
* unreadable ledger un-clamped for a whole interval (#2033). Ordinary
|
|
306
|
+
* below-cap or plaintext targets never match, so the throttle still governs
|
|
307
|
+
* them. A stat/probe failure yields "no forced target" and is left to the
|
|
308
|
+
* normal compaction path, which classifies it as failed and retries.
|
|
309
|
+
*/
|
|
310
|
+
private hasOverCapEncryptedLifecycleLedger;
|
|
311
|
+
/**
|
|
312
|
+
* Drain one compaction target's durable pending spill. A catalog-backed
|
|
313
|
+
* target folds through its secure StorageManager; a filesystem-fallback
|
|
314
|
+
* target (no storage) folds through a path-scoped plaintext context that
|
|
315
|
+
* refuses encrypted ledgers/spills so a keyless drain never downgrades an
|
|
316
|
+
* encrypted ledger (issue #2033).
|
|
317
|
+
*/
|
|
318
|
+
private drainPendingForTarget;
|
|
319
|
+
/** Drain a target's durable pending lifecycle-append spill into its ledger
|
|
320
|
+
* (issue #2033); non-fatal and a fast no-op when nothing is pending. */
|
|
321
|
+
private drainPendingLifecycleAppends;
|
|
322
|
+
/**
|
|
323
|
+
* Drain a filesystem-fallback target's pending lifecycle-append spill when no
|
|
324
|
+
* secure StorageManager is available (catalog-disabled namespace; issue
|
|
325
|
+
* #2033). Uses the safe path-scoped PLAINTEXT context this fallback already
|
|
326
|
+
* operates in: a keyless drain can only fold plaintext spills into a plaintext
|
|
327
|
+
* ledger, so it refuses when the ledger or ANY spill is encrypted at rest,
|
|
328
|
+
* leaving those pending for a keyed (catalog-path) drain — exactly mirroring
|
|
329
|
+
* the fallback compaction's encrypted-ledger deferral. Non-fatal; a fast
|
|
330
|
+
* no-op when nothing is pending. The shared spill lister enforces the symlink/
|
|
331
|
+
* containment guard on every spill file it reads or deletes.
|
|
332
|
+
*/
|
|
333
|
+
private drainPendingLifecycleAppendsForPath;
|
|
334
|
+
/**
|
|
335
|
+
* Enumerate the lifecycle ledgers to consider for compaction: the root
|
|
336
|
+
* (through the secure-configured root storage when available) plus every
|
|
337
|
+
* cataloged namespace ledger when namespaces are enabled. Deduplicated by
|
|
338
|
+
* resolved storage dir so a namespace that collapses onto the root is not
|
|
339
|
+
* compacted twice. Namespace resolution failures are non-fatal.
|
|
340
|
+
*/
|
|
341
|
+
private resolveLifecycleCompactionTargets;
|
|
342
|
+
/**
|
|
343
|
+
* Compact one lifecycle ledger when it is at/over `threshold`. Returns
|
|
344
|
+
* `"skipped"` (absent or below threshold — nothing to do), `"compacted"`
|
|
345
|
+
* (rewritten and verified under the read/decrypt cap), `"failed"`
|
|
346
|
+
* (rebuild/probe threw, or the rewritten ledger is STILL over the cap — an
|
|
347
|
+
* ineffective compaction — non-fatal, retried next pass), or `"deferred"`
|
|
348
|
+
* (oversized but its encrypted ledger cannot be rewritten because no unlocked
|
|
349
|
+
* secure store is available — real work still pending, so the caller must NOT
|
|
350
|
+
* arm the throttle). #2033: a deferred/failed target is distinct from a genuine
|
|
351
|
+
* no-op so one namespace compacting cannot suppress retries for another, and
|
|
352
|
+
* an over-cap rewrite never arms the throttle.
|
|
353
|
+
*/
|
|
354
|
+
private compactLifecycleLedgerTarget;
|
|
355
|
+
/** Build the namespace-aware maintenance plan for one job. */
|
|
356
|
+
private namespaceMaintenancePlan;
|
|
357
|
+
/**
|
|
358
|
+
* Clear any pending debounce timer and drain the activity sync scheduler.
|
|
359
|
+
* Called from the orchestrator's destroy() so a late tick does not fire on a
|
|
360
|
+
* torn-down instance and no in-flight activity tick keeps writing after
|
|
361
|
+
* teardown. Async: awaits the scheduler's abort+drain before resolving.
|
|
362
|
+
*/
|
|
363
|
+
dispose(): Promise<void>;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export { ActivityStore as A, MaintenanceScheduler as M, type ActivitySyncRunSummary as a, type ActivitySourceRunItem as b, type ActivitySyncRunOptions as c, activityDatabasePath as d, applyActivitySchema as e, ensureActivityStateDir as f, runActivitySyncOnce as g, type MaintenanceSchedulerDeps as h, openActivityDatabase as o, resolveActivitySyncDates as r };
|