@snoai/memory 1.6.0 → 1.7.1
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/README.md +1 -1
- package/dist/{_types-CUKHSRkS.d.ts → _types-CZDWRxyi.d.ts} +0 -2
- package/dist/{access-tracker-CFxRg7Bt.d.ts → access-tracker-CtqCTq9b.d.ts} +4 -6
- package/dist/{adapter-BFtbOOw3.d.ts → adapter-6irg6Ykg.d.ts} +3 -7
- package/dist/{adapter-CG-UbOjU.js → adapter-BVBeFvUc.js} +2 -4
- package/dist/{agent-llm-port-BlFrD2ro.d.ts → agent-llm-port-i_L33_v_.d.ts} +0 -2
- package/dist/{all-resources-Dij6l5h0.d.ts → all-resources-3zj0PED4.d.ts} +2 -4
- package/dist/{all-resources-BQK2ugjB.js → all-resources-BZc9QIAW.js} +41 -81
- package/dist/{ambient-learning-text-normalizer-_fH3LeuK.d.ts → ambient-learning-text-normalizer-H_idEjJi.d.ts} +0 -2
- package/dist/{ambient-learning-text-normalizer-CxjATmMp.js → ambient-learning-text-normalizer-dxAxf9oi.js} +3 -5
- package/dist/{atomic-extraction-reply-BJ9XV_9s.js → atomic-extraction-reply-CoxIGLmU.js} +12 -12
- package/dist/{atomic-extraction-skill-CcXmuCqL.js → atomic-extraction-skill-5lAqr8BM.js} +1 -2
- package/dist/{atomic-memory-extraction-l65aofbl.js → atomic-memory-extraction-CWMMWF2C.js} +67 -41
- package/dist/{atomic-memory-extraction-Bp7AWZqi.d.ts → atomic-memory-extraction-DcoaYWiS.d.ts} +6 -20
- package/dist/{b-profile-section-dictionary-provider-Buj_M-QA.d.ts → b-profile-section-dictionary-provider-BuzxMJtG.d.ts} +2 -6
- package/dist/{b-profile-section-dictionary-provider-BHkoNqgk.js → b-profile-section-dictionary-provider-DMGsJlYh.js} +3 -6
- package/dist/{best-effort-BPZSzKk0.d.ts → best-effort-DvyP9avp.d.ts} +0 -2
- package/dist/{calendar-instruction-CzqZbAPG.js → calendar-instruction-uK6xsrCt.js} +1 -2
- package/dist/{capture-policy-detector-3tDQkBi9.d.ts → capture-policy-detector-CEgDjHPq.d.ts} +1 -3
- package/dist/{capture-policy-detector-DaMfy9CZ.js → capture-policy-detector-DhNGhDw3.js} +5 -7
- package/dist/{classifier-CXQxJJPP.d.ts → classifier-DeFV9Zro.d.ts} +1 -5
- package/dist/client.d.ts +1 -3
- package/dist/client.js +4 -6
- package/dist/{coding-skin-azRXA51Z.js → coding-skin-BnFryVac.js} +11 -5
- package/dist/coding-skin.d.ts +8 -4
- package/dist/coding-skin.js +2 -2
- package/dist/{config-CByvnX3d.js → config-D6GJyMKz.js} +29 -41
- package/dist/{connection-D989FqGS.d.ts → connection-22Uywd-U.d.ts} +1 -6
- package/dist/{connection-BtK-3r-f.js → connection-H-_OZ-pP.js} +3 -5
- package/dist/{daily-log-generator-DEsiCs7o.js → daily-log-generator-DdzlaQYy.js} +8 -12
- package/dist/{daily-log-generator-CsQPHl4A.d.ts → daily-log-generator-IbaCpCH8.d.ts} +1 -5
- package/dist/{daily-spend-estimator-DiwzBlo1.d.ts → daily-spend-estimator-CKaQYiHB.d.ts} +0 -2
- package/dist/{data-bootstrap-Bl3lthzE.d.ts → data-bootstrap-Bf_VMTSc.d.ts} +0 -4
- package/dist/{data-bootstrap-P8sie9WA.js → data-bootstrap-Db6a7ASj.js} +1 -3
- package/dist/{data-paths-C7sNdqvP.d.ts → data-paths-CFwVskNd.d.ts} +0 -2
- package/dist/{derived-suppression-cache-CcANI-p7.d.ts → derived-suppression-cache-ByclOuKE.d.ts} +1 -7
- package/dist/diagnostic-encoder.d.ts +0 -2
- package/dist/diagnostic-encoder.js +2 -3
- package/dist/{embedding-provider-client-CELWtPgt.d.ts → embedding-provider-client-Bli3uXan.d.ts} +0 -4
- package/dist/{embedding-provider-client-CgpUK_1G.js → embedding-provider-client-ClgiYSD4.js} +4 -8
- package/dist/{entry-metadata-parser-BIVSMCIk.js → entry-metadata-parser-W53-Odqm.js} +1 -2
- package/dist/{error-D-wb-rZw.js → error-Dga5Ot1M.js} +1 -2
- package/dist/{error-signals-lMH2uAdV.js → error-signals-CqvwBBWn.js} +1 -2
- package/dist/{error-signals-D8_3vYu4.d.ts → error-signals-f0JhwtHI.d.ts} +0 -2
- package/dist/{errors-CeVRxf9V.d.ts → errors-Cqej5eCm.d.ts} +0 -2
- package/dist/{extraction-text-sanitizer-B_AhIecT.d.ts → extraction-text-sanitizer-D_7Ogceg.d.ts} +0 -2
- package/dist/{i18n-text-DbD6Qify.d.ts → i18n-text-CqS4mUit.d.ts} +0 -2
- package/dist/{index-Df9420Pl.d.ts → index-B0iQL0Kp.d.ts} +3 -15
- package/dist/{index-DPfJrOFD.d.ts → index-B3H1zNbk.d.ts} +2 -38
- package/dist/{index-CJrMFlAU.d.ts → index-oFJyQfvq.d.ts} +0 -2
- package/dist/index.d.ts +12 -14
- package/dist/index.js +18 -22
- package/dist/{intent-analyzer-B5XVrWwe.d.ts → intent-analyzer-DmeMSTrr.d.ts} +0 -2
- package/dist/internal/config/index.d.ts +1 -1
- package/dist/internal/config/index.js +1 -2
- package/dist/internal/config/plugin-config-schema.d.ts +1 -1
- package/dist/internal/config/plugin-config-schema.js +1 -2
- package/dist/internal/config/product-mode.d.ts +1 -1
- package/dist/internal/config/product-mode.js +1 -2
- package/dist/internal/config/settings.d.ts +1 -1
- package/dist/internal/config/settings.js +3 -4
- package/dist/internal/config/skill-categories.d.ts +1 -3
- package/dist/internal/config/skill-categories.js +1 -2
- package/dist/internal/config/skin-defaults.d.ts +1 -3
- package/dist/internal/config/skin-defaults.js +1 -2
- package/dist/internal/contract/discovery.d.ts +1 -3
- package/dist/internal/contract/discovery.js +2 -3
- package/dist/internal/contract/profile.d.ts +1 -1
- package/dist/internal/contract/profile.js +1 -2
- package/dist/internal/contract/routes.d.ts +1 -1
- package/dist/internal/contract/routes.js +1 -2
- package/dist/internal/engine/bindings/memory-cli-shared.d.ts +7 -9
- package/dist/internal/engine/bindings/memory-cli-shared.js +1 -2
- package/dist/internal/engine/bindings/memory-forget-tool.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-forget-tool.js +2 -3
- package/dist/internal/engine/bindings/memory-list-tool.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-list-tool.js +2 -3
- package/dist/internal/engine/bindings/memory-recall-tool.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-recall-tool.js +3 -4
- package/dist/internal/engine/bindings/memory-reflection-resolve-tool.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-reflection-resolve-tool.js +3 -4
- package/dist/internal/engine/bindings/memory-stats-tool.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-stats-tool.js +3 -4
- package/dist/internal/engine/bindings/memory-store-tool.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-store-tool.js +6 -7
- package/dist/internal/engine/bindings/memory-tool-access.d.ts +3 -5
- package/dist/internal/engine/bindings/memory-tool-access.js +2 -3
- package/dist/internal/engine/bindings/memory-tool-formatting.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-tool-formatting.js +2 -3
- package/dist/internal/engine/bindings/memory-tool-results.d.ts +3 -5
- package/dist/internal/engine/bindings/memory-tool-results.js +2 -3
- package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +9 -11
- package/dist/internal/engine/bindings/memory-tool-schemas.js +2 -3
- package/dist/internal/engine/bindings/memory-update-tool.d.ts +1 -3
- package/dist/internal/engine/bindings/memory-update-tool.js +5 -6
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts +7 -9
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.js +8 -9
- package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.d.ts +7 -9
- package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.js +6 -7
- package/dist/internal/engine/bindings/sno-station-mem-hook-types.d.ts +1 -3
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.d.ts +8 -10
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +4 -5
- package/dist/internal/engine/bindings/sno-station-mem-message-transcript.d.ts +2 -4
- package/dist/internal/engine/bindings/sno-station-mem-message-transcript.js +5 -6
- package/dist/internal/engine/bindings/sno-station-mem-reset-hook.d.ts +6 -8
- package/dist/internal/engine/bindings/sno-station-mem-reset-hook.js +1 -2
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +2 -4
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.js +4 -5
- package/dist/internal/engine/bindings/sno-station-mem-session-state.d.ts +1 -3
- package/dist/internal/engine/bindings/sno-station-mem-session-state.js +1 -2
- package/dist/internal/engine/eval/trace.d.ts +1 -1
- package/dist/internal/engine/eval/trace.js +1 -2
- package/dist/internal/engine/extraction/ambient-learning-text-normalizer.d.ts +1 -1
- package/dist/internal/engine/extraction/ambient-learning-text-normalizer.js +1 -2
- package/dist/internal/engine/extraction/atomic-memory-extraction.d.ts +1 -1
- package/dist/internal/engine/extraction/atomic-memory-extraction.js +1 -2
- package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.d.ts +1 -1
- package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.js +1 -2
- package/dist/internal/engine/extraction/b-profile-section-rekey.d.ts +6 -8
- package/dist/internal/engine/extraction/b-profile-section-rekey.js +4 -5
- package/dist/internal/engine/extraction/capture-policy-detector.d.ts +1 -1
- package/dist/internal/engine/extraction/capture-policy-detector.js +1 -2
- package/dist/internal/engine/extraction/embedding-provider-client.d.ts +1 -1
- package/dist/internal/engine/extraction/embedding-provider-client.js +1 -2
- package/dist/internal/engine/extraction/extraction-text-sanitizer.d.ts +1 -1
- package/dist/internal/engine/extraction/extraction-text-sanitizer.js +3 -4
- package/dist/internal/engine/extraction/memory-metadata-codec.d.ts +2 -2
- package/dist/internal/engine/extraction/memory-metadata-codec.js +1 -2
- package/dist/internal/engine/extraction/memory-temporality-classifier.d.ts +1 -1
- package/dist/internal/engine/extraction/memory-temporality-classifier.js +1 -2
- package/dist/internal/engine/i18n/all-resources.d.ts +1 -1
- package/dist/internal/engine/i18n/all-resources.js +1 -2
- package/dist/internal/engine/i18n/locales.d.ts +1 -1
- package/dist/internal/engine/i18n/locales.js +1 -2
- package/dist/internal/engine/i18n/res/_types.d.ts +1 -1
- package/dist/internal/engine/i18n/res/_types.js +1 -2
- package/dist/internal/engine/observability/adapter.d.ts +1 -1
- package/dist/internal/engine/observability/adapter.js +1 -2
- package/dist/internal/engine/observability/best-effort.d.ts +1 -1
- package/dist/internal/engine/observability/best-effort.js +1 -2
- package/dist/internal/engine/observability/early-diagnostics.js +1 -2
- package/dist/internal/engine/observability/memory-snapshot.d.ts +1 -1
- package/dist/internal/engine/observability/memory-snapshot.js +1 -2
- package/dist/internal/engine/observability/observable-embedder.d.ts +1 -1
- package/dist/internal/engine/observability/observable-embedder.js +2 -3
- package/dist/internal/engine/observability/observable-llm-client.d.ts +1 -1
- package/dist/internal/engine/observability/observable-llm-client.js +2 -3
- package/dist/internal/engine/observability/observable-memory-store.d.ts +1 -1
- package/dist/internal/engine/observability/observable-memory-store.js +4 -5
- package/dist/internal/engine/observability/observable-retriever.d.ts +1 -1
- package/dist/internal/engine/observability/observable-retriever.js +4 -5
- package/dist/internal/engine/observability/runtime-diagnostics.d.ts +2 -4
- package/dist/internal/engine/observability/runtime-diagnostics.js +6 -7
- package/dist/internal/engine/observability/session-registry.d.ts +1 -1
- package/dist/internal/engine/observability/session-registry.js +1 -2
- package/dist/internal/engine/observability/version-metadata.d.ts +1 -3
- package/dist/internal/engine/observability/version-metadata.js +1 -2
- package/dist/internal/engine/operations/daily-spend-estimator.d.ts +1 -1
- package/dist/internal/engine/operations/daily-spend-estimator.js +2 -3
- package/dist/internal/engine/operations/learning-file-maintenance.d.ts +1 -1
- package/dist/internal/engine/operations/learning-file-maintenance.js +3 -4
- package/dist/internal/engine/operations/memory-tier-promoter.d.ts +1 -1
- package/dist/internal/engine/operations/memory-tier-promoter.js +1 -2
- package/dist/internal/engine/operations/runtime-audit-log.d.ts +2 -2
- package/dist/internal/engine/operations/runtime-audit-log.js +1 -1
- package/dist/internal/engine/provider/canonical-memory-corpus.d.ts +2 -4
- package/dist/internal/engine/provider/canonical-memory-corpus.js +2 -3
- package/dist/internal/engine/provider/provider-registration.d.ts +7 -9
- package/dist/internal/engine/provider/provider-registration.js +1 -2
- package/dist/internal/engine/provider/provider-row-renderer.d.ts +2 -4
- package/dist/internal/engine/provider/provider-row-renderer.js +2 -3
- package/dist/internal/engine/provider/provider-types.d.ts +1 -1
- package/dist/internal/engine/reflection/daily-log-generator.d.ts +1 -1
- package/dist/internal/engine/reflection/daily-log-generator.js +1 -2
- package/dist/internal/engine/reflection/reflection-command-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-command-hooks.js +1 -2
- package/dist/internal/engine/reflection/reflection-deps.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.js +1 -2
- package/dist/internal/engine/reflection/reflection-injection-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.js +3 -4
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +3 -4
- package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +3 -3
- package/dist/internal/engine/reflection/strategy-hook-runner.js +2 -2
- package/dist/internal/engine/rem/classifier.d.ts +1 -1
- package/dist/internal/engine/rem/classifier.js +1 -2
- package/dist/internal/engine/rem/index.d.ts +3 -3
- package/dist/internal/engine/rem/index.js +18 -36
- package/dist/internal/engine/rem/types.d.ts +1 -1
- package/dist/internal/engine/rem/types.js +1 -2
- package/dist/internal/engine/retrieval/access-tracker.d.ts +1 -1
- package/dist/internal/engine/retrieval/access-tracker.js +1 -2
- package/dist/internal/engine/retrieval/intent-analyzer.d.ts +1 -1
- package/dist/internal/engine/retrieval/intent-analyzer.js +1 -2
- package/dist/internal/engine/retrieval/retrieval-gate.d.ts +1 -1
- package/dist/internal/engine/retrieval/retrieval-gate.js +1 -2
- package/dist/internal/engine/retrieval/retriever.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.js +1 -2
- package/dist/internal/engine/security/memory-scope-policy.d.ts +1 -1
- package/dist/internal/engine/security/memory-scope-policy.js +1 -2
- package/dist/internal/engine/security/redact.d.ts +1 -1
- package/dist/internal/engine/security/redact.js +1 -2
- package/dist/internal/engine/security/scopes.d.ts +2 -2
- package/dist/internal/engine/security/scopes.js +2 -2
- package/dist/internal/engine/shared/errors.d.ts +1 -1
- package/dist/internal/engine/shared/errors.js +1 -2
- package/dist/internal/engine/shared/i18n-text.d.ts +1 -1
- package/dist/internal/engine/shared/i18n-text.js +1 -2
- package/dist/internal/engine/shared/iso-date-time.d.ts +1 -3
- package/dist/internal/engine/shared/iso-date-time.js +1 -2
- package/dist/internal/engine/shared/lru.d.ts +1 -1
- package/dist/internal/engine/shared/lru.js +1 -2
- package/dist/internal/engine/shared/memory-kind-policy.d.ts +1 -1
- package/dist/internal/engine/shared/memory-kind-policy.js +1 -2
- package/dist/internal/engine/shared/paths.d.ts +2 -2
- package/dist/internal/engine/shared/paths.js +1 -2
- package/dist/internal/engine/shared/types.d.ts +2 -2
- package/dist/internal/engine/shared/types.js +2 -3
- package/dist/internal/engine/shared/utils.d.ts +1 -1
- package/dist/internal/engine/shared/utils.js +1 -2
- package/dist/internal/engine/telemetry/memory-telemetry-api.d.ts +5 -9
- package/dist/internal/engine/telemetry/memory-telemetry-api.js +6 -8
- package/dist/internal/engine/telemetry/memory-telemetry-observability.d.ts +2 -4
- package/dist/internal/engine/telemetry/memory-telemetry-observability.js +1 -2
- package/dist/internal/engine/telemetry/memory-telemetry-outbox.d.ts +1 -1
- package/dist/internal/engine/telemetry/memory-telemetry-outbox.js +4 -5
- package/dist/internal/engine/telemetry/memory-telemetry-types.d.ts +1 -1
- package/dist/internal/engine/telemetry/memory-telemetry-types.js +1 -2
- package/dist/internal/engine/telemetry/observe-ledger.d.ts +3 -5
- package/dist/internal/engine/telemetry/observe-ledger.js +2 -3
- package/dist/internal/model/agent-llm-port.d.ts +1 -1
- package/dist/internal/model/llm-client.d.ts +2 -2
- package/dist/internal/model/llm-client.js +2 -2
- package/dist/internal/model/llm-failure.d.ts +1 -3
- package/dist/internal/model/llm-failure.js +1 -2
- package/dist/internal/model/llm-mode-routing.d.ts +1 -3
- package/dist/internal/model/llm-mode-routing.js +2 -3
- package/dist/internal/store/atomic-memory-cutover-sql.d.ts +2 -4
- package/dist/internal/store/atomic-memory-cutover-sql.js +2 -3
- package/dist/internal/store/connection.d.ts +1 -1
- package/dist/internal/store/connection.js +1 -2
- package/dist/internal/store/data-bootstrap.d.ts +1 -1
- package/dist/internal/store/data-bootstrap.js +1 -2
- package/dist/internal/store/data-paths.d.ts +1 -1
- package/dist/internal/store/data-paths.js +1 -2
- package/dist/internal/store/maintenance.d.ts +4 -6
- package/dist/internal/store/maintenance.js +18 -25
- package/dist/internal/store/memory-kinds-cutover-migrator.d.ts +1 -3
- package/dist/internal/store/memory-kinds-cutover-migrator.js +4 -5
- package/dist/internal/store/migrations.d.ts +2 -4
- package/dist/internal/store/migrations.js +2 -3
- package/dist/internal/store/sqlite-runtime.d.ts +1 -1
- package/dist/internal/store/sqlite-runtime.js +2 -3
- package/dist/internal/store/store.d.ts +2 -2
- package/dist/internal/store/store.js +1 -2
- package/dist/{learning-file-maintenance-9b-Ut6Kv.d.ts → learning-file-maintenance-ZT6kHwb1.d.ts} +0 -2
- package/dist/{llm-client-nWW1o1F6.d.ts → llm-client-Bar23wPq.d.ts} +1 -5
- package/dist/{llm-client-ByzZRemn.js → llm-client-BtbX4af4.js} +43 -17
- package/dist/{locales-JxGmkG6t.d.ts → locales-CCZtQJq7.d.ts} +0 -2
- package/dist/{log-site-catalog.generated-DsvDgHJa.js → log-site-catalog.generated-Dtiih6m2.js} +92 -94
- package/dist/log-site-catalog.json +1 -1
- package/dist/{lru-DyoaTyIs.d.ts → lru-DYiuPJFA.d.ts} +0 -2
- package/dist/memdump.d.ts +1 -3
- package/dist/memdump.js +1 -2
- package/dist/{memory-entry-projector-B36Nwsi_.js → memory-entry-projector-CkoEuLv6.js} +17 -30
- package/dist/{memory-kind-policy-BMebgugU.d.ts → memory-kind-policy-BRjhwhSl.d.ts} +1 -3
- package/dist/{memory-metadata-codec-H8BniJM3.d.ts → memory-metadata-codec-CcYw0t6c.d.ts} +1 -7
- package/dist/{memory-metadata-codec-DL1sbJiN.js → memory-metadata-codec-Cglikqj8.js} +4 -8
- package/dist/{memory-runtime-DXr1VO1p.js → memory-runtime-B9fG-sNo.js} +240 -298
- package/dist/{memory-scope-policy-1gg5QlWZ.d.ts → memory-scope-policy-4WfFFs_H.d.ts} +0 -4
- package/dist/{memory-scope-policy--TiLZnrE.js → memory-scope-policy-Dg2LHZ25.js} +3 -6
- package/dist/{memory-snapshot-CKnQovB5.d.ts → memory-snapshot-8RxJpqig.d.ts} +3 -5
- package/dist/{memory-source-order-YMRoeDLd.js → memory-source-order-BTo_ix2y.js} +1 -2
- package/dist/{memory-store-base-BHYXgsCq.d.ts → memory-store-base-CHBfMmZb.d.ts} +11 -21
- package/dist/{memory-store-shared-pOb59ScU.js → memory-store-shared-B-zOxk_Q.js} +4 -6
- package/dist/{memory-store-write-validation-B_hDG2zf.js → memory-store-write-validation-BbvoN3Li.js} +4 -7
- package/dist/{memory-telemetry-incidents-BWA9kcZx.js → memory-telemetry-incidents-Dp8GVD2Q.js} +1 -2
- package/dist/{memory-telemetry-metadata-CA7W8tK6.js → memory-telemetry-metadata-PMKWCAbj.js} +1 -2
- package/dist/{memory-telemetry-outbox-ddTdImt7.d.ts → memory-telemetry-outbox-D-L9c3Nw.d.ts} +2 -4
- package/dist/{memory-telemetry-receipts-MAJecvXQ.d.ts → memory-telemetry-receipts-Boj2CE16.d.ts} +1 -5
- package/dist/{memory-telemetry-receipts-cjIQGwdp.js → memory-telemetry-receipts-ComlCOro.js} +2 -4
- package/dist/{memory-telemetry-types-CufVmrCs.d.ts → memory-telemetry-types-Bg8U0Drl.d.ts} +0 -2
- package/dist/{memory-temporality-classifier-Bauwnls7.js → memory-temporality-classifier-Bm0EiCN8.js} +7 -9
- package/dist/{memory-temporality-classifier-Wi6WWeAj.d.ts → memory-temporality-classifier-HI9KeEsM.d.ts} +1 -3
- package/dist/{memory-tier-promoter-m60-RlAj.d.ts → memory-tier-promoter-CqNT2qFj.d.ts} +1 -3
- package/dist/{memory-tool-dependencies-Cc4SJMtd.js → memory-tool-dependencies-BxVJ-bHs.js} +6 -6
- package/dist/memory-tool-dependencies-KsEWfLkV.d.ts +14 -0
- package/dist/{model-call-table-CPyQfBJ6.js → model-call-table-BxGwmwv0.js} +14 -10
- package/dist/{model-reply-text-CKopStP2.js → model-reply-text-C7jEWDXG.js} +2 -4
- package/dist/{observable-embedder-0FwxJMhJ.d.ts → observable-embedder-DunGMyQg.d.ts} +2 -4
- package/dist/{observable-llm-client-DY7w1Fj1.d.ts → observable-llm-client-D_mOM5Pn.d.ts} +3 -5
- package/dist/{observable-memory-store-C25Q_hoW.d.ts → observable-memory-store-DUhat-p3.d.ts} +5 -7
- package/dist/{observable-retriever-Cs9Bwzq6.d.ts → observable-retriever-7TmJk1HE.d.ts} +6 -8
- package/dist/{operation-cancellation-QcwC4mDX.js → operation-cancellation-mqfQz0ka.js} +1 -2
- package/dist/paths-BySyy_eq.d.ts +1 -0
- package/dist/{plugin-config-observe-schema-ue9XxUj_.js → plugin-config-observe-schema-CwHVuVhu.js} +2 -3
- package/dist/{plugin-config-schema-DQh5njrS.d.ts → plugin-config-schema-DO4FhsYc.d.ts} +4 -24
- package/dist/{plugin-config-schema-D-IoHmis.js → plugin-config-schema-sJbkVY0-.js} +8 -14
- package/dist/{profile-CcvVR6K8.d.ts → profile-nVQCcv-0.d.ts} +1 -3
- package/dist/{profile-section-writer-CR-WWIoB.js → profile-section-writer-DSX6R3GF.js} +10 -15
- package/dist/{provider-registration-qLSA9CQl.js → provider-registration-lujpiuef.js} +5 -8
- package/dist/{provider-runtime-types-DFhtdA6d.d.ts → provider-runtime-types-peajl6V-.d.ts} +0 -2
- package/dist/{provider-types-CZGm6v88.d.ts → provider-types-DIU9efEA.d.ts} +1 -3
- package/dist/{redact-BTIZcHQL.d.ts → redact-BnUxXQUE.d.ts} +0 -2
- package/dist/{reflection-command-hooks-BRLqVNCi.d.ts → reflection-command-hooks-CvkTlbOa.d.ts} +5 -7
- package/dist/{reflection-command-hooks-Der9aX0e.js → reflection-command-hooks-Dyckr_Ma.js} +11 -14
- package/dist/{reflection-deps-C0TJ-gpU.d.ts → reflection-deps-AqE-y4Ba.d.ts} +6 -8
- package/dist/{reflection-embedded-generator-Cs59hWYr.d.ts → reflection-embedded-generator-BJol6by2.d.ts} +6 -8
- package/dist/{reflection-embedded-generator-BEdDusPV.js → reflection-embedded-generator-i8KHqMpr.js} +5 -8
- package/dist/{reflection-injection-hooks-Cy4bRemm.d.ts → reflection-injection-hooks-C3PeK3QM.d.ts} +7 -11
- package/dist/{reflection-lifecycle-hooks-C-lf00DB.d.ts → reflection-lifecycle-hooks-Cjvwic3J.d.ts} +4 -6
- package/dist/{relation-dictionary-Cev1kyLe.js → relation-dictionary-QVBewRQ1.js} +3 -6
- package/dist/release-download.d.ts +1 -3
- package/dist/release-download.js +1 -2
- package/dist/{relevant-memories-context-m8nuFZcM.js → relevant-memories-context-CvMB_zj8.js} +1 -2
- package/dist/rem-batch-executor-BSWXFOLH.js +1 -0
- package/dist/{rem-consumer-retrieval-BhS1ivcd.js → rem-consumer-retrieval-DXeqknml.js} +3 -5
- package/dist/{rem-trigger-CBfyJVfh.js → rem-trigger-BaJa5FS0.js} +206 -345
- package/dist/{resolver-Dy-hnjCR.js → resolver-DQ47zbPS.js} +2 -4
- package/dist/{results-BkMsHy7M.js → results-DERE8r4S.js} +2 -3
- package/dist/{retrieval-gate-Bx2Zg7jD.d.ts → retrieval-gate-XvDp3HuK.d.ts} +0 -2
- package/dist/{retriever-2RJYAvlD.d.ts → retriever-Cv-hwHpH.d.ts} +10 -22
- package/dist/{retriever-C54bXeDh.js → retriever-DRtPp86k.js} +12 -22
- package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/dist/{runtime-audit-log-DK6xAYxh.js → runtime-audit-log-4NJsojEj.js} +2 -4
- package/dist/{runtime-audit-log-D2Hqk_kl.d.ts → runtime-audit-log-CJK9iVX9.d.ts} +1 -3
- package/dist/{scopes-CtrY-YQ3.d.ts → scopes-BcdyFdfw.d.ts} +1 -5
- package/dist/{scopes-a4Kly9n7.js → scopes-DQjbRC2q.js} +2 -3
- package/dist/{server-BlbG5uOM.js → server-DPd3Xef2.js} +10 -15
- package/dist/{session-registry-DBoE7AvZ.d.ts → session-registry-Dft8oCDg.d.ts} +0 -2
- package/dist/sidecar/main.js +3 -4
- package/dist/{signed-registry-constants-Bv0fgZ8Q.d.ts → signed-registry-constants-BfycrCI1.d.ts} +0 -2
- package/dist/{signed-registry-constants-yq3DlG3B.js → signed-registry-constants-CO2vv_QJ.js} +1 -2
- package/dist/{sno-station-mem-runtime-dependencies-DsidkZi2.js → sno-station-mem-runtime-dependencies-DITNvfkR.js} +14 -14
- package/dist/sno-station-mem-runtime-dependencies-DorPRtTM.d.ts +29 -0
- package/dist/{sqlite-runtime-L_ywirTm.d.ts → sqlite-runtime-Cea2knhj.d.ts} +0 -2
- package/dist/{store-Bz0y76cJ.d.ts → store-AGtE-n72.d.ts} +4 -14
- package/dist/{store-Bja1tVFw.js → store-YX1_c1NH.js} +44 -76
- package/dist/{strategy-hook-runner-F-ruiw48.js → strategy-hook-runner-CwqZ1orf.js} +5 -7
- package/dist/{strategy-hook-runner-vbrWiDbK.d.ts → strategy-hook-runner-DqJpzS9C.d.ts} +7 -9
- package/dist/{token-counter-BD1f48Km.js → token-counter-N9I9iWq1.js} +1 -2
- package/dist/{trace-C1JxMfs-.d.ts → trace-CX26YO5M.d.ts} +0 -2
- package/dist/{types-El7jViCz.d.ts → types-CMbBmMJB.d.ts} +1 -5
- package/dist/{types-pVomjzqR.d.ts → types-qOSF58Ck.d.ts} +0 -2
- package/dist/{unplaced-candidate-migration-BCcdQkcx.js → unplaced-candidate-migration-BFQqjIDP.js} +8 -14
- package/dist/{utils-CDw2ttQf.d.ts → utils-CdhxW1G9.d.ts} +0 -2
- package/package.json +1 -1
- package/settings.default.json +7 -7
- package/skills/extract-atomic-memory/SKILL.md +4 -3
- package/skills/extract-atomic-memory/references/capture.md +3 -2
- package/dist/memory-tool-dependencies-D2fOC-KL.d.ts +0 -14
- package/dist/paths-obFSsJv3.d.ts +0 -1
- package/dist/rem-batch-executor-DiU8hSGc.js +0 -2
- package/dist/sno-station-mem-runtime-dependencies-ByI3b-wB.d.ts +0 -31
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as FIXED_IDX_MEMORY_ACTIVE_TASK_CURRENT_REVISION, A as modelCallDestination, At as FIXED_MEMORY_PROFILE_RECOVERY_ENTRIES, B as FIXED_EXTERNAL_VALUE_49, C as getSnoStationMemStateDir, Cn as CHUNK_OVERLAP_TOKENS, Cr as ensureModelDownloaded, Ct as FIXED_MEMORY_CHUNKS_MEM_FACET_IDX, D as settingsToPluginConfig, Dn as DEFAULT_IMPORTANCE, Dt as FIXED_MEMORY_MEMORIES_FACT_ID_INSERT_GUARD, En as DEFAULT_BM25_WEIGHT, Et as FIXED_MEMORY_MEMORIES, Fn as EMBEDDER_DIM, G as FIXED_EXTERNAL_VALUE_55, H as FIXED_EXTERNAL_VALUE_52, Hn as HEAD_EXTRACT_OVERLAP_DROP_RATIO, In as EMBEDDER_MODEL_DEFAULT, It as FIXED_MEMORY_SNO_EXTRACT_CHAT, J as FIXED_EXTERNAL_VALUE_58, K as FIXED_EXTERNAL_VALUE_56, Kn as INTRA_MEMORY_COSINE_THRESHOLD, Kt as FIXED_PROTOCOL_VALUE_69, Ln as EMBEDDER_PROVIDER_DEFAULT, Mn as DEFAULT_RERANK_TIMEOUT_MS, Mt as FIXED_MEMORY_PROVIDER_PROJECT_AGENTS, Nt as FIXED_MEMORY_PROVIDER_PROJECT_MAPPINGS, O as MODEL_CALLS, On as DEFAULT_RECALL_LIFECYCLE, Ot as FIXED_MEMORY_MEMORIES_FACT_ID_UPDATE_GUARD, P as observeAgentId, Pn as DEFAULT_VECTOR_WEIGHT, Q as FIXED_IDX_MEMORY, Rn as EVAL_QA_TRACES_FILENAME, Rt as FIXED_MEMORY_TASK_LIFECYCLE_COMMANDS, Sn as CHUNK_MIN_TOKENS, Sr as LocalReranker, St as FIXED_MEMORY_CHUNKS_MEMORY_ID_IDX, T as readSettings, Tn as CHUNK_TOKENIZER_MODE, Tt as FIXED_MEMORY_EXTRACTION_TIMESTAMPS, U as FIXED_EXTERNAL_VALUE_53, Un as HEAD_EXTRACT_TOKEN_BUDGET, V as FIXED_EXTERNAL_VALUE_51, Vn as HEAD_EXTRACT_MIN_CONTENT_TOKENS, W as FIXED_EXTERNAL_VALUE_54, Wn as IMPORTANCE_WEIGHT_BASE, X as FIXED_EXTERNAL_VALUE_8, Xn as MAX_CHUNK_FETCH_LIMIT, Y as FIXED_EXTERNAL_VALUE_62, Z as FIXED_EXTERNAL_VALUE_9, Zn as MAX_LIST_LIMIT, _r as CachedEmbeddingProvider, _t as FIXED_MEMORY_CHUNKS, a as REM_MODEL_OUTPUT_TOKEN_CAP, an as PERSISTED_PROVIDER_SYSTEM, ar as RECENCY_WEIGHT, at as FIXED_IDX_MEMORY_MEMORIES_LANE_PROJECT, bn as CHUNKING_VERSION$1, bt as FIXED_MEMORY_CHUNKS_AU, cn as SUPPORTED_LOCALES, cr as RETRIEVAL_STORAGE_CHUNK_PROFILE, ct as FIXED_IDX_MEMORY_MEMORIES_PROJECT_FACT_KEY_ACTIVE, d as getRemDiscoveryPath, dn as ADJACENCY_BONUS_PER_PAIR, dt as FIXED_MEMORY_ACTIVE_TASK_EVIDENCE, en as FIXED_VEC_MEMORY, et as FIXED_IDX_MEMORY_ACTIVE_TASK_EVIDENCE_INSTANCE, ft as FIXED_MEMORY_ACTIVE_TASK_INSTANCES, g as readRemOperationalConfig, gt as FIXED_MEMORY_ACTIVE_TASK_TRANSITIONS, hr as experimentMmrDisabled, ht as FIXED_MEMORY_ACTIVE_TASK_REVISIONS, in as PERSISTED_CONTENT_HASH_V3, it as FIXED_IDX_MEMORY_MEMORIES_FACT_ID, jr as REM_SIDECAR_TOKEN_HEADER, jt as FIXED_MEMORY_PROVIDER_AGENT_MAPPINGS, k as MODEL_CALL_WORKLOAD, kt as FIXED_MEMORY_MIGRATION_MARKERS, lt as FIXED_IDX_MEMORY_MEMORIES_PROJECT_TIMESTAMP, mr as experimentCandidatePoolOverride, mt as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_MANIFESTS, nn as PERSISTED_CANDIDATE_HASH_V1, nr as MULTI_HIT_BONUS_CAP, nt as FIXED_IDX_MEMORY_MEMORIES_CATEGORY, o as REM_RUN_PATH, ot as FIXED_IDX_MEMORY_MEMORIES_PROJECT, pt as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_EVIDENCE, q as FIXED_EXTERNAL_VALUE_57, qt as FIXED_PROTOCOL_VALUE_73, r as REM_CORRELATION_ID_HEADER, rn as PERSISTED_CONTENT_HASH_V1, rr as MULTI_HIT_BONUS_PER_HIT, rt as FIXED_IDX_MEMORY_MEMORIES_CONTENT_HASH, s as REM_SIDECAR_HOST, sn as llmRoutingConfigSchema, st as FIXED_IDX_MEMORY_MEMORIES_PROJECT_CONTENT_HASH, tn as FIXED_VEC_MEMORY_CHUNKS, tr as MMR_LAMBDA, tt as FIXED_IDX_MEMORY_ACTIVE_TASK_INSTANCES_PROJECTION, un as ADJACENCY_BONUS_CAP, ur as TIME_DECAY_FLOOR, ut as FIXED_MEMORY, vn as BONUS_TOTAL_INVARIANT, vr as LOCAL_EMBEDDING_CACHE_DIR_DEFAULT, vt as FIXED_MEMORY_CHUNKS_AD, wn as CHUNK_TARGET_TOKENS, wt as FIXED_MEMORY_CHUNKS_MEM_IDX, xn as CHUNK_MAX_TOKENS, xr as LocalEmbedProvider, xt as FIXED_MEMORY_CHUNKS_FTS, yn as CACHE_TTL_MS, yr as LOCAL_EMBEDDING_MODEL, yt as FIXED_MEMORY_CHUNKS_AI, zt as FIXED_MEMORY_UNPLACED_CANDIDATES } from "./config-
|
|
1
|
+
import { $ as FIXED_IDX_MEMORY_ACTIVE_TASK_CURRENT_REVISION, A as modelCallDestination, At as FIXED_MEMORY_PROFILE_RECOVERY_ENTRIES, B as FIXED_EXTERNAL_VALUE_49, C as getSnoStationMemStateDir, Cn as CHUNK_OVERLAP_TOKENS, Cr as ensureModelDownloaded, Ct as FIXED_MEMORY_CHUNKS_MEM_FACET_IDX, D as settingsToPluginConfig, Dn as DEFAULT_IMPORTANCE, Dt as FIXED_MEMORY_MEMORIES_FACT_ID_INSERT_GUARD, En as DEFAULT_BM25_WEIGHT, Et as FIXED_MEMORY_MEMORIES, Fn as EMBEDDER_DIM, G as FIXED_EXTERNAL_VALUE_55, H as FIXED_EXTERNAL_VALUE_52, Hn as HEAD_EXTRACT_OVERLAP_DROP_RATIO, In as EMBEDDER_MODEL_DEFAULT, It as FIXED_MEMORY_SNO_EXTRACT_CHAT, J as FIXED_EXTERNAL_VALUE_58, K as FIXED_EXTERNAL_VALUE_56, Kn as INTRA_MEMORY_COSINE_THRESHOLD, Kt as FIXED_PROTOCOL_VALUE_69, Ln as EMBEDDER_PROVIDER_DEFAULT, Mn as DEFAULT_RERANK_TIMEOUT_MS, Mt as FIXED_MEMORY_PROVIDER_PROJECT_AGENTS, Nt as FIXED_MEMORY_PROVIDER_PROJECT_MAPPINGS, O as MODEL_CALLS, On as DEFAULT_RECALL_LIFECYCLE, Ot as FIXED_MEMORY_MEMORIES_FACT_ID_UPDATE_GUARD, P as observeAgentId, Pn as DEFAULT_VECTOR_WEIGHT, Q as FIXED_IDX_MEMORY, Rn as EVAL_QA_TRACES_FILENAME, Rt as FIXED_MEMORY_TASK_LIFECYCLE_COMMANDS, Sn as CHUNK_MIN_TOKENS, Sr as LocalReranker, St as FIXED_MEMORY_CHUNKS_MEMORY_ID_IDX, T as readSettings, Tn as CHUNK_TOKENIZER_MODE, Tt as FIXED_MEMORY_EXTRACTION_TIMESTAMPS, U as FIXED_EXTERNAL_VALUE_53, Un as HEAD_EXTRACT_TOKEN_BUDGET, V as FIXED_EXTERNAL_VALUE_51, Vn as HEAD_EXTRACT_MIN_CONTENT_TOKENS, W as FIXED_EXTERNAL_VALUE_54, Wn as IMPORTANCE_WEIGHT_BASE, X as FIXED_EXTERNAL_VALUE_8, Xn as MAX_CHUNK_FETCH_LIMIT, Y as FIXED_EXTERNAL_VALUE_62, Z as FIXED_EXTERNAL_VALUE_9, Zn as MAX_LIST_LIMIT, _r as CachedEmbeddingProvider, _t as FIXED_MEMORY_CHUNKS, a as REM_MODEL_OUTPUT_TOKEN_CAP, an as PERSISTED_PROVIDER_SYSTEM, ar as RECENCY_WEIGHT, at as FIXED_IDX_MEMORY_MEMORIES_LANE_PROJECT, bn as CHUNKING_VERSION$1, bt as FIXED_MEMORY_CHUNKS_AU, cn as SUPPORTED_LOCALES, cr as RETRIEVAL_STORAGE_CHUNK_PROFILE, ct as FIXED_IDX_MEMORY_MEMORIES_PROJECT_FACT_KEY_ACTIVE, d as getRemDiscoveryPath, dn as ADJACENCY_BONUS_PER_PAIR, dt as FIXED_MEMORY_ACTIVE_TASK_EVIDENCE, en as FIXED_VEC_MEMORY, et as FIXED_IDX_MEMORY_ACTIVE_TASK_EVIDENCE_INSTANCE, ft as FIXED_MEMORY_ACTIVE_TASK_INSTANCES, g as readRemOperationalConfig, gt as FIXED_MEMORY_ACTIVE_TASK_TRANSITIONS, hr as experimentMmrDisabled, ht as FIXED_MEMORY_ACTIVE_TASK_REVISIONS, in as PERSISTED_CONTENT_HASH_V3, it as FIXED_IDX_MEMORY_MEMORIES_FACT_ID, jr as REM_SIDECAR_TOKEN_HEADER, jt as FIXED_MEMORY_PROVIDER_AGENT_MAPPINGS, k as MODEL_CALL_WORKLOAD, kt as FIXED_MEMORY_MIGRATION_MARKERS, lt as FIXED_IDX_MEMORY_MEMORIES_PROJECT_TIMESTAMP, mr as experimentCandidatePoolOverride, mt as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_MANIFESTS, nn as PERSISTED_CANDIDATE_HASH_V1, nr as MULTI_HIT_BONUS_CAP, nt as FIXED_IDX_MEMORY_MEMORIES_CATEGORY, o as REM_RUN_PATH, ot as FIXED_IDX_MEMORY_MEMORIES_PROJECT, pt as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_EVIDENCE, q as FIXED_EXTERNAL_VALUE_57, qt as FIXED_PROTOCOL_VALUE_73, r as REM_CORRELATION_ID_HEADER, rn as PERSISTED_CONTENT_HASH_V1, rr as MULTI_HIT_BONUS_PER_HIT, rt as FIXED_IDX_MEMORY_MEMORIES_CONTENT_HASH, s as REM_SIDECAR_HOST, sn as llmRoutingConfigSchema, st as FIXED_IDX_MEMORY_MEMORIES_PROJECT_CONTENT_HASH, tn as FIXED_VEC_MEMORY_CHUNKS, tr as MMR_LAMBDA, tt as FIXED_IDX_MEMORY_ACTIVE_TASK_INSTANCES_PROJECTION, un as ADJACENCY_BONUS_CAP, ur as TIME_DECAY_FLOOR, ut as FIXED_MEMORY, vn as BONUS_TOTAL_INVARIANT, vr as LOCAL_EMBEDDING_CACHE_DIR_DEFAULT, vt as FIXED_MEMORY_CHUNKS_AD, wn as CHUNK_TARGET_TOKENS, wt as FIXED_MEMORY_CHUNKS_MEM_IDX, xn as CHUNK_MAX_TOKENS, xr as LocalEmbedProvider, xt as FIXED_MEMORY_CHUNKS_FTS, yn as CACHE_TTL_MS, yr as LOCAL_EMBEDDING_MODEL, yt as FIXED_MEMORY_CHUNKS_AI, zt as FIXED_MEMORY_UNPLACED_CANDIDATES } from "./config-D6GJyMKz.js";
|
|
2
2
|
import { createLogger, createLogger as createLogger$1, currentLogContext, privateLogReference, withLogContext } from "@snoai/utils/logger";
|
|
3
3
|
import path, { dirname, join, resolve } from "node:path";
|
|
4
4
|
import { appendFileSync, closeSync, createReadStream, existsSync, fstatSync, fsyncSync, ftruncateSync, mkdirSync, openSync, readFileSync, readSync, realpathSync, renameSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
@@ -25,7 +25,7 @@ import { arch as arch$1, platform as platform$1 } from "node:process";
|
|
|
25
25
|
import { getLoadablePath } from "sqlite-vec";
|
|
26
26
|
import { isDeepStrictEqual } from "node:util";
|
|
27
27
|
import { currentLogContext as currentLogContext$1, withLogContext as withLogContext$1 } from "@snoai/utils/log-context";
|
|
28
|
-
|
|
28
|
+
// \0rolldown/runtime.js
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __exportAll = (all, no_symbols) => {
|
|
31
31
|
let target = {};
|
|
@@ -36,8 +36,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
36
36
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
37
37
|
return target;
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
//#region src/engine/telemetry/observe-ledger.ts
|
|
39
|
+
// src/engine/telemetry/observe-ledger.ts
|
|
41
40
|
const log$24 = createLogger("sno-station-mem:observe-ledger");
|
|
42
41
|
const rowSchema = z.object({
|
|
43
42
|
ts_ms: z.number().int().nonnegative(),
|
|
@@ -166,8 +165,7 @@ async function forwardObserveLedger(options) {
|
|
|
166
165
|
async function forwardObserveLedgerUntilIdle(options) {
|
|
167
166
|
for (;;) if ((await forwardObserveLedger(options)).status !== "forwarded") return;
|
|
168
167
|
}
|
|
169
|
-
|
|
170
|
-
//#region src/engine/operation-cancellation.ts
|
|
168
|
+
// src/engine/operation-cancellation.ts
|
|
171
169
|
const operations = new AsyncLocalStorage();
|
|
172
170
|
const log$23 = createLogger("sno-station-mem:cancellation");
|
|
173
171
|
/** Carries cancellation through the existing nested extraction and reflection writers. */
|
|
@@ -248,8 +246,7 @@ async function memoryFileWrite(write) {
|
|
|
248
246
|
if (operation) operation.writes++;
|
|
249
247
|
return result;
|
|
250
248
|
}
|
|
251
|
-
|
|
252
|
-
//#region src/store/sqlite-runtime.ts
|
|
249
|
+
// src/store/sqlite-runtime.ts
|
|
253
250
|
/** @file sqlite-runtime.ts
|
|
254
251
|
* @purpose Single chokepoint for opening encrypted SQLite databases used by
|
|
255
252
|
* the plugin. Routes all opens through `@snoai/sqlite-crypto`, which applies
|
|
@@ -348,8 +345,7 @@ function openSqliteDatabaseReadonly(dbPath) {
|
|
|
348
345
|
db: guarded.db
|
|
349
346
|
};
|
|
350
347
|
}
|
|
351
|
-
|
|
352
|
-
//#region src/engine/telemetry/memory-telemetry-types.ts
|
|
348
|
+
// src/engine/telemetry/memory-telemetry-types.ts
|
|
353
349
|
const MEMORY_TELEMETRY_EVENT_TYPES = [
|
|
354
350
|
"create",
|
|
355
351
|
"update",
|
|
@@ -368,8 +364,7 @@ const MEMORY_TELEMETRY_DELETE_REASONS = {
|
|
|
368
364
|
function isMemoryTelemetryEventType(value) {
|
|
369
365
|
return typeof value === "string" && MEMORY_TELEMETRY_EVENT_TYPES.includes(value);
|
|
370
366
|
}
|
|
371
|
-
|
|
372
|
-
//#region config/attribute-dictionary.json
|
|
367
|
+
// config/attribute-dictionary.json
|
|
373
368
|
var attribute_dictionary_default = {
|
|
374
369
|
schema_version: 1,
|
|
375
370
|
name: "attribute-dictionary",
|
|
@@ -4205,8 +4200,7 @@ var attribute_dictionary_default = {
|
|
|
4205
4200
|
"travels"
|
|
4206
4201
|
]
|
|
4207
4202
|
};
|
|
4208
|
-
|
|
4209
|
-
//#region src/engine/extraction/calendar-instruction.ts
|
|
4203
|
+
// src/engine/extraction/calendar-instruction.ts
|
|
4210
4204
|
/** Calendar operations supplied by a model. This module never reads natural language. */
|
|
4211
4205
|
/** Day names in ISO order; the wire carries the name because models do not share one numbering. */
|
|
4212
4206
|
const WEEKDAYS = [
|
|
@@ -4396,8 +4390,7 @@ function calculateCalendarTime(instruction, sessionDateTime, sessionTimezone) {
|
|
|
4396
4390
|
return null;
|
|
4397
4391
|
}
|
|
4398
4392
|
}
|
|
4399
|
-
|
|
4400
|
-
//#region config/relation-dictionary.json
|
|
4393
|
+
// config/relation-dictionary.json
|
|
4401
4394
|
var relations = [
|
|
4402
4395
|
{
|
|
4403
4396
|
"type": "IS_A",
|
|
@@ -4727,8 +4720,7 @@ var relations = [
|
|
|
4727
4720
|
]
|
|
4728
4721
|
}
|
|
4729
4722
|
];
|
|
4730
|
-
|
|
4731
|
-
//#region config/state-vocabulary.json
|
|
4723
|
+
// config/state-vocabulary.json
|
|
4732
4724
|
var state_vocabulary_default = {
|
|
4733
4725
|
schema_version: 1,
|
|
4734
4726
|
name: "state-vocabulary",
|
|
@@ -4806,8 +4798,7 @@ var state_vocabulary_default = {
|
|
|
4806
4798
|
}
|
|
4807
4799
|
]
|
|
4808
4800
|
};
|
|
4809
|
-
|
|
4810
|
-
//#region src/model/llm-json-utils.ts
|
|
4801
|
+
// src/model/llm-json-utils.ts
|
|
4811
4802
|
/** @file llm-json-utils.ts
|
|
4812
4803
|
* @purpose Extracts and repairs JSON returned by LLM providers.
|
|
4813
4804
|
* @boundary Response-text normalization only; schema validation remains with callers.
|
|
@@ -4982,8 +4973,7 @@ function repairCommonJson(text) {
|
|
|
4982
4973
|
}
|
|
4983
4974
|
return result;
|
|
4984
4975
|
}
|
|
4985
|
-
|
|
4986
|
-
//#region src/engine/shared/model-reply-text.ts
|
|
4976
|
+
// src/engine/shared/model-reply-text.ts
|
|
4987
4977
|
/** @file model-reply-text.ts
|
|
4988
4978
|
* @purpose Turns one raw model reply into the ordered JSON payload candidates a caller may accept.
|
|
4989
4979
|
* @boundary Response-text normalization only; the caller owns every schema decision.
|
|
@@ -5139,8 +5129,7 @@ function readModelReplyJson(raw, accept) {
|
|
|
5139
5129
|
if (admitted !== void 0) return admitted;
|
|
5140
5130
|
}
|
|
5141
5131
|
}
|
|
5142
|
-
|
|
5143
|
-
//#region src/engine/extraction/atomic-extraction-skill.ts
|
|
5132
|
+
// src/engine/extraction/atomic-extraction-skill.ts
|
|
5144
5133
|
/** @file atomic-extraction-skill.ts
|
|
5145
5134
|
* @purpose Loads the model-readable atomic memory extraction method shipped with the plugin.
|
|
5146
5135
|
* @boundary Package-relative read of one trusted bundled skill.
|
|
@@ -5190,8 +5179,7 @@ function atomicExtractionSkillReference(name) {
|
|
|
5190
5179
|
if (text === void 0) throw new Error(`sno-station-mem atomic extraction skill reference missing: ${name}`);
|
|
5191
5180
|
return text;
|
|
5192
5181
|
}
|
|
5193
|
-
|
|
5194
|
-
//#region src/model/llm-mode-routing.ts
|
|
5182
|
+
// src/model/llm-mode-routing.ts
|
|
5195
5183
|
/** @file llm-mode-routing.ts
|
|
5196
5184
|
* @purpose Resolve one model call id to its configured destination and transport.
|
|
5197
5185
|
*/
|
|
@@ -5224,8 +5212,7 @@ function resolveLlmRoute(input) {
|
|
|
5224
5212
|
parser: call.replyParser.snoGpu
|
|
5225
5213
|
};
|
|
5226
5214
|
}
|
|
5227
|
-
|
|
5228
|
-
//#region src/engine/shared/types.ts
|
|
5215
|
+
// src/engine/shared/types.ts
|
|
5229
5216
|
const MEMORY_CATEGORIES = [
|
|
5230
5217
|
"episodic",
|
|
5231
5218
|
"profile",
|
|
@@ -5245,8 +5232,7 @@ function normalizeCategory(raw) {
|
|
|
5245
5232
|
const lower = raw.toLowerCase().trim();
|
|
5246
5233
|
if (MEMORY_CATEGORIES.includes(lower)) return lower;
|
|
5247
5234
|
}
|
|
5248
|
-
|
|
5249
|
-
//#region src/engine/extraction/memory-metadata-normalizers.ts
|
|
5235
|
+
// src/engine/extraction/memory-metadata-normalizers.ts
|
|
5250
5236
|
function validateMemoryCategory(raw) {
|
|
5251
5237
|
return normalizeCategory(raw) ?? void 0;
|
|
5252
5238
|
}
|
|
@@ -5336,8 +5322,7 @@ function deriveFactKey(metadata) {
|
|
|
5336
5322
|
return signature ? `lesson:${signature}` : void 0;
|
|
5337
5323
|
}
|
|
5338
5324
|
}
|
|
5339
|
-
|
|
5340
|
-
//#region src/engine/extraction/memory-metadata-types.ts
|
|
5325
|
+
// src/engine/extraction/memory-metadata-types.ts
|
|
5341
5326
|
/** @file memory-metadata-types.ts
|
|
5342
5327
|
* @purpose Defines typed insight metadata contracts via Zod discriminated union.
|
|
5343
5328
|
* @boundary Metadata shape declarations only.
|
|
@@ -5480,8 +5465,7 @@ const memoryMetadata = z.discriminatedUnion("kind", [
|
|
|
5480
5465
|
summaryMetadata,
|
|
5481
5466
|
stateMetadata
|
|
5482
5467
|
]);
|
|
5483
|
-
|
|
5484
|
-
//#region src/engine/shared/iso-date-time.ts
|
|
5468
|
+
// src/engine/shared/iso-date-time.ts
|
|
5485
5469
|
/** @file iso-date-time.ts
|
|
5486
5470
|
* @purpose Validates persisted ISO date/date-time strings without JavaScript Date rollover.
|
|
5487
5471
|
* @boundary ISO string normalization and epoch parsing only; no relative date parsing.
|
|
@@ -5509,8 +5493,7 @@ function parseIsoDateTimeMs(value) {
|
|
|
5509
5493
|
const parsed = Date.parse(normalized);
|
|
5510
5494
|
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
5511
5495
|
}
|
|
5512
|
-
|
|
5513
|
-
//#region src/engine/extraction/memory-metadata-codec.ts
|
|
5496
|
+
// src/engine/extraction/memory-metadata-codec.ts
|
|
5514
5497
|
/** @file memory-metadata-codec.ts
|
|
5515
5498
|
* @purpose Normalizes extracted metadata into typed fields for ranking and filtering.
|
|
5516
5499
|
* @boundary Extractor output, preference slots, and store metadata persistence.
|
|
@@ -5684,8 +5667,7 @@ function stringifyInsightMetadata(metadata) {
|
|
|
5684
5667
|
delete capped.memory_layer;
|
|
5685
5668
|
return JSON.stringify(capped);
|
|
5686
5669
|
}
|
|
5687
|
-
|
|
5688
|
-
//#region src/engine/security/redact.ts
|
|
5670
|
+
// src/engine/security/redact.ts
|
|
5689
5671
|
/** @file redact.ts
|
|
5690
5672
|
* @purpose Redacts sensitive values before logs, diagnostics, or model-visible text.
|
|
5691
5673
|
* @boundary Security boundaries, capture payloads, and CLI output hygiene.
|
|
@@ -5747,8 +5729,7 @@ function tokenizeForFts(rawQuery) {
|
|
|
5747
5729
|
}
|
|
5748
5730
|
return normalized.split(/\s+/u).filter(Boolean);
|
|
5749
5731
|
}
|
|
5750
|
-
|
|
5751
|
-
//#region src/engine/shared/utils.ts
|
|
5732
|
+
// src/engine/shared/utils.ts
|
|
5752
5733
|
/** @file utils.ts
|
|
5753
5734
|
* @purpose Provides shared utility functions used across plugin runtime modules.
|
|
5754
5735
|
* @boundary Text normalization, hashing, filesystem helpers, and small conversions.
|
|
@@ -5874,8 +5855,7 @@ function debugContentPreview(text, enabled, maxChars = 80) {
|
|
|
5874
5855
|
return collapsed.length > maxChars ? `${collapsed.slice(0, maxChars)}...` : collapsed;
|
|
5875
5856
|
}
|
|
5876
5857
|
z.object({ source: z.object({ commit: z.string().min(1) }) });
|
|
5877
|
-
|
|
5878
|
-
//#region config/skin-defaults.ts
|
|
5858
|
+
// config/skin-defaults.ts
|
|
5879
5859
|
/** Epoch milliseconds after which the requester no longer waits for the answer. */
|
|
5880
5860
|
const HOST_MODEL_DEADLINE_HEADER = "x-sno-deadline";
|
|
5881
5861
|
z.object({
|
|
@@ -5886,13 +5866,11 @@ z.object({
|
|
|
5886
5866
|
counted: z.boolean(),
|
|
5887
5867
|
path: z.string().min(1).optional()
|
|
5888
5868
|
});
|
|
5889
|
-
|
|
5890
|
-
//#region config/coding-skin.ts
|
|
5869
|
+
// config/coding-skin.ts
|
|
5891
5870
|
const CODING_SKIN_CHILD_DEADLINE_MS = 11e4;
|
|
5892
5871
|
const CODING_SKIN_SESSION_QUERY = "standing decisions, open tasks, conventions and known pitfalls for this repository";
|
|
5893
5872
|
const CODING_SKIN_LEDGER_MAX_CHARS = 12e3;
|
|
5894
|
-
|
|
5895
|
-
//#region src/engine/operations/jsonl-lines.ts
|
|
5873
|
+
// src/engine/operations/jsonl-lines.ts
|
|
5896
5874
|
const log$22 = createLogger("sno-station-mem:jsonl");
|
|
5897
5875
|
/** Preserve complete records without materializing an unbounded log as one string. */
|
|
5898
5876
|
async function* readJsonlLines(file) {
|
|
@@ -5919,8 +5897,7 @@ async function* readJsonlLines(file) {
|
|
|
5919
5897
|
stream.destroy();
|
|
5920
5898
|
}
|
|
5921
5899
|
}
|
|
5922
|
-
|
|
5923
|
-
//#region src/engine/operations/runtime-audit-log.ts
|
|
5900
|
+
// src/engine/operations/runtime-audit-log.ts
|
|
5924
5901
|
/** @file runtime-audit-log.ts
|
|
5925
5902
|
* @purpose Records audit events for operational visibility and safety-sensitive actions.
|
|
5926
5903
|
* @boundary Plugin runtime events and filesystem-backed audit persistence.
|
|
@@ -6401,8 +6378,7 @@ function runWithMemoryAuditSync(options) {
|
|
|
6401
6378
|
return result;
|
|
6402
6379
|
});
|
|
6403
6380
|
}
|
|
6404
|
-
|
|
6405
|
-
//#region src/model/llm-failure.ts
|
|
6381
|
+
// src/model/llm-failure.ts
|
|
6406
6382
|
const CREDENTIAL_CATEGORIES = /* @__PURE__ */ new Set([
|
|
6407
6383
|
"auth",
|
|
6408
6384
|
"credential-expired",
|
|
@@ -6453,8 +6429,7 @@ function isTerminalLlmFailure$1(category) {
|
|
|
6453
6429
|
function isTransientLlmStatus(status) {
|
|
6454
6430
|
return status === 408 || status === 429 || status >= 500;
|
|
6455
6431
|
}
|
|
6456
|
-
|
|
6457
|
-
//#region src/model/llmix-registry.ts
|
|
6432
|
+
// src/model/llmix-registry.ts
|
|
6458
6433
|
/** @file llmix-registry.ts
|
|
6459
6434
|
* @purpose Loads the bundled signed LLMIx registry for sno-station-mem.
|
|
6460
6435
|
* @boundary Trust-anchor verification and package-relative asset resolution only.
|
|
@@ -6621,8 +6596,7 @@ async function resolveConfiguredBundledLlmixEndpoint(input) {
|
|
|
6621
6596
|
baseSource: input.selectBaseSource(configured.provider)
|
|
6622
6597
|
});
|
|
6623
6598
|
}
|
|
6624
|
-
|
|
6625
|
-
//#region src/model/llm-endpoint-resolution.ts
|
|
6599
|
+
// src/model/llm-endpoint-resolution.ts
|
|
6626
6600
|
const SNO_GPU_ORIGIN = "https://rt3-llm.sno.ai";
|
|
6627
6601
|
const PROVIDER_API_BASES = {
|
|
6628
6602
|
openai: FIXED_PROTOCOL_VALUE_69,
|
|
@@ -6651,8 +6625,7 @@ async function resolveLlmEndpoint(input) {
|
|
|
6651
6625
|
userBaseUrlOverride: input.baseOverride !== void 0
|
|
6652
6626
|
};
|
|
6653
6627
|
}
|
|
6654
|
-
|
|
6655
|
-
//#region src/model/llm-provider-transport.ts
|
|
6628
|
+
// src/model/llm-provider-transport.ts
|
|
6656
6629
|
const log$21 = createLogger("sno-station-mem:llm-provider-transport");
|
|
6657
6630
|
const routeInFlight = /* @__PURE__ */ new Map();
|
|
6658
6631
|
const providerResponses = new AsyncLocalStorage();
|
|
@@ -6944,6 +6917,32 @@ function isCcproxyOpenAiBaseUrl(value) {
|
|
|
6944
6917
|
return false;
|
|
6945
6918
|
}
|
|
6946
6919
|
}
|
|
6920
|
+
/** Joins a chat-completion SSE stream into the body a non-streamed reply carries; `: ping` comments are skipped. */
|
|
6921
|
+
function assembleChatStream(text) {
|
|
6922
|
+
const body = {};
|
|
6923
|
+
let message;
|
|
6924
|
+
for (const line of text.split("\n")) {
|
|
6925
|
+
if (!line.startsWith("data:")) continue;
|
|
6926
|
+
const data = line.slice(5).trim();
|
|
6927
|
+
if (data === "[DONE]") break;
|
|
6928
|
+
const chunk = JSON.parse(data);
|
|
6929
|
+
body.id ??= chunk.id;
|
|
6930
|
+
body.model ??= chunk.model;
|
|
6931
|
+
if (chunk.usage) body.usage = chunk.usage;
|
|
6932
|
+
const choice = chunk.choices?.[0];
|
|
6933
|
+
if (!choice) continue;
|
|
6934
|
+
message ??= { content: "" };
|
|
6935
|
+
if (typeof choice.delta?.content === "string") message.content += choice.delta.content;
|
|
6936
|
+
if (choice.finish_reason) message.finishReason = choice.finish_reason;
|
|
6937
|
+
}
|
|
6938
|
+
return {
|
|
6939
|
+
...body,
|
|
6940
|
+
choices: message ? [{
|
|
6941
|
+
message: { content: message.content },
|
|
6942
|
+
finish_reason: message.finishReason
|
|
6943
|
+
}] : []
|
|
6944
|
+
};
|
|
6945
|
+
}
|
|
6947
6946
|
async function snoStationMemDispatch(ctx) {
|
|
6948
6947
|
const cfgExt = ctx.config;
|
|
6949
6948
|
const provider = ctx.provider;
|
|
@@ -6995,7 +6994,11 @@ async function snoStationMemDispatch(ctx) {
|
|
|
6995
6994
|
body: JSON.stringify({
|
|
6996
6995
|
model: ctx.model,
|
|
6997
6996
|
messages: ctx.messages,
|
|
6998
|
-
...callBody
|
|
6997
|
+
...callBody,
|
|
6998
|
+
...provider === "sno-gpu" ? {
|
|
6999
|
+
stream: true,
|
|
7000
|
+
stream_options: { include_usage: true }
|
|
7001
|
+
} : {}
|
|
6999
7002
|
})
|
|
7000
7003
|
});
|
|
7001
7004
|
diagnostic.headersAt = performance.now();
|
|
@@ -7013,7 +7016,7 @@ async function snoStationMemDispatch(ctx) {
|
|
|
7013
7016
|
}
|
|
7014
7017
|
let body;
|
|
7015
7018
|
try {
|
|
7016
|
-
body = await response.json();
|
|
7019
|
+
body = response.headers.get("content-type")?.includes("text/event-stream") ? assembleChatStream(await response.text()) : await response.json();
|
|
7017
7020
|
diagnostic.bodyAt = performance.now();
|
|
7018
7021
|
} catch (parseErr) {
|
|
7019
7022
|
if (abortedProviderCategory(requestAbort)) throwTerminalAbort(parseErr, requestAbort);
|
|
@@ -7089,8 +7092,7 @@ function resolveProviderApiKey(config, resolved, userBaseUrlOverride) {
|
|
|
7089
7092
|
if (resolved.provider === "openai" && (!userBaseUrlOverride || isCcproxyOpenAiBaseUrl(config.baseURL?.trim()))) return CCPROXY_PLACEHOLDER_API_KEY;
|
|
7090
7093
|
throw new Error(`sno-station-mem llm-client: missing API key for preset ${config.preset}; set snoGpu.apiKey`);
|
|
7091
7094
|
}
|
|
7092
|
-
|
|
7093
|
-
//#region src/model/llm-client.ts
|
|
7095
|
+
// src/model/llm-client.ts
|
|
7094
7096
|
const log$20 = createLogger("sno-station-mem:llm-client");
|
|
7095
7097
|
let hostRequestsInFlight = 0;
|
|
7096
7098
|
/**
|
|
@@ -7335,12 +7337,12 @@ function createLlmClient(config) {
|
|
|
7335
7337
|
let lastError = null;
|
|
7336
7338
|
let lastUsage = null;
|
|
7337
7339
|
const resolveRequestTimeoutMs = (request) => {
|
|
7338
|
-
if (
|
|
7340
|
+
if (!request.callId.startsWith("E") || MODEL_CALLS[request.callId].occasion !== "memoryExtract") return request.timeoutMs ?? config.timeoutMs ?? 3e4;
|
|
7339
7341
|
const operationDeadline = memoryOperationDeadline();
|
|
7340
7342
|
if (operationDeadline === void 0) return request.timeoutMs ?? 3e5;
|
|
7341
7343
|
const remainingMs = operationDeadline - performance.now();
|
|
7342
7344
|
if (remainingMs <= 0) throw new LlmClientTerminalError("timeout", "Memory operation deadline exhausted before extraction");
|
|
7343
|
-
return Math.min(request.timeoutMs ?? remainingMs, remainingMs);
|
|
7345
|
+
return Math.floor(Math.min(request.timeoutMs ?? remainingMs, remainingMs));
|
|
7344
7346
|
};
|
|
7345
7347
|
const destinationFor = (request) => {
|
|
7346
7348
|
if (!config.routing) return "host";
|
|
@@ -7668,7 +7670,7 @@ function createLlmClient(config) {
|
|
|
7668
7670
|
const attemptLimit = request.emptyReplyAttempts ?? EMPTY_REPLY_ATTEMPTS;
|
|
7669
7671
|
for (let attempt = 2; attempt <= attemptLimit; attempt += 1) {
|
|
7670
7672
|
if (content === null || content.raw.trim().length > 0 || budget.remaining <= 0) break;
|
|
7671
|
-
const remainingMs = deadlineMs - performance.now();
|
|
7673
|
+
const remainingMs = Math.floor(deadlineMs - performance.now());
|
|
7672
7674
|
if (remainingMs <= 0) break;
|
|
7673
7675
|
log$20.debug("Retrying empty model reply", {
|
|
7674
7676
|
call_id: request.callId,
|
|
@@ -7894,8 +7896,7 @@ function createLlmClient(config) {
|
|
|
7894
7896
|
}
|
|
7895
7897
|
};
|
|
7896
7898
|
}
|
|
7897
|
-
|
|
7898
|
-
//#region src/engine/security/scope-policy-types.ts
|
|
7899
|
+
// src/engine/security/scope-policy-types.ts
|
|
7899
7900
|
const DEFAULT_SCOPE_CONFIG = {
|
|
7900
7901
|
default: "global",
|
|
7901
7902
|
definitions: { global: { description: "Knowledge used by all your agents" } },
|
|
@@ -7910,8 +7911,7 @@ const SCOPE_PATTERNS = {
|
|
|
7910
7911
|
PROJECT: (projectId) => `project:${projectId}`,
|
|
7911
7912
|
USER: (userId) => `user:${userId}`
|
|
7912
7913
|
};
|
|
7913
|
-
|
|
7914
|
-
//#region src/engine/security/scope-identity.ts
|
|
7914
|
+
// src/engine/security/scope-identity.ts
|
|
7915
7915
|
/** @file scope-identity.ts
|
|
7916
7916
|
* @purpose Normalizes agent identities and configured access lists for scope policy.
|
|
7917
7917
|
* @boundary Identity parsing, bypass detection, and config normalization only.
|
|
@@ -7969,8 +7969,7 @@ function normalizeAgentAccessMap(agentAccess) {
|
|
|
7969
7969
|
}
|
|
7970
7970
|
return normalized;
|
|
7971
7971
|
}
|
|
7972
|
-
|
|
7973
|
-
//#region src/engine/security/memory-scope-policy.ts
|
|
7972
|
+
// src/engine/security/memory-scope-policy.ts
|
|
7974
7973
|
/** @file memory-scope-policy.ts
|
|
7975
7974
|
* @purpose Implements mutable memory scope policy management.
|
|
7976
7975
|
* @boundary Scope config validation and access decisions only.
|
|
@@ -8164,8 +8163,7 @@ var MemoryScopePolicy = class {
|
|
|
8164
8163
|
function createScopePolicy(config = {}, warn) {
|
|
8165
8164
|
return new MemoryScopePolicy(config, warn);
|
|
8166
8165
|
}
|
|
8167
|
-
|
|
8168
|
-
//#region src/engine/shared/errors.ts
|
|
8166
|
+
// src/engine/shared/errors.ts
|
|
8169
8167
|
/** @file errors.ts
|
|
8170
8168
|
* @purpose Defines typed plugin errors and stable codes for callers and CLI output.
|
|
8171
8169
|
* @boundary Runtime boundaries, CLI error mapping, and test assertions.
|
|
@@ -8219,8 +8217,7 @@ var RetrievalError = class extends SnoStationMemError {
|
|
|
8219
8217
|
this.name = "RetrievalError";
|
|
8220
8218
|
}
|
|
8221
8219
|
};
|
|
8222
|
-
|
|
8223
|
-
//#region src/engine/i18n/res/locale-resource-helpers.ts
|
|
8220
|
+
// src/engine/i18n/res/locale-resource-helpers.ts
|
|
8224
8221
|
function defineLocaleResources(base, extras) {
|
|
8225
8222
|
const categoryRouting = base.captureTriggers.categoryRouting ?? {
|
|
8226
8223
|
identity: [base.captureTriggers.identityPattern],
|
|
@@ -8244,13 +8241,11 @@ function defineLocaleResources(base, extras) {
|
|
|
8244
8241
|
reflectionSliceClassifiers: extras.reflectionSliceClassifiers
|
|
8245
8242
|
};
|
|
8246
8243
|
}
|
|
8247
|
-
|
|
8248
|
-
//#region src/engine/i18n/res/date-resolution-prompt.ts
|
|
8244
|
+
// src/engine/i18n/res/date-resolution-prompt.ts
|
|
8249
8245
|
function buildDateResolutionPrompt() {
|
|
8250
8246
|
return `${atomicExtractionSkillReference("calendar-meaning")}\nJudge only the time of the supplied claim. Return reason and time in the supplied JSON schema.`;
|
|
8251
8247
|
}
|
|
8252
|
-
|
|
8253
|
-
//#region src/engine/extraction/temporal-resolution-skill.ts
|
|
8248
|
+
// src/engine/extraction/temporal-resolution-skill.ts
|
|
8254
8249
|
/** @file temporal-resolution-skill.ts
|
|
8255
8250
|
* @purpose Loads the model-readable relative-time method shipped with the plugin.
|
|
8256
8251
|
* @boundary Package-relative read and deterministic section selection only.
|
|
@@ -8282,8 +8277,7 @@ const WITHOUT_SESSION_ANCHOR = readSection$1("Without Session Anchor");
|
|
|
8282
8277
|
function buildTemporalResolutionRule(sessionDateTime, _sessionTimezone) {
|
|
8283
8278
|
return sessionDateTime ? WITH_SESSION_ANCHOR : WITHOUT_SESSION_ANCHOR;
|
|
8284
8279
|
}
|
|
8285
|
-
|
|
8286
|
-
//#region src/engine/i18n/res/de/extraction-prompt-boundary.ts
|
|
8280
|
+
// src/engine/i18n/res/de/extraction-prompt-boundary.ts
|
|
8287
8281
|
/** @file extraction-prompt-boundary.ts
|
|
8288
8282
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
8289
8283
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -8529,8 +8523,7 @@ legacy category event <- reject
|
|
|
8529
8523
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
8530
8524
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
8531
8525
|
\`\`\``;
|
|
8532
|
-
|
|
8533
|
-
//#region src/engine/i18n/res/de/extraction-prompt-rules.ts
|
|
8526
|
+
// src/engine/i18n/res/de/extraction-prompt-rules.ts
|
|
8534
8527
|
/** @file extraction-prompt-rules.ts
|
|
8535
8528
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
8536
8529
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -8622,8 +8615,7 @@ Wenn der Benutzer sagt "migrated from X to Y" / "switched from X to Y" /
|
|
|
8622
8615
|
Änderung ALS AUCH eine \`profile\`-Memory für den aktualisierten Zustand aus.
|
|
8623
8616
|
Siehe das Migrations-Few-Shot im Abschnitt extraction-prompt-examples.ts für
|
|
8624
8617
|
die erforderliche Zwei-Memory-Ausgabeform.`;
|
|
8625
|
-
|
|
8626
|
-
//#region src/engine/i18n/res/de/extraction-prompts.ts
|
|
8618
|
+
// src/engine/i18n/res/de/extraction-prompts.ts
|
|
8627
8619
|
/** @file extraction-prompts.ts
|
|
8628
8620
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
8629
8621
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -8824,8 +8816,7 @@ Return JSON format:
|
|
|
8824
8816
|
"reason": "Decision reason"
|
|
8825
8817
|
}`;
|
|
8826
8818
|
}
|
|
8827
|
-
|
|
8828
|
-
//#region src/engine/i18n/res/de/reflection-prompts.ts
|
|
8819
|
+
// src/engine/i18n/res/de/reflection-prompts.ts
|
|
8829
8820
|
const REFLECTION_FALLBACK_MARKER$8 = "(fallback) Reflection-Generierung fehlgeschlagen; nur Minimalverweis gespeichert.";
|
|
8830
8821
|
function buildReflectionPrompt$8(conversation, maxInputChars, toolErrorSignals = []) {
|
|
8831
8822
|
const promptInput = conversation;
|
|
@@ -8985,8 +8976,7 @@ const resources$8 = defineLocaleResources({
|
|
|
8985
8976
|
derivedLegacySignals: [/\b(gelernt|beobachtet|reflexion|änderung|verifizieren|nächster lauf)\b/i]
|
|
8986
8977
|
}
|
|
8987
8978
|
});
|
|
8988
|
-
|
|
8989
|
-
//#region src/engine/i18n/res/en/extraction-prompt-boundary.ts
|
|
8979
|
+
// src/engine/i18n/res/en/extraction-prompt-boundary.ts
|
|
8990
8980
|
/** @file extraction-prompt-boundary.ts
|
|
8991
8981
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
8992
8982
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -9232,8 +9222,7 @@ legacy category event <- reject
|
|
|
9232
9222
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
9233
9223
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
9234
9224
|
\`\`\``;
|
|
9235
|
-
|
|
9236
|
-
//#region src/engine/i18n/res/en/extraction-prompt-rules.ts
|
|
9225
|
+
// src/engine/i18n/res/en/extraction-prompt-rules.ts
|
|
9237
9226
|
/** @file extraction-prompt-rules.ts
|
|
9238
9227
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
9239
9228
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -9323,8 +9312,7 @@ When the user says "migrated from X to Y" / "switched from X to Y" / "sold X,
|
|
|
9323
9312
|
got Y": emit BOTH a dated \`episodic\` record for the change AND a \`profile\`
|
|
9324
9313
|
record for the updated current state. See the migration few-shot in the examples
|
|
9325
9314
|
section for the required two-memory output shape.`;
|
|
9326
|
-
|
|
9327
|
-
//#region src/engine/i18n/res/en/extraction-prompts.ts
|
|
9315
|
+
// src/engine/i18n/res/en/extraction-prompts.ts
|
|
9328
9316
|
/** @file extraction-prompts.ts
|
|
9329
9317
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
9330
9318
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -9525,8 +9513,7 @@ Return JSON format:
|
|
|
9525
9513
|
"reason": "Decision reason"
|
|
9526
9514
|
}`;
|
|
9527
9515
|
}
|
|
9528
|
-
|
|
9529
|
-
//#region src/engine/i18n/res/en/reflection-prompts.ts
|
|
9516
|
+
// src/engine/i18n/res/en/reflection-prompts.ts
|
|
9530
9517
|
const REFLECTION_FALLBACK_MARKER$7 = "(fallback) Reflection generation failed; storing minimal pointer only.";
|
|
9531
9518
|
function buildReflectionPrompt$7(conversation, maxInputChars, toolErrorSignals = []) {
|
|
9532
9519
|
const promptInput = conversation;
|
|
@@ -9691,8 +9678,7 @@ const resources$7 = defineLocaleResources({
|
|
|
9691
9678
|
derivedLegacySignals: [/\b(this run|next run|learned|observed|reflection|derived|delta|verify|change)\b/i]
|
|
9692
9679
|
}
|
|
9693
9680
|
});
|
|
9694
|
-
|
|
9695
|
-
//#region src/engine/i18n/res/es/extraction-prompt-boundary.ts
|
|
9681
|
+
// src/engine/i18n/res/es/extraction-prompt-boundary.ts
|
|
9696
9682
|
/** @file extraction-prompt-boundary.ts
|
|
9697
9683
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
9698
9684
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -9937,8 +9923,7 @@ legacy category event <- reject
|
|
|
9937
9923
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
9938
9924
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
9939
9925
|
\`\`\``;
|
|
9940
|
-
|
|
9941
|
-
//#region src/engine/i18n/res/es/extraction-prompt-rules.ts
|
|
9926
|
+
// src/engine/i18n/res/es/extraction-prompt-rules.ts
|
|
9942
9927
|
/** @file extraction-prompt-rules.ts
|
|
9943
9928
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
9944
9929
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -10028,8 +10013,7 @@ Cuando el usuario diga "migrated from X to Y" / "switched from X to Y" /
|
|
|
10028
10013
|
"sold X, got Y": emita TANTO un registro \`episodic\` fechado para el cambio
|
|
10029
10014
|
COMO un registro \`profile\` para el estado actual actualizado. Vea el few-shot de migración
|
|
10030
10015
|
en la sección de ejemplos para la forma de salida de dos memorias requerida.`;
|
|
10031
|
-
|
|
10032
|
-
//#region src/engine/i18n/res/es/extraction-prompts.ts
|
|
10016
|
+
// src/engine/i18n/res/es/extraction-prompts.ts
|
|
10033
10017
|
/** @file extraction-prompts.ts
|
|
10034
10018
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
10035
10019
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -10230,8 +10214,7 @@ Return JSON format:
|
|
|
10230
10214
|
"reason": "Decision reason"
|
|
10231
10215
|
}`;
|
|
10232
10216
|
}
|
|
10233
|
-
|
|
10234
|
-
//#region src/engine/i18n/res/es/reflection-prompts.ts
|
|
10217
|
+
// src/engine/i18n/res/es/reflection-prompts.ts
|
|
10235
10218
|
const REFLECTION_FALLBACK_MARKER$6 = "(fallback) Falló la generación de la reflexión; solo se almacena un puntero mínimo.";
|
|
10236
10219
|
function buildReflectionPrompt$6(conversation, maxInputChars, toolErrorSignals = []) {
|
|
10237
10220
|
const promptInput = conversation;
|
|
@@ -10390,8 +10373,7 @@ const resources$6 = defineLocaleResources({
|
|
|
10390
10373
|
derivedLegacySignals: [/\b(aprendimos|observado|reflexión|reflexion|derivado|delta|verificar|cambio)\b/i]
|
|
10391
10374
|
}
|
|
10392
10375
|
});
|
|
10393
|
-
|
|
10394
|
-
//#region src/engine/i18n/res/fr/extraction-prompt-boundary.ts
|
|
10376
|
+
// src/engine/i18n/res/fr/extraction-prompt-boundary.ts
|
|
10395
10377
|
/** @file extraction-prompt-boundary.ts
|
|
10396
10378
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
10397
10379
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -10636,8 +10618,7 @@ legacy category event <- reject
|
|
|
10636
10618
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
10637
10619
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
10638
10620
|
\`\`\``;
|
|
10639
|
-
|
|
10640
|
-
//#region src/engine/i18n/res/fr/extraction-prompt-rules.ts
|
|
10621
|
+
// src/engine/i18n/res/fr/extraction-prompt-rules.ts
|
|
10641
10622
|
/** @file extraction-prompt-rules.ts
|
|
10642
10623
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
10643
10624
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -10723,8 +10704,7 @@ Quand l'utilisateur dit "migrated from X to Y" / "switched from X to Y" / "sold
|
|
|
10723
10704
|
got Y" : émettez À LA FOIS un enregistrement \`episodic\` daté pour le changement ET un
|
|
10724
10705
|
enregistrement \`profile\` pour l'état courant mis à jour. Voir le few-shot de migration
|
|
10725
10706
|
pour la forme de sortie à deux memories requise.`;
|
|
10726
|
-
|
|
10727
|
-
//#region src/engine/i18n/res/fr/extraction-prompts.ts
|
|
10707
|
+
// src/engine/i18n/res/fr/extraction-prompts.ts
|
|
10728
10708
|
/** @file extraction-prompts.ts
|
|
10729
10709
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
10730
10710
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -10925,8 +10905,7 @@ Return JSON format:
|
|
|
10925
10905
|
"reason": "Decision reason"
|
|
10926
10906
|
}`;
|
|
10927
10907
|
}
|
|
10928
|
-
|
|
10929
|
-
//#region src/engine/i18n/res/fr/reflection-prompts.ts
|
|
10908
|
+
// src/engine/i18n/res/fr/reflection-prompts.ts
|
|
10930
10909
|
const REFLECTION_FALLBACK_MARKER$5 = "(fallback) Échec de la génération de la réflexion ; seul un pointeur minimal est stocké.";
|
|
10931
10910
|
function buildReflectionPrompt$5(conversation, maxInputChars, toolErrorSignals = []) {
|
|
10932
10911
|
const promptInput = conversation;
|
|
@@ -11082,8 +11061,7 @@ const resources$5 = defineLocaleResources({
|
|
|
11082
11061
|
derivedLegacySignals: [/\b(appris|observé|observe|réflexion|reflexion|dérivé|delta|vérifier|changement)\b/i]
|
|
11083
11062
|
}
|
|
11084
11063
|
});
|
|
11085
|
-
|
|
11086
|
-
//#region src/engine/i18n/res/ja/extraction-prompt-boundary.ts
|
|
11064
|
+
// src/engine/i18n/res/ja/extraction-prompt-boundary.ts
|
|
11087
11065
|
/** @file extraction-prompt-boundary.ts
|
|
11088
11066
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
11089
11067
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -11326,8 +11304,7 @@ legacy category event <- reject
|
|
|
11326
11304
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
11327
11305
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
11328
11306
|
\`\`\``;
|
|
11329
|
-
|
|
11330
|
-
//#region src/engine/i18n/res/ja/extraction-prompt-rules.ts
|
|
11307
|
+
// src/engine/i18n/res/ja/extraction-prompt-rules.ts
|
|
11331
11308
|
/** @file extraction-prompt-rules.ts
|
|
11332
11309
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
11333
11310
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -11413,8 +11390,7 @@ SAME per-role entity の中に保持してください("Employment dates" を
|
|
|
11413
11390
|
と述べる場合:変更を記録する日付付きの \`episodic\` memory と、更新後の現在状態を
|
|
11414
11391
|
記録する \`profile\` memory の両方を生成してください。必要な 2 memory の
|
|
11415
11392
|
出力形式は examples ファイルの migration few-shot を参照。`;
|
|
11416
|
-
|
|
11417
|
-
//#region src/engine/i18n/res/ja/extraction-prompts.ts
|
|
11393
|
+
// src/engine/i18n/res/ja/extraction-prompts.ts
|
|
11418
11394
|
/** @file extraction-prompts.ts
|
|
11419
11395
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
11420
11396
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -11615,8 +11591,7 @@ Return JSON format:
|
|
|
11615
11591
|
"reason": "Decision reason"
|
|
11616
11592
|
}`;
|
|
11617
11593
|
}
|
|
11618
|
-
|
|
11619
|
-
//#region src/engine/i18n/res/ja/reflection-prompts.ts
|
|
11594
|
+
// src/engine/i18n/res/ja/reflection-prompts.ts
|
|
11620
11595
|
const REFLECTION_FALLBACK_MARKER$4 = "(fallback) リフレクション生成に失敗。最小ポインタのみを保存。";
|
|
11621
11596
|
function buildReflectionPrompt$4(conversation, maxInputChars, toolErrorSignals = []) {
|
|
11622
11597
|
const promptInput = conversation;
|
|
@@ -11767,8 +11742,7 @@ const resources$4 = defineLocaleResources({
|
|
|
11767
11742
|
derivedLegacySignals: [/学び|観察|振り返り|反省|派生|差分|確認|変更/]
|
|
11768
11743
|
}
|
|
11769
11744
|
});
|
|
11770
|
-
|
|
11771
|
-
//#region src/engine/i18n/res/ko/extraction-prompt-boundary.ts
|
|
11745
|
+
// src/engine/i18n/res/ko/extraction-prompt-boundary.ts
|
|
11772
11746
|
/** @file extraction-prompt-boundary.ts
|
|
11773
11747
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
11774
11748
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12009,8 +11983,7 @@ legacy category event <- reject
|
|
|
12009
11983
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
12010
11984
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
12011
11985
|
\`\`\``;
|
|
12012
|
-
|
|
12013
|
-
//#region src/engine/i18n/res/ko/extraction-prompt-rules.ts
|
|
11986
|
+
// src/engine/i18n/res/ko/extraction-prompt-rules.ts
|
|
12014
11987
|
/** @file extraction-prompt-rules.ts
|
|
12015
11988
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
12016
11989
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12093,8 +12066,7 @@ memory 로 만드십시오 ("Employment dates" 를 별도 memory 로 분기시
|
|
|
12093
12066
|
라고 말할 때: 변경을 기록하는 날짜가 있는 \`episodic\` memory AND 업데이트된 현재
|
|
12094
12067
|
상태를 기록하는 \`profile\` memory 를 모두 출력하십시오. 필수 두-memory 출력 형태는
|
|
12095
12068
|
예제 섹션의 migration few-shot 을 참조하십시오.`;
|
|
12096
|
-
|
|
12097
|
-
//#region src/engine/i18n/res/ko/extraction-prompts.ts
|
|
12069
|
+
// src/engine/i18n/res/ko/extraction-prompts.ts
|
|
12098
12070
|
/** @file extraction-prompts.ts
|
|
12099
12071
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
12100
12072
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -12295,8 +12267,7 @@ Return JSON format:
|
|
|
12295
12267
|
"reason": "Decision reason"
|
|
12296
12268
|
}`;
|
|
12297
12269
|
}
|
|
12298
|
-
|
|
12299
|
-
//#region src/engine/i18n/res/ko/reflection-prompts.ts
|
|
12270
|
+
// src/engine/i18n/res/ko/reflection-prompts.ts
|
|
12300
12271
|
const REFLECTION_FALLBACK_MARKER$3 = "(fallback) 리플렉션 생성 실패; 최소 포인터만 저장.";
|
|
12301
12272
|
function buildReflectionPrompt$3(conversation, maxInputChars, toolErrorSignals = []) {
|
|
12302
12273
|
const promptInput = conversation;
|
|
@@ -12502,8 +12473,7 @@ const resources$3 = defineLocaleResources({
|
|
|
12502
12473
|
derivedLegacySignals: [/배움|관찰|회고|반성|파생|변경|확인/]
|
|
12503
12474
|
}
|
|
12504
12475
|
});
|
|
12505
|
-
|
|
12506
|
-
//#region src/engine/i18n/res/ru/extraction-prompt-boundary.ts
|
|
12476
|
+
// src/engine/i18n/res/ru/extraction-prompt-boundary.ts
|
|
12507
12477
|
/** @file extraction-prompt-boundary.ts
|
|
12508
12478
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
12509
12479
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12748,8 +12718,7 @@ legacy category event <- reject
|
|
|
12748
12718
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
12749
12719
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
12750
12720
|
\`\`\``;
|
|
12751
|
-
|
|
12752
|
-
//#region src/engine/i18n/res/ru/extraction-prompt-rules.ts
|
|
12721
|
+
// src/engine/i18n/res/ru/extraction-prompt-rules.ts
|
|
12753
12722
|
/** @file extraction-prompt-rules.ts
|
|
12754
12723
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
12755
12724
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12836,8 +12805,7 @@ duration И любыми датами начала, удержанными вн
|
|
|
12836
12805
|
"sold X, got Y": выпускайте ОБА — датированную запись \`episodic\` об изменении
|
|
12837
12806
|
И запись \`profile\` для обновлённого текущего состояния. См. migration few-shot
|
|
12838
12807
|
в секции примеров для требуемой формы вывода из двух memory.`;
|
|
12839
|
-
|
|
12840
|
-
//#region src/engine/i18n/res/ru/extraction-prompts.ts
|
|
12808
|
+
// src/engine/i18n/res/ru/extraction-prompts.ts
|
|
12841
12809
|
/** @file extraction-prompts.ts
|
|
12842
12810
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
12843
12811
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -13038,8 +13006,7 @@ Return JSON format:
|
|
|
13038
13006
|
"reason": "Decision reason"
|
|
13039
13007
|
}`;
|
|
13040
13008
|
}
|
|
13041
|
-
|
|
13042
|
-
//#region src/engine/i18n/res/ru/reflection-prompts.ts
|
|
13009
|
+
// src/engine/i18n/res/ru/reflection-prompts.ts
|
|
13043
13010
|
const REFLECTION_FALLBACK_MARKER$2 = "(fallback) Сбой генерации рефлексии; сохранён только минимальный указатель.";
|
|
13044
13011
|
function buildReflectionPrompt$2(conversation, maxInputChars, toolErrorSignals = []) {
|
|
13045
13012
|
const promptInput = conversation;
|
|
@@ -13194,8 +13161,7 @@ const resources$2 = defineLocaleResources({
|
|
|
13194
13161
|
derivedLegacySignals: [/(?:^|[^\p{L}\p{N}_])(узнали|наблюдали|рефлексия|вывод|дельта|проверить|изменение)(?=$|[^\p{L}\p{N}_])/iu]
|
|
13195
13162
|
}
|
|
13196
13163
|
});
|
|
13197
|
-
|
|
13198
|
-
//#region src/engine/i18n/res/zh/extraction-prompt-boundary.ts
|
|
13164
|
+
// src/engine/i18n/res/zh/extraction-prompt-boundary.ts
|
|
13199
13165
|
/** @file extraction-prompt-boundary.ts
|
|
13200
13166
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
13201
13167
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -13436,8 +13402,7 @@ legacy category event <- reject
|
|
|
13436
13402
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
13437
13403
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
13438
13404
|
\`\`\``;
|
|
13439
|
-
|
|
13440
|
-
//#region src/engine/i18n/res/zh/extraction-prompt-rules.ts
|
|
13405
|
+
// src/engine/i18n/res/zh/extraction-prompt-rules.ts
|
|
13441
13406
|
/** @file extraction-prompt-rules.ts
|
|
13442
13407
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
13443
13408
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -13507,8 +13472,7 @@ const GRANULARITY_RULE$1 = `# GRANULARITY — 一条 memory 一个话题槽位
|
|
|
13507
13472
|
事实同理:工作经历按 role 是一个话题。"3 years at DeepMind" 与 "4 years at Google" 是不同话题,尽管都描述既往就业。把它们建为各自的 entity memory,并把任何开始日期保留在同一条 per-role entity 里(不要把 "Employment dates" 分叉成独立 memory —— 应答模型可能会加总日期而非使用陈述的年限)。
|
|
13508
13473
|
|
|
13509
13474
|
当用户说 "migrated from X to Y" / "switched from X to Y" / "sold X, got Y":同时输出一条记录变更且带日期的 \`episodic\` memory,和一条记录更新后当前状态的 \`profile\` memory。要求的两条 memory 输出形态见示例文件中的 migration few-shot。`;
|
|
13510
|
-
|
|
13511
|
-
//#region src/engine/i18n/res/zh/extraction-prompts.ts
|
|
13475
|
+
// src/engine/i18n/res/zh/extraction-prompts.ts
|
|
13512
13476
|
/** @file extraction-prompts.ts
|
|
13513
13477
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
13514
13478
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -13709,8 +13673,7 @@ Return JSON format:
|
|
|
13709
13673
|
"reason": "Decision reason"
|
|
13710
13674
|
}`;
|
|
13711
13675
|
}
|
|
13712
|
-
|
|
13713
|
-
//#region src/engine/i18n/res/zh/reflection-prompts.ts
|
|
13676
|
+
// src/engine/i18n/res/zh/reflection-prompts.ts
|
|
13714
13677
|
const REFLECTION_FALLBACK_MARKER$1 = "(fallback) 反思生成失败,仅存储最小占位记录。";
|
|
13715
13678
|
function buildReflectionPrompt$1(conversation, maxInputChars, toolErrorSignals = []) {
|
|
13716
13679
|
const promptInput = conversation;
|
|
@@ -13872,8 +13835,7 @@ const resources$1 = defineLocaleResources({
|
|
|
13872
13835
|
derivedLegacySignals: [/学到|观察|反思|派生|变化|验证|复查/]
|
|
13873
13836
|
}
|
|
13874
13837
|
});
|
|
13875
|
-
|
|
13876
|
-
//#region src/engine/i18n/res/zh-Hant/extraction-prompt-boundary.ts
|
|
13838
|
+
// src/engine/i18n/res/zh-Hant/extraction-prompt-boundary.ts
|
|
13877
13839
|
/** @file extraction-prompt-boundary.ts
|
|
13878
13840
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
13879
13841
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -14114,8 +14076,7 @@ legacy category event <- reject
|
|
|
14114
14076
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
14115
14077
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
14116
14078
|
\`\`\``;
|
|
14117
|
-
|
|
14118
|
-
//#region src/engine/i18n/res/zh-Hant/extraction-prompt-rules.ts
|
|
14079
|
+
// src/engine/i18n/res/zh-Hant/extraction-prompt-rules.ts
|
|
14119
14080
|
/** @file extraction-prompt-rules.ts
|
|
14120
14081
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
14121
14082
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -14192,8 +14153,7 @@ entity memory,並把陳述的年限與任何開始日期保留在同一條 per
|
|
|
14192
14153
|
got Y":同時輸出一條記錄變更且帶日期的 \`episodic\` memory,和一條記錄更新後
|
|
14193
14154
|
當前狀態的 \`profile\` memory。要求的兩條 memory 輸出形態請見 examples
|
|
14194
14155
|
檔中的 migration few-shot。`;
|
|
14195
|
-
|
|
14196
|
-
//#region src/engine/i18n/res/zh-Hant/extraction-prompts.ts
|
|
14156
|
+
// src/engine/i18n/res/zh-Hant/extraction-prompts.ts
|
|
14197
14157
|
/** @file extraction-prompts.ts
|
|
14198
14158
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
14199
14159
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -14394,8 +14354,7 @@ Return JSON format:
|
|
|
14394
14354
|
"reason": "Decision reason"
|
|
14395
14355
|
}`;
|
|
14396
14356
|
}
|
|
14397
|
-
|
|
14398
|
-
//#region src/engine/i18n/res/zh-Hant/reflection-prompts.ts
|
|
14357
|
+
// src/engine/i18n/res/zh-Hant/reflection-prompts.ts
|
|
14399
14358
|
const REFLECTION_FALLBACK_MARKER = "(fallback) 反思生成失敗,僅儲存最小佔位記錄。";
|
|
14400
14359
|
function buildReflectionPrompt(conversation, maxInputChars, toolErrorSignals = []) {
|
|
14401
14360
|
const promptInput = conversation;
|
|
@@ -14557,8 +14516,7 @@ const resources = defineLocaleResources({
|
|
|
14557
14516
|
derivedLegacySignals: [/學到|觀察|反思|派生|變化|驗證|複查/]
|
|
14558
14517
|
}
|
|
14559
14518
|
});
|
|
14560
|
-
|
|
14561
|
-
//#region src/engine/i18n/all-resources.ts
|
|
14519
|
+
// src/engine/i18n/all-resources.ts
|
|
14562
14520
|
/**
|
|
14563
14521
|
* Static union of every supported-locale's resource bundle.
|
|
14564
14522
|
*
|
|
@@ -14592,8 +14550,7 @@ const RESOURCES_BY_LOCALE = {
|
|
|
14592
14550
|
ko: resources$3,
|
|
14593
14551
|
ru: resources$2
|
|
14594
14552
|
};
|
|
14595
|
-
|
|
14596
|
-
//#region src/engine/retrieval/relevant-memories-context.ts
|
|
14553
|
+
// src/engine/retrieval/relevant-memories-context.ts
|
|
14597
14554
|
/** @file relevant-memories-context.ts
|
|
14598
14555
|
* @purpose Formats retrieved memories into model-visible context with clear boundaries.
|
|
14599
14556
|
* @boundary Retriever results, prompt-injection safety, and recall presentation.
|
|
@@ -14605,8 +14562,7 @@ const RELEVANT_MEMORIES_OPEN_TAG = "<relevant-memories>";
|
|
|
14605
14562
|
const RELEVANT_MEMORIES_CLOSE_TAG = "</relevant-memories>";
|
|
14606
14563
|
const RELEVANT_MEMORIES_PREAMBLE_LINES = [RELEVANT_MEMORIES_UNTRUSTED_LINE, RELEVANT_MEMORIES_INSTRUCTION_LINE];
|
|
14607
14564
|
new RegExp(`^\\s*memory\\s+\\d+:\\s*\\{`, "i");
|
|
14608
|
-
|
|
14609
|
-
//#region src/engine/extraction/runtime-wrapper-sanitizer.ts
|
|
14565
|
+
// src/engine/extraction/runtime-wrapper-sanitizer.ts
|
|
14610
14566
|
/** @file runtime-wrapper-sanitizer.ts
|
|
14611
14567
|
* @purpose Single source of truth for stripping `[Subagent Context|Task]` wrappers
|
|
14612
14568
|
* and the boilerplate that follows them from the lead-in of captured text.
|
|
@@ -14678,8 +14634,7 @@ function stripLeadingRuntimeWrappers(text) {
|
|
|
14678
14634
|
}
|
|
14679
14635
|
return cleanedLines.join("\n").trim();
|
|
14680
14636
|
}
|
|
14681
|
-
|
|
14682
|
-
//#region src/engine/extraction/ambient-learning-text-normalizer.ts
|
|
14637
|
+
// src/engine/extraction/ambient-learning-text-normalizer.ts
|
|
14683
14638
|
/** @file ambient-learning-text-normalizer.ts
|
|
14684
14639
|
* @purpose Normalizes Ambient Learning conversation text before extraction and storage.
|
|
14685
14640
|
* @boundary Capture filters, prompt-injection boundaries, and Insight Distill input quality.
|
|
@@ -14773,8 +14728,7 @@ function normalizeAmbientLearningText(role, text, shouldSkipMessage) {
|
|
|
14773
14728
|
if (shouldSkipMessage?.(role, normalized)) return null;
|
|
14774
14729
|
return normalized;
|
|
14775
14730
|
}
|
|
14776
|
-
|
|
14777
|
-
//#region src/engine/extraction/extraction-text-sanitizer.ts
|
|
14731
|
+
// src/engine/extraction/extraction-text-sanitizer.ts
|
|
14778
14732
|
/** @file extraction-text-sanitizer.ts
|
|
14779
14733
|
* @purpose Normalize runtime payload text before it reaches memory extraction.
|
|
14780
14734
|
* @boundary Removes channel/runtime envelope metadata only; does not classify or persist memories.
|
|
@@ -14881,8 +14835,7 @@ function stripEnvelopeMetadata(text) {
|
|
|
14881
14835
|
content: cleaned
|
|
14882
14836
|
}).projections.plainText;
|
|
14883
14837
|
}
|
|
14884
|
-
|
|
14885
|
-
//#region src/engine/extraction/date-resolution.ts
|
|
14838
|
+
// src/engine/extraction/date-resolution.ts
|
|
14886
14839
|
/** Model-only time interpretation followed by deterministic calendar arithmetic. */
|
|
14887
14840
|
const log$17 = createLogger("sno-station-mem:date-resolution");
|
|
14888
14841
|
/** No model means no semantic decision. Preserve the text rather than interpreting it. */
|
|
@@ -14994,8 +14947,7 @@ async function resolveMemoryDate(input) {
|
|
|
14994
14947
|
stage
|
|
14995
14948
|
};
|
|
14996
14949
|
}
|
|
14997
|
-
|
|
14998
|
-
//#region src/engine/extraction/memory-temporality-classifier.ts
|
|
14950
|
+
// src/engine/extraction/memory-temporality-classifier.ts
|
|
14999
14951
|
function parseSessionTimestamp(sessionDateTime) {
|
|
15000
14952
|
return parseIsoDateTimeMs(sessionDateTime);
|
|
15001
14953
|
}
|
|
@@ -15025,8 +14977,7 @@ function serializeIntervalMetadata(category, interval) {
|
|
|
15025
14977
|
return base;
|
|
15026
14978
|
}
|
|
15027
14979
|
createLogger("sno-station-mem:scopes");
|
|
15028
|
-
|
|
15029
|
-
//#region src/store/memory-source-order.ts
|
|
14980
|
+
// src/store/memory-source-order.ts
|
|
15030
14981
|
function compareNumber(left, right) {
|
|
15031
14982
|
if (left === right) return 0;
|
|
15032
14983
|
return left < right ? -1 : 1;
|
|
@@ -15158,8 +15109,7 @@ function closeMemoryRow(database, input) {
|
|
|
15158
15109
|
}), validUntil, input.targetRowId);
|
|
15159
15110
|
return true;
|
|
15160
15111
|
}
|
|
15161
|
-
|
|
15162
|
-
//#region src/engine/rem/adapter-a-conflict-adjudicator.ts
|
|
15112
|
+
// src/engine/rem/adapter-a-conflict-adjudicator.ts
|
|
15163
15113
|
/** @file adapter-a-conflict-adjudicator.ts
|
|
15164
15114
|
* @purpose Renders and parses a fail-safe conflict verdict for an ordered memory pair.
|
|
15165
15115
|
* @boundary Accepts package-level memory views only; callers adapt their storage records.
|
|
@@ -15305,8 +15255,7 @@ function extractJsonFromResponse(text) {
|
|
|
15305
15255
|
if (lastBrace === -1) return null;
|
|
15306
15256
|
return text.substring(firstBrace, lastBrace + 1);
|
|
15307
15257
|
}
|
|
15308
|
-
|
|
15309
|
-
//#region src/engine/rem/classifier.ts
|
|
15258
|
+
// src/engine/rem/classifier.ts
|
|
15310
15259
|
const REM_TRANSITION_GRAMMAR_SHA256 = "8fd5439ec2b85ca27bfa462600869973f991a6f44f956c734596ee9c9d44153d";
|
|
15311
15260
|
const REM_ADDITIONAL_TRANSITION_PATTERN_SHA256 = "cb42c6a25ccd51b16da6a3de7d931f1165af284a89cdc365860bd359ae84bd9f";
|
|
15312
15261
|
const REM_CURRENT_PROGRESSIVE_PATTERN_SHA256 = "ddc1c0119c1f9c4e5178dc0e6eec9ca8a7594ed10e2dd8305646f5363e9d24ad";
|
|
@@ -15388,8 +15337,7 @@ function assertPatternPin(pattern, declaredSha256, expectedSha256, name) {
|
|
|
15388
15337
|
if (observedSha256 !== declaredSha256) throw new Error(`${name} digest mismatch: declared ${declaredSha256}, observed ${observedSha256}`);
|
|
15389
15338
|
if (observedSha256 !== expectedSha256) throw new Error(`${name} is not pinned: expected ${expectedSha256}, observed ${observedSha256}`);
|
|
15390
15339
|
}
|
|
15391
|
-
|
|
15392
|
-
//#region src/engine/rem/operational-config.ts
|
|
15340
|
+
// src/engine/rem/operational-config.ts
|
|
15393
15341
|
const sha256Schema$1 = z.string().regex(/^[0-9a-f]{64}$/u);
|
|
15394
15342
|
const positiveSafeInteger = z.number().int().safe().positive("value must be positive and non-zero");
|
|
15395
15343
|
const nullablePercentage = z.number().min(0).max(1).nullable();
|
|
@@ -15448,8 +15396,7 @@ function canonicalJson$2(value) {
|
|
|
15448
15396
|
const record = value;
|
|
15449
15397
|
return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$2(record[key])}`).join(",")}}`;
|
|
15450
15398
|
}
|
|
15451
|
-
|
|
15452
|
-
//#region src/engine/rem/census.ts
|
|
15399
|
+
// src/engine/rem/census.ts
|
|
15453
15400
|
function sha256$2(value) {
|
|
15454
15401
|
return createHash("sha256").update(value).digest("hex");
|
|
15455
15402
|
}
|
|
@@ -15461,8 +15408,7 @@ function deriveRemWriteIdentity(input) {
|
|
|
15461
15408
|
input.timestamp
|
|
15462
15409
|
]));
|
|
15463
15410
|
}
|
|
15464
|
-
|
|
15465
|
-
//#region src/engine/rem/clause-splitter.ts
|
|
15411
|
+
// src/engine/rem/clause-splitter.ts
|
|
15466
15412
|
/**
|
|
15467
15413
|
* Produces the fixed, lossless clause list used by REM judgments. The text itself
|
|
15468
15414
|
* remains the authority: clause values are exact source slices and separators are retained.
|
|
@@ -15491,8 +15437,7 @@ function splitExactClauses(text) {
|
|
|
15491
15437
|
if (clauses.map((clause) => `${clause.value}${clause.separatorAfter}`).join("") !== text) throw new Error("REM clause splitter must preserve source bytes");
|
|
15492
15438
|
return clauses;
|
|
15493
15439
|
}
|
|
15494
|
-
|
|
15495
|
-
//#region src/engine/rem/update-locale-resources.ts
|
|
15440
|
+
// src/engine/rem/update-locale-resources.ts
|
|
15496
15441
|
const REM_UPDATE_LOCALES = [
|
|
15497
15442
|
"en",
|
|
15498
15443
|
"de",
|
|
@@ -15572,8 +15517,7 @@ const REM_UPDATE_LOCALE_RESOURCES = {
|
|
|
15572
15517
|
function getRemUpdateLocaleResource(locale) {
|
|
15573
15518
|
return REM_UPDATE_LOCALE_RESOURCES[locale];
|
|
15574
15519
|
}
|
|
15575
|
-
|
|
15576
|
-
//#region src/engine/rem/update-rewrite.ts
|
|
15520
|
+
// src/engine/rem/update-rewrite.ts
|
|
15577
15521
|
function composeRemNegatedCurrent(input) {
|
|
15578
15522
|
const generatedRowId = `rem-negated-${createHash("sha256").update(`${input.topic}\u0000${input.retractionText}`).digest("hex").slice(0, 24)}`;
|
|
15579
15523
|
return {
|
|
@@ -15601,8 +15545,7 @@ function extractListMemberSpans(source) {
|
|
|
15601
15545
|
}];
|
|
15602
15546
|
});
|
|
15603
15547
|
}
|
|
15604
|
-
|
|
15605
|
-
//#region src/engine/rem/types.ts
|
|
15548
|
+
// src/engine/rem/types.ts
|
|
15606
15549
|
const REM_OPERATION_TYPES = [
|
|
15607
15550
|
"rem-update",
|
|
15608
15551
|
"rem-replace",
|
|
@@ -15628,8 +15571,7 @@ function assertJobIdentity(jobId, jobType) {
|
|
|
15628
15571
|
if (typeof jobId !== "string" || jobId.trim().length === 0) throw new Error(`REM write requires a non-blank job id, got: ${String(jobId)}`);
|
|
15629
15572
|
if (typeof jobType !== "string" || parseRemOperationType(jobType) === void 0) throw new Error(`REM write requires a known job type, got: ${String(jobType)}`);
|
|
15630
15573
|
}
|
|
15631
|
-
|
|
15632
|
-
//#region src/engine/rem/enable-gate.ts
|
|
15574
|
+
// src/engine/rem/enable-gate.ts
|
|
15633
15575
|
const SHA256_PATTERN = /^[0-9a-f]{64}$/;
|
|
15634
15576
|
z.object({
|
|
15635
15577
|
schema_version: z.number().int(),
|
|
@@ -15641,8 +15583,7 @@ z.object({
|
|
|
15641
15583
|
evaluated_at: z.string().datetime(),
|
|
15642
15584
|
expires_at: z.string().datetime()
|
|
15643
15585
|
}).strict();
|
|
15644
|
-
|
|
15645
|
-
//#region src/engine/rem/entry-governance.ts
|
|
15586
|
+
// src/engine/rem/entry-governance.ts
|
|
15646
15587
|
async function recordNonRefusePairDecision(input) {
|
|
15647
15588
|
if (input.decision === "allow" || input.throughRefusePair) return;
|
|
15648
15589
|
if (input.reason === null || input.reason.trim().length === 0) throw new Error("A refused pair decision requires a reason");
|
|
@@ -15681,8 +15622,7 @@ function validateRemSubstantiveWaveEffects(input) {
|
|
|
15681
15622
|
reasonCode: null
|
|
15682
15623
|
};
|
|
15683
15624
|
}
|
|
15684
|
-
|
|
15685
|
-
//#region src/engine/rem/row-hash.ts
|
|
15625
|
+
// src/engine/rem/row-hash.ts
|
|
15686
15626
|
/**
|
|
15687
15627
|
* The one definition of a REM whole-row hash.
|
|
15688
15628
|
*
|
|
@@ -15720,8 +15660,7 @@ function hashRemMemoryRow(row) {
|
|
|
15720
15660
|
for (const field of REM_ROW_HASH_FIELDS) projected[field] = row[field] ?? null;
|
|
15721
15661
|
return createHash("sha256").update(JSON.stringify(projected)).digest("hex");
|
|
15722
15662
|
}
|
|
15723
|
-
|
|
15724
|
-
//#region src/engine/rem/facet-persistence.ts
|
|
15663
|
+
// src/engine/rem/facet-persistence.ts
|
|
15725
15664
|
async function writeRemTwoFacetTransaction(input) {
|
|
15726
15665
|
const timestamp = input.timestamp ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
15727
15666
|
const updatedAtMs = Date.parse(timestamp);
|
|
@@ -15781,8 +15720,7 @@ async function writeRemTwoFacetTransaction(input) {
|
|
|
15781
15720
|
};
|
|
15782
15721
|
}).immediate();
|
|
15783
15722
|
}
|
|
15784
|
-
|
|
15785
|
-
//#region src/engine/rem/repository.ts
|
|
15723
|
+
// src/engine/rem/repository.ts
|
|
15786
15724
|
const bootIdPath = "/proc/sys/kernel/random/boot_id";
|
|
15787
15725
|
function createRemRepository(database) {
|
|
15788
15726
|
return {
|
|
@@ -16381,8 +16319,7 @@ function parseBudgetReservation(value) {
|
|
|
16381
16319
|
};
|
|
16382
16320
|
throw new Error("budget transaction returned an invalid result");
|
|
16383
16321
|
}
|
|
16384
|
-
|
|
16385
|
-
//#region src/engine/rem/replace-clause-verdict.ts
|
|
16322
|
+
// src/engine/rem/replace-clause-verdict.ts
|
|
16386
16323
|
function buildReplaceEligibleClauses(older, newer) {
|
|
16387
16324
|
return [...splitExactClauses(older).map((clause) => ({
|
|
16388
16325
|
origin: "older",
|
|
@@ -16444,8 +16381,7 @@ function isRecord(value) {
|
|
|
16444
16381
|
function hasOnlyKeys(value, expected) {
|
|
16445
16382
|
return Object.keys(value).length === expected.length && expected.every((key) => key in value);
|
|
16446
16383
|
}
|
|
16447
|
-
|
|
16448
|
-
//#region src/engine/rem/replace-coverage.ts
|
|
16384
|
+
// src/engine/rem/replace-coverage.ts
|
|
16449
16385
|
const replaceCoverageSchema = z.object({ atoms: z.array(z.object({
|
|
16450
16386
|
clause_index: z.number().int().nonnegative(),
|
|
16451
16387
|
class: z.enum([
|
|
@@ -16553,8 +16489,7 @@ async function decideEventFacts(carrier, atoms, observations, uncertifiedClauses
|
|
|
16553
16489
|
...uncertifiedClauses.length === 0 ? {} : { uncertifiedClauses: [...uncertifiedClauses] }
|
|
16554
16490
|
};
|
|
16555
16491
|
}
|
|
16556
|
-
|
|
16557
|
-
//#region src/engine/rem/rem-update-judgment.ts
|
|
16492
|
+
// src/engine/rem/rem-update-judgment.ts
|
|
16558
16493
|
const judgmentSchema$1 = z.object({
|
|
16559
16494
|
proposed_current: z.string(),
|
|
16560
16495
|
retired_values: z.array(z.string())
|
|
@@ -16794,8 +16729,7 @@ function parseJudgment$1(reply) {
|
|
|
16794
16729
|
retiredValues: parsed.data.retired_values
|
|
16795
16730
|
};
|
|
16796
16731
|
}
|
|
16797
|
-
|
|
16798
|
-
//#region src/engine/rem/runner.ts
|
|
16732
|
+
// src/engine/rem/runner.ts
|
|
16799
16733
|
async function runRemStages(input) {
|
|
16800
16734
|
const results = {};
|
|
16801
16735
|
for (const stage of input.stages) {
|
|
@@ -16844,8 +16778,7 @@ function journal$1(stage, outcome) {
|
|
|
16844
16778
|
actionsApplied: 0
|
|
16845
16779
|
};
|
|
16846
16780
|
}
|
|
16847
|
-
|
|
16848
|
-
//#region src/engine/rem/schema.ts
|
|
16781
|
+
// src/engine/rem/schema.ts
|
|
16849
16782
|
const REM_SCHEMA_SQL = `
|
|
16850
16783
|
CREATE TABLE IF NOT EXISTS nodix_rem_relation_ledger (
|
|
16851
16784
|
row_id TEXT PRIMARY KEY,
|
|
@@ -17148,8 +17081,7 @@ function ensureHolderBootIdColumn(database, tableName) {
|
|
|
17148
17081
|
if (database.prepare(`PRAGMA table_info(${tableName})`).all().some((column) => column.name === "holder_boot_id")) return;
|
|
17149
17082
|
database.exec(`ALTER TABLE ${tableName} ADD COLUMN holder_boot_id TEXT`);
|
|
17150
17083
|
}
|
|
17151
|
-
|
|
17152
|
-
//#region src/engine/shared/ambient-capture-hash.ts
|
|
17084
|
+
// src/engine/shared/ambient-capture-hash.ts
|
|
17153
17085
|
function normalizeAmbientCaptureHashMetadata(metadata) {
|
|
17154
17086
|
return {
|
|
17155
17087
|
source: metadata.source,
|
|
@@ -17187,8 +17119,7 @@ function readAmbientCaptureHashMetadata(metadata) {
|
|
|
17187
17119
|
content_type: metadata.content_type
|
|
17188
17120
|
};
|
|
17189
17121
|
}
|
|
17190
|
-
|
|
17191
|
-
//#region src/store/entity-name-key-migration.ts
|
|
17122
|
+
// src/store/entity-name-key-migration.ts
|
|
17192
17123
|
/** @file entity-name-key-migration.ts
|
|
17193
17124
|
* @purpose Re-keys entity names so several names can identify one entity.
|
|
17194
17125
|
* @boundary Idempotent SQLite table rebuild only; no identity judgment.
|
|
@@ -17247,8 +17178,7 @@ function applyEntityNameKeyMigration(database) {
|
|
|
17247
17178
|
database.exec("PRAGMA foreign_keys = ON");
|
|
17248
17179
|
}
|
|
17249
17180
|
}
|
|
17250
|
-
|
|
17251
|
-
//#region src/store/schema.ts
|
|
17181
|
+
// src/store/schema.ts
|
|
17252
17182
|
/** @file schema.ts
|
|
17253
17183
|
* @purpose Defines SQLite tables, indexes, and typed schema contracts for plugin storage.
|
|
17254
17184
|
* @boundary Drizzle schema, migrations, and store query assumptions.
|
|
@@ -17504,8 +17434,7 @@ const nodixProfileRecoveryEntries = sqliteTable("nodix_profile_recovery_entries"
|
|
|
17504
17434
|
removedValue: text("removed_value").notNull(),
|
|
17505
17435
|
removedAtMs: integer("removed_at_ms").notNull()
|
|
17506
17436
|
});
|
|
17507
|
-
|
|
17508
|
-
//#region src/store/legacy-database-namespace-migration.ts
|
|
17437
|
+
// src/store/legacy-database-namespace-migration.ts
|
|
17509
17438
|
const TABLE_RENAMES = [
|
|
17510
17439
|
{
|
|
17511
17440
|
legacy: FIXED_MEMORY_MEMORIES,
|
|
@@ -17971,8 +17900,7 @@ function readSchemaSql(database, type, name) {
|
|
|
17971
17900
|
function quoteIdentifier(identifier) {
|
|
17972
17901
|
return `"${identifier.replaceAll("\"", "\"\"")}"`;
|
|
17973
17902
|
}
|
|
17974
|
-
|
|
17975
|
-
//#region src/store/simple-tokenizer-path.ts
|
|
17903
|
+
// src/store/simple-tokenizer-path.ts
|
|
17976
17904
|
/** @file simple-tokenizer-path.ts
|
|
17977
17905
|
* @purpose Resolve the bundled `simple-tokenizer` SQLite extension binary +
|
|
17978
17906
|
* jieba dictionary path for the current platform.
|
|
@@ -18028,8 +17956,7 @@ function resolveSimpleTokenizerPath() {
|
|
|
18028
17956
|
}
|
|
18029
17957
|
throw new Error(`simple-tokenizer binary missing for ${PLATFORM_KEY$1}. Looked under: ${candidates.join(", ")}. Run \`node scripts/download-simple-tokenizer.mjs\` from the plugin directory, or rsync the \`sqlite-extensions/\` folder onto this host.`);
|
|
18030
17958
|
}
|
|
18031
|
-
|
|
18032
|
-
//#region src/store/sqlite-vec-path.ts
|
|
17959
|
+
// src/store/sqlite-vec-path.ts
|
|
18033
17960
|
/** @file sqlite-vec-path.ts
|
|
18034
17961
|
* @purpose Resolves and loads the symbol-isolated sqlite-vec extension shipped with sno-station-mem.
|
|
18035
17962
|
* @boundary Path selection only; Linux x64 and arm64 must use the bundled binary.
|
|
@@ -18053,8 +17980,7 @@ function resolveSqliteVecPath() {
|
|
|
18053
17980
|
function loadSqliteVecExtension(database) {
|
|
18054
17981
|
database.loadExtension(resolveSqliteVecPath());
|
|
18055
17982
|
}
|
|
18056
|
-
|
|
18057
|
-
//#region src/store/unplaced-candidate-migration.ts
|
|
17983
|
+
// src/store/unplaced-candidate-migration.ts
|
|
18058
17984
|
/** @file unplaced-candidate-migration.ts
|
|
18059
17985
|
* @purpose One-time data move: relocate every non-active memory row into
|
|
18060
17986
|
* `nodix_unplaced_memory_candidates`. Runs after the drizzle DDL migration and is
|
|
@@ -18112,8 +18038,7 @@ function migrateUnplacedCandidates(sqlite) {
|
|
|
18112
18038
|
});
|
|
18113
18039
|
return moved;
|
|
18114
18040
|
}
|
|
18115
|
-
|
|
18116
|
-
//#region src/store/connection.ts
|
|
18041
|
+
// src/store/connection.ts
|
|
18117
18042
|
/** @file connection.ts
|
|
18118
18043
|
* @purpose Creates and validates SQLite connections used by the memory store.
|
|
18119
18044
|
* @boundary Filesystem safety, database pragmas, migrations, and runtime loading.
|
|
@@ -18306,8 +18231,7 @@ function ensureColumn(database, tableName, columnName, declaration) {
|
|
|
18306
18231
|
if (database.prepare(`PRAGMA table_info(${tableName})`).all().some(({ name }) => name === columnName)) return;
|
|
18307
18232
|
database.exec(`ALTER TABLE ${tableName} ADD COLUMN ${columnName} ${declaration}`);
|
|
18308
18233
|
}
|
|
18309
|
-
|
|
18310
|
-
//#region src/store/memory-store-shared.ts
|
|
18234
|
+
// src/store/memory-store-shared.ts
|
|
18311
18235
|
/** @file memory-store-shared.ts
|
|
18312
18236
|
* @purpose Implements memory persistence, search, updates, deletion, and statistics.
|
|
18313
18237
|
* @boundary SQLite schema, embedding vectors, FTS, and metadata invariants.
|
|
@@ -18414,8 +18338,7 @@ function withStoreWriteOutcome(entry, outcome) {
|
|
|
18414
18338
|
});
|
|
18415
18339
|
return entry;
|
|
18416
18340
|
}
|
|
18417
|
-
|
|
18418
|
-
//#region src/engine/telemetry/memory-telemetry-config.ts
|
|
18341
|
+
// src/engine/telemetry/memory-telemetry-config.ts
|
|
18419
18342
|
function loadMemoryTelemetryKeySet(options) {
|
|
18420
18343
|
if (!options.enabled) return {
|
|
18421
18344
|
enabled: false,
|
|
@@ -18439,8 +18362,7 @@ function loadMemoryTelemetryKeySet(options) {
|
|
|
18439
18362
|
historic: new Map(options.historicKeys.map((value, index) => [index + 1, value]))
|
|
18440
18363
|
};
|
|
18441
18364
|
}
|
|
18442
|
-
|
|
18443
|
-
//#region src/engine/telemetry/memory-telemetry-metadata.ts
|
|
18365
|
+
// src/engine/telemetry/memory-telemetry-metadata.ts
|
|
18444
18366
|
const RAW_CONTENT_KEYS = /* @__PURE__ */ new Set([
|
|
18445
18367
|
"text",
|
|
18446
18368
|
"content",
|
|
@@ -18514,8 +18436,7 @@ function validateMemoryTelemetryMetadata(eventType, metadata) {
|
|
|
18514
18436
|
}
|
|
18515
18437
|
return metadata;
|
|
18516
18438
|
}
|
|
18517
|
-
|
|
18518
|
-
//#region src/engine/telemetry/memory-telemetry-receipts.ts
|
|
18439
|
+
// src/engine/telemetry/memory-telemetry-receipts.ts
|
|
18519
18440
|
const CONTENT_HASH_PATTERN = /^[a-f0-9]{64}$/;
|
|
18520
18441
|
const TIMESTAMP_MS_PATTERN = /^[0-9]{13}$/;
|
|
18521
18442
|
const RECEIPT_HMAC_PATTERN = /^[a-f0-9]{64}$/;
|
|
@@ -18582,8 +18503,7 @@ function verification(status, receipt) {
|
|
|
18582
18503
|
keyVersion: receipt.keyVersion
|
|
18583
18504
|
};
|
|
18584
18505
|
}
|
|
18585
|
-
|
|
18586
|
-
//#region src/engine/telemetry/memory-telemetry-events.ts
|
|
18506
|
+
// src/engine/telemetry/memory-telemetry-events.ts
|
|
18587
18507
|
const log$12 = createLogger("sno-station-mem:memory-telemetry-events");
|
|
18588
18508
|
var MemoryTelemetryEventWriter = class {
|
|
18589
18509
|
sqlite;
|
|
@@ -18663,8 +18583,7 @@ var MemoryTelemetryEventWriter = class {
|
|
|
18663
18583
|
return this.readLatestReceiptEventIdStatement.get(factId)?.id ?? null;
|
|
18664
18584
|
}
|
|
18665
18585
|
};
|
|
18666
|
-
|
|
18667
|
-
//#region src/store/rem-update-stamp-migration.ts
|
|
18586
|
+
// src/store/rem-update-stamp-migration.ts
|
|
18668
18587
|
/** @file rem-update-stamp-migration.ts
|
|
18669
18588
|
* @purpose Hard-cuts legacy job-keyed REM update stamps to source-derived stamps.
|
|
18670
18589
|
* @boundary Metadata-only startup migration; memory text and facets remain unchanged.
|
|
@@ -18711,8 +18630,7 @@ function parseMetadata$3(value) {
|
|
|
18711
18630
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error("REM candidate metadata must be a JSON object");
|
|
18712
18631
|
return parsed;
|
|
18713
18632
|
}
|
|
18714
|
-
|
|
18715
|
-
//#region src/store/memory-store-base.ts
|
|
18633
|
+
// src/store/memory-store-base.ts
|
|
18716
18634
|
var TaskLifecycleCommandCollisionError = class extends StorageError {
|
|
18717
18635
|
projectId;
|
|
18718
18636
|
commandId;
|
|
@@ -19018,8 +18936,7 @@ var MemoryStore = class {
|
|
|
19018
18936
|
this.scheduleLegacyChunkBackfill();
|
|
19019
18937
|
}
|
|
19020
18938
|
};
|
|
19021
|
-
|
|
19022
|
-
//#region src/store/memory-store-row-codec.ts
|
|
18939
|
+
// src/store/memory-store-row-codec.ts
|
|
19023
18940
|
/** @file memory-store-row-codec.ts
|
|
19024
18941
|
* @purpose Converts rows, metadata, vectors, and chunk persistence payloads.
|
|
19025
18942
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -19139,8 +19056,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19139
19056
|
return row !== null && row !== void 0;
|
|
19140
19057
|
}
|
|
19141
19058
|
});
|
|
19142
|
-
|
|
19143
|
-
//#region src/store/memory-store-backfill.ts
|
|
19059
|
+
// src/store/memory-store-backfill.ts
|
|
19144
19060
|
/** @file memory-store-backfill.ts
|
|
19145
19061
|
* @purpose Backfills legacy memories that are missing chunk rows.
|
|
19146
19062
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -19243,8 +19159,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19243
19159
|
});
|
|
19244
19160
|
}
|
|
19245
19161
|
});
|
|
19246
|
-
|
|
19247
|
-
//#region src/store/memory-store-lookup-api.ts
|
|
19162
|
+
// src/store/memory-store-lookup-api.ts
|
|
19248
19163
|
/** @file memory-store-lookup-api.ts
|
|
19249
19164
|
* @purpose Reads memories by content hash or identifier.
|
|
19250
19165
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -19285,8 +19200,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19285
19200
|
return row ? this.toEntry(row) : void 0;
|
|
19286
19201
|
}
|
|
19287
19202
|
});
|
|
19288
|
-
|
|
19289
|
-
//#region src/store/memory-store-relation-api.ts
|
|
19203
|
+
// src/store/memory-store-relation-api.ts
|
|
19290
19204
|
/** @file memory-store-relation-api.ts
|
|
19291
19205
|
* @purpose Normalizes persisted relation predicates and reads project-scoped relation walks.
|
|
19292
19206
|
* @boundary Mechanical relation vocabulary and storage reads only; no extraction judgment.
|
|
@@ -19313,8 +19227,7 @@ Object.assign(MemoryStore.prototype, { walkMemoryRelations(input) {
|
|
|
19313
19227
|
ORDER BY relation.source_card_id, relation.subject, relation.predicate, relation.object
|
|
19314
19228
|
`).all(input.projectId, input.node).filter((row) => this.isMemoryOnFactSurface(row.sourceCardId));
|
|
19315
19229
|
} });
|
|
19316
|
-
|
|
19317
|
-
//#region src/store/memory-store-atomic-extraction-ledger-api.ts
|
|
19230
|
+
// src/store/memory-store-atomic-extraction-ledger-api.ts
|
|
19318
19231
|
/** @file memory-store-atomic-extraction-ledger-api.ts
|
|
19319
19232
|
* @purpose Persists atomic extraction chunk state and bounded reprocess repairs.
|
|
19320
19233
|
* @boundary Serial chunk lifecycle and transaction completion only; no model calls or extraction.
|
|
@@ -19573,8 +19486,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19573
19486
|
}).immediate();
|
|
19574
19487
|
}
|
|
19575
19488
|
});
|
|
19576
|
-
|
|
19577
|
-
//#region src/store/memory-store-suppression-api.ts
|
|
19489
|
+
// src/store/memory-store-suppression-api.ts
|
|
19578
19490
|
/** @file memory-store-suppression-api.ts
|
|
19579
19491
|
* @purpose Creates the two project-scoped memory suppression shapes.
|
|
19580
19492
|
* @boundary Storage mechanics only; memory_forget is the sole product caller.
|
|
@@ -19606,13 +19518,11 @@ Object.assign(MemoryStore.prototype, { async createMemorySuppression(input) {
|
|
|
19606
19518
|
};
|
|
19607
19519
|
});
|
|
19608
19520
|
} });
|
|
19609
|
-
|
|
19610
|
-
//#region src/store/data-paths.ts
|
|
19521
|
+
// src/store/data-paths.ts
|
|
19611
19522
|
function getSnoStationMemDataDir() {
|
|
19612
19523
|
return join(getSnoStationMemStateDir(), "data");
|
|
19613
19524
|
}
|
|
19614
|
-
|
|
19615
|
-
//#region config/b-profile-section-registry.json
|
|
19525
|
+
// config/b-profile-section-registry.json
|
|
19616
19526
|
var b_profile_section_registry_default = {
|
|
19617
19527
|
schema_version: 3,
|
|
19618
19528
|
frozen_at: "2026-07-27T09:50:00+00:00",
|
|
@@ -21075,8 +20985,7 @@ var b_profile_section_registry_default = {
|
|
|
21075
20985
|
section_registry_sha256: "b3da09c82eb9c3892c73ccb0c1623f22dc787a15aaefac7511767b1c010ce1b1",
|
|
21076
20986
|
source_git_rev: "dfc5e40194c6d8087c1a0c329856e177061ecf43"
|
|
21077
20987
|
};
|
|
21078
|
-
|
|
21079
|
-
//#region src/engine/extraction/b-profile-section-registry.ts
|
|
20988
|
+
// src/engine/extraction/b-profile-section-registry.ts
|
|
21080
20989
|
/** @file b-profile-section-registry.ts
|
|
21081
20990
|
* @purpose Exposes the bundled B-profile section resource and pure topic normalization.
|
|
21082
20991
|
* @boundary Matching code consumes registry data; taxonomy strings live in the JSON resource.
|
|
@@ -21300,8 +21209,7 @@ function buildActiveTaskProjection(tasks) {
|
|
|
21300
21209
|
text: titles.length === 0 ? "Active tasks: none" : `Active tasks:\n${titles.map((title) => `- ${title}`).join("\n")}`
|
|
21301
21210
|
};
|
|
21302
21211
|
}
|
|
21303
|
-
|
|
21304
|
-
//#region src/engine/extraction/b-profile-section-canonicalizer.ts
|
|
21212
|
+
// src/engine/extraction/b-profile-section-canonicalizer.ts
|
|
21305
21213
|
/** @file b-profile-section-canonicalizer.ts
|
|
21306
21214
|
* @purpose Canonicalizes the written form of open B-profile section keys.
|
|
21307
21215
|
* @boundary Pure deterministic transform; no registry lookup, I/O, or rejection.
|
|
@@ -21326,8 +21234,7 @@ function canonicalizeProfileSectionName(sectionName) {
|
|
|
21326
21234
|
function normalizeProfileSectionForm(sectionName) {
|
|
21327
21235
|
return sectionName.normalize("NFKC").trim().toLowerCase().replace(/[-_\s]+/g, "_").replace(/^_+|_+$/g, "").replace(/_*\._*/g, ".");
|
|
21328
21236
|
}
|
|
21329
|
-
|
|
21330
|
-
//#region src/engine/shared/memory-kind-policy.ts
|
|
21237
|
+
// src/engine/shared/memory-kind-policy.ts
|
|
21331
21238
|
const ALLOWED_WRITERS = {
|
|
21332
21239
|
episodic: ["extraction", "offline-family"],
|
|
21333
21240
|
lesson: ["offline-family"],
|
|
@@ -21349,8 +21256,7 @@ function canTrustedWrite(kind) {
|
|
|
21349
21256
|
const writers = ALLOWED_WRITERS[kind];
|
|
21350
21257
|
return writers.includes("extraction") || writers.includes("profile-writer");
|
|
21351
21258
|
}
|
|
21352
|
-
|
|
21353
|
-
//#region src/store/memory-store-write-validation.ts
|
|
21259
|
+
// src/store/memory-store-write-validation.ts
|
|
21354
21260
|
/** @file memory-store-write-validation.ts
|
|
21355
21261
|
* @purpose Validates and normalizes memory-kind metadata before direct store writes.
|
|
21356
21262
|
* @boundary Storage write chokepoint only; extraction owns metadata semantics.
|
|
@@ -21499,8 +21405,7 @@ function validateStoreWriteMetadata(input, operation, countRecordTokens) {
|
|
|
21499
21405
|
throw new StorageError(`${operation}: invalid memory metadata: ${formatCause(error)}`);
|
|
21500
21406
|
}
|
|
21501
21407
|
}
|
|
21502
|
-
|
|
21503
|
-
//#region src/store/atomic-attribute-cardinality.ts
|
|
21408
|
+
// src/store/atomic-attribute-cardinality.ts
|
|
21504
21409
|
/** @file atomic-attribute-cardinality.ts
|
|
21505
21410
|
* @purpose Reads atomic attribute cardinality and family rulings from the shipped dictionaries.
|
|
21506
21411
|
* @boundary Mechanical config lookup only; no storage access or model judgment.
|
|
@@ -21521,8 +21426,7 @@ function isOneCardinalityAttribute(attribute) {
|
|
|
21521
21426
|
function isKnownAtomicAttribute(attribute) {
|
|
21522
21427
|
return knownAttributes.has(attribute);
|
|
21523
21428
|
}
|
|
21524
|
-
|
|
21525
|
-
//#region src/store/memory-store-atomic-extraction-write-api.ts
|
|
21429
|
+
// src/store/memory-store-atomic-extraction-write-api.ts
|
|
21526
21430
|
/** @file memory-store-atomic-extraction-write-api.ts
|
|
21527
21431
|
* @purpose Appends atomic extraction cards, relations, chunks, and ledger completion together.
|
|
21528
21432
|
* @boundary Dark atomic-v3 storage door only; no model calls, suppression, or cutover activation.
|
|
@@ -22163,8 +22067,7 @@ Object.assign(MemoryStore.prototype, { resolveAtomicMemoryEntity(projectId, disp
|
|
|
22163
22067
|
}
|
|
22164
22068
|
};
|
|
22165
22069
|
} });
|
|
22166
|
-
|
|
22167
|
-
//#region src/store/memory-store-atomic-time-api.ts
|
|
22070
|
+
// src/store/memory-store-atomic-time-api.ts
|
|
22168
22071
|
/** @file memory-store-atomic-time-api.ts
|
|
22169
22072
|
* @purpose Reads active atomic cards through one half-open valid-time predicate.
|
|
22170
22073
|
* @boundary Project-scoped storage query only.
|
|
@@ -22178,8 +22081,7 @@ Object.assign(MemoryStore.prototype, { listAtomicValidAt(projectId, atMs) {
|
|
|
22178
22081
|
AND (valid_until IS NULL OR ? < valid_until)
|
|
22179
22082
|
ORDER BY timestamp DESC, id DESC`).all(projectId, atMs, atMs).map((row) => this.toEntry(row));
|
|
22180
22083
|
} });
|
|
22181
|
-
|
|
22182
|
-
//#region src/store/memory-store-unplaced-api.ts
|
|
22084
|
+
// src/store/memory-store-unplaced-api.ts
|
|
22183
22085
|
/** @file memory-store-unplaced-api.ts
|
|
22184
22086
|
* @purpose Persists and reads write attempts the extraction path could not place.
|
|
22185
22087
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -22209,8 +22111,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
22209
22111
|
}));
|
|
22210
22112
|
}
|
|
22211
22113
|
});
|
|
22212
|
-
|
|
22213
|
-
//#region src/store/memory-store-extraction-timestamp-api.ts
|
|
22114
|
+
// src/store/memory-store-extraction-timestamp-api.ts
|
|
22214
22115
|
/** @file memory-store-extraction-timestamp-api.ts
|
|
22215
22116
|
* @purpose Persist the first valid-at-now timestamp for replay-stable extraction ordering.
|
|
22216
22117
|
* @boundary Synchronous encrypted SQLite transaction keyed by scope and candidate replay identity.
|
|
@@ -22242,8 +22143,7 @@ Object.assign(MemoryStore.prototype, { resolveExtractionTimestamp(projectId, rep
|
|
|
22242
22143
|
if (!isResolution$1(resolution)) throw new StorageError("Extraction timestamp transaction returned an invalid result");
|
|
22243
22144
|
return resolution;
|
|
22244
22145
|
} });
|
|
22245
|
-
|
|
22246
|
-
//#region src/store/memory-store-task-lifecycle-timestamp-api.ts
|
|
22146
|
+
// src/store/memory-store-task-lifecycle-timestamp-api.ts
|
|
22247
22147
|
/** @file memory-store-task-lifecycle-timestamp-api.ts
|
|
22248
22148
|
* @purpose Persists lifecycle effective-time value and source under the final command identity.
|
|
22249
22149
|
* @boundary Existing extraction timestamp table only; no lifecycle command or task-state writes.
|
|
@@ -22377,8 +22277,7 @@ function buildExtractionIdempotencyKey(sessionKey, candidate, trace = candidate.
|
|
|
22377
22277
|
payloadFingerprint: buildCandidatePayloadFingerprint(candidate)
|
|
22378
22278
|
}));
|
|
22379
22279
|
}
|
|
22380
|
-
|
|
22381
|
-
//#region src/engine/extraction/task-lifecycle-assertion.ts
|
|
22280
|
+
// src/engine/extraction/task-lifecycle-assertion.ts
|
|
22382
22281
|
/** @file task-lifecycle-assertion.ts
|
|
22383
22282
|
* @purpose Admits typed lifecycle assertions and allocates replay-safe command/task identities.
|
|
22384
22283
|
* @boundary Input contract and command persistence only; no resolver, binding, or task mutation.
|
|
@@ -22625,8 +22524,7 @@ function admitTaskLifecycleAssertion(store, input) {
|
|
|
22625
22524
|
created: persisted.created
|
|
22626
22525
|
};
|
|
22627
22526
|
}
|
|
22628
|
-
|
|
22629
|
-
//#region src/engine/extraction/task-lifecycle-resolver.ts
|
|
22527
|
+
// src/engine/extraction/task-lifecycle-resolver.ts
|
|
22630
22528
|
/** @file task-lifecycle-resolver.ts
|
|
22631
22529
|
* @purpose Resolves one admitted lifecycle assertion against a bounded instance snapshot.
|
|
22632
22530
|
* @boundary Pure relation judgment only; no model transport, persistence, or task-state mutation.
|
|
@@ -22842,8 +22740,7 @@ function resolveTaskLifecycle(input) {
|
|
|
22842
22740
|
};
|
|
22843
22741
|
return resolveJudgment(input.assertion, candidates, parseJudgment(input.judgment), input.judgment.status === "completed" ? input.judgment.candidateSetVersion : void 0);
|
|
22844
22742
|
}
|
|
22845
|
-
|
|
22846
|
-
//#region src/store/memory-store-task-lifecycle-api.ts
|
|
22743
|
+
// src/store/memory-store-task-lifecycle-api.ts
|
|
22847
22744
|
/** @file memory-store-task-lifecycle-api.ts
|
|
22848
22745
|
* @purpose Atomically persists resolved task lifecycle commands and their dedicated to-do row.
|
|
22849
22746
|
* @boundary Consumes admitted assertions and resolver output; performs no relation judgment.
|
|
@@ -23252,8 +23149,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
23252
23149
|
});
|
|
23253
23150
|
}
|
|
23254
23151
|
});
|
|
23255
|
-
|
|
23256
|
-
//#region src/store/memory-store-todo-api.ts
|
|
23152
|
+
// src/store/memory-store-todo-api.ts
|
|
23257
23153
|
/** @file memory-store-todo-api.ts
|
|
23258
23154
|
* @purpose Reads the scoped to-do list for recall.
|
|
23259
23155
|
* @boundary Prototype-mounted MemoryStore read method; no ranking behavior.
|
|
@@ -23277,8 +23173,7 @@ Object.assign(MemoryStore.prototype, { listTodos(input) {
|
|
|
23277
23173
|
totalCount: Number(countRow.count)
|
|
23278
23174
|
};
|
|
23279
23175
|
} });
|
|
23280
|
-
|
|
23281
|
-
//#region src/store/memory-store-task-lifecycle-migration-api.ts
|
|
23176
|
+
// src/store/memory-store-task-lifecycle-migration-api.ts
|
|
23282
23177
|
/** @file memory-store-task-lifecycle-migration-api.ts
|
|
23283
23178
|
* @purpose Builds and atomically applies deterministic legacy active-task migration manifests.
|
|
23284
23179
|
* @boundary Explicit one-time migration only; runtime extraction never calls this module.
|
|
@@ -23626,8 +23521,7 @@ Object.assign(MemoryStore.prototype, { async applyTaskLifecycleMigration(manifes
|
|
|
23626
23521
|
};
|
|
23627
23522
|
});
|
|
23628
23523
|
} });
|
|
23629
|
-
|
|
23630
|
-
//#region src/store/content-sanitizer-bridge.ts
|
|
23524
|
+
// src/store/content-sanitizer-bridge.ts
|
|
23631
23525
|
/** @file content-sanitizer-bridge.ts
|
|
23632
23526
|
* @purpose Adapts sno-station-mem storage inputs to the shared content sanitizer package.
|
|
23633
23527
|
* @boundary Thin storage adapter only; sanitizer policy lives in @snoai/content-sanitizer.
|
|
@@ -23744,8 +23638,7 @@ function sanitizeUpdateChanges(changes) {
|
|
|
23744
23638
|
...changes.metadata !== void 0 ? { metadata: sanitizeMemoryMetadataString(changes.metadata) ?? changes.metadata } : {}
|
|
23745
23639
|
};
|
|
23746
23640
|
}
|
|
23747
|
-
|
|
23748
|
-
//#region src/store/memory-store-persistence-api.ts
|
|
23641
|
+
// src/store/memory-store-persistence-api.ts
|
|
23749
23642
|
/** @file memory-store-persistence-api.ts
|
|
23750
23643
|
* @purpose Stores new memories in single-entry, bulk, and atomic-supersede write paths.
|
|
23751
23644
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -24712,8 +24605,7 @@ function readActiveFactGuard(metadata) {
|
|
|
24712
24605
|
return;
|
|
24713
24606
|
}
|
|
24714
24607
|
}
|
|
24715
|
-
|
|
24716
|
-
//#region src/store/memory-store-correct-api.ts
|
|
24608
|
+
// src/store/memory-store-correct-api.ts
|
|
24717
24609
|
/** Fresh correction successors and closure share one SQLite transaction. */
|
|
24718
24610
|
function correctionTarget(store, input) {
|
|
24719
24611
|
return store.sqlite.prepare(`SELECT * FROM nodix_memories
|
|
@@ -24875,8 +24767,7 @@ Object.assign(MemoryStore.prototype, { async correct(input) {
|
|
|
24875
24767
|
}).immediate();
|
|
24876
24768
|
});
|
|
24877
24769
|
} });
|
|
24878
|
-
|
|
24879
|
-
//#region src/store/memory-store-update-api.ts
|
|
24770
|
+
// src/store/memory-store-update-api.ts
|
|
24880
24771
|
/** @file memory-store-update-api.ts
|
|
24881
24772
|
* @purpose Applies mutable field updates and chunk rewrites for existing memories.
|
|
24882
24773
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25207,8 +25098,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25207
25098
|
});
|
|
25208
25099
|
}
|
|
25209
25100
|
});
|
|
25210
|
-
|
|
25211
|
-
//#region src/store/memory-store-rem-api.ts
|
|
25101
|
+
// src/store/memory-store-rem-api.ts
|
|
25212
25102
|
const log$8 = createLogger("sno-station-mem:rem-write");
|
|
25213
25103
|
Object.assign(MemoryStore.prototype, { async applyRemTextVersion(input) {
|
|
25214
25104
|
if (input.reason.trim().length === 0) throw new Error("mutation reason is required");
|
|
@@ -25380,8 +25270,7 @@ function parseMetadata$2(value) {
|
|
|
25380
25270
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error("memory metadata must be a JSON object");
|
|
25381
25271
|
return parsed;
|
|
25382
25272
|
}
|
|
25383
|
-
|
|
25384
|
-
//#region src/store/memory-store-import-api.ts
|
|
25273
|
+
// src/store/memory-store-import-api.ts
|
|
25385
25274
|
/** @file memory-store-import-api.ts
|
|
25386
25275
|
* @purpose Imports existing memory entries and checks identifier presence.
|
|
25387
25276
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25473,8 +25362,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25473
25362
|
return this.sqlite.prepare("SELECT 1 as has_value FROM nodix_memories WHERE id = ? LIMIT 1").get(id)?.has_value === 1;
|
|
25474
25363
|
}
|
|
25475
25364
|
});
|
|
25476
|
-
|
|
25477
|
-
//#region src/store/memory-store-chunk-search.ts
|
|
25365
|
+
// src/store/memory-store-chunk-search.ts
|
|
25478
25366
|
/** @file memory-store-chunk-search.ts
|
|
25479
25367
|
* @purpose Runs semantic and keyword search directly over chunk rows.
|
|
25480
25368
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25693,8 +25581,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25693
25581
|
}
|
|
25694
25582
|
}
|
|
25695
25583
|
});
|
|
25696
|
-
|
|
25697
|
-
//#region src/store/memory-store-search-api.ts
|
|
25584
|
+
// src/store/memory-store-search-api.ts
|
|
25698
25585
|
/** @file memory-store-search-api.ts
|
|
25699
25586
|
* @purpose Aggregates chunk matches into memory-level search results.
|
|
25700
25587
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25959,8 +25846,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25959
25846
|
}
|
|
25960
25847
|
}
|
|
25961
25848
|
});
|
|
25962
|
-
|
|
25963
|
-
//#region src/store/memory-store-vector-api.ts
|
|
25849
|
+
// src/store/memory-store-vector-api.ts
|
|
25964
25850
|
/** @file memory-store-vector-api.ts
|
|
25965
25851
|
* @purpose Provides chunk vector reads used by retrieval scoring and reranking.
|
|
25966
25852
|
* @boundary Prototype-mounted MemoryStore methods; no compaction or maintenance ownership.
|
|
@@ -25976,8 +25862,7 @@ Object.assign(MemoryStore.prototype, { getVectorsByIds(ids) {
|
|
|
25976
25862
|
}
|
|
25977
25863
|
return out;
|
|
25978
25864
|
} });
|
|
25979
|
-
|
|
25980
|
-
//#region src/store/memory-store-read-api.ts
|
|
25865
|
+
// src/store/memory-store-read-api.ts
|
|
25981
25866
|
/** @file memory-store-read-api.ts
|
|
25982
25867
|
* @purpose Reads chunks, memory lists, and aggregate store statistics.
|
|
25983
25868
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -26106,8 +25991,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
26106
25991
|
};
|
|
26107
25992
|
}
|
|
26108
25993
|
});
|
|
26109
|
-
|
|
26110
|
-
//#region src/store/memory-store-admin-api.ts
|
|
25994
|
+
// src/store/memory-store-admin-api.ts
|
|
26111
25995
|
/** @file memory-store-admin-api.ts
|
|
26112
25996
|
* @purpose Deletes memory rows and closes underlying SQLite resources.
|
|
26113
25997
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -26318,8 +26202,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
26318
26202
|
}
|
|
26319
26203
|
}
|
|
26320
26204
|
});
|
|
26321
|
-
|
|
26322
|
-
//#region src/engine/extraction/embedding-provider-factory.ts
|
|
26205
|
+
// src/engine/extraction/embedding-provider-factory.ts
|
|
26323
26206
|
function resolveEmbeddingCacheDir(config) {
|
|
26324
26207
|
return config.cacheDir || LOCAL_EMBEDDING_CACHE_DIR_DEFAULT;
|
|
26325
26208
|
}
|
|
@@ -26341,8 +26224,7 @@ function buildProvider(config) {
|
|
|
26341
26224
|
...config.pooling !== void 0 ? { pooling: config.pooling } : {}
|
|
26342
26225
|
});
|
|
26343
26226
|
}
|
|
26344
|
-
|
|
26345
|
-
//#region src/engine/extraction/embedding-vector-aggregation.ts
|
|
26227
|
+
// src/engine/extraction/embedding-vector-aggregation.ts
|
|
26346
26228
|
/**
|
|
26347
26229
|
* Compute L2-normalized weighted average of Float32Array vectors.
|
|
26348
26230
|
* Weights are typically chunk char lengths so longer chunks contribute more.
|
|
@@ -26367,8 +26249,7 @@ function weightedAverageFloat32(vectors, weights, dim) {
|
|
|
26367
26249
|
if (norm > 0) for (let j = 0; j < dim; j++) acc[j] = (acc[j] ?? 0) / norm;
|
|
26368
26250
|
return Float32Array.from(acc);
|
|
26369
26251
|
}
|
|
26370
|
-
|
|
26371
|
-
//#region src/engine/shared/token-bound.ts
|
|
26252
|
+
// src/engine/shared/token-bound.ts
|
|
26372
26253
|
/** @file token-bound.ts
|
|
26373
26254
|
* @purpose Cuts text to a token budget under any monotonic token counter.
|
|
26374
26255
|
* @boundary Pure text function; the caller supplies the counter.
|
|
@@ -26395,8 +26276,7 @@ function truncateToTokens(text, maxTokens, countTokens) {
|
|
|
26395
26276
|
}
|
|
26396
26277
|
return codePoints.slice(0, low).join("").trimEnd();
|
|
26397
26278
|
}
|
|
26398
|
-
|
|
26399
|
-
//#region src/engine/extraction/embedding-provider-client.ts
|
|
26279
|
+
// src/engine/extraction/embedding-provider-client.ts
|
|
26400
26280
|
/** @file embedding-provider-client.ts
|
|
26401
26281
|
* @purpose Adapts embedding providers to the plugin retrieval and storage contract.
|
|
26402
26282
|
* @boundary Local ONNX embeddings, chunk sizing, and vector dimensions.
|
|
@@ -26624,8 +26504,7 @@ var Embedder = class {
|
|
|
26624
26504
|
function createEmbedder(config, stateDir) {
|
|
26625
26505
|
return new Embedder(config, stateDir);
|
|
26626
26506
|
}
|
|
26627
|
-
|
|
26628
|
-
//#region src/engine/eval/trace.ts
|
|
26507
|
+
// src/engine/eval/trace.ts
|
|
26629
26508
|
/** @file trace.ts
|
|
26630
26509
|
* @purpose Emits per-QA retrieval traces and the active config snapshot for eval runs.
|
|
26631
26510
|
* @boundary Filesystem (JSONL/JSON write) and config constants surface.
|
|
@@ -26727,8 +26606,7 @@ function computeConfigHash() {
|
|
|
26727
26606
|
function sha256Hex(input) {
|
|
26728
26607
|
return createHash("sha256").update(input).digest("hex");
|
|
26729
26608
|
}
|
|
26730
|
-
|
|
26731
|
-
//#region src/engine/retrieval/access-tracker.ts
|
|
26609
|
+
// src/engine/retrieval/access-tracker.ts
|
|
26732
26610
|
/** @file access-tracker.ts
|
|
26733
26611
|
* @purpose Tracks memory access signals that feed recency, ranking, and decay decisions.
|
|
26734
26612
|
* @boundary Memory store metadata and retrieval result identifiers.
|
|
@@ -27016,8 +26894,7 @@ var AccessTracker = class {
|
|
|
27016
26894
|
}
|
|
27017
26895
|
}
|
|
27018
26896
|
};
|
|
27019
|
-
|
|
27020
|
-
//#region src/engine/retrieval/retrieval-trace.ts
|
|
26897
|
+
// src/engine/retrieval/retrieval-trace.ts
|
|
27021
26898
|
var StageLifecycle = class StageLifecycle {
|
|
27022
26899
|
name;
|
|
27023
26900
|
inputOrder;
|
|
@@ -27186,8 +27063,7 @@ var TraceCollector = class {
|
|
|
27186
27063
|
this.activeStage = null;
|
|
27187
27064
|
}
|
|
27188
27065
|
};
|
|
27189
|
-
|
|
27190
|
-
//#region src/engine/retrieval/retrieval-config.ts
|
|
27066
|
+
// src/engine/retrieval/retrieval-config.ts
|
|
27191
27067
|
/** @file retrieval-config.ts
|
|
27192
27068
|
* @purpose Defines retriever runtime configuration and request context contracts.
|
|
27193
27069
|
* @boundary Types and defaults only; no ranking execution.
|
|
@@ -27238,8 +27114,7 @@ const DEFAULT_RETRIEVAL_CONFIG = {
|
|
|
27238
27114
|
mmrLambda: MMR_LAMBDA,
|
|
27239
27115
|
recallLifecycle: DEFAULT_RECALL_LIFECYCLE
|
|
27240
27116
|
};
|
|
27241
|
-
|
|
27242
|
-
//#region src/engine/retrieval/retriever-core.ts
|
|
27117
|
+
// src/engine/retrieval/retriever-core.ts
|
|
27243
27118
|
var MemoryRetriever = class {
|
|
27244
27119
|
store;
|
|
27245
27120
|
embedder;
|
|
@@ -27303,8 +27178,7 @@ var MemoryRetriever = class {
|
|
|
27303
27178
|
function createRetriever(store, embedder, logger, config = DEFAULT_RETRIEVAL_CONFIG) {
|
|
27304
27179
|
return new MemoryRetriever(store, embedder, logger, config);
|
|
27305
27180
|
}
|
|
27306
|
-
|
|
27307
|
-
//#region src/engine/retrieval/retriever-query-tools.ts
|
|
27181
|
+
// src/engine/retrieval/retriever-query-tools.ts
|
|
27308
27182
|
Object.assign(MemoryRetriever.prototype, {
|
|
27309
27183
|
throwIfAborted(context) {
|
|
27310
27184
|
if (!context.signal?.aborted) return;
|
|
@@ -27323,8 +27197,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
27323
27197
|
return isMemoryExpired(parseInsightMetadata(entry.metadata, entry));
|
|
27324
27198
|
}
|
|
27325
27199
|
});
|
|
27326
|
-
|
|
27327
|
-
//#region src/engine/retrieval/retrieval-scoring-utils.ts
|
|
27200
|
+
// src/engine/retrieval/retrieval-scoring-utils.ts
|
|
27328
27201
|
const log$4 = createLogger$1("sno-station-mem:retriever");
|
|
27329
27202
|
function dotProduct(a, b) {
|
|
27330
27203
|
let sum = 0;
|
|
@@ -27349,8 +27222,7 @@ function collectParallelStage(results, key, fallbackIds) {
|
|
|
27349
27222
|
omitted
|
|
27350
27223
|
};
|
|
27351
27224
|
}
|
|
27352
|
-
|
|
27353
|
-
//#region src/engine/retrieval/retriever-search-modes.ts
|
|
27225
|
+
// src/engine/retrieval/retriever-search-modes.ts
|
|
27354
27226
|
/**
|
|
27355
27227
|
* Ordinary long prose is chunked and averaged by the embedder. Text it cannot cut under the model's limit (a pasted log or hash
|
|
27356
27228
|
* dump) is rejected, and would fail the whole recall, so only then is the query cut to the limit; keyword search still sees all of it.
|
|
@@ -27596,8 +27468,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
27596
27468
|
});
|
|
27597
27469
|
}
|
|
27598
27470
|
});
|
|
27599
|
-
|
|
27600
|
-
//#region src/engine/retrieval/retriever-rerank.ts
|
|
27471
|
+
// src/engine/retrieval/retriever-rerank.ts
|
|
27601
27472
|
/** @file retriever-rerank.ts
|
|
27602
27473
|
* @purpose Runs local cosine ordering and local model reranking.
|
|
27603
27474
|
* @boundary Prototype-mounted MemoryRetriever methods; no constructor state ownership.
|
|
@@ -27739,8 +27610,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
27739
27610
|
};
|
|
27740
27611
|
}
|
|
27741
27612
|
});
|
|
27742
|
-
|
|
27743
|
-
//#region src/engine/operations/selective-forgetting-scorer.ts
|
|
27613
|
+
// src/engine/operations/selective-forgetting-scorer.ts
|
|
27744
27614
|
/** @file selective-forgetting-scorer.ts
|
|
27745
27615
|
* @purpose Computes Selective Forgetting scores from age, access history, and intrinsic value.
|
|
27746
27616
|
* @boundary Access history, importance, timestamps, and retrieval scoring inputs.
|
|
@@ -27848,8 +27718,7 @@ function createRetentionScorer(config = DEFAULT_DECAY_CONFIG) {
|
|
|
27848
27718
|
}
|
|
27849
27719
|
};
|
|
27850
27720
|
}
|
|
27851
|
-
|
|
27852
|
-
//#region src/engine/retrieval/retriever-scoring-pipeline.ts
|
|
27721
|
+
// src/engine/retrieval/retriever-scoring-pipeline.ts
|
|
27853
27722
|
/** @file retriever-scoring-pipeline.ts
|
|
27854
27723
|
* @purpose Applies post-retrieval scoring, decay, noise, and diversity transforms.
|
|
27855
27724
|
* @boundary Prototype-mounted MemoryRetriever methods; no constructor state ownership.
|
|
@@ -28110,8 +27979,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28110
27979
|
});
|
|
28111
27980
|
}
|
|
28112
27981
|
});
|
|
28113
|
-
|
|
28114
|
-
//#region src/engine/retrieval/retriever-execution.ts
|
|
27982
|
+
// src/engine/retrieval/retriever-execution.ts
|
|
28115
27983
|
/** @file retriever-execution.ts
|
|
28116
27984
|
* @purpose Runs retrieval entrypoints, traces, and stats recording.
|
|
28117
27985
|
* @boundary Prototype-mounted MemoryRetriever methods; no constructor state ownership.
|
|
@@ -28373,8 +28241,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28373
28241
|
}
|
|
28374
28242
|
}
|
|
28375
28243
|
});
|
|
28376
|
-
|
|
28377
|
-
//#region src/sidecar/rem-job-store.ts
|
|
28244
|
+
// src/sidecar/rem-job-store.ts
|
|
28378
28245
|
/** @file rem-job-store.ts
|
|
28379
28246
|
* @purpose Persists append-only REM job state transitions.
|
|
28380
28247
|
* @boundary Durable local JSONL journal used by the standalone REM sidecar.
|
|
@@ -28748,8 +28615,7 @@ async function syncDirectory$1(directory) {
|
|
|
28748
28615
|
await handle.close();
|
|
28749
28616
|
}
|
|
28750
28617
|
}
|
|
28751
|
-
|
|
28752
|
-
//#region src/sidecar/rem-entry-foundations.ts
|
|
28618
|
+
// src/sidecar/rem-entry-foundations.ts
|
|
28753
28619
|
const sha256Schema = z.string().regex(/^[0-9a-f]{64}$/u);
|
|
28754
28620
|
const finiteRecordSchema = z.record(z.string(), z.number().finite()).refine((value) => Object.keys(value).length > 0);
|
|
28755
28621
|
const commonArtifactShape = {
|
|
@@ -28825,8 +28691,7 @@ z.object({
|
|
|
28825
28691
|
waivedBy: z.string().min(1),
|
|
28826
28692
|
waiverReason: z.string().min(1)
|
|
28827
28693
|
}).strict();
|
|
28828
|
-
|
|
28829
|
-
//#region src/sidecar/rem-update-judgment-skill.ts
|
|
28694
|
+
// src/sidecar/rem-update-judgment-skill.ts
|
|
28830
28695
|
/** @file rem-update-judgment-skill.ts
|
|
28831
28696
|
* @purpose Loads the model-readable REM update judgment method shipped with the plugin.
|
|
28832
28697
|
* @boundary Package-relative read of one trusted bundled skill.
|
|
@@ -28862,8 +28727,7 @@ const REM_UPDATE_JUDGMENT_SKILL = {
|
|
|
28862
28727
|
verification: readSection("Rewrite Verification"),
|
|
28863
28728
|
clauseCarry: readSection("Clause Carry")
|
|
28864
28729
|
};
|
|
28865
|
-
|
|
28866
|
-
//#region src/store/rem-sqlite-adapter.ts
|
|
28730
|
+
// src/store/rem-sqlite-adapter.ts
|
|
28867
28731
|
/** @file rem-sqlite-adapter.ts
|
|
28868
28732
|
* @purpose Binds capability-safe REM mutation and recovery ports to encrypted sno-station-mem SQLite.
|
|
28869
28733
|
* @boundary Additive REM tables and recoverable memory-row updates; no deletion or compaction.
|
|
@@ -29551,8 +29415,7 @@ function hashText(value) {
|
|
|
29551
29415
|
function hashMemoryRow(row) {
|
|
29552
29416
|
return hashRemMemoryRow(row);
|
|
29553
29417
|
}
|
|
29554
|
-
|
|
29555
|
-
//#region src/sidecar/rem-batch-executor.ts
|
|
29418
|
+
// src/sidecar/rem-batch-executor.ts
|
|
29556
29419
|
/** @file rem-batch-executor.ts
|
|
29557
29420
|
* @purpose Runs the production REM scan, judgments, and recoverable mutations for one scope.
|
|
29558
29421
|
* @boundary One profile's encrypted SQLite database, Sno GPU judgments, and durable REM ledgers.
|
|
@@ -29837,7 +29700,7 @@ async function runWithCanonicalStoreWriteMutex(canonicalStorePath, action) {
|
|
|
29837
29700
|
async function openBatchRuntime(input) {
|
|
29838
29701
|
const settings = input.settings;
|
|
29839
29702
|
const dbPath = settings.store.path;
|
|
29840
|
-
const pluginConfig = settingsToPluginConfig(settings, "product");
|
|
29703
|
+
const pluginConfig = settingsToPluginConfig(settings, process.env.SNO_USAGE_CLASS === "research" ? "research" : "product");
|
|
29841
29704
|
initSqliteRuntime(settings.store.encryptionKey);
|
|
29842
29705
|
const embedder = createEmbedder(pluginConfig.embedding, getSnoStationMemStateDir());
|
|
29843
29706
|
let store;
|
|
@@ -32003,8 +31866,7 @@ function sha256(value) {
|
|
|
32003
31866
|
function compareTuple(left, right) {
|
|
32004
31867
|
return JSON.stringify(left).localeCompare(JSON.stringify(right));
|
|
32005
31868
|
}
|
|
32006
|
-
|
|
32007
|
-
//#region src/sidecar/rem-trigger-state.ts
|
|
31869
|
+
// src/sidecar/rem-trigger-state.ts
|
|
32008
31870
|
/** @file rem-trigger-state.ts
|
|
32009
31871
|
* @purpose Persists the automatic REM scheduler's strict per-scope state.
|
|
32010
31872
|
* @boundary One atomically replaced JSON file under the sno-station-mem state directory.
|
|
@@ -32759,5 +32621,4 @@ function isNodeError(error) {
|
|
|
32759
32621
|
function errorMessage(error) {
|
|
32760
32622
|
return error instanceof Error ? error.message : String(error);
|
|
32761
32623
|
}
|
|
32762
|
-
//#endregion
|
|
32763
32624
|
export { renderAdapterAChatPrompt as $, MEMORY_CATEGORIES as $t, journalAtomicArrivalRetirementRefusal as A, getAuditPath as At, StaleSupersedeTargetError as B, debugContentPreview as Bt, buildTaskLifecycleCommandClaim as C, withMemoryOperation as Cn, withProviderResponses as Ct, normalizeEntityName as D, appendAuditEntryStrict as Dt, listAtomicMemoryEntityCandidates as E, appendAuditEntry as Et, normalizeTopicToSectionName as F, CODING_SKIN_LEDGER_MAX_CHARS as Ft, loadSqliteVecExtension as G, redactSecrets as Gt, validateMemoryTelemetryMetadata as H, stripHtmlTags as Ht, getSnoStationMemDataDir as I, CODING_SKIN_SESSION_QUERY as It, adapterAViewFromRecord as J, stringifyInsightMetadata as Jt, REM_BUILT_OPERATION_TYPES as K, buildInsightMetadata as Kt, AtomicExtractionCompletedElsewhere as L, HOST_MODEL_DEADLINE_HEADER as Lt, recordTokenCounter as M, runWithMemoryAuditSync as Mt, canExtractorWrite as N, runWithMutationAttempt as Nt, recordAtomicEntityIdentityJournal as O, compactAuditLog as Ot, canonicalizeProfileSectionName as P, readJsonlLines as Pt, prospectiveProfileView as Q, AGGREGATION_OPERATIONS as Qt, normalizeMemoryRelationPredicate as R, clamp01 as Rt, admitTaskLifecycleAssertion as S, memoryOperationSignal as Sn, isTerminalLlmFailure as St, resolveHookAgentId as T, isTerminalLlmFailure$1 as Tt, randomUUID$1 as U, stripRoleLabelPrefix as Ut, TaskLifecycleStaleResolutionError as V, stableHash as Vt, readChunkVecTableState as W, truncateGraphemes as Wt, orderAdapterAPair as X, parseIsoDateTimeMs as Xt, isAdapterAVerdictReply as Y, normalizeIsoDateTimeString as Yt, parseAdapterAChatVerdict as Z, deriveFactKey as Zt, acceptsTaskLifecycleJudgment as _, initSqliteRuntime as _n, createScopePolicy as _t, enumerateRemCandidateScopes as a, atomicExtractionSkillReference as an, resolveMemoryDate as at, resolveTaskLifecycle as b, checkMemoryOperation as bn, ModelCallRefusedError as bt, runRemProductionOrderedWave as c, state_vocabulary_default as cn, buildIndexedText as ct, RemJobStore as d, calendarInstructionSchema as dn, ALL_RESOURCES as dt, normalizeCategory as en, renderAdapterAPrompt as et, parseRemJobStats as f, isCalendarLabel as fn, RESOURCES_BY_LOCALE as ft, Embedder as g, isMemoryTelemetryEventType as gn, MemoryScopePolicy as gt, AccessTracker as h, MEMORY_TELEMETRY_DELETE_REASONS as hn, StorageError as ht, createRemModelStageResponsePort as i, ATOMIC_EXTRACTION_SKILL_HASH as in, serializeIntervalMetadata as it, readAtomicArrivalRetirementCandidateSet as j, runWithMemoryAudit as jt, closeAtomicArrivalRetirementTargets as k, currentMutationAttemptId as kt, runWithCanonicalStoreWriteMutex as l, relations as ln, stripEnvelopeMetadata as lt, DEFAULT_RETRIEVAL_CONFIG as m, attribute_dictionary_default as mn, SnoStationMemError as mt, remNeedsHost as n, resolveLlmRoute as nn, readMemorySourceOrderOrOldest as nt, readCandidates as o, modelReplyJsonCandidates as on, unresolvedMemoryDate as ot, MemoryRetriever as p, sessionZoneCarriedBy as pn, RetrievalError as pt, parseRemOperationType as q, parseInsightMetadata as qt, buildRemReplaceCandidateQueue as r, ATOMIC_EXTRACTION_SKILL as rn, parseSessionTimestamp as rt, runRemBatchJob as s, readModelReplyJson as sn, boundSectionContent as st, evaluateRemAutomaticTriggers as t, pickLlmRoutingConfig as tn, compareMemorySourceOrder as tt, selectRemUpdateRelationCandidates as u, calculateCalendarTime as un, normalizeAmbientLearningText as ut, buildTaskLifecycleCandidateSet as v, openSqliteDatabase as vn, parseAgentIdFromSessionKey$1 as vt, resolveTaskLifecycleEffectiveTime as w, forwardObserveLedgerUntilIdle as wn, classifyLlmFailure as wt, taskLifecycleCandidateSetVersion as x, memoryFileWrite as xn, createLlmClient as xt, findUniqueActiveTaskByDescription as y, openSqliteDatabaseReadonly as yn, LlmClientTerminalError as yt, MemoryStore as z, clampInt as zt };
|