@snoai/memory 1.0.0 → 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.
Files changed (143) hide show
  1. package/README.md +30 -4
  2. package/dist/{access-tracker-CSc21GtV.d.ts → access-tracker-BbEvEocb.d.ts} +3 -3
  3. package/dist/{adapter-DMEmCTKo.d.ts → adapter-B7Jox9-6.d.ts} +1 -1
  4. package/dist/{atomic-memory-extraction-sdNf1-B1.js → atomic-memory-extraction-C5rmogoY.js} +7 -7
  5. package/dist/{atomic-memory-extraction-BpOUWPJM.d.ts → atomic-memory-extraction-d9EG-4ti.d.ts} +3 -3
  6. package/dist/{capture-policy-detector-CHz5GOPA.d.ts → capture-policy-detector-CxbHPkMX.d.ts} +1 -1
  7. package/dist/{classifier-C96uH9OF.d.ts → classifier-DnbbtwTS.d.ts} +2 -2
  8. package/dist/client.d.ts +1 -1
  9. package/dist/client.js +3 -2
  10. package/dist/{config-tSrvLXgV.js → config-CL90qYva.js} +1 -2
  11. package/dist/{connection-DAbzki8K.d.ts → connection-3IVXpuPE.d.ts} +1 -1
  12. package/dist/{connection-DliCOBB2.js → connection-C9YD5sgm.js} +2 -2
  13. package/dist/{data-bootstrap-CcJUwkqf.d.ts → data-bootstrap-Bl3lthzE.d.ts} +2 -2
  14. package/dist/{data-bootstrap-CYniFp8b.js → data-bootstrap-P8sie9WA.js} +4 -4
  15. package/dist/{derived-suppression-cache-C7bGARc0.d.ts → derived-suppression-cache-CI0durYx.d.ts} +1 -1
  16. package/dist/diagnostic-encoder.js +1 -1
  17. package/dist/{index-DQ7VL6d3.d.ts → index-0aqS8pVF.d.ts} +3 -2
  18. package/dist/{index-BsMap4It.d.ts → index-BO4RU_mc.d.ts} +1 -1
  19. package/dist/index.d.ts +9 -9
  20. package/dist/index.js +7 -7
  21. package/dist/internal/contract/routes.d.ts +2 -2
  22. package/dist/internal/contract/routes.js +2 -1
  23. package/dist/internal/engine/bindings/memory-cli-shared.d.ts +4 -4
  24. package/dist/internal/engine/bindings/memory-forget-tool.js +1 -1
  25. package/dist/internal/engine/bindings/memory-list-tool.js +1 -1
  26. package/dist/internal/engine/bindings/memory-recall-tool.js +2 -2
  27. package/dist/internal/engine/bindings/memory-reflection-resolve-tool.js +1 -1
  28. package/dist/internal/engine/bindings/memory-stats-tool.js +1 -1
  29. package/dist/internal/engine/bindings/memory-store-tool.js +3 -3
  30. package/dist/internal/engine/bindings/memory-tool-access.d.ts +1 -1
  31. package/dist/internal/engine/bindings/memory-tool-access.js +1 -1
  32. package/dist/internal/engine/bindings/memory-tool-results.d.ts +1 -1
  33. package/dist/internal/engine/bindings/memory-tool-results.js +1 -1
  34. package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +4 -4
  35. package/dist/internal/engine/bindings/memory-tool-schemas.js +1 -1
  36. package/dist/internal/engine/bindings/memory-update-tool.js +2 -2
  37. package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts +3 -3
  38. package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.js +2 -2
  39. package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.d.ts +3 -3
  40. package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.js +2 -2
  41. package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.d.ts +4 -4
  42. package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +2 -2
  43. package/dist/internal/engine/bindings/sno-station-mem-message-transcript.js +2 -2
  44. package/dist/internal/engine/bindings/sno-station-mem-reset-hook.d.ts +2 -2
  45. package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +2 -3
  46. package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.js +1 -2
  47. package/dist/internal/engine/eval/trace.d.ts +1 -1
  48. package/dist/internal/engine/eval/trace.js +2 -2
  49. package/dist/internal/engine/extraction/atomic-memory-extraction.d.ts +1 -1
  50. package/dist/internal/engine/extraction/atomic-memory-extraction.js +1 -1
  51. package/dist/internal/engine/extraction/b-profile-section-rekey.d.ts +3 -3
  52. package/dist/internal/engine/extraction/capture-policy-detector.d.ts +1 -1
  53. package/dist/internal/engine/extraction/memory-metadata-codec.d.ts +2 -2
  54. package/dist/internal/engine/extraction/memory-temporality-classifier.d.ts +1 -1
  55. package/dist/internal/engine/extraction/memory-temporality-classifier.js +1 -1
  56. package/dist/internal/engine/observability/adapter.d.ts +1 -1
  57. package/dist/internal/engine/observability/memory-snapshot.d.ts +1 -1
  58. package/dist/internal/engine/observability/observable-embedder.d.ts +1 -1
  59. package/dist/internal/engine/observability/observable-llm-client.d.ts +1 -1
  60. package/dist/internal/engine/observability/observable-memory-store.d.ts +1 -1
  61. package/dist/internal/engine/observability/observable-memory-store.js +1 -1
  62. package/dist/internal/engine/observability/observable-retriever.d.ts +1 -1
  63. package/dist/internal/engine/observability/observable-retriever.js +1 -1
  64. package/dist/internal/engine/observability/runtime-diagnostics.js +1 -1
  65. package/dist/internal/engine/operations/memory-tier-promoter.d.ts +1 -1
  66. package/dist/internal/engine/provider/provider-registration.d.ts +3 -3
  67. package/dist/internal/engine/provider/provider-row-renderer.d.ts +1 -1
  68. package/dist/internal/engine/reflection/reflection-command-hooks.d.ts +1 -1
  69. package/dist/internal/engine/reflection/reflection-command-hooks.js +1 -1
  70. package/dist/internal/engine/reflection/reflection-deps.d.ts +1 -1
  71. package/dist/internal/engine/reflection/reflection-embedded-generator.d.ts +1 -1
  72. package/dist/internal/engine/reflection/reflection-embedded-generator.js +1 -1
  73. package/dist/internal/engine/reflection/reflection-injection-hooks.d.ts +1 -1
  74. package/dist/internal/engine/reflection/reflection-injection-hooks.js +1 -1
  75. package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +1 -1
  76. package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +1 -1
  77. package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +3 -3
  78. package/dist/internal/engine/reflection/strategy-hook-runner.js +2 -2
  79. package/dist/internal/engine/rem/classifier.d.ts +1 -1
  80. package/dist/internal/engine/rem/index.d.ts +2 -2
  81. package/dist/internal/engine/retrieval/access-tracker.d.ts +1 -1
  82. package/dist/internal/engine/retrieval/retriever.d.ts +1 -1
  83. package/dist/internal/engine/retrieval/retriever.js +1 -1
  84. package/dist/internal/engine/shared/memory-kind-policy.d.ts +1 -1
  85. package/dist/internal/engine/shared/types.d.ts +1 -1
  86. package/dist/internal/engine/telemetry/observe-ledger.d.ts +1 -1
  87. package/dist/internal/model/llm-client.js +1 -1
  88. package/dist/internal/store/atomic-memory-cutover-sql.js +1 -1
  89. package/dist/internal/store/connection.d.ts +1 -1
  90. package/dist/internal/store/connection.js +1 -1
  91. package/dist/internal/store/data-bootstrap.d.ts +1 -1
  92. package/dist/internal/store/data-bootstrap.js +1 -1
  93. package/dist/internal/store/maintenance.d.ts +1 -1
  94. package/dist/internal/store/maintenance.js +6 -6
  95. package/dist/internal/store/store.d.ts +2 -2
  96. package/dist/internal/store/store.js +1 -1
  97. package/dist/{llm-client-B7Xoxqou.js → llm-client-BSYUAcUb.js} +1 -5
  98. package/dist/{log-site-catalog.generated-B9WYdnAM.js → log-site-catalog.generated-BMKWj-Nx.js} +160 -160
  99. package/dist/log-site-catalog.json +1 -1
  100. package/dist/{memory-kind-policy-LKt0u3gy.d.ts → memory-kind-policy-BiuRjSJc.d.ts} +1 -1
  101. package/dist/{memory-metadata-codec-C3oQd47V.d.ts → memory-metadata-codec-DUvsYe_X.d.ts} +1 -1
  102. package/dist/{memory-runtime-BZtREuwW.js → memory-runtime-DqUS4cWi.js} +168 -168
  103. package/dist/{memory-snapshot-3e44ND2i.d.ts → memory-snapshot-CqY1BUUA.d.ts} +1 -1
  104. package/dist/{memory-source-order-BtrIxaIt.js → memory-source-order-YMRoeDLd.js} +1 -1
  105. package/dist/{memory-store-base-XRA4S9Xl.d.ts → memory-store-base-CQ_bHlYA.d.ts} +5 -6
  106. package/dist/{memory-store-shared-DeIDkhLj.js → memory-store-shared-DqpWJXZZ.js} +2 -2
  107. package/dist/{memory-temporality-classifier-CKiTAHXe.js → memory-temporality-classifier-BUjXG5o7.js} +1 -1
  108. package/dist/{memory-temporality-classifier-CEdRTN5J.d.ts → memory-temporality-classifier-Brht5jyK.d.ts} +1 -1
  109. package/dist/{memory-tier-promoter-DbTpahkP.d.ts → memory-tier-promoter-CqGxCkue.d.ts} +1 -1
  110. package/dist/memory-tool-dependencies-CatGzI9R.d.ts +14 -0
  111. package/dist/{memory-tool-dependencies-CLODycUw.js → memory-tool-dependencies-DjUoelnm.js} +1 -1
  112. package/dist/{observable-embedder-DQnNgf9O.d.ts → observable-embedder-CNNe9gkg.d.ts} +1 -1
  113. package/dist/{observable-llm-client-uwqPADpN.d.ts → observable-llm-client-CRuKlefQ.d.ts} +1 -1
  114. package/dist/{observable-memory-store-BaZKbhgq.d.ts → observable-memory-store-CnGDpOY5.d.ts} +4 -4
  115. package/dist/{observable-retriever-Dt_NUxAA.d.ts → observable-retriever-Cooc62Qw.d.ts} +5 -5
  116. package/dist/{profile-section-writer-hIphqpUY.js → profile-section-writer-BhGKPBjw.js} +4 -4
  117. package/dist/{reflection-command-hooks-BeQiJI9-.js → reflection-command-hooks-ClUl-iv6.js} +4 -4
  118. package/dist/{reflection-command-hooks-C1Vxgb-O.d.ts → reflection-command-hooks-G1-dI2Av.d.ts} +3 -3
  119. package/dist/{reflection-deps-RpLPFrSc.d.ts → reflection-deps-Ccm2Jf5W.d.ts} +2 -2
  120. package/dist/{reflection-embedded-generator-CDUhgV96.js → reflection-embedded-generator-BRvqV5N-.js} +1 -1
  121. package/dist/{reflection-embedded-generator-CxOex5xK.d.ts → reflection-embedded-generator-kfQfKEYV.d.ts} +2 -2
  122. package/dist/{reflection-injection-hooks-DfUgqu8f.d.ts → reflection-injection-hooks-CS_uhjoD.d.ts} +3 -3
  123. package/dist/{reflection-lifecycle-hooks-Ct5HBdSG.d.ts → reflection-lifecycle-hooks-CRSpUdLi.d.ts} +2 -2
  124. package/dist/{rem-batch-executor-bc0IFlp2.js → rem-batch-executor-Dg2HgROM.js} +1 -1
  125. package/dist/{rem-batch-executor-Cbm5gfSe.js → rem-batch-executor-DuC4nYyf.js} +11 -15
  126. package/dist/{rem-consumer-retrieval-CRpvG8KS.js → rem-consumer-retrieval-CR0dtcHR.js} +1 -1
  127. package/dist/{rem-trigger-BTxkcjgT.js → rem-trigger-Hn6od8IV.js} +3 -2
  128. package/dist/{retriever-Ruk3zp7_.d.ts → retriever-Dxss5fRv.d.ts} +14 -14
  129. package/dist/{retriever-CygHBazG.js → retriever-ZoLvPRHq.js} +3 -3
  130. package/dist/{routes-Ce7SQKec.js → routes-DLHT__Ay.js} +2 -1
  131. package/dist/{server-BPAY4NTG.js → server-CSvxchqg.js} +12 -10
  132. package/dist/sidecar/main.js +3 -3
  133. package/dist/{sno-station-mem-runtime-dependencies-DjLOhB45.js → sno-station-mem-runtime-dependencies-CoWqUMbK.js} +8 -8
  134. package/dist/sno-station-mem-runtime-dependencies-DHESIuPn.d.ts +31 -0
  135. package/dist/{store-2pM0-dZg.d.ts → store-C8sUTssE.d.ts} +1 -1
  136. package/dist/{store-DzpZBMEm.js → store-nPql26YM.js} +4 -4
  137. package/dist/{strategy-hook-runner-gBtU47tX.d.ts → strategy-hook-runner-Bxy851Xx.d.ts} +6 -6
  138. package/dist/{strategy-hook-runner-zmdIYOmQ.js → strategy-hook-runner-Djify5Rw.js} +1 -1
  139. package/dist/{trace-1t1n_wUm.d.ts → trace-C1JxMfs-.d.ts} +2 -2
  140. package/dist/{types-DxKqU60b.d.ts → types-CWdhXLxr.d.ts} +7 -7
  141. package/package.json +7 -7
  142. package/dist/memory-tool-dependencies-N69chrQc.d.ts +0 -14
  143. package/dist/sno-station-mem-runtime-dependencies-Bu-MiqPX.d.ts +0 -31
