@snoai/memory 1.7.0 → 2.0.0
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/agent-state-osRgfRdR.js +928 -0
- package/dist/agent-state-view.d.ts +1 -0
- package/dist/agent-state-view.js +185 -0
- 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-DF_S9ROg.js → atomic-extraction-reply-CoxIGLmU.js} +6 -9
- package/dist/{atomic-extraction-skill-CcXmuCqL.js → atomic-extraction-skill-5lAqr8BM.js} +1 -2
- package/dist/{atomic-memory-extraction-Bp7AWZqi.d.ts → atomic-memory-extraction-DcoaYWiS.d.ts} +6 -20
- package/dist/{atomic-memory-extraction-pL1_58Kw.js → atomic-memory-extraction-OusdO3Ig.js} +27 -40
- 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 +5 -7
- package/dist/coding-skin-D_2RbNDw.js +342 -0
- package/dist/coding-skin.d.ts +87 -5
- package/dist/coding-skin.js +3 -2
- package/dist/{config-BwUcq2zS.js → config-VPVf190N.js} +18 -35
- 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 +4 -5
- 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-Dq9FZPdC.js → llm-client-DhBvu-U_.js} +9 -13
- package/dist/{locales-JxGmkG6t.d.ts → locales-CCZtQJq7.d.ts} +0 -2
- package/dist/{log-site-catalog.generated-Wze-GrOG.js → log-site-catalog.generated-3zYckrtz.js} +4 -6
- 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 +2 -3
- 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-B4A1t5DO.js → memory-runtime-CKIBXN_r.js} +105 -205
- 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-CHcnOT5T.js → memory-temporality-classifier-DTRhzXmG.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-CAVm0Sy4.js → memory-tool-dependencies-BQHE4kMD.js} +6 -6
- package/dist/memory-tool-dependencies-KsEWfLkV.d.ts +14 -0
- package/dist/{model-call-table-DjfbmUDl.js → model-call-table-BxGwmwv0.js} +2 -3
- 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-3apndAJu.js → profile-section-writer-QiB0MMtt.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-B9UENMGV.js → reflection-command-hooks-DBpqpF7A.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-Do_r_LbU.js → reflection-embedded-generator-DNFMQNsv.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-BHItPFZ8.js +1 -0
- package/dist/{rem-consumer-retrieval-BhS1ivcd.js → rem-consumer-retrieval-DXeqknml.js} +3 -5
- package/dist/{rem-trigger-pg_cCp5U.js → rem-trigger-BN6GCcnE.js} +197 -344
- 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-CByyXSvp.js → server-BvEOkYis.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-DorPRtTM.d.ts +29 -0
- package/dist/{sno-station-mem-runtime-dependencies-CgNS1dIM.js → sno-station-mem-runtime-dependencies-Fq6yRstU.js} +14 -14
- 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-DNgKOGWP.js → store-cu7Qq2OW.js} +44 -76
- package/dist/{strategy-hook-runner-Bg6rBY71.js → strategy-hook-runner-CvdsVcwR.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 +1 -1
- package/dist/coding-skin-AW1UPUPY.js +0 -267
- package/dist/memory-tool-dependencies-D2fOC-KL.d.ts +0 -14
- package/dist/paths-obFSsJv3.d.ts +0 -1
- package/dist/rem-batch-executor-BUgNyYLv.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-VPVf190N.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";
|
|
@@ -8,12 +8,15 @@ import { createHash, createHmac, createPublicKey, randomUUID, randomUUID as rand
|
|
|
8
8
|
import { LRUCache } from "lru-cache";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { CHUNKING_VERSION, aggregateChunksToMemories, buildChunkId, buildDensePayload, chunk, chunk as chunk$1, countTokens, expandSnippetWindow, extractMetadataHeader, headExtract, shouldDropSummary } from "@snoai/chunking";
|
|
11
|
+
import "@snoai/observability";
|
|
11
12
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
12
13
|
import { getDek, openEncryptedDb, openEncryptedDbReadonly } from "@snoai/sqlite-crypto";
|
|
13
14
|
import { appendFile, mkdir, open, readFile, rename, rm } from "node:fs/promises";
|
|
14
15
|
import { Temporal } from "@js-temporal/polyfill";
|
|
15
16
|
import { redactForStorage, sanitizeContentIngress, sanitizeStructuredJsonForStorage } from "@snoai/content-sanitizer";
|
|
17
|
+
import { execFile } from "node:child_process";
|
|
16
18
|
import { createInterface } from "node:readline";
|
|
19
|
+
import { isDeepStrictEqual, promisify } from "node:util";
|
|
17
20
|
import { StringDecoder } from "node:string_decoder";
|
|
18
21
|
import { CallPipeline, ConfigRegistryManager, KeyPool, loadLlmixTrustManifest, registryRootOptionsFromTrustManifest } from "@snoai/llmix";
|
|
19
22
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
@@ -23,9 +26,8 @@ import { migrate } from "drizzle-orm/better-sqlite3/migrator";
|
|
|
23
26
|
import { index, integer, primaryKey, real, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
24
27
|
import { arch as arch$1, platform as platform$1 } from "node:process";
|
|
25
28
|
import { getLoadablePath } from "sqlite-vec";
|
|
26
|
-
import { isDeepStrictEqual } from "node:util";
|
|
27
29
|
import { currentLogContext as currentLogContext$1, withLogContext as withLogContext$1 } from "@snoai/utils/log-context";
|
|
28
|
-
|
|
30
|
+
// \0rolldown/runtime.js
|
|
29
31
|
var __defProp = Object.defineProperty;
|
|
30
32
|
var __exportAll = (all, no_symbols) => {
|
|
31
33
|
let target = {};
|
|
@@ -36,8 +38,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
36
38
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
37
39
|
return target;
|
|
38
40
|
};
|
|
39
|
-
|
|
40
|
-
//#region src/engine/telemetry/observe-ledger.ts
|
|
41
|
+
// src/engine/telemetry/observe-ledger.ts
|
|
41
42
|
const log$24 = createLogger("sno-station-mem:observe-ledger");
|
|
42
43
|
const rowSchema = z.object({
|
|
43
44
|
ts_ms: z.number().int().nonnegative(),
|
|
@@ -166,8 +167,7 @@ async function forwardObserveLedger(options) {
|
|
|
166
167
|
async function forwardObserveLedgerUntilIdle(options) {
|
|
167
168
|
for (;;) if ((await forwardObserveLedger(options)).status !== "forwarded") return;
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
-
//#region src/engine/operation-cancellation.ts
|
|
170
|
+
// src/engine/operation-cancellation.ts
|
|
171
171
|
const operations = new AsyncLocalStorage();
|
|
172
172
|
const log$23 = createLogger("sno-station-mem:cancellation");
|
|
173
173
|
/** Carries cancellation through the existing nested extraction and reflection writers. */
|
|
@@ -248,8 +248,7 @@ async function memoryFileWrite(write) {
|
|
|
248
248
|
if (operation) operation.writes++;
|
|
249
249
|
return result;
|
|
250
250
|
}
|
|
251
|
-
|
|
252
|
-
//#region src/store/sqlite-runtime.ts
|
|
251
|
+
// src/store/sqlite-runtime.ts
|
|
253
252
|
/** @file sqlite-runtime.ts
|
|
254
253
|
* @purpose Single chokepoint for opening encrypted SQLite databases used by
|
|
255
254
|
* the plugin. Routes all opens through `@snoai/sqlite-crypto`, which applies
|
|
@@ -348,8 +347,7 @@ function openSqliteDatabaseReadonly(dbPath) {
|
|
|
348
347
|
db: guarded.db
|
|
349
348
|
};
|
|
350
349
|
}
|
|
351
|
-
|
|
352
|
-
//#region src/engine/telemetry/memory-telemetry-types.ts
|
|
350
|
+
// src/engine/telemetry/memory-telemetry-types.ts
|
|
353
351
|
const MEMORY_TELEMETRY_EVENT_TYPES = [
|
|
354
352
|
"create",
|
|
355
353
|
"update",
|
|
@@ -368,8 +366,7 @@ const MEMORY_TELEMETRY_DELETE_REASONS = {
|
|
|
368
366
|
function isMemoryTelemetryEventType(value) {
|
|
369
367
|
return typeof value === "string" && MEMORY_TELEMETRY_EVENT_TYPES.includes(value);
|
|
370
368
|
}
|
|
371
|
-
|
|
372
|
-
//#region config/attribute-dictionary.json
|
|
369
|
+
// config/attribute-dictionary.json
|
|
373
370
|
var attribute_dictionary_default = {
|
|
374
371
|
schema_version: 1,
|
|
375
372
|
name: "attribute-dictionary",
|
|
@@ -4205,8 +4202,7 @@ var attribute_dictionary_default = {
|
|
|
4205
4202
|
"travels"
|
|
4206
4203
|
]
|
|
4207
4204
|
};
|
|
4208
|
-
|
|
4209
|
-
//#region src/engine/extraction/calendar-instruction.ts
|
|
4205
|
+
// src/engine/extraction/calendar-instruction.ts
|
|
4210
4206
|
/** Calendar operations supplied by a model. This module never reads natural language. */
|
|
4211
4207
|
/** Day names in ISO order; the wire carries the name because models do not share one numbering. */
|
|
4212
4208
|
const WEEKDAYS = [
|
|
@@ -4396,8 +4392,7 @@ function calculateCalendarTime(instruction, sessionDateTime, sessionTimezone) {
|
|
|
4396
4392
|
return null;
|
|
4397
4393
|
}
|
|
4398
4394
|
}
|
|
4399
|
-
|
|
4400
|
-
//#region config/relation-dictionary.json
|
|
4395
|
+
// config/relation-dictionary.json
|
|
4401
4396
|
var relations = [
|
|
4402
4397
|
{
|
|
4403
4398
|
"type": "IS_A",
|
|
@@ -4727,8 +4722,7 @@ var relations = [
|
|
|
4727
4722
|
]
|
|
4728
4723
|
}
|
|
4729
4724
|
];
|
|
4730
|
-
|
|
4731
|
-
//#region config/state-vocabulary.json
|
|
4725
|
+
// config/state-vocabulary.json
|
|
4732
4726
|
var state_vocabulary_default = {
|
|
4733
4727
|
schema_version: 1,
|
|
4734
4728
|
name: "state-vocabulary",
|
|
@@ -4806,8 +4800,7 @@ var state_vocabulary_default = {
|
|
|
4806
4800
|
}
|
|
4807
4801
|
]
|
|
4808
4802
|
};
|
|
4809
|
-
|
|
4810
|
-
//#region src/model/llm-json-utils.ts
|
|
4803
|
+
// src/model/llm-json-utils.ts
|
|
4811
4804
|
/** @file llm-json-utils.ts
|
|
4812
4805
|
* @purpose Extracts and repairs JSON returned by LLM providers.
|
|
4813
4806
|
* @boundary Response-text normalization only; schema validation remains with callers.
|
|
@@ -4982,8 +4975,7 @@ function repairCommonJson(text) {
|
|
|
4982
4975
|
}
|
|
4983
4976
|
return result;
|
|
4984
4977
|
}
|
|
4985
|
-
|
|
4986
|
-
//#region src/engine/shared/model-reply-text.ts
|
|
4978
|
+
// src/engine/shared/model-reply-text.ts
|
|
4987
4979
|
/** @file model-reply-text.ts
|
|
4988
4980
|
* @purpose Turns one raw model reply into the ordered JSON payload candidates a caller may accept.
|
|
4989
4981
|
* @boundary Response-text normalization only; the caller owns every schema decision.
|
|
@@ -5139,8 +5131,7 @@ function readModelReplyJson(raw, accept) {
|
|
|
5139
5131
|
if (admitted !== void 0) return admitted;
|
|
5140
5132
|
}
|
|
5141
5133
|
}
|
|
5142
|
-
|
|
5143
|
-
//#region src/engine/extraction/atomic-extraction-skill.ts
|
|
5134
|
+
// src/engine/extraction/atomic-extraction-skill.ts
|
|
5144
5135
|
/** @file atomic-extraction-skill.ts
|
|
5145
5136
|
* @purpose Loads the model-readable atomic memory extraction method shipped with the plugin.
|
|
5146
5137
|
* @boundary Package-relative read of one trusted bundled skill.
|
|
@@ -5190,8 +5181,7 @@ function atomicExtractionSkillReference(name) {
|
|
|
5190
5181
|
if (text === void 0) throw new Error(`sno-station-mem atomic extraction skill reference missing: ${name}`);
|
|
5191
5182
|
return text;
|
|
5192
5183
|
}
|
|
5193
|
-
|
|
5194
|
-
//#region src/model/llm-mode-routing.ts
|
|
5184
|
+
// src/model/llm-mode-routing.ts
|
|
5195
5185
|
/** @file llm-mode-routing.ts
|
|
5196
5186
|
* @purpose Resolve one model call id to its configured destination and transport.
|
|
5197
5187
|
*/
|
|
@@ -5224,8 +5214,7 @@ function resolveLlmRoute(input) {
|
|
|
5224
5214
|
parser: call.replyParser.snoGpu
|
|
5225
5215
|
};
|
|
5226
5216
|
}
|
|
5227
|
-
|
|
5228
|
-
//#region src/engine/shared/types.ts
|
|
5217
|
+
// src/engine/shared/types.ts
|
|
5229
5218
|
const MEMORY_CATEGORIES = [
|
|
5230
5219
|
"episodic",
|
|
5231
5220
|
"profile",
|
|
@@ -5245,8 +5234,7 @@ function normalizeCategory(raw) {
|
|
|
5245
5234
|
const lower = raw.toLowerCase().trim();
|
|
5246
5235
|
if (MEMORY_CATEGORIES.includes(lower)) return lower;
|
|
5247
5236
|
}
|
|
5248
|
-
|
|
5249
|
-
//#region src/engine/extraction/memory-metadata-normalizers.ts
|
|
5237
|
+
// src/engine/extraction/memory-metadata-normalizers.ts
|
|
5250
5238
|
function validateMemoryCategory(raw) {
|
|
5251
5239
|
return normalizeCategory(raw) ?? void 0;
|
|
5252
5240
|
}
|
|
@@ -5336,8 +5324,7 @@ function deriveFactKey(metadata) {
|
|
|
5336
5324
|
return signature ? `lesson:${signature}` : void 0;
|
|
5337
5325
|
}
|
|
5338
5326
|
}
|
|
5339
|
-
|
|
5340
|
-
//#region src/engine/extraction/memory-metadata-types.ts
|
|
5327
|
+
// src/engine/extraction/memory-metadata-types.ts
|
|
5341
5328
|
/** @file memory-metadata-types.ts
|
|
5342
5329
|
* @purpose Defines typed insight metadata contracts via Zod discriminated union.
|
|
5343
5330
|
* @boundary Metadata shape declarations only.
|
|
@@ -5480,8 +5467,7 @@ const memoryMetadata = z.discriminatedUnion("kind", [
|
|
|
5480
5467
|
summaryMetadata,
|
|
5481
5468
|
stateMetadata
|
|
5482
5469
|
]);
|
|
5483
|
-
|
|
5484
|
-
//#region src/engine/shared/iso-date-time.ts
|
|
5470
|
+
// src/engine/shared/iso-date-time.ts
|
|
5485
5471
|
/** @file iso-date-time.ts
|
|
5486
5472
|
* @purpose Validates persisted ISO date/date-time strings without JavaScript Date rollover.
|
|
5487
5473
|
* @boundary ISO string normalization and epoch parsing only; no relative date parsing.
|
|
@@ -5509,8 +5495,7 @@ function parseIsoDateTimeMs(value) {
|
|
|
5509
5495
|
const parsed = Date.parse(normalized);
|
|
5510
5496
|
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
5511
5497
|
}
|
|
5512
|
-
|
|
5513
|
-
//#region src/engine/extraction/memory-metadata-codec.ts
|
|
5498
|
+
// src/engine/extraction/memory-metadata-codec.ts
|
|
5514
5499
|
/** @file memory-metadata-codec.ts
|
|
5515
5500
|
* @purpose Normalizes extracted metadata into typed fields for ranking and filtering.
|
|
5516
5501
|
* @boundary Extractor output, preference slots, and store metadata persistence.
|
|
@@ -5684,8 +5669,7 @@ function stringifyInsightMetadata(metadata) {
|
|
|
5684
5669
|
delete capped.memory_layer;
|
|
5685
5670
|
return JSON.stringify(capped);
|
|
5686
5671
|
}
|
|
5687
|
-
|
|
5688
|
-
//#region src/engine/security/redact.ts
|
|
5672
|
+
// src/engine/security/redact.ts
|
|
5689
5673
|
/** @file redact.ts
|
|
5690
5674
|
* @purpose Redacts sensitive values before logs, diagnostics, or model-visible text.
|
|
5691
5675
|
* @boundary Security boundaries, capture payloads, and CLI output hygiene.
|
|
@@ -5747,8 +5731,7 @@ function tokenizeForFts(rawQuery) {
|
|
|
5747
5731
|
}
|
|
5748
5732
|
return normalized.split(/\s+/u).filter(Boolean);
|
|
5749
5733
|
}
|
|
5750
|
-
|
|
5751
|
-
//#region src/engine/shared/utils.ts
|
|
5734
|
+
// src/engine/shared/utils.ts
|
|
5752
5735
|
/** @file utils.ts
|
|
5753
5736
|
* @purpose Provides shared utility functions used across plugin runtime modules.
|
|
5754
5737
|
* @boundary Text normalization, hashing, filesystem helpers, and small conversions.
|
|
@@ -5873,11 +5856,6 @@ function debugContentPreview(text, enabled, maxChars = 80) {
|
|
|
5873
5856
|
if (collapsed.length === 0) return void 0;
|
|
5874
5857
|
return collapsed.length > maxChars ? `${collapsed.slice(0, maxChars)}...` : collapsed;
|
|
5875
5858
|
}
|
|
5876
|
-
z.object({ source: z.object({ commit: z.string().min(1) }) });
|
|
5877
|
-
//#endregion
|
|
5878
|
-
//#region config/skin-defaults.ts
|
|
5879
|
-
/** Epoch milliseconds after which the requester no longer waits for the answer. */
|
|
5880
|
-
const HOST_MODEL_DEADLINE_HEADER = "x-sno-deadline";
|
|
5881
5859
|
z.object({
|
|
5882
5860
|
offset: z.number().int().nonnegative(),
|
|
5883
5861
|
lastTs: z.number().int().nonnegative(),
|
|
@@ -5886,13 +5864,35 @@ z.object({
|
|
|
5886
5864
|
counted: z.boolean(),
|
|
5887
5865
|
path: z.string().min(1).optional()
|
|
5888
5866
|
});
|
|
5889
|
-
|
|
5890
|
-
|
|
5867
|
+
promisify(execFile);
|
|
5868
|
+
const harnessSchema = z.enum([
|
|
5869
|
+
"claude",
|
|
5870
|
+
"codex",
|
|
5871
|
+
"cursor",
|
|
5872
|
+
"hermes",
|
|
5873
|
+
"openclaw",
|
|
5874
|
+
"unknown"
|
|
5875
|
+
]);
|
|
5876
|
+
z.object({
|
|
5877
|
+
harness: harnessSchema,
|
|
5878
|
+
sessionId: z.string().min(1),
|
|
5879
|
+
at: z.iso.datetime({ offset: true }),
|
|
5880
|
+
event: z.string(),
|
|
5881
|
+
input: z.record(z.string(), z.unknown()),
|
|
5882
|
+
pid: z.number().int().positive().optional(),
|
|
5883
|
+
processStart: z.string().optional(),
|
|
5884
|
+
reachAddress: z.string().optional(),
|
|
5885
|
+
cwd: z.string().optional()
|
|
5886
|
+
});
|
|
5887
|
+
z.object({ source: z.object({ commit: z.string().min(1) }) });
|
|
5888
|
+
// config/skin-defaults.ts
|
|
5889
|
+
/** Epoch milliseconds after which the requester no longer waits for the answer. */
|
|
5890
|
+
const HOST_MODEL_DEADLINE_HEADER = "x-sno-deadline";
|
|
5891
|
+
// config/coding-skin.ts
|
|
5891
5892
|
const CODING_SKIN_CHILD_DEADLINE_MS = 11e4;
|
|
5892
5893
|
const CODING_SKIN_SESSION_QUERY = "standing decisions, open tasks, conventions and known pitfalls for this repository";
|
|
5893
5894
|
const CODING_SKIN_LEDGER_MAX_CHARS = 12e3;
|
|
5894
|
-
|
|
5895
|
-
//#region src/engine/operations/jsonl-lines.ts
|
|
5895
|
+
// src/engine/operations/jsonl-lines.ts
|
|
5896
5896
|
const log$22 = createLogger("sno-station-mem:jsonl");
|
|
5897
5897
|
/** Preserve complete records without materializing an unbounded log as one string. */
|
|
5898
5898
|
async function* readJsonlLines(file) {
|
|
@@ -5919,8 +5919,7 @@ async function* readJsonlLines(file) {
|
|
|
5919
5919
|
stream.destroy();
|
|
5920
5920
|
}
|
|
5921
5921
|
}
|
|
5922
|
-
|
|
5923
|
-
//#region src/engine/operations/runtime-audit-log.ts
|
|
5922
|
+
// src/engine/operations/runtime-audit-log.ts
|
|
5924
5923
|
/** @file runtime-audit-log.ts
|
|
5925
5924
|
* @purpose Records audit events for operational visibility and safety-sensitive actions.
|
|
5926
5925
|
* @boundary Plugin runtime events and filesystem-backed audit persistence.
|
|
@@ -6401,8 +6400,7 @@ function runWithMemoryAuditSync(options) {
|
|
|
6401
6400
|
return result;
|
|
6402
6401
|
});
|
|
6403
6402
|
}
|
|
6404
|
-
|
|
6405
|
-
//#region src/model/llm-failure.ts
|
|
6403
|
+
// src/model/llm-failure.ts
|
|
6406
6404
|
const CREDENTIAL_CATEGORIES = /* @__PURE__ */ new Set([
|
|
6407
6405
|
"auth",
|
|
6408
6406
|
"credential-expired",
|
|
@@ -6453,8 +6451,7 @@ function isTerminalLlmFailure$1(category) {
|
|
|
6453
6451
|
function isTransientLlmStatus(status) {
|
|
6454
6452
|
return status === 408 || status === 429 || status >= 500;
|
|
6455
6453
|
}
|
|
6456
|
-
|
|
6457
|
-
//#region src/model/llmix-registry.ts
|
|
6454
|
+
// src/model/llmix-registry.ts
|
|
6458
6455
|
/** @file llmix-registry.ts
|
|
6459
6456
|
* @purpose Loads the bundled signed LLMIx registry for sno-station-mem.
|
|
6460
6457
|
* @boundary Trust-anchor verification and package-relative asset resolution only.
|
|
@@ -6621,9 +6618,8 @@ async function resolveConfiguredBundledLlmixEndpoint(input) {
|
|
|
6621
6618
|
baseSource: input.selectBaseSource(configured.provider)
|
|
6622
6619
|
});
|
|
6623
6620
|
}
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
const SNO_GPU_ORIGIN = "https://rt3-llm.sno.ai";
|
|
6621
|
+
// src/model/llm-endpoint-resolution.ts
|
|
6622
|
+
const SNO_GPU_ORIGIN = "https://gpu.sno.ai";
|
|
6627
6623
|
const PROVIDER_API_BASES = {
|
|
6628
6624
|
openai: FIXED_PROTOCOL_VALUE_69,
|
|
6629
6625
|
openrouter: "https://openrouter.ai/api/v1"
|
|
@@ -6651,8 +6647,7 @@ async function resolveLlmEndpoint(input) {
|
|
|
6651
6647
|
userBaseUrlOverride: input.baseOverride !== void 0
|
|
6652
6648
|
};
|
|
6653
6649
|
}
|
|
6654
|
-
|
|
6655
|
-
//#region src/model/llm-provider-transport.ts
|
|
6650
|
+
// src/model/llm-provider-transport.ts
|
|
6656
6651
|
const log$21 = createLogger("sno-station-mem:llm-provider-transport");
|
|
6657
6652
|
const routeInFlight = /* @__PURE__ */ new Map();
|
|
6658
6653
|
const providerResponses = new AsyncLocalStorage();
|
|
@@ -7119,8 +7114,7 @@ function resolveProviderApiKey(config, resolved, userBaseUrlOverride) {
|
|
|
7119
7114
|
if (resolved.provider === "openai" && (!userBaseUrlOverride || isCcproxyOpenAiBaseUrl(config.baseURL?.trim()))) return CCPROXY_PLACEHOLDER_API_KEY;
|
|
7120
7115
|
throw new Error(`sno-station-mem llm-client: missing API key for preset ${config.preset}; set snoGpu.apiKey`);
|
|
7121
7116
|
}
|
|
7122
|
-
|
|
7123
|
-
//#region src/model/llm-client.ts
|
|
7117
|
+
// src/model/llm-client.ts
|
|
7124
7118
|
const log$20 = createLogger("sno-station-mem:llm-client");
|
|
7125
7119
|
let hostRequestsInFlight = 0;
|
|
7126
7120
|
/**
|
|
@@ -7924,8 +7918,7 @@ function createLlmClient(config) {
|
|
|
7924
7918
|
}
|
|
7925
7919
|
};
|
|
7926
7920
|
}
|
|
7927
|
-
|
|
7928
|
-
//#region src/engine/security/scope-policy-types.ts
|
|
7921
|
+
// src/engine/security/scope-policy-types.ts
|
|
7929
7922
|
const DEFAULT_SCOPE_CONFIG = {
|
|
7930
7923
|
default: "global",
|
|
7931
7924
|
definitions: { global: { description: "Knowledge used by all your agents" } },
|
|
@@ -7940,8 +7933,7 @@ const SCOPE_PATTERNS = {
|
|
|
7940
7933
|
PROJECT: (projectId) => `project:${projectId}`,
|
|
7941
7934
|
USER: (userId) => `user:${userId}`
|
|
7942
7935
|
};
|
|
7943
|
-
|
|
7944
|
-
//#region src/engine/security/scope-identity.ts
|
|
7936
|
+
// src/engine/security/scope-identity.ts
|
|
7945
7937
|
/** @file scope-identity.ts
|
|
7946
7938
|
* @purpose Normalizes agent identities and configured access lists for scope policy.
|
|
7947
7939
|
* @boundary Identity parsing, bypass detection, and config normalization only.
|
|
@@ -7999,8 +7991,7 @@ function normalizeAgentAccessMap(agentAccess) {
|
|
|
7999
7991
|
}
|
|
8000
7992
|
return normalized;
|
|
8001
7993
|
}
|
|
8002
|
-
|
|
8003
|
-
//#region src/engine/security/memory-scope-policy.ts
|
|
7994
|
+
// src/engine/security/memory-scope-policy.ts
|
|
8004
7995
|
/** @file memory-scope-policy.ts
|
|
8005
7996
|
* @purpose Implements mutable memory scope policy management.
|
|
8006
7997
|
* @boundary Scope config validation and access decisions only.
|
|
@@ -8194,8 +8185,7 @@ var MemoryScopePolicy = class {
|
|
|
8194
8185
|
function createScopePolicy(config = {}, warn) {
|
|
8195
8186
|
return new MemoryScopePolicy(config, warn);
|
|
8196
8187
|
}
|
|
8197
|
-
|
|
8198
|
-
//#region src/engine/shared/errors.ts
|
|
8188
|
+
// src/engine/shared/errors.ts
|
|
8199
8189
|
/** @file errors.ts
|
|
8200
8190
|
* @purpose Defines typed plugin errors and stable codes for callers and CLI output.
|
|
8201
8191
|
* @boundary Runtime boundaries, CLI error mapping, and test assertions.
|
|
@@ -8249,8 +8239,7 @@ var RetrievalError = class extends SnoStationMemError {
|
|
|
8249
8239
|
this.name = "RetrievalError";
|
|
8250
8240
|
}
|
|
8251
8241
|
};
|
|
8252
|
-
|
|
8253
|
-
//#region src/engine/i18n/res/locale-resource-helpers.ts
|
|
8242
|
+
// src/engine/i18n/res/locale-resource-helpers.ts
|
|
8254
8243
|
function defineLocaleResources(base, extras) {
|
|
8255
8244
|
const categoryRouting = base.captureTriggers.categoryRouting ?? {
|
|
8256
8245
|
identity: [base.captureTriggers.identityPattern],
|
|
@@ -8274,13 +8263,11 @@ function defineLocaleResources(base, extras) {
|
|
|
8274
8263
|
reflectionSliceClassifiers: extras.reflectionSliceClassifiers
|
|
8275
8264
|
};
|
|
8276
8265
|
}
|
|
8277
|
-
|
|
8278
|
-
//#region src/engine/i18n/res/date-resolution-prompt.ts
|
|
8266
|
+
// src/engine/i18n/res/date-resolution-prompt.ts
|
|
8279
8267
|
function buildDateResolutionPrompt() {
|
|
8280
8268
|
return `${atomicExtractionSkillReference("calendar-meaning")}\nJudge only the time of the supplied claim. Return reason and time in the supplied JSON schema.`;
|
|
8281
8269
|
}
|
|
8282
|
-
|
|
8283
|
-
//#region src/engine/extraction/temporal-resolution-skill.ts
|
|
8270
|
+
// src/engine/extraction/temporal-resolution-skill.ts
|
|
8284
8271
|
/** @file temporal-resolution-skill.ts
|
|
8285
8272
|
* @purpose Loads the model-readable relative-time method shipped with the plugin.
|
|
8286
8273
|
* @boundary Package-relative read and deterministic section selection only.
|
|
@@ -8312,8 +8299,7 @@ const WITHOUT_SESSION_ANCHOR = readSection$1("Without Session Anchor");
|
|
|
8312
8299
|
function buildTemporalResolutionRule(sessionDateTime, _sessionTimezone) {
|
|
8313
8300
|
return sessionDateTime ? WITH_SESSION_ANCHOR : WITHOUT_SESSION_ANCHOR;
|
|
8314
8301
|
}
|
|
8315
|
-
|
|
8316
|
-
//#region src/engine/i18n/res/de/extraction-prompt-boundary.ts
|
|
8302
|
+
// src/engine/i18n/res/de/extraction-prompt-boundary.ts
|
|
8317
8303
|
/** @file extraction-prompt-boundary.ts
|
|
8318
8304
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
8319
8305
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -8559,8 +8545,7 @@ legacy category event <- reject
|
|
|
8559
8545
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
8560
8546
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
8561
8547
|
\`\`\``;
|
|
8562
|
-
|
|
8563
|
-
//#region src/engine/i18n/res/de/extraction-prompt-rules.ts
|
|
8548
|
+
// src/engine/i18n/res/de/extraction-prompt-rules.ts
|
|
8564
8549
|
/** @file extraction-prompt-rules.ts
|
|
8565
8550
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
8566
8551
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -8652,8 +8637,7 @@ Wenn der Benutzer sagt "migrated from X to Y" / "switched from X to Y" /
|
|
|
8652
8637
|
Änderung ALS AUCH eine \`profile\`-Memory für den aktualisierten Zustand aus.
|
|
8653
8638
|
Siehe das Migrations-Few-Shot im Abschnitt extraction-prompt-examples.ts für
|
|
8654
8639
|
die erforderliche Zwei-Memory-Ausgabeform.`;
|
|
8655
|
-
|
|
8656
|
-
//#region src/engine/i18n/res/de/extraction-prompts.ts
|
|
8640
|
+
// src/engine/i18n/res/de/extraction-prompts.ts
|
|
8657
8641
|
/** @file extraction-prompts.ts
|
|
8658
8642
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
8659
8643
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -8854,8 +8838,7 @@ Return JSON format:
|
|
|
8854
8838
|
"reason": "Decision reason"
|
|
8855
8839
|
}`;
|
|
8856
8840
|
}
|
|
8857
|
-
|
|
8858
|
-
//#region src/engine/i18n/res/de/reflection-prompts.ts
|
|
8841
|
+
// src/engine/i18n/res/de/reflection-prompts.ts
|
|
8859
8842
|
const REFLECTION_FALLBACK_MARKER$8 = "(fallback) Reflection-Generierung fehlgeschlagen; nur Minimalverweis gespeichert.";
|
|
8860
8843
|
function buildReflectionPrompt$8(conversation, maxInputChars, toolErrorSignals = []) {
|
|
8861
8844
|
const promptInput = conversation;
|
|
@@ -9015,8 +8998,7 @@ const resources$8 = defineLocaleResources({
|
|
|
9015
8998
|
derivedLegacySignals: [/\b(gelernt|beobachtet|reflexion|änderung|verifizieren|nächster lauf)\b/i]
|
|
9016
8999
|
}
|
|
9017
9000
|
});
|
|
9018
|
-
|
|
9019
|
-
//#region src/engine/i18n/res/en/extraction-prompt-boundary.ts
|
|
9001
|
+
// src/engine/i18n/res/en/extraction-prompt-boundary.ts
|
|
9020
9002
|
/** @file extraction-prompt-boundary.ts
|
|
9021
9003
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
9022
9004
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -9262,8 +9244,7 @@ legacy category event <- reject
|
|
|
9262
9244
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
9263
9245
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
9264
9246
|
\`\`\``;
|
|
9265
|
-
|
|
9266
|
-
//#region src/engine/i18n/res/en/extraction-prompt-rules.ts
|
|
9247
|
+
// src/engine/i18n/res/en/extraction-prompt-rules.ts
|
|
9267
9248
|
/** @file extraction-prompt-rules.ts
|
|
9268
9249
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
9269
9250
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -9353,8 +9334,7 @@ When the user says "migrated from X to Y" / "switched from X to Y" / "sold X,
|
|
|
9353
9334
|
got Y": emit BOTH a dated \`episodic\` record for the change AND a \`profile\`
|
|
9354
9335
|
record for the updated current state. See the migration few-shot in the examples
|
|
9355
9336
|
section for the required two-memory output shape.`;
|
|
9356
|
-
|
|
9357
|
-
//#region src/engine/i18n/res/en/extraction-prompts.ts
|
|
9337
|
+
// src/engine/i18n/res/en/extraction-prompts.ts
|
|
9358
9338
|
/** @file extraction-prompts.ts
|
|
9359
9339
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
9360
9340
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -9555,8 +9535,7 @@ Return JSON format:
|
|
|
9555
9535
|
"reason": "Decision reason"
|
|
9556
9536
|
}`;
|
|
9557
9537
|
}
|
|
9558
|
-
|
|
9559
|
-
//#region src/engine/i18n/res/en/reflection-prompts.ts
|
|
9538
|
+
// src/engine/i18n/res/en/reflection-prompts.ts
|
|
9560
9539
|
const REFLECTION_FALLBACK_MARKER$7 = "(fallback) Reflection generation failed; storing minimal pointer only.";
|
|
9561
9540
|
function buildReflectionPrompt$7(conversation, maxInputChars, toolErrorSignals = []) {
|
|
9562
9541
|
const promptInput = conversation;
|
|
@@ -9721,8 +9700,7 @@ const resources$7 = defineLocaleResources({
|
|
|
9721
9700
|
derivedLegacySignals: [/\b(this run|next run|learned|observed|reflection|derived|delta|verify|change)\b/i]
|
|
9722
9701
|
}
|
|
9723
9702
|
});
|
|
9724
|
-
|
|
9725
|
-
//#region src/engine/i18n/res/es/extraction-prompt-boundary.ts
|
|
9703
|
+
// src/engine/i18n/res/es/extraction-prompt-boundary.ts
|
|
9726
9704
|
/** @file extraction-prompt-boundary.ts
|
|
9727
9705
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
9728
9706
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -9967,8 +9945,7 @@ legacy category event <- reject
|
|
|
9967
9945
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
9968
9946
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
9969
9947
|
\`\`\``;
|
|
9970
|
-
|
|
9971
|
-
//#region src/engine/i18n/res/es/extraction-prompt-rules.ts
|
|
9948
|
+
// src/engine/i18n/res/es/extraction-prompt-rules.ts
|
|
9972
9949
|
/** @file extraction-prompt-rules.ts
|
|
9973
9950
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
9974
9951
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -10058,8 +10035,7 @@ Cuando el usuario diga "migrated from X to Y" / "switched from X to Y" /
|
|
|
10058
10035
|
"sold X, got Y": emita TANTO un registro \`episodic\` fechado para el cambio
|
|
10059
10036
|
COMO un registro \`profile\` para el estado actual actualizado. Vea el few-shot de migración
|
|
10060
10037
|
en la sección de ejemplos para la forma de salida de dos memorias requerida.`;
|
|
10061
|
-
|
|
10062
|
-
//#region src/engine/i18n/res/es/extraction-prompts.ts
|
|
10038
|
+
// src/engine/i18n/res/es/extraction-prompts.ts
|
|
10063
10039
|
/** @file extraction-prompts.ts
|
|
10064
10040
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
10065
10041
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -10260,8 +10236,7 @@ Return JSON format:
|
|
|
10260
10236
|
"reason": "Decision reason"
|
|
10261
10237
|
}`;
|
|
10262
10238
|
}
|
|
10263
|
-
|
|
10264
|
-
//#region src/engine/i18n/res/es/reflection-prompts.ts
|
|
10239
|
+
// src/engine/i18n/res/es/reflection-prompts.ts
|
|
10265
10240
|
const REFLECTION_FALLBACK_MARKER$6 = "(fallback) Falló la generación de la reflexión; solo se almacena un puntero mínimo.";
|
|
10266
10241
|
function buildReflectionPrompt$6(conversation, maxInputChars, toolErrorSignals = []) {
|
|
10267
10242
|
const promptInput = conversation;
|
|
@@ -10420,8 +10395,7 @@ const resources$6 = defineLocaleResources({
|
|
|
10420
10395
|
derivedLegacySignals: [/\b(aprendimos|observado|reflexión|reflexion|derivado|delta|verificar|cambio)\b/i]
|
|
10421
10396
|
}
|
|
10422
10397
|
});
|
|
10423
|
-
|
|
10424
|
-
//#region src/engine/i18n/res/fr/extraction-prompt-boundary.ts
|
|
10398
|
+
// src/engine/i18n/res/fr/extraction-prompt-boundary.ts
|
|
10425
10399
|
/** @file extraction-prompt-boundary.ts
|
|
10426
10400
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
10427
10401
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -10666,8 +10640,7 @@ legacy category event <- reject
|
|
|
10666
10640
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
10667
10641
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
10668
10642
|
\`\`\``;
|
|
10669
|
-
|
|
10670
|
-
//#region src/engine/i18n/res/fr/extraction-prompt-rules.ts
|
|
10643
|
+
// src/engine/i18n/res/fr/extraction-prompt-rules.ts
|
|
10671
10644
|
/** @file extraction-prompt-rules.ts
|
|
10672
10645
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
10673
10646
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -10753,8 +10726,7 @@ Quand l'utilisateur dit "migrated from X to Y" / "switched from X to Y" / "sold
|
|
|
10753
10726
|
got Y" : émettez À LA FOIS un enregistrement \`episodic\` daté pour le changement ET un
|
|
10754
10727
|
enregistrement \`profile\` pour l'état courant mis à jour. Voir le few-shot de migration
|
|
10755
10728
|
pour la forme de sortie à deux memories requise.`;
|
|
10756
|
-
|
|
10757
|
-
//#region src/engine/i18n/res/fr/extraction-prompts.ts
|
|
10729
|
+
// src/engine/i18n/res/fr/extraction-prompts.ts
|
|
10758
10730
|
/** @file extraction-prompts.ts
|
|
10759
10731
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
10760
10732
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -10955,8 +10927,7 @@ Return JSON format:
|
|
|
10955
10927
|
"reason": "Decision reason"
|
|
10956
10928
|
}`;
|
|
10957
10929
|
}
|
|
10958
|
-
|
|
10959
|
-
//#region src/engine/i18n/res/fr/reflection-prompts.ts
|
|
10930
|
+
// src/engine/i18n/res/fr/reflection-prompts.ts
|
|
10960
10931
|
const REFLECTION_FALLBACK_MARKER$5 = "(fallback) Échec de la génération de la réflexion ; seul un pointeur minimal est stocké.";
|
|
10961
10932
|
function buildReflectionPrompt$5(conversation, maxInputChars, toolErrorSignals = []) {
|
|
10962
10933
|
const promptInput = conversation;
|
|
@@ -11112,8 +11083,7 @@ const resources$5 = defineLocaleResources({
|
|
|
11112
11083
|
derivedLegacySignals: [/\b(appris|observé|observe|réflexion|reflexion|dérivé|delta|vérifier|changement)\b/i]
|
|
11113
11084
|
}
|
|
11114
11085
|
});
|
|
11115
|
-
|
|
11116
|
-
//#region src/engine/i18n/res/ja/extraction-prompt-boundary.ts
|
|
11086
|
+
// src/engine/i18n/res/ja/extraction-prompt-boundary.ts
|
|
11117
11087
|
/** @file extraction-prompt-boundary.ts
|
|
11118
11088
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
11119
11089
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -11356,8 +11326,7 @@ legacy category event <- reject
|
|
|
11356
11326
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
11357
11327
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
11358
11328
|
\`\`\``;
|
|
11359
|
-
|
|
11360
|
-
//#region src/engine/i18n/res/ja/extraction-prompt-rules.ts
|
|
11329
|
+
// src/engine/i18n/res/ja/extraction-prompt-rules.ts
|
|
11361
11330
|
/** @file extraction-prompt-rules.ts
|
|
11362
11331
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
11363
11332
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -11443,8 +11412,7 @@ SAME per-role entity の中に保持してください("Employment dates" を
|
|
|
11443
11412
|
と述べる場合:変更を記録する日付付きの \`episodic\` memory と、更新後の現在状態を
|
|
11444
11413
|
記録する \`profile\` memory の両方を生成してください。必要な 2 memory の
|
|
11445
11414
|
出力形式は examples ファイルの migration few-shot を参照。`;
|
|
11446
|
-
|
|
11447
|
-
//#region src/engine/i18n/res/ja/extraction-prompts.ts
|
|
11415
|
+
// src/engine/i18n/res/ja/extraction-prompts.ts
|
|
11448
11416
|
/** @file extraction-prompts.ts
|
|
11449
11417
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
11450
11418
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -11645,8 +11613,7 @@ Return JSON format:
|
|
|
11645
11613
|
"reason": "Decision reason"
|
|
11646
11614
|
}`;
|
|
11647
11615
|
}
|
|
11648
|
-
|
|
11649
|
-
//#region src/engine/i18n/res/ja/reflection-prompts.ts
|
|
11616
|
+
// src/engine/i18n/res/ja/reflection-prompts.ts
|
|
11650
11617
|
const REFLECTION_FALLBACK_MARKER$4 = "(fallback) リフレクション生成に失敗。最小ポインタのみを保存。";
|
|
11651
11618
|
function buildReflectionPrompt$4(conversation, maxInputChars, toolErrorSignals = []) {
|
|
11652
11619
|
const promptInput = conversation;
|
|
@@ -11797,8 +11764,7 @@ const resources$4 = defineLocaleResources({
|
|
|
11797
11764
|
derivedLegacySignals: [/学び|観察|振り返り|反省|派生|差分|確認|変更/]
|
|
11798
11765
|
}
|
|
11799
11766
|
});
|
|
11800
|
-
|
|
11801
|
-
//#region src/engine/i18n/res/ko/extraction-prompt-boundary.ts
|
|
11767
|
+
// src/engine/i18n/res/ko/extraction-prompt-boundary.ts
|
|
11802
11768
|
/** @file extraction-prompt-boundary.ts
|
|
11803
11769
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
11804
11770
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12039,8 +12005,7 @@ legacy category event <- reject
|
|
|
12039
12005
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
12040
12006
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
12041
12007
|
\`\`\``;
|
|
12042
|
-
|
|
12043
|
-
//#region src/engine/i18n/res/ko/extraction-prompt-rules.ts
|
|
12008
|
+
// src/engine/i18n/res/ko/extraction-prompt-rules.ts
|
|
12044
12009
|
/** @file extraction-prompt-rules.ts
|
|
12045
12010
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
12046
12011
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12123,8 +12088,7 @@ memory 로 만드십시오 ("Employment dates" 를 별도 memory 로 분기시
|
|
|
12123
12088
|
라고 말할 때: 변경을 기록하는 날짜가 있는 \`episodic\` memory AND 업데이트된 현재
|
|
12124
12089
|
상태를 기록하는 \`profile\` memory 를 모두 출력하십시오. 필수 두-memory 출력 형태는
|
|
12125
12090
|
예제 섹션의 migration few-shot 을 참조하십시오.`;
|
|
12126
|
-
|
|
12127
|
-
//#region src/engine/i18n/res/ko/extraction-prompts.ts
|
|
12091
|
+
// src/engine/i18n/res/ko/extraction-prompts.ts
|
|
12128
12092
|
/** @file extraction-prompts.ts
|
|
12129
12093
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
12130
12094
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -12325,8 +12289,7 @@ Return JSON format:
|
|
|
12325
12289
|
"reason": "Decision reason"
|
|
12326
12290
|
}`;
|
|
12327
12291
|
}
|
|
12328
|
-
|
|
12329
|
-
//#region src/engine/i18n/res/ko/reflection-prompts.ts
|
|
12292
|
+
// src/engine/i18n/res/ko/reflection-prompts.ts
|
|
12330
12293
|
const REFLECTION_FALLBACK_MARKER$3 = "(fallback) 리플렉션 생성 실패; 최소 포인터만 저장.";
|
|
12331
12294
|
function buildReflectionPrompt$3(conversation, maxInputChars, toolErrorSignals = []) {
|
|
12332
12295
|
const promptInput = conversation;
|
|
@@ -12532,8 +12495,7 @@ const resources$3 = defineLocaleResources({
|
|
|
12532
12495
|
derivedLegacySignals: [/배움|관찰|회고|반성|파생|변경|확인/]
|
|
12533
12496
|
}
|
|
12534
12497
|
});
|
|
12535
|
-
|
|
12536
|
-
//#region src/engine/i18n/res/ru/extraction-prompt-boundary.ts
|
|
12498
|
+
// src/engine/i18n/res/ru/extraction-prompt-boundary.ts
|
|
12537
12499
|
/** @file extraction-prompt-boundary.ts
|
|
12538
12500
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
12539
12501
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12778,8 +12740,7 @@ legacy category event <- reject
|
|
|
12778
12740
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
12779
12741
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
12780
12742
|
\`\`\``;
|
|
12781
|
-
|
|
12782
|
-
//#region src/engine/i18n/res/ru/extraction-prompt-rules.ts
|
|
12743
|
+
// src/engine/i18n/res/ru/extraction-prompt-rules.ts
|
|
12783
12744
|
/** @file extraction-prompt-rules.ts
|
|
12784
12745
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
12785
12746
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -12866,8 +12827,7 @@ duration И любыми датами начала, удержанными вн
|
|
|
12866
12827
|
"sold X, got Y": выпускайте ОБА — датированную запись \`episodic\` об изменении
|
|
12867
12828
|
И запись \`profile\` для обновлённого текущего состояния. См. migration few-shot
|
|
12868
12829
|
в секции примеров для требуемой формы вывода из двух memory.`;
|
|
12869
|
-
|
|
12870
|
-
//#region src/engine/i18n/res/ru/extraction-prompts.ts
|
|
12830
|
+
// src/engine/i18n/res/ru/extraction-prompts.ts
|
|
12871
12831
|
/** @file extraction-prompts.ts
|
|
12872
12832
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
12873
12833
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -13068,8 +13028,7 @@ Return JSON format:
|
|
|
13068
13028
|
"reason": "Decision reason"
|
|
13069
13029
|
}`;
|
|
13070
13030
|
}
|
|
13071
|
-
|
|
13072
|
-
//#region src/engine/i18n/res/ru/reflection-prompts.ts
|
|
13031
|
+
// src/engine/i18n/res/ru/reflection-prompts.ts
|
|
13073
13032
|
const REFLECTION_FALLBACK_MARKER$2 = "(fallback) Сбой генерации рефлексии; сохранён только минимальный указатель.";
|
|
13074
13033
|
function buildReflectionPrompt$2(conversation, maxInputChars, toolErrorSignals = []) {
|
|
13075
13034
|
const promptInput = conversation;
|
|
@@ -13224,8 +13183,7 @@ const resources$2 = defineLocaleResources({
|
|
|
13224
13183
|
derivedLegacySignals: [/(?:^|[^\p{L}\p{N}_])(узнали|наблюдали|рефлексия|вывод|дельта|проверить|изменение)(?=$|[^\p{L}\p{N}_])/iu]
|
|
13225
13184
|
}
|
|
13226
13185
|
});
|
|
13227
|
-
|
|
13228
|
-
//#region src/engine/i18n/res/zh/extraction-prompt-boundary.ts
|
|
13186
|
+
// src/engine/i18n/res/zh/extraction-prompt-boundary.ts
|
|
13229
13187
|
/** @file extraction-prompt-boundary.ts
|
|
13230
13188
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
13231
13189
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -13466,8 +13424,7 @@ legacy category event <- reject
|
|
|
13466
13424
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
13467
13425
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
13468
13426
|
\`\`\``;
|
|
13469
|
-
|
|
13470
|
-
//#region src/engine/i18n/res/zh/extraction-prompt-rules.ts
|
|
13427
|
+
// src/engine/i18n/res/zh/extraction-prompt-rules.ts
|
|
13471
13428
|
/** @file extraction-prompt-rules.ts
|
|
13472
13429
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
13473
13430
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -13537,8 +13494,7 @@ const GRANULARITY_RULE$1 = `# GRANULARITY — 一条 memory 一个话题槽位
|
|
|
13537
13494
|
事实同理:工作经历按 role 是一个话题。"3 years at DeepMind" 与 "4 years at Google" 是不同话题,尽管都描述既往就业。把它们建为各自的 entity memory,并把任何开始日期保留在同一条 per-role entity 里(不要把 "Employment dates" 分叉成独立 memory —— 应答模型可能会加总日期而非使用陈述的年限)。
|
|
13538
13495
|
|
|
13539
13496
|
当用户说 "migrated from X to Y" / "switched from X to Y" / "sold X, got Y":同时输出一条记录变更且带日期的 \`episodic\` memory,和一条记录更新后当前状态的 \`profile\` memory。要求的两条 memory 输出形态见示例文件中的 migration few-shot。`;
|
|
13540
|
-
|
|
13541
|
-
//#region src/engine/i18n/res/zh/extraction-prompts.ts
|
|
13497
|
+
// src/engine/i18n/res/zh/extraction-prompts.ts
|
|
13542
13498
|
/** @file extraction-prompts.ts
|
|
13543
13499
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
13544
13500
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -13739,8 +13695,7 @@ Return JSON format:
|
|
|
13739
13695
|
"reason": "Decision reason"
|
|
13740
13696
|
}`;
|
|
13741
13697
|
}
|
|
13742
|
-
|
|
13743
|
-
//#region src/engine/i18n/res/zh/reflection-prompts.ts
|
|
13698
|
+
// src/engine/i18n/res/zh/reflection-prompts.ts
|
|
13744
13699
|
const REFLECTION_FALLBACK_MARKER$1 = "(fallback) 反思生成失败,仅存储最小占位记录。";
|
|
13745
13700
|
function buildReflectionPrompt$1(conversation, maxInputChars, toolErrorSignals = []) {
|
|
13746
13701
|
const promptInput = conversation;
|
|
@@ -13902,8 +13857,7 @@ const resources$1 = defineLocaleResources({
|
|
|
13902
13857
|
derivedLegacySignals: [/学到|观察|反思|派生|变化|验证|复查/]
|
|
13903
13858
|
}
|
|
13904
13859
|
});
|
|
13905
|
-
|
|
13906
|
-
//#region src/engine/i18n/res/zh-Hant/extraction-prompt-boundary.ts
|
|
13860
|
+
// src/engine/i18n/res/zh-Hant/extraction-prompt-boundary.ts
|
|
13907
13861
|
/** @file extraction-prompt-boundary.ts
|
|
13908
13862
|
* @purpose Provides locale-specific prompt fence and temporal boundary helpers.
|
|
13909
13863
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -14144,8 +14098,7 @@ legacy category event <- reject
|
|
|
14144
14098
|
"abstract": "User's son attends preschool: [Preschool Name]" <- placeholder, destroys recall
|
|
14145
14099
|
"abstract": "User's team members and their locations" <- collapsed concrete names
|
|
14146
14100
|
\`\`\``;
|
|
14147
|
-
|
|
14148
|
-
//#region src/engine/i18n/res/zh-Hant/extraction-prompt-rules.ts
|
|
14101
|
+
// src/engine/i18n/res/zh-Hant/extraction-prompt-rules.ts
|
|
14149
14102
|
/** @file extraction-prompt-rules.ts
|
|
14150
14103
|
* @purpose Holds locale-specific extraction rule text blocks.
|
|
14151
14104
|
* @boundary LLM prompt assembly internals for this locale.
|
|
@@ -14222,8 +14175,7 @@ entity memory,並把陳述的年限與任何開始日期保留在同一條 per
|
|
|
14222
14175
|
got Y":同時輸出一條記錄變更且帶日期的 \`episodic\` memory,和一條記錄更新後
|
|
14223
14176
|
當前狀態的 \`profile\` memory。要求的兩條 memory 輸出形態請見 examples
|
|
14224
14177
|
檔中的 migration few-shot。`;
|
|
14225
|
-
|
|
14226
|
-
//#region src/engine/i18n/res/zh-Hant/extraction-prompts.ts
|
|
14178
|
+
// src/engine/i18n/res/zh-Hant/extraction-prompts.ts
|
|
14227
14179
|
/** @file extraction-prompts.ts
|
|
14228
14180
|
* @purpose Builds prompt text for structured memory extraction from conversation context.
|
|
14229
14181
|
* @boundary Capture policy, JSON contracts, and LLM model behavior.
|
|
@@ -14424,8 +14376,7 @@ Return JSON format:
|
|
|
14424
14376
|
"reason": "Decision reason"
|
|
14425
14377
|
}`;
|
|
14426
14378
|
}
|
|
14427
|
-
|
|
14428
|
-
//#region src/engine/i18n/res/zh-Hant/reflection-prompts.ts
|
|
14379
|
+
// src/engine/i18n/res/zh-Hant/reflection-prompts.ts
|
|
14429
14380
|
const REFLECTION_FALLBACK_MARKER = "(fallback) 反思生成失敗,僅儲存最小佔位記錄。";
|
|
14430
14381
|
function buildReflectionPrompt(conversation, maxInputChars, toolErrorSignals = []) {
|
|
14431
14382
|
const promptInput = conversation;
|
|
@@ -14587,8 +14538,7 @@ const resources = defineLocaleResources({
|
|
|
14587
14538
|
derivedLegacySignals: [/學到|觀察|反思|派生|變化|驗證|複查/]
|
|
14588
14539
|
}
|
|
14589
14540
|
});
|
|
14590
|
-
|
|
14591
|
-
//#region src/engine/i18n/all-resources.ts
|
|
14541
|
+
// src/engine/i18n/all-resources.ts
|
|
14592
14542
|
/**
|
|
14593
14543
|
* Static union of every supported-locale's resource bundle.
|
|
14594
14544
|
*
|
|
@@ -14622,8 +14572,7 @@ const RESOURCES_BY_LOCALE = {
|
|
|
14622
14572
|
ko: resources$3,
|
|
14623
14573
|
ru: resources$2
|
|
14624
14574
|
};
|
|
14625
|
-
|
|
14626
|
-
//#region src/engine/retrieval/relevant-memories-context.ts
|
|
14575
|
+
// src/engine/retrieval/relevant-memories-context.ts
|
|
14627
14576
|
/** @file relevant-memories-context.ts
|
|
14628
14577
|
* @purpose Formats retrieved memories into model-visible context with clear boundaries.
|
|
14629
14578
|
* @boundary Retriever results, prompt-injection safety, and recall presentation.
|
|
@@ -14635,8 +14584,7 @@ const RELEVANT_MEMORIES_OPEN_TAG = "<relevant-memories>";
|
|
|
14635
14584
|
const RELEVANT_MEMORIES_CLOSE_TAG = "</relevant-memories>";
|
|
14636
14585
|
const RELEVANT_MEMORIES_PREAMBLE_LINES = [RELEVANT_MEMORIES_UNTRUSTED_LINE, RELEVANT_MEMORIES_INSTRUCTION_LINE];
|
|
14637
14586
|
new RegExp(`^\\s*memory\\s+\\d+:\\s*\\{`, "i");
|
|
14638
|
-
|
|
14639
|
-
//#region src/engine/extraction/runtime-wrapper-sanitizer.ts
|
|
14587
|
+
// src/engine/extraction/runtime-wrapper-sanitizer.ts
|
|
14640
14588
|
/** @file runtime-wrapper-sanitizer.ts
|
|
14641
14589
|
* @purpose Single source of truth for stripping `[Subagent Context|Task]` wrappers
|
|
14642
14590
|
* and the boilerplate that follows them from the lead-in of captured text.
|
|
@@ -14708,8 +14656,7 @@ function stripLeadingRuntimeWrappers(text) {
|
|
|
14708
14656
|
}
|
|
14709
14657
|
return cleanedLines.join("\n").trim();
|
|
14710
14658
|
}
|
|
14711
|
-
|
|
14712
|
-
//#region src/engine/extraction/ambient-learning-text-normalizer.ts
|
|
14659
|
+
// src/engine/extraction/ambient-learning-text-normalizer.ts
|
|
14713
14660
|
/** @file ambient-learning-text-normalizer.ts
|
|
14714
14661
|
* @purpose Normalizes Ambient Learning conversation text before extraction and storage.
|
|
14715
14662
|
* @boundary Capture filters, prompt-injection boundaries, and Insight Distill input quality.
|
|
@@ -14803,8 +14750,7 @@ function normalizeAmbientLearningText(role, text, shouldSkipMessage) {
|
|
|
14803
14750
|
if (shouldSkipMessage?.(role, normalized)) return null;
|
|
14804
14751
|
return normalized;
|
|
14805
14752
|
}
|
|
14806
|
-
|
|
14807
|
-
//#region src/engine/extraction/extraction-text-sanitizer.ts
|
|
14753
|
+
// src/engine/extraction/extraction-text-sanitizer.ts
|
|
14808
14754
|
/** @file extraction-text-sanitizer.ts
|
|
14809
14755
|
* @purpose Normalize runtime payload text before it reaches memory extraction.
|
|
14810
14756
|
* @boundary Removes channel/runtime envelope metadata only; does not classify or persist memories.
|
|
@@ -14911,8 +14857,7 @@ function stripEnvelopeMetadata(text) {
|
|
|
14911
14857
|
content: cleaned
|
|
14912
14858
|
}).projections.plainText;
|
|
14913
14859
|
}
|
|
14914
|
-
|
|
14915
|
-
//#region src/engine/extraction/date-resolution.ts
|
|
14860
|
+
// src/engine/extraction/date-resolution.ts
|
|
14916
14861
|
/** Model-only time interpretation followed by deterministic calendar arithmetic. */
|
|
14917
14862
|
const log$17 = createLogger("sno-station-mem:date-resolution");
|
|
14918
14863
|
/** No model means no semantic decision. Preserve the text rather than interpreting it. */
|
|
@@ -15024,8 +14969,7 @@ async function resolveMemoryDate(input) {
|
|
|
15024
14969
|
stage
|
|
15025
14970
|
};
|
|
15026
14971
|
}
|
|
15027
|
-
|
|
15028
|
-
//#region src/engine/extraction/memory-temporality-classifier.ts
|
|
14972
|
+
// src/engine/extraction/memory-temporality-classifier.ts
|
|
15029
14973
|
function parseSessionTimestamp(sessionDateTime) {
|
|
15030
14974
|
return parseIsoDateTimeMs(sessionDateTime);
|
|
15031
14975
|
}
|
|
@@ -15055,8 +14999,7 @@ function serializeIntervalMetadata(category, interval) {
|
|
|
15055
14999
|
return base;
|
|
15056
15000
|
}
|
|
15057
15001
|
createLogger("sno-station-mem:scopes");
|
|
15058
|
-
|
|
15059
|
-
//#region src/store/memory-source-order.ts
|
|
15002
|
+
// src/store/memory-source-order.ts
|
|
15060
15003
|
function compareNumber(left, right) {
|
|
15061
15004
|
if (left === right) return 0;
|
|
15062
15005
|
return left < right ? -1 : 1;
|
|
@@ -15188,8 +15131,7 @@ function closeMemoryRow(database, input) {
|
|
|
15188
15131
|
}), validUntil, input.targetRowId);
|
|
15189
15132
|
return true;
|
|
15190
15133
|
}
|
|
15191
|
-
|
|
15192
|
-
//#region src/engine/rem/adapter-a-conflict-adjudicator.ts
|
|
15134
|
+
// src/engine/rem/adapter-a-conflict-adjudicator.ts
|
|
15193
15135
|
/** @file adapter-a-conflict-adjudicator.ts
|
|
15194
15136
|
* @purpose Renders and parses a fail-safe conflict verdict for an ordered memory pair.
|
|
15195
15137
|
* @boundary Accepts package-level memory views only; callers adapt their storage records.
|
|
@@ -15335,8 +15277,7 @@ function extractJsonFromResponse(text) {
|
|
|
15335
15277
|
if (lastBrace === -1) return null;
|
|
15336
15278
|
return text.substring(firstBrace, lastBrace + 1);
|
|
15337
15279
|
}
|
|
15338
|
-
|
|
15339
|
-
//#region src/engine/rem/classifier.ts
|
|
15280
|
+
// src/engine/rem/classifier.ts
|
|
15340
15281
|
const REM_TRANSITION_GRAMMAR_SHA256 = "8fd5439ec2b85ca27bfa462600869973f991a6f44f956c734596ee9c9d44153d";
|
|
15341
15282
|
const REM_ADDITIONAL_TRANSITION_PATTERN_SHA256 = "cb42c6a25ccd51b16da6a3de7d931f1165af284a89cdc365860bd359ae84bd9f";
|
|
15342
15283
|
const REM_CURRENT_PROGRESSIVE_PATTERN_SHA256 = "ddc1c0119c1f9c4e5178dc0e6eec9ca8a7594ed10e2dd8305646f5363e9d24ad";
|
|
@@ -15418,8 +15359,7 @@ function assertPatternPin(pattern, declaredSha256, expectedSha256, name) {
|
|
|
15418
15359
|
if (observedSha256 !== declaredSha256) throw new Error(`${name} digest mismatch: declared ${declaredSha256}, observed ${observedSha256}`);
|
|
15419
15360
|
if (observedSha256 !== expectedSha256) throw new Error(`${name} is not pinned: expected ${expectedSha256}, observed ${observedSha256}`);
|
|
15420
15361
|
}
|
|
15421
|
-
|
|
15422
|
-
//#region src/engine/rem/operational-config.ts
|
|
15362
|
+
// src/engine/rem/operational-config.ts
|
|
15423
15363
|
const sha256Schema$1 = z.string().regex(/^[0-9a-f]{64}$/u);
|
|
15424
15364
|
const positiveSafeInteger = z.number().int().safe().positive("value must be positive and non-zero");
|
|
15425
15365
|
const nullablePercentage = z.number().min(0).max(1).nullable();
|
|
@@ -15478,8 +15418,7 @@ function canonicalJson$2(value) {
|
|
|
15478
15418
|
const record = value;
|
|
15479
15419
|
return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$2(record[key])}`).join(",")}}`;
|
|
15480
15420
|
}
|
|
15481
|
-
|
|
15482
|
-
//#region src/engine/rem/census.ts
|
|
15421
|
+
// src/engine/rem/census.ts
|
|
15483
15422
|
function sha256$2(value) {
|
|
15484
15423
|
return createHash("sha256").update(value).digest("hex");
|
|
15485
15424
|
}
|
|
@@ -15491,8 +15430,7 @@ function deriveRemWriteIdentity(input) {
|
|
|
15491
15430
|
input.timestamp
|
|
15492
15431
|
]));
|
|
15493
15432
|
}
|
|
15494
|
-
|
|
15495
|
-
//#region src/engine/rem/clause-splitter.ts
|
|
15433
|
+
// src/engine/rem/clause-splitter.ts
|
|
15496
15434
|
/**
|
|
15497
15435
|
* Produces the fixed, lossless clause list used by REM judgments. The text itself
|
|
15498
15436
|
* remains the authority: clause values are exact source slices and separators are retained.
|
|
@@ -15521,8 +15459,7 @@ function splitExactClauses(text) {
|
|
|
15521
15459
|
if (clauses.map((clause) => `${clause.value}${clause.separatorAfter}`).join("") !== text) throw new Error("REM clause splitter must preserve source bytes");
|
|
15522
15460
|
return clauses;
|
|
15523
15461
|
}
|
|
15524
|
-
|
|
15525
|
-
//#region src/engine/rem/update-locale-resources.ts
|
|
15462
|
+
// src/engine/rem/update-locale-resources.ts
|
|
15526
15463
|
const REM_UPDATE_LOCALES = [
|
|
15527
15464
|
"en",
|
|
15528
15465
|
"de",
|
|
@@ -15602,8 +15539,7 @@ const REM_UPDATE_LOCALE_RESOURCES = {
|
|
|
15602
15539
|
function getRemUpdateLocaleResource(locale) {
|
|
15603
15540
|
return REM_UPDATE_LOCALE_RESOURCES[locale];
|
|
15604
15541
|
}
|
|
15605
|
-
|
|
15606
|
-
//#region src/engine/rem/update-rewrite.ts
|
|
15542
|
+
// src/engine/rem/update-rewrite.ts
|
|
15607
15543
|
function composeRemNegatedCurrent(input) {
|
|
15608
15544
|
const generatedRowId = `rem-negated-${createHash("sha256").update(`${input.topic}\u0000${input.retractionText}`).digest("hex").slice(0, 24)}`;
|
|
15609
15545
|
return {
|
|
@@ -15631,8 +15567,7 @@ function extractListMemberSpans(source) {
|
|
|
15631
15567
|
}];
|
|
15632
15568
|
});
|
|
15633
15569
|
}
|
|
15634
|
-
|
|
15635
|
-
//#region src/engine/rem/types.ts
|
|
15570
|
+
// src/engine/rem/types.ts
|
|
15636
15571
|
const REM_OPERATION_TYPES = [
|
|
15637
15572
|
"rem-update",
|
|
15638
15573
|
"rem-replace",
|
|
@@ -15658,8 +15593,7 @@ function assertJobIdentity(jobId, jobType) {
|
|
|
15658
15593
|
if (typeof jobId !== "string" || jobId.trim().length === 0) throw new Error(`REM write requires a non-blank job id, got: ${String(jobId)}`);
|
|
15659
15594
|
if (typeof jobType !== "string" || parseRemOperationType(jobType) === void 0) throw new Error(`REM write requires a known job type, got: ${String(jobType)}`);
|
|
15660
15595
|
}
|
|
15661
|
-
|
|
15662
|
-
//#region src/engine/rem/enable-gate.ts
|
|
15596
|
+
// src/engine/rem/enable-gate.ts
|
|
15663
15597
|
const SHA256_PATTERN = /^[0-9a-f]{64}$/;
|
|
15664
15598
|
z.object({
|
|
15665
15599
|
schema_version: z.number().int(),
|
|
@@ -15671,8 +15605,7 @@ z.object({
|
|
|
15671
15605
|
evaluated_at: z.string().datetime(),
|
|
15672
15606
|
expires_at: z.string().datetime()
|
|
15673
15607
|
}).strict();
|
|
15674
|
-
|
|
15675
|
-
//#region src/engine/rem/entry-governance.ts
|
|
15608
|
+
// src/engine/rem/entry-governance.ts
|
|
15676
15609
|
async function recordNonRefusePairDecision(input) {
|
|
15677
15610
|
if (input.decision === "allow" || input.throughRefusePair) return;
|
|
15678
15611
|
if (input.reason === null || input.reason.trim().length === 0) throw new Error("A refused pair decision requires a reason");
|
|
@@ -15711,8 +15644,7 @@ function validateRemSubstantiveWaveEffects(input) {
|
|
|
15711
15644
|
reasonCode: null
|
|
15712
15645
|
};
|
|
15713
15646
|
}
|
|
15714
|
-
|
|
15715
|
-
//#region src/engine/rem/row-hash.ts
|
|
15647
|
+
// src/engine/rem/row-hash.ts
|
|
15716
15648
|
/**
|
|
15717
15649
|
* The one definition of a REM whole-row hash.
|
|
15718
15650
|
*
|
|
@@ -15750,8 +15682,7 @@ function hashRemMemoryRow(row) {
|
|
|
15750
15682
|
for (const field of REM_ROW_HASH_FIELDS) projected[field] = row[field] ?? null;
|
|
15751
15683
|
return createHash("sha256").update(JSON.stringify(projected)).digest("hex");
|
|
15752
15684
|
}
|
|
15753
|
-
|
|
15754
|
-
//#region src/engine/rem/facet-persistence.ts
|
|
15685
|
+
// src/engine/rem/facet-persistence.ts
|
|
15755
15686
|
async function writeRemTwoFacetTransaction(input) {
|
|
15756
15687
|
const timestamp = input.timestamp ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
15757
15688
|
const updatedAtMs = Date.parse(timestamp);
|
|
@@ -15811,8 +15742,7 @@ async function writeRemTwoFacetTransaction(input) {
|
|
|
15811
15742
|
};
|
|
15812
15743
|
}).immediate();
|
|
15813
15744
|
}
|
|
15814
|
-
|
|
15815
|
-
//#region src/engine/rem/repository.ts
|
|
15745
|
+
// src/engine/rem/repository.ts
|
|
15816
15746
|
const bootIdPath = "/proc/sys/kernel/random/boot_id";
|
|
15817
15747
|
function createRemRepository(database) {
|
|
15818
15748
|
return {
|
|
@@ -16411,8 +16341,7 @@ function parseBudgetReservation(value) {
|
|
|
16411
16341
|
};
|
|
16412
16342
|
throw new Error("budget transaction returned an invalid result");
|
|
16413
16343
|
}
|
|
16414
|
-
|
|
16415
|
-
//#region src/engine/rem/replace-clause-verdict.ts
|
|
16344
|
+
// src/engine/rem/replace-clause-verdict.ts
|
|
16416
16345
|
function buildReplaceEligibleClauses(older, newer) {
|
|
16417
16346
|
return [...splitExactClauses(older).map((clause) => ({
|
|
16418
16347
|
origin: "older",
|
|
@@ -16474,8 +16403,7 @@ function isRecord(value) {
|
|
|
16474
16403
|
function hasOnlyKeys(value, expected) {
|
|
16475
16404
|
return Object.keys(value).length === expected.length && expected.every((key) => key in value);
|
|
16476
16405
|
}
|
|
16477
|
-
|
|
16478
|
-
//#region src/engine/rem/replace-coverage.ts
|
|
16406
|
+
// src/engine/rem/replace-coverage.ts
|
|
16479
16407
|
const replaceCoverageSchema = z.object({ atoms: z.array(z.object({
|
|
16480
16408
|
clause_index: z.number().int().nonnegative(),
|
|
16481
16409
|
class: z.enum([
|
|
@@ -16583,8 +16511,7 @@ async function decideEventFacts(carrier, atoms, observations, uncertifiedClauses
|
|
|
16583
16511
|
...uncertifiedClauses.length === 0 ? {} : { uncertifiedClauses: [...uncertifiedClauses] }
|
|
16584
16512
|
};
|
|
16585
16513
|
}
|
|
16586
|
-
|
|
16587
|
-
//#region src/engine/rem/rem-update-judgment.ts
|
|
16514
|
+
// src/engine/rem/rem-update-judgment.ts
|
|
16588
16515
|
const judgmentSchema$1 = z.object({
|
|
16589
16516
|
proposed_current: z.string(),
|
|
16590
16517
|
retired_values: z.array(z.string())
|
|
@@ -16824,8 +16751,7 @@ function parseJudgment$1(reply) {
|
|
|
16824
16751
|
retiredValues: parsed.data.retired_values
|
|
16825
16752
|
};
|
|
16826
16753
|
}
|
|
16827
|
-
|
|
16828
|
-
//#region src/engine/rem/runner.ts
|
|
16754
|
+
// src/engine/rem/runner.ts
|
|
16829
16755
|
async function runRemStages(input) {
|
|
16830
16756
|
const results = {};
|
|
16831
16757
|
for (const stage of input.stages) {
|
|
@@ -16874,8 +16800,7 @@ function journal$1(stage, outcome) {
|
|
|
16874
16800
|
actionsApplied: 0
|
|
16875
16801
|
};
|
|
16876
16802
|
}
|
|
16877
|
-
|
|
16878
|
-
//#region src/engine/rem/schema.ts
|
|
16803
|
+
// src/engine/rem/schema.ts
|
|
16879
16804
|
const REM_SCHEMA_SQL = `
|
|
16880
16805
|
CREATE TABLE IF NOT EXISTS nodix_rem_relation_ledger (
|
|
16881
16806
|
row_id TEXT PRIMARY KEY,
|
|
@@ -17178,8 +17103,7 @@ function ensureHolderBootIdColumn(database, tableName) {
|
|
|
17178
17103
|
if (database.prepare(`PRAGMA table_info(${tableName})`).all().some((column) => column.name === "holder_boot_id")) return;
|
|
17179
17104
|
database.exec(`ALTER TABLE ${tableName} ADD COLUMN holder_boot_id TEXT`);
|
|
17180
17105
|
}
|
|
17181
|
-
|
|
17182
|
-
//#region src/engine/shared/ambient-capture-hash.ts
|
|
17106
|
+
// src/engine/shared/ambient-capture-hash.ts
|
|
17183
17107
|
function normalizeAmbientCaptureHashMetadata(metadata) {
|
|
17184
17108
|
return {
|
|
17185
17109
|
source: metadata.source,
|
|
@@ -17217,8 +17141,7 @@ function readAmbientCaptureHashMetadata(metadata) {
|
|
|
17217
17141
|
content_type: metadata.content_type
|
|
17218
17142
|
};
|
|
17219
17143
|
}
|
|
17220
|
-
|
|
17221
|
-
//#region src/store/entity-name-key-migration.ts
|
|
17144
|
+
// src/store/entity-name-key-migration.ts
|
|
17222
17145
|
/** @file entity-name-key-migration.ts
|
|
17223
17146
|
* @purpose Re-keys entity names so several names can identify one entity.
|
|
17224
17147
|
* @boundary Idempotent SQLite table rebuild only; no identity judgment.
|
|
@@ -17277,8 +17200,7 @@ function applyEntityNameKeyMigration(database) {
|
|
|
17277
17200
|
database.exec("PRAGMA foreign_keys = ON");
|
|
17278
17201
|
}
|
|
17279
17202
|
}
|
|
17280
|
-
|
|
17281
|
-
//#region src/store/schema.ts
|
|
17203
|
+
// src/store/schema.ts
|
|
17282
17204
|
/** @file schema.ts
|
|
17283
17205
|
* @purpose Defines SQLite tables, indexes, and typed schema contracts for plugin storage.
|
|
17284
17206
|
* @boundary Drizzle schema, migrations, and store query assumptions.
|
|
@@ -17534,8 +17456,7 @@ const nodixProfileRecoveryEntries = sqliteTable("nodix_profile_recovery_entries"
|
|
|
17534
17456
|
removedValue: text("removed_value").notNull(),
|
|
17535
17457
|
removedAtMs: integer("removed_at_ms").notNull()
|
|
17536
17458
|
});
|
|
17537
|
-
|
|
17538
|
-
//#region src/store/legacy-database-namespace-migration.ts
|
|
17459
|
+
// src/store/legacy-database-namespace-migration.ts
|
|
17539
17460
|
const TABLE_RENAMES = [
|
|
17540
17461
|
{
|
|
17541
17462
|
legacy: FIXED_MEMORY_MEMORIES,
|
|
@@ -18001,8 +17922,7 @@ function readSchemaSql(database, type, name) {
|
|
|
18001
17922
|
function quoteIdentifier(identifier) {
|
|
18002
17923
|
return `"${identifier.replaceAll("\"", "\"\"")}"`;
|
|
18003
17924
|
}
|
|
18004
|
-
|
|
18005
|
-
//#region src/store/simple-tokenizer-path.ts
|
|
17925
|
+
// src/store/simple-tokenizer-path.ts
|
|
18006
17926
|
/** @file simple-tokenizer-path.ts
|
|
18007
17927
|
* @purpose Resolve the bundled `simple-tokenizer` SQLite extension binary +
|
|
18008
17928
|
* jieba dictionary path for the current platform.
|
|
@@ -18058,8 +17978,7 @@ function resolveSimpleTokenizerPath() {
|
|
|
18058
17978
|
}
|
|
18059
17979
|
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.`);
|
|
18060
17980
|
}
|
|
18061
|
-
|
|
18062
|
-
//#region src/store/sqlite-vec-path.ts
|
|
17981
|
+
// src/store/sqlite-vec-path.ts
|
|
18063
17982
|
/** @file sqlite-vec-path.ts
|
|
18064
17983
|
* @purpose Resolves and loads the symbol-isolated sqlite-vec extension shipped with sno-station-mem.
|
|
18065
17984
|
* @boundary Path selection only; Linux x64 and arm64 must use the bundled binary.
|
|
@@ -18083,8 +18002,7 @@ function resolveSqliteVecPath() {
|
|
|
18083
18002
|
function loadSqliteVecExtension(database) {
|
|
18084
18003
|
database.loadExtension(resolveSqliteVecPath());
|
|
18085
18004
|
}
|
|
18086
|
-
|
|
18087
|
-
//#region src/store/unplaced-candidate-migration.ts
|
|
18005
|
+
// src/store/unplaced-candidate-migration.ts
|
|
18088
18006
|
/** @file unplaced-candidate-migration.ts
|
|
18089
18007
|
* @purpose One-time data move: relocate every non-active memory row into
|
|
18090
18008
|
* `nodix_unplaced_memory_candidates`. Runs after the drizzle DDL migration and is
|
|
@@ -18142,8 +18060,7 @@ function migrateUnplacedCandidates(sqlite) {
|
|
|
18142
18060
|
});
|
|
18143
18061
|
return moved;
|
|
18144
18062
|
}
|
|
18145
|
-
|
|
18146
|
-
//#region src/store/connection.ts
|
|
18063
|
+
// src/store/connection.ts
|
|
18147
18064
|
/** @file connection.ts
|
|
18148
18065
|
* @purpose Creates and validates SQLite connections used by the memory store.
|
|
18149
18066
|
* @boundary Filesystem safety, database pragmas, migrations, and runtime loading.
|
|
@@ -18336,8 +18253,7 @@ function ensureColumn(database, tableName, columnName, declaration) {
|
|
|
18336
18253
|
if (database.prepare(`PRAGMA table_info(${tableName})`).all().some(({ name }) => name === columnName)) return;
|
|
18337
18254
|
database.exec(`ALTER TABLE ${tableName} ADD COLUMN ${columnName} ${declaration}`);
|
|
18338
18255
|
}
|
|
18339
|
-
|
|
18340
|
-
//#region src/store/memory-store-shared.ts
|
|
18256
|
+
// src/store/memory-store-shared.ts
|
|
18341
18257
|
/** @file memory-store-shared.ts
|
|
18342
18258
|
* @purpose Implements memory persistence, search, updates, deletion, and statistics.
|
|
18343
18259
|
* @boundary SQLite schema, embedding vectors, FTS, and metadata invariants.
|
|
@@ -18444,8 +18360,7 @@ function withStoreWriteOutcome(entry, outcome) {
|
|
|
18444
18360
|
});
|
|
18445
18361
|
return entry;
|
|
18446
18362
|
}
|
|
18447
|
-
|
|
18448
|
-
//#region src/engine/telemetry/memory-telemetry-config.ts
|
|
18363
|
+
// src/engine/telemetry/memory-telemetry-config.ts
|
|
18449
18364
|
function loadMemoryTelemetryKeySet(options) {
|
|
18450
18365
|
if (!options.enabled) return {
|
|
18451
18366
|
enabled: false,
|
|
@@ -18469,8 +18384,7 @@ function loadMemoryTelemetryKeySet(options) {
|
|
|
18469
18384
|
historic: new Map(options.historicKeys.map((value, index) => [index + 1, value]))
|
|
18470
18385
|
};
|
|
18471
18386
|
}
|
|
18472
|
-
|
|
18473
|
-
//#region src/engine/telemetry/memory-telemetry-metadata.ts
|
|
18387
|
+
// src/engine/telemetry/memory-telemetry-metadata.ts
|
|
18474
18388
|
const RAW_CONTENT_KEYS = /* @__PURE__ */ new Set([
|
|
18475
18389
|
"text",
|
|
18476
18390
|
"content",
|
|
@@ -18544,8 +18458,7 @@ function validateMemoryTelemetryMetadata(eventType, metadata) {
|
|
|
18544
18458
|
}
|
|
18545
18459
|
return metadata;
|
|
18546
18460
|
}
|
|
18547
|
-
|
|
18548
|
-
//#region src/engine/telemetry/memory-telemetry-receipts.ts
|
|
18461
|
+
// src/engine/telemetry/memory-telemetry-receipts.ts
|
|
18549
18462
|
const CONTENT_HASH_PATTERN = /^[a-f0-9]{64}$/;
|
|
18550
18463
|
const TIMESTAMP_MS_PATTERN = /^[0-9]{13}$/;
|
|
18551
18464
|
const RECEIPT_HMAC_PATTERN = /^[a-f0-9]{64}$/;
|
|
@@ -18612,8 +18525,7 @@ function verification(status, receipt) {
|
|
|
18612
18525
|
keyVersion: receipt.keyVersion
|
|
18613
18526
|
};
|
|
18614
18527
|
}
|
|
18615
|
-
|
|
18616
|
-
//#region src/engine/telemetry/memory-telemetry-events.ts
|
|
18528
|
+
// src/engine/telemetry/memory-telemetry-events.ts
|
|
18617
18529
|
const log$12 = createLogger("sno-station-mem:memory-telemetry-events");
|
|
18618
18530
|
var MemoryTelemetryEventWriter = class {
|
|
18619
18531
|
sqlite;
|
|
@@ -18693,8 +18605,7 @@ var MemoryTelemetryEventWriter = class {
|
|
|
18693
18605
|
return this.readLatestReceiptEventIdStatement.get(factId)?.id ?? null;
|
|
18694
18606
|
}
|
|
18695
18607
|
};
|
|
18696
|
-
|
|
18697
|
-
//#region src/store/rem-update-stamp-migration.ts
|
|
18608
|
+
// src/store/rem-update-stamp-migration.ts
|
|
18698
18609
|
/** @file rem-update-stamp-migration.ts
|
|
18699
18610
|
* @purpose Hard-cuts legacy job-keyed REM update stamps to source-derived stamps.
|
|
18700
18611
|
* @boundary Metadata-only startup migration; memory text and facets remain unchanged.
|
|
@@ -18741,8 +18652,7 @@ function parseMetadata$3(value) {
|
|
|
18741
18652
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error("REM candidate metadata must be a JSON object");
|
|
18742
18653
|
return parsed;
|
|
18743
18654
|
}
|
|
18744
|
-
|
|
18745
|
-
//#region src/store/memory-store-base.ts
|
|
18655
|
+
// src/store/memory-store-base.ts
|
|
18746
18656
|
var TaskLifecycleCommandCollisionError = class extends StorageError {
|
|
18747
18657
|
projectId;
|
|
18748
18658
|
commandId;
|
|
@@ -19048,8 +18958,7 @@ var MemoryStore = class {
|
|
|
19048
18958
|
this.scheduleLegacyChunkBackfill();
|
|
19049
18959
|
}
|
|
19050
18960
|
};
|
|
19051
|
-
|
|
19052
|
-
//#region src/store/memory-store-row-codec.ts
|
|
18961
|
+
// src/store/memory-store-row-codec.ts
|
|
19053
18962
|
/** @file memory-store-row-codec.ts
|
|
19054
18963
|
* @purpose Converts rows, metadata, vectors, and chunk persistence payloads.
|
|
19055
18964
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -19169,8 +19078,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19169
19078
|
return row !== null && row !== void 0;
|
|
19170
19079
|
}
|
|
19171
19080
|
});
|
|
19172
|
-
|
|
19173
|
-
//#region src/store/memory-store-backfill.ts
|
|
19081
|
+
// src/store/memory-store-backfill.ts
|
|
19174
19082
|
/** @file memory-store-backfill.ts
|
|
19175
19083
|
* @purpose Backfills legacy memories that are missing chunk rows.
|
|
19176
19084
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -19273,8 +19181,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19273
19181
|
});
|
|
19274
19182
|
}
|
|
19275
19183
|
});
|
|
19276
|
-
|
|
19277
|
-
//#region src/store/memory-store-lookup-api.ts
|
|
19184
|
+
// src/store/memory-store-lookup-api.ts
|
|
19278
19185
|
/** @file memory-store-lookup-api.ts
|
|
19279
19186
|
* @purpose Reads memories by content hash or identifier.
|
|
19280
19187
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -19315,8 +19222,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19315
19222
|
return row ? this.toEntry(row) : void 0;
|
|
19316
19223
|
}
|
|
19317
19224
|
});
|
|
19318
|
-
|
|
19319
|
-
//#region src/store/memory-store-relation-api.ts
|
|
19225
|
+
// src/store/memory-store-relation-api.ts
|
|
19320
19226
|
/** @file memory-store-relation-api.ts
|
|
19321
19227
|
* @purpose Normalizes persisted relation predicates and reads project-scoped relation walks.
|
|
19322
19228
|
* @boundary Mechanical relation vocabulary and storage reads only; no extraction judgment.
|
|
@@ -19343,8 +19249,7 @@ Object.assign(MemoryStore.prototype, { walkMemoryRelations(input) {
|
|
|
19343
19249
|
ORDER BY relation.source_card_id, relation.subject, relation.predicate, relation.object
|
|
19344
19250
|
`).all(input.projectId, input.node).filter((row) => this.isMemoryOnFactSurface(row.sourceCardId));
|
|
19345
19251
|
} });
|
|
19346
|
-
|
|
19347
|
-
//#region src/store/memory-store-atomic-extraction-ledger-api.ts
|
|
19252
|
+
// src/store/memory-store-atomic-extraction-ledger-api.ts
|
|
19348
19253
|
/** @file memory-store-atomic-extraction-ledger-api.ts
|
|
19349
19254
|
* @purpose Persists atomic extraction chunk state and bounded reprocess repairs.
|
|
19350
19255
|
* @boundary Serial chunk lifecycle and transaction completion only; no model calls or extraction.
|
|
@@ -19603,8 +19508,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
19603
19508
|
}).immediate();
|
|
19604
19509
|
}
|
|
19605
19510
|
});
|
|
19606
|
-
|
|
19607
|
-
//#region src/store/memory-store-suppression-api.ts
|
|
19511
|
+
// src/store/memory-store-suppression-api.ts
|
|
19608
19512
|
/** @file memory-store-suppression-api.ts
|
|
19609
19513
|
* @purpose Creates the two project-scoped memory suppression shapes.
|
|
19610
19514
|
* @boundary Storage mechanics only; memory_forget is the sole product caller.
|
|
@@ -19636,13 +19540,11 @@ Object.assign(MemoryStore.prototype, { async createMemorySuppression(input) {
|
|
|
19636
19540
|
};
|
|
19637
19541
|
});
|
|
19638
19542
|
} });
|
|
19639
|
-
|
|
19640
|
-
//#region src/store/data-paths.ts
|
|
19543
|
+
// src/store/data-paths.ts
|
|
19641
19544
|
function getSnoStationMemDataDir() {
|
|
19642
19545
|
return join(getSnoStationMemStateDir(), "data");
|
|
19643
19546
|
}
|
|
19644
|
-
|
|
19645
|
-
//#region config/b-profile-section-registry.json
|
|
19547
|
+
// config/b-profile-section-registry.json
|
|
19646
19548
|
var b_profile_section_registry_default = {
|
|
19647
19549
|
schema_version: 3,
|
|
19648
19550
|
frozen_at: "2026-07-27T09:50:00+00:00",
|
|
@@ -21105,8 +21007,7 @@ var b_profile_section_registry_default = {
|
|
|
21105
21007
|
section_registry_sha256: "b3da09c82eb9c3892c73ccb0c1623f22dc787a15aaefac7511767b1c010ce1b1",
|
|
21106
21008
|
source_git_rev: "dfc5e40194c6d8087c1a0c329856e177061ecf43"
|
|
21107
21009
|
};
|
|
21108
|
-
|
|
21109
|
-
//#region src/engine/extraction/b-profile-section-registry.ts
|
|
21010
|
+
// src/engine/extraction/b-profile-section-registry.ts
|
|
21110
21011
|
/** @file b-profile-section-registry.ts
|
|
21111
21012
|
* @purpose Exposes the bundled B-profile section resource and pure topic normalization.
|
|
21112
21013
|
* @boundary Matching code consumes registry data; taxonomy strings live in the JSON resource.
|
|
@@ -21330,8 +21231,7 @@ function buildActiveTaskProjection(tasks) {
|
|
|
21330
21231
|
text: titles.length === 0 ? "Active tasks: none" : `Active tasks:\n${titles.map((title) => `- ${title}`).join("\n")}`
|
|
21331
21232
|
};
|
|
21332
21233
|
}
|
|
21333
|
-
|
|
21334
|
-
//#region src/engine/extraction/b-profile-section-canonicalizer.ts
|
|
21234
|
+
// src/engine/extraction/b-profile-section-canonicalizer.ts
|
|
21335
21235
|
/** @file b-profile-section-canonicalizer.ts
|
|
21336
21236
|
* @purpose Canonicalizes the written form of open B-profile section keys.
|
|
21337
21237
|
* @boundary Pure deterministic transform; no registry lookup, I/O, or rejection.
|
|
@@ -21356,8 +21256,7 @@ function canonicalizeProfileSectionName(sectionName) {
|
|
|
21356
21256
|
function normalizeProfileSectionForm(sectionName) {
|
|
21357
21257
|
return sectionName.normalize("NFKC").trim().toLowerCase().replace(/[-_\s]+/g, "_").replace(/^_+|_+$/g, "").replace(/_*\._*/g, ".");
|
|
21358
21258
|
}
|
|
21359
|
-
|
|
21360
|
-
//#region src/engine/shared/memory-kind-policy.ts
|
|
21259
|
+
// src/engine/shared/memory-kind-policy.ts
|
|
21361
21260
|
const ALLOWED_WRITERS = {
|
|
21362
21261
|
episodic: ["extraction", "offline-family"],
|
|
21363
21262
|
lesson: ["offline-family"],
|
|
@@ -21379,8 +21278,7 @@ function canTrustedWrite(kind) {
|
|
|
21379
21278
|
const writers = ALLOWED_WRITERS[kind];
|
|
21380
21279
|
return writers.includes("extraction") || writers.includes("profile-writer");
|
|
21381
21280
|
}
|
|
21382
|
-
|
|
21383
|
-
//#region src/store/memory-store-write-validation.ts
|
|
21281
|
+
// src/store/memory-store-write-validation.ts
|
|
21384
21282
|
/** @file memory-store-write-validation.ts
|
|
21385
21283
|
* @purpose Validates and normalizes memory-kind metadata before direct store writes.
|
|
21386
21284
|
* @boundary Storage write chokepoint only; extraction owns metadata semantics.
|
|
@@ -21529,8 +21427,7 @@ function validateStoreWriteMetadata(input, operation, countRecordTokens) {
|
|
|
21529
21427
|
throw new StorageError(`${operation}: invalid memory metadata: ${formatCause(error)}`);
|
|
21530
21428
|
}
|
|
21531
21429
|
}
|
|
21532
|
-
|
|
21533
|
-
//#region src/store/atomic-attribute-cardinality.ts
|
|
21430
|
+
// src/store/atomic-attribute-cardinality.ts
|
|
21534
21431
|
/** @file atomic-attribute-cardinality.ts
|
|
21535
21432
|
* @purpose Reads atomic attribute cardinality and family rulings from the shipped dictionaries.
|
|
21536
21433
|
* @boundary Mechanical config lookup only; no storage access or model judgment.
|
|
@@ -21551,8 +21448,7 @@ function isOneCardinalityAttribute(attribute) {
|
|
|
21551
21448
|
function isKnownAtomicAttribute(attribute) {
|
|
21552
21449
|
return knownAttributes.has(attribute);
|
|
21553
21450
|
}
|
|
21554
|
-
|
|
21555
|
-
//#region src/store/memory-store-atomic-extraction-write-api.ts
|
|
21451
|
+
// src/store/memory-store-atomic-extraction-write-api.ts
|
|
21556
21452
|
/** @file memory-store-atomic-extraction-write-api.ts
|
|
21557
21453
|
* @purpose Appends atomic extraction cards, relations, chunks, and ledger completion together.
|
|
21558
21454
|
* @boundary Dark atomic-v3 storage door only; no model calls, suppression, or cutover activation.
|
|
@@ -22193,8 +22089,7 @@ Object.assign(MemoryStore.prototype, { resolveAtomicMemoryEntity(projectId, disp
|
|
|
22193
22089
|
}
|
|
22194
22090
|
};
|
|
22195
22091
|
} });
|
|
22196
|
-
|
|
22197
|
-
//#region src/store/memory-store-atomic-time-api.ts
|
|
22092
|
+
// src/store/memory-store-atomic-time-api.ts
|
|
22198
22093
|
/** @file memory-store-atomic-time-api.ts
|
|
22199
22094
|
* @purpose Reads active atomic cards through one half-open valid-time predicate.
|
|
22200
22095
|
* @boundary Project-scoped storage query only.
|
|
@@ -22208,8 +22103,7 @@ Object.assign(MemoryStore.prototype, { listAtomicValidAt(projectId, atMs) {
|
|
|
22208
22103
|
AND (valid_until IS NULL OR ? < valid_until)
|
|
22209
22104
|
ORDER BY timestamp DESC, id DESC`).all(projectId, atMs, atMs).map((row) => this.toEntry(row));
|
|
22210
22105
|
} });
|
|
22211
|
-
|
|
22212
|
-
//#region src/store/memory-store-unplaced-api.ts
|
|
22106
|
+
// src/store/memory-store-unplaced-api.ts
|
|
22213
22107
|
/** @file memory-store-unplaced-api.ts
|
|
22214
22108
|
* @purpose Persists and reads write attempts the extraction path could not place.
|
|
22215
22109
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -22239,8 +22133,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
22239
22133
|
}));
|
|
22240
22134
|
}
|
|
22241
22135
|
});
|
|
22242
|
-
|
|
22243
|
-
//#region src/store/memory-store-extraction-timestamp-api.ts
|
|
22136
|
+
// src/store/memory-store-extraction-timestamp-api.ts
|
|
22244
22137
|
/** @file memory-store-extraction-timestamp-api.ts
|
|
22245
22138
|
* @purpose Persist the first valid-at-now timestamp for replay-stable extraction ordering.
|
|
22246
22139
|
* @boundary Synchronous encrypted SQLite transaction keyed by scope and candidate replay identity.
|
|
@@ -22272,8 +22165,7 @@ Object.assign(MemoryStore.prototype, { resolveExtractionTimestamp(projectId, rep
|
|
|
22272
22165
|
if (!isResolution$1(resolution)) throw new StorageError("Extraction timestamp transaction returned an invalid result");
|
|
22273
22166
|
return resolution;
|
|
22274
22167
|
} });
|
|
22275
|
-
|
|
22276
|
-
//#region src/store/memory-store-task-lifecycle-timestamp-api.ts
|
|
22168
|
+
// src/store/memory-store-task-lifecycle-timestamp-api.ts
|
|
22277
22169
|
/** @file memory-store-task-lifecycle-timestamp-api.ts
|
|
22278
22170
|
* @purpose Persists lifecycle effective-time value and source under the final command identity.
|
|
22279
22171
|
* @boundary Existing extraction timestamp table only; no lifecycle command or task-state writes.
|
|
@@ -22407,8 +22299,7 @@ function buildExtractionIdempotencyKey(sessionKey, candidate, trace = candidate.
|
|
|
22407
22299
|
payloadFingerprint: buildCandidatePayloadFingerprint(candidate)
|
|
22408
22300
|
}));
|
|
22409
22301
|
}
|
|
22410
|
-
|
|
22411
|
-
//#region src/engine/extraction/task-lifecycle-assertion.ts
|
|
22302
|
+
// src/engine/extraction/task-lifecycle-assertion.ts
|
|
22412
22303
|
/** @file task-lifecycle-assertion.ts
|
|
22413
22304
|
* @purpose Admits typed lifecycle assertions and allocates replay-safe command/task identities.
|
|
22414
22305
|
* @boundary Input contract and command persistence only; no resolver, binding, or task mutation.
|
|
@@ -22655,8 +22546,7 @@ function admitTaskLifecycleAssertion(store, input) {
|
|
|
22655
22546
|
created: persisted.created
|
|
22656
22547
|
};
|
|
22657
22548
|
}
|
|
22658
|
-
|
|
22659
|
-
//#region src/engine/extraction/task-lifecycle-resolver.ts
|
|
22549
|
+
// src/engine/extraction/task-lifecycle-resolver.ts
|
|
22660
22550
|
/** @file task-lifecycle-resolver.ts
|
|
22661
22551
|
* @purpose Resolves one admitted lifecycle assertion against a bounded instance snapshot.
|
|
22662
22552
|
* @boundary Pure relation judgment only; no model transport, persistence, or task-state mutation.
|
|
@@ -22872,8 +22762,7 @@ function resolveTaskLifecycle(input) {
|
|
|
22872
22762
|
};
|
|
22873
22763
|
return resolveJudgment(input.assertion, candidates, parseJudgment(input.judgment), input.judgment.status === "completed" ? input.judgment.candidateSetVersion : void 0);
|
|
22874
22764
|
}
|
|
22875
|
-
|
|
22876
|
-
//#region src/store/memory-store-task-lifecycle-api.ts
|
|
22765
|
+
// src/store/memory-store-task-lifecycle-api.ts
|
|
22877
22766
|
/** @file memory-store-task-lifecycle-api.ts
|
|
22878
22767
|
* @purpose Atomically persists resolved task lifecycle commands and their dedicated to-do row.
|
|
22879
22768
|
* @boundary Consumes admitted assertions and resolver output; performs no relation judgment.
|
|
@@ -23282,8 +23171,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
23282
23171
|
});
|
|
23283
23172
|
}
|
|
23284
23173
|
});
|
|
23285
|
-
|
|
23286
|
-
//#region src/store/memory-store-todo-api.ts
|
|
23174
|
+
// src/store/memory-store-todo-api.ts
|
|
23287
23175
|
/** @file memory-store-todo-api.ts
|
|
23288
23176
|
* @purpose Reads the scoped to-do list for recall.
|
|
23289
23177
|
* @boundary Prototype-mounted MemoryStore read method; no ranking behavior.
|
|
@@ -23307,8 +23195,7 @@ Object.assign(MemoryStore.prototype, { listTodos(input) {
|
|
|
23307
23195
|
totalCount: Number(countRow.count)
|
|
23308
23196
|
};
|
|
23309
23197
|
} });
|
|
23310
|
-
|
|
23311
|
-
//#region src/store/memory-store-task-lifecycle-migration-api.ts
|
|
23198
|
+
// src/store/memory-store-task-lifecycle-migration-api.ts
|
|
23312
23199
|
/** @file memory-store-task-lifecycle-migration-api.ts
|
|
23313
23200
|
* @purpose Builds and atomically applies deterministic legacy active-task migration manifests.
|
|
23314
23201
|
* @boundary Explicit one-time migration only; runtime extraction never calls this module.
|
|
@@ -23656,8 +23543,7 @@ Object.assign(MemoryStore.prototype, { async applyTaskLifecycleMigration(manifes
|
|
|
23656
23543
|
};
|
|
23657
23544
|
});
|
|
23658
23545
|
} });
|
|
23659
|
-
|
|
23660
|
-
//#region src/store/content-sanitizer-bridge.ts
|
|
23546
|
+
// src/store/content-sanitizer-bridge.ts
|
|
23661
23547
|
/** @file content-sanitizer-bridge.ts
|
|
23662
23548
|
* @purpose Adapts sno-station-mem storage inputs to the shared content sanitizer package.
|
|
23663
23549
|
* @boundary Thin storage adapter only; sanitizer policy lives in @snoai/content-sanitizer.
|
|
@@ -23774,8 +23660,7 @@ function sanitizeUpdateChanges(changes) {
|
|
|
23774
23660
|
...changes.metadata !== void 0 ? { metadata: sanitizeMemoryMetadataString(changes.metadata) ?? changes.metadata } : {}
|
|
23775
23661
|
};
|
|
23776
23662
|
}
|
|
23777
|
-
|
|
23778
|
-
//#region src/store/memory-store-persistence-api.ts
|
|
23663
|
+
// src/store/memory-store-persistence-api.ts
|
|
23779
23664
|
/** @file memory-store-persistence-api.ts
|
|
23780
23665
|
* @purpose Stores new memories in single-entry, bulk, and atomic-supersede write paths.
|
|
23781
23666
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -24742,8 +24627,7 @@ function readActiveFactGuard(metadata) {
|
|
|
24742
24627
|
return;
|
|
24743
24628
|
}
|
|
24744
24629
|
}
|
|
24745
|
-
|
|
24746
|
-
//#region src/store/memory-store-correct-api.ts
|
|
24630
|
+
// src/store/memory-store-correct-api.ts
|
|
24747
24631
|
/** Fresh correction successors and closure share one SQLite transaction. */
|
|
24748
24632
|
function correctionTarget(store, input) {
|
|
24749
24633
|
return store.sqlite.prepare(`SELECT * FROM nodix_memories
|
|
@@ -24905,8 +24789,7 @@ Object.assign(MemoryStore.prototype, { async correct(input) {
|
|
|
24905
24789
|
}).immediate();
|
|
24906
24790
|
});
|
|
24907
24791
|
} });
|
|
24908
|
-
|
|
24909
|
-
//#region src/store/memory-store-update-api.ts
|
|
24792
|
+
// src/store/memory-store-update-api.ts
|
|
24910
24793
|
/** @file memory-store-update-api.ts
|
|
24911
24794
|
* @purpose Applies mutable field updates and chunk rewrites for existing memories.
|
|
24912
24795
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25237,8 +25120,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25237
25120
|
});
|
|
25238
25121
|
}
|
|
25239
25122
|
});
|
|
25240
|
-
|
|
25241
|
-
//#region src/store/memory-store-rem-api.ts
|
|
25123
|
+
// src/store/memory-store-rem-api.ts
|
|
25242
25124
|
const log$8 = createLogger("sno-station-mem:rem-write");
|
|
25243
25125
|
Object.assign(MemoryStore.prototype, { async applyRemTextVersion(input) {
|
|
25244
25126
|
if (input.reason.trim().length === 0) throw new Error("mutation reason is required");
|
|
@@ -25410,8 +25292,7 @@ function parseMetadata$2(value) {
|
|
|
25410
25292
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error("memory metadata must be a JSON object");
|
|
25411
25293
|
return parsed;
|
|
25412
25294
|
}
|
|
25413
|
-
|
|
25414
|
-
//#region src/store/memory-store-import-api.ts
|
|
25295
|
+
// src/store/memory-store-import-api.ts
|
|
25415
25296
|
/** @file memory-store-import-api.ts
|
|
25416
25297
|
* @purpose Imports existing memory entries and checks identifier presence.
|
|
25417
25298
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25503,8 +25384,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25503
25384
|
return this.sqlite.prepare("SELECT 1 as has_value FROM nodix_memories WHERE id = ? LIMIT 1").get(id)?.has_value === 1;
|
|
25504
25385
|
}
|
|
25505
25386
|
});
|
|
25506
|
-
|
|
25507
|
-
//#region src/store/memory-store-chunk-search.ts
|
|
25387
|
+
// src/store/memory-store-chunk-search.ts
|
|
25508
25388
|
/** @file memory-store-chunk-search.ts
|
|
25509
25389
|
* @purpose Runs semantic and keyword search directly over chunk rows.
|
|
25510
25390
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25723,8 +25603,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25723
25603
|
}
|
|
25724
25604
|
}
|
|
25725
25605
|
});
|
|
25726
|
-
|
|
25727
|
-
//#region src/store/memory-store-search-api.ts
|
|
25606
|
+
// src/store/memory-store-search-api.ts
|
|
25728
25607
|
/** @file memory-store-search-api.ts
|
|
25729
25608
|
* @purpose Aggregates chunk matches into memory-level search results.
|
|
25730
25609
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -25989,8 +25868,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
25989
25868
|
}
|
|
25990
25869
|
}
|
|
25991
25870
|
});
|
|
25992
|
-
|
|
25993
|
-
//#region src/store/memory-store-vector-api.ts
|
|
25871
|
+
// src/store/memory-store-vector-api.ts
|
|
25994
25872
|
/** @file memory-store-vector-api.ts
|
|
25995
25873
|
* @purpose Provides chunk vector reads used by retrieval scoring and reranking.
|
|
25996
25874
|
* @boundary Prototype-mounted MemoryStore methods; no compaction or maintenance ownership.
|
|
@@ -26006,8 +25884,7 @@ Object.assign(MemoryStore.prototype, { getVectorsByIds(ids) {
|
|
|
26006
25884
|
}
|
|
26007
25885
|
return out;
|
|
26008
25886
|
} });
|
|
26009
|
-
|
|
26010
|
-
//#region src/store/memory-store-read-api.ts
|
|
25887
|
+
// src/store/memory-store-read-api.ts
|
|
26011
25888
|
/** @file memory-store-read-api.ts
|
|
26012
25889
|
* @purpose Reads chunks, memory lists, and aggregate store statistics.
|
|
26013
25890
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -26136,8 +26013,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
26136
26013
|
};
|
|
26137
26014
|
}
|
|
26138
26015
|
});
|
|
26139
|
-
|
|
26140
|
-
//#region src/store/memory-store-admin-api.ts
|
|
26016
|
+
// src/store/memory-store-admin-api.ts
|
|
26141
26017
|
/** @file memory-store-admin-api.ts
|
|
26142
26018
|
* @purpose Deletes memory rows and closes underlying SQLite resources.
|
|
26143
26019
|
* @boundary Prototype-mounted MemoryStore methods; no constructor state ownership.
|
|
@@ -26348,8 +26224,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
26348
26224
|
}
|
|
26349
26225
|
}
|
|
26350
26226
|
});
|
|
26351
|
-
|
|
26352
|
-
//#region src/engine/extraction/embedding-provider-factory.ts
|
|
26227
|
+
// src/engine/extraction/embedding-provider-factory.ts
|
|
26353
26228
|
function resolveEmbeddingCacheDir(config) {
|
|
26354
26229
|
return config.cacheDir || LOCAL_EMBEDDING_CACHE_DIR_DEFAULT;
|
|
26355
26230
|
}
|
|
@@ -26371,8 +26246,7 @@ function buildProvider(config) {
|
|
|
26371
26246
|
...config.pooling !== void 0 ? { pooling: config.pooling } : {}
|
|
26372
26247
|
});
|
|
26373
26248
|
}
|
|
26374
|
-
|
|
26375
|
-
//#region src/engine/extraction/embedding-vector-aggregation.ts
|
|
26249
|
+
// src/engine/extraction/embedding-vector-aggregation.ts
|
|
26376
26250
|
/**
|
|
26377
26251
|
* Compute L2-normalized weighted average of Float32Array vectors.
|
|
26378
26252
|
* Weights are typically chunk char lengths so longer chunks contribute more.
|
|
@@ -26397,8 +26271,7 @@ function weightedAverageFloat32(vectors, weights, dim) {
|
|
|
26397
26271
|
if (norm > 0) for (let j = 0; j < dim; j++) acc[j] = (acc[j] ?? 0) / norm;
|
|
26398
26272
|
return Float32Array.from(acc);
|
|
26399
26273
|
}
|
|
26400
|
-
|
|
26401
|
-
//#region src/engine/shared/token-bound.ts
|
|
26274
|
+
// src/engine/shared/token-bound.ts
|
|
26402
26275
|
/** @file token-bound.ts
|
|
26403
26276
|
* @purpose Cuts text to a token budget under any monotonic token counter.
|
|
26404
26277
|
* @boundary Pure text function; the caller supplies the counter.
|
|
@@ -26425,8 +26298,7 @@ function truncateToTokens(text, maxTokens, countTokens) {
|
|
|
26425
26298
|
}
|
|
26426
26299
|
return codePoints.slice(0, low).join("").trimEnd();
|
|
26427
26300
|
}
|
|
26428
|
-
|
|
26429
|
-
//#region src/engine/extraction/embedding-provider-client.ts
|
|
26301
|
+
// src/engine/extraction/embedding-provider-client.ts
|
|
26430
26302
|
/** @file embedding-provider-client.ts
|
|
26431
26303
|
* @purpose Adapts embedding providers to the plugin retrieval and storage contract.
|
|
26432
26304
|
* @boundary Local ONNX embeddings, chunk sizing, and vector dimensions.
|
|
@@ -26654,8 +26526,7 @@ var Embedder = class {
|
|
|
26654
26526
|
function createEmbedder(config, stateDir) {
|
|
26655
26527
|
return new Embedder(config, stateDir);
|
|
26656
26528
|
}
|
|
26657
|
-
|
|
26658
|
-
//#region src/engine/eval/trace.ts
|
|
26529
|
+
// src/engine/eval/trace.ts
|
|
26659
26530
|
/** @file trace.ts
|
|
26660
26531
|
* @purpose Emits per-QA retrieval traces and the active config snapshot for eval runs.
|
|
26661
26532
|
* @boundary Filesystem (JSONL/JSON write) and config constants surface.
|
|
@@ -26757,8 +26628,7 @@ function computeConfigHash() {
|
|
|
26757
26628
|
function sha256Hex(input) {
|
|
26758
26629
|
return createHash("sha256").update(input).digest("hex");
|
|
26759
26630
|
}
|
|
26760
|
-
|
|
26761
|
-
//#region src/engine/retrieval/access-tracker.ts
|
|
26631
|
+
// src/engine/retrieval/access-tracker.ts
|
|
26762
26632
|
/** @file access-tracker.ts
|
|
26763
26633
|
* @purpose Tracks memory access signals that feed recency, ranking, and decay decisions.
|
|
26764
26634
|
* @boundary Memory store metadata and retrieval result identifiers.
|
|
@@ -27046,8 +26916,7 @@ var AccessTracker = class {
|
|
|
27046
26916
|
}
|
|
27047
26917
|
}
|
|
27048
26918
|
};
|
|
27049
|
-
|
|
27050
|
-
//#region src/engine/retrieval/retrieval-trace.ts
|
|
26919
|
+
// src/engine/retrieval/retrieval-trace.ts
|
|
27051
26920
|
var StageLifecycle = class StageLifecycle {
|
|
27052
26921
|
name;
|
|
27053
26922
|
inputOrder;
|
|
@@ -27216,8 +27085,7 @@ var TraceCollector = class {
|
|
|
27216
27085
|
this.activeStage = null;
|
|
27217
27086
|
}
|
|
27218
27087
|
};
|
|
27219
|
-
|
|
27220
|
-
//#region src/engine/retrieval/retrieval-config.ts
|
|
27088
|
+
// src/engine/retrieval/retrieval-config.ts
|
|
27221
27089
|
/** @file retrieval-config.ts
|
|
27222
27090
|
* @purpose Defines retriever runtime configuration and request context contracts.
|
|
27223
27091
|
* @boundary Types and defaults only; no ranking execution.
|
|
@@ -27268,8 +27136,7 @@ const DEFAULT_RETRIEVAL_CONFIG = {
|
|
|
27268
27136
|
mmrLambda: MMR_LAMBDA,
|
|
27269
27137
|
recallLifecycle: DEFAULT_RECALL_LIFECYCLE
|
|
27270
27138
|
};
|
|
27271
|
-
|
|
27272
|
-
//#region src/engine/retrieval/retriever-core.ts
|
|
27139
|
+
// src/engine/retrieval/retriever-core.ts
|
|
27273
27140
|
var MemoryRetriever = class {
|
|
27274
27141
|
store;
|
|
27275
27142
|
embedder;
|
|
@@ -27333,8 +27200,7 @@ var MemoryRetriever = class {
|
|
|
27333
27200
|
function createRetriever(store, embedder, logger, config = DEFAULT_RETRIEVAL_CONFIG) {
|
|
27334
27201
|
return new MemoryRetriever(store, embedder, logger, config);
|
|
27335
27202
|
}
|
|
27336
|
-
|
|
27337
|
-
//#region src/engine/retrieval/retriever-query-tools.ts
|
|
27203
|
+
// src/engine/retrieval/retriever-query-tools.ts
|
|
27338
27204
|
Object.assign(MemoryRetriever.prototype, {
|
|
27339
27205
|
throwIfAborted(context) {
|
|
27340
27206
|
if (!context.signal?.aborted) return;
|
|
@@ -27353,8 +27219,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
27353
27219
|
return isMemoryExpired(parseInsightMetadata(entry.metadata, entry));
|
|
27354
27220
|
}
|
|
27355
27221
|
});
|
|
27356
|
-
|
|
27357
|
-
//#region src/engine/retrieval/retrieval-scoring-utils.ts
|
|
27222
|
+
// src/engine/retrieval/retrieval-scoring-utils.ts
|
|
27358
27223
|
const log$4 = createLogger$1("sno-station-mem:retriever");
|
|
27359
27224
|
function dotProduct(a, b) {
|
|
27360
27225
|
let sum = 0;
|
|
@@ -27379,8 +27244,7 @@ function collectParallelStage(results, key, fallbackIds) {
|
|
|
27379
27244
|
omitted
|
|
27380
27245
|
};
|
|
27381
27246
|
}
|
|
27382
|
-
|
|
27383
|
-
//#region src/engine/retrieval/retriever-search-modes.ts
|
|
27247
|
+
// src/engine/retrieval/retriever-search-modes.ts
|
|
27384
27248
|
/**
|
|
27385
27249
|
* Ordinary long prose is chunked and averaged by the embedder. Text it cannot cut under the model's limit (a pasted log or hash
|
|
27386
27250
|
* 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.
|
|
@@ -27626,8 +27490,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
27626
27490
|
});
|
|
27627
27491
|
}
|
|
27628
27492
|
});
|
|
27629
|
-
|
|
27630
|
-
//#region src/engine/retrieval/retriever-rerank.ts
|
|
27493
|
+
// src/engine/retrieval/retriever-rerank.ts
|
|
27631
27494
|
/** @file retriever-rerank.ts
|
|
27632
27495
|
* @purpose Runs local cosine ordering and local model reranking.
|
|
27633
27496
|
* @boundary Prototype-mounted MemoryRetriever methods; no constructor state ownership.
|
|
@@ -27769,8 +27632,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
27769
27632
|
};
|
|
27770
27633
|
}
|
|
27771
27634
|
});
|
|
27772
|
-
|
|
27773
|
-
//#region src/engine/operations/selective-forgetting-scorer.ts
|
|
27635
|
+
// src/engine/operations/selective-forgetting-scorer.ts
|
|
27774
27636
|
/** @file selective-forgetting-scorer.ts
|
|
27775
27637
|
* @purpose Computes Selective Forgetting scores from age, access history, and intrinsic value.
|
|
27776
27638
|
* @boundary Access history, importance, timestamps, and retrieval scoring inputs.
|
|
@@ -27878,8 +27740,7 @@ function createRetentionScorer(config = DEFAULT_DECAY_CONFIG) {
|
|
|
27878
27740
|
}
|
|
27879
27741
|
};
|
|
27880
27742
|
}
|
|
27881
|
-
|
|
27882
|
-
//#region src/engine/retrieval/retriever-scoring-pipeline.ts
|
|
27743
|
+
// src/engine/retrieval/retriever-scoring-pipeline.ts
|
|
27883
27744
|
/** @file retriever-scoring-pipeline.ts
|
|
27884
27745
|
* @purpose Applies post-retrieval scoring, decay, noise, and diversity transforms.
|
|
27885
27746
|
* @boundary Prototype-mounted MemoryRetriever methods; no constructor state ownership.
|
|
@@ -28140,8 +28001,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28140
28001
|
});
|
|
28141
28002
|
}
|
|
28142
28003
|
});
|
|
28143
|
-
|
|
28144
|
-
//#region src/engine/retrieval/retriever-execution.ts
|
|
28004
|
+
// src/engine/retrieval/retriever-execution.ts
|
|
28145
28005
|
/** @file retriever-execution.ts
|
|
28146
28006
|
* @purpose Runs retrieval entrypoints, traces, and stats recording.
|
|
28147
28007
|
* @boundary Prototype-mounted MemoryRetriever methods; no constructor state ownership.
|
|
@@ -28403,8 +28263,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28403
28263
|
}
|
|
28404
28264
|
}
|
|
28405
28265
|
});
|
|
28406
|
-
|
|
28407
|
-
//#region src/sidecar/rem-job-store.ts
|
|
28266
|
+
// src/sidecar/rem-job-store.ts
|
|
28408
28267
|
/** @file rem-job-store.ts
|
|
28409
28268
|
* @purpose Persists append-only REM job state transitions.
|
|
28410
28269
|
* @boundary Durable local JSONL journal used by the standalone REM sidecar.
|
|
@@ -28778,8 +28637,7 @@ async function syncDirectory$1(directory) {
|
|
|
28778
28637
|
await handle.close();
|
|
28779
28638
|
}
|
|
28780
28639
|
}
|
|
28781
|
-
|
|
28782
|
-
//#region src/sidecar/rem-entry-foundations.ts
|
|
28640
|
+
// src/sidecar/rem-entry-foundations.ts
|
|
28783
28641
|
const sha256Schema = z.string().regex(/^[0-9a-f]{64}$/u);
|
|
28784
28642
|
const finiteRecordSchema = z.record(z.string(), z.number().finite()).refine((value) => Object.keys(value).length > 0);
|
|
28785
28643
|
const commonArtifactShape = {
|
|
@@ -28855,8 +28713,7 @@ z.object({
|
|
|
28855
28713
|
waivedBy: z.string().min(1),
|
|
28856
28714
|
waiverReason: z.string().min(1)
|
|
28857
28715
|
}).strict();
|
|
28858
|
-
|
|
28859
|
-
//#region src/sidecar/rem-update-judgment-skill.ts
|
|
28716
|
+
// src/sidecar/rem-update-judgment-skill.ts
|
|
28860
28717
|
/** @file rem-update-judgment-skill.ts
|
|
28861
28718
|
* @purpose Loads the model-readable REM update judgment method shipped with the plugin.
|
|
28862
28719
|
* @boundary Package-relative read of one trusted bundled skill.
|
|
@@ -28892,8 +28749,7 @@ const REM_UPDATE_JUDGMENT_SKILL = {
|
|
|
28892
28749
|
verification: readSection("Rewrite Verification"),
|
|
28893
28750
|
clauseCarry: readSection("Clause Carry")
|
|
28894
28751
|
};
|
|
28895
|
-
|
|
28896
|
-
//#region src/store/rem-sqlite-adapter.ts
|
|
28752
|
+
// src/store/rem-sqlite-adapter.ts
|
|
28897
28753
|
/** @file rem-sqlite-adapter.ts
|
|
28898
28754
|
* @purpose Binds capability-safe REM mutation and recovery ports to encrypted sno-station-mem SQLite.
|
|
28899
28755
|
* @boundary Additive REM tables and recoverable memory-row updates; no deletion or compaction.
|
|
@@ -29581,8 +29437,7 @@ function hashText(value) {
|
|
|
29581
29437
|
function hashMemoryRow(row) {
|
|
29582
29438
|
return hashRemMemoryRow(row);
|
|
29583
29439
|
}
|
|
29584
|
-
|
|
29585
|
-
//#region src/sidecar/rem-batch-executor.ts
|
|
29440
|
+
// src/sidecar/rem-batch-executor.ts
|
|
29586
29441
|
/** @file rem-batch-executor.ts
|
|
29587
29442
|
* @purpose Runs the production REM scan, judgments, and recoverable mutations for one scope.
|
|
29588
29443
|
* @boundary One profile's encrypted SQLite database, Sno GPU judgments, and durable REM ledgers.
|
|
@@ -32033,8 +31888,7 @@ function sha256(value) {
|
|
|
32033
31888
|
function compareTuple(left, right) {
|
|
32034
31889
|
return JSON.stringify(left).localeCompare(JSON.stringify(right));
|
|
32035
31890
|
}
|
|
32036
|
-
|
|
32037
|
-
//#region src/sidecar/rem-trigger-state.ts
|
|
31891
|
+
// src/sidecar/rem-trigger-state.ts
|
|
32038
31892
|
/** @file rem-trigger-state.ts
|
|
32039
31893
|
* @purpose Persists the automatic REM scheduler's strict per-scope state.
|
|
32040
31894
|
* @boundary One atomically replaced JSON file under the sno-station-mem state directory.
|
|
@@ -32789,5 +32643,4 @@ function isNodeError(error) {
|
|
|
32789
32643
|
function errorMessage(error) {
|
|
32790
32644
|
return error instanceof Error ? error.message : String(error);
|
|
32791
32645
|
}
|
|
32792
|
-
//#endregion
|
|
32793
32646
|
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 };
|