@snoai/memory 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -4
- package/dist/{access-tracker-CSc21GtV.d.ts → access-tracker-BNqlgChq.d.ts} +3 -3
- package/dist/{adapter-DMEmCTKo.d.ts → adapter-CeQ7rViY.d.ts} +2 -2
- package/dist/{atomic-memory-extraction-BpOUWPJM.d.ts → atomic-memory-extraction-BT8lFE5t.d.ts} +5 -5
- package/dist/{atomic-memory-extraction-sdNf1-B1.js → atomic-memory-extraction-By0axKHc.js} +7 -7
- package/dist/{b-profile-section-dictionary-provider-BxbksLj3.d.ts → b-profile-section-dictionary-provider-DGtF4dB7.d.ts} +1 -1
- package/dist/{capture-policy-detector-CHz5GOPA.d.ts → capture-policy-detector-CN3vfdNU.d.ts} +1 -1
- package/dist/{classifier-C96uH9OF.d.ts → classifier-DnbbtwTS.d.ts} +2 -2
- package/dist/client.d.ts +11 -1
- package/dist/client.js +35 -5
- package/dist/coding-skin.d.ts +6 -0
- package/dist/coding-skin.js +18 -1
- package/dist/{config-tSrvLXgV.js → config-CyH1VuJc.js} +18 -13
- package/dist/{connection-DAbzki8K.d.ts → connection-3IVXpuPE.d.ts} +1 -1
- package/dist/{connection-DliCOBB2.js → connection-C9YD5sgm.js} +2 -2
- package/dist/{data-bootstrap-CcJUwkqf.d.ts → data-bootstrap-Bl3lthzE.d.ts} +2 -2
- package/dist/{data-bootstrap-CYniFp8b.js → data-bootstrap-P8sie9WA.js} +4 -4
- package/dist/{derived-suppression-cache-C7bGARc0.d.ts → derived-suppression-cache-BZdBZSdK.d.ts} +1 -1
- package/dist/diagnostic-encoder.js +1 -1
- package/dist/{index-BsMap4It.d.ts → index-BO4RU_mc.d.ts} +1 -1
- package/dist/{index-DQ7VL6d3.d.ts → index-DtqgCT8u.d.ts} +23 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +19 -10
- package/dist/internal/config/plugin-config-schema.d.ts +1 -1
- package/dist/internal/config/plugin-config-schema.js +1 -1
- package/dist/internal/config/product-mode.d.ts +2 -2
- package/dist/internal/config/product-mode.js +7 -6
- package/dist/internal/config/settings.d.ts +1 -1
- package/dist/internal/config/settings.js +3 -3
- package/dist/internal/config/skin-defaults.d.ts +1 -1
- package/dist/internal/contract/profile.d.ts +1 -1
- package/dist/internal/contract/routes.d.ts +2 -2
- package/dist/internal/contract/routes.js +2 -1
- package/dist/internal/engine/bindings/memory-cli-shared.d.ts +4 -4
- package/dist/internal/engine/bindings/memory-forget-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-list-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-recall-tool.js +2 -2
- package/dist/internal/engine/bindings/memory-reflection-resolve-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-stats-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-store-tool.js +3 -3
- package/dist/internal/engine/bindings/memory-tool-access.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-access.js +1 -1
- package/dist/internal/engine/bindings/memory-tool-results.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-results.js +1 -1
- package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +5 -5
- package/dist/internal/engine/bindings/memory-tool-schemas.js +1 -1
- package/dist/internal/engine/bindings/memory-update-tool.js +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts +4 -4
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.js +3 -3
- package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.d.ts +4 -4
- package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.js +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.d.ts +5 -5
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-message-transcript.js +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-reset-hook.d.ts +3 -3
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +2 -3
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.js +1 -2
- package/dist/internal/engine/eval/trace.d.ts +1 -1
- package/dist/internal/engine/eval/trace.js +2 -2
- package/dist/internal/engine/extraction/atomic-memory-extraction.d.ts +1 -1
- package/dist/internal/engine/extraction/atomic-memory-extraction.js +1 -1
- package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.d.ts +1 -1
- package/dist/internal/engine/extraction/b-profile-section-rekey.d.ts +5 -5
- package/dist/internal/engine/extraction/capture-policy-detector.d.ts +1 -1
- package/dist/internal/engine/extraction/memory-metadata-codec.d.ts +2 -2
- package/dist/internal/engine/extraction/memory-temporality-classifier.d.ts +1 -1
- package/dist/internal/engine/extraction/memory-temporality-classifier.js +1 -1
- package/dist/internal/engine/observability/adapter.d.ts +1 -1
- package/dist/internal/engine/observability/memory-snapshot.d.ts +1 -1
- package/dist/internal/engine/observability/observable-embedder.d.ts +1 -1
- package/dist/internal/engine/observability/observable-llm-client.d.ts +1 -1
- package/dist/internal/engine/observability/observable-memory-store.d.ts +1 -1
- package/dist/internal/engine/observability/observable-memory-store.js +1 -1
- package/dist/internal/engine/observability/observable-retriever.d.ts +1 -1
- package/dist/internal/engine/observability/observable-retriever.js +1 -1
- package/dist/internal/engine/observability/runtime-diagnostics.d.ts +1 -1
- package/dist/internal/engine/observability/runtime-diagnostics.js +2 -2
- package/dist/internal/engine/operations/memory-tier-promoter.d.ts +1 -1
- package/dist/internal/engine/operations/runtime-audit-log.d.ts +2 -2
- package/dist/internal/engine/provider/provider-registration.d.ts +4 -4
- package/dist/internal/engine/provider/provider-registration.js +1 -1
- package/dist/internal/engine/provider/provider-row-renderer.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-command-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-command-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-deps.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.js +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +1 -1
- package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +3 -3
- package/dist/internal/engine/reflection/strategy-hook-runner.js +2 -2
- package/dist/internal/engine/rem/classifier.d.ts +1 -1
- package/dist/internal/engine/rem/index.d.ts +2 -2
- package/dist/internal/engine/retrieval/access-tracker.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.js +1 -1
- package/dist/internal/engine/shared/memory-kind-policy.d.ts +1 -1
- package/dist/internal/engine/shared/paths.d.ts +2 -2
- package/dist/internal/engine/shared/types.d.ts +2 -2
- package/dist/internal/engine/shared/types.js +1 -1
- package/dist/internal/engine/telemetry/observe-ledger.d.ts +1 -1
- package/dist/internal/model/llm-client.d.ts +2 -2
- package/dist/internal/model/llm-client.js +1 -1
- package/dist/internal/model/llm-mode-routing.d.ts +1 -1
- package/dist/internal/model/llm-mode-routing.js +1 -1
- package/dist/internal/store/atomic-memory-cutover-sql.js +1 -1
- package/dist/internal/store/connection.d.ts +1 -1
- package/dist/internal/store/connection.js +1 -1
- package/dist/internal/store/data-bootstrap.d.ts +1 -1
- package/dist/internal/store/data-bootstrap.js +1 -1
- package/dist/internal/store/maintenance.d.ts +2 -2
- package/dist/internal/store/maintenance.js +6 -6
- package/dist/internal/store/store.d.ts +2 -2
- package/dist/internal/store/store.js +1 -1
- package/dist/{llm-client-B7Xoxqou.js → llm-client-BhkzlTnH.js} +2 -6
- package/dist/{llm-client-DOTSGzhe.d.ts → llm-client-PC0yQuCq.d.ts} +1 -1
- package/dist/{log-site-catalog.generated-B9WYdnAM.js → log-site-catalog.generated-CylmA5IF.js} +169 -169
- package/dist/log-site-catalog.json +1 -1
- package/dist/memdump.js +1 -1
- package/dist/{memory-kind-policy-LKt0u3gy.d.ts → memory-kind-policy-DnHY7l0n.d.ts} +1 -1
- package/dist/{memory-metadata-codec-C3oQd47V.d.ts → memory-metadata-codec-DbrRyhCg.d.ts} +1 -1
- package/dist/{memory-runtime-BZtREuwW.js → memory-runtime-DUzKtwlW.js} +273 -193
- package/dist/{memory-snapshot-3e44ND2i.d.ts → memory-snapshot-shzK-0C8.d.ts} +2 -2
- package/dist/{memory-source-order-BtrIxaIt.js → memory-source-order-YMRoeDLd.js} +1 -1
- package/dist/{memory-store-base-XRA4S9Xl.d.ts → memory-store-base-Dx6oSqiv.d.ts} +5 -6
- package/dist/{memory-store-shared-DeIDkhLj.js → memory-store-shared-DqpWJXZZ.js} +2 -2
- package/dist/{memory-temporality-classifier-CKiTAHXe.js → memory-temporality-classifier-AetVby94.js} +2 -2
- package/dist/{memory-temporality-classifier-CEdRTN5J.d.ts → memory-temporality-classifier-D91grvZ3.d.ts} +1 -1
- package/dist/{memory-tier-promoter-DbTpahkP.d.ts → memory-tier-promoter-DzX7GMZ2.d.ts} +1 -1
- package/dist/{memory-tool-dependencies-CLODycUw.js → memory-tool-dependencies-4Vl4QwBY.js} +1 -1
- package/dist/memory-tool-dependencies-BGFjBpkG.d.ts +14 -0
- package/dist/{model-call-table-CspopkBg.js → model-call-table-BZJQkbKX.js} +9 -0
- package/dist/{observable-embedder-DQnNgf9O.d.ts → observable-embedder-CbFylzsx.d.ts} +1 -1
- package/dist/{observable-llm-client-uwqPADpN.d.ts → observable-llm-client-BC6Bc8t3.d.ts} +3 -3
- package/dist/{observable-memory-store-BaZKbhgq.d.ts → observable-memory-store-BykVMQXt.d.ts} +4 -4
- package/dist/{observable-retriever-Dt_NUxAA.d.ts → observable-retriever-C-c9O83s.d.ts} +5 -5
- package/dist/paths-DHU342hf.d.ts +1 -0
- package/dist/{plugin-config-schema-C0UUbOmG.d.ts → plugin-config-schema-CCwv_K7R.d.ts} +3 -2
- package/dist/{plugin-config-schema-YJLyIIcJ.js → plugin-config-schema-CTLb-ChF.js} +2 -6
- package/dist/{profile-TWPJ_myr.d.ts → profile-DbIDAmnc.d.ts} +1 -1
- package/dist/{profile-section-writer-hIphqpUY.js → profile-section-writer-BV605K78.js} +4 -4
- package/dist/{provider-registration-CF1tg8Xy.js → provider-registration-qLSA9CQl.js} +32 -2
- package/dist/{reflection-command-hooks-BeQiJI9-.js → reflection-command-hooks-CTYkYqM3.js} +4 -4
- package/dist/{reflection-command-hooks-C1Vxgb-O.d.ts → reflection-command-hooks-h2CbYuXx.d.ts} +4 -4
- package/dist/{reflection-deps-RpLPFrSc.d.ts → reflection-deps-MWVeBZcs.d.ts} +2 -2
- package/dist/{reflection-embedded-generator-CDUhgV96.js → reflection-embedded-generator-D5OhLLVw.js} +1 -1
- package/dist/{reflection-embedded-generator-CxOex5xK.d.ts → reflection-embedded-generator-Dk7sL8uy.d.ts} +3 -3
- package/dist/{reflection-injection-hooks-DfUgqu8f.d.ts → reflection-injection-hooks-B0fGkENX.d.ts} +4 -4
- package/dist/{reflection-lifecycle-hooks-Ct5HBdSG.d.ts → reflection-lifecycle-hooks-Bg_JBS6c.d.ts} +3 -3
- package/dist/{rem-batch-executor-bc0IFlp2.js → rem-batch-executor-5IR3e-gG.js} +1 -1
- package/dist/{rem-batch-executor-Cbm5gfSe.js → rem-batch-executor-B4OoDBVK.js} +11 -15
- package/dist/{rem-consumer-retrieval-CRpvG8KS.js → rem-consumer-retrieval-CR0dtcHR.js} +1 -1
- package/dist/{rem-trigger-BTxkcjgT.js → rem-trigger-CYMupvFh.js} +3 -2
- package/dist/{results-C3ZLroMb.js → results-BkMsHy7M.js} +16 -0
- package/dist/{retriever-Ruk3zp7_.d.ts → retriever-CXeB7-A2.d.ts} +14 -14
- package/dist/{retriever-CygHBazG.js → retriever-ZoLvPRHq.js} +3 -3
- package/dist/{routes-Ce7SQKec.js → routes-DLHT__Ay.js} +2 -1
- package/dist/{runtime-audit-log-zpQiR9HT.d.ts → runtime-audit-log-CIYiNvwf.d.ts} +1 -1
- package/dist/{server-BPAY4NTG.js → server-WGLpvv3K.js} +13 -10
- package/dist/sidecar/main.js +3 -3
- package/dist/{sno-station-mem-runtime-dependencies-DjLOhB45.js → sno-station-mem-runtime-dependencies-Bzfg4hGZ.js} +8 -8
- package/dist/sno-station-mem-runtime-dependencies-cFPSMqDD.d.ts +31 -0
- package/dist/{store-DzpZBMEm.js → store-D3n1P7Xn.js} +4 -4
- package/dist/{store-2pM0-dZg.d.ts → store-Dbo7MIzt.d.ts} +1 -1
- package/dist/{strategy-hook-runner-gBtU47tX.d.ts → strategy-hook-runner-C6qUCnzY.d.ts} +7 -7
- package/dist/{strategy-hook-runner-zmdIYOmQ.js → strategy-hook-runner-CHpG8vXD.js} +1 -1
- package/dist/{trace-1t1n_wUm.d.ts → trace-C1JxMfs-.d.ts} +2 -2
- package/dist/{types-DxKqU60b.d.ts → types-DvQ6nTNC.d.ts} +8 -8
- package/package.json +8 -8
- package/settings.default.json +5 -0
- package/dist/memory-tool-dependencies-N69chrQc.d.ts +0 -14
- package/dist/paths-qVF-5uBq.d.ts +0 -1
- 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
|
|
4
|
-
Station.
|
|
3
|
+
The memory engine behind Sno Station: encrypted, local, shared by every agent you run.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
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.1.0
|
|
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-
|
|
1
|
+
import { v as MemoryMetadata } from "./types-DvQ6nTNC.js";
|
|
2
2
|
import { sn as RecallLifecycleConfig } from "./index-DL8AVj0Z.js";
|
|
3
|
-
import { C as MemoryStore } from "./memory-store-base-
|
|
4
|
-
import "./store-
|
|
3
|
+
import { C as MemoryStore } from "./memory-store-base-Dx6oSqiv.js";
|
|
4
|
+
import "./store-Dbo7MIzt.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
|
-
import { t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { t as PluginConfig } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
|
+
import "./types-DvQ6nTNC.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
|
package/dist/{atomic-memory-extraction-BpOUWPJM.d.ts → atomic-memory-extraction-BT8lFE5t.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as LlmClientConfig, l as ModelCallId, p as LlmRoutingConfig, r as LlmClient } from "./plugin-config-schema-
|
|
1
|
+
import { i as LlmClientConfig, l as ModelCallId, p as LlmRoutingConfig, r as LlmClient } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
2
|
import { n as Locale } from "./locales-JxGmkG6t.js";
|
|
3
|
-
import { qt as AdapterAMemoryView } from "./index-
|
|
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-
|
|
5
|
-
import "./store-
|
|
6
|
-
import "./llm-client-
|
|
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-Dx6oSqiv.js";
|
|
5
|
+
import "./store-Dbo7MIzt.js";
|
|
6
|
+
import "./llm-client-PC0yQuCq.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/engine/extraction/calendar-instruction.d.ts
|
|
9
9
|
type CalendarPrecision = "year" | "month" | "week" | "day" | "minute";
|
|
@@ -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-
|
|
5
|
+
import { a as isTerminalLlmFailure, i as createLlmClient, n as LlmClientTerminalError } from "./llm-client-BhkzlTnH.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-
|
|
11
|
+
import "./memory-temporality-classifier-AetVby94.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-
|
|
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-
|
|
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-D3n1P7Xn.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-
|
|
20
|
+
import { i as prepareDeterministicTaskLifecycleWrite, t as PROFILE_IDENTITY_SECTION } from "./profile-section-writer-BV605K78.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
|
|
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
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { g as ProductMode } from "./plugin-config-schema-
|
|
1
|
+
import { g as ProductMode } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
2
|
import { n as Locale } from "./locales-JxGmkG6t.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/engine/extraction/b-profile-section-registry.d.ts
|
package/dist/{capture-policy-detector-CHz5GOPA.d.ts → capture-policy-detector-CN3vfdNU.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as MemoryCategory } from "./types-
|
|
1
|
+
import { h as MemoryCategory } from "./types-DvQ6nTNC.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`.
|
|
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
|
|
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 {
|
|
2
|
+
import { B as ScopeCtx, F as JsonValue, H as UsageSignal, I as Message, L as Mutation, M as HostEvent, N as InitRegistration, P as Inspection, R as RecallOptions, V as Turn, et as ContractError, n as MemoryContract, nt as DegradedReason, v as ContractOutputs, z as Registration } from "./index-DtqgCT8u.js";
|
|
3
3
|
//#region src/contract/client.d.ts
|
|
4
4
|
export interface ConnectOptions {
|
|
5
5
|
skinId: string;
|
|
@@ -9,7 +9,17 @@ export interface DegradedConnection {
|
|
|
9
9
|
reason: DegradedReason;
|
|
10
10
|
error?: string;
|
|
11
11
|
}
|
|
12
|
+
export type ReportingInspection = Extract<Inspection, {
|
|
13
|
+
op: "projects" | "currentProject";
|
|
14
|
+
}> | {
|
|
15
|
+
op: "stats";
|
|
16
|
+
};
|
|
17
|
+
export type ReportingClient = Pick<MemoryClient, "degraded" | "principal"> & {
|
|
18
|
+
inspect(op: ReportingInspection, scope: ScopeCtx): Promise<ContractOutputs["inspect"]>;
|
|
19
|
+
};
|
|
12
20
|
export declare function connect(options: ConnectOptions): Promise<MemoryClient | DegradedConnection>;
|
|
21
|
+
/** Connect to an already running service without starting it or registering a skin. */
|
|
22
|
+
export declare function connectReporting(options: ConnectOptions): Promise<ReportingClient | DegradedConnection>;
|
|
13
23
|
export declare class MemoryClient implements MemoryContract {
|
|
14
24
|
#private;
|
|
15
25
|
readonly 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
|
-
import { r as outputSchemas } from "./results-
|
|
3
|
-
import { MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS } from "./internal/contract/routes.js";
|
|
2
|
+
import { r as outputSchemas } from "./results-BkMsHy7M.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";
|
|
@@ -149,6 +149,22 @@ async function connect(options) {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
/** Connect to an already running service without starting it or registering a skin. */
|
|
153
|
+
async function connectReporting(options) {
|
|
154
|
+
try {
|
|
155
|
+
const { storePath } = clientSettings();
|
|
156
|
+
const discovery = await readDiscovery();
|
|
157
|
+
if (!discovery) throw new ContractError("sidecar-unreachable");
|
|
158
|
+
await checkDiscovery(discovery);
|
|
159
|
+
return new MemoryClient(options.skinId, storePath, discovery);
|
|
160
|
+
} catch (error) {
|
|
161
|
+
return {
|
|
162
|
+
degraded: true,
|
|
163
|
+
reason: failureReason(error),
|
|
164
|
+
...error instanceof Error && { error: error.message }
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
152
168
|
var MemoryClient = class {
|
|
153
169
|
skinId;
|
|
154
170
|
storePath;
|
|
@@ -168,15 +184,19 @@ var MemoryClient = class {
|
|
|
168
184
|
const route = MEMORY_ROUTES[method];
|
|
169
185
|
try {
|
|
170
186
|
signal?.throwIfAborted();
|
|
187
|
+
const inspection = method === "inspect" && "op" in input ? input.op : void 0;
|
|
188
|
+
const reporting = inspection?.op === "projects" || inspection?.op === "currentProject" || inspection?.op === "stats" && !inspection.scope;
|
|
171
189
|
let discovery = await readDiscovery();
|
|
172
190
|
if (!discovery || !processAlive(discovery.pid)) {
|
|
191
|
+
if (reporting) throw new ContractError("sidecar-unreachable");
|
|
173
192
|
const { memoryPackage } = clientSettings();
|
|
174
193
|
discovery = await startSidecar(memoryPackage);
|
|
175
194
|
}
|
|
176
|
-
if (method !== "init" && this.#registration && this.#registeredPid !== discovery.pid) await this.request("init", this.#registration, signal);
|
|
195
|
+
if (method !== "init" && !reporting && this.#registration && this.#registeredPid !== discovery.pid) await this.request("init", this.#registration, signal);
|
|
177
196
|
const response = await postJson(discovery.port, route.path, {
|
|
178
197
|
"Content-Type": "application/json",
|
|
179
|
-
[MEMORY_SKIN_HEADER]: this.skinId
|
|
198
|
+
[MEMORY_SKIN_HEADER]: this.skinId,
|
|
199
|
+
[REM_SIDECAR_TOKEN_HEADER]: discovery.token
|
|
180
200
|
}, JSON.stringify({
|
|
181
201
|
...input,
|
|
182
202
|
scope: {
|
|
@@ -263,6 +283,16 @@ var MemoryClient = class {
|
|
|
263
283
|
op: "get",
|
|
264
284
|
entry: null
|
|
265
285
|
};
|
|
286
|
+
else if (op.op === "projects") result = {
|
|
287
|
+
op: "projects",
|
|
288
|
+
projects: []
|
|
289
|
+
};
|
|
290
|
+
else if (op.op === "currentProject") result = {
|
|
291
|
+
op: "currentProject",
|
|
292
|
+
workspace: op.workspace,
|
|
293
|
+
status: "unknown",
|
|
294
|
+
project: null
|
|
295
|
+
};
|
|
266
296
|
else result = {
|
|
267
297
|
op: op.op,
|
|
268
298
|
project: scope.project,
|
|
@@ -302,4 +332,4 @@ var MemoryClient = class {
|
|
|
302
332
|
}
|
|
303
333
|
};
|
|
304
334
|
//#endregion
|
|
305
|
-
export { ContractError, MemoryClient, connect };
|
|
335
|
+
export { ContractError, MemoryClient, connect, connectReporting };
|
package/dist/coding-skin.d.ts
CHANGED
|
@@ -47,5 +47,11 @@ export declare const CODING_SKIN_HOOKS: {
|
|
|
47
47
|
};
|
|
48
48
|
export type CodingSkinHookName = keyof typeof CODING_SKIN_HOOKS;
|
|
49
49
|
export declare const CODING_SKIN_MODEL_COMMANDS: readonly ["recall", "get", "remember", "correct"];
|
|
50
|
+
export type CodingSkinHarness = "claude" | "codex";
|
|
51
|
+
export declare function shellQuote(value: string): string;
|
|
52
|
+
/** The command an agent hook runs: the `sno` binary that ran setup, then `memory hook <event> --harness <name>`. */
|
|
53
|
+
export declare function codingSkinHookCommand(snoPath: string, subcommand: string, harness: CodingSkinHarness): string;
|
|
54
|
+
/** True for a hook command of that shape, whatever the path to `sno` is. */
|
|
55
|
+
export declare function isCodingSkinHookCommand(command: string, subcommand: string, harness: CodingSkinHarness): boolean;
|
|
50
56
|
//#endregion
|
|
51
57
|
export { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, type ObserveLedgerRow, SKILL_CATEGORIES, appendObserveLedgerRows, skillVersionFor };
|
package/dist/coding-skin.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { appendObserveLedgerRows } from "./internal/engine/telemetry/observe-ledger.js";
|
|
2
2
|
import { SKILL_CATEGORIES, skillVersionFor } from "./internal/config/skill-categories.js";
|
|
3
3
|
import { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH } from "./internal/config/skin-defaults.js";
|
|
4
|
+
import { basename } from "node:path";
|
|
4
5
|
//#region config/coding-skin.ts
|
|
5
6
|
const CODING_SKIN_CHILD_DEADLINE_MS = 11e4;
|
|
6
7
|
const CODING_SKIN_WORKER_LIFETIME_MS = 54e4;
|
|
@@ -51,5 +52,21 @@ const CODING_SKIN_MODEL_COMMANDS = [
|
|
|
51
52
|
"remember",
|
|
52
53
|
"correct"
|
|
53
54
|
];
|
|
55
|
+
function shellQuote(value) {
|
|
56
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
57
|
+
}
|
|
58
|
+
/** The command an agent hook runs: the `sno` binary that ran setup, then `memory hook <event> --harness <name>`. */
|
|
59
|
+
function codingSkinHookCommand(snoPath, subcommand, harness) {
|
|
60
|
+
return `${shellQuote(snoPath)} memory hook ${subcommand} --harness ${harness}`;
|
|
61
|
+
}
|
|
62
|
+
/** True for a hook command of that shape, whatever the path to `sno` is. */
|
|
63
|
+
function isCodingSkinHookCommand(command, subcommand, harness) {
|
|
64
|
+
const suffix = ` memory hook ${subcommand} --harness ${harness}`;
|
|
65
|
+
const trimmed = command.trim();
|
|
66
|
+
if (!trimmed.endsWith(suffix)) return false;
|
|
67
|
+
const encoded = trimmed.slice(0, -suffix.length);
|
|
68
|
+
const program = encoded.startsWith("'") && encoded.endsWith("'") ? encoded.slice(1, -1).replaceAll("'\\''", "'") : encoded;
|
|
69
|
+
return basename(program) === "sno";
|
|
70
|
+
}
|
|
54
71
|
//#endregion
|
|
55
|
-
export { CODING_SKIN_CHILD_DEADLINE_MS, CODING_SKIN_CHILD_MAX_BUFFER_BYTES, CODING_SKIN_HOOKS, CODING_SKIN_IMPORT_INTERVAL_MS, CODING_SKIN_LEDGER_MAX_CHARS, CODING_SKIN_MANUAL_SESSION_ID, CODING_SKIN_MAX_ATTEMPTS, CODING_SKIN_MODEL_COMMANDS, CODING_SKIN_RECALL_ITEM_MAX_CHARS, CODING_SKIN_RECALL_SENTENCE_MAX_CHARS, CODING_SKIN_RETRY_DELAYS_MS, CODING_SKIN_SESSION_QUERY, CODING_SKIN_WORKER_LIFETIME_MS, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, SKILL_CATEGORIES, appendObserveLedgerRows, skillVersionFor };
|
|
72
|
+
export { CODING_SKIN_CHILD_DEADLINE_MS, CODING_SKIN_CHILD_MAX_BUFFER_BYTES, CODING_SKIN_HOOKS, CODING_SKIN_IMPORT_INTERVAL_MS, CODING_SKIN_LEDGER_MAX_CHARS, CODING_SKIN_MANUAL_SESSION_ID, CODING_SKIN_MAX_ATTEMPTS, CODING_SKIN_MODEL_COMMANDS, CODING_SKIN_RECALL_ITEM_MAX_CHARS, CODING_SKIN_RECALL_SENTENCE_MAX_CHARS, CODING_SKIN_RETRY_DELAYS_MS, CODING_SKIN_SESSION_QUERY, CODING_SKIN_WORKER_LIFETIME_MS, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, SKILL_CATEGORIES, appendObserveLedgerRows, codingSkinHookCommand, isCodingSkinHookCommand, shellQuote, skillVersionFor };
|
|
@@ -1149,14 +1149,15 @@ const PRODUCT_MODES = [
|
|
|
1149
1149
|
];
|
|
1150
1150
|
const DEFAULT_MODEL_MODE = "agent-native";
|
|
1151
1151
|
const remEnhancedConfigSchema = z.object({ trigger: z.object({ tick: z.boolean().default(true) }).strict().prefault({}) }).strict().prefault({});
|
|
1152
|
+
const modelCallsConfigSchema = z.record(z.string(), z.record(z.enum(PRODUCT_MODES), z.enum([
|
|
1153
|
+
"off",
|
|
1154
|
+
"host",
|
|
1155
|
+
"sno-gpu"
|
|
1156
|
+
]))).optional();
|
|
1152
1157
|
const llmRoutingConfigSchema = z.object({
|
|
1153
1158
|
mode: z.enum(PRODUCT_MODES),
|
|
1154
1159
|
language: z.enum(SUPPORTED_LOCALES).default("en"),
|
|
1155
|
-
modelCalls:
|
|
1156
|
-
"off",
|
|
1157
|
-
"host",
|
|
1158
|
-
"sno-gpu"
|
|
1159
|
-
]))).optional()
|
|
1160
|
+
modelCalls: modelCallsConfigSchema
|
|
1160
1161
|
}).strict();
|
|
1161
1162
|
//#endregion
|
|
1162
1163
|
//#region config/plugin-config-embedding-schema.ts
|
|
@@ -1581,11 +1582,7 @@ const pluginConfigSchema = z.object({
|
|
|
1581
1582
|
* config requires an explicit product mode.
|
|
1582
1583
|
*/
|
|
1583
1584
|
mode: z.enum(PRODUCT_MODES).default(DEFAULT_MODEL_MODE),
|
|
1584
|
-
modelCalls:
|
|
1585
|
-
"off",
|
|
1586
|
-
"host",
|
|
1587
|
-
"sno-gpu"
|
|
1588
|
-
]))).optional(),
|
|
1585
|
+
modelCalls: modelCallsConfigSchema,
|
|
1589
1586
|
remOperations: z.array(z.enum(REM_OPERATIONS)).min(1).max(2).default([...REM_OPERATIONS]),
|
|
1590
1587
|
remEnhanced: remEnhancedConfigSchema,
|
|
1591
1588
|
/**
|
|
@@ -2013,6 +2010,15 @@ const MODEL_CALLS = {
|
|
|
2013
2010
|
"rem-enhanced": "sno-gpu"
|
|
2014
2011
|
}
|
|
2015
2012
|
},
|
|
2013
|
+
R5: {
|
|
2014
|
+
description: "generate local lessons and skill reminders nightly",
|
|
2015
|
+
calledBy: "RSI skill",
|
|
2016
|
+
destinations: {
|
|
2017
|
+
"local-first": "host",
|
|
2018
|
+
"agent-native": "off",
|
|
2019
|
+
"rem-enhanced": "off"
|
|
2020
|
+
}
|
|
2021
|
+
},
|
|
2016
2022
|
REM1: {
|
|
2017
2023
|
description: "replace conflict pair",
|
|
2018
2024
|
occasion: "conflictAdjudication",
|
|
@@ -2173,7 +2179,7 @@ const destinations = z.strictObject({
|
|
|
2173
2179
|
"agent-native": destination,
|
|
2174
2180
|
"rem-enhanced": destination
|
|
2175
2181
|
});
|
|
2176
|
-
const modelCalls = z.strictObject(Object.fromEntries(Object.keys(MODEL_CALLS).map((id) => [id, destinations])));
|
|
2182
|
+
const modelCalls = z.strictObject(Object.fromEntries(Object.keys(MODEL_CALLS).map((id) => [id, destinations]))).extend({ R5: destinations.default(MODEL_CALLS.R5.destinations) });
|
|
2177
2183
|
const settingsSchema = z.strictObject({
|
|
2178
2184
|
mode: z.enum(PRODUCT_MODES),
|
|
2179
2185
|
modelCalls,
|
|
@@ -2461,7 +2467,6 @@ function getSidecarSocketPath() {
|
|
|
2461
2467
|
*/
|
|
2462
2468
|
const REM_SIDECAR_HOST = "127.0.0.1";
|
|
2463
2469
|
const REM_SIDECAR_ORIGIN = "http://127.0.0.1";
|
|
2464
|
-
const REM_SIDECAR_TOKEN_HEADER = "x-sidecar-token";
|
|
2465
2470
|
const REM_CORRELATION_ID_HEADER = "x-rem-correlation-id";
|
|
2466
2471
|
const REM_RUN_PATH = "/rem/run";
|
|
2467
2472
|
const REM_JOBS_PATH_PREFIX = "/rem/jobs/";
|
|
@@ -2574,4 +2579,4 @@ function readMaintenanceOverrides() {
|
|
|
2574
2579
|
};
|
|
2575
2580
|
}
|
|
2576
2581
|
//#endregion
|
|
2577
|
-
export {
|
|
2582
|
+
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
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"
|
|
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
|
-
*
|
|
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 { n as version, t as logSiteCatalog } from "./log-site-catalog.generated-
|
|
1
|
+
import { n as version, t as logSiteCatalog } from "./log-site-catalog.generated-CylmA5IF.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 { 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-
|
|
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 {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as LlmRoutingConfig, t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-
|
|
1
|
+
import { p as LlmRoutingConfig, t as PluginConfig } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
|
+
import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-DvQ6nTNC.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
|
|
@@ -134,6 +134,11 @@ type Inspection = {
|
|
|
134
134
|
op: "listReflection";
|
|
135
135
|
limit?: number;
|
|
136
136
|
unresolvedOnly?: boolean;
|
|
137
|
+
} | {
|
|
138
|
+
op: "projects";
|
|
139
|
+
} | {
|
|
140
|
+
op: "currentProject";
|
|
141
|
+
workspace: string;
|
|
137
142
|
};
|
|
138
143
|
type UsageSignal = {
|
|
139
144
|
event: "inject" | "used" | "rejected" | "tool-error";
|
|
@@ -237,6 +242,12 @@ type ToolResponse = {
|
|
|
237
242
|
}>;
|
|
238
243
|
details: Record<string, JsonValue>;
|
|
239
244
|
};
|
|
245
|
+
type ProjectSummary = {
|
|
246
|
+
projectId: string;
|
|
247
|
+
workspace: string | null;
|
|
248
|
+
memoryCount: number;
|
|
249
|
+
kind: "general" | "project";
|
|
250
|
+
};
|
|
240
251
|
type InspectData = {
|
|
241
252
|
op: "storage";
|
|
242
253
|
dimension: number | null;
|
|
@@ -262,6 +273,14 @@ type InspectData = {
|
|
|
262
273
|
lines?: number;
|
|
263
274
|
nextFrom?: number;
|
|
264
275
|
};
|
|
276
|
+
} | {
|
|
277
|
+
op: "projects";
|
|
278
|
+
projects: ProjectSummary[];
|
|
279
|
+
} | {
|
|
280
|
+
op: "currentProject";
|
|
281
|
+
workspace: string;
|
|
282
|
+
status: "known" | "unknown";
|
|
283
|
+
project: ProjectSummary | null;
|
|
265
284
|
};
|
|
266
285
|
interface ContractOutputs {
|
|
267
286
|
init: Result<{
|
|
@@ -320,6 +339,7 @@ declare const MEMORY_ROUTES: Readonly<Record<ContractMethod, {
|
|
|
320
339
|
}>>;
|
|
321
340
|
declare const MEMORY_BODY_LIMIT_BYTES: number;
|
|
322
341
|
declare const MEMORY_SKIN_HEADER = "x-sno-station-mem-skin";
|
|
342
|
+
declare const REM_SIDECAR_TOKEN_HEADER = "x-sidecar-token";
|
|
323
343
|
declare const MEMORY_HEALTH_TIMEOUT_MS = 5e3;
|
|
324
344
|
declare const MEMORY_START_TIMEOUT_MS = 3e4;
|
|
325
345
|
declare function memoryMethod(pathname: string): ContractMethod | undefined;
|
|
@@ -347,4 +367,4 @@ declare function contractJsonSchemas(method: ContractMethod): {
|
|
|
347
367
|
output: z.core.JSONSchema.JSONSchema;
|
|
348
368
|
};
|
|
349
369
|
//#endregion
|
|
350
|
-
export {
|
|
370
|
+
export { usageSignalSchema as $, HostContext as A, ScopeCtx as B, inspectDataSchema as C, toolResponseSchema as D, retrievalResultSchema as E, JsonValue as F, inputSchemas as G, UsageSignal as H, Message as I, mutationSchema as J, inspectionSchema as K, Mutation as L, HostEvent as M, InitRegistration as N, AgentModelRegistration as O, Inspection as P, turnSchema as Q, RecallOptions as R, ToolResponse as S, outputSchemas as T, hostEventSchema as U, Turn as V, initRegistrationSchema as W, registrationSchema as X, recallOptionsSchema as Y, scopeSchema as Z, engineSettingsSchema as _, parseOutput as a, ProjectSummary as b, MEMORY_ERROR_STATUS as c, MEMORY_ROUTES as d, ContractError as et, MEMORY_SKIN_HEADER as f, EngineSettings as g, memoryMethod as h, parseInput as i, HostDecision as j, ContractInputs as k, MEMORY_HEALTH_TIMEOUT_MS as l, REM_SIDECAR_TOKEN_HEADER as m, MemoryContract as n, DegradedReason as nt, MEMORY_BODY_LIMIT_BYTES as o, MEMORY_START_TIMEOUT_MS as p, messageSchema as q, contractJsonSchemas as r, MEMORY_DEFAULT_SKIN_ID as s, ContractMethod as t, DEGRADED_REASONS as tt, MEMORY_RECONNECT_INTERVAL_MS as u, ContractOutputs as v, memoryEntrySchema as w, Result as x, InspectData as y, Registration as z };
|