package/README.md CHANGED
@@ -1,8 +1,34 @@
1
1
  # @snoai/memory
2
2
 
3
- The shared local memory engine used by the OpenClaw, Claude Code, and Codex integrations in Sno
4
- Station.
3
+ The memory engine behind Sno Station: encrypted, local, shared by every agent you run.
5
4
 
6
- The source is available here under Apache-2.0. The supported product installation path is not yet
7
- announced; watch the repository README for the dated launch status.
5
+ It stores what your coding agents learn, finds it again when it matters, and corrects it
6
+ without losing history. Claude Code, Codex, OpenClaw and Hermes Agent all talk to this one
7
+ engine, so what one agent learns is there for the next.
8
8
 
9
+ - **Capture and recall.** Completed turns are extracted into memories; recall combines vector
10
+ search and keyword search, scoped to the repository you work in plus a global scope.
11
+ - **Corrections keep history.** A corrected memory is retired, not deleted, and points to its
12
+ replacement. Automatic recall only shows what is current.
13
+ - **Encrypted from first use.** The store is a SQLite database encrypted with a key made once
14
+ on your machine (`@snoai/sqlite-crypto`). Sno never receives your database or your key.
15
+ - **No account, no API key to start.** Local First mode runs fully on your machine; Agent
16
+ Native and REM Enhanced let a model help with the memory work.
17
+ - **Eight languages.** English, Chinese (Simplified and Traditional), Japanese, Korean,
18
+ German, French, Spanish and Russian, with each memory stored with its language.
19
+ - **No daemon.** The engine runs as a local service on `127.0.0.1` that the agent plugins
20
+ start when they need it.
21
+
22
+ Who it is for: you do not use this package directly. Follow the
23
+ [shared memory setup](https://github.com/sno-ai/sno-station/blob/main/docs/memory-setup.md)
24
+ (it installs this package into `~/.sno`), then add the plugin for your agent:
25
+ [Codex](https://www.npmjs.com/package/@snoai/mem-codex),
26
+ [Claude Code](https://www.npmjs.com/package/@snoai/mem-claude) or
27
+ [OpenClaw](https://www.npmjs.com/package/@snoai/mem-claw). The `client` export is what the
28
+ plugins use to reach the service.
29
+
30
+ ```bash
31
+ npm install @snoai/memory@1.0.1
32
+ ```
33
+
34
+ Needs Node.js 22.22.3+, 24.15.0+ or 25.9.0+. Licensed under Apache-2.0.
@@ -1,7 +1,7 @@
1
- import { v as MemoryMetadata } from "./types-DxKqU60b.js";
1
+ import { v as MemoryMetadata } from "./types-CWdhXLxr.js";
2
2
  import { sn as RecallLifecycleConfig } from "./index-DL8AVj0Z.js";
3
- import { C as MemoryStore } from "./memory-store-base-XRA4S9Xl.js";
4
- import "./store-2pM0-dZg.js";
3
+ import { C as MemoryStore } from "./memory-store-base-CQ_bHlYA.js";
4
+ import "./store-C8sUTssE.js";
5
5
  //#region src/engine/retrieval/access-tracker.d.ts
6
6
  interface AccessMetadata {
7
7
  readonly accessCount: number;
@@ -1,5 +1,5 @@
1
1
  import { t as PluginConfig } from "./plugin-config-schema-C0UUbOmG.js";
2
- import "./types-DxKqU60b.js";
2
+ import "./types-CWdhXLxr.js";
3
3
  import { t as ObserveLogger } from "./best-effort-BPZSzKk0.js";
4
4
  import { AgentId, EventType, JsonObject } from "@snoai/observability";
5
5
  //#region src/engine/observability/cost-aggregator.d.ts
@@ -2,22 +2,22 @@ import { ATOMIC_CAPTURE_OUTPUT_TOKEN_BUDGET, ATOMIC_CAPTURE_TIMEOUT_MS, ATOMIC_E
2
2
  import "./internal/engine/i18n/locales.js";
3
3
  import { $ as FIXED_MEMORY_SNO_EXTRACT_PROFILE, Q as FIXED_MEMORY_SNO_EXTRACT_CHAT } from "./signed-registry-constants-yq3DlG3B.js";
4
4
  import { redactSecrets } from "./internal/engine/security/redact.js";
5
- import { a as isTerminalLlmFailure, i as createLlmClient, n as LlmClientTerminalError } from "./llm-client-B7Xoxqou.js";
5
+ import { a as isTerminalLlmFailure, i as createLlmClient, n as LlmClientTerminalError } from "./llm-client-BSYUAcUb.js";
6
6
  import { n as readModelReplyJson } from "./model-reply-text-CKopStP2.js";
7
7
  import { resolveLlmRoute } from "./internal/model/llm-mode-routing.js";
8
8
  import { n as ATOMIC_EXTRACTION_SKILL_HASH, r as atomicExtractionSkillReference, t as ATOMIC_EXTRACTION_SKILL } from "./atomic-extraction-skill-CcXmuCqL.js";
9
9
  import { stripEnvelopeMetadata } from "./internal/engine/extraction/extraction-text-sanitizer.js";
10
10
  import { a as sessionZoneCarriedBy, t as calculateCalendarTime } from "./calendar-instruction-CzqZbAPG.js";
11
- import "./memory-temporality-classifier-CKiTAHXe.js";
11
+ import "./memory-temporality-classifier-BUjXG5o7.js";
12
12
  import { t as appendAuditEntry } from "./runtime-audit-log-BCeujlEp.js";
13
13
  import { a as parseAtomicCaptureReply, c as atomic_extraction_response_schema_default, i as fallbackAtomicCapturedFact, l as excludeProgressRecords, n as ATOMIC_ENRICHMENT_RESPONSE_JSON_SCHEMA, o as parseAtomicEnrichmentReply, r as ATOMIC_EXTRACTION_RESPONSE_JSON_SCHEMA, s as parseAtomicExtractionReply, t as ATOMIC_CAPTURE_RESPONSE_JSON_SCHEMA } from "./atomic-extraction-reply-BJ9XV_9s.js";
14
14
  import { adapterAViewFromRecord, isAdapterAVerdictReply, parseAdapterAChatVerdict, renderAdapterAChatPrompt, renderAdapterAPrompt } from "./internal/engine/rem/index.js";
15
15
  import { n as state_vocabulary_default, r as attribute_dictionary_default, t as relations } from "./relation-dictionary-Cev1kyLe.js";
16
- import { g as randomUUID$1 } from "./memory-store-shared-DeIDkhLj.js";
17
- import { d as normalizeEntityName, f as recordAtomicEntityIdentityJournal, g as readAtomicArrivalRetirementCandidateSet, h as journalAtomicArrivalRetirementRefusal, m as closeAtomicArrivalRetirementTargets, u as listAtomicMemoryEntityCandidates, y as normalizeMemoryRelationPredicate } from "./store-DzpZBMEm.js";
16
+ import { g as randomUUID$1 } from "./memory-store-shared-DqpWJXZZ.js";
17
+ import { d as normalizeEntityName, f as recordAtomicEntityIdentityJournal, g as readAtomicArrivalRetirementCandidateSet, h as journalAtomicArrivalRetirementRefusal, m as closeAtomicArrivalRetirementTargets, u as listAtomicMemoryEntityCandidates, y as normalizeMemoryRelationPredicate } from "./store-nPql26YM.js";
18
18
  import { o as normalizeTopicToSectionName } from "./b-profile-section-dictionary-provider-BHkoNqgk.js";
19
19
  import { r as recordTokenCounter } from "./memory-store-write-validation-B_hDG2zf.js";
20
- import { i as prepareDeterministicTaskLifecycleWrite, t as PROFILE_IDENTITY_SECTION } from "./profile-section-writer-hIphqpUY.js";
20
+ import { i as prepareDeterministicTaskLifecycleWrite, t as PROFILE_IDENTITY_SECTION } from "./profile-section-writer-BhGKPBjw.js";
21
21
  import { z } from "zod";
22
22
  import { countTokens } from "@snoai/chunking";
23
23
  import { createLogger, currentLogContext, privateLogReference, withLogContext } from "@snoai/utils/logger";
@@ -2382,7 +2382,7 @@ function windowDiagnostics() {
2382
2382
  }
2383
2383
  const ATOMIC_PIPELINE_VERSION = "atomic-v3";
2384
2384
  const ATOMIC_LLM_CONCURRENCY = 1;
2385
- /** Arrival verdict calls in flight at once; the Sno GPU admits three sequences (PRD 140 REQ-3). */
2385
+ /** Arrival verdict calls in flight at once; the Sno GPU admits three sequences. */
2386
2386
  const ARRIVAL_RETIREMENT_PAIRS_IN_FLIGHT = 3;
2387
2387
  const STANDING_SUBJECT_CANDIDATE_LIMIT = 64;
2388
2388
  const THING_ATTRIBUTE_SLUGS = new Set(state_vocabulary_default.slugs.map(({ slug }) => slug));
@@ -3543,7 +3543,7 @@ async function runAtomicMemoryExtraction(input) {
3543
3543
  /**
3544
3544
  * One pair of the arrival judgement: the candidate as the older memory, the nominated row as the
3545
3545
  * newer. A failed call or an unreadable reply is logged and journaled as this pair's refusal and
3546
- * decides nothing; the REM replace wave judges the pair again later (PRD 140 REQ-6).
3546
+ * decides nothing; the REM replace wave judges the pair again later.
3547
3547
  */
3548
3548
  async function judgeArrivalRetirementPair(input, candidateSet, candidate) {
3549
3549
  const nominatedRowId = candidateSet.nominatedRow.id;
@@ -1,8 +1,8 @@
1
1
  import { i as LlmClientConfig, l as ModelCallId, p as LlmRoutingConfig, r as LlmClient } from "./plugin-config-schema-C0UUbOmG.js";
2
2
  import { n as Locale } from "./locales-JxGmkG6t.js";
3
- import { qt as AdapterAMemoryView } from "./index-BsMap4It.js";
4
- import { C as MemoryStore, c as AtomicExtractionRunParameters, f as AtomicExtractionWriteResult, g as BeginAtomicExtractionChunkResult, r as AtomicExtractionLedgerKey, s as AtomicExtractionReprocessReason, x as MemoryRelationPredicate } from "./memory-store-base-XRA4S9Xl.js";
5
- import "./store-2pM0-dZg.js";
3
+ import { qt as AdapterAMemoryView } from "./index-BO4RU_mc.js";
4
+ import { C as MemoryStore, c as AtomicExtractionRunParameters, f as AtomicExtractionWriteResult, g as BeginAtomicExtractionChunkResult, r as AtomicExtractionLedgerKey, s as AtomicExtractionReprocessReason, x as MemoryRelationPredicate } from "./memory-store-base-CQ_bHlYA.js";
5
+ import "./store-C8sUTssE.js";
6
6
  import "./llm-client-DOTSGzhe.js";
7
7
  import { z } from "zod";
8
8
  //#region src/engine/extraction/calendar-instruction.d.ts
@@ -1,4 +1,4 @@
1
- import { h as MemoryCategory } from "./types-DxKqU60b.js";
1
+ import { h as MemoryCategory } from "./types-CWdhXLxr.js";
2
2
  //#region src/engine/extraction/capture-policy-detector.d.ts
3
3
  declare const PROMPT_INJECTION_PATTERNS: RegExp[];
4
4
  /** Implements looks like prompt injection as the local memory capture policy operation. */
@@ -43,7 +43,7 @@ interface JournalEntry {
43
43
  actionsApplied: number;
44
44
  reason?: string;
45
45
  /**
46
- * Which condition produced this row, as its own value rather than folded into `reason`. PRD 50
46
+ * Which condition produced this row, as its own value rather than folded into `reason`.
47
47
  * ACC-27 requires the persisted refusal to carry the failing condition as a FIELD: a reader
48
48
  * asking "which condition" must not have to parse a string, and `reason` must stay groupable —
49
49
  * `topRefusalReasons` counts distinct `reason` values, so a detail concatenated into it would
@@ -123,7 +123,7 @@ interface RemRepository {
123
123
  pairingConfigHash: string;
124
124
  }): VerdictGenerationRef | undefined;
125
125
  listVerdictPairs(generationId: string): VerdictPairQueueItem[];
126
- /** The given pairs already closed with a recorded verdict in any generation (PRD 140 REQ-9). */
126
+ /** The given pairs already closed with a recorded verdict in any generation. */
127
127
  readClosedVerdictPairIds(pairIds: readonly string[]): Set<string>;
128
128
  claimNextPair(input: {
129
129
  generationId: string;
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Discovery } from "./internal/contract/discovery.js";
2
- import { A as HostEvent, B as UsageSignal, F as Mutation, I as RecallOptions, L as Registration, M as Inspection, N as JsonValue, P as Message, Q as ContractError, R as ScopeCtx, _ as ContractOutputs, et as DegradedReason, j as InitRegistration, n as MemoryContract, z as Turn } from "./index-DQ7VL6d3.js";
2
+ import { $ as ContractError, B as Turn, F as Message, I as Mutation, L as RecallOptions, M as InitRegistration, N as Inspection, P as JsonValue, R as Registration, V as UsageSignal, j as HostEvent, n as MemoryContract, tt as DegradedReason, v as ContractOutputs, z as ScopeCtx } from "./index-0aqS8pVF.js";
3
3
  //#region src/contract/client.d.ts
4
4
  export interface ConnectOptions {
5
5
  skinId: string;
package/dist/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as DEGRADED_REASONS, t as ContractError } from "./error-D-wb-rZw.js";
2
2
  import { r as outputSchemas } from "./results-C3ZLroMb.js";
3
- import { MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS } from "./internal/contract/routes.js";
3
+ import { MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, REM_SIDECAR_TOKEN_HEADER } from "./internal/contract/routes.js";
4
4
  import { getPrincipal, getSettingsPath, getSnoStationMemStateDir, getStartupLogPath } from "./internal/contract/profile.js";
5
5
  import { checkDiscovery, processAlive, readDiscovery } from "./internal/contract/discovery.js";
6
6
  import { join } from "node:path";
@@ -176,7 +176,8 @@ var MemoryClient = class {
176
176
  if (method !== "init" && this.#registration && this.#registeredPid !== discovery.pid) await this.request("init", this.#registration, signal);
177
177
  const response = await postJson(discovery.port, route.path, {
178
178
  "Content-Type": "application/json",
179
- [MEMORY_SKIN_HEADER]: this.skinId
179
+ [MEMORY_SKIN_HEADER]: this.skinId,
180
+ [REM_SIDECAR_TOKEN_HEADER]: discovery.token
180
181
  }, JSON.stringify({
181
182
  ...input,
182
183
  scope: {
@@ -2461,7 +2461,6 @@ function getSidecarSocketPath() {
2461
2461
  */
2462
2462
  const REM_SIDECAR_HOST = "127.0.0.1";
2463
2463
  const REM_SIDECAR_ORIGIN = "http://127.0.0.1";
2464
- const REM_SIDECAR_TOKEN_HEADER = "x-sidecar-token";
2465
2464
  const REM_CORRELATION_ID_HEADER = "x-rem-correlation-id";
2466
2465
  const REM_RUN_PATH = "/rem/run";
2467
2466
  const REM_JOBS_PATH_PREFIX = "/rem/jobs/";
@@ -2574,4 +2573,4 @@ function readMaintenanceOverrides() {
2574
2573
  };
2575
2574
  }
2576
2575
  //#endregion
2577
- export { FIXED_IDX_MEMORY_ACTIVE_TASK_CURRENT_REVISION as $, MAX_CANDIDATE_POOL_SIZE as $n, FIXED_PROTOCOL_VALUE_79 as $t, modelCallDestination as A, DEFAULT_REFLECTION_ERROR_SCAN_MAX_CHARS as An, FIXED_MEMORY_PROFILE_RECOVERY_ENTRIES as At, FIXED_EXTERNAL_VALUE_49 as B, FORGET_QUERY_MIN_SCORE as Bn, FIXED_PROTOCOL_VALUE_63 as Bt, getSidecarSocketPath as C, CHUNK_OVERLAP_TOKENS as Cn, CachedEmbeddingProvider as Cr, FIXED_MEMORY_CHUNKS_MEM_FACET_IDX as Ct, defaultSettings as D, DEFAULT_IMPORTANCE as Dn, LocalEmbedProvider as Dr, FIXED_MEMORY_MEMORIES_FACT_ID_INSERT_GUARD as Dt, readSettings as E, DEFAULT_BM25_WEIGHT as En, LOCAL_EMBEDDING_MODEL_REVISION as Er, FIXED_MEMORY_MEMORIES as Et, observeConfigSchema as F, DEFAULT_VECTOR_WEIGHT as Fn, FIXED_MEMORY_SNO_AI_EXTRACT as Ft, FIXED_EXTERNAL_VALUE_55 as G, IMPORTANCE_WEIGHT_BASE as Gn, FIXED_PROTOCOL_VALUE_68 as Gt, FIXED_EXTERNAL_VALUE_52 as H, HEAD_EXTRACT_MIN_CONTENT_TOKENS as Hn, FIXED_PROTOCOL_VALUE_65 as Ht, extractionConfigSchema as I, EMBEDDER_DIM as In, FIXED_MEMORY_SNO_EXTRACT_CHAT as It, FIXED_EXTERNAL_VALUE_58 as J, LIGHTWEIGHT_COSINE_WEIGHT as Jn, FIXED_PROTOCOL_VALUE_74 as Jt, FIXED_EXTERNAL_VALUE_56 as K, INTEGRITY_CHECK_INTERVAL_MS as Kn, FIXED_PROTOCOL_VALUE_69 as Kt, memoryReflectionConfigSchema as L, EMBEDDER_MODEL_DEFAULT as Ln, FIXED_MEMORY_SNO_EXTRACT_PROFILE as Lt, retrievalConfigSchema as M, DEFAULT_RERANK_MODEL as Mn, FIXED_MEMORY_PROVIDER_PROJECT_AGENTS as Mt, isObserveAgentId as N, DEFAULT_RERANK_TIMEOUT_MS as Nn, FIXED_MEMORY_PROVIDER_PROJECT_MAPPINGS as Nt, settingsToPluginConfig as O, DEFAULT_RECALL_LIFECYCLE as On, ensureModelDownloaded as Or, FIXED_MEMORY_MEMORIES_FACT_ID_UPDATE_GUARD as Ot, observeAgentId as P, DEFAULT_SCOPE as Pn, FIXED_MEMORY_ROW_PATH_PATTERN as Pt, FIXED_IDX_MEMORY as Q, MAX_AGGREGATION_RESULT_TOKENS as Qn, FIXED_PROTOCOL_VALUE_78 as Qt, selfImprovementConfigSchema as R, EMBEDDER_PROVIDER_DEFAULT as Rn, FIXED_MEMORY_TASK_LIFECYCLE_COMMANDS as Rt, getSettingsPath as S, CHUNK_MIN_TOKENS as Sn, recallLifecycleSchema as Sr, FIXED_MEMORY_CHUNKS_MEMORY_ID_IDX as St, getStateDir as T, CHUNK_TOKENIZER_MODE as Tn, LOCAL_EMBEDDING_MODEL as Tr, FIXED_MEMORY_EXTRACTION_TIMESTAMPS as Tt, FIXED_EXTERNAL_VALUE_53 as U, HEAD_EXTRACT_OVERLAP_DROP_RATIO as Un, FIXED_PROTOCOL_VALUE_66 as Ut, FIXED_EXTERNAL_VALUE_51 as V, FTS_MERGE_INTERVAL_MS as Vn, FIXED_PROTOCOL_VALUE_64 as Vt, FIXED_EXTERNAL_VALUE_54 as W, HEAD_EXTRACT_TOKEN_BUDGET as Wn, FIXED_PROTOCOL_VALUE_67 as Wt, FIXED_EXTERNAL_VALUE_8 as X, LIGHTWEIGHT_RERANK_PENALTY as Xn, FIXED_PROTOCOL_VALUE_76 as Xt, FIXED_EXTERNAL_VALUE_62 as Y, LIGHTWEIGHT_FUSION_WEIGHT as Yn, FIXED_PROTOCOL_VALUE_75 as Yt, FIXED_EXTERNAL_VALUE_9 as Z, MAINTENANCE_TICK_MS as Zn, FIXED_PROTOCOL_VALUE_77 as Zt, readRemOperationalConfig as _, BACKUP_MIN_FREE_DISK_RATIO as _n, USAGE_EVENT_RETENTION_INTERVAL_MS as _r, FIXED_MEMORY_CHUNKS as _t, REM_MODEL_OUTPUT_TOKEN_CAP as a, PERSISTED_PROVIDER_SYSTEM as an, MMR_LAMBDA as ar, FIXED_IDX_MEMORY_MEMORIES_LANE_PROJECT as at, getDiscoveryPath as b, CHUNKING_VERSION as bn, experimentCandidatePoolOverride as br, FIXED_MEMORY_CHUNKS_AU as bt, REM_SIDECAR_ORIGIN as c, SUPPORTED_LOCALES as cn, PLANNER_STATISTICS_INTERVAL_MS as cr, FIXED_IDX_MEMORY_MEMORIES_PROJECT_FACT_KEY_ACTIVE as ct, getRemChassisJournalPath as d, ADJACENCY_BONUS_PER_PAIR as dn, REM_TRIGGER_CHECK_INTERVAL_MS as dr, FIXED_MEMORY_ACTIVE_TASK_EVIDENCE as dt, FIXED_VEC_MEMORY as en, MAX_CHUNK_FETCH_LIMIT as er, FIXED_IDX_MEMORY_ACTIVE_TASK_EVIDENCE_INSTANCE as et, getRemDiscoveryPath as f, ATOMIC_CAPTURE_OUTPUT_TOKEN_BUDGET as fn, RERANK_BLEND_CROSS as fr, FIXED_MEMORY_ACTIVE_TASK_INSTANCES as ft, readMaintenanceOverrides as g, BACKUP_INTERVAL_MS as gn, TIME_DECAY_FLOOR as gr, FIXED_MEMORY_ACTIVE_TASK_TRANSITIONS as gt, isRemTraceEnabled as h, ATOMIC_EXTRACTION_MAX_INPUT_TOKENS as hn, SNO_OBSERVE_FLUSH_TIMEOUT_MS as hr, FIXED_MEMORY_ACTIVE_TASK_REVISIONS as ht, REM_JOBS_PATH_PREFIX as i, PERSISTED_CONTENT_HASH_V3 as in, MIN_RECALL_TOKEN_BUDGET as ir, FIXED_IDX_MEMORY_MEMORIES_FACT_ID as it, SESSION_STRATEGIES as j, DEFAULT_REFLECTION_SESSION_TTL_MS as jn, FIXED_MEMORY_PROVIDER_AGENT_MAPPINGS as jt, MODEL_CALLS as k, DEFAULT_RECALL_TOKEN_BUDGET as kn, FIXED_MEMORY_MIGRATION_MARKERS as kt, REM_SIDECAR_TOKEN_HEADER as l, isSupportedLocale as ln, RECENCY_WEIGHT as lr, FIXED_IDX_MEMORY_MEMORIES_PROJECT_TIMESTAMP as lt, getRemTraceLogPath as m, ATOMIC_ENRICHMENT_OUTPUT_TOKEN_BUDGET as mn, RETRIEVAL_STORAGE_CHUNK_PROFILE as mr, FIXED_MEMORY_ACTIVE_TASK_MIGRATION_MANIFESTS as mt, MEMORY_USAGE_FLUSH_INTERVAL_MS as n, PERSISTED_CANDIDATE_HASH_V1 as nn, MAX_RECALLED_TODO_TOKENS as nr, FIXED_IDX_MEMORY_MEMORIES_CATEGORY as nt, REM_RUN_PATH as o, embeddingConfigSchema as on, MULTI_HIT_BONUS_CAP as or, FIXED_IDX_MEMORY_MEMORIES_PROJECT as ot, getRemJobJournalPath as p, ATOMIC_CAPTURE_TIMEOUT_MS as pn, RERANK_BLEND_VECTOR as pr, FIXED_MEMORY_ACTIVE_TASK_MIGRATION_EVIDENCE as pt, FIXED_EXTERNAL_VALUE_57 as q, INTRA_MEMORY_COSINE_THRESHOLD as qn, FIXED_PROTOCOL_VALUE_73 as qt, REM_CORRELATION_ID_HEADER as r, PERSISTED_CONTENT_HASH_V1 as rn, MEMORY_SHUTDOWN_TIMEOUT_MS as rr, FIXED_IDX_MEMORY_MEMORIES_CONTENT_HASH as rt, REM_SIDECAR_HOST as s, llmRoutingConfigSchema as sn, MULTI_HIT_BONUS_PER_HIT as sr, FIXED_IDX_MEMORY_MEMORIES_PROJECT_CONTENT_HASH as st, HEALTH_PATH as t, FIXED_VEC_MEMORY_CHUNKS as tn, MAX_LIST_LIMIT as tr, FIXED_IDX_MEMORY_ACTIVE_TASK_INSTANCES_PROJECTION as tt, REM_SOURCE as u, ADJACENCY_BONUS_CAP as un, REFLECTION_SLICE_CACHE_TTL_MS as ur, FIXED_MEMORY as ut, readRemTestHoldMs as v, BONUS_TOTAL_INVARIANT as vn, USAGE_OUTBOX_INTERVAL_MS as vr, FIXED_MEMORY_CHUNKS_AD as vt, getSnoStationMemStateDir as w, CHUNK_TARGET_TOKENS as wn, LOCAL_EMBEDDING_CACHE_DIR_DEFAULT as wr, FIXED_MEMORY_CHUNKS_MEM_IDX as wt, getPrincipal as x, CHUNK_MAX_TOKENS as xn, experimentMmrDisabled as xr, FIXED_MEMORY_CHUNKS_FTS as xt, SettingsUnavailableError as y, CACHE_TTL_MS as yn, VECTOR_DIMENSION_DEFAULT as yr, FIXED_MEMORY_CHUNKS_AI as yt, sessionMemoryConfigSchema as z, EVAL_QA_TRACES_FILENAME as zn, FIXED_MEMORY_UNPLACED_CANDIDATES as zt };
2576
+ export { FIXED_IDX_MEMORY_ACTIVE_TASK_EVIDENCE_INSTANCE as $, MAX_CHUNK_FETCH_LIMIT as $n, FIXED_VEC_MEMORY as $t, SESSION_STRATEGIES as A, DEFAULT_REFLECTION_SESSION_TTL_MS as An, FIXED_MEMORY_PROVIDER_AGENT_MAPPINGS as At, FIXED_EXTERNAL_VALUE_51 as B, FTS_MERGE_INTERVAL_MS as Bn, FIXED_PROTOCOL_VALUE_64 as Bt, getSnoStationMemStateDir as C, CHUNK_TARGET_TOKENS as Cn, LOCAL_EMBEDDING_CACHE_DIR_DEFAULT as Cr, FIXED_MEMORY_CHUNKS_MEM_IDX as Ct, settingsToPluginConfig as D, DEFAULT_RECALL_LIFECYCLE as Dn, ensureModelDownloaded as Dr, FIXED_MEMORY_MEMORIES_FACT_ID_UPDATE_GUARD as Dt, defaultSettings as E, DEFAULT_IMPORTANCE as En, LocalEmbedProvider as Er, FIXED_MEMORY_MEMORIES_FACT_ID_INSERT_GUARD as Et, extractionConfigSchema as F, EMBEDDER_DIM as Fn, FIXED_MEMORY_SNO_EXTRACT_CHAT as Ft, FIXED_EXTERNAL_VALUE_56 as G, INTEGRITY_CHECK_INTERVAL_MS as Gn, FIXED_PROTOCOL_VALUE_69 as Gt, FIXED_EXTERNAL_VALUE_53 as H, HEAD_EXTRACT_OVERLAP_DROP_RATIO as Hn, FIXED_PROTOCOL_VALUE_66 as Ht, memoryReflectionConfigSchema as I, EMBEDDER_MODEL_DEFAULT as In, FIXED_MEMORY_SNO_EXTRACT_PROFILE as It, FIXED_EXTERNAL_VALUE_62 as J, LIGHTWEIGHT_FUSION_WEIGHT as Jn, FIXED_PROTOCOL_VALUE_75 as Jt, FIXED_EXTERNAL_VALUE_57 as K, INTRA_MEMORY_COSINE_THRESHOLD as Kn, FIXED_PROTOCOL_VALUE_73 as Kt, selfImprovementConfigSchema as L, EMBEDDER_PROVIDER_DEFAULT as Ln, FIXED_MEMORY_TASK_LIFECYCLE_COMMANDS as Lt, isObserveAgentId as M, DEFAULT_RERANK_TIMEOUT_MS as Mn, FIXED_MEMORY_PROVIDER_PROJECT_MAPPINGS as Mt, observeAgentId as N, DEFAULT_SCOPE as Nn, FIXED_MEMORY_ROW_PATH_PATTERN as Nt, MODEL_CALLS as O, DEFAULT_RECALL_TOKEN_BUDGET as On, FIXED_MEMORY_MIGRATION_MARKERS as Ot, observeConfigSchema as P, DEFAULT_VECTOR_WEIGHT as Pn, FIXED_MEMORY_SNO_AI_EXTRACT as Pt, FIXED_IDX_MEMORY_ACTIVE_TASK_CURRENT_REVISION as Q, MAX_CANDIDATE_POOL_SIZE as Qn, FIXED_PROTOCOL_VALUE_79 as Qt, sessionMemoryConfigSchema as R, EVAL_QA_TRACES_FILENAME as Rn, FIXED_MEMORY_UNPLACED_CANDIDATES as Rt, getSidecarSocketPath as S, CHUNK_OVERLAP_TOKENS as Sn, CachedEmbeddingProvider as Sr, FIXED_MEMORY_CHUNKS_MEM_FACET_IDX as St, readSettings as T, DEFAULT_BM25_WEIGHT as Tn, LOCAL_EMBEDDING_MODEL_REVISION as Tr, FIXED_MEMORY_MEMORIES as Tt, FIXED_EXTERNAL_VALUE_54 as U, HEAD_EXTRACT_TOKEN_BUDGET as Un, FIXED_PROTOCOL_VALUE_67 as Ut, FIXED_EXTERNAL_VALUE_52 as V, HEAD_EXTRACT_MIN_CONTENT_TOKENS as Vn, FIXED_PROTOCOL_VALUE_65 as Vt, FIXED_EXTERNAL_VALUE_55 as W, IMPORTANCE_WEIGHT_BASE as Wn, FIXED_PROTOCOL_VALUE_68 as Wt, FIXED_EXTERNAL_VALUE_9 as X, MAINTENANCE_TICK_MS as Xn, FIXED_PROTOCOL_VALUE_77 as Xt, FIXED_EXTERNAL_VALUE_8 as Y, LIGHTWEIGHT_RERANK_PENALTY as Yn, FIXED_PROTOCOL_VALUE_76 as Yt, FIXED_IDX_MEMORY as Z, MAX_AGGREGATION_RESULT_TOKENS as Zn, FIXED_PROTOCOL_VALUE_78 as Zt, readRemTestHoldMs as _, BONUS_TOTAL_INVARIANT as _n, USAGE_OUTBOX_INTERVAL_MS as _r, FIXED_MEMORY_CHUNKS_AD as _t, REM_MODEL_OUTPUT_TOKEN_CAP as a, embeddingConfigSchema as an, MULTI_HIT_BONUS_CAP as ar, FIXED_IDX_MEMORY_MEMORIES_PROJECT as at, getPrincipal as b, CHUNK_MAX_TOKENS as bn, experimentMmrDisabled as br, FIXED_MEMORY_CHUNKS_FTS as bt, REM_SIDECAR_ORIGIN as c, isSupportedLocale as cn, RECENCY_WEIGHT as cr, FIXED_IDX_MEMORY_MEMORIES_PROJECT_TIMESTAMP as ct, getRemDiscoveryPath as d, ATOMIC_CAPTURE_OUTPUT_TOKEN_BUDGET as dn, RERANK_BLEND_CROSS as dr, FIXED_MEMORY_ACTIVE_TASK_INSTANCES as dt, FIXED_VEC_MEMORY_CHUNKS as en, MAX_LIST_LIMIT as er, FIXED_IDX_MEMORY_ACTIVE_TASK_INSTANCES_PROJECTION as et, getRemJobJournalPath as f, ATOMIC_CAPTURE_TIMEOUT_MS as fn, RERANK_BLEND_VECTOR as fr, FIXED_MEMORY_ACTIVE_TASK_MIGRATION_EVIDENCE as ft, readRemOperationalConfig as g, BACKUP_MIN_FREE_DISK_RATIO as gn, USAGE_EVENT_RETENTION_INTERVAL_MS as gr, FIXED_MEMORY_CHUNKS as gt, readMaintenanceOverrides as h, BACKUP_INTERVAL_MS as hn, TIME_DECAY_FLOOR as hr, FIXED_MEMORY_ACTIVE_TASK_TRANSITIONS as ht, REM_JOBS_PATH_PREFIX as i, PERSISTED_PROVIDER_SYSTEM as in, MMR_LAMBDA as ir, FIXED_IDX_MEMORY_MEMORIES_LANE_PROJECT as it, retrievalConfigSchema as j, DEFAULT_RERANK_MODEL as jn, FIXED_MEMORY_PROVIDER_PROJECT_AGENTS as jt, modelCallDestination as k, DEFAULT_REFLECTION_ERROR_SCAN_MAX_CHARS as kn, FIXED_MEMORY_PROFILE_RECOVERY_ENTRIES as kt, REM_SOURCE as l, ADJACENCY_BONUS_CAP as ln, REFLECTION_SLICE_CACHE_TTL_MS as lr, FIXED_MEMORY as lt, isRemTraceEnabled as m, ATOMIC_EXTRACTION_MAX_INPUT_TOKENS as mn, SNO_OBSERVE_FLUSH_TIMEOUT_MS as mr, FIXED_MEMORY_ACTIVE_TASK_REVISIONS as mt, MEMORY_USAGE_FLUSH_INTERVAL_MS as n, PERSISTED_CONTENT_HASH_V1 as nn, MEMORY_SHUTDOWN_TIMEOUT_MS as nr, FIXED_IDX_MEMORY_MEMORIES_CONTENT_HASH as nt, REM_RUN_PATH as o, llmRoutingConfigSchema as on, MULTI_HIT_BONUS_PER_HIT as or, FIXED_IDX_MEMORY_MEMORIES_PROJECT_CONTENT_HASH as ot, getRemTraceLogPath as p, ATOMIC_ENRICHMENT_OUTPUT_TOKEN_BUDGET as pn, RETRIEVAL_STORAGE_CHUNK_PROFILE as pr, FIXED_MEMORY_ACTIVE_TASK_MIGRATION_MANIFESTS as pt, FIXED_EXTERNAL_VALUE_58 as q, LIGHTWEIGHT_COSINE_WEIGHT as qn, FIXED_PROTOCOL_VALUE_74 as qt, REM_CORRELATION_ID_HEADER as r, PERSISTED_CONTENT_HASH_V3 as rn, MIN_RECALL_TOKEN_BUDGET as rr, FIXED_IDX_MEMORY_MEMORIES_FACT_ID as rt, REM_SIDECAR_HOST as s, SUPPORTED_LOCALES as sn, PLANNER_STATISTICS_INTERVAL_MS as sr, FIXED_IDX_MEMORY_MEMORIES_PROJECT_FACT_KEY_ACTIVE as st, HEALTH_PATH as t, PERSISTED_CANDIDATE_HASH_V1 as tn, MAX_RECALLED_TODO_TOKENS as tr, FIXED_IDX_MEMORY_MEMORIES_CATEGORY as tt, getRemChassisJournalPath as u, ADJACENCY_BONUS_PER_PAIR as un, REM_TRIGGER_CHECK_INTERVAL_MS as ur, FIXED_MEMORY_ACTIVE_TASK_EVIDENCE as ut, SettingsUnavailableError as v, CACHE_TTL_MS as vn, VECTOR_DIMENSION_DEFAULT as vr, FIXED_MEMORY_CHUNKS_AI as vt, getStateDir as w, CHUNK_TOKENIZER_MODE as wn, LOCAL_EMBEDDING_MODEL as wr, FIXED_MEMORY_EXTRACTION_TIMESTAMPS as wt, getSettingsPath as x, CHUNK_MIN_TOKENS as xn, recallLifecycleSchema as xr, FIXED_MEMORY_CHUNKS_MEMORY_ID_IDX as xt, getDiscoveryPath as y, CHUNKING_VERSION as yn, experimentCandidatePoolOverride as yr, FIXED_MEMORY_CHUNKS_AU as yt, FIXED_EXTERNAL_VALUE_49 as z, FORGET_QUERY_MIN_SCORE as zn, FIXED_PROTOCOL_VALUE_63 as zt };
@@ -368,7 +368,7 @@ interface VecTableState {
368
368
  declare function readChunkVecTableState(db: SqliteDatabaseLike): VecTableState | undefined;
369
369
  declare function loadStorageExtensions(sqlite: SqliteRuntimeHandle): void;
370
370
  /**
371
- * Per PRD `cjk-other-fix.md` §D.3.6. Startup invariant: the persisted DDL
371
+ * Startup invariant: the persisted DDL
372
372
  * for `nodix_memory_chunks_fts` must declare `tokenize='simple ...'`. Catches DBs
373
373
  * created against an older plugin build (still on `unicode61`) so a stale
374
374
  * DB plus a fresh plugin doesn't silently degrade CJK recall to char-level.
@@ -147,7 +147,7 @@ function ensureChunkVecTable(db, vectorDim) {
147
147
  return verified.dimension;
148
148
  }
149
149
  /**
150
- * Per PRD `cjk-other-fix.md` §D.3.4. Loads the wangfenjin/simple SQLite
150
+ * Loads the wangfenjin/simple SQLite
151
151
  * tokenizer extension and registers its jieba dictionary path. Called once
152
152
  * per connection, BEFORE migrations run, so 0006 can create the
153
153
  * `nodix_memory_chunks_fts` virtual table with `tokenize='simple 0'`.
@@ -177,7 +177,7 @@ function loadStorageExtensions(sqlite) {
177
177
  loadSimpleTokenizer(sqlite.db);
178
178
  }
179
179
  /**
180
- * Per PRD `cjk-other-fix.md` §D.3.6. Startup invariant: the persisted DDL
180
+ * Startup invariant: the persisted DDL
181
181
  * for `nodix_memory_chunks_fts` must declare `tokenize='simple ...'`. Catches DBs
182
182
  * created against an older plugin build (still on `unicode61`) so a stale
183
183
  * DB plus a fresh plugin doesn't silently degrade CJK recall to char-level.
@@ -8,7 +8,7 @@ interface InstallManifestShape {
8
8
  createdAt: string;
9
9
  dbPath: string;
10
10
  }
11
- /** PRD §3.2 schema. No `lastSeenVersion` / `lastSeenAt`. */
11
+ /** Schema. No `lastSeenVersion` / `lastSeenAt`. */
12
12
  declare const InstallManifestSchema: z.ZodType<InstallManifestShape, unknown>;
13
13
  type InstallManifest = z.infer<typeof InstallManifestSchema>;
14
14
  //#endregion
@@ -20,7 +20,7 @@ interface BootstrapResult {
20
20
  dataDir: string;
21
21
  }
22
22
  /**
23
- * PRD §3.3 branches:
23
+ * Branches:
24
24
  * 1. manifest exists → read + validate.
25
25
  * 2. manifest missing AND data dir contains user data → refuse.
26
26
  * 3. manifest missing, dir empty → fresh install.
@@ -5,7 +5,7 @@ import { basename, dirname } from "node:path";
5
5
  import { createUUIDv7, isLowercaseCanonicalUUIDv7 } from "@snoai/common-core";
6
6
  import { chmodSync, closeSync, existsSync, fsyncSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, writeFileSync } from "node:fs";
7
7
  const INSTALL_MANIFEST_TEMP_SUFFIX = ".tmp-";
8
- /** PRD §3.2 schema. No `lastSeenVersion` / `lastSeenAt`. */
8
+ /** Schema. No `lastSeenVersion` / `lastSeenAt`. */
9
9
  const InstallManifestSchema = z.object({
10
10
  schemaVersion: z.literal(1),
11
11
  dataFormatVersion: z.literal(1),
@@ -25,7 +25,7 @@ var ManifestSchemaError = class extends Error {
25
25
  };
26
26
  /**
27
27
  * Thrown when the data dir contains user data (DB / audit log / cost log) but
28
- * `install.json` is missing. Per PRD §3.3 we refuse to do anything destructive
28
+ * `install.json` is missing, so nothing destructive happens
29
29
  * here; the user must restore `install.json` from backup or move the data aside.
30
30
  */
31
31
  var ManifestMissingButDataPresentError = class extends Error {
@@ -104,7 +104,7 @@ function freshInstallManifest(args) {
104
104
  * resolves the DEK. Returns `{ dbPath, manifest, manifestPath }`.
105
105
  */
106
106
  const log = createLogger("sno-station-mem:data-bootstrap");
107
- /** Detect "data exists but manifest missing" — PRD §3.3. */
107
+ /** Detect "data exists but manifest missing". */
108
108
  function newDirHasUserData(dataDir, manifestPath) {
109
109
  const manifestTempPrefix = `${basename(manifestPath)}${INSTALL_MANIFEST_TEMP_SUFFIX}`;
110
110
  try {
@@ -114,7 +114,7 @@ function newDirHasUserData(dataDir, manifestPath) {
114
114
  }
115
115
  }
116
116
  /**
117
- * PRD §3.3 branches:
117
+ * Branches:
118
118
  * 1. manifest exists → read + validate.
119
119
  * 2. manifest missing AND data dir contains user data → refuse.
120
120
  * 3. manifest missing, dir empty → fresh install.
@@ -1,4 +1,4 @@
1
- import "./types-DxKqU60b.js";
1
+ import "./types-CWdhXLxr.js";
2
2
  //#region src/engine/reflection/reflection-line-loader.d.ts
3
3
  interface ReflectionLineSource {
4
4
  line: string;
@@ -1,4 +1,4 @@
1
- import { n as version, t as logSiteCatalog } from "./log-site-catalog.generated-B9WYdnAM.js";
1
+ import { n as version, t as logSiteCatalog } from "./log-site-catalog.generated-BMKWj-Nx.js";
2
2
  import { diagnosticProcessInstanceId, encodeDiagnostic as encodeDiagnostic$1, writeEmergencyDiagnostic as writeEmergencyDiagnostic$1 } from "@snoai/utils/log-encoder";
3
3
  //#region src/engine/observability/early-diagnostics.ts
4
4
  function bindApplication(input) {
@@ -1,5 +1,5 @@
1
1
  import { p as LlmRoutingConfig, t as PluginConfig } from "./plugin-config-schema-C0UUbOmG.js";
2
- import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-DxKqU60b.js";
2
+ import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-CWdhXLxr.js";
3
3
  import { r as SnoStationMemMemorySearchResult } from "./provider-runtime-types-DFhtdA6d.js";
4
4
  import { z } from "zod";
5
5
  //#region src/contract/error.d.ts
@@ -320,6 +320,7 @@ declare const MEMORY_ROUTES: Readonly<Record<ContractMethod, {
320
320
  }>>;
321
321
  declare const MEMORY_BODY_LIMIT_BYTES: number;
322
322
  declare const MEMORY_SKIN_HEADER = "x-sno-station-mem-skin";
323
+ declare const REM_SIDECAR_TOKEN_HEADER = "x-sidecar-token";
323
324
  declare const MEMORY_HEALTH_TIMEOUT_MS = 5e3;
324
325
  declare const MEMORY_START_TIMEOUT_MS = 3e4;
325
326
  declare function memoryMethod(pathname: string): ContractMethod | undefined;
@@ -347,4 +348,4 @@ declare function contractJsonSchemas(method: ContractMethod): {
347
348
  output: z.core.JSONSchema.JSONSchema;
348
349
  };
349
350
  //#endregion
350
- export { DEGRADED_REASONS as $, HostEvent as A, UsageSignal as B, outputSchemas as C, ContractInputs as D, AgentModelRegistration as E, Mutation as F, messageSchema as G, initRegistrationSchema as H, RecallOptions as I, registrationSchema as J, mutationSchema as K, Registration as L, Inspection as M, JsonValue as N, HostContext as O, Message as P, ContractError as Q, ScopeCtx as R, memoryEntrySchema as S, toolResponseSchema as T, inputSchemas as U, hostEventSchema as V, inspectionSchema as W, turnSchema as X, scopeSchema as Y, usageSignalSchema as Z, ContractOutputs as _, parseOutput as a, ToolResponse as b, MEMORY_ERROR_STATUS as c, MEMORY_ROUTES as d, DegradedReason as et, MEMORY_SKIN_HEADER as f, engineSettingsSchema as g, EngineSettings as h, parseInput as i, InitRegistration as j, HostDecision as k, MEMORY_HEALTH_TIMEOUT_MS as l, memoryMethod as m, MemoryContract as n, MEMORY_BODY_LIMIT_BYTES as o, MEMORY_START_TIMEOUT_MS as p, recallOptionsSchema as q, contractJsonSchemas as r, MEMORY_DEFAULT_SKIN_ID as s, ContractMethod as t, MEMORY_RECONNECT_INTERVAL_MS as u, InspectData as v, retrievalResultSchema as w, inspectDataSchema as x, Result as y, Turn as z };
351
+ export { ContractError as $, HostDecision as A, Turn as B, memoryEntrySchema as C, AgentModelRegistration as D, toolResponseSchema as E, Message as F, inspectionSchema as G, hostEventSchema as H, Mutation as I, recallOptionsSchema as J, messageSchema as K, RecallOptions as L, InitRegistration as M, Inspection as N, ContractInputs as O, JsonValue as P, usageSignalSchema as Q, Registration as R, inspectDataSchema as S, retrievalResultSchema as T, initRegistrationSchema as U, UsageSignal as V, inputSchemas as W, scopeSchema as X, registrationSchema as Y, turnSchema as Z, engineSettingsSchema as _, parseOutput as a, Result as b, MEMORY_ERROR_STATUS as c, MEMORY_ROUTES as d, DEGRADED_REASONS as et, MEMORY_SKIN_HEADER as f, EngineSettings as g, memoryMethod as h, parseInput as i, HostEvent as j, HostContext as k, MEMORY_HEALTH_TIMEOUT_MS as l, REM_SIDECAR_TOKEN_HEADER as m, MemoryContract as n, MEMORY_BODY_LIMIT_BYTES as o, MEMORY_START_TIMEOUT_MS as p, mutationSchema as q, contractJsonSchemas as r, MEMORY_DEFAULT_SKIN_ID as s, ContractMethod as t, DegradedReason as tt, MEMORY_RECONNECT_INTERVAL_MS as u, ContractOutputs as v, outputSchemas as w, ToolResponse as x, InspectData as y, ScopeCtx as z };
@@ -1,5 +1,5 @@
1
1
  import { c as RemConfig, d as RemEnableGateArtifact, g as RemOperationType, o as RemBuiltOperationType, u as RemDatabaseLike } from "./types-pVomjzqR.js";
2
- import { g as JournalEntry } from "./classifier-C96uH9OF.js";
2
+ import { g as JournalEntry } from "./classifier-DnbbtwTS.js";
3
3
  //#region src/engine/rem/adapter-a-conflict-adjudicator.d.ts
4
4
  type AdapterAVerdict = "replacement" | "keep" | "uncertain";
5
5
  interface AdapterAMemoryView {
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { t as PluginConfig, y as Settings } from "./plugin-config-schema-C0UUbOmG.js";
2
- import "./types-DxKqU60b.js";
2
+ import "./types-CWdhXLxr.js";
3
3
  import { n as AgentLlmPort } from "./agent-llm-port-5oXgBpzJ.js";
4
- import { n as PluginObservability } from "./adapter-DMEmCTKo.js";
5
- import { $ as DEGRADED_REASONS, A as HostEvent, B as UsageSignal, C as outputSchemas, D as ContractInputs, E as AgentModelRegistration, F as Mutation, G as messageSchema, H as initRegistrationSchema, I as RecallOptions, J as registrationSchema, K as mutationSchema, L as Registration, M as Inspection, N as JsonValue, O as HostContext, P as Message, Q as ContractError, R as ScopeCtx, S as memoryEntrySchema, T as toolResponseSchema, U as inputSchemas, V as hostEventSchema, W as inspectionSchema, X as turnSchema, Y as scopeSchema, Z as usageSignalSchema, _ as ContractOutputs, a as parseOutput, b as ToolResponse, c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, et as DegradedReason, f as MEMORY_SKIN_HEADER, g as engineSettingsSchema, h as EngineSettings, i as parseInput, j as InitRegistration, k as HostDecision, l as MEMORY_HEALTH_TIMEOUT_MS, m as memoryMethod, n as MemoryContract, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, q as recallOptionsSchema, r as contractJsonSchemas, s as MEMORY_DEFAULT_SKIN_ID, t as ContractMethod, u as MEMORY_RECONNECT_INTERVAL_MS, v as InspectData, w as retrievalResultSchema, x as inspectDataSchema, y as Result, z as Turn } from "./index-DQ7VL6d3.js";
4
+ import { n as PluginObservability } from "./adapter-B7Jox9-6.js";
5
+ import { $ as ContractError, A as HostDecision, B as Turn, C as memoryEntrySchema, D as AgentModelRegistration, E as toolResponseSchema, F as Message, G as inspectionSchema, H as hostEventSchema, I as Mutation, J as recallOptionsSchema, K as messageSchema, L as RecallOptions, M as InitRegistration, N as Inspection, O as ContractInputs, P as JsonValue, Q as usageSignalSchema, R as Registration, S as inspectDataSchema, T as retrievalResultSchema, U as initRegistrationSchema, V as UsageSignal, W as inputSchemas, X as scopeSchema, Y as registrationSchema, Z as turnSchema, _ as engineSettingsSchema, a as parseOutput, b as Result, c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, et as DEGRADED_REASONS, f as MEMORY_SKIN_HEADER, g as EngineSettings, h as memoryMethod, i as parseInput, j as HostEvent, k as HostContext, l as MEMORY_HEALTH_TIMEOUT_MS, m as REM_SIDECAR_TOKEN_HEADER, n as MemoryContract, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, q as mutationSchema, r as contractJsonSchemas, s as MEMORY_DEFAULT_SKIN_ID, t as ContractMethod, tt as DegradedReason, u as MEMORY_RECONNECT_INTERVAL_MS, v as ContractOutputs, w as outputSchemas, x as ToolResponse, y as InspectData, z as ScopeCtx } from "./index-0aqS8pVF.js";
6
6
  import { t as Embedder } from "./embedding-provider-client-vynZMuit.js";
7
- import { t as MemoryRetriever } from "./retriever-Ruk3zp7_.js";
8
- import { C as MemoryStore } from "./memory-store-base-XRA4S9Xl.js";
9
- import "./store-2pM0-dZg.js";
10
- import { n as AccessTracker } from "./access-tracker-CSc21GtV.js";
7
+ import { t as MemoryRetriever } from "./retriever-Dxss5fRv.js";
8
+ import { C as MemoryStore } from "./memory-store-base-CQ_bHlYA.js";
9
+ import "./store-C8sUTssE.js";
10
+ import { n as AccessTracker } from "./access-tracker-BbEvEocb.js";
11
11
  import { r as MemoryTelemetryUsageOutbox } from "./memory-telemetry-outbox-ddTdImt7.js";
12
- import { t as ReflectionCommandParams } from "./reflection-command-hooks-C1Vxgb-O.js";
12
+ import { t as ReflectionCommandParams } from "./reflection-command-hooks-G1-dI2Av.js";
13
13
  import { createMemoryRuntime } from "./internal/engine/provider/provider-registration.js";
14
14
  //#region src/engine/contract-runtime.d.ts
15
15
  interface MemoryRuntimeServices {
@@ -62,4 +62,4 @@ export declare class MemoryContractRuntime implements MemoryContract {
62
62
  staticBlock(scope: ScopeCtx): Promise<ContractOutputs["staticBlock"]>;
63
63
  }
64
64
  //#endregion
65
- export { AgentModelRegistration, ContractError, ContractInputs, ContractMethod, ContractOutputs, DEGRADED_REASONS, DegradedReason, EngineSettings, HostContext, HostDecision, HostEvent, InitRegistration, InspectData, Inspection, JsonValue, MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, MemoryContract, type MemoryRuntimeServices, Message, Mutation, RecallOptions, Registration, Result, ScopeCtx, ToolResponse, Turn, UsageSignal, contractJsonSchemas, createMemoryRuntime, engineSettingsSchema, hostEventSchema, initRegistrationSchema, inputSchemas, inspectDataSchema, inspectionSchema, memoryEntrySchema, memoryMethod, messageSchema, mutationSchema, outputSchemas, parseInput, parseOutput, recallOptionsSchema, registrationSchema, retrievalResultSchema, scopeSchema, toolResponseSchema, turnSchema, usageSignalSchema };
65
+ export { AgentModelRegistration, ContractError, ContractInputs, ContractMethod, ContractOutputs, DEGRADED_REASONS, DegradedReason, EngineSettings, HostContext, HostDecision, HostEvent, InitRegistration, InspectData, Inspection, JsonValue, MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, MemoryContract, type MemoryRuntimeServices, Message, Mutation, REM_SIDECAR_TOKEN_HEADER, RecallOptions, Registration, Result, ScopeCtx, ToolResponse, Turn, UsageSignal, contractJsonSchemas, createMemoryRuntime, engineSettingsSchema, hostEventSchema, initRegistrationSchema, inputSchemas, inspectDataSchema, inspectionSchema, memoryEntrySchema, memoryMethod, messageSchema, mutationSchema, outputSchemas, parseInput, parseOutput, recallOptionsSchema, registrationSchema, retrievalResultSchema, scopeSchema, toolResponseSchema, turnSchema, usageSignalSchema };
package/dist/index.js CHANGED
@@ -3,27 +3,27 @@ import { recallLifecycleSchema } from "./internal/config/index.js";
3
3
  import { AGGREGATION_OPERATIONS, MEMORY_CATEGORIES } from "./internal/engine/shared/types.js";
4
4
  import { n as DEGRADED_REASONS, t as ContractError } from "./error-D-wb-rZw.js";
5
5
  import { a as toolResponseSchema, i as retrievalResultSchema, n as memoryEntrySchema, r as outputSchemas, t as inspectDataSchema } from "./results-C3ZLroMb.js";
6
- import { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, memoryMethod } from "./internal/contract/routes.js";
6
+ import { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, REM_SIDECAR_TOKEN_HEADER, memoryMethod } from "./internal/contract/routes.js";
7
7
  import { o as resolveProviderIdentity, s as SnoStationMemProviderSearchManager, t as createMemoryRuntime } from "./provider-registration-CF1tg8Xy.js";
8
8
  import { s as withMemoryOperation, t as checkMemoryOperation } from "./operation-cancellation-CTKWwNHk.js";
9
9
  import { pruneOldestEntries, setLruEntry } from "./internal/engine/shared/lru.js";
10
10
  import { CODING_SKIN_LEDGER_MAX_CHARS, CODING_SKIN_SESSION_QUERY } from "./coding-skin.js";
11
11
  import { defaultSettings } from "./internal/config/settings.js";
12
- import { i as createLlmClient } from "./llm-client-B7Xoxqou.js";
12
+ import { i as createLlmClient } from "./llm-client-BSYUAcUb.js";
13
13
  import { pickLlmRoutingConfig } from "./internal/model/llm-mode-routing.js";
14
14
  import { a as parseAgentIdFromSessionKey, n as createScopePolicy, t as MemoryScopePolicy } from "./memory-scope-policy-DICSCURA.js";
15
- import { a as serializeIntervalMetadata, o as resolveMemoryDate } from "./memory-temporality-classifier-CKiTAHXe.js";
15
+ import { a as serializeIntervalMetadata, o as resolveMemoryDate } from "./memory-temporality-classifier-BUjXG5o7.js";
16
16
  import { resolveAgentAccess, resolveAgentId } from "./internal/engine/bindings/memory-tool-access.js";
17
- import { r as retrieveForAutoRecall, t as isOpenRecallMetadata } from "./rem-consumer-retrieval-CRpvG8KS.js";
17
+ import { r as retrieveForAutoRecall, t as isOpenRecallMetadata } from "./rem-consumer-retrieval-CR0dtcHR.js";
18
18
  import { executeMemoryRecallTool } from "./internal/engine/bindings/memory-recall-tool.js";
19
- import { t as createReflectionStrategyState } from "./strategy-hook-runner-zmdIYOmQ.js";
19
+ import { t as createReflectionStrategyState } from "./strategy-hook-runner-Djify5Rw.js";
20
20
  import { buildInsightDistiller } from "./internal/engine/bindings/sno-station-mem-insight-distill-factory.js";
21
21
  import { onAgentEnd } from "./internal/engine/bindings/sno-station-mem-ambient-learning-hook.js";
22
22
  import { executeMemoryStoreTool } from "./internal/engine/bindings/memory-store-tool.js";
23
23
  import { executeMemoryForgetTool } from "./internal/engine/bindings/memory-forget-tool.js";
24
24
  import { executeMemoryUpdateTool } from "./internal/engine/bindings/memory-update-tool.js";
25
25
  import { executeMemoryReflectionResolveTool } from "./internal/engine/bindings/memory-reflection-resolve-tool.js";
26
- import { t as createRunMemoryReflection } from "./reflection-command-hooks-BeQiJI9-.js";
26
+ import { t as createRunMemoryReflection } from "./reflection-command-hooks-ClUl-iv6.js";
27
27
  import { createReflectionLifecycleHandler1, createReflectionLifecycleHandler2 } from "./internal/engine/reflection/reflection-lifecycle-hooks.js";
28
28
  import { createReflectionInjectionHandler1, createReflectionInjectionHandler2, createReflectionInjectionHandler3 } from "./internal/engine/reflection/reflection-injection-hooks.js";
29
29
  import { z } from "zod";
@@ -1198,4 +1198,4 @@ var MemoryContractRuntime = class {
1198
1198
  }
1199
1199
  };
1200
1200
  //#endregion
1201
- export { ContractError, DEGRADED_REASONS, MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, MemoryContractRuntime, contractJsonSchemas, createMemoryRuntime, engineSettingsSchema, hostEventSchema, initRegistrationSchema, inputSchemas, inspectDataSchema, inspectionSchema, memoryEntrySchema, memoryMethod, messageSchema, mutationSchema, outputSchemas, parseInput, parseOutput, recallOptionsSchema, registrationSchema, retrievalResultSchema, scopeSchema, toolResponseSchema, turnSchema, usageSignalSchema };
1201
+ export { ContractError, DEGRADED_REASONS, MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, MemoryContractRuntime, REM_SIDECAR_TOKEN_HEADER, contractJsonSchemas, createMemoryRuntime, engineSettingsSchema, hostEventSchema, initRegistrationSchema, inputSchemas, inspectDataSchema, inspectionSchema, memoryEntrySchema, memoryMethod, messageSchema, mutationSchema, outputSchemas, parseInput, parseOutput, recallOptionsSchema, registrationSchema, retrievalResultSchema, scopeSchema, toolResponseSchema, turnSchema, usageSignalSchema };
@@ -1,2 +1,2 @@
1
- import { c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, f as MEMORY_SKIN_HEADER, l as MEMORY_HEALTH_TIMEOUT_MS, m as memoryMethod, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, s as MEMORY_DEFAULT_SKIN_ID, u as MEMORY_RECONNECT_INTERVAL_MS } from "../../index-DQ7VL6d3.js";
2
- export { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, memoryMethod };
1
+ import { c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, f as MEMORY_SKIN_HEADER, h as memoryMethod, l as MEMORY_HEALTH_TIMEOUT_MS, m as REM_SIDECAR_TOKEN_HEADER, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, s as MEMORY_DEFAULT_SKIN_ID, u as MEMORY_RECONNECT_INTERVAL_MS } from "../../index-0aqS8pVF.js";
2
+ export { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, REM_SIDECAR_TOKEN_HEADER, memoryMethod };
@@ -39,6 +39,7 @@ const MEMORY_ROUTES = {
39
39
  };
40
40
  const MEMORY_BODY_LIMIT_BYTES = 8388608;
41
41
  const MEMORY_SKIN_HEADER = "x-sno-station-mem-skin";
42
+ const REM_SIDECAR_TOKEN_HEADER = "x-sidecar-token";
42
43
  const MEMORY_HEALTH_TIMEOUT_MS = 5e3;
43
44
  const MEMORY_START_TIMEOUT_MS = 3e4;
44
45
  function memoryMethod(pathname) {
@@ -58,4 +59,4 @@ const MEMORY_ERROR_STATUS = {
58
59
  const MEMORY_RECONNECT_INTERVAL_MS = 1e3;
59
60
  const MEMORY_DEFAULT_SKIN_ID = "default";
60
61
  //#endregion
61
- export { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, memoryMethod };
62
+ export { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, REM_SIDECAR_TOKEN_HEADER, memoryMethod };
@@ -1,8 +1,8 @@
1
- import { h as MemoryCategory } from "../../../types-DxKqU60b.js";
1
+ import { h as MemoryCategory } from "../../../types-CWdhXLxr.js";
2
2
  import { t as Embedder } from "../../../embedding-provider-client-vynZMuit.js";
3
- import { t as MemoryRetriever } from "../../../retriever-Ruk3zp7_.js";
4
- import { C as MemoryStore } from "../../../memory-store-base-XRA4S9Xl.js";
5
- import "../../../store-2pM0-dZg.js";
3
+ import { t as MemoryRetriever } from "../../../retriever-Dxss5fRv.js";
4
+ import { C as MemoryStore } from "../../../memory-store-base-CQ_bHlYA.js";
5
+ import "../../../store-C8sUTssE.js";
6
6
  import { r as MemoryTelemetryUsageOutbox } from "../../../memory-telemetry-outbox-ddTdImt7.js";
7
7
  import { Writable } from "node:stream";
8
8
  //#region src/engine/bindings/memory-cli-shared.d.ts
@@ -1,7 +1,7 @@
1
1
  import { FORGET_QUERY_MIN_SCORE, MAX_CANDIDATE_POOL_SIZE } from "../../config/index.js";
2
2
  import { SnoStationMemError } from "../shared/errors.js";
3
3
  import { clamp01, clampInt } from "../shared/utils.js";
4
- import "../../../memory-tool-dependencies-CLODycUw.js";
4
+ import "../../../memory-tool-dependencies-DjUoelnm.js";
5
5
  import { assertAccessibleScopeForTool, isScopeAccessibleForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
6
6
  import { makeResult, runWithAudit } from "./memory-tool-results.js";
7
7
  import { forgetParamsSchema } from "./memory-tool-schemas.js";
@@ -3,7 +3,7 @@ import { normalizeCategory } from "../shared/types.js";
3
3
  import { SnoStationMemError } from "../shared/errors.js";
4
4
  import { clampInt } from "../shared/utils.js";
5
5
  import { readEstimatedSpendToday } from "../operations/daily-spend-estimator.js";
6
- import "../../../memory-tool-dependencies-CLODycUw.js";
6
+ import "../../../memory-tool-dependencies-DjUoelnm.js";
7
7
  import { assertAccessibleScopeForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
8
8
  import { serializeMemory } from "./memory-tool-formatting.js";
9
9
  import { makeResult, runWithAudit } from "./memory-tool-results.js";
@@ -3,12 +3,12 @@ import { normalizeCategory } from "../shared/types.js";
3
3
  import { truncateGraphemes } from "../shared/i18n-text.js";
4
4
  import { clamp01, clampInt } from "../shared/utils.js";
5
5
  import { formatAtDepth } from "../retrieval/intent-analyzer.js";
6
- import { t as countTokens } from "../../../memory-tool-dependencies-CLODycUw.js";
6
+ import { t as countTokens } from "../../../memory-tool-dependencies-DjUoelnm.js";
7
7
  import { assertAccessibleScopeForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
8
8
  import { episodicEventDate, safeParseMetadata, sanitizeRecalledText, serializeMemory } from "./memory-tool-formatting.js";
9
9
  import { makeResult, runWithAudit } from "./memory-tool-results.js";
10
10
  import { recallParamsSchema } from "./memory-tool-schemas.js";
11
- import { i as retrieveForMemoryRecallOrEval, n as packManualRecallRows } from "../../../rem-consumer-retrieval-CRpvG8KS.js";
11
+ import { i as retrieveForMemoryRecallOrEval, n as packManualRecallRows } from "../../../rem-consumer-retrieval-CR0dtcHR.js";
12
12
  import { createLogger, currentLogContext, privateLogReference, withLogContext } from "@snoai/utils/logger";
13
13
  import { randomUUID } from "node:crypto";
14
14
  //#region src/engine/bindings/memory-recall-tool.ts
@@ -1,5 +1,5 @@
1
1
  import { clampInt } from "../shared/utils.js";
2
- import "../../../memory-tool-dependencies-CLODycUw.js";
2
+ import "../../../memory-tool-dependencies-DjUoelnm.js";
3
3
  import { assertAccessibleScopeForTool, isScopeAccessibleForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
4
4
  import { makeResult, runWithAudit } from "./memory-tool-results.js";
5
5
  import { t as parseReflectionMetadata } from "../../../entry-metadata-parser-BIVSMCIk.js";
@@ -1,6 +1,6 @@
1
1
  import { i as isSystemBypassId } from "../../../memory-scope-policy-DICSCURA.js";
2
2
  import { readEstimatedSpendToday } from "../operations/daily-spend-estimator.js";
3
- import "../../../memory-tool-dependencies-CLODycUw.js";
3
+ import "../../../memory-tool-dependencies-DjUoelnm.js";
4
4
  import { assertAccessibleScopeForTool, getStoreScopeFilterForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
5
5
  import { makeResult, runWithAudit } from "./memory-tool-results.js";
6
6
  import { statsParamsSchema } from "./memory-tool-schemas.js";
@@ -4,13 +4,13 @@ import { normalizeCategory } from "../shared/types.js";
4
4
  import { clamp01, stableHash } from "../shared/utils.js";
5
5
  import { a as detectCategory } from "../../../capture-policy-detector-DaMfy9CZ.js";
6
6
  import { stripEnvelopeMetadata } from "../extraction/extraction-text-sanitizer.js";
7
- import { a as serializeIntervalMetadata, o as resolveMemoryDate } from "../../../memory-temporality-classifier-CKiTAHXe.js";
7
+ import { a as serializeIntervalMetadata, o as resolveMemoryDate } from "../../../memory-temporality-classifier-BUjXG5o7.js";
8
8
  import { t as appendAuditEntry } from "../../../runtime-audit-log-BCeujlEp.js";
9
- import "../../../memory-tool-dependencies-CLODycUw.js";
9
+ import "../../../memory-tool-dependencies-DjUoelnm.js";
10
10
  import { assertAccessibleScopeForTool, getDefaultScopeForTool } from "./memory-tool-access.js";
11
11
  import { makeResult, runWithAudit } from "./memory-tool-results.js";
12
12
  import { storeParamsSchema } from "./memory-tool-schemas.js";
13
- import { n as createRetireByNameRunBudget, r as runProfileSectionUpdate } from "../../../profile-section-writer-hIphqpUY.js";
13
+ import { n as createRetireByNameRunBudget, r as runProfileSectionUpdate } from "../../../profile-section-writer-BhGKPBjw.js";
14
14
  //#region src/engine/bindings/memory-store-tool.ts
15
15
  /** @file memory-store-tool.ts
16
16
  * @purpose Registers the memory_store tool.
@@ -1,5 +1,5 @@
1
1
  import { t as MemoryScopePolicy } from "../../../memory-scope-policy-1gg5QlWZ.js";
2
- import "../../../memory-tool-dependencies-N69chrQc.js";
2
+ import "../../../memory-tool-dependencies-CatGzI9R.js";
3
3
  //#region src/engine/bindings/memory-tool-access.d.ts
4
4
  export declare function assertAccessibleScope(scopePolicy: MemoryScopePolicy, scope: string, agentId?: string): string;
5
5
  export declare function resolveAgentId(runtimeAgentId: unknown, fallback?: string): string | undefined;
@@ -1,5 +1,5 @@
1
1
  import { SnoStationMemError } from "../shared/errors.js";
2
- import "../../../memory-tool-dependencies-CLODycUw.js";
2
+ import "../../../memory-tool-dependencies-DjUoelnm.js";
3
3
  //#region src/engine/bindings/memory-tool-access.ts
4
4
  function assertAccessibleScope(scopePolicy, scope, agentId) {
5
5
  const normalized = scope.trim();
@@ -1,5 +1,5 @@
1
1
  import { i as SnoStationMemError } from "../../../errors-CeVRxf9V.js";
2
- import "../../../memory-tool-dependencies-N69chrQc.js";
2
+ import "../../../memory-tool-dependencies-CatGzI9R.js";
3
3
  import { ToolContext, ToolResult } from "./memory-tool-schemas.js";
4
4
  //#region src/engine/bindings/memory-tool-results.d.ts
5
5
  export declare function makeResult(text: string, details: Record<string, unknown>, isError?: boolean): ToolResult;
@@ -1,5 +1,5 @@
1
1
  import { RetrievalError, SnoStationMemError } from "../shared/errors.js";
2
- import { n as z } from "../../../memory-tool-dependencies-CLODycUw.js";
2
+ import { n as z } from "../../../memory-tool-dependencies-DjUoelnm.js";
3
3
  import { createLogger } from "@snoai/utils/logger";
4
4
  //#region src/engine/bindings/memory-tool-results.ts
5
5
  /** @file memory-tool-results.ts