@remnic/core 9.3.741 → 9.3.743
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 +5 -5
- package/dist/access-boundary.js +10 -10
- package/dist/access-cli.js +32 -32
- package/dist/access-http.d.ts +5 -5
- package/dist/access-http.js +15 -15
- package/dist/access-mcp.d.ts +5 -5
- package/dist/access-mcp.js +14 -14
- package/dist/access-operations-batch.js +12 -12
- package/dist/access-operations.d.ts +5 -5
- package/dist/access-operations.js +13 -13
- package/dist/{access-service-Cbk-Kv_A.d.ts → access-service-BeW5GOg1.d.ts} +3 -3
- package/dist/access-service.d.ts +5 -5
- package/dist/access-service.js +9 -9
- package/dist/access-surface-catalog.d.ts +5 -5
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-memory-bridge.js +3 -3
- package/dist/active-recall.d.ts +1 -1
- package/dist/{auto-sync-G3V5AN4C.js → auto-sync-XHSKKQAH.js} +2 -2
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +4 -4
- package/dist/briefing.d.ts +1 -1
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/buffer.js +2 -2
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +10 -5
- package/dist/capabilities.js +1 -1
- package/dist/{catalog-_Bap6vfD.d.ts → catalog-CX0CjOaf.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 +2 -2
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-X5PMDVY4.js → chunk-3EA5LIFJ.js} +4 -4
- package/dist/{chunk-YNHRWFAP.js → chunk-4DLFJJOQ.js} +2 -2
- package/dist/{chunk-WIMKOTNY.js → chunk-5QANTTY2.js} +2 -2
- package/dist/{chunk-QCO2QFLZ.js → chunk-5UNSGRCR.js} +7 -6
- package/dist/{chunk-QCO2QFLZ.js.map → chunk-5UNSGRCR.js.map} +1 -1
- package/dist/{chunk-Y6PNYJVO.js → chunk-A2KKLCOS.js} +2 -2
- package/dist/{chunk-O4IWVWSW.js → chunk-AVBT5WEW.js} +3 -3
- package/dist/{chunk-M5KLYHHI.js → chunk-BYLC4DKI.js} +2 -2
- package/dist/{chunk-OZECYVGI.js → chunk-C7LDPZJJ.js} +6 -4
- package/dist/{chunk-OZECYVGI.js.map → chunk-C7LDPZJJ.js.map} +1 -1
- package/dist/{chunk-UOVDO6TC.js → chunk-CHELXDTO.js} +3 -3
- package/dist/{chunk-TQQN64J2.js → chunk-DBSMLRTO.js} +2 -2
- package/dist/{chunk-4J53ZVPQ.js → chunk-DYK27X7V.js} +3 -3
- package/dist/{chunk-K2N6WIZM.js → chunk-E7RGJQWP.js} +2 -2
- package/dist/{chunk-M4WI23X3.js → chunk-EEKDRAWX.js} +2 -2
- package/dist/{chunk-H3WSZWHK.js → chunk-G5FP7VSQ.js} +13 -12
- package/dist/chunk-G5FP7VSQ.js.map +1 -0
- package/dist/{chunk-BE6NEQLF.js → chunk-HAZVVOYT.js} +3 -3
- package/dist/{chunk-OT5K26NG.js → chunk-HM6UJPPO.js} +2 -2
- package/dist/{chunk-PI4JHLDD.js → chunk-IP5SANO2.js} +2 -2
- package/dist/{chunk-WHEF76BQ.js → chunk-JRZV3767.js} +2 -2
- package/dist/{chunk-OS5RKJOH.js → chunk-JZ7P26GF.js} +2 -2
- package/dist/{chunk-Y62QPRKV.js → chunk-K5LLP4CY.js} +2 -2
- package/dist/{chunk-C3Z5YJSM.js → chunk-LOPZ2DWR.js} +2 -2
- package/dist/{chunk-BJPL5WAL.js → chunk-MXDG6SRH.js} +3 -3
- package/dist/{chunk-UYYSOMS2.js → chunk-NBP3YHHS.js} +4 -4
- package/dist/{chunk-USHVHI6J.js → chunk-NNL4LJAD.js} +3 -3
- package/dist/{chunk-GPX5E36D.js → chunk-OSMBC3JU.js} +2 -2
- package/dist/{chunk-OUSOMUFV.js → chunk-PE6XR4GG.js} +2 -2
- package/dist/{chunk-DGVM5SFL.js → chunk-PHRLJFWZ.js} +3 -2
- package/dist/{chunk-DGVM5SFL.js.map → chunk-PHRLJFWZ.js.map} +1 -1
- package/dist/{chunk-CMPXLMC3.js → chunk-PI23H7FV.js} +3 -3
- package/dist/{chunk-WGDE2TJP.js → chunk-QOGXUNWL.js} +4 -4
- package/dist/{chunk-ELL5VYXC.js → chunk-RNWWAS5V.js} +3 -3
- package/dist/{chunk-LD6A7XG5.js → chunk-TQPSOTC7.js} +7 -7
- package/dist/{chunk-AX4TRSRE.js → chunk-U5WVRMCA.js} +2 -2
- package/dist/{chunk-773DPI6T.js → chunk-V5RVMULT.js} +11 -8
- package/dist/chunk-V5RVMULT.js.map +1 -0
- package/dist/{chunk-DBVBV2RF.js → chunk-VE54E6RP.js} +4 -4
- package/dist/{chunk-VC7QELR6.js → chunk-VO4VARZL.js} +1054 -869
- package/dist/chunk-VO4VARZL.js.map +1 -0
- package/dist/{chunk-G7Q4D2G3.js → chunk-VSF7AAGE.js} +1 -3
- package/dist/chunk-VSF7AAGE.js.map +1 -0
- package/dist/{chunk-OVYBENIJ.js → chunk-W3M34XT4.js} +3 -3
- package/dist/{chunk-XPOOY35N.js → chunk-W4H5A3TJ.js} +3 -2
- package/dist/chunk-W4H5A3TJ.js.map +1 -0
- package/dist/{chunk-7Y5KKMIP.js → chunk-WPLRJ4XM.js} +9 -8
- package/dist/{chunk-7Y5KKMIP.js.map → chunk-WPLRJ4XM.js.map} +1 -1
- package/dist/{chunk-3TUDKDTQ.js → chunk-XEADGIAA.js} +6 -6
- package/dist/{cli-BQW2xKdb.d.ts → cli-BYad9YYY.d.ts} +3 -3
- package/dist/cli.d.ts +6 -6
- package/dist/cli.js +21 -21
- package/dist/compounding/engine.d.ts +1 -1
- package/dist/compounding/engine.js +3 -3
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +2 -2
- 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/contradiction/index.js +2 -2
- package/dist/{contradiction-scan-UERKJESC.js → contradiction-scan-3FJYWS3G.js} +3 -3
- 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/day-summary.js +2 -2
- 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/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +1 -1
- package/dist/entity-retrieval.js +2 -2
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +4 -4
- package/dist/explicit-capture.js +2 -2
- 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/extraction.js +4 -4
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-GQ3UQNIL.js → first-start-migration-4I3VDSYS.js} +2 -2
- 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-recall.js +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +40 -40
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +2 -2
- package/dist/lcm/summarizer.js +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-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- 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 +6 -6
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/principal.js +2 -2
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +2 -2
- package/dist/namespaces/storage.js +2 -2
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +11 -11
- package/dist/orchestration/compression-guideline-coordinator.d.ts +1 -1
- package/dist/orchestration/compression-guideline-coordinator.js +2 -2
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +6 -6
- package/dist/{orchestrator-BOAFN_Yr.d.ts → orchestrator-CupigmWu.d.ts} +221 -7
- package/dist/orchestrator.d.ts +4 -4
- package/dist/orchestrator.js +27 -27
- 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-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-renderer.d.ts +1 -1
- package/dist/recall-xray.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/embed-helper.js +2 -2
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +3 -3
- 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-DsIEiCka.d.ts → semantic-consolidation-ByzGwC9c.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +2 -2
- package/dist/semantic-rule-verifier.d.ts +1 -1
- 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/shared-context/manager.js +2 -2
- package/dist/signal.d.ts +1 -1
- package/dist/storage.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +3 -3
- 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/{tier-stats-CSKL7BDG.js → tier-stats-5XF4UBRQ.js} +2 -2
- 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-CglNn2V-.d.ts → types-5Jik3r4G.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/package.json +2 -2
- package/src/capabilities.test.ts +0 -2
- package/src/capabilities.ts +7 -6
- package/src/cli.ts +2 -1
- package/src/graph-recall.ts +2 -1
- package/src/lcm/engine.ts +9 -6
- package/src/lcm/summarizer.ts +2 -1
- package/src/operator-toolkit.ts +2 -1
- package/src/orchestration/contradiction-linking-coordinator.ts +336 -0
- package/src/orchestration/qmd-result-resolver.ts +377 -0
- package/src/orchestration/recall-section-coordinator.ts +349 -0
- package/src/orchestrator.ts +81 -679
- package/src/procedural/procedure-stats.ts +2 -1
- package/src/wearables/pipeline.ts +5 -3
- package/dist/chunk-773DPI6T.js.map +0 -1
- package/dist/chunk-G7Q4D2G3.js.map +0 -1
- package/dist/chunk-H3WSZWHK.js.map +0 -1
- package/dist/chunk-VC7QELR6.js.map +0 -1
- package/dist/chunk-XPOOY35N.js.map +0 -1
- /package/dist/{auto-sync-G3V5AN4C.js.map → auto-sync-XHSKKQAH.js.map} +0 -0
- /package/dist/{chunk-X5PMDVY4.js.map → chunk-3EA5LIFJ.js.map} +0 -0
- /package/dist/{chunk-YNHRWFAP.js.map → chunk-4DLFJJOQ.js.map} +0 -0
- /package/dist/{chunk-WIMKOTNY.js.map → chunk-5QANTTY2.js.map} +0 -0
- /package/dist/{chunk-Y6PNYJVO.js.map → chunk-A2KKLCOS.js.map} +0 -0
- /package/dist/{chunk-O4IWVWSW.js.map → chunk-AVBT5WEW.js.map} +0 -0
- /package/dist/{chunk-M5KLYHHI.js.map → chunk-BYLC4DKI.js.map} +0 -0
- /package/dist/{chunk-UOVDO6TC.js.map → chunk-CHELXDTO.js.map} +0 -0
- /package/dist/{chunk-TQQN64J2.js.map → chunk-DBSMLRTO.js.map} +0 -0
- /package/dist/{chunk-4J53ZVPQ.js.map → chunk-DYK27X7V.js.map} +0 -0
- /package/dist/{chunk-K2N6WIZM.js.map → chunk-E7RGJQWP.js.map} +0 -0
- /package/dist/{chunk-M4WI23X3.js.map → chunk-EEKDRAWX.js.map} +0 -0
- /package/dist/{chunk-BE6NEQLF.js.map → chunk-HAZVVOYT.js.map} +0 -0
- /package/dist/{chunk-OT5K26NG.js.map → chunk-HM6UJPPO.js.map} +0 -0
- /package/dist/{chunk-PI4JHLDD.js.map → chunk-IP5SANO2.js.map} +0 -0
- /package/dist/{chunk-WHEF76BQ.js.map → chunk-JRZV3767.js.map} +0 -0
- /package/dist/{chunk-OS5RKJOH.js.map → chunk-JZ7P26GF.js.map} +0 -0
- /package/dist/{chunk-Y62QPRKV.js.map → chunk-K5LLP4CY.js.map} +0 -0
- /package/dist/{chunk-C3Z5YJSM.js.map → chunk-LOPZ2DWR.js.map} +0 -0
- /package/dist/{chunk-BJPL5WAL.js.map → chunk-MXDG6SRH.js.map} +0 -0
- /package/dist/{chunk-UYYSOMS2.js.map → chunk-NBP3YHHS.js.map} +0 -0
- /package/dist/{chunk-USHVHI6J.js.map → chunk-NNL4LJAD.js.map} +0 -0
- /package/dist/{chunk-GPX5E36D.js.map → chunk-OSMBC3JU.js.map} +0 -0
- /package/dist/{chunk-OUSOMUFV.js.map → chunk-PE6XR4GG.js.map} +0 -0
- /package/dist/{chunk-CMPXLMC3.js.map → chunk-PI23H7FV.js.map} +0 -0
- /package/dist/{chunk-WGDE2TJP.js.map → chunk-QOGXUNWL.js.map} +0 -0
- /package/dist/{chunk-ELL5VYXC.js.map → chunk-RNWWAS5V.js.map} +0 -0
- /package/dist/{chunk-LD6A7XG5.js.map → chunk-TQPSOTC7.js.map} +0 -0
- /package/dist/{chunk-AX4TRSRE.js.map → chunk-U5WVRMCA.js.map} +0 -0
- /package/dist/{chunk-DBVBV2RF.js.map → chunk-VE54E6RP.js.map} +0 -0
- /package/dist/{chunk-OVYBENIJ.js.map → chunk-W3M34XT4.js.map} +0 -0
- /package/dist/{chunk-3TUDKDTQ.js.map → chunk-XEADGIAA.js.map} +0 -0
- /package/dist/{contradiction-scan-UERKJESC.js.map → contradiction-scan-3FJYWS3G.js.map} +0 -0
- /package/dist/{first-start-migration-GQ3UQNIL.js.map → first-start-migration-4I3VDSYS.js.map} +0 -0
- /package/dist/{tier-stats-CSKL7BDG.js.map → tier-stats-5XF4UBRQ.js.map} +0 -0
package/dist/topics.d.ts
CHANGED
package/dist/transcript.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PluginConfig, T as TranscriptEntry, v as Checkpoint } from './types-
|
|
1
|
+
import { P as PluginConfig, T as TranscriptEntry, v as Checkpoint } from './types-5Jik3r4G.js';
|
|
2
2
|
import { SessionIntegrityReport } from './session-integrity.js';
|
|
3
3
|
import './types-gb_SNtjR.js';
|
|
4
4
|
import './message-parts/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TrustScoreResult, TrustSignals, TrustBand, TrustScoreComponent } from './trust-score.js';
|
|
2
|
-
import { F as FaithfulnessFrontmatter, J as ProvenanceSource, K as TrustWeights } from './types-
|
|
2
|
+
import { F as FaithfulnessFrontmatter, J as ProvenanceSource, K as TrustWeights } from './types-5Jik3r4G.js';
|
|
3
3
|
import './types-gb_SNtjR.js';
|
|
4
4
|
import './message-parts/index.js';
|
|
5
5
|
|
package/dist/trust-score.d.ts
CHANGED
|
@@ -3659,4 +3659,4 @@ interface HourlySummary {
|
|
|
3659
3659
|
generatedAt: string;
|
|
3660
3660
|
}
|
|
3661
3661
|
|
|
3662
|
-
export { type MemoryActionEvent as $, type ActiveRecallChatType as A, type BehaviorSignalEvent as B, type CalendarSource as C, type DaySummaryResult as D, type EntityFile as E, type FaithfulnessFrontmatter as F, type GatewayConfig as G, type HourlySummary as H, type IdentityInjectionMode as I, type ProvenanceSource as J, type TrustWeights as K, type LiveConnectorsConfig as L, type MemoryCategory as M, type ImportanceLevel as N, type BufferSurpriseEvent as O, type PluginConfig as P, type QmdSearchResult as Q, type RecallTierExplain as R, type SessionObserverBandConfig as S, type TranscriptEntry as T, type SecretRef as U, type VerificationState as V, type AgentAccessAuthToken as W, type CompressionGuidelineOptimizerEventCounts as X, type CompressionGuidelineOptimizerActionSummary as Y, type CompressionGuidelineOptimizerRuleUpdate as Z, type MemoryActionType as _, type ActiveRecallQueryMode as a, type
|
|
3662
|
+
export { type MemoryActionEvent as $, type ActiveRecallChatType as A, type BehaviorSignalEvent as B, type CalendarSource as C, type DaySummaryResult as D, type EntityFile as E, type FaithfulnessFrontmatter as F, type GatewayConfig as G, type HourlySummary as H, type IdentityInjectionMode as I, type ProvenanceSource as J, type TrustWeights as K, type LiveConnectorsConfig as L, type MemoryCategory as M, type ImportanceLevel as N, type BufferSurpriseEvent as O, type PluginConfig as P, type QmdSearchResult as Q, type RecallTierExplain as R, type SessionObserverBandConfig as S, type TranscriptEntry as T, type SecretRef as U, type VerificationState as V, type AgentAccessAuthToken as W, type CompressionGuidelineOptimizerEventCounts as X, type CompressionGuidelineOptimizerActionSummary as Y, type CompressionGuidelineOptimizerRuleUpdate as Z, type MemoryActionType as _, type ActiveRecallQueryMode as a, type ExtractedFact as a$, type CompressionGuidelineOptimizerState as a0, type EntityMention as a1, type EntitySchemaDefinition as a2, type EntitySchemaSectionDefinition as a3, type EntityStructuredSection as a4, type ContinuityIncidentRecord as a5, type ContinuityIncidentCloseInput as a6, type ContinuityIncidentOpenInput as a7, type ContinuityImprovementLoop as a8, type ContinuityLoopReviewInput as a9, type CodingContext as aA, type DreamsStatusResult as aB, type DreamsPhase as aC, type DreamsRunResult as aD, type WearableConversation as aE, type WearableSourceSettings as aF, type WearableNativeMemory as aG, type WearableMemoryMode as aH, type WearableSourceConnector as aI, type WearablesConfig as aJ, type WearableSyncSummary as aK, type WearableSourceStatus as aL, type WearableDayTranscript as aM, type WearableCorrectionRule as aN, type RecallSectionConfig as aO, type BootstrapOptions as aP, type BootstrapResult as aQ, type ConsolidationObservation as aR, type CodingModeConfig as aS, type CodingKnowledgeConfig as aT, type WearableCleanupSettings as aU, type WearableDayTranscriptMeta as aV, type BriefingConfig as aW, type BriefingOpenCommitment as aX, type BriefingWindow as aY, type CodexCompatConfig as aZ, DEFAULT_RECALL_DISCLOSURE as a_, type ContinuityLoopUpsertInput as aa, type ImportanceScore as ab, type MemoryIntent as ac, type QmdSearchExplain as ad, type MemoryActionEligibilityContext as ae, type MemoryActionPolicyResult as af, type MemoryLifecycleEventType as ag, type MemoryLifecycleStateSummary as ah, type ModelProviderConfig as ai, type NativeKnowledgeConfig as aj, type ProvenanceConfig as ak, type RetrievalTier as al, type SignalScanResult as am, type ConversationThread as an, type TopicScore as ao, type MemoryLink as ap, type BufferState as aq, type MetaState as ar, type FileHygieneConfig as as, type EntityRelationship as at, type EntityActivityEntry as au, type AccessTrackingEntry as av, type MemorySummary as aw, type ScopeProfileLayerId as ax, type ScopeProfilePromotionTarget as ay, type ScopeProfileConfig as az, type ActiveRecallPromptStyle as b, type ModelProviderAuthMode as b$, type MemoryActionEligibilitySource as b0, type MemoryObservation as b1, type MemoryScope as b2, RECALL_DISCLOSURE_LEVELS as b3, type WearableAuthCheck as b4, type WearableFetchOptions as b5, type WearableFetchPage as b6, type WearableNativeMemoryPage as b7, type WearableTranscriptSegment as b8, isRecallDisclosure as b9, type DreamsDeepSleepConfig as bA, type DreamsLightSleepConfig as bB, type DreamsPhaseStatus as bC, type DreamsPhasesConfig as bD, type DreamsRemConfig as bE, type EngramTraceEvent as bF, type EntityTimelineEntry as bG, type ExtractedProcedureStep as bH, type ExtractedQuestion as bI, type ExtractedReasoningTrace as bJ, type ExtractedReasoningTraceStep as bK, type ExtractedRelationship as bL, type ExtractionPassSource as bM, type GitHubLiveConnectorConfig as bN, type GmailLiveConnectorConfig as bO, type GoogleDriveLiveConnectorConfig as bP, type HeartbeatConfig as bQ, type HeartbeatDetectionMode as bR, type LlmTraceCallback as bS, type LlmTraceEvent as bT, type MemoryActionOutcome as bU, type MemoryActionPolicyDecision as bV, type MemoryActionStatus as bW, type MemoryLinkType as bX, type MemoryOsPresetName as bY, type ModelApi as bZ, type ModelDefinitionConfig as b_, type AgentAccessHttpConfig as ba, type AgentDefaultsConfig as bb, type AgentPersona as bc, type BehaviorLoopAdjustment as bd, type BehaviorSignalDirection as be, type BehaviorSignalType as bf, type BriefingCalendarSourceError as bg, type BufferEntryState as bh, type CaptureMode as bi, type ChatConfig as bj, type CodexCliReasoningEffort as bk, type CodexCompactionFlushMode as bl, type CodexConnectorConfig as bm, type CompressionGuidelineActivationState as bn, type CompressionGuidelineOptimizerSourceWindow as bo, type ConfidenceTier as bp, type ConsolidationAction as bq, type ConsolidationItem as br, type ContinuityIncidentState as bs, type ContinuityLoopCadence as bt, type ContinuityLoopStatus as bu, type ContradictionScanConfig as bv, type CronConversationRecallMode as bw, type CronRecallMode as bx, type DreamingConfig as by, type DreamingNarrativePromptStyle as bz, type ActiveRecallThinking as c, type NamespacePolicy as c0, type NativeKnowledgeFolderRuleConfig as c1, type NativeKnowledgeObsidianVaultConfig as c2, type NativeKnowledgeOpenClawWorkspaceConfig as c3, type NotionLiveConnectorConfig as c4, type PrincipalFromSessionKeyMode as c5, type PrincipalRule as c6, type ProceduralConfig as c7, type QuestionEntry as c8, type ReasoningEffort as c9, type RecallPipelineConfig as ca, type RecallTraceEvent as cb, type RelevanceFeedback as cc, SPECULATIVE_TTL_DAYS as cd, type ScopeProfileAutoPromoteConfig as ce, type ScopeProfileTeamProjectConfig as cf, type ScopeTeamConfig as cg, type ScoredEntity as ch, type SemanticChunkingConfigShape as ci, type SignalLevel as cj, type SlotBehaviorConfig as ck, type SlotMismatchMode as cl, type TriggerMode as cm, confidenceTier as cn, type ActiveRecallModelFallbackPolicy as d, type BehaviorLoopPolicyState as e, type MemoryStatus as f, type MemoryFile as g, type RecallPlanMode as h, type RecallDisclosure as i, type AgentPersonaModelConfig as j, type MemoryFrontmatter as k, type MemoryProjectionCurrentState as l, type MemoryLifecycleEvent as m, type BriefingSections as n, type BriefingFollowup as o, type BriefingFocus as p, type CalendarEvent as q, type BriefingActiveThread as r, type BriefingResult as s, type BriefingRecentEntity as t, type BufferTurn as u, type Checkpoint as v, type LifecycleState as w, type PolicyClass as x, type ExtractionResult as y, type ConsolidationResult as z };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './types-gb_SNtjR.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
|
-
export { av as AccessTrackingEntry, A as ActiveRecallChatType, d as ActiveRecallModelFallbackPolicy, b as ActiveRecallPromptStyle, a as ActiveRecallQueryMode, c as ActiveRecallThinking, W as AgentAccessAuthToken,
|
|
3
|
+
export { av as AccessTrackingEntry, A as ActiveRecallChatType, d as ActiveRecallModelFallbackPolicy, b as ActiveRecallPromptStyle, a as ActiveRecallQueryMode, c as ActiveRecallThinking, W as AgentAccessAuthToken, ba as AgentAccessHttpConfig, bb as AgentDefaultsConfig, bc as AgentPersona, j as AgentPersonaModelConfig, bd as BehaviorLoopAdjustment, e as BehaviorLoopPolicyState, be as BehaviorSignalDirection, B as BehaviorSignalEvent, bf as BehaviorSignalType, aP as BootstrapOptions, aQ as BootstrapResult, r as BriefingActiveThread, bg as BriefingCalendarSourceError, aW as BriefingConfig, p as BriefingFocus, o as BriefingFollowup, aX as BriefingOpenCommitment, t as BriefingRecentEntity, s as BriefingResult, n as BriefingSections, aY as BriefingWindow, bh as BufferEntryState, aq as BufferState, O as BufferSurpriseEvent, u as BufferTurn, q as CalendarEvent, C as CalendarSource, bi as CaptureMode, bj as ChatConfig, v as Checkpoint, bk as CodexCliReasoningEffort, bl as CodexCompactionFlushMode, aZ as CodexCompatConfig, bm as CodexConnectorConfig, aA as CodingContext, aT as CodingKnowledgeConfig, aS as CodingModeConfig, bn as CompressionGuidelineActivationState, Y as CompressionGuidelineOptimizerActionSummary, X as CompressionGuidelineOptimizerEventCounts, Z as CompressionGuidelineOptimizerRuleUpdate, bo as CompressionGuidelineOptimizerSourceWindow, a0 as CompressionGuidelineOptimizerState, bp as ConfidenceTier, bq as ConsolidationAction, br as ConsolidationItem, aR as ConsolidationObservation, z as ConsolidationResult, a8 as ContinuityImprovementLoop, a6 as ContinuityIncidentCloseInput, a7 as ContinuityIncidentOpenInput, a5 as ContinuityIncidentRecord, bs as ContinuityIncidentState, bt as ContinuityLoopCadence, a9 as ContinuityLoopReviewInput, bu as ContinuityLoopStatus, aa as ContinuityLoopUpsertInput, bv as ContradictionScanConfig, an as ConversationThread, bw as CronConversationRecallMode, bx as CronRecallMode, a_ as DEFAULT_RECALL_DISCLOSURE, D as DaySummaryResult, by as DreamingConfig, bz as DreamingNarrativePromptStyle, bA as DreamsDeepSleepConfig, bB as DreamsLightSleepConfig, aC as DreamsPhase, bC as DreamsPhaseStatus, bD as DreamsPhasesConfig, bE as DreamsRemConfig, aD as DreamsRunResult, aB as DreamsStatusResult, bF as EngramTraceEvent, au as EntityActivityEntry, E as EntityFile, a1 as EntityMention, at as EntityRelationship, a2 as EntitySchemaDefinition, a3 as EntitySchemaSectionDefinition, a4 as EntityStructuredSection, bG as EntityTimelineEntry, a$ as ExtractedFact, bH as ExtractedProcedureStep, bI as ExtractedQuestion, bJ as ExtractedReasoningTrace, bK as ExtractedReasoningTraceStep, bL as ExtractedRelationship, bM as ExtractionPassSource, y as ExtractionResult, F as FaithfulnessFrontmatter, as as FileHygieneConfig, G as GatewayConfig, bN as GitHubLiveConnectorConfig, bO as GmailLiveConnectorConfig, bP as GoogleDriveLiveConnectorConfig, bQ as HeartbeatConfig, bR as HeartbeatDetectionMode, H as HourlySummary, I as IdentityInjectionMode, N as ImportanceLevel, ab as ImportanceScore, w as LifecycleState, L as LiveConnectorsConfig, bS as LlmTraceCallback, bT as LlmTraceEvent, ae as MemoryActionEligibilityContext, b0 as MemoryActionEligibilitySource, $ as MemoryActionEvent, bU as MemoryActionOutcome, bV as MemoryActionPolicyDecision, af as MemoryActionPolicyResult, bW as MemoryActionStatus, _ as MemoryActionType, M as MemoryCategory, g as MemoryFile, k as MemoryFrontmatter, ac as MemoryIntent, m as MemoryLifecycleEvent, ag as MemoryLifecycleEventType, ah as MemoryLifecycleStateSummary, ap as MemoryLink, bX as MemoryLinkType, b1 as MemoryObservation, bY as MemoryOsPresetName, l as MemoryProjectionCurrentState, b2 as MemoryScope, f as MemoryStatus, aw as MemorySummary, ar as MetaState, bZ as ModelApi, b_ as ModelDefinitionConfig, b$ as ModelProviderAuthMode, ai as ModelProviderConfig, c0 as NamespacePolicy, aj as NativeKnowledgeConfig, c1 as NativeKnowledgeFolderRuleConfig, c2 as NativeKnowledgeObsidianVaultConfig, c3 as NativeKnowledgeOpenClawWorkspaceConfig, c4 as NotionLiveConnectorConfig, P as PluginConfig, x as PolicyClass, c5 as PrincipalFromSessionKeyMode, c6 as PrincipalRule, c7 as ProceduralConfig, ak as ProvenanceConfig, J as ProvenanceSource, ad as QmdSearchExplain, Q as QmdSearchResult, c8 as QuestionEntry, b3 as RECALL_DISCLOSURE_LEVELS, c9 as ReasoningEffort, i as RecallDisclosure, ca as RecallPipelineConfig, h as RecallPlanMode, aO as RecallSectionConfig, R as RecallTierExplain, cb as RecallTraceEvent, cc as RelevanceFeedback, al as RetrievalTier, cd as SPECULATIVE_TTL_DAYS, ce as ScopeProfileAutoPromoteConfig, az as ScopeProfileConfig, ax as ScopeProfileLayerId, ay as ScopeProfilePromotionTarget, cf as ScopeProfileTeamProjectConfig, cg as ScopeTeamConfig, ch as ScoredEntity, U as SecretRef, ci as SemanticChunkingConfigShape, S as SessionObserverBandConfig, cj as SignalLevel, am as SignalScanResult, ck as SlotBehaviorConfig, cl as SlotMismatchMode, ao as TopicScore, T as TranscriptEntry, cm as TriggerMode, K as TrustWeights, V as VerificationState, cn as confidenceTier, b9 as isRecallDisclosure } from './types-5Jik3r4G.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.743",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3000,7 +3000,7 @@
|
|
|
3000
3000
|
"core"
|
|
3001
3001
|
],
|
|
3002
3002
|
"peerDependencies": {
|
|
3003
|
-
"@remnic/coding-graph": "^9.3.
|
|
3003
|
+
"@remnic/coding-graph": "^9.3.743"
|
|
3004
3004
|
},
|
|
3005
3005
|
"peerDependenciesMeta": {
|
|
3006
3006
|
"@remnic/coding-graph": {
|
package/src/capabilities.test.ts
CHANGED
|
@@ -1192,7 +1192,6 @@ const RECALL_ENH_FIELD_TO_FLAG: Record<keyof RecallEnhancementCapabilitySet, str
|
|
|
1192
1192
|
compoundingInject: "compoundingInjectEnabled",
|
|
1193
1193
|
accessTracking: "accessTrackingEnabled",
|
|
1194
1194
|
autoPromoteToShared: "autoPromoteToSharedEnabled",
|
|
1195
|
-
recallGraph: "recallGraphEnabled",
|
|
1196
1195
|
feedback: "feedbackEnabled",
|
|
1197
1196
|
identity: "identityEnabled",
|
|
1198
1197
|
};
|
|
@@ -1293,7 +1292,6 @@ const CONV_CTX_FIELD_TO_FLAG: Record<keyof ConversationContextCapabilitySet, str
|
|
|
1293
1292
|
cmcConsolidation: "cmcConsolidationEnabled",
|
|
1294
1293
|
maintenanceNamespaceFanout: "maintenanceNamespaceFanoutEnabled",
|
|
1295
1294
|
citations: "citationsEnabled",
|
|
1296
|
-
behaviorLoopAutoTune: "behaviorLoopAutoTuneEnabled",
|
|
1297
1295
|
semanticRulePromotion: "semanticRulePromotionEnabled",
|
|
1298
1296
|
codexMarketplace: "codexMarketplaceEnabled",
|
|
1299
1297
|
};
|
package/src/capabilities.ts
CHANGED
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
* This is plumbing, not a feature — there is deliberately NO `enabled` gate for
|
|
20
20
|
* the CapabilitySet itself (rule 30 governs behavior changes; resolving and
|
|
21
21
|
* threading a capability projection must stay behavior-preserving).
|
|
22
|
+
*
|
|
23
|
+
* Flag-retirement audit (#1780, 2026-07-08): all projected fields across 18
|
|
24
|
+
* capability sets were verified for live consumers. Two dead projections found
|
|
25
|
+
* and removed: recallGraph (RecallEnhancementCapabilitySet — production reads
|
|
26
|
+
* recallGraphEnabled directly via graph-recall.ts) and behaviorLoopAutoTune
|
|
27
|
+
* (ConversationContextCapabilitySet — production reads behaviorLoopAutoTuneEnabled
|
|
28
|
+
* directly via cli.ts). The flags themselves remain alive.
|
|
22
29
|
*/
|
|
23
30
|
|
|
24
31
|
import type { PluginConfig } from "./types.js";
|
|
@@ -1053,7 +1060,6 @@ export interface RecallEnhancementCapabilitySet {
|
|
|
1053
1060
|
readonly compoundingInject: boolean;
|
|
1054
1061
|
readonly accessTracking: boolean;
|
|
1055
1062
|
readonly autoPromoteToShared: boolean;
|
|
1056
|
-
readonly recallGraph: boolean;
|
|
1057
1063
|
readonly feedback: boolean;
|
|
1058
1064
|
readonly identity: boolean;
|
|
1059
1065
|
}
|
|
@@ -1084,7 +1090,6 @@ export type RecallEnhancementConfigProjection = Pick<
|
|
|
1084
1090
|
| "compoundingInjectEnabled"
|
|
1085
1091
|
| "accessTrackingEnabled"
|
|
1086
1092
|
| "autoPromoteToSharedEnabled"
|
|
1087
|
-
| "recallGraphEnabled"
|
|
1088
1093
|
| "feedbackEnabled"
|
|
1089
1094
|
| "identityEnabled"
|
|
1090
1095
|
>;
|
|
@@ -1115,7 +1120,6 @@ export function resolveRecallEnhancementCapabilities(config: RecallEnhancementCo
|
|
|
1115
1120
|
compoundingInject: config.compoundingInjectEnabled,
|
|
1116
1121
|
accessTracking: config.accessTrackingEnabled,
|
|
1117
1122
|
autoPromoteToShared: config.autoPromoteToSharedEnabled,
|
|
1118
|
-
recallGraph: config.recallGraphEnabled,
|
|
1119
1123
|
feedback: config.feedbackEnabled,
|
|
1120
1124
|
identity: config.identityEnabled,
|
|
1121
1125
|
});
|
|
@@ -1240,7 +1244,6 @@ export interface ConversationContextCapabilitySet {
|
|
|
1240
1244
|
readonly cmcConsolidation: boolean;
|
|
1241
1245
|
readonly maintenanceNamespaceFanout: boolean;
|
|
1242
1246
|
readonly citations: boolean;
|
|
1243
|
-
readonly behaviorLoopAutoTune: boolean;
|
|
1244
1247
|
readonly semanticRulePromotion: boolean;
|
|
1245
1248
|
readonly codexMarketplace: boolean;
|
|
1246
1249
|
}
|
|
@@ -1259,7 +1262,6 @@ export type ConversationContextConfigProjection = Pick<
|
|
|
1259
1262
|
| "cmcConsolidationEnabled"
|
|
1260
1263
|
| "maintenanceNamespaceFanoutEnabled"
|
|
1261
1264
|
| "citationsEnabled"
|
|
1262
|
-
| "behaviorLoopAutoTuneEnabled"
|
|
1263
1265
|
| "semanticRulePromotionEnabled"
|
|
1264
1266
|
| "codexMarketplaceEnabled"
|
|
1265
1267
|
>;
|
|
@@ -1278,7 +1280,6 @@ export function resolveConversationContextCapabilities(config: ConversationConte
|
|
|
1278
1280
|
cmcConsolidation: config.cmcConsolidationEnabled,
|
|
1279
1281
|
maintenanceNamespaceFanout: config.maintenanceNamespaceFanoutEnabled,
|
|
1280
1282
|
citations: config.citationsEnabled,
|
|
1281
|
-
behaviorLoopAutoTune: config.behaviorLoopAutoTuneEnabled,
|
|
1282
1283
|
semanticRulePromotion: config.semanticRulePromotionEnabled,
|
|
1283
1284
|
codexMarketplace: config.codexMarketplaceEnabled,
|
|
1284
1285
|
});
|
package/src/cli.ts
CHANGED
|
@@ -2430,9 +2430,10 @@ export async function runPolicyStatusCliCommand(
|
|
|
2430
2430
|
const defaultWindowMs = Math.max(0, orchestrator.config.behaviorLoopLearningWindowDays) * 24 * 60 * 60 * 1000;
|
|
2431
2431
|
const cutoffIso = defaultWindowMs > 0 ? new Date(now.getTime() - defaultWindowMs).toISOString() : undefined;
|
|
2432
2432
|
|
|
2433
|
+
const { behaviorLoopAutoTuneEnabled } = orchestrator.config;
|
|
2433
2434
|
return {
|
|
2434
2435
|
generatedAt: now.toISOString(),
|
|
2435
|
-
autoTuneEnabled:
|
|
2436
|
+
autoTuneEnabled: behaviorLoopAutoTuneEnabled,
|
|
2436
2437
|
current: current
|
|
2437
2438
|
? {
|
|
2438
2439
|
...current,
|
package/src/graph-recall.ts
CHANGED
|
@@ -110,7 +110,8 @@ export function runGraphRecall(
|
|
|
110
110
|
config: GraphRecallConfig,
|
|
111
111
|
options: GraphRecallOptions,
|
|
112
112
|
): GraphRecallRun {
|
|
113
|
-
|
|
113
|
+
const { recallGraphEnabled } = config;
|
|
114
|
+
if (!recallGraphEnabled) {
|
|
114
115
|
return {
|
|
115
116
|
ran: false,
|
|
116
117
|
results: [],
|
package/src/lcm/engine.ts
CHANGED
|
@@ -117,6 +117,7 @@ export class LcmEngine {
|
|
|
117
117
|
const db = openLcmDatabase(this.memoryDir);
|
|
118
118
|
const archive = new LcmArchive(db);
|
|
119
119
|
const dag = new LcmDag(db);
|
|
120
|
+
const { telemetryPrefilterEnabled } = this.config;
|
|
120
121
|
const summarizer = new LcmSummarizer(
|
|
121
122
|
archive,
|
|
122
123
|
dag,
|
|
@@ -126,7 +127,7 @@ export class LcmEngine {
|
|
|
126
127
|
rollupFanIn: this.config.rollupFanIn,
|
|
127
128
|
maxDepth: this.config.maxDepth,
|
|
128
129
|
deterministicMaxTokens: this.config.deterministicMaxTokens,
|
|
129
|
-
telemetryPrefilterEnabled
|
|
130
|
+
telemetryPrefilterEnabled,
|
|
130
131
|
},
|
|
131
132
|
);
|
|
132
133
|
const observeQueue = new LcmWorkQueue({
|
|
@@ -229,17 +230,18 @@ export class LcmEngine {
|
|
|
229
230
|
if (messages.length === 0) return;
|
|
230
231
|
|
|
231
232
|
const currentMax = this.archive.getMaxTurnIndex(sessionId);
|
|
233
|
+
const { messagePartsEnabled } = this.config;
|
|
232
234
|
const newMessages = messages.map((m, i) => ({
|
|
233
235
|
turnIndex: currentMax + 1 + i,
|
|
234
236
|
role: m.role,
|
|
235
237
|
content: m.content,
|
|
236
|
-
parts:
|
|
237
|
-
rawContent:
|
|
238
|
-
sourceFormat:
|
|
238
|
+
parts: messagePartsEnabled ? m.parts : undefined,
|
|
239
|
+
rawContent: messagePartsEnabled ? m.rawContent : undefined,
|
|
240
|
+
sourceFormat: messagePartsEnabled ? m.sourceFormat : undefined,
|
|
239
241
|
}));
|
|
240
242
|
|
|
241
243
|
this.archive.appendMessages(sessionId, newMessages, {
|
|
242
|
-
messagePartsEnabled
|
|
244
|
+
messagePartsEnabled,
|
|
243
245
|
});
|
|
244
246
|
|
|
245
247
|
// Trigger incremental summarization inside the worker, after append.
|
|
@@ -346,7 +348,8 @@ export class LcmEngine {
|
|
|
346
348
|
query: string,
|
|
347
349
|
limit = this.config.messagePartsRecallMaxResults,
|
|
348
350
|
): Promise<LcmStructuredRecallMatch[]> {
|
|
349
|
-
|
|
351
|
+
const { messagePartsEnabled } = this.config;
|
|
352
|
+
if (!this.config.enabled || !messagePartsEnabled) return [];
|
|
350
353
|
const normalizedSessionId = normalizeLcmSessionId(sessionId);
|
|
351
354
|
if (!normalizedSessionId) return [];
|
|
352
355
|
await this.ensureInitialized();
|
package/src/lcm/summarizer.ts
CHANGED
|
@@ -153,8 +153,9 @@ export class LcmSummarizer {
|
|
|
153
153
|
text: string,
|
|
154
154
|
targetTokens: number,
|
|
155
155
|
): Promise<{ text: string; escalation: number }> {
|
|
156
|
+
const { telemetryPrefilterEnabled } = this.config;
|
|
156
157
|
if (
|
|
157
|
-
|
|
158
|
+
telemetryPrefilterEnabled &&
|
|
158
159
|
looksLikeMechanicalTelemetryTranscript(text)
|
|
159
160
|
) {
|
|
160
161
|
return {
|
package/src/operator-toolkit.ts
CHANGED
|
@@ -1617,7 +1617,8 @@ async function summarizeGraphEdgeDecayStatus(
|
|
|
1617
1617
|
): Promise<OperatorDoctorCheck> {
|
|
1618
1618
|
// Lazy import to keep the doctor fast when the feature is disabled.
|
|
1619
1619
|
const { readGraphEdgeDecayStatus } = await import("./maintenance/graph-edge-decay.js");
|
|
1620
|
-
const
|
|
1620
|
+
const { graphEdgeDecayEnabled } = config;
|
|
1621
|
+
const enabled = graphEdgeDecayEnabled === true;
|
|
1621
1622
|
if (!enabled) {
|
|
1622
1623
|
return {
|
|
1623
1624
|
key: "graph_edge_decay",
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contradiction-linking coordinator — extracted from the orchestrator (issue #1526).
|
|
3
|
+
*
|
|
4
|
+
* Owns the write-path semantic-analysis subsystem: contradiction detection
|
|
5
|
+
* (QMD similarity search + LLM verification), deferred contradiction
|
|
6
|
+
* auto-resolve (#1645 — retires superseded memories only after the new write's
|
|
7
|
+
* tombstone status is known), and memory link suggestion. Behavior-preserving
|
|
8
|
+
* move from orchestrator.ts — no logic changes; the orchestrator constructs one
|
|
9
|
+
* instance and keeps thin delegating methods so existing call sites (writeMemory
|
|
10
|
+
* fact-write branches) continue to work.
|
|
11
|
+
*
|
|
12
|
+
* Config, storage, search, namespace resolution, and the extraction engine are
|
|
13
|
+
* accessed through getter callbacks (not captured at construction) so that
|
|
14
|
+
* post-construction reassignment of the orchestrator's live fields is honored.
|
|
15
|
+
* This mirrors the RecallRerankCoordinator / ConversationIndexCoordinator
|
|
16
|
+
* accessor pattern.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type {
|
|
20
|
+
MemoryLink,
|
|
21
|
+
PluginConfig,
|
|
22
|
+
QmdSearchResult,
|
|
23
|
+
} from "../types.js";
|
|
24
|
+
// StorageManager type comes from the package barrel (type-only) so this
|
|
25
|
+
// module does not add a direct storage.ts import (ratchet #1533).
|
|
26
|
+
import type { StorageManager } from "../index.js";
|
|
27
|
+
import type { ExtractionEngine } from "../extraction.js";
|
|
28
|
+
import { log } from "../logger.js";
|
|
29
|
+
import { resolveIndexingCapabilities } from "../capabilities.js";
|
|
30
|
+
import { deindexMemory } from "../temporal-index.js";
|
|
31
|
+
|
|
32
|
+
/** Result type of {@link ContradictionLinkingCoordinator.checkForContradiction}. */
|
|
33
|
+
export interface ContradictionResult {
|
|
34
|
+
supersededId: string;
|
|
35
|
+
confidence: number;
|
|
36
|
+
reason: string;
|
|
37
|
+
supersededPath: string;
|
|
38
|
+
supersededCreated: string;
|
|
39
|
+
supersededTags: string[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Subset of {@link ContradictionResult} used by
|
|
44
|
+
* {@link ContradictionLinkingCoordinator.applyDeferredContradictionResolve}.
|
|
45
|
+
* The deferred resolve runs AFTER writeMemory and only needs the supersede
|
|
46
|
+
* target fields (not confidence, which the caller already consumed).
|
|
47
|
+
*/
|
|
48
|
+
export interface ContradictionResolveTarget {
|
|
49
|
+
supersededId: string;
|
|
50
|
+
reason: string;
|
|
51
|
+
supersededPath: string;
|
|
52
|
+
supersededCreated: string;
|
|
53
|
+
supersededTags: string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Coordinator for the contradiction-detection + memory-linking subsystem.
|
|
58
|
+
*
|
|
59
|
+
* The three methods mirror the orchestrator's former private methods
|
|
60
|
+
* `checkForContradiction`, `applyDeferredContradictionResolve`, and
|
|
61
|
+
* `suggestLinksForMemory` byte-for-byte in logic.
|
|
62
|
+
*/
|
|
63
|
+
export class ContradictionLinkingCoordinator {
|
|
64
|
+
private readonly getConfig: () => PluginConfig;
|
|
65
|
+
private readonly isSearchAvailable: () => boolean;
|
|
66
|
+
private readonly searchAcrossNamespaces: (options: {
|
|
67
|
+
query: string;
|
|
68
|
+
namespaces?: string[];
|
|
69
|
+
maxResults?: number;
|
|
70
|
+
mode?: "search" | "hybrid" | "bm25" | "vector";
|
|
71
|
+
}) => Promise<QmdSearchResult[]>;
|
|
72
|
+
private readonly extractMemoryIdsFromResults: (
|
|
73
|
+
results: QmdSearchResult[],
|
|
74
|
+
) => string[];
|
|
75
|
+
private readonly namespaceFromPath: (p: string) => string;
|
|
76
|
+
private readonly storageForNamespace: (
|
|
77
|
+
namespace: string,
|
|
78
|
+
) => Promise<StorageManager>;
|
|
79
|
+
private readonly getExtraction: () => ExtractionEngine;
|
|
80
|
+
|
|
81
|
+
constructor(options: {
|
|
82
|
+
getConfig: () => PluginConfig;
|
|
83
|
+
isSearchAvailable: () => boolean;
|
|
84
|
+
searchAcrossNamespaces: (options: {
|
|
85
|
+
query: string;
|
|
86
|
+
namespaces?: string[];
|
|
87
|
+
maxResults?: number;
|
|
88
|
+
mode?: "search" | "hybrid" | "bm25" | "vector";
|
|
89
|
+
}) => Promise<QmdSearchResult[]>;
|
|
90
|
+
extractMemoryIdsFromResults: (results: QmdSearchResult[]) => string[];
|
|
91
|
+
namespaceFromPath: (p: string) => string;
|
|
92
|
+
storageForNamespace: (namespace: string) => Promise<StorageManager>;
|
|
93
|
+
getExtraction: () => ExtractionEngine;
|
|
94
|
+
}) {
|
|
95
|
+
this.getConfig = options.getConfig;
|
|
96
|
+
this.isSearchAvailable = options.isSearchAvailable;
|
|
97
|
+
this.searchAcrossNamespaces = options.searchAcrossNamespaces;
|
|
98
|
+
this.extractMemoryIdsFromResults = options.extractMemoryIdsFromResults;
|
|
99
|
+
this.namespaceFromPath = options.namespaceFromPath;
|
|
100
|
+
this.storageForNamespace = options.storageForNamespace;
|
|
101
|
+
this.getExtraction = options.getExtraction;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Check if a new memory contradicts an existing one.
|
|
106
|
+
* Uses QMD to find similar memories, then LLM to verify contradiction.
|
|
107
|
+
*/
|
|
108
|
+
async checkForContradiction(
|
|
109
|
+
content: string,
|
|
110
|
+
category: string,
|
|
111
|
+
namespaceScope: string,
|
|
112
|
+
): Promise<ContradictionResult | null> {
|
|
113
|
+
if (!this.isSearchAvailable()) return null;
|
|
114
|
+
|
|
115
|
+
const config = this.getConfig();
|
|
116
|
+
|
|
117
|
+
// Search for similar memories
|
|
118
|
+
const results = await this.searchAcrossNamespaces({
|
|
119
|
+
query: content,
|
|
120
|
+
namespaces: [namespaceScope],
|
|
121
|
+
maxResults: 5,
|
|
122
|
+
mode: "search",
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
for (const result of results) {
|
|
126
|
+
// Check similarity threshold
|
|
127
|
+
if (result.score < config.contradictionSimilarityThreshold) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Get the existing memory
|
|
132
|
+
const memoryId = this.extractMemoryIdsFromResults([result])[0];
|
|
133
|
+
if (!memoryId) continue;
|
|
134
|
+
|
|
135
|
+
const resultNamespace = this.namespaceFromPath(result.path);
|
|
136
|
+
if (resultNamespace !== namespaceScope) continue;
|
|
137
|
+
const resultStorage = await this.storageForNamespace(resultNamespace);
|
|
138
|
+
const existingMemory = await resultStorage.getMemoryById(memoryId);
|
|
139
|
+
if (!existingMemory) continue;
|
|
140
|
+
|
|
141
|
+
// Skip memories already resolved or explicitly forgotten. Other
|
|
142
|
+
// non-active statuses remain valid contradiction candidates.
|
|
143
|
+
if (
|
|
144
|
+
existingMemory.frontmatter.status === "superseded" ||
|
|
145
|
+
existingMemory.frontmatter.status === "forgotten"
|
|
146
|
+
) {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Verify contradiction with LLM
|
|
151
|
+
const extraction = this.getExtraction();
|
|
152
|
+
const verification = await extraction.verifyContradiction(
|
|
153
|
+
{ content, category },
|
|
154
|
+
{
|
|
155
|
+
id: existingMemory.frontmatter.id,
|
|
156
|
+
content: existingMemory.content,
|
|
157
|
+
category: existingMemory.frontmatter.category,
|
|
158
|
+
created: existingMemory.frontmatter.created,
|
|
159
|
+
},
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
if (!verification) continue;
|
|
163
|
+
|
|
164
|
+
// Check if it's a real contradiction with high confidence
|
|
165
|
+
if (
|
|
166
|
+
verification.isContradiction &&
|
|
167
|
+
verification.confidence >= config.contradictionMinConfidence
|
|
168
|
+
) {
|
|
169
|
+
// When the LLM says the existing memory is newer (whichIsNewer ===
|
|
170
|
+
// "first") the incoming fact is the stale one in both resolve modes —
|
|
171
|
+
// log and continue so the caller never marks contradictionDetected and
|
|
172
|
+
// the semantic-skip gate can discard the outdated write normally.
|
|
173
|
+
if (verification.whichIsNewer === "first") {
|
|
174
|
+
log.info(
|
|
175
|
+
`detected contradiction (confidence: ${verification.confidence}): ${existingMemory.frontmatter.id} vs new memory — existing is newer, incoming fact is stale`,
|
|
176
|
+
);
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// The new fact is newer than the existing one. When auto-resolve is
|
|
181
|
+
// enabled, the caller retires the old memory AFTER the new write lands
|
|
182
|
+
// and its tombstone status is known (#1645: defer auto-resolve until
|
|
183
|
+
// tombstone status is known — a tombstone-blocked new write must not
|
|
184
|
+
// retire the only active copy, leaving neither memory active). When
|
|
185
|
+
// disabled, the old memory stays active for manual review. The
|
|
186
|
+
// contradiction info is returned in both cases so the caller can apply
|
|
187
|
+
// the deferred retire post-write.
|
|
188
|
+
|
|
189
|
+
// Return the contradiction info regardless of auto-resolve setting.
|
|
190
|
+
// The caller uses this to set `contradictionDetected=true` which
|
|
191
|
+
// prevents the semantic-skip guard from silently dropping a
|
|
192
|
+
// legitimately contradictory update (the regression this fixes).
|
|
193
|
+
log.info(
|
|
194
|
+
`detected contradiction (confidence: ${verification.confidence}): ${existingMemory.frontmatter.id} vs new memory${config.contradictionAutoResolve ? " (auto-resolved)" : " (queued for manual review)"}`,
|
|
195
|
+
);
|
|
196
|
+
return {
|
|
197
|
+
supersededId: existingMemory.frontmatter.id,
|
|
198
|
+
confidence: verification.confidence,
|
|
199
|
+
reason: verification.reasoning,
|
|
200
|
+
supersededPath: existingMemory.path,
|
|
201
|
+
supersededCreated: existingMemory.frontmatter.created,
|
|
202
|
+
supersededTags: existingMemory.frontmatter.tags ?? [],
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* #1645: Complete the deferred contradiction auto-resolve after writeMemory
|
|
212
|
+
* returns and the new write's tombstone status is known. Retires the old
|
|
213
|
+
* memory + deindexes it ONLY when the new write is genuinely active (not
|
|
214
|
+
* tombstone-blocked / pending_review). A blocked write must not retire the
|
|
215
|
+
* only active copy — deferring here closes the "contradictionAutoResolve
|
|
216
|
+
* supersedes before tombstone status is known" defect class.
|
|
217
|
+
*/
|
|
218
|
+
async applyDeferredContradictionResolve(
|
|
219
|
+
contradiction: ContradictionResolveTarget | null | undefined,
|
|
220
|
+
storage: StorageManager,
|
|
221
|
+
newMemoryId: string,
|
|
222
|
+
postWriteGuard: boolean,
|
|
223
|
+
): Promise<void> {
|
|
224
|
+
const config = this.getConfig();
|
|
225
|
+
// #1645 yG2: clear the pre-write `supersedes` link from a blocked row so
|
|
226
|
+
// it doesn't claim to supersede a still-active memory (best-effort).
|
|
227
|
+
if (postWriteGuard && contradiction && config.contradictionAutoResolve) {
|
|
228
|
+
try {
|
|
229
|
+
const blockedRow = await storage.getMemoryById(newMemoryId);
|
|
230
|
+
if (blockedRow?.frontmatter?.supersedes) {
|
|
231
|
+
await storage.writeMemoryFrontmatter(blockedRow, { supersedes: undefined });
|
|
232
|
+
}
|
|
233
|
+
} catch (err) {
|
|
234
|
+
log.warn(
|
|
235
|
+
`contradiction auto-resolve supersedes clear failed for blocked ${newMemoryId}: ${err}`,
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (
|
|
240
|
+
!contradiction ||
|
|
241
|
+
!config.contradictionAutoResolve ||
|
|
242
|
+
postWriteGuard
|
|
243
|
+
) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
try {
|
|
247
|
+
await storage.supersedeMemory(
|
|
248
|
+
contradiction.supersededId,
|
|
249
|
+
newMemoryId,
|
|
250
|
+
contradiction.reason,
|
|
251
|
+
);
|
|
252
|
+
if (
|
|
253
|
+
resolveIndexingCapabilities(config).queryAwareIndexing &&
|
|
254
|
+
contradiction.supersededPath
|
|
255
|
+
) {
|
|
256
|
+
deindexMemory(
|
|
257
|
+
config.memoryDir,
|
|
258
|
+
contradiction.supersededPath,
|
|
259
|
+
contradiction.supersededCreated,
|
|
260
|
+
contradiction.supersededTags,
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
} catch (err) {
|
|
264
|
+
log.warn(
|
|
265
|
+
`contradiction auto-resolve supersede failed for ${contradiction.supersededId}: ${err}`,
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// ---------------------------------------------------------------------------
|
|
271
|
+
// Memory Linking (Phase 3A)
|
|
272
|
+
// ---------------------------------------------------------------------------
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Suggest links for a new memory based on similar existing memories.
|
|
276
|
+
*/
|
|
277
|
+
async suggestLinksForMemory(
|
|
278
|
+
content: string,
|
|
279
|
+
category: string,
|
|
280
|
+
namespaceScope: string,
|
|
281
|
+
): Promise<MemoryLink[]> {
|
|
282
|
+
if (!this.isSearchAvailable()) return [];
|
|
283
|
+
|
|
284
|
+
// Search for related memories
|
|
285
|
+
const results = await this.searchAcrossNamespaces({
|
|
286
|
+
query: content,
|
|
287
|
+
namespaces: [namespaceScope],
|
|
288
|
+
maxResults: 5,
|
|
289
|
+
mode: "search",
|
|
290
|
+
});
|
|
291
|
+
if (results.length === 0) return [];
|
|
292
|
+
|
|
293
|
+
// Get full memory details for candidates
|
|
294
|
+
const candidates: Array<{ id: string; content: string; category: string }> =
|
|
295
|
+
[];
|
|
296
|
+
for (const result of results) {
|
|
297
|
+
const memoryId = this.extractMemoryIdsFromResults([result])[0];
|
|
298
|
+
if (!memoryId) continue;
|
|
299
|
+
|
|
300
|
+
const resultNamespace = this.namespaceFromPath(result.path);
|
|
301
|
+
if (resultNamespace !== namespaceScope) continue;
|
|
302
|
+
const resultStorage = await this.storageForNamespace(resultNamespace);
|
|
303
|
+
const memory = await resultStorage.getMemoryById(memoryId);
|
|
304
|
+
if (
|
|
305
|
+
memory &&
|
|
306
|
+
memory.frontmatter.status !== "superseded" &&
|
|
307
|
+
memory.frontmatter.status !== "forgotten"
|
|
308
|
+
) {
|
|
309
|
+
candidates.push({
|
|
310
|
+
id: memory.frontmatter.id,
|
|
311
|
+
content: memory.content,
|
|
312
|
+
category: memory.frontmatter.category,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (candidates.length === 0) return [];
|
|
318
|
+
|
|
319
|
+
// Ask LLM for link suggestions
|
|
320
|
+
const extraction = this.getExtraction();
|
|
321
|
+
const suggestions = await extraction.suggestLinks(
|
|
322
|
+
{ content, category },
|
|
323
|
+
candidates,
|
|
324
|
+
);
|
|
325
|
+
|
|
326
|
+
if (!suggestions || suggestions.links.length === 0) return [];
|
|
327
|
+
|
|
328
|
+
// Convert to MemoryLink format
|
|
329
|
+
return suggestions.links.map((link) => ({
|
|
330
|
+
targetId: link.targetId,
|
|
331
|
+
linkType: link.linkType,
|
|
332
|
+
strength: link.strength,
|
|
333
|
+
reason: link.reason || undefined,
|
|
334
|
+
}));
|
|
335
|
+
}
|
|
336
|
+
}
|