@remnic/core 9.3.748 → 9.3.750
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 +8 -8
- package/dist/access-boundary.js +15 -15
- package/dist/access-cli.js +39 -39
- package/dist/access-http.d.ts +8 -8
- package/dist/access-http.js +20 -20
- package/dist/access-mcp.d.ts +8 -8
- package/dist/access-mcp.js +19 -19
- package/dist/access-operations-batch.js +16 -16
- package/dist/access-operations.d.ts +8 -8
- package/dist/access-operations.js +18 -18
- package/dist/access-schema.d.ts +2 -2
- package/dist/access-schema.js +5 -5
- package/dist/{access-service-CH1aqqb1.d.ts → access-service-DmAEOJdJ.d.ts} +11 -3
- package/dist/access-service.d.ts +5 -5
- package/dist/access-service.js +14 -14
- package/dist/access-surface-catalog.d.ts +8 -8
- 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 +8 -1
- package/dist/active-recall.js.map +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +7 -7
- package/dist/briefing.d.ts +1 -1
- package/dist/briefing.js +7 -7
- 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-D_ZDxu8Y.d.ts → catalog-BpOcwHdE.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 +8 -8
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-C5WN74HH.js → chunk-2HAG7JOI.js} +8 -2
- package/dist/chunk-2HAG7JOI.js.map +1 -0
- package/dist/{chunk-GKRLPHPU.js → chunk-2KK5WNQB.js} +2 -2
- package/dist/{chunk-JRDPT6DA.js → chunk-4NWIGAIC.js} +2 -2
- package/dist/{chunk-OBJUKYDO.js → chunk-4XL3CVII.js} +2 -2
- package/dist/{chunk-WWVXXSLF.js → chunk-5PZCDUJ6.js} +4 -4
- package/dist/{chunk-URQLO7BX.js → chunk-6FNZ3NMS.js} +2 -2
- package/dist/{chunk-DRUDC2UX.js → chunk-6MMONPHM.js} +2 -2
- package/dist/{chunk-RB6A7OUN.js → chunk-6SXNQFHB.js} +2 -2
- package/dist/{chunk-ZGZNLRKF.js → chunk-7TWA7DKP.js} +5 -5
- package/dist/{chunk-KMNYXLPL.js → chunk-B35L45HZ.js} +2 -2
- package/dist/{chunk-SIV3JZPP.js → chunk-CGZWGVQF.js} +5 -5
- package/dist/{chunk-ZWGXZ7ID.js → chunk-CKLCFBA3.js} +2377 -2053
- package/dist/chunk-CKLCFBA3.js.map +1 -0
- package/dist/{chunk-CKFLLAIS.js → chunk-DANV2HTH.js} +3 -3
- package/dist/{chunk-NVYF5OB6.js → chunk-DBRVU5PR.js} +3 -3
- package/dist/{chunk-LMFS64GY.js → chunk-E4PFDD3N.js} +4 -4
- package/dist/{chunk-DIHCFJVV.js → chunk-HYI2GP3F.js} +4 -4
- package/dist/{chunk-UIKZZ242.js → chunk-IKHKHADN.js} +2 -2
- package/dist/{chunk-PUR2CKX2.js → chunk-JS2HKKOK.js} +1 -1
- package/dist/{chunk-PUR2CKX2.js.map → chunk-JS2HKKOK.js.map} +1 -1
- package/dist/{chunk-R2OAN6IP.js → chunk-K2JM4DZZ.js} +2 -2
- package/dist/{chunk-3IJGF6K2.js → chunk-K2R3DEEH.js} +2 -2
- package/dist/{chunk-HIHCB2S6.js → chunk-QRRBXD24.js} +2 -2
- package/dist/{chunk-ZPZ4VVLT.js → chunk-SD34EK4Z.js} +2 -2
- package/dist/{chunk-WK3NK6SP.js → chunk-SNEXVX3U.js} +6 -6
- package/dist/{chunk-FVZ2ISIX.js → chunk-TPLE6SNY.js} +7 -7
- package/dist/{chunk-24YDB5QP.js → chunk-UETBEHBA.js} +44 -24
- package/dist/chunk-UETBEHBA.js.map +1 -0
- package/dist/{chunk-5IN26V6W.js → chunk-UU32EAIY.js} +5 -5
- package/dist/{chunk-ZGAJB74V.js → chunk-W3BFT5OJ.js} +2 -2
- package/dist/{chunk-L4N7SVNN.js → chunk-WA7FECSG.js} +11 -11
- package/dist/{chunk-Q3X7GUAQ.js → chunk-WOX2UW4K.js} +2 -2
- package/dist/{chunk-XTEWVF3C.js → chunk-WWSXVOGY.js} +2 -2
- package/dist/{chunk-PWWWLD7D.js → chunk-X64YLC24.js} +153 -27
- package/dist/chunk-X64YLC24.js.map +1 -0
- package/dist/{chunk-P4FW3ZU5.js → chunk-YGGXUNS4.js} +20 -20
- package/dist/{chunk-JHQUIH3W.js → chunk-ZBVQ4ZM4.js} +19 -19
- package/dist/{cli-CE5olss2.d.ts → cli-lmf5RGyQ.d.ts} +3 -3
- package/dist/cli.d.ts +9 -9
- package/dist/cli.js +33 -33
- package/dist/compounding/engine.d.ts +1 -1
- package/dist/compounding/engine.js +7 -7
- 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 +8 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +7 -7
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +7 -7
- 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/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 +7 -7
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +7 -7
- 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-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 +10 -10
- package/dist/index.js +76 -72
- 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 +7 -7
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
- package/dist/maintenance/rebuild-memory-projection.js +8 -8
- 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 +8 -8
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +1 -1
- package/dist/namespaces/storage.d.ts +2 -2
- package/dist/namespaces/storage.js +7 -7
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync.d.ts +108 -1
- package/dist/offline-sync.js +7 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +15 -12
- package/dist/orchestration/compression-guideline-coordinator.d.ts +1 -1
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +9 -9
- package/dist/{orchestrator-CIOqdNzF.d.ts → orchestrator-D7bb8ZGp.d.ts} +200 -257
- package/dist/orchestrator.d.ts +5 -5
- package/dist/orchestrator.js +51 -41
- 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/resume-bundles.js +9 -2
- 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/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +1 -1
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +1 -1
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-D3aSiu9t.d.ts → semantic-consolidation-CTfbVwCA.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +8 -8
- package/dist/semantic-rule-promotion.js +7 -7
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +7 -7
- 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 +6 -6
- 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/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-CZm6rx9-.d.ts → types-D4NYDtXI.d.ts} +7 -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 +7 -7
- package/package.json +2 -2
- package/src/access-service.ts +22 -0
- package/src/config.ts +5 -0
- package/src/index.ts +3 -1
- package/src/offline-sync.test.ts +354 -52
- package/src/offline-sync.ts +332 -24
- package/src/orchestration/extraction-run.ts +4 -34
- package/src/orchestration/namespace-read-fanout.ts +484 -0
- package/src/orchestration/orchestrator-helpers.ts +1130 -0
- package/src/orchestration/persistence-index.ts +497 -0
- package/src/orchestration/workspace-ops.ts +789 -0
- package/src/orchestrator.ts +271 -2448
- package/src/types.ts +9 -0
- package/dist/chunk-24YDB5QP.js.map +0 -1
- package/dist/chunk-C5WN74HH.js.map +0 -1
- package/dist/chunk-PWWWLD7D.js.map +0 -1
- package/dist/chunk-ZWGXZ7ID.js.map +0 -1
- /package/dist/{chunk-GKRLPHPU.js.map → chunk-2KK5WNQB.js.map} +0 -0
- /package/dist/{chunk-JRDPT6DA.js.map → chunk-4NWIGAIC.js.map} +0 -0
- /package/dist/{chunk-OBJUKYDO.js.map → chunk-4XL3CVII.js.map} +0 -0
- /package/dist/{chunk-WWVXXSLF.js.map → chunk-5PZCDUJ6.js.map} +0 -0
- /package/dist/{chunk-URQLO7BX.js.map → chunk-6FNZ3NMS.js.map} +0 -0
- /package/dist/{chunk-DRUDC2UX.js.map → chunk-6MMONPHM.js.map} +0 -0
- /package/dist/{chunk-RB6A7OUN.js.map → chunk-6SXNQFHB.js.map} +0 -0
- /package/dist/{chunk-ZGZNLRKF.js.map → chunk-7TWA7DKP.js.map} +0 -0
- /package/dist/{chunk-KMNYXLPL.js.map → chunk-B35L45HZ.js.map} +0 -0
- /package/dist/{chunk-SIV3JZPP.js.map → chunk-CGZWGVQF.js.map} +0 -0
- /package/dist/{chunk-CKFLLAIS.js.map → chunk-DANV2HTH.js.map} +0 -0
- /package/dist/{chunk-NVYF5OB6.js.map → chunk-DBRVU5PR.js.map} +0 -0
- /package/dist/{chunk-LMFS64GY.js.map → chunk-E4PFDD3N.js.map} +0 -0
- /package/dist/{chunk-DIHCFJVV.js.map → chunk-HYI2GP3F.js.map} +0 -0
- /package/dist/{chunk-UIKZZ242.js.map → chunk-IKHKHADN.js.map} +0 -0
- /package/dist/{chunk-R2OAN6IP.js.map → chunk-K2JM4DZZ.js.map} +0 -0
- /package/dist/{chunk-3IJGF6K2.js.map → chunk-K2R3DEEH.js.map} +0 -0
- /package/dist/{chunk-HIHCB2S6.js.map → chunk-QRRBXD24.js.map} +0 -0
- /package/dist/{chunk-ZPZ4VVLT.js.map → chunk-SD34EK4Z.js.map} +0 -0
- /package/dist/{chunk-WK3NK6SP.js.map → chunk-SNEXVX3U.js.map} +0 -0
- /package/dist/{chunk-FVZ2ISIX.js.map → chunk-TPLE6SNY.js.map} +0 -0
- /package/dist/{chunk-5IN26V6W.js.map → chunk-UU32EAIY.js.map} +0 -0
- /package/dist/{chunk-ZGAJB74V.js.map → chunk-W3BFT5OJ.js.map} +0 -0
- /package/dist/{chunk-L4N7SVNN.js.map → chunk-WA7FECSG.js.map} +0 -0
- /package/dist/{chunk-Q3X7GUAQ.js.map → chunk-WOX2UW4K.js.map} +0 -0
- /package/dist/{chunk-XTEWVF3C.js.map → chunk-WWSXVOGY.js.map} +0 -0
- /package/dist/{chunk-P4FW3ZU5.js.map → chunk-YGGXUNS4.js.map} +0 -0
- /package/dist/{chunk-JHQUIH3W.js.map → chunk-ZBVQ4ZM4.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MaintenanceScheduler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-4NWIGAIC.js";
|
|
4
4
|
import "../chunk-666A3MOW.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-CGZWGVQF.js";
|
|
6
|
+
import "../chunk-UU32EAIY.js";
|
|
7
7
|
import "../chunk-W3M34XT4.js";
|
|
8
8
|
import "../chunk-ZFXCQPNO.js";
|
|
9
9
|
import "../chunk-O75CRYGF.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-ZBVQ4ZM4.js";
|
|
11
11
|
import "../chunk-M7XQSUBB.js";
|
|
12
12
|
import "../chunk-L2B3EE7B.js";
|
|
13
13
|
import "../chunk-5UZXUTVO.js";
|
|
@@ -17,7 +17,7 @@ import "../chunk-LTJAMRGI.js";
|
|
|
17
17
|
import "../chunk-TKZ3AL5V.js";
|
|
18
18
|
import "../chunk-6CIAGZ6X.js";
|
|
19
19
|
import "../chunk-J6A3CX5N.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-JS2HKKOK.js";
|
|
21
21
|
import "../chunk-AWJ2FHCF.js";
|
|
22
22
|
import "../chunk-42JKGUFJ.js";
|
|
23
23
|
import "../chunk-RULE4VG5.js";
|
|
@@ -37,10 +37,6 @@ import "../chunk-L2EXJQJP.js";
|
|
|
37
37
|
import "../chunk-VL7DP3OW.js";
|
|
38
38
|
import "../chunk-RGMVMVMF.js";
|
|
39
39
|
import "../chunk-N7RWREIQ.js";
|
|
40
|
-
import "../chunk-J2HSAU72.js";
|
|
41
|
-
import "../chunk-A6XUJE5D.js";
|
|
42
|
-
import "../chunk-P7FMDTKL.js";
|
|
43
|
-
import "../chunk-VS2IYZRU.js";
|
|
44
40
|
import "../chunk-PE6XR4GG.js";
|
|
45
41
|
import "../chunk-U3PN77QT.js";
|
|
46
42
|
import "../chunk-VSF7AAGE.js";
|
|
@@ -51,6 +47,10 @@ import "../chunk-4DJQYKMN.js";
|
|
|
51
47
|
import "../chunk-EYIEWJNI.js";
|
|
52
48
|
import "../chunk-JUC24CTX.js";
|
|
53
49
|
import "../chunk-NU3CSQ4H.js";
|
|
50
|
+
import "../chunk-J2HSAU72.js";
|
|
51
|
+
import "../chunk-A6XUJE5D.js";
|
|
52
|
+
import "../chunk-P7FMDTKL.js";
|
|
53
|
+
import "../chunk-VS2IYZRU.js";
|
|
54
54
|
import "../chunk-6MKAMLQL.js";
|
|
55
55
|
import "../chunk-JAKIDQB2.js";
|
|
56
56
|
import "../chunk-PZ5AY32C.js";
|
|
@@ -8,12 +8,12 @@ import { HourlySummarizer } from './summarizer.js';
|
|
|
8
8
|
import { LocalLlmClient } from './local-llm.js';
|
|
9
9
|
import { FallbackLlmClient } from './fallback-llm.js';
|
|
10
10
|
import { MaintenanceScheduler } from './orchestration/maintenance.js';
|
|
11
|
-
import { aB as ScopeProfileConfig, aC as ScopeProfileLayerId, aD as ScopeProfilePromotionTarget, u as BufferTurn, y as ExtractionResult, M as MemoryCategory, ac as ImportanceScore, f as MemoryStatus, aE as WearableConversation, aF as WearableSourceSettings, aG as WearableNativeMemory, aH as WearableMemoryMode, aI as WearableSourceConnector, aJ as WearablesConfig, aK as WearableSyncSummary, aL as WearableSourceStatus, aM as WearableDayTranscript, aN as WearableCorrectionRule, P as PluginConfig, g as MemoryFile, a0 as MemoryActionEvent, Q as QmdSearchResult, a6 as ContinuityIncidentRecord, h as RecallPlanMode, I as IdentityInjectionMode, aO as RecallSectionConfig, ap as MemoryLink, ax as CodingContext, ad as MemoryIntent, e as BehaviorLoopPolicyState, aP as BootstrapOptions, aQ as BootstrapResult, aR as ConsolidationObservation, D as DaySummaryResult
|
|
11
|
+
import { aB as ScopeProfileConfig, aC as ScopeProfileLayerId, aD as ScopeProfilePromotionTarget, u as BufferTurn, y as ExtractionResult, M as MemoryCategory, ac as ImportanceScore, f as MemoryStatus, aE as WearableConversation, aF as WearableSourceSettings, aG as WearableNativeMemory, aH as WearableMemoryMode, aI as WearableSourceConnector, aJ as WearablesConfig, aK as WearableSyncSummary, aL as WearableSourceStatus, aM as WearableDayTranscript, aN as WearableCorrectionRule, P as PluginConfig, g as MemoryFile, a0 as MemoryActionEvent, Q as QmdSearchResult, a6 as ContinuityIncidentRecord, h as RecallPlanMode, I as IdentityInjectionMode, aO as RecallSectionConfig, ap as MemoryLink, ax as CodingContext, ad as MemoryIntent, k as MemoryFrontmatter, e as BehaviorLoopPolicyState, aP as BootstrapOptions, aQ as BootstrapResult, aR as ConsolidationObservation, D as DaySummaryResult } from './types-D4NYDtXI.js';
|
|
12
12
|
import { TierMigrationStatusStore, TierMigrationStatusSnapshot, TierMigrationCycleSummary, LastRecallBudgetSummary, GraphRecallExpandedEntry, LastRecallStore, RecallHandleHistoryStore, LastRecallSnapshot } from './recall-state.js';
|
|
13
13
|
import { CompoundingEngine } from './compounding/engine.js';
|
|
14
14
|
import { UtilityRuntimeValues } from './utility-runtime.js';
|
|
15
15
|
import { CompressionGuidelineCoordinator } from './orchestration/compression-guideline-coordinator.js';
|
|
16
|
-
import { S as SemanticConsolidationResult } from './semantic-consolidation-
|
|
16
|
+
import { S as SemanticConsolidationResult } from './semantic-consolidation-CTfbVwCA.js';
|
|
17
17
|
import { EmbeddingFallback } from './embedding-fallback.js';
|
|
18
18
|
import { ExtractionEngine } from './extraction.js';
|
|
19
19
|
import { ObjectiveStateSearchResult } from './objective-state.js';
|
|
@@ -32,18 +32,18 @@ import { BoxBuilder } from './boxes.js';
|
|
|
32
32
|
import { NamespaceStorageRouter } from './namespaces/storage.js';
|
|
33
33
|
import { ThreadingManager } from './threading.js';
|
|
34
34
|
import { GraphIndex } from './graph.js';
|
|
35
|
+
import { RecallXrayServedBy, RecallXraySnapshot } from './recall-xray.js';
|
|
35
36
|
import { LiveConnectorsRunSummary } from './live-connectors-runner.js';
|
|
36
37
|
import { ModelRegistry } from './model-registry.js';
|
|
37
38
|
import { RelevanceStore } from './relevance.js';
|
|
38
39
|
import { NegativeExampleStore } from './negative.js';
|
|
39
|
-
import { RecallXraySnapshot, RecallXrayServedBy } from './recall-xray.js';
|
|
40
40
|
import { SessionObserverState } from './session-observer-state.js';
|
|
41
41
|
import { a as SemanticDedupHit } from './semantic-DJR8_DMQ.js';
|
|
42
42
|
import { ReplayTurn } from './replay/types.js';
|
|
43
43
|
import { I as ImportTurn } from './types-gb_SNtjR.js';
|
|
44
44
|
import { JudgeCandidate, JudgeBatchResult } from './extraction-judge.js';
|
|
45
45
|
import { LcmEngine } from './lcm/engine.js';
|
|
46
|
-
import { b as NamespaceKind, N as NamespaceCatalog } from './catalog-
|
|
46
|
+
import { b as NamespaceKind, N as NamespaceCatalog } from './catalog-BpOcwHdE.js';
|
|
47
47
|
import { NamespaceSearchHealth } from './namespaces/search.js';
|
|
48
48
|
import { SharedContextManager } from './shared-context/manager.js';
|
|
49
49
|
import { RuntimePolicyValues } from './policy-runtime.js';
|
|
@@ -1536,154 +1536,19 @@ declare class GraphRecallCoordinator {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
|
|
1538
1538
|
/**
|
|
1539
|
-
*
|
|
1540
|
-
*
|
|
1541
|
-
* Reads all memories via `StorageManager.readAllMemories()`, clusters
|
|
1542
|
-
* non-procedural memories by normalized content, and reinforces the
|
|
1543
|
-
* most-recent member of each large-enough cluster:
|
|
1544
|
-
*
|
|
1545
|
-
* 1. Cluster across active AND already-superseded members. This is
|
|
1546
|
-
* load-bearing: after the first reinforcement pass, older
|
|
1547
|
-
* duplicates are marked `superseded`, so on the next pass the
|
|
1548
|
-
* "active count" alone would be just `canonical + N-new`. By
|
|
1549
|
-
* keeping superseded members in the cluster for the threshold
|
|
1550
|
-
* check, an established canonical (count >= minCount) keeps
|
|
1551
|
-
* growing as soon as a single new duplicate arrives.
|
|
1552
|
-
* `forgotten` / `archived` / `quarantined` / `pending_review` /
|
|
1553
|
-
* `rejected` stay excluded per CLAUDE.md rule 53.
|
|
1554
|
-
* 2. Pick the most-recent ACTIVE member of each cluster as the
|
|
1555
|
-
* canonical. Stamp it with `reinforcement_count` (total cluster
|
|
1556
|
-
* size including superseded members) and `last_reinforced_at`.
|
|
1557
|
-
* Record provenance: `derived_from = [...source-ids...]` and
|
|
1558
|
-
* `derived_via = "pattern-reinforcement"`.
|
|
1559
|
-
* 3. Mark any still-active duplicates with `status: "superseded"`
|
|
1560
|
-
* and point `supersededBy` at the canonical id.
|
|
1561
|
-
*
|
|
1562
|
-
* The job is idempotent: re-running on the same corpus does not
|
|
1563
|
-
* double-bump `reinforcement_count` (the bump-only-on-change guard
|
|
1564
|
-
* compares cluster size to the canonical's previous counter), and
|
|
1565
|
-
* already-superseded duplicates simply pass through.
|
|
1566
|
-
*
|
|
1567
|
-
* Recall integration (boost from `reinforcement_count`) and the CLI
|
|
1568
|
-
* surface ship in PR 3/4 and PR 4/4 respectively — this PR only wires
|
|
1569
|
-
* the maintenance job and storage plumbing.
|
|
1570
|
-
*/
|
|
1571
|
-
|
|
1572
|
-
interface PatternReinforcementClusterResult {
|
|
1573
|
-
/** Memory id of the canonical (most-recent) member. */
|
|
1574
|
-
canonicalId: string;
|
|
1575
|
-
/** Cluster size at run time (mirrors `reinforcement_count`). */
|
|
1576
|
-
count: number;
|
|
1577
|
-
/** IDs of the source memories that contributed (canonical + duplicates). */
|
|
1578
|
-
sourceIds: readonly string[];
|
|
1579
|
-
/** IDs of the older duplicates that were marked superseded. */
|
|
1580
|
-
supersededIds: readonly string[];
|
|
1581
|
-
/**
|
|
1582
|
-
* `true` when the canonical's `reinforcement_count` actually
|
|
1583
|
-
* changed during this run. False when the job converged
|
|
1584
|
-
* idempotently (same cluster size as the previous run).
|
|
1585
|
-
*/
|
|
1586
|
-
reinforcementBumped: boolean;
|
|
1587
|
-
}
|
|
1588
|
-
interface PatternReinforcementResult {
|
|
1589
|
-
/** Number of clusters that met the `minCount` threshold. */
|
|
1590
|
-
clustersFound: number;
|
|
1591
|
-
/** Number of canonical memories whose reinforcement counter changed. */
|
|
1592
|
-
canonicalsUpdated: number;
|
|
1593
|
-
/** Total duplicate memories newly marked `status: "superseded"`. */
|
|
1594
|
-
duplicatesSuperseded: number;
|
|
1595
|
-
/** Per-cluster details for tests / observability. */
|
|
1596
|
-
clusters: PatternReinforcementClusterResult[];
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
type NamespaceMaintenanceJobName = string;
|
|
1600
|
-
type NamespaceMaintenanceSkipReason = "fanout_disabled" | "empty_root" | "branch_disabled" | "project_disabled" | "team_project_disabled" | "catalog_read_failed" | "unsafe_or_stale_root" | "budget_exhausted" | "lock_held" | "batch_lock_incomplete" | "throttled" | "job_failed";
|
|
1601
|
-
interface NamespaceMaintenanceCandidate {
|
|
1602
|
-
namespace: string;
|
|
1603
|
-
kind: NamespaceKind;
|
|
1604
|
-
storageDir?: string;
|
|
1605
|
-
source: "configured" | "catalog";
|
|
1606
|
-
lastWriteAt?: string;
|
|
1607
|
-
lastMaintenanceAt?: string;
|
|
1608
|
-
}
|
|
1609
|
-
interface NamespaceMaintenanceRunStatus {
|
|
1610
|
-
namespace: string;
|
|
1611
|
-
jobName: NamespaceMaintenanceJobName;
|
|
1612
|
-
state: "ran" | "skipped" | "failed";
|
|
1613
|
-
reason?: NamespaceMaintenanceSkipReason;
|
|
1614
|
-
startedAt: string;
|
|
1615
|
-
completedAt: string;
|
|
1616
|
-
itemCount?: number;
|
|
1617
|
-
error?: string;
|
|
1618
|
-
}
|
|
1619
|
-
interface NamespaceMaintenanceSummary {
|
|
1620
|
-
jobName: NamespaceMaintenanceJobName;
|
|
1621
|
-
generatedAt: string;
|
|
1622
|
-
ran: number;
|
|
1623
|
-
skipped: number;
|
|
1624
|
-
failed: number;
|
|
1625
|
-
statuses: NamespaceMaintenanceRunStatus[];
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
/**
|
|
1629
|
-
* Namespace maintenance fanout coordinator (issue #1500).
|
|
1539
|
+
* Orchestrator module-level helpers — relocated from orchestrator.ts
|
|
1540
|
+
* (issue #1526, seam 25).
|
|
1630
1541
|
*
|
|
1631
|
-
*
|
|
1632
|
-
*
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1638
|
-
* (configured + catalog), per-kind gating, cycle budgeting, per-job+namespace
|
|
1639
|
-
* locking, status recording, and catalog maintenance timestamps. QMD
|
|
1640
|
-
* maintenance was wired through it in #1517. This module standardizes the
|
|
1641
|
-
* per-job adapter pattern so every other maintenance job can be fanned out
|
|
1642
|
-
* with one call, and aggregates per-namespace health for doctor/dashboard.
|
|
1643
|
-
*
|
|
1644
|
-
* Design contract (issue #1500 compatibility requirements):
|
|
1645
|
-
* - Existing direct `runJob({ namespace })` calls continue to work unchanged.
|
|
1646
|
-
* - Namespaces disabled: fanout is a no-op (the planner returns only the
|
|
1647
|
-
* default namespace; jobs run exactly as before).
|
|
1648
|
-
* - `maintenanceNamespaceFanoutEnabled: false`: fanout is a no-op.
|
|
1649
|
-
* - A failure in one namespace must not abort other namespaces (the planner
|
|
1650
|
-
* already isolates per-namespace failures).
|
|
1651
|
-
* - Per-namespace locks prevent duplicate concurrent runs (planner-provided).
|
|
1652
|
-
*/
|
|
1653
|
-
|
|
1654
|
-
/**
|
|
1655
|
-
* Context passed to a fanout job runner. The runner receives the per-namespace
|
|
1656
|
-
* candidate (namespace name, kind, storage dir) and a storage resolver that
|
|
1657
|
-
* the orchestrator wires to `storageRouter.storageFor(namespace)`.
|
|
1542
|
+
* Pure functions, types, and constants that previously lived at module
|
|
1543
|
+
* level in orchestrator.ts: recall-mode planning, recall snapshots and
|
|
1544
|
+
* parsers, abort/race helpers, artifact recall limits, replay
|
|
1545
|
+
* source-time slicing, day-summary date utilities, and QMD startup
|
|
1546
|
+
* checks. orchestrator.ts re-exports the previously-public names so
|
|
1547
|
+
* every existing importer (coordinators, tests, root shims) keeps
|
|
1548
|
+
* working unchanged.
|
|
1658
1549
|
*
|
|
1659
|
-
*
|
|
1660
|
-
* does not depend on the `StorageManager` class — the orchestrator provides the
|
|
1661
|
-
* typed resolver. This keeps the fanout module free of orchestrator/storage
|
|
1662
|
-
* imports and unit-testable with a stub.
|
|
1550
|
+
* Behavior-preserving move — no logic changes.
|
|
1663
1551
|
*/
|
|
1664
|
-
interface NamespaceMaintenanceFanoutRunnerContext {
|
|
1665
|
-
config: PluginConfig;
|
|
1666
|
-
candidate: NamespaceMaintenanceCandidate;
|
|
1667
|
-
resolveStorage: (namespace: string) => Promise<unknown>;
|
|
1668
|
-
}
|
|
1669
|
-
interface NamespaceMaintenanceJobHealth {
|
|
1670
|
-
jobName: string;
|
|
1671
|
-
ran: number;
|
|
1672
|
-
skipped: number;
|
|
1673
|
-
failed: number;
|
|
1674
|
-
lastRunAt: string | null;
|
|
1675
|
-
namespaces: NamespaceMaintenanceRunStatus[];
|
|
1676
|
-
}
|
|
1677
|
-
interface NamespaceMaintenanceHealthSummary {
|
|
1678
|
-
generatedAt: string;
|
|
1679
|
-
fanoutEnabled: boolean;
|
|
1680
|
-
namespacesEnabled: boolean;
|
|
1681
|
-
maxNamespacesPerCycle: number;
|
|
1682
|
-
jobs: NamespaceMaintenanceJobHealth[];
|
|
1683
|
-
totalRan: number;
|
|
1684
|
-
totalSkipped: number;
|
|
1685
|
-
totalFailed: number;
|
|
1686
|
-
}
|
|
1687
1552
|
|
|
1688
1553
|
interface BulkImportBatchIngestResult {
|
|
1689
1554
|
attemptedTurnCount: number;
|
|
@@ -1700,7 +1565,6 @@ declare class BulkImportBatchPartialFailureError extends Error {
|
|
|
1700
1565
|
readonly originalError: unknown;
|
|
1701
1566
|
constructor(message: string, partialResult: BulkImportBatchIngestResult, originalError: unknown);
|
|
1702
1567
|
}
|
|
1703
|
-
|
|
1704
1568
|
interface GraphRecallSnapshot {
|
|
1705
1569
|
recordedAt: string;
|
|
1706
1570
|
mode: RecallPlanMode | string;
|
|
@@ -1877,6 +1741,11 @@ type DaySummaryGatherOptions = {
|
|
|
1877
1741
|
timeZone?: string;
|
|
1878
1742
|
now?: Date;
|
|
1879
1743
|
};
|
|
1744
|
+
declare function normalizeIanaTimeZone(value: unknown): string | undefined;
|
|
1745
|
+
declare function formatDateInTimeZone(date: Date, timeZone: string): string;
|
|
1746
|
+
declare function utcDateKeysForLocalDay(date: Date, timeZone: string): string[];
|
|
1747
|
+
declare function parseFiniteDate(value: unknown): Date | null;
|
|
1748
|
+
declare function filterHourlySummaryMarkdownForLocalDay(raw: string, utcDate: string, timeZone: string, targetLocalDate: string): string | null;
|
|
1880
1749
|
type SearchCollectionState = "present" | "missing" | "unknown" | "skipped";
|
|
1881
1750
|
declare function qmdStartupCollectionCheckWithTimeout(promise: Promise<SearchCollectionState>, controller: AbortController, label: string): Promise<SearchCollectionState>;
|
|
1882
1751
|
/** Default workspace directory when no per-agent or config workspace is available. */
|
|
@@ -1899,7 +1768,6 @@ declare function splitTurnsBySourceValidAt(turns: readonly BufferTurn[], options
|
|
|
1899
1768
|
includeContext?: boolean;
|
|
1900
1769
|
}): BufferTurn[][];
|
|
1901
1770
|
declare function isArtifactMemoryPath(filePath: string): boolean;
|
|
1902
|
-
|
|
1903
1771
|
declare function buildCompressionGuidelinesMarkdown(events: MemoryActionEvent[], generatedAtIso?: string): string;
|
|
1904
1772
|
declare function filterRecallCandidates(candidates: QmdSearchResult[], options: {
|
|
1905
1773
|
namespacesEnabled: boolean;
|
|
@@ -1990,6 +1858,157 @@ declare function resolvePersistedMemoryRelativePath(options: {
|
|
|
1990
1858
|
pathById: Map<string, string>;
|
|
1991
1859
|
category: string;
|
|
1992
1860
|
}): string;
|
|
1861
|
+
|
|
1862
|
+
/**
|
|
1863
|
+
* Pattern-reinforcement maintenance job (issue #687 PR 2/4).
|
|
1864
|
+
*
|
|
1865
|
+
* Reads all memories via `StorageManager.readAllMemories()`, clusters
|
|
1866
|
+
* non-procedural memories by normalized content, and reinforces the
|
|
1867
|
+
* most-recent member of each large-enough cluster:
|
|
1868
|
+
*
|
|
1869
|
+
* 1. Cluster across active AND already-superseded members. This is
|
|
1870
|
+
* load-bearing: after the first reinforcement pass, older
|
|
1871
|
+
* duplicates are marked `superseded`, so on the next pass the
|
|
1872
|
+
* "active count" alone would be just `canonical + N-new`. By
|
|
1873
|
+
* keeping superseded members in the cluster for the threshold
|
|
1874
|
+
* check, an established canonical (count >= minCount) keeps
|
|
1875
|
+
* growing as soon as a single new duplicate arrives.
|
|
1876
|
+
* `forgotten` / `archived` / `quarantined` / `pending_review` /
|
|
1877
|
+
* `rejected` stay excluded per CLAUDE.md rule 53.
|
|
1878
|
+
* 2. Pick the most-recent ACTIVE member of each cluster as the
|
|
1879
|
+
* canonical. Stamp it with `reinforcement_count` (total cluster
|
|
1880
|
+
* size including superseded members) and `last_reinforced_at`.
|
|
1881
|
+
* Record provenance: `derived_from = [...source-ids...]` and
|
|
1882
|
+
* `derived_via = "pattern-reinforcement"`.
|
|
1883
|
+
* 3. Mark any still-active duplicates with `status: "superseded"`
|
|
1884
|
+
* and point `supersededBy` at the canonical id.
|
|
1885
|
+
*
|
|
1886
|
+
* The job is idempotent: re-running on the same corpus does not
|
|
1887
|
+
* double-bump `reinforcement_count` (the bump-only-on-change guard
|
|
1888
|
+
* compares cluster size to the canonical's previous counter), and
|
|
1889
|
+
* already-superseded duplicates simply pass through.
|
|
1890
|
+
*
|
|
1891
|
+
* Recall integration (boost from `reinforcement_count`) and the CLI
|
|
1892
|
+
* surface ship in PR 3/4 and PR 4/4 respectively — this PR only wires
|
|
1893
|
+
* the maintenance job and storage plumbing.
|
|
1894
|
+
*/
|
|
1895
|
+
|
|
1896
|
+
interface PatternReinforcementClusterResult {
|
|
1897
|
+
/** Memory id of the canonical (most-recent) member. */
|
|
1898
|
+
canonicalId: string;
|
|
1899
|
+
/** Cluster size at run time (mirrors `reinforcement_count`). */
|
|
1900
|
+
count: number;
|
|
1901
|
+
/** IDs of the source memories that contributed (canonical + duplicates). */
|
|
1902
|
+
sourceIds: readonly string[];
|
|
1903
|
+
/** IDs of the older duplicates that were marked superseded. */
|
|
1904
|
+
supersededIds: readonly string[];
|
|
1905
|
+
/**
|
|
1906
|
+
* `true` when the canonical's `reinforcement_count` actually
|
|
1907
|
+
* changed during this run. False when the job converged
|
|
1908
|
+
* idempotently (same cluster size as the previous run).
|
|
1909
|
+
*/
|
|
1910
|
+
reinforcementBumped: boolean;
|
|
1911
|
+
}
|
|
1912
|
+
interface PatternReinforcementResult {
|
|
1913
|
+
/** Number of clusters that met the `minCount` threshold. */
|
|
1914
|
+
clustersFound: number;
|
|
1915
|
+
/** Number of canonical memories whose reinforcement counter changed. */
|
|
1916
|
+
canonicalsUpdated: number;
|
|
1917
|
+
/** Total duplicate memories newly marked `status: "superseded"`. */
|
|
1918
|
+
duplicatesSuperseded: number;
|
|
1919
|
+
/** Per-cluster details for tests / observability. */
|
|
1920
|
+
clusters: PatternReinforcementClusterResult[];
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
type NamespaceMaintenanceJobName = string;
|
|
1924
|
+
type NamespaceMaintenanceSkipReason = "fanout_disabled" | "empty_root" | "branch_disabled" | "project_disabled" | "team_project_disabled" | "catalog_read_failed" | "unsafe_or_stale_root" | "budget_exhausted" | "lock_held" | "batch_lock_incomplete" | "throttled" | "job_failed";
|
|
1925
|
+
interface NamespaceMaintenanceCandidate {
|
|
1926
|
+
namespace: string;
|
|
1927
|
+
kind: NamespaceKind;
|
|
1928
|
+
storageDir?: string;
|
|
1929
|
+
source: "configured" | "catalog";
|
|
1930
|
+
lastWriteAt?: string;
|
|
1931
|
+
lastMaintenanceAt?: string;
|
|
1932
|
+
}
|
|
1933
|
+
interface NamespaceMaintenanceRunStatus {
|
|
1934
|
+
namespace: string;
|
|
1935
|
+
jobName: NamespaceMaintenanceJobName;
|
|
1936
|
+
state: "ran" | "skipped" | "failed";
|
|
1937
|
+
reason?: NamespaceMaintenanceSkipReason;
|
|
1938
|
+
startedAt: string;
|
|
1939
|
+
completedAt: string;
|
|
1940
|
+
itemCount?: number;
|
|
1941
|
+
error?: string;
|
|
1942
|
+
}
|
|
1943
|
+
interface NamespaceMaintenanceSummary {
|
|
1944
|
+
jobName: NamespaceMaintenanceJobName;
|
|
1945
|
+
generatedAt: string;
|
|
1946
|
+
ran: number;
|
|
1947
|
+
skipped: number;
|
|
1948
|
+
failed: number;
|
|
1949
|
+
statuses: NamespaceMaintenanceRunStatus[];
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
/**
|
|
1953
|
+
* Namespace maintenance fanout coordinator (issue #1500).
|
|
1954
|
+
*
|
|
1955
|
+
* Builds on the namespace-aware maintenance planner (#1499 / #1517) to fan out
|
|
1956
|
+
* the REMAINING background maintenance jobs — dreams, pattern reinforcement,
|
|
1957
|
+
* governance/lifecycle, contradiction scans, semantic/causal consolidation,
|
|
1958
|
+
* graph decay, fact archival, tier migration — across all maintained
|
|
1959
|
+
* namespaces.
|
|
1960
|
+
*
|
|
1961
|
+
* The planner (`namespace-planner.ts`) already handles namespace discovery
|
|
1962
|
+
* (configured + catalog), per-kind gating, cycle budgeting, per-job+namespace
|
|
1963
|
+
* locking, status recording, and catalog maintenance timestamps. QMD
|
|
1964
|
+
* maintenance was wired through it in #1517. This module standardizes the
|
|
1965
|
+
* per-job adapter pattern so every other maintenance job can be fanned out
|
|
1966
|
+
* with one call, and aggregates per-namespace health for doctor/dashboard.
|
|
1967
|
+
*
|
|
1968
|
+
* Design contract (issue #1500 compatibility requirements):
|
|
1969
|
+
* - Existing direct `runJob({ namespace })` calls continue to work unchanged.
|
|
1970
|
+
* - Namespaces disabled: fanout is a no-op (the planner returns only the
|
|
1971
|
+
* default namespace; jobs run exactly as before).
|
|
1972
|
+
* - `maintenanceNamespaceFanoutEnabled: false`: fanout is a no-op.
|
|
1973
|
+
* - A failure in one namespace must not abort other namespaces (the planner
|
|
1974
|
+
* already isolates per-namespace failures).
|
|
1975
|
+
* - Per-namespace locks prevent duplicate concurrent runs (planner-provided).
|
|
1976
|
+
*/
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
* Context passed to a fanout job runner. The runner receives the per-namespace
|
|
1980
|
+
* candidate (namespace name, kind, storage dir) and a storage resolver that
|
|
1981
|
+
* the orchestrator wires to `storageRouter.storageFor(namespace)`.
|
|
1982
|
+
*
|
|
1983
|
+
* The storage resolver is intentionally typed as `unknown` here so this module
|
|
1984
|
+
* does not depend on the `StorageManager` class — the orchestrator provides the
|
|
1985
|
+
* typed resolver. This keeps the fanout module free of orchestrator/storage
|
|
1986
|
+
* imports and unit-testable with a stub.
|
|
1987
|
+
*/
|
|
1988
|
+
interface NamespaceMaintenanceFanoutRunnerContext {
|
|
1989
|
+
config: PluginConfig;
|
|
1990
|
+
candidate: NamespaceMaintenanceCandidate;
|
|
1991
|
+
resolveStorage: (namespace: string) => Promise<unknown>;
|
|
1992
|
+
}
|
|
1993
|
+
interface NamespaceMaintenanceJobHealth {
|
|
1994
|
+
jobName: string;
|
|
1995
|
+
ran: number;
|
|
1996
|
+
skipped: number;
|
|
1997
|
+
failed: number;
|
|
1998
|
+
lastRunAt: string | null;
|
|
1999
|
+
namespaces: NamespaceMaintenanceRunStatus[];
|
|
2000
|
+
}
|
|
2001
|
+
interface NamespaceMaintenanceHealthSummary {
|
|
2002
|
+
generatedAt: string;
|
|
2003
|
+
fanoutEnabled: boolean;
|
|
2004
|
+
namespacesEnabled: boolean;
|
|
2005
|
+
maxNamespacesPerCycle: number;
|
|
2006
|
+
jobs: NamespaceMaintenanceJobHealth[];
|
|
2007
|
+
totalRan: number;
|
|
2008
|
+
totalSkipped: number;
|
|
2009
|
+
totalFailed: number;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
1993
2012
|
declare class Orchestrator {
|
|
1994
2013
|
readonly storage: StorageManager;
|
|
1995
2014
|
private readonly storageRouter;
|
|
@@ -2109,7 +2128,8 @@ declare class Orchestrator {
|
|
|
2109
2128
|
private contentHashIndex;
|
|
2110
2129
|
private readonly contentHashIndexesByStorageDir;
|
|
2111
2130
|
private readonly artifactSourceStatusCache;
|
|
2112
|
-
|
|
2131
|
+
/** Read by NamespaceReadFanoutCoordinator (seam 26), hence not `private`. */
|
|
2132
|
+
static readonly ARTIFACT_STATUS_CACHE_TTL_MS = 60000;
|
|
2113
2133
|
private accessTrackingBuffer;
|
|
2114
2134
|
private passiveCorrectionDedup;
|
|
2115
2135
|
private _passiveCorrectionService;
|
|
@@ -2400,36 +2420,6 @@ declare class Orchestrator {
|
|
|
2400
2420
|
private hasContentHashDedup;
|
|
2401
2421
|
private addContentHashDedup;
|
|
2402
2422
|
private removeContentHashForMemory;
|
|
2403
|
-
/**
|
|
2404
|
-
* Issue #1671 — backfill bi-temporal bounds onto an existing promoted/deduped
|
|
2405
|
-
* copy that was written BEFORE the source fact carried a resolved
|
|
2406
|
-
* `invalid_at`/`observedAt`/`eventTimeSource`.
|
|
2407
|
-
*
|
|
2408
|
-
* On re-extraction/backfill, a fact may now carry a resolved end bound (e.g.
|
|
2409
|
-
* "until June 2025") that the existing copy lacks because it was promoted
|
|
2410
|
-
* before bi-temporal wiring existed. Without this backfill, recall keeps
|
|
2411
|
-
* surfacing an expired fact even though the source copy now expires correctly.
|
|
2412
|
-
*
|
|
2413
|
-
* Finds the active fact in `targetStorage` matching `dedupContent`, then
|
|
2414
|
-
* patches the temporal frontmatter the existing copy is missing. Best-effort
|
|
2415
|
-
* / fail-open — any I/O error is logged and swallowed so the dedup
|
|
2416
|
-
* short-circuit is never blocked by a backfill failure.
|
|
2417
|
-
*
|
|
2418
|
-
* Matching: the stored `frontmatter.contentHash` is compared against
|
|
2419
|
-
* `ContentHashIndex.computeHash(dedupContent)` first (the exact hash the
|
|
2420
|
-
* content-hash index uses), then falls back to stripping citations and
|
|
2421
|
-
* comparing normalized bodies. This handles inline-attribution deployments
|
|
2422
|
-
* where the persisted body carries a citation marker the dedup key does not.
|
|
2423
|
-
*
|
|
2424
|
-
* I/O gate: only triggers when `invalidAt` is present (the end bound that
|
|
2425
|
-
* actually changes recall behavior by expiring the fact). `observedAt` and
|
|
2426
|
-
* `eventTimeSource` alone don'\''t expire a fact, so backfilling them without
|
|
2427
|
-
* an end bound would cause a full readAllMemories scan on every dedup hit
|
|
2428
|
-
* under biTemporal for no recall benefit.
|
|
2429
|
-
*
|
|
2430
|
-
* Only patches fields the existing copy LACKS — never overwrites a bound the
|
|
2431
|
-
* copy already carries.
|
|
2432
|
-
*/
|
|
2433
2423
|
private backfillTemporalBoundsOnDedupHit;
|
|
2434
2424
|
private saveContentHashIndexes;
|
|
2435
2425
|
constructor(config: PluginConfig);
|
|
@@ -2480,27 +2470,6 @@ declare class Orchestrator {
|
|
|
2480
2470
|
initialize(): Promise<void>;
|
|
2481
2471
|
private deferredInitialize;
|
|
2482
2472
|
startupSearchSync(signal?: AbortSignal): Promise<boolean>;
|
|
2483
|
-
/**
|
|
2484
|
-
* Run the pattern-reinforcement maintenance job (issue #687 PR 2/4).
|
|
2485
|
-
*
|
|
2486
|
-
* Cadence-gated on `patternReinforcementCadenceMs` so every caller
|
|
2487
|
-
* (orchestrator cron path, MCP tool, CLI) shares a single floor —
|
|
2488
|
-
* none can call this on a hot loop and burn the corpus. When the
|
|
2489
|
-
* feature is disabled or the cadence has not elapsed, returns a
|
|
2490
|
-
* synthetic "skipped" result rather than throwing.
|
|
2491
|
-
*
|
|
2492
|
-
* Cadence tracking is per-namespace so a tenant-scoped MCP run in
|
|
2493
|
-
* one namespace does not silence a cron run in another (PR #730
|
|
2494
|
-
* review feedback, Codex P2). Pass `force: true` for ad-hoc
|
|
2495
|
-
* operator runs that must bypass the cadence floor — mirrors the
|
|
2496
|
-
* pattern used by other maintenance MCP tools.
|
|
2497
|
-
*
|
|
2498
|
-
* `force` deliberately does NOT bypass the master
|
|
2499
|
-
* `patternReinforcementEnabled` flag (PR #730 review feedback,
|
|
2500
|
-
* Cursor Medium). Operators who have explicitly disabled the
|
|
2501
|
-
* feature must not have their corpus mutated by an MCP tool call —
|
|
2502
|
-
* the only way to run the job is to enable the feature in config.
|
|
2503
|
-
*/
|
|
2504
2473
|
runPatternReinforcement(options?: {
|
|
2505
2474
|
force?: boolean;
|
|
2506
2475
|
namespace?: string;
|
|
@@ -2510,12 +2479,6 @@ declare class Orchestrator {
|
|
|
2510
2479
|
namespace: string;
|
|
2511
2480
|
result?: PatternReinforcementResult;
|
|
2512
2481
|
}>;
|
|
2513
|
-
/**
|
|
2514
|
-
* Fan out pattern reinforcement across all maintained namespaces (issue #1500).
|
|
2515
|
-
* Delegates per-namespace execution to {@link runPatternReinforcement} while
|
|
2516
|
-
* the planner handles discovery, budgeting, locking, and status recording.
|
|
2517
|
-
* When namespaces are disabled, runs once against default storage.
|
|
2518
|
-
*/
|
|
2519
2482
|
runPatternReinforcementFanout(options?: {
|
|
2520
2483
|
force?: boolean;
|
|
2521
2484
|
}): Promise<NamespaceMaintenanceSummary>;
|
|
@@ -2588,10 +2551,6 @@ declare class Orchestrator {
|
|
|
2588
2551
|
* Returns null if no facts are found for today.
|
|
2589
2552
|
*/
|
|
2590
2553
|
generateDaySummaryAuto(namespace?: string, options?: DaySummaryGatherOptions): Promise<DaySummaryResult | null>;
|
|
2591
|
-
/**
|
|
2592
|
-
* Read today's facts and hourly summaries from storage, returning them
|
|
2593
|
-
* as a formatted string suitable for generateDaySummary().
|
|
2594
|
-
*/
|
|
2595
2554
|
gatherTodayFacts(namespace?: string, options?: DaySummaryGatherOptions): Promise<string>;
|
|
2596
2555
|
previewMemoryActionEvent(event: Omit<MemoryActionEvent, "timestamp"> & {
|
|
2597
2556
|
timestamp?: string;
|
|
@@ -2671,10 +2630,6 @@ declare class Orchestrator {
|
|
|
2671
2630
|
embedded?: boolean;
|
|
2672
2631
|
rebuilt?: boolean;
|
|
2673
2632
|
}>;
|
|
2674
|
-
/**
|
|
2675
|
-
* Validate local LLM model availability and context window compatibility.
|
|
2676
|
-
* Warns the user if there's a mismatch.
|
|
2677
|
-
*/
|
|
2678
2633
|
private validateLocalLlmModel;
|
|
2679
2634
|
recall(prompt: string, sessionKey?: string, options?: RecallInvocationOptions): Promise<string>;
|
|
2680
2635
|
/**
|
|
@@ -2762,6 +2717,27 @@ declare class Orchestrator {
|
|
|
2762
2717
|
*/
|
|
2763
2718
|
private _orchestratorInitCoordinator;
|
|
2764
2719
|
private get orchestratorInitCoordinator();
|
|
2720
|
+
/**
|
|
2721
|
+
* Persistence-index coordinator (issue #1526 seam 23). Owns post-persist
|
|
2722
|
+
* bookkeeping (content-hash dedup, temporal indexes, graph edges,
|
|
2723
|
+
* semantic dedup lookup). Lazy + accessor-wired (late-binding rule).
|
|
2724
|
+
*/
|
|
2725
|
+
private _persistenceIndexCoordinator;
|
|
2726
|
+
private get persistenceIndexCoordinator();
|
|
2727
|
+
/**
|
|
2728
|
+
* Workspace-ops coordinator (issue #1526 seam 24). Owns periodic
|
|
2729
|
+
* workspace/operations surfaces. Lazy + accessor-wired (late-binding
|
|
2730
|
+
* rule, seams 18–23).
|
|
2731
|
+
*/
|
|
2732
|
+
private _workspaceOpsCoordinator;
|
|
2733
|
+
private get workspaceOpsCoordinator();
|
|
2734
|
+
/**
|
|
2735
|
+
* Namespace read-fanout coordinator (issue #1526 seam 26). Owns
|
|
2736
|
+
* namespace-scoped read fanout (hints, cross-namespace search/reads,
|
|
2737
|
+
* artifact statuses). Lazy + accessor-wired (late-binding rule).
|
|
2738
|
+
*/
|
|
2739
|
+
private _namespaceReadFanoutCoordinator;
|
|
2740
|
+
private get namespaceReadFanoutCoordinator();
|
|
2765
2741
|
private recallInternal;
|
|
2766
2742
|
processTurn(role: "user" | "assistant", content: string, sessionKey?: string, options?: {
|
|
2767
2743
|
bufferKey?: string;
|
|
@@ -2816,13 +2792,6 @@ declare class Orchestrator {
|
|
|
2816
2792
|
* and through `ingestBulkImportBatch`.
|
|
2817
2793
|
*/
|
|
2818
2794
|
bulkImportWriteNamespace(): string;
|
|
2819
|
-
/**
|
|
2820
|
-
* Lazily-constructed wearables service (Limitless / Bee / Omi
|
|
2821
|
-
* transcript ingestion). All wearables surfaces — CLI, MCP tools,
|
|
2822
|
-
* HTTP routes — share this one instance so sync state, search, and
|
|
2823
|
-
* memory writes stay consistent. Writes are pinned to the same
|
|
2824
|
-
* deterministic namespace bulk-import uses.
|
|
2825
|
-
*/
|
|
2826
2795
|
getWearablesService(): WearablesService;
|
|
2827
2796
|
ingestBulkImportBatch(turns: ImportTurn[], options?: {
|
|
2828
2797
|
deadlineMs?: number;
|
|
@@ -2863,19 +2832,8 @@ declare class Orchestrator {
|
|
|
2863
2832
|
*/
|
|
2864
2833
|
private appendPersistedThreadEpisodes;
|
|
2865
2834
|
private indexPersistedMemory;
|
|
2866
|
-
/**
|
|
2867
|
-
* Build a graph edge for a persisted memory (v8.2).
|
|
2868
|
-
* Shared helper used by both the chunked and non-chunked write paths to avoid duplication.
|
|
2869
|
-
* Fail-open: caller wraps in try/catch.
|
|
2870
|
-
*/
|
|
2871
2835
|
private buildGraphEdge;
|
|
2872
2836
|
private graphIndexFor;
|
|
2873
|
-
/**
|
|
2874
|
-
* Batch-update temporal and tag indexes after extraction (v8.1).
|
|
2875
|
-
* Reads each persisted memory's path + frontmatter and adds them to
|
|
2876
|
-
* state/index_time.json and state/index_tags.json.
|
|
2877
|
-
* Fail-open: any error is logged but does not abort extraction.
|
|
2878
|
-
*/
|
|
2879
2837
|
private updateTemporalTagIndexes;
|
|
2880
2838
|
/** IDs of facts persisted in the last extraction */
|
|
2881
2839
|
private lastPersistedIds;
|
|
@@ -2908,8 +2866,12 @@ declare class Orchestrator {
|
|
|
2908
2866
|
memoriesAssessed: number;
|
|
2909
2867
|
}>;
|
|
2910
2868
|
private runLifecyclePolicyPass;
|
|
2911
|
-
/**
|
|
2912
|
-
|
|
2869
|
+
/**
|
|
2870
|
+
* Threshold (bytes) at which IDENTITY.md reflections get auto-consolidated.
|
|
2871
|
+
* Read by WorkspaceOpsCoordinator (seam 24) via `Orchestrator.…`, hence
|
|
2872
|
+
* not `private`.
|
|
2873
|
+
*/
|
|
2874
|
+
static readonly IDENTITY_CONSOLIDATE_THRESHOLD = 8000;
|
|
2913
2875
|
private autoConsolidateIdentity;
|
|
2914
2876
|
private formatQmdResults;
|
|
2915
2877
|
private formatObjectiveStateResults;
|
|
@@ -2947,21 +2909,6 @@ declare class Orchestrator {
|
|
|
2947
2909
|
private applyMmrToQmdResults;
|
|
2948
2910
|
private buildLastRecallBudgetSummary;
|
|
2949
2911
|
private collectLastRecallSources;
|
|
2950
|
-
/**
|
|
2951
|
-
* Issue #373 — nearest-neighbor lookup for the write-time semantic dedup
|
|
2952
|
-
* guard. Returns the top-K embedding hits against the currently indexed
|
|
2953
|
-
* memories, or an empty array when the embedding backend is unavailable.
|
|
2954
|
-
* Intentionally does NOT throw; `decideSemanticDedup` treats both "empty"
|
|
2955
|
-
* and "error" outcomes as fail-open (keep the candidate).
|
|
2956
|
-
*
|
|
2957
|
-
* PR #399 P1 fix: when namespaces are enabled the lookup must be scoped
|
|
2958
|
-
* to the SAME namespace as the fact being written. Otherwise a
|
|
2959
|
-
* high-similarity memory from another namespace can suppress a write in
|
|
2960
|
-
* the target namespace — cross-tenant data loss. Callers pass the target
|
|
2961
|
-
* storage so we can translate its root directory into the correct index
|
|
2962
|
-
* path prefix (and, for the legacy default-namespace layout at
|
|
2963
|
-
* `memoryDir` root, an exclusion list for `namespaces/*`).
|
|
2964
|
-
*/
|
|
2965
2912
|
semanticDedupLookup(content: string, limit: number, targetStorage: StorageManager): Promise<SemanticDedupHit[]>;
|
|
2966
2913
|
/**
|
|
2967
2914
|
* Resolve the namespace-scoped filter to pass into
|
|
@@ -2986,10 +2933,6 @@ declare class Orchestrator {
|
|
|
2986
2933
|
* Updates are batched in memory and flushed during consolidation.
|
|
2987
2934
|
*/
|
|
2988
2935
|
trackMemoryAccess(memoryIds: string[]): void;
|
|
2989
|
-
/**
|
|
2990
|
-
* Flush access tracking buffer to disk.
|
|
2991
|
-
* Called during consolidation or when buffer is full.
|
|
2992
|
-
*/
|
|
2993
2936
|
flushAccessTracking(): Promise<void>;
|
|
2994
2937
|
private loadSearchResultMemoryMap;
|
|
2995
2938
|
private filterSearchResultsByRecallSafety;
|
|
@@ -3056,4 +2999,4 @@ declare class Orchestrator {
|
|
|
3056
2999
|
private readArchivedMemoriesForNamespaces;
|
|
3057
3000
|
}
|
|
3058
3001
|
|
|
3059
|
-
export { type
|
|
3002
|
+
export { type QueryAwarePrefilter as $, memoryStatusForMode as A, resolveSpeaker as B, resolveSyncDates as C, DEFAULT_SELF_NAME as D, sanitizeSessionKeyForFilename as E, saveSpeakerRegistry as F, type GraphRecallSnapshot as G, speakerRegistryKey as H, type IntentDebugSnapshot as I, speakersFilePath as J, syncWearableSource as K, wearableDayTag as L, wearableSourceLabel as M, writeDailyDigestMemory as N, Orchestrator as O, type PatternReinforcementResult as P, type BulkImportBatchIngestResult as Q, type ResolvedScopeProfilePlan as R, type ScopeProfileLayerResolution as S, BulkImportBatchPartialFailureError as T, COMPACTION_SIGNAL_MAX_AGE_MS as U, type DaySummaryGatherOptions as V, WearablesService as W, type ExtractionRunResult as X, type GraphRecallRankedResult as Y, type GraphRecallShadowComparison as Z, type QmdRecallSnapshot as _, type ScopeProfilePromotionResolution as a, type RecallInvocationOptions as a0, type RecallModeDecision as a1, appendMemoryToGraphContext as a2, applyQueryAwareCandidateFilter as a3, blendGraphExpandedRecallScore as a4, buildCompressionGuidelinesMarkdown as a5, buildMemoryPathById as a6, computeArtifactCandidateFetchLimit as a7, computeArtifactRecallLimit as a8, computeQmdHybridFetchLimit as a9, summarizeGraphShadowComparison as aA, targetSourceValidAtSortMs as aB, throwIfRecallAborted as aC, tokenizeRecallQuery as aD, utcDateKeysForLocalDay as aE, deriveTopicsFromExtraction as aa, filterHourlySummaryMarkdownForLocalDay as ab, filterRecallCandidates as ac, formatDateInTimeZone as ad, graphPathRelativeToStorage as ae, hasIdentityRecoveryIntent as af, isArtifactMemoryPath as ag, lifecycleRecallScoreAdjustment as ah, mapRecallSourceToXrayServedBy as ai, mergeArtifactRecallCandidates as aj, mergeGraphExpandedResults as ak, normalizeIanaTimeZone as al, parseFiniteDate as am, parseGraphRecallRankedResults as an, parseMemoryIntentSnapshot as ao, parseQmdRecallResults as ap, qmdStartupCollectionCheckWithTimeout as aq, raceRecallAbort as ar, resolveEffectiveIdentityInjectionMode as as, resolveEffectiveRecallMode as at, resolvePersistedMemoryRelativePath as au, resolveRecallModeDecision as av, resolveRecallModeDecisionAsync as aw, resolveRecentThreadMemoryPaths as ax, shouldFilterLifecycleRecallCandidate as ay, splitTurnsBySourceValidAt as az, type SpeakerRegistry as b, type ResolvedSpeaker as c, type SpeakerOverride as d, WEARABLE_SOURCE_PREFIX as e, type WearableDayTranscriptView as f, type WearableMemoryGenDeps as g, type WearableMemoryGenResult as h, type WearableMemorySearchResult as i, type WearableMemoryWriter as j, type WearableSearchBackend as k, type WearableStorageIo as l, type WearableSyncDeps as m, type WearableSyncOptions as n, type WearableTranscriptSearchResult as o, type WearablesServiceDeps as p, buildExtractionTurns as q, dateInTimezone as r, defaultTimezone as s, defaultWorkspaceDir as t, distinctSpeakerLabels as u, emptySpeakerRegistry as v, generateWearableMemories as w, importNativeMemories as x, loadSpeakerRegistry as y, locateTranscriptPath as z };
|