@snoai/memory 0.0.0-stage → 1.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/LICENSE +176 -0
- package/README.md +7 -2
- package/config/b-profile-section-registry.json +118 -0
- package/config/llm/compiled/2026-05-19T230932Z/manifest.json +25 -0
- package/config/llm/compiled/2026-05-19T230932Z/registry-root.json +67 -0
- package/config/llm/compiled/2026-05-19T230932Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
- package/config/llm/compiled/2026-05-19T230932Z/resolved/mem_claw/openrouter_auto.json +5 -0
- package/config/llm/compiled/2026-05-19T230932Z/resolved/mem_claw/sno_ai_extract.json +5 -0
- package/config/llm/compiled/2026-05-19T230932Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
- package/config/llm/compiled/2026-05-19T230932Z/source/mem_claw/openrouter_auto.mda +24 -0
- package/config/llm/compiled/2026-05-19T230932Z/source/mem_claw/sno_ai_extract.mda +24 -0
- package/config/llm/compiled/2026-07-21T001311Z/manifest.json +43 -0
- package/config/llm/compiled/2026-07-21T001311Z/registry-root.json +97 -0
- package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
- package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/openrouter_auto.json +5 -0
- package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_ai_extract.json +5 -0
- package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_conflict_verdict.json +10 -0
- package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_extract_chat.json +10 -0
- package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_extract_profile.json +10 -0
- package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
- package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/openrouter_auto.mda +24 -0
- package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_ai_extract.mda +24 -0
- package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_conflict_verdict.mda +27 -0
- package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_extract_chat.mda +27 -0
- package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_extract_profile.mda +27 -0
- package/config/llm/compiled/2026-08-29T060335Z/manifest.json +43 -0
- package/config/llm/compiled/2026-08-29T060335Z/registry-root.json +97 -0
- package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
- package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/openrouter_auto.json +5 -0
- package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_ai_extract.json +5 -0
- package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_conflict_verdict.json +10 -0
- package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_extract_chat.json +10 -0
- package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_extract_profile.json +10 -0
- package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
- package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/openrouter_auto.mda +24 -0
- package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_ai_extract.mda +24 -0
- package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_conflict_verdict.mda +27 -0
- package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_extract_chat.mda +27 -0
- package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_extract_profile.mda +27 -0
- package/config/llm/compiled/2026-09-04T004828Z/manifest.json +43 -0
- package/config/llm/compiled/2026-09-04T004828Z/registry-root.json +97 -0
- package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
- package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/openrouter_auto.json +5 -0
- package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_ai_extract.json +5 -0
- package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_conflict_verdict.json +10 -0
- package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_extract_chat.json +10 -0
- package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_extract_profile.json +10 -0
- package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
- package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/openrouter_auto.mda +24 -0
- package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_ai_extract.mda +24 -0
- package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_conflict_verdict.mda +27 -0
- package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_extract_chat.mda +27 -0
- package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_extract_profile.mda +27 -0
- package/config/llm/current.json +4 -0
- package/config/llm/source/mem_claw/openai_gpt_5_nano.mda +24 -0
- package/config/llm/source/mem_claw/openrouter_auto.mda +24 -0
- package/config/llm/source/mem_claw/sno_ai_extract.mda +24 -0
- package/config/llm/source/mem_claw/sno_conflict_verdict.mda +27 -0
- package/config/llm/source/mem_claw/sno_extract_chat.mda +27 -0
- package/config/llm/source/mem_claw/sno_extract_profile.mda +27 -0
- package/config/llm.trust.json +37 -0
- package/dist/_types-CUKHSRkS.d.ts +103 -0
- package/dist/access-tracker-CSc21GtV.d.ts +110 -0
- package/dist/adapter-DMEmCTKo.d.ts +69 -0
- package/dist/adapter-XaRHZWZ2.js +333 -0
- package/dist/agent-llm-port-5oXgBpzJ.d.ts +53 -0
- package/dist/all-resources-BQK2ugjB.js +6379 -0
- package/dist/all-resources-Dij6l5h0.d.ts +18 -0
- package/dist/ambient-learning-text-normalizer-CxjATmMp.js +170 -0
- package/dist/ambient-learning-text-normalizer-_fH3LeuK.d.ts +10 -0
- package/dist/atomic-extraction-reply-BJ9XV_9s.js +863 -0
- package/dist/atomic-extraction-skill-CcXmuCqL.js +56 -0
- package/dist/atomic-memory-extraction-BpOUWPJM.d.ts +327 -0
- package/dist/atomic-memory-extraction-sdNf1-B1.js +3605 -0
- package/dist/b-profile-section-dictionary-provider-BHkoNqgk.js +1812 -0
- package/dist/b-profile-section-dictionary-provider-BxbksLj3.d.ts +62 -0
- package/dist/best-effort-BPZSzKk0.d.ts +9 -0
- package/dist/calendar-instruction-CzqZbAPG.js +194 -0
- package/dist/capture-policy-detector-CHz5GOPA.d.ts +53 -0
- package/dist/capture-policy-detector-DaMfy9CZ.js +357 -0
- package/dist/classifier-C96uH9OF.d.ts +272 -0
- package/dist/client.d.ts +34 -0
- package/dist/client.js +305 -0
- package/dist/coding-skin.d.ts +51 -0
- package/dist/coding-skin.js +55 -0
- package/dist/config-tSrvLXgV.js +2577 -0
- package/dist/connection-DAbzki8K.d.ts +391 -0
- package/dist/connection-DliCOBB2.js +297 -0
- package/dist/daily-log-generator-CH_KuWHs.js +469 -0
- package/dist/daily-log-generator-CsQPHl4A.d.ts +73 -0
- package/dist/daily-spend-estimator-DiwzBlo1.d.ts +8 -0
- package/dist/data-bootstrap-CYniFp8b.js +172 -0
- package/dist/data-bootstrap-CcJUwkqf.d.ts +30 -0
- package/dist/data-paths-C7sNdqvP.d.ts +22 -0
- package/dist/derived-suppression-cache-C7bGARc0.d.ts +36 -0
- package/dist/diagnostic-encoder.d.ts +6 -0
- package/dist/diagnostic-encoder.js +29 -0
- package/dist/embedding-provider-client-Q_hJonK9.js +294 -0
- package/dist/embedding-provider-client-vynZMuit.d.ts +94 -0
- package/dist/entry-metadata-parser-BIVSMCIk.js +20 -0
- package/dist/error-D-wb-rZw.js +23 -0
- package/dist/error-signals-D8_3vYu4.d.ts +28 -0
- package/dist/error-signals-lMH2uAdV.js +134 -0
- package/dist/errors-CeVRxf9V.d.ts +49 -0
- package/dist/extraction-text-sanitizer-B_AhIecT.d.ts +32 -0
- package/dist/i18n-text-DbD6Qify.d.ts +13 -0
- package/dist/index-BsMap4It.d.ts +650 -0
- package/dist/index-DL8AVj0Z.d.ts +571 -0
- package/dist/index-DQ7VL6d3.d.ts +350 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +1201 -0
- package/dist/intent-analyzer-B5XVrWwe.d.ts +28 -0
- package/dist/internal/config/index.d.ts +2 -0
- package/dist/internal/config/index.js +581 -0
- package/dist/internal/config/plugin-config-schema.d.ts +2 -0
- package/dist/internal/config/plugin-config-schema.js +2 -0
- package/dist/internal/config/product-mode.d.ts +2 -0
- package/dist/internal/config/product-mode.js +36 -0
- package/dist/internal/config/settings.d.ts +2 -0
- package/dist/internal/config/settings.js +265 -0
- package/dist/internal/config/skill-categories.d.ts +4 -0
- package/dist/internal/config/skill-categories.js +68 -0
- package/dist/internal/config/skin-defaults.d.ts +6 -0
- package/dist/internal/config/skin-defaults.js +6 -0
- package/dist/internal/contract/discovery.d.ts +10 -0
- package/dist/internal/contract/discovery.js +53 -0
- package/dist/internal/contract/profile.d.ts +2 -0
- package/dist/internal/contract/profile.js +44 -0
- package/dist/internal/contract/routes.d.ts +2 -0
- package/dist/internal/contract/routes.js +61 -0
- package/dist/internal/engine/bindings/memory-cli-shared.d.ts +47 -0
- package/dist/internal/engine/bindings/memory-cli-shared.js +84 -0
- package/dist/internal/engine/bindings/memory-forget-tool.d.ts +5 -0
- package/dist/internal/engine/bindings/memory-forget-tool.js +66 -0
- package/dist/internal/engine/bindings/memory-list-tool.d.ts +5 -0
- package/dist/internal/engine/bindings/memory-list-tool.js +57 -0
- package/dist/internal/engine/bindings/memory-recall-tool.d.ts +10 -0
- package/dist/internal/engine/bindings/memory-recall-tool.js +283 -0
- package/dist/internal/engine/bindings/memory-reflection-resolve-tool.d.ts +5 -0
- package/dist/internal/engine/bindings/memory-reflection-resolve-tool.js +150 -0
- package/dist/internal/engine/bindings/memory-stats-tool.d.ts +5 -0
- package/dist/internal/engine/bindings/memory-stats-tool.js +43 -0
- package/dist/internal/engine/bindings/memory-store-tool.d.ts +5 -0
- package/dist/internal/engine/bindings/memory-store-tool.js +165 -0
- package/dist/internal/engine/bindings/memory-tool-access.d.ts +16 -0
- package/dist/internal/engine/bindings/memory-tool-access.js +46 -0
- package/dist/internal/engine/bindings/memory-tool-formatting.d.ts +62 -0
- package/dist/internal/engine/bindings/memory-tool-formatting.js +106 -0
- package/dist/internal/engine/bindings/memory-tool-results.d.ts +8 -0
- package/dist/internal/engine/bindings/memory-tool-results.js +41 -0
- package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +109 -0
- package/dist/internal/engine/bindings/memory-tool-schemas.js +75 -0
- package/dist/internal/engine/bindings/memory-update-tool.d.ts +5 -0
- package/dist/internal/engine/bindings/memory-update-tool.js +127 -0
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts +14 -0
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.js +248 -0
- package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.d.ts +12 -0
- package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.js +324 -0
- package/dist/internal/engine/bindings/sno-station-mem-hook-types.d.ts +56 -0
- package/dist/internal/engine/bindings/sno-station-mem-hook-types.js +1 -0
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.d.ts +14 -0
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +119 -0
- package/dist/internal/engine/bindings/sno-station-mem-message-transcript.d.ts +52 -0
- package/dist/internal/engine/bindings/sno-station-mem-message-transcript.js +145 -0
- package/dist/internal/engine/bindings/sno-station-mem-reset-hook.d.ts +10 -0
- package/dist/internal/engine/bindings/sno-station-mem-reset-hook.js +9 -0
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +37 -0
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.js +105 -0
- package/dist/internal/engine/bindings/sno-station-mem-session-state.d.ts +10 -0
- package/dist/internal/engine/bindings/sno-station-mem-session-state.js +27 -0
- package/dist/internal/engine/eval/trace.d.ts +2 -0
- package/dist/internal/engine/eval/trace.js +151 -0
- package/dist/internal/engine/extraction/ambient-learning-text-normalizer.d.ts +2 -0
- package/dist/internal/engine/extraction/ambient-learning-text-normalizer.js +2 -0
- package/dist/internal/engine/extraction/atomic-memory-extraction.d.ts +2 -0
- package/dist/internal/engine/extraction/atomic-memory-extraction.js +2 -0
- package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.d.ts +2 -0
- package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.js +2 -0
- package/dist/internal/engine/extraction/b-profile-section-rekey.d.ts +49 -0
- package/dist/internal/engine/extraction/b-profile-section-rekey.js +730 -0
- package/dist/internal/engine/extraction/capture-policy-detector.d.ts +2 -0
- package/dist/internal/engine/extraction/capture-policy-detector.js +2 -0
- package/dist/internal/engine/extraction/embedding-provider-client.d.ts +2 -0
- package/dist/internal/engine/extraction/embedding-provider-client.js +2 -0
- package/dist/internal/engine/extraction/extraction-text-sanitizer.d.ts +2 -0
- package/dist/internal/engine/extraction/extraction-text-sanitizer.js +114 -0
- package/dist/internal/engine/extraction/memory-metadata-codec.d.ts +3 -0
- package/dist/internal/engine/extraction/memory-metadata-codec.js +2 -0
- package/dist/internal/engine/extraction/memory-temporality-classifier.d.ts +2 -0
- package/dist/internal/engine/extraction/memory-temporality-classifier.js +2 -0
- package/dist/internal/engine/i18n/all-resources.d.ts +2 -0
- package/dist/internal/engine/i18n/all-resources.js +2 -0
- package/dist/internal/engine/i18n/locales.d.ts +2 -0
- package/dist/internal/engine/i18n/locales.js +19 -0
- package/dist/internal/engine/i18n/res/_types.d.ts +2 -0
- package/dist/internal/engine/i18n/res/_types.js +11 -0
- package/dist/internal/engine/observability/adapter.d.ts +2 -0
- package/dist/internal/engine/observability/adapter.js +2 -0
- package/dist/internal/engine/observability/best-effort.d.ts +2 -0
- package/dist/internal/engine/observability/best-effort.js +41 -0
- package/dist/internal/engine/observability/early-diagnostics.js +2 -0
- package/dist/internal/engine/observability/memory-snapshot.d.ts +2 -0
- package/dist/internal/engine/observability/memory-snapshot.js +44 -0
- package/dist/internal/engine/observability/observable-embedder.d.ts +2 -0
- package/dist/internal/engine/observability/observable-embedder.js +43 -0
- package/dist/internal/engine/observability/observable-llm-client.d.ts +2 -0
- package/dist/internal/engine/observability/observable-llm-client.js +98 -0
- package/dist/internal/engine/observability/observable-memory-store.d.ts +2 -0
- package/dist/internal/engine/observability/observable-memory-store.js +701 -0
- package/dist/internal/engine/observability/observable-retriever.d.ts +2 -0
- package/dist/internal/engine/observability/observable-retriever.js +95 -0
- package/dist/internal/engine/observability/runtime-diagnostics.d.ts +13 -0
- package/dist/internal/engine/observability/runtime-diagnostics.js +96 -0
- package/dist/internal/engine/observability/session-registry.d.ts +2 -0
- package/dist/internal/engine/observability/session-registry.js +58 -0
- package/dist/internal/engine/observability/version-metadata.d.ts +7 -0
- package/dist/internal/engine/observability/version-metadata.js +59 -0
- package/dist/internal/engine/operations/daily-spend-estimator.d.ts +2 -0
- package/dist/internal/engine/operations/daily-spend-estimator.js +97 -0
- package/dist/internal/engine/operations/learning-file-maintenance.d.ts +2 -0
- package/dist/internal/engine/operations/learning-file-maintenance.js +255 -0
- package/dist/internal/engine/operations/memory-tier-promoter.d.ts +2 -0
- package/dist/internal/engine/operations/memory-tier-promoter.js +95 -0
- package/dist/internal/engine/operations/runtime-audit-log.d.ts +3 -0
- package/dist/internal/engine/operations/runtime-audit-log.js +3 -0
- package/dist/internal/engine/provider/canonical-memory-corpus.d.ts +38 -0
- package/dist/internal/engine/provider/canonical-memory-corpus.js +253 -0
- package/dist/internal/engine/provider/provider-registration.d.ts +39 -0
- package/dist/internal/engine/provider/provider-registration.js +2 -0
- package/dist/internal/engine/provider/provider-row-renderer.d.ts +7 -0
- package/dist/internal/engine/provider/provider-row-renderer.js +53 -0
- package/dist/internal/engine/provider/provider-types.d.ts +2 -0
- package/dist/internal/engine/provider/provider-types.js +1 -0
- package/dist/internal/engine/reflection/daily-log-generator.d.ts +2 -0
- package/dist/internal/engine/reflection/daily-log-generator.js +2 -0
- package/dist/internal/engine/reflection/reflection-command-hooks.d.ts +2 -0
- package/dist/internal/engine/reflection/reflection-command-hooks.js +2 -0
- package/dist/internal/engine/reflection/reflection-deps.d.ts +2 -0
- package/dist/internal/engine/reflection/reflection-deps.js +1 -0
- package/dist/internal/engine/reflection/reflection-embedded-generator.d.ts +2 -0
- package/dist/internal/engine/reflection/reflection-embedded-generator.js +2 -0
- package/dist/internal/engine/reflection/reflection-injection-hooks.d.ts +2 -0
- package/dist/internal/engine/reflection/reflection-injection-hooks.js +219 -0
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +2 -0
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +63 -0
- package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +4 -0
- package/dist/internal/engine/reflection/strategy-hook-runner.js +3 -0
- package/dist/internal/engine/rem/classifier.d.ts +2 -0
- package/dist/internal/engine/rem/classifier.js +180 -0
- package/dist/internal/engine/rem/index.d.ts +4 -0
- package/dist/internal/engine/rem/index.js +2551 -0
- package/dist/internal/engine/rem/types.d.ts +2 -0
- package/dist/internal/engine/rem/types.js +40 -0
- package/dist/internal/engine/retrieval/access-tracker.d.ts +2 -0
- package/dist/internal/engine/retrieval/access-tracker.js +314 -0
- package/dist/internal/engine/retrieval/intent-analyzer.d.ts +2 -0
- package/dist/internal/engine/retrieval/intent-analyzer.js +27 -0
- package/dist/internal/engine/retrieval/retrieval-gate.d.ts +2 -0
- package/dist/internal/engine/retrieval/retrieval-gate.js +47 -0
- package/dist/internal/engine/retrieval/retriever.d.ts +2 -0
- package/dist/internal/engine/retrieval/retriever.js +2 -0
- package/dist/internal/engine/security/memory-scope-policy.d.ts +2 -0
- package/dist/internal/engine/security/memory-scope-policy.js +2 -0
- package/dist/internal/engine/security/redact.d.ts +2 -0
- package/dist/internal/engine/security/redact.js +34 -0
- package/dist/internal/engine/security/scopes.d.ts +3 -0
- package/dist/internal/engine/security/scopes.js +3 -0
- package/dist/internal/engine/shared/errors.d.ts +2 -0
- package/dist/internal/engine/shared/errors.js +66 -0
- package/dist/internal/engine/shared/i18n-text.d.ts +2 -0
- package/dist/internal/engine/shared/i18n-text.js +58 -0
- package/dist/internal/engine/shared/iso-date-time.d.ts +16 -0
- package/dist/internal/engine/shared/iso-date-time.js +40 -0
- package/dist/internal/engine/shared/lru.d.ts +2 -0
- package/dist/internal/engine/shared/lru.js +30 -0
- package/dist/internal/engine/shared/memory-kind-policy.d.ts +2 -0
- package/dist/internal/engine/shared/memory-kind-policy.js +64 -0
- package/dist/internal/engine/shared/paths.d.ts +3 -0
- package/dist/internal/engine/shared/paths.js +2 -0
- package/dist/internal/engine/shared/types.d.ts +3 -0
- package/dist/internal/engine/shared/types.js +25 -0
- package/dist/internal/engine/shared/utils.d.ts +2 -0
- package/dist/internal/engine/shared/utils.js +175 -0
- package/dist/internal/engine/telemetry/memory-telemetry-api.d.ts +134 -0
- package/dist/internal/engine/telemetry/memory-telemetry-api.js +730 -0
- package/dist/internal/engine/telemetry/memory-telemetry-observability.d.ts +24 -0
- package/dist/internal/engine/telemetry/memory-telemetry-observability.js +133 -0
- package/dist/internal/engine/telemetry/memory-telemetry-outbox.d.ts +2 -0
- package/dist/internal/engine/telemetry/memory-telemetry-outbox.js +443 -0
- package/dist/internal/engine/telemetry/memory-telemetry-types.d.ts +2 -0
- package/dist/internal/engine/telemetry/memory-telemetry-types.js +21 -0
- package/dist/internal/engine/telemetry/observe-ledger.d.ts +30 -0
- package/dist/internal/engine/telemetry/observe-ledger.js +111 -0
- package/dist/internal/model/agent-llm-port.d.ts +2 -0
- package/dist/internal/model/agent-llm-port.js +1 -0
- package/dist/internal/model/llm-client.d.ts +3 -0
- package/dist/internal/model/llm-client.js +3 -0
- package/dist/internal/model/llm-failure.d.ts +26 -0
- package/dist/internal/model/llm-failure.js +63 -0
- package/dist/internal/model/llm-mode-routing.d.ts +22 -0
- package/dist/internal/model/llm-mode-routing.js +37 -0
- package/dist/internal/store/atomic-memory-cutover-sql.d.ts +13 -0
- package/dist/internal/store/atomic-memory-cutover-sql.js +237 -0
- package/dist/internal/store/connection.d.ts +2 -0
- package/dist/internal/store/connection.js +2 -0
- package/dist/internal/store/data-bootstrap.d.ts +2 -0
- package/dist/internal/store/data-bootstrap.js +2 -0
- package/dist/internal/store/data-paths.d.ts +2 -0
- package/dist/internal/store/data-paths.js +65 -0
- package/dist/internal/store/maintenance.d.ts +75 -0
- package/dist/internal/store/maintenance.js +1401 -0
- package/dist/internal/store/memory-kinds-cutover-migrator.d.ts +28 -0
- package/dist/internal/store/memory-kinds-cutover-migrator.js +415 -0
- package/dist/internal/store/migrations.d.ts +27 -0
- package/dist/internal/store/migrations.js +201 -0
- package/dist/internal/store/sqlite-runtime.d.ts +2 -0
- package/dist/internal/store/sqlite-runtime.js +109 -0
- package/dist/internal/store/store.d.ts +3 -0
- package/dist/internal/store/store.js +2 -0
- package/dist/learning-file-maintenance-9b-Ut6Kv.d.ts +30 -0
- package/dist/llm-client-B7Xoxqou.js +1378 -0
- package/dist/llm-client-DOTSGzhe.d.ts +51 -0
- package/dist/locales-JxGmkG6t.d.ts +7 -0
- package/dist/log-site-catalog.generated-B9WYdnAM.js +2321 -0
- package/dist/log-site-catalog.json +1 -0
- package/dist/lru-DyoaTyIs.d.ts +14 -0
- package/dist/memdump.d.ts +52 -0
- package/dist/memdump.js +163 -0
- package/dist/memory-entry-projector-DHo8jH10.js +1015 -0
- package/dist/memory-kind-policy-LKt0u3gy.d.ts +23 -0
- package/dist/memory-metadata-codec-C3oQd47V.d.ts +68 -0
- package/dist/memory-metadata-codec-DL1sbJiN.js +577 -0
- package/dist/memory-runtime-BZtREuwW.js +19459 -0
- package/dist/memory-scope-policy-1gg5QlWZ.d.ts +67 -0
- package/dist/memory-scope-policy-DICSCURA.js +283 -0
- package/dist/memory-snapshot-3e44ND2i.d.ts +16 -0
- package/dist/memory-source-order-BtrIxaIt.js +134 -0
- package/dist/memory-store-base-XRA4S9Xl.d.ts +1095 -0
- package/dist/memory-store-shared-DeIDkhLj.js +158 -0
- package/dist/memory-store-write-validation-B_hDG2zf.js +243 -0
- package/dist/memory-telemetry-incidents-BWA9kcZx.js +8 -0
- package/dist/memory-telemetry-metadata-CA7W8tK6.js +77 -0
- package/dist/memory-telemetry-outbox-ddTdImt7.d.ts +74 -0
- package/dist/memory-telemetry-receipts-MAJecvXQ.d.ts +34 -0
- package/dist/memory-telemetry-receipts-YsxbwOAf.js +91 -0
- package/dist/memory-telemetry-types-CufVmrCs.d.ts +14 -0
- package/dist/memory-temporality-classifier-CEdRTN5J.d.ts +43 -0
- package/dist/memory-temporality-classifier-CKiTAHXe.js +184 -0
- package/dist/memory-tier-promoter-DbTpahkP.d.ts +43 -0
- package/dist/memory-tool-dependencies-CLODycUw.js +19 -0
- package/dist/memory-tool-dependencies-N69chrQc.d.ts +14 -0
- package/dist/model-call-table-CspopkBg.js +563 -0
- package/dist/model-reply-text-CKopStP2.js +334 -0
- package/dist/observable-embedder-DQnNgf9O.d.ts +17 -0
- package/dist/observable-llm-client-uwqPADpN.d.ts +21 -0
- package/dist/observable-memory-store-BaZKbhgq.d.ts +73 -0
- package/dist/observable-retriever-Dt_NUxAA.d.ts +23 -0
- package/dist/operation-cancellation-CTKWwNHk.js +81 -0
- package/dist/paths-qVF-5uBq.d.ts +1 -0
- package/dist/plugin-config-schema-C0UUbOmG.d.ts +413 -0
- package/dist/plugin-config-schema-YJLyIIcJ.js +361 -0
- package/dist/profile-TWPJ_myr.d.ts +13 -0
- package/dist/profile-section-writer-hIphqpUY.js +2149 -0
- package/dist/provider-registration-CF1tg8Xy.js +721 -0
- package/dist/provider-runtime-types-DFhtdA6d.d.ts +134 -0
- package/dist/provider-types-CZGm6v88.d.ts +23 -0
- package/dist/redact-BTIZcHQL.d.ts +5 -0
- package/dist/reflection-command-hooks-BeQiJI9-.js +644 -0
- package/dist/reflection-command-hooks-C1Vxgb-O.d.ts +32 -0
- package/dist/reflection-deps-RpLPFrSc.d.ts +19 -0
- package/dist/reflection-embedded-generator-CDUhgV96.js +130 -0
- package/dist/reflection-embedded-generator-CxOex5xK.d.ts +14 -0
- package/dist/reflection-injection-hooks-DfUgqu8f.d.ts +43 -0
- package/dist/reflection-lifecycle-hooks-Ct5HBdSG.d.ts +27 -0
- package/dist/relation-dictionary-Cev1kyLe.js +4248 -0
- package/dist/release-download.d.ts +8 -0
- package/dist/release-download.js +32 -0
- package/dist/relevant-memories-context-m8nuFZcM.js +23 -0
- package/dist/rem-batch-executor-Cbm5gfSe.js +31644 -0
- package/dist/rem-batch-executor-bc0IFlp2.js +2 -0
- package/dist/rem-consumer-retrieval-CRpvG8KS.js +246 -0
- package/dist/rem-trigger-BTxkcjgT.js +729 -0
- package/dist/resolver-Dy-hnjCR.js +103 -0
- package/dist/results-C3ZLroMb.js +140 -0
- package/dist/retrieval-gate-Bx2Zg7jD.d.ts +31 -0
- package/dist/retriever-CygHBazG.js +1757 -0
- package/dist/retriever-Ruk3zp7_.d.ts +469 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/routes-Ce7SQKec.js +59 -0
- package/dist/runtime-audit-log-BCeujlEp.js +430 -0
- package/dist/runtime-audit-log-zpQiR9HT.d.ts +149 -0
- package/dist/scopes-CSOn6zdd.js +71 -0
- package/dist/scopes-CtrY-YQ3.d.ts +23 -0
- package/dist/server-BPAY4NTG.js +1410 -0
- package/dist/session-registry-DBoE7AvZ.d.ts +14 -0
- package/dist/sidecar/main.d.ts +1 -0
- package/dist/sidecar/main.js +56 -0
- package/dist/signed-registry-constants-Bv0fgZ8Q.d.ts +12 -0
- package/dist/signed-registry-constants-yq3DlG3B.js +82 -0
- package/dist/sno-station-mem-runtime-dependencies-Bu-MiqPX.d.ts +31 -0
- package/dist/sno-station-mem-runtime-dependencies-DjLOhB45.js +30 -0
- package/dist/sqlite-runtime-L_ywirTm.d.ts +58 -0
- package/dist/store-2pM0-dZg.d.ts +27 -0
- package/dist/store-DzpZBMEm.js +5830 -0
- package/dist/strategy-hook-runner-gBtU47tX.d.ts +16 -0
- package/dist/strategy-hook-runner-zmdIYOmQ.js +110 -0
- package/dist/token-counter-BD1f48Km.js +73 -0
- package/dist/trace-1t1n_wUm.d.ts +86 -0
- package/dist/types-DxKqU60b.d.ts +477 -0
- package/dist/types-pVomjzqR.d.ts +132 -0
- package/dist/unplaced-candidate-migration-CbQHzcEM.js +940 -0
- package/dist/utils-Ctb9aevJ.d.ts +34 -0
- package/drizzle/0000_initial.sql +10 -0
- package/drizzle/0001_virtual_tables.sql +34 -0
- package/drizzle/0002_add_indexes.sql +11 -0
- package/drizzle/0003_content_hash_lookup_index.sql +2 -0
- package/drizzle/0004_chunk_swap.sql +60 -0
- package/drizzle/0005_drop_legacy_vec_fts.sql +10 -0
- package/drizzle/0006_fts_simple.sql +45 -0
- package/drizzle/0007_restore_simple_fts.sql +40 -0
- package/drizzle/0008_widen_memory_hash_unique_index.sql +4 -0
- package/drizzle/0009_memory_telemetry.sql +109 -0
- package/drizzle/0010_provider_mappings.sql +27 -0
- package/drizzle/0011_db_optimization.sql +82 -0
- package/drizzle/0012_b_profile_lanes.sql +9 -0
- package/drizzle/0013_extraction_timestamps.sql +6 -0
- package/drizzle/0014_extraction_timestamp_source.sql +3 -0
- package/drizzle/0015_task_lifecycle_state.sql +101 -0
- package/drizzle/0016_task_lifecycle_legacy_migration.sql +144 -0
- package/drizzle/0017_unplaced_candidates.sql +15 -0
- package/drizzle/0018_rem_batch_chassis.sql +71 -0
- package/drizzle/0019_profile_recovery_entries.sql +17 -0
- package/drizzle/0020_rem_scan_retry_progress.down.sql +14 -0
- package/drizzle/0020_rem_scan_retry_progress.sql +24 -0
- package/drizzle/0021_rem_two_facet_storage.down.sql +14 -0
- package/drizzle/0021_rem_two_facet_storage.sql +42 -0
- package/drizzle/0022_rem_facet_chunk_versions.down.sql +4 -0
- package/drizzle/0022_rem_facet_chunk_versions.sql +4 -0
- package/drizzle/0023_rem_defect_ledger.sql +40 -0
- package/drizzle/0024_rem_unbuilt_foundations.down.sql +13 -0
- package/drizzle/0024_rem_unbuilt_foundations.sql +65 -0
- package/drizzle/0025_rem_journal_operation_constraint.sql +28 -0
- package/drizzle/0026_rem_journal_detail.sql +1 -0
- package/drizzle/0027_legacy_nodix_namespace.sql +3 -0
- package/drizzle/0028_memory_timezone.sql +23 -0
- package/drizzle/0029_rem_write_hash_symmetry.sql +17 -0
- package/drizzle/0030_atomic_memory_additive.sql +105 -0
- package/drizzle/0031_atomic_extraction_ledger.sql +23 -0
- package/drizzle/0032_atomic_memory_entities.sql +12 -0
- package/drizzle/0033_todo_own_store.sql +99 -0
- package/drizzle/meta/0000_snapshot.json +87 -0
- package/drizzle/meta/_journal.json +244 -0
- package/generated/rem-operations.json +1 -0
- package/package.json +126 -4
- package/scripts/download-simple-tokenizer.mjs +254 -0
- package/settings.default.json +243 -0
- package/skills/extract-atomic-memory/SKILL.md +298 -0
- package/skills/extract-atomic-memory/references/account-for-turns.md +9 -0
- package/skills/extract-atomic-memory/references/calendar-meaning.md +64 -0
- package/skills/extract-atomic-memory/references/capture.md +120 -0
- package/skills/extract-atomic-memory/references/enrichment.md +92 -0
- package/skills/extract-atomic-memory/references/missing-durable-half.md +6 -0
- package/skills/extract-atomic-memory/references/progress-classification.md +21 -0
- package/skills/extract-atomic-memory/references/resolve-subject.md +19 -0
- package/skills/extract-atomic-memory/references/surrounding-context.md +10 -0
- package/skills/extract-atomic-memory/references/user-subject-guard.md +29 -0
- package/skills/judge-group-closure/SKILL.md +25 -0
- package/skills/judge-rem-memory-updates/SKILL.md +56 -0
- package/skills/judge-rem-memory-updates/agents/openai.yaml +4 -0
- package/skills/judge-retired-position/SKILL.md +25 -0
- package/skills/judge-task-lifecycle/SKILL.md +45 -0
- package/skills/key-state-attribute/SKILL.md +16 -0
- package/skills/resolve-entity-identity/SKILL.md +24 -0
- package/skills/resolve-relative-time/SKILL.md +22 -0
- package/sqlite-extensions/LICENSE-simple-tokenizer +28 -0
- package/sqlite-extensions/LICENSE-sqlite-vec +21 -0
- package/sqlite-extensions/linux-arm64/vec0.so +0 -0
- package/sqlite-extensions/linux-x64/vec0.so +0 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import "./plugin-config-schema-C0UUbOmG.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { ContentType } from "@snoai/chunking";
|
|
4
|
+
//#region src/engine/extraction/memory-metadata-types.d.ts
|
|
5
|
+
type EntryLike = {
|
|
6
|
+
text?: string;
|
|
7
|
+
category?: MemoryCategory;
|
|
8
|
+
importance?: number;
|
|
9
|
+
timestamp?: number;
|
|
10
|
+
metadata?: string;
|
|
11
|
+
};
|
|
12
|
+
interface MemoryRelation {
|
|
13
|
+
/** Predicate / edge label (e.g. "friend_of", "owns", "lives_in"). */
|
|
14
|
+
type: string;
|
|
15
|
+
/** Object — memory id when known, otherwise canonical-name slug. */
|
|
16
|
+
targetId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional explicit subject. When omitted, the parent memory's
|
|
19
|
+
* `fact_key` is the implicit subject. Set explicitly when the
|
|
20
|
+
* relation describes a triple between two third parties (e.g. an
|
|
21
|
+
* `event` candidate that involves two entities).
|
|
22
|
+
*/
|
|
23
|
+
source?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const memoryCategory: z.ZodEnum<{
|
|
26
|
+
episodic: "episodic";
|
|
27
|
+
profile: "profile";
|
|
28
|
+
persona: "persona";
|
|
29
|
+
lesson: "lesson";
|
|
30
|
+
summary: "summary";
|
|
31
|
+
state: "state";
|
|
32
|
+
}>;
|
|
33
|
+
declare const memoryTier: z.ZodEnum<{
|
|
34
|
+
core: "core";
|
|
35
|
+
working: "working";
|
|
36
|
+
peripheral: "peripheral";
|
|
37
|
+
}>;
|
|
38
|
+
declare const memoryState: z.ZodEnum<{
|
|
39
|
+
pending: "pending";
|
|
40
|
+
confirmed: "confirmed";
|
|
41
|
+
archived: "archived";
|
|
42
|
+
}>;
|
|
43
|
+
declare const memorySource: z.ZodEnum<{
|
|
44
|
+
manual: "manual";
|
|
45
|
+
"ambient-learning": "ambient-learning";
|
|
46
|
+
agent_end: "agent_end";
|
|
47
|
+
reflection: "reflection";
|
|
48
|
+
"session-summary": "session-summary";
|
|
49
|
+
legacy: "legacy";
|
|
50
|
+
}>;
|
|
51
|
+
declare const memoryLayer: z.ZodEnum<{
|
|
52
|
+
durable: "durable";
|
|
53
|
+
working: "working";
|
|
54
|
+
reflection: "reflection";
|
|
55
|
+
archive: "archive";
|
|
56
|
+
}>;
|
|
57
|
+
type MemoryState = z.infer<typeof memoryState>;
|
|
58
|
+
type MemoryLayer = z.infer<typeof memoryLayer>;
|
|
59
|
+
type MemorySource = z.infer<typeof memorySource>;
|
|
60
|
+
type ActiveTaskStatusMetadata = "active" | "completed" | "removed";
|
|
61
|
+
type ActiveTaskOriginMetadata = {
|
|
62
|
+
kind: "runtime";
|
|
63
|
+
source_id: string;
|
|
64
|
+
normalized_description: string;
|
|
65
|
+
} | {
|
|
66
|
+
kind: "legacy";
|
|
67
|
+
omnibus_row_id: string;
|
|
68
|
+
item_index: number;
|
|
69
|
+
legacy_item_id: string;
|
|
70
|
+
};
|
|
71
|
+
type ActiveTaskLifecycleMetadata = {
|
|
72
|
+
from: ActiveTaskStatusMetadata | null;
|
|
73
|
+
to: ActiveTaskStatusMetadata;
|
|
74
|
+
at: number;
|
|
75
|
+
source_id: string;
|
|
76
|
+
};
|
|
77
|
+
declare const activeTaskStatus: z.ZodEnum<{
|
|
78
|
+
active: "active";
|
|
79
|
+
completed: "completed";
|
|
80
|
+
removed: "removed";
|
|
81
|
+
}>;
|
|
82
|
+
declare const activeTaskOrigin: z.ZodType<ActiveTaskOriginMetadata>;
|
|
83
|
+
declare const activeTaskLifecycleEvent: z.ZodType<ActiveTaskLifecycleMetadata>;
|
|
84
|
+
type MemoryMetadataCommonShape = {
|
|
85
|
+
l0_abstract: z.ZodString;
|
|
86
|
+
l1_overview: z.ZodString;
|
|
87
|
+
l2_content: z.ZodString;
|
|
88
|
+
tier: typeof memoryTier;
|
|
89
|
+
access_count: z.ZodNumber;
|
|
90
|
+
confidence: z.ZodNumber;
|
|
91
|
+
last_accessed_at: z.ZodNumber;
|
|
92
|
+
asserted_at: z.ZodNumber;
|
|
93
|
+
valid_from: z.ZodNumber;
|
|
94
|
+
invalidated_at: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
fact_key: z.ZodOptional<z.ZodString>;
|
|
96
|
+
supersedes: z.ZodOptional<z.ZodString>;
|
|
97
|
+
superseded_by: z.ZodOptional<z.ZodString>;
|
|
98
|
+
relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
99
|
+
type: z.ZodString;
|
|
100
|
+
targetId: z.ZodString;
|
|
101
|
+
source: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}>>>;
|
|
103
|
+
source_session: z.ZodOptional<z.ZodString>;
|
|
104
|
+
state: typeof memoryState;
|
|
105
|
+
source: typeof memorySource;
|
|
106
|
+
memory_layer: typeof memoryLayer;
|
|
107
|
+
injected_count: z.ZodNumber;
|
|
108
|
+
last_injected_at: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
last_confirmed_use_at: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
bad_recall_count: z.ZodNumber;
|
|
111
|
+
suppressed_until_turn: z.ZodNumber;
|
|
112
|
+
canonical_id: z.ZodOptional<z.ZodString>;
|
|
113
|
+
memory_temporal_type: z.ZodOptional<z.ZodEnum<{
|
|
114
|
+
static: "static";
|
|
115
|
+
dynamic: "dynamic";
|
|
116
|
+
}>>;
|
|
117
|
+
temporal_resolution_status: z.ZodOptional<z.ZodEnum<{
|
|
118
|
+
resolved: "resolved";
|
|
119
|
+
unresolved: "unresolved";
|
|
120
|
+
static: "static";
|
|
121
|
+
}>>;
|
|
122
|
+
temporal_phrase: z.ZodOptional<z.ZodString>;
|
|
123
|
+
valid_until: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
merge_lineage: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
};
|
|
126
|
+
declare const memoryMetadataBase: z.ZodObject<MemoryMetadataCommonShape & {
|
|
127
|
+
kind: typeof memoryCategory;
|
|
128
|
+
memory_category: typeof memoryCategory;
|
|
129
|
+
}>;
|
|
130
|
+
declare const episodicMetadata: z.ZodObject<Omit<MemoryMetadataCommonShape, "valid_from"> & {
|
|
131
|
+
valid_from: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
kind: z.ZodLiteral<"episodic">;
|
|
133
|
+
memory_category: z.ZodLiteral<"episodic">;
|
|
134
|
+
event_at: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
135
|
+
entity_kind: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
137
|
+
declare const profileMetadata: z.ZodObject<MemoryMetadataCommonShape & {
|
|
138
|
+
kind: z.ZodLiteral<"profile">;
|
|
139
|
+
memory_category: z.ZodLiteral<"profile">;
|
|
140
|
+
section_name: z.ZodString;
|
|
141
|
+
rawTopicPhrase: z.ZodOptional<z.ZodString>;
|
|
142
|
+
active_task_kind: z.ZodOptional<z.ZodEnum<{
|
|
143
|
+
task: "task";
|
|
144
|
+
projection: "projection";
|
|
145
|
+
}>>;
|
|
146
|
+
active_task_id: z.ZodOptional<z.ZodString>;
|
|
147
|
+
active_task_origin: z.ZodOptional<typeof activeTaskOrigin>;
|
|
148
|
+
active_task_status: z.ZodOptional<typeof activeTaskStatus>;
|
|
149
|
+
active_task_created_at: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
active_task_transitioned_at: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
active_task_lifecycle: z.ZodOptional<z.ZodArray<typeof activeTaskLifecycleEvent>>;
|
|
152
|
+
active_task_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
|
+
active_task_titles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
155
|
+
declare const personaMetadata: z.ZodObject<MemoryMetadataCommonShape & {
|
|
156
|
+
kind: z.ZodLiteral<"persona">;
|
|
157
|
+
memory_category: z.ZodLiteral<"persona">;
|
|
158
|
+
section_name: z.ZodString;
|
|
159
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
160
|
+
declare const lessonMetadata: z.ZodObject<MemoryMetadataCommonShape & {
|
|
161
|
+
kind: z.ZodLiteral<"lesson">;
|
|
162
|
+
memory_category: z.ZodLiteral<"lesson">;
|
|
163
|
+
anti_pattern_signature: z.ZodString;
|
|
164
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
165
|
+
declare const summaryMetadata: z.ZodObject<MemoryMetadataCommonShape & {
|
|
166
|
+
kind: z.ZodLiteral<"summary">;
|
|
167
|
+
memory_category: z.ZodLiteral<"summary">;
|
|
168
|
+
children_ids: z.ZodArray<z.ZodString>;
|
|
169
|
+
depth: z.ZodNumber;
|
|
170
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
171
|
+
declare const stateMetadata: z.ZodObject<MemoryMetadataCommonShape & {
|
|
172
|
+
kind: z.ZodLiteral<"state">;
|
|
173
|
+
memory_category: z.ZodLiteral<"state">;
|
|
174
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
175
|
+
declare const memoryMetadata: z.ZodDiscriminatedUnion<[typeof episodicMetadata, typeof profileMetadata, typeof personaMetadata, typeof lessonMetadata, typeof summaryMetadata, typeof stateMetadata], "kind">;
|
|
176
|
+
type InsightMetadata = z.infer<typeof memoryMetadata>;
|
|
177
|
+
type InsightMetadataPatch = Partial<z.input<typeof memoryMetadataBase>> & Record<string, unknown>;
|
|
178
|
+
/**
|
|
179
|
+
* Flat inferred type of the shared insight-metadata base (all category-agnostic
|
|
180
|
+
* fields). This is the single source the loose `MemoryMetadata` structural view
|
|
181
|
+
* in `@/shared/types` derives its insight fields from — so a new field on the
|
|
182
|
+
* Zod schema (or a changed enum) propagates without hand-copying. The 5 category
|
|
183
|
+
* variants add a few discriminant-gated extras (event_at, entity_kind,
|
|
184
|
+
* section_name, anti_pattern_signature, children_ids, depth) that a
|
|
185
|
+
* discriminated union cannot be flattened into automatically; `MemoryMetadata`
|
|
186
|
+
* mirrors those six by hand. A compile-time assignability guard is not viable
|
|
187
|
+
* because the variants use `.catchall(z.unknown())`, whose index signature
|
|
188
|
+
* makes every storage-only field on `MemoryMetadata` resolve to `unknown`; the
|
|
189
|
+
* base-field bulk is instead kept in sync structurally via the `Partial<…>` it
|
|
190
|
+
* feeds, and the six extras are the only hand-maintained mirror.
|
|
191
|
+
*/
|
|
192
|
+
type MemoryMetadataBaseFields = z.infer<typeof memoryMetadataBase>;
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/engine/shared/types.d.ts
|
|
195
|
+
declare const MEMORY_CATEGORIES: readonly ["episodic", "profile", "persona", "lesson", "summary", "state"];
|
|
196
|
+
type MemoryCategory = (typeof MEMORY_CATEGORIES)[number];
|
|
197
|
+
type MemoryLane = "active" | "parked" | "quarantined";
|
|
198
|
+
declare const CANDIDATE_EXTRACTION_TRACE_VERSION = "insight-distill-2026-06-27";
|
|
199
|
+
interface MemoryEntry {
|
|
200
|
+
id: string;
|
|
201
|
+
factId?: string;
|
|
202
|
+
text: string;
|
|
203
|
+
category: MemoryCategory;
|
|
204
|
+
projectId: string;
|
|
205
|
+
importance: number;
|
|
206
|
+
timestamp: number;
|
|
207
|
+
timezone: string;
|
|
208
|
+
metadata: string;
|
|
209
|
+
contentHash: string;
|
|
210
|
+
lane: MemoryLane;
|
|
211
|
+
rawCandidateJson?: string;
|
|
212
|
+
dispositionReason?: string;
|
|
213
|
+
dispositionedAt?: number;
|
|
214
|
+
}
|
|
215
|
+
interface MemorySearchResult {
|
|
216
|
+
entry: MemoryEntry;
|
|
217
|
+
score: number;
|
|
218
|
+
/** Stable counted-event identity shared by current and history facets. */
|
|
219
|
+
eventIdentity?: string;
|
|
220
|
+
/** Rows in the filtered readable scope before the aggregation output ceiling. */
|
|
221
|
+
scopeRowCount?: number;
|
|
222
|
+
/** True when the requested aggregation population is not fully represented. */
|
|
223
|
+
aggregationIncomplete?: boolean;
|
|
224
|
+
distance?: number;
|
|
225
|
+
rank?: number;
|
|
226
|
+
/**
|
|
227
|
+
* Per-branch winning chunk id (the chunk that produced the highest score
|
|
228
|
+
* within the branch that emitted this result), populated by chunk-aware
|
|
229
|
+
* search wrappers (`searchSemantic` / `searchKeyword`). Required by the
|
|
230
|
+
* chunk-level reranker (PRD §6.0.1) to fetch `bestChunkVector` and by
|
|
231
|
+
* snippet expansion (PRD §6.M2) to anchor the neighbor window.
|
|
232
|
+
*/
|
|
233
|
+
chunkId?: string;
|
|
234
|
+
/** Chunk index of the winning chunk within its parent memory. */
|
|
235
|
+
chunkIndex?: number;
|
|
236
|
+
/**
|
|
237
|
+
* Chunk-level score of the winning chunk before any fusion or rerank
|
|
238
|
+
* blending. Survives RRF fusion so the snippet anchor rule (PRD §4) can
|
|
239
|
+
* pick a deterministic winner when both branches surface the same parent
|
|
240
|
+
* with different best chunks.
|
|
241
|
+
*/
|
|
242
|
+
bestChunkScore?: number;
|
|
243
|
+
/**
|
|
244
|
+
* Winning-chunk + neighbor snippet assembled by snippet expansion
|
|
245
|
+
* (PRD §M2). Empty string is treated as no-snippet; consumers must fall
|
|
246
|
+
* back to `entry.text` when undefined or empty.
|
|
247
|
+
*/
|
|
248
|
+
snippet?: string;
|
|
249
|
+
}
|
|
250
|
+
declare const AGGREGATION_OPERATIONS: readonly ["count", "first", "last", "evidence"];
|
|
251
|
+
type AggregationOperation = (typeof AGGREGATION_OPERATIONS)[number];
|
|
252
|
+
interface AggregationQuery {
|
|
253
|
+
operation: AggregationOperation;
|
|
254
|
+
terms: string[];
|
|
255
|
+
}
|
|
256
|
+
/** Memory tier levels for lifecycle management. */
|
|
257
|
+
type MemoryTier = "core" | "working" | "peripheral";
|
|
258
|
+
declare const DEFAULT_MEMORY_TIER: MemoryTier;
|
|
259
|
+
/**
|
|
260
|
+
* Structural type for the JSON stored in `MemoryEntry.metadata`.
|
|
261
|
+
* All fields optional — legacy rows may lack any of them. Tier 1 suppression
|
|
262
|
+
* fields (last_bad_recall_at, bad_recall_count, suppressed_until_ms) lazy-heal
|
|
263
|
+
* on first write. `intrinsic` carries Retention Scorer inputs. Mixed
|
|
264
|
+
* camelCase + snake_case is intentional — matches the dual-style metadata
|
|
265
|
+
* persisted historically (e.g. accessCount + access_count).
|
|
266
|
+
*/
|
|
267
|
+
interface MemoryMetadata extends Partial<MemoryMetadataBaseFields> {
|
|
268
|
+
accessCount?: number;
|
|
269
|
+
lastAccessedAt?: number;
|
|
270
|
+
last_bad_recall_at?: number;
|
|
271
|
+
suppressed_until_ms?: number;
|
|
272
|
+
contexts?: string[];
|
|
273
|
+
intrinsic?: {
|
|
274
|
+
confidence?: number;
|
|
275
|
+
importance?: number;
|
|
276
|
+
};
|
|
277
|
+
rem_update_source_version?: string;
|
|
278
|
+
rem_update_rewrite_config?: {
|
|
279
|
+
implementationVersion: string;
|
|
280
|
+
memoryKind: "profile" | "episodic";
|
|
281
|
+
locale: string;
|
|
282
|
+
localeResource: Readonly<Record<string, string>>;
|
|
283
|
+
};
|
|
284
|
+
rem_update_idempotency_key?: string;
|
|
285
|
+
event_at?: string | number;
|
|
286
|
+
entity_kind?: string;
|
|
287
|
+
section_name?: string;
|
|
288
|
+
rawTopicPhrase?: string;
|
|
289
|
+
anti_pattern_signature?: string;
|
|
290
|
+
children_ids?: string[];
|
|
291
|
+
depth?: number;
|
|
292
|
+
}
|
|
293
|
+
/** Decay score for a single memory (from decay-engine). */
|
|
294
|
+
interface DecayScore {
|
|
295
|
+
memoryId: string;
|
|
296
|
+
recency: number;
|
|
297
|
+
frequency: number;
|
|
298
|
+
intrinsic: number;
|
|
299
|
+
composite: number;
|
|
300
|
+
}
|
|
301
|
+
/** Minimal memory fields needed for decay calculation. */
|
|
302
|
+
interface DecayableMemory {
|
|
303
|
+
id: string;
|
|
304
|
+
importance: number;
|
|
305
|
+
confidence: number;
|
|
306
|
+
tier: MemoryTier;
|
|
307
|
+
accessCount: number;
|
|
308
|
+
createdAt: number;
|
|
309
|
+
lastAccessedAt: number;
|
|
310
|
+
metadata?: string;
|
|
311
|
+
temporalType?: "static" | "dynamic";
|
|
312
|
+
}
|
|
313
|
+
/** Subject-predicate-object triple emitted by extraction. */
|
|
314
|
+
interface CandidateRelation {
|
|
315
|
+
/** Predicate / edge label. */
|
|
316
|
+
type: string;
|
|
317
|
+
/**
|
|
318
|
+
* Object — canonical-name slug or memory id. Client stores whatever
|
|
319
|
+
* the LLM produces; cloud-side resolves slugs to memory ids.
|
|
320
|
+
*/
|
|
321
|
+
target: string;
|
|
322
|
+
/**
|
|
323
|
+
* Optional explicit subject. Defaults to the parent candidate's
|
|
324
|
+
* `fact_key` (typically the entity's canonical-name slug). Set when
|
|
325
|
+
* the relation describes two third parties (e.g. on an `episodic`
|
|
326
|
+
* candidate).
|
|
327
|
+
*/
|
|
328
|
+
source?: string;
|
|
329
|
+
}
|
|
330
|
+
interface CandidateExtractionTrace {
|
|
331
|
+
source: "llm-conversation-chunk" | "explicit-command-chunk";
|
|
332
|
+
chunkIndex: number;
|
|
333
|
+
chunkCount: number;
|
|
334
|
+
startOffset: number;
|
|
335
|
+
endOffset: number;
|
|
336
|
+
tokenCount: number;
|
|
337
|
+
contentType: ContentType;
|
|
338
|
+
chunkingVersion: string;
|
|
339
|
+
candidateIndex: number;
|
|
340
|
+
extractorVersion?: string;
|
|
341
|
+
}
|
|
342
|
+
/** A candidate memory extracted from conversation by LLM. */
|
|
343
|
+
interface CandidateMemory {
|
|
344
|
+
category: MemoryCategory;
|
|
345
|
+
/** L0: one-sentence index */
|
|
346
|
+
abstract: string;
|
|
347
|
+
/** L1: structured markdown summary */
|
|
348
|
+
overview: string;
|
|
349
|
+
/** L2: full narrative */
|
|
350
|
+
content: string;
|
|
351
|
+
/** Canonical profile/persona section name. Required for profile/persona candidates. */
|
|
352
|
+
sectionName?: string;
|
|
353
|
+
/** Original B-profile topic phrase retained for deterministic registry re-keying. */
|
|
354
|
+
rawTopicPhrase?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Index of the user turn this candidate came from, recorded by the caller's own loop.
|
|
357
|
+
* It is never asked of the model: the deployed B-profile adapter answered "1" to 60 of 60
|
|
358
|
+
* position probes, so a model-reported position was never a truthful value.
|
|
359
|
+
*/
|
|
360
|
+
sourceTurnIndex?: number;
|
|
361
|
+
/** Retrieval visibility selected by the B-profile no-drop classifier. */
|
|
362
|
+
lane?: MemoryLane;
|
|
363
|
+
/** Exact producer candidate retained for parked and quarantined audit rows. */
|
|
364
|
+
rawCandidateJson?: string;
|
|
365
|
+
/** Source messages cited by the producer, used by the universal subject gate. */
|
|
366
|
+
gateEvidenceText?: string;
|
|
367
|
+
/** Closed disposition code explaining a non-active row. */
|
|
368
|
+
dispositionReason?: string;
|
|
369
|
+
/** Structured lesson dedupe signature. Required for lesson candidates. */
|
|
370
|
+
antiPatternSignature?: string;
|
|
371
|
+
/** Summary child ids. Summary is system-derived, not ambient-extracted. */
|
|
372
|
+
childrenIds?: string[];
|
|
373
|
+
/** Summary hierarchy depth. Summary is system-derived, not ambient-extracted. */
|
|
374
|
+
summaryDepth?: number;
|
|
375
|
+
/**
|
|
376
|
+
* Absolute event timestamp, ISO-8601. Set on episodic candidates only
|
|
377
|
+
* when the LLM resolves an absolute date from the conversation.
|
|
378
|
+
*/
|
|
379
|
+
eventAt?: string;
|
|
380
|
+
/** Original temporal phrase when the interval was mentioned in relative language. */
|
|
381
|
+
temporalPhrase?: string;
|
|
382
|
+
/**
|
|
383
|
+
* Typed entity nature. Open vocabulary — suggested values: person,
|
|
384
|
+
* pet, project, place, business, artwork, organization.
|
|
385
|
+
*/
|
|
386
|
+
entityKind?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Triples connecting this candidate to other entities. Implicit
|
|
389
|
+
* subject = the candidate's canonical name (its `fact_key`). Episodic
|
|
390
|
+
* candidates only; set `source` only when the relation does not anchor
|
|
391
|
+
* to this candidate.
|
|
392
|
+
*/
|
|
393
|
+
relations?: CandidateRelation[];
|
|
394
|
+
extractionTrace?: CandidateExtractionTrace;
|
|
395
|
+
}
|
|
396
|
+
/** Dedup decision from LLM. */
|
|
397
|
+
type DedupDecision = "create" | "skip";
|
|
398
|
+
interface DedupResult {
|
|
399
|
+
decision: DedupDecision;
|
|
400
|
+
reason: string;
|
|
401
|
+
}
|
|
402
|
+
interface ExtractionStats {
|
|
403
|
+
created: number;
|
|
404
|
+
merged: number;
|
|
405
|
+
skipped: number;
|
|
406
|
+
/** Admission control rejections. */
|
|
407
|
+
rejected?: number;
|
|
408
|
+
/**
|
|
409
|
+
* Write attempts preserved outside the memory table because no gate could
|
|
410
|
+
* place them. Neither created nor skipped: nothing reached memory, and nothing
|
|
411
|
+
* was passed over.
|
|
412
|
+
*/
|
|
413
|
+
unplaced?: number;
|
|
414
|
+
boundarySkipped?: number;
|
|
415
|
+
/** LLM extraction calls that failed before yielding candidates. */
|
|
416
|
+
llmFailures?: number;
|
|
417
|
+
/** Candidate processing failures after extraction yielded memories. */
|
|
418
|
+
processingFailures?: number;
|
|
419
|
+
/** Memory kinds whose failed model work still needs deterministic capture. */
|
|
420
|
+
deterministicFallbackCategories?: MemoryCategory[];
|
|
421
|
+
/** Timestamp ladder fallbacks, split by mutation site and selected source. */
|
|
422
|
+
taskTimestampFallbacks?: {
|
|
423
|
+
mutationSessionDateTime: number;
|
|
424
|
+
mutationValidAtNow: number;
|
|
425
|
+
completionSessionDateTime: number;
|
|
426
|
+
completionValidAtNow: number;
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
/** Validate and normalize a category string to a foundation kind. */
|
|
430
|
+
declare function normalizeCategory(raw: string): MemoryCategory | undefined;
|
|
431
|
+
interface RetrievalResult {
|
|
432
|
+
entry: MemoryEntry;
|
|
433
|
+
score: number;
|
|
434
|
+
/** Stable counted-event identity shared by current and history facets. */
|
|
435
|
+
eventIdentity?: string;
|
|
436
|
+
/** Rows in the filtered readable scope before the aggregation output ceiling. */
|
|
437
|
+
scopeRowCount?: number;
|
|
438
|
+
/** True when an aggregation had to return a ranked page instead of a known population. */
|
|
439
|
+
aggregationIncomplete?: boolean;
|
|
440
|
+
sources: {
|
|
441
|
+
vector?: {
|
|
442
|
+
score: number;
|
|
443
|
+
rank: number;
|
|
444
|
+
};
|
|
445
|
+
bm25?: {
|
|
446
|
+
score: number;
|
|
447
|
+
rank: number;
|
|
448
|
+
};
|
|
449
|
+
fused?: {
|
|
450
|
+
score: number;
|
|
451
|
+
};
|
|
452
|
+
reranked?: {
|
|
453
|
+
score: number;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
/** Per-branch winning chunk metadata, propagated from `MemorySearchResult`. */
|
|
457
|
+
chunkId?: string;
|
|
458
|
+
chunkIndex?: number;
|
|
459
|
+
/** Survives RRF fusion via the anchor rule (PRD §4): higher branch wins, semantic tie-break. */
|
|
460
|
+
bestChunkScore?: number;
|
|
461
|
+
/** Winning-chunk + neighbor snippet from M2 snippet expansion. */
|
|
462
|
+
snippet?: string;
|
|
463
|
+
/**
|
|
464
|
+
* The (project, subject, attribute) group a recall row was expanded from. Set only on
|
|
465
|
+
* group-expanded manual-recall rows, so the token packer can keep a group's newest member with
|
|
466
|
+
* it rather than serving an older sibling alone.
|
|
467
|
+
*/
|
|
468
|
+
recallGroupKey?: string;
|
|
469
|
+
/** Per-stage scores (PRD §5.2). Each pipeline stage populates the field it owns. */
|
|
470
|
+
denseScore?: number;
|
|
471
|
+
bm25Score?: number;
|
|
472
|
+
fusedScore?: number;
|
|
473
|
+
rerankScore?: number;
|
|
474
|
+
mmrScore?: number;
|
|
475
|
+
}
|
|
476
|
+
//#endregion
|
|
477
|
+
export { EntryLike as C, MemoryRelation as D, MemoryLayer as E, MemorySource as O, normalizeCategory as S, InsightMetadataPatch as T, MemoryLane as _, CandidateExtractionTrace as a, MemoryTier as b, DEFAULT_MEMORY_TIER as c, DedupDecision as d, DedupResult as f, MemoryEntry as g, MemoryCategory as h, CANDIDATE_EXTRACTION_TRACE_VERSION as i, MemoryState as k, DecayScore as l, MEMORY_CATEGORIES as m, AggregationOperation as n, CandidateMemory as o, ExtractionStats as p, AggregationQuery as r, CandidateRelation as s, AGGREGATION_OPERATIONS as t, DecayableMemory as u, MemoryMetadata as v, InsightMetadata as w, RetrievalResult as x, MemorySearchResult as y };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
//#region src/engine/rem/types.d.ts
|
|
2
|
+
declare const REM_OPERATION_TYPES: readonly ["rem-update", "rem-replace", "rem-distill", "rem-retire"];
|
|
3
|
+
declare const REM_BUILT_OPERATION_TYPES: readonly ["rem-update", "rem-replace"];
|
|
4
|
+
type RemOperationType = (typeof REM_OPERATION_TYPES)[number];
|
|
5
|
+
type RemBuiltOperationType = (typeof REM_BUILT_OPERATION_TYPES)[number];
|
|
6
|
+
declare function parseRemOperationType(value: string): RemOperationType | undefined;
|
|
7
|
+
declare const REM_JOB_STATES: readonly ["queued", "running", "done", "failed"];
|
|
8
|
+
type RemJobState = (typeof REM_JOB_STATES)[number];
|
|
9
|
+
declare const REM_ROW_STATES: readonly ["transition", "stale-current", "pure-negation", "ambiguous"];
|
|
10
|
+
type RemRowState = (typeof REM_ROW_STATES)[number];
|
|
11
|
+
type RemOwner = "restate" | "verdict" | "none";
|
|
12
|
+
interface RemStatementLike {
|
|
13
|
+
get(...params: unknown[]): unknown;
|
|
14
|
+
all(...params: unknown[]): unknown[];
|
|
15
|
+
run(...params: unknown[]): unknown;
|
|
16
|
+
}
|
|
17
|
+
interface RemTransactionLike {
|
|
18
|
+
(...args: unknown[]): unknown;
|
|
19
|
+
immediate(...args: unknown[]): unknown;
|
|
20
|
+
}
|
|
21
|
+
interface RemDatabaseLike {
|
|
22
|
+
prepare(sql: string): RemStatementLike;
|
|
23
|
+
exec(sql: string): unknown;
|
|
24
|
+
transaction(fn: (...args: never[]) => unknown): RemTransactionLike;
|
|
25
|
+
}
|
|
26
|
+
interface RemClockPort {
|
|
27
|
+
now(): string;
|
|
28
|
+
}
|
|
29
|
+
interface MoveLaneInput {
|
|
30
|
+
rowId: string;
|
|
31
|
+
plannedContentHash: string;
|
|
32
|
+
targetLane: "active" | "parked" | "quarantined";
|
|
33
|
+
reason: string;
|
|
34
|
+
timestamp: string;
|
|
35
|
+
}
|
|
36
|
+
interface WriteTextVersionInput {
|
|
37
|
+
rowId: string;
|
|
38
|
+
plannedContentHash: string;
|
|
39
|
+
/**
|
|
40
|
+
* The invoking job, required so the journal row this write produces can name it. Callers never
|
|
41
|
+
* supply these two: `RemWriterOperation` omits them exactly as it omits `rowId`, and the mutation
|
|
42
|
+
* executor fills all four from the attempt it was opened with. That is the point — an identity a
|
|
43
|
+
* caller cannot pass is an identity a caller cannot pass wrongly, and one the executor must pass
|
|
44
|
+
* is one nobody can forget.
|
|
45
|
+
*/
|
|
46
|
+
jobId: string;
|
|
47
|
+
jobType: RemOperationType;
|
|
48
|
+
/**
|
|
49
|
+
* The verified-write attempt this write belongs to. Filled by the mutation executor from the
|
|
50
|
+
* attempt it opened, never by a caller, for the same reason `jobId` and `jobType` are: the
|
|
51
|
+
* write transaction stamps the content hash it produced onto this attempt so crash recovery can
|
|
52
|
+
* tell a committed write from a lost one.
|
|
53
|
+
*/
|
|
54
|
+
attemptId: string;
|
|
55
|
+
replacementText: string;
|
|
56
|
+
historyText?: string;
|
|
57
|
+
supersededItems?: readonly string[];
|
|
58
|
+
sourceVersion?: string;
|
|
59
|
+
rewriteConfig?: RemUpdateRewriteConfig;
|
|
60
|
+
idempotencyKey?: string;
|
|
61
|
+
reason: string;
|
|
62
|
+
timestamp: string;
|
|
63
|
+
}
|
|
64
|
+
interface RemUpdateRewriteConfig {
|
|
65
|
+
implementationVersion: string;
|
|
66
|
+
memoryKind: "profile" | "episodic" | "state";
|
|
67
|
+
locale: string;
|
|
68
|
+
localeResource: Readonly<{
|
|
69
|
+
valuePrefix: string;
|
|
70
|
+
listPrefix: string;
|
|
71
|
+
listSeparator: string;
|
|
72
|
+
spanSeparator: string;
|
|
73
|
+
anchorMode: "capitalized-sequence" | "explicit-script";
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
interface SoftCloseInput {
|
|
77
|
+
rowId: string;
|
|
78
|
+
successorId: string;
|
|
79
|
+
plannedContentHash: string;
|
|
80
|
+
plannedSuccessorContentHash: string;
|
|
81
|
+
reason: string;
|
|
82
|
+
timestamp: string;
|
|
83
|
+
}
|
|
84
|
+
type RemMutationRefusalReason = "content_changed" | "already_applied" | "missing" | "target_changed" | "target_missing";
|
|
85
|
+
type RemMutationResult = {
|
|
86
|
+
applied: true;
|
|
87
|
+
contentHash: string;
|
|
88
|
+
recoveryHandle: string;
|
|
89
|
+
} | {
|
|
90
|
+
applied: false;
|
|
91
|
+
reason: RemMutationRefusalReason;
|
|
92
|
+
};
|
|
93
|
+
interface RemConflictPort {
|
|
94
|
+
softClose(input: SoftCloseInput): Promise<RemMutationResult>;
|
|
95
|
+
writeTextVersion(input: WriteTextVersionInput): Promise<RemMutationResult>;
|
|
96
|
+
}
|
|
97
|
+
interface RemForgetPort {
|
|
98
|
+
moveLane(input: MoveLaneInput): Promise<RemMutationResult>;
|
|
99
|
+
}
|
|
100
|
+
interface RemPorts {
|
|
101
|
+
clock: RemClockPort;
|
|
102
|
+
conflict: RemConflictPort;
|
|
103
|
+
forget: RemForgetPort;
|
|
104
|
+
}
|
|
105
|
+
interface RemEnableGateArtifact {
|
|
106
|
+
schema_version: number;
|
|
107
|
+
job_type: RemBuiltOperationType;
|
|
108
|
+
implementation_version: string;
|
|
109
|
+
corpus_sha256: string;
|
|
110
|
+
baseline_sha256: string;
|
|
111
|
+
result: "pass" | "fail";
|
|
112
|
+
evaluated_at: string;
|
|
113
|
+
expires_at: string;
|
|
114
|
+
}
|
|
115
|
+
type RemVerdictCheckpoint = "before_llm" | "cancellation_requested" | "verdict_recorded" | "action_applied";
|
|
116
|
+
interface RemConfig {
|
|
117
|
+
stages: Readonly<Record<string, boolean>>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Refuses a write whose audit identity is not real. A required `string` is not proof of one:
|
|
121
|
+
* TypeScript accepts `""`, the journal's `job_id`/`job_type` columns are `NOT NULL` but not
|
|
122
|
+
* non-blank, and a JavaScript caller can omit the field entirely.
|
|
123
|
+
*
|
|
124
|
+
* No valid identity, no write — the whole operation is refused before any transaction opens. This
|
|
125
|
+
* does not rescue the write; it refuses it, which is the intended trade: an unattributable row in
|
|
126
|
+
* the audit ledger is worse than a refused operation the caller can see and retry.
|
|
127
|
+
*
|
|
128
|
+
* The accepted set is `REM_OPERATION_TYPES` itself, so the runtime check and the type cannot drift.
|
|
129
|
+
*/
|
|
130
|
+
declare function assertJobIdentity(jobId: string, jobType: string): void;
|
|
131
|
+
//#endregion
|
|
132
|
+
export { RemVerdictCheckpoint as C, parseRemOperationType as D, assertJobIdentity as E, RemUpdateRewriteConfig as S, WriteTextVersionInput as T, RemOwner as _, REM_ROW_STATES as a, RemStatementLike as b, RemConfig as c, RemEnableGateArtifact as d, RemForgetPort as f, RemOperationType as g, RemMutationResult as h, REM_OPERATION_TYPES as i, RemConflictPort as l, RemMutationRefusalReason as m, REM_BUILT_OPERATION_TYPES as n, RemBuiltOperationType as o, RemJobState as p, REM_JOB_STATES as r, RemClockPort as s, MoveLaneInput as t, RemDatabaseLike as u, RemPorts as v, SoftCloseInput as w, RemTransactionLike as x, RemRowState as y };
|