@snoai/memory 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +176 -0
- package/README.md +33 -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-BbEvEocb.d.ts +110 -0
- package/dist/adapter-B7Jox9-6.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-C5rmogoY.js +3605 -0
- package/dist/atomic-memory-extraction-d9EG-4ti.d.ts +327 -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-CxbHPkMX.d.ts +53 -0
- package/dist/capture-policy-detector-DaMfy9CZ.js +357 -0
- package/dist/classifier-DnbbtwTS.d.ts +272 -0
- package/dist/client.d.ts +34 -0
- package/dist/client.js +306 -0
- package/dist/coding-skin.d.ts +51 -0
- package/dist/coding-skin.js +55 -0
- package/dist/config-CL90qYva.js +2576 -0
- package/dist/connection-3IVXpuPE.d.ts +391 -0
- package/dist/connection-C9YD5sgm.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-Bl3lthzE.d.ts +30 -0
- package/dist/data-bootstrap-P8sie9WA.js +172 -0
- package/dist/data-paths-C7sNdqvP.d.ts +22 -0
- package/dist/derived-suppression-cache-CI0durYx.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-0aqS8pVF.d.ts +351 -0
- package/dist/index-BO4RU_mc.d.ts +650 -0
- package/dist/index-DL8AVj0Z.d.ts +571 -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 +62 -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 +36 -0
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.js +104 -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-BSYUAcUb.js +1374 -0
- package/dist/llm-client-DOTSGzhe.d.ts +51 -0
- package/dist/locales-JxGmkG6t.d.ts +7 -0
- package/dist/log-site-catalog.generated-BMKWj-Nx.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-BiuRjSJc.d.ts +23 -0
- package/dist/memory-metadata-codec-DL1sbJiN.js +577 -0
- package/dist/memory-metadata-codec-DUvsYe_X.d.ts +68 -0
- package/dist/memory-runtime-DqUS4cWi.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-CqY1BUUA.d.ts +16 -0
- package/dist/memory-source-order-YMRoeDLd.js +134 -0
- package/dist/memory-store-base-CQ_bHlYA.d.ts +1094 -0
- package/dist/memory-store-shared-DqpWJXZZ.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-BUjXG5o7.js +184 -0
- package/dist/memory-temporality-classifier-Brht5jyK.d.ts +43 -0
- package/dist/memory-tier-promoter-CqGxCkue.d.ts +43 -0
- package/dist/memory-tool-dependencies-CatGzI9R.d.ts +14 -0
- package/dist/memory-tool-dependencies-DjUoelnm.js +19 -0
- package/dist/model-call-table-CspopkBg.js +563 -0
- package/dist/model-reply-text-CKopStP2.js +334 -0
- package/dist/observable-embedder-CNNe9gkg.d.ts +17 -0
- package/dist/observable-llm-client-CRuKlefQ.d.ts +21 -0
- package/dist/observable-memory-store-CnGDpOY5.d.ts +73 -0
- package/dist/observable-retriever-Cooc62Qw.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-BhGKPBjw.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-ClUl-iv6.js +644 -0
- package/dist/reflection-command-hooks-G1-dI2Av.d.ts +32 -0
- package/dist/reflection-deps-Ccm2Jf5W.d.ts +19 -0
- package/dist/reflection-embedded-generator-BRvqV5N-.js +130 -0
- package/dist/reflection-embedded-generator-kfQfKEYV.d.ts +14 -0
- package/dist/reflection-injection-hooks-CS_uhjoD.d.ts +43 -0
- package/dist/reflection-lifecycle-hooks-CRSpUdLi.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-Dg2HgROM.js +2 -0
- package/dist/rem-batch-executor-DuC4nYyf.js +31640 -0
- package/dist/rem-consumer-retrieval-CR0dtcHR.js +246 -0
- package/dist/rem-trigger-Hn6od8IV.js +730 -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-Dxss5fRv.d.ts +469 -0
- package/dist/retriever-ZoLvPRHq.js +1757 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/routes-DLHT__Ay.js +60 -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-CSvxchqg.js +1412 -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-CoWqUMbK.js +30 -0
- package/dist/sno-station-mem-runtime-dependencies-DHESIuPn.d.ts +31 -0
- package/dist/sqlite-runtime-L_ywirTm.d.ts +58 -0
- package/dist/store-C8sUTssE.d.ts +27 -0
- package/dist/store-nPql26YM.js +5830 -0
- package/dist/strategy-hook-runner-Bxy851Xx.d.ts +16 -0
- package/dist/strategy-hook-runner-Djify5Rw.js +110 -0
- package/dist/token-counter-BD1f48Km.js +73 -0
- package/dist/trace-C1JxMfs-.d.ts +86 -0
- package/dist/types-CWdhXLxr.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,254 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Download + verify the wangfenjin/simple SQLite tokenizer binaries pinned at
|
|
4
|
+
* VERSION below. Idempotent: skips any platform whose `libsimple.{so,dylib}`
|
|
5
|
+
* + `dict/` already exists under `sqlite-extensions/<platform>/`.
|
|
6
|
+
*
|
|
7
|
+
* Why: simple-tokenizer is the FTS5 tokenizer behind CJK word-level recall.
|
|
8
|
+
* Upstream releases ship prebuilt binaries we vendor.
|
|
9
|
+
*
|
|
10
|
+
* Runtime: written in plain JS (.mjs) so the script runs under Node install
|
|
11
|
+
* hooks without `tsx` or runtime-specific APIs.
|
|
12
|
+
*
|
|
13
|
+
* SHA-256 hashes are pinned in source. To bump: update VERSION + ASSETS hashes
|
|
14
|
+
* in the same PR after recomputing from the upstream release.
|
|
15
|
+
*
|
|
16
|
+
* Run manually:
|
|
17
|
+
* node scripts/download-simple-tokenizer.mjs # host platform
|
|
18
|
+
* node scripts/download-simple-tokenizer.mjs --force # re-download
|
|
19
|
+
* node scripts/download-simple-tokenizer.mjs --platform linux-x64
|
|
20
|
+
* node scripts/download-simple-tokenizer.mjs --all-platforms
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { createHash } from "node:crypto";
|
|
24
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
25
|
+
import { tmpdir } from "node:os";
|
|
26
|
+
import { dirname, join, resolve } from "node:path";
|
|
27
|
+
import { fileURLToPath } from "node:url";
|
|
28
|
+
import { inflateRawSync } from "node:zlib";
|
|
29
|
+
|
|
30
|
+
const VERSION = "v0.7.1";
|
|
31
|
+
|
|
32
|
+
const ASSETS = [
|
|
33
|
+
{
|
|
34
|
+
platform: "linux-x64",
|
|
35
|
+
assetName: "libsimple-linux-ubuntu-22.04.zip",
|
|
36
|
+
binaryName: "libsimple.so",
|
|
37
|
+
sha256: "0c9a7a578fc50ef5480e69e1e1880535ae68d75e1c1580f6bf106073087642a5",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
platform: "linux-arm64",
|
|
41
|
+
assetName: "libsimple-linux-ubuntu-24.04-arm.zip",
|
|
42
|
+
binaryName: "libsimple.so",
|
|
43
|
+
sha256: "d2d6589f0fc144099d48105cb3d97c9939ef24c87b63b3f2b749a10a6922fa48",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
platform: "darwin-arm64",
|
|
47
|
+
assetName: "libsimple-osx-arm64.zip",
|
|
48
|
+
binaryName: "libsimple.dylib",
|
|
49
|
+
sha256: "b699f0fca1e7d1f8776d067708ecf4d0bcc2d765e4b643862e129058583b885f",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
platform: "darwin-x64",
|
|
53
|
+
assetName: "libsimple-osx-x64.zip",
|
|
54
|
+
binaryName: "libsimple.dylib",
|
|
55
|
+
sha256: "d6f7e9fc9dac3c2bcfb5389618d41f2f0db6ea5a83dd8b9a363cf9b02fa20f95",
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
60
|
+
const PLUGIN_ROOT = resolve(HERE, "..");
|
|
61
|
+
const TARGET_ROOT = join(PLUGIN_ROOT, "sqlite-extensions");
|
|
62
|
+
const RELEASE_BASE = `https://github.com/wangfenjin/simple/releases/download/${VERSION}`;
|
|
63
|
+
|
|
64
|
+
function parseArgs(argv) {
|
|
65
|
+
const opts = { force: false, platforms: new Set(), allPlatforms: false };
|
|
66
|
+
for (let i = 0; i < argv.length; i++) {
|
|
67
|
+
const arg = argv[i];
|
|
68
|
+
if (arg === "--force") opts.force = true;
|
|
69
|
+
else if (arg === "--all-platforms") opts.allPlatforms = true;
|
|
70
|
+
else if (arg === "--platform") {
|
|
71
|
+
const next = argv[i + 1];
|
|
72
|
+
if (!next) throw new Error("--platform requires an argument");
|
|
73
|
+
opts.platforms.add(next);
|
|
74
|
+
i++;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return opts;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function detectHostPlatform() {
|
|
81
|
+
const key = `${process.platform}-${process.arch}`;
|
|
82
|
+
switch (key) {
|
|
83
|
+
case "linux-x64":
|
|
84
|
+
case "linux-arm64":
|
|
85
|
+
case "darwin-x64":
|
|
86
|
+
case "darwin-arm64":
|
|
87
|
+
return key;
|
|
88
|
+
default:
|
|
89
|
+
throw new Error(
|
|
90
|
+
`unsupported host platform "${key}"; use --platform to choose one of: ` +
|
|
91
|
+
ASSETS.map((a) => a.platform).join(", "),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function platformAlreadyInstalled(platform, binaryName) {
|
|
97
|
+
const platformDir = join(TARGET_ROOT, platform);
|
|
98
|
+
return (
|
|
99
|
+
existsSync(join(platformDir, binaryName)) &&
|
|
100
|
+
existsSync(join(platformDir, "dict"))
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async function fetchToBuffer(url) {
|
|
105
|
+
const res = await fetch(url);
|
|
106
|
+
if (!res.ok) {
|
|
107
|
+
throw new Error(`fetch ${url} failed: ${res.status} ${res.statusText}`);
|
|
108
|
+
}
|
|
109
|
+
const buf = await res.arrayBuffer();
|
|
110
|
+
return Buffer.from(buf);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function sha256Hex(bytes) {
|
|
114
|
+
return createHash("sha256").update(bytes).digest("hex");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function unzipInto(zipPath, destDir) {
|
|
118
|
+
// Pure Node: a fresh machine may not have `unzip`.
|
|
119
|
+
// Walk the central directory; entries are stored (0) or deflated (8).
|
|
120
|
+
const buf = readFileSync(zipPath);
|
|
121
|
+
let eocd = -1;
|
|
122
|
+
for (let i = buf.length - 22; i >= Math.max(0, buf.length - 22 - 65_535); i--) {
|
|
123
|
+
if (buf.readUInt32LE(i) === 0x06054b50) {
|
|
124
|
+
eocd = i;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (eocd < 0) throw new Error(`${zipPath}: end of central directory not found`);
|
|
129
|
+
const count = buf.readUInt16LE(eocd + 10);
|
|
130
|
+
let off = buf.readUInt32LE(eocd + 16);
|
|
131
|
+
for (let n = 0; n < count; n++) {
|
|
132
|
+
if (buf.readUInt32LE(off) !== 0x02014b50) throw new Error(`${zipPath}: bad central directory entry`);
|
|
133
|
+
const method = buf.readUInt16LE(off + 10);
|
|
134
|
+
const csize = buf.readUInt32LE(off + 20);
|
|
135
|
+
const nameLen = buf.readUInt16LE(off + 28);
|
|
136
|
+
const extraLen = buf.readUInt16LE(off + 30);
|
|
137
|
+
const commentLen = buf.readUInt16LE(off + 32);
|
|
138
|
+
const extAttr = buf.readUInt32LE(off + 38);
|
|
139
|
+
const localOff = buf.readUInt32LE(off + 42);
|
|
140
|
+
const name = buf.toString("utf8", off + 46, off + 46 + nameLen);
|
|
141
|
+
off += 46 + nameLen + extraLen + commentLen;
|
|
142
|
+
if (name.includes("..") || name.startsWith("/")) throw new Error(`${zipPath}: unsafe entry ${name}`);
|
|
143
|
+
const target = join(destDir, name);
|
|
144
|
+
if (name.endsWith("/")) {
|
|
145
|
+
mkdirSync(target, { recursive: true });
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const dataStart = localOff + 30 + buf.readUInt16LE(localOff + 26) + buf.readUInt16LE(localOff + 28);
|
|
149
|
+
const data = buf.subarray(dataStart, dataStart + csize);
|
|
150
|
+
let bytes;
|
|
151
|
+
if (method === 0) bytes = data;
|
|
152
|
+
else if (method === 8) bytes = inflateRawSync(data);
|
|
153
|
+
else throw new Error(`${zipPath}: unsupported compression method ${method} for ${name}`);
|
|
154
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
155
|
+
const mode = (extAttr >>> 16) & 0o777;
|
|
156
|
+
writeFileSync(target, bytes, mode ? { mode } : undefined);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async function installAsset(spec, opts) {
|
|
161
|
+
if (
|
|
162
|
+
!opts.force &&
|
|
163
|
+
platformAlreadyInstalled(spec.platform, spec.binaryName)
|
|
164
|
+
) {
|
|
165
|
+
console.log(` ${spec.platform}: already installed`);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const url = `${RELEASE_BASE}/${spec.assetName}`;
|
|
169
|
+
console.log(` ${spec.platform}: downloading ${spec.assetName}...`);
|
|
170
|
+
const zipBytes = await fetchToBuffer(url);
|
|
171
|
+
const actualHash = sha256Hex(zipBytes);
|
|
172
|
+
if (actualHash !== spec.sha256) {
|
|
173
|
+
throw new Error(
|
|
174
|
+
`SHA-256 mismatch for ${spec.assetName}: expected ${spec.sha256}, got ${actualHash}`,
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
const tmpZip = join(tmpdir(), `simple-tokenizer-${spec.platform}-${process.pid}.zip`);
|
|
178
|
+
const tmpExtract = join(
|
|
179
|
+
tmpdir(),
|
|
180
|
+
`simple-tokenizer-${spec.platform}-${process.pid}.extract`,
|
|
181
|
+
);
|
|
182
|
+
writeFileSync(tmpZip, zipBytes);
|
|
183
|
+
mkdirSync(tmpExtract, { recursive: true });
|
|
184
|
+
try {
|
|
185
|
+
unzipInto(tmpZip, tmpExtract);
|
|
186
|
+
// Upstream zip wraps everything in a single top-level directory whose
|
|
187
|
+
// name matches the asset stem. Lift its contents into our flattened
|
|
188
|
+
// `<platform>/` layout.
|
|
189
|
+
const stem = spec.assetName.replace(/\.zip$/, "");
|
|
190
|
+
const innerRoot = join(tmpExtract, stem);
|
|
191
|
+
if (!existsSync(innerRoot)) {
|
|
192
|
+
throw new Error(`expected extracted directory not found: ${innerRoot}`);
|
|
193
|
+
}
|
|
194
|
+
const platformDir = join(TARGET_ROOT, spec.platform);
|
|
195
|
+
mkdirSync(platformDir, { recursive: true });
|
|
196
|
+
cpSync(innerRoot, platformDir, { recursive: true });
|
|
197
|
+
if (!existsSync(join(platformDir, spec.binaryName))) {
|
|
198
|
+
throw new Error(
|
|
199
|
+
`post-install verification failed: ${join(platformDir, spec.binaryName)} missing`,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
console.log(` ${spec.platform}: installed → ${platformDir}`);
|
|
203
|
+
} finally {
|
|
204
|
+
try {
|
|
205
|
+
rmSync(tmpZip, { force: true });
|
|
206
|
+
rmSync(tmpExtract, { recursive: true, force: true });
|
|
207
|
+
} catch {
|
|
208
|
+
// best-effort cleanup
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
async function main() {
|
|
214
|
+
const opts = parseArgs(process.argv.slice(2));
|
|
215
|
+
const filtered =
|
|
216
|
+
opts.platforms.size > 0
|
|
217
|
+
? ASSETS.filter((a) => opts.platforms.has(a.platform))
|
|
218
|
+
: opts.allPlatforms
|
|
219
|
+
? ASSETS
|
|
220
|
+
: ASSETS.filter((a) => a.platform === detectHostPlatform());
|
|
221
|
+
if (filtered.length === 0) {
|
|
222
|
+
throw new Error(
|
|
223
|
+
`no matching platforms (asked for: ${[...opts.platforms].join(", ")}); ` +
|
|
224
|
+
`available: ${ASSETS.map((a) => a.platform).join(", ")}`,
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
mkdirSync(TARGET_ROOT, { recursive: true });
|
|
228
|
+
const sentinel = join(TARGET_ROOT, ".version");
|
|
229
|
+
const allInstalled = filtered.every((a) =>
|
|
230
|
+
platformAlreadyInstalled(a.platform, a.binaryName),
|
|
231
|
+
);
|
|
232
|
+
if (
|
|
233
|
+
!opts.force &&
|
|
234
|
+
allInstalled &&
|
|
235
|
+
existsSync(sentinel) &&
|
|
236
|
+
readFileSync(sentinel, "utf8").trim() === VERSION
|
|
237
|
+
) {
|
|
238
|
+
console.log(
|
|
239
|
+
`simple-tokenizer ${VERSION} already installed for selected platform(s).`,
|
|
240
|
+
);
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
console.log(`simple-tokenizer: installing ${VERSION} → ${TARGET_ROOT}`);
|
|
244
|
+
for (const spec of filtered) {
|
|
245
|
+
await installAsset(spec, opts);
|
|
246
|
+
}
|
|
247
|
+
writeFileSync(sentinel, `${VERSION}\n`);
|
|
248
|
+
console.log("simple-tokenizer: done.");
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
main().catch((err) => {
|
|
252
|
+
console.error("simple-tokenizer install failed:", err);
|
|
253
|
+
process.exit(1);
|
|
254
|
+
});
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mode": "agent-native",
|
|
3
|
+
"modelCalls": {
|
|
4
|
+
"E1": {
|
|
5
|
+
"local-first": "off",
|
|
6
|
+
"agent-native": "host",
|
|
7
|
+
"rem-enhanced": "sno-gpu"
|
|
8
|
+
},
|
|
9
|
+
"E2": {
|
|
10
|
+
"local-first": "off",
|
|
11
|
+
"agent-native": "host",
|
|
12
|
+
"rem-enhanced": "sno-gpu"
|
|
13
|
+
},
|
|
14
|
+
"E3": {
|
|
15
|
+
"local-first": "off",
|
|
16
|
+
"agent-native": "host",
|
|
17
|
+
"rem-enhanced": "sno-gpu"
|
|
18
|
+
},
|
|
19
|
+
"E4": {
|
|
20
|
+
"local-first": "off",
|
|
21
|
+
"agent-native": "host",
|
|
22
|
+
"rem-enhanced": "sno-gpu"
|
|
23
|
+
},
|
|
24
|
+
"E5": {
|
|
25
|
+
"local-first": "off",
|
|
26
|
+
"agent-native": "host",
|
|
27
|
+
"rem-enhanced": "sno-gpu"
|
|
28
|
+
},
|
|
29
|
+
"E6": {
|
|
30
|
+
"local-first": "off",
|
|
31
|
+
"agent-native": "host",
|
|
32
|
+
"rem-enhanced": "sno-gpu"
|
|
33
|
+
},
|
|
34
|
+
"E7": {
|
|
35
|
+
"local-first": "off",
|
|
36
|
+
"agent-native": "host",
|
|
37
|
+
"rem-enhanced": "sno-gpu"
|
|
38
|
+
},
|
|
39
|
+
"E8": {
|
|
40
|
+
"local-first": "off",
|
|
41
|
+
"agent-native": "host",
|
|
42
|
+
"rem-enhanced": "sno-gpu"
|
|
43
|
+
},
|
|
44
|
+
"E9": {
|
|
45
|
+
"local-first": "off",
|
|
46
|
+
"agent-native": "host",
|
|
47
|
+
"rem-enhanced": "sno-gpu"
|
|
48
|
+
},
|
|
49
|
+
"E10": {
|
|
50
|
+
"local-first": "off",
|
|
51
|
+
"agent-native": "host",
|
|
52
|
+
"rem-enhanced": "sno-gpu"
|
|
53
|
+
},
|
|
54
|
+
"E11": {
|
|
55
|
+
"local-first": "off",
|
|
56
|
+
"agent-native": "host",
|
|
57
|
+
"rem-enhanced": "host"
|
|
58
|
+
},
|
|
59
|
+
"E12": {
|
|
60
|
+
"local-first": "off",
|
|
61
|
+
"agent-native": "host",
|
|
62
|
+
"rem-enhanced": "sno-gpu"
|
|
63
|
+
},
|
|
64
|
+
"P1": {
|
|
65
|
+
"local-first": "off",
|
|
66
|
+
"agent-native": "host",
|
|
67
|
+
"rem-enhanced": "sno-gpu"
|
|
68
|
+
},
|
|
69
|
+
"P2": {
|
|
70
|
+
"local-first": "host",
|
|
71
|
+
"agent-native": "host",
|
|
72
|
+
"rem-enhanced": "host"
|
|
73
|
+
},
|
|
74
|
+
"P3": {
|
|
75
|
+
"local-first": "host",
|
|
76
|
+
"agent-native": "host",
|
|
77
|
+
"rem-enhanced": "host"
|
|
78
|
+
},
|
|
79
|
+
"P4": {
|
|
80
|
+
"local-first": "host",
|
|
81
|
+
"agent-native": "host",
|
|
82
|
+
"rem-enhanced": "host"
|
|
83
|
+
},
|
|
84
|
+
"P5": {
|
|
85
|
+
"local-first": "host",
|
|
86
|
+
"agent-native": "host",
|
|
87
|
+
"rem-enhanced": "host"
|
|
88
|
+
},
|
|
89
|
+
"P6": {
|
|
90
|
+
"local-first": "host",
|
|
91
|
+
"agent-native": "host",
|
|
92
|
+
"rem-enhanced": "host"
|
|
93
|
+
},
|
|
94
|
+
"T1": {
|
|
95
|
+
"local-first": "off",
|
|
96
|
+
"agent-native": "host",
|
|
97
|
+
"rem-enhanced": "host"
|
|
98
|
+
},
|
|
99
|
+
"R1": {
|
|
100
|
+
"local-first": "off",
|
|
101
|
+
"agent-native": "host",
|
|
102
|
+
"rem-enhanced": "host"
|
|
103
|
+
},
|
|
104
|
+
"R2": {
|
|
105
|
+
"local-first": "off",
|
|
106
|
+
"agent-native": "host",
|
|
107
|
+
"rem-enhanced": "host"
|
|
108
|
+
},
|
|
109
|
+
"R3": {
|
|
110
|
+
"local-first": "off",
|
|
111
|
+
"agent-native": "sno-gpu",
|
|
112
|
+
"rem-enhanced": "sno-gpu"
|
|
113
|
+
},
|
|
114
|
+
"R4": {
|
|
115
|
+
"local-first": "off",
|
|
116
|
+
"agent-native": "sno-gpu",
|
|
117
|
+
"rem-enhanced": "sno-gpu"
|
|
118
|
+
},
|
|
119
|
+
"REM1": {
|
|
120
|
+
"local-first": "host",
|
|
121
|
+
"agent-native": "host",
|
|
122
|
+
"rem-enhanced": "sno-gpu"
|
|
123
|
+
},
|
|
124
|
+
"REM2": {
|
|
125
|
+
"local-first": "host",
|
|
126
|
+
"agent-native": "host",
|
|
127
|
+
"rem-enhanced": "host"
|
|
128
|
+
},
|
|
129
|
+
"REM3": {
|
|
130
|
+
"local-first": "host",
|
|
131
|
+
"agent-native": "host",
|
|
132
|
+
"rem-enhanced": "sno-gpu"
|
|
133
|
+
},
|
|
134
|
+
"REM4": {
|
|
135
|
+
"local-first": "host",
|
|
136
|
+
"agent-native": "host",
|
|
137
|
+
"rem-enhanced": "sno-gpu"
|
|
138
|
+
},
|
|
139
|
+
"REM5": {
|
|
140
|
+
"local-first": "host",
|
|
141
|
+
"agent-native": "host",
|
|
142
|
+
"rem-enhanced": "sno-gpu"
|
|
143
|
+
},
|
|
144
|
+
"REM6": {
|
|
145
|
+
"local-first": "host",
|
|
146
|
+
"agent-native": "host",
|
|
147
|
+
"rem-enhanced": "host"
|
|
148
|
+
},
|
|
149
|
+
"REM7": {
|
|
150
|
+
"local-first": "host",
|
|
151
|
+
"agent-native": "host",
|
|
152
|
+
"rem-enhanced": "host"
|
|
153
|
+
},
|
|
154
|
+
"REM8": {
|
|
155
|
+
"local-first": "host",
|
|
156
|
+
"agent-native": "host",
|
|
157
|
+
"rem-enhanced": "host"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"user": {
|
|
161
|
+
"id": "",
|
|
162
|
+
"language": "en"
|
|
163
|
+
},
|
|
164
|
+
"snoGpu": {
|
|
165
|
+
"baseUrl": "https://rt3-llm.sno.ai",
|
|
166
|
+
"apiKey": ""
|
|
167
|
+
},
|
|
168
|
+
"rerank": {
|
|
169
|
+
"mode": "lightweight",
|
|
170
|
+
"provider": "voyage",
|
|
171
|
+
"endpoint": "",
|
|
172
|
+
"model": "rerank-2",
|
|
173
|
+
"apiKey": "",
|
|
174
|
+
"timeoutMs": 15000,
|
|
175
|
+
"maxCandidates": 64
|
|
176
|
+
},
|
|
177
|
+
"store": {
|
|
178
|
+
"path": "",
|
|
179
|
+
"encryptionKey": ""
|
|
180
|
+
},
|
|
181
|
+
"embedding": {
|
|
182
|
+
"model": "tss-deposium/pplx-embed-v1-0.6b-onnx-int8-standard",
|
|
183
|
+
"revision": "a18fdffe7480e6ea5643acb7757142b33838817a",
|
|
184
|
+
"dtype": "q8",
|
|
185
|
+
"threads": 0,
|
|
186
|
+
"cacheDir": "",
|
|
187
|
+
"offline": false,
|
|
188
|
+
"mirror": ""
|
|
189
|
+
},
|
|
190
|
+
"recall": {
|
|
191
|
+
"auto": true,
|
|
192
|
+
"sessionStart": {
|
|
193
|
+
"limit": 5,
|
|
194
|
+
"maxChars": 3500,
|
|
195
|
+
"timeoutMs": 8000
|
|
196
|
+
},
|
|
197
|
+
"prompt": {
|
|
198
|
+
"limit": 3,
|
|
199
|
+
"maxChars": 1500,
|
|
200
|
+
"timeoutMs": 4000,
|
|
201
|
+
"minChars": 12,
|
|
202
|
+
"minScore": 0
|
|
203
|
+
},
|
|
204
|
+
"explicitLimit": 5
|
|
205
|
+
},
|
|
206
|
+
"capture": {
|
|
207
|
+
"assistant": true,
|
|
208
|
+
"ambient": true,
|
|
209
|
+
"sessionMemory": {
|
|
210
|
+
"enabled": true,
|
|
211
|
+
"messageCount": 15
|
|
212
|
+
},
|
|
213
|
+
"sessionStrategy": "systemSessionMemory"
|
|
214
|
+
},
|
|
215
|
+
"rem": {
|
|
216
|
+
"tick": true,
|
|
217
|
+
"operations": [
|
|
218
|
+
"rem-replace",
|
|
219
|
+
"rem-update"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"telemetry": {
|
|
223
|
+
"memoryUsage": {
|
|
224
|
+
"enabled": false,
|
|
225
|
+
"key": "",
|
|
226
|
+
"historicKeys": []
|
|
227
|
+
},
|
|
228
|
+
"observe": {
|
|
229
|
+
"enabled": true,
|
|
230
|
+
"baseUrl": "https://www.sno.ai"
|
|
231
|
+
},
|
|
232
|
+
"redactionRules": []
|
|
233
|
+
},
|
|
234
|
+
"logging": {
|
|
235
|
+
"level": "info",
|
|
236
|
+
"file": "",
|
|
237
|
+
"debugContent": false
|
|
238
|
+
},
|
|
239
|
+
"memoryPackage": {
|
|
240
|
+
"path": "",
|
|
241
|
+
"node": ""
|
|
242
|
+
}
|
|
243
|
+
}
|