@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
|
@@ -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 { r as SqliteDatabaseLike } from "./sqlite-runtime-L_ywirTm.js";
|
|
4
4
|
//#region src/engine/observability/memory-snapshot.d.ts
|
|
5
5
|
type SnapshotReason = "startup" | "session_end";
|
|
@@ -61,7 +61,7 @@ function isSafeInteger(value) {
|
|
|
61
61
|
/**
|
|
62
62
|
* The order key a row carries, or the one a row written before this change is treated as having.
|
|
63
63
|
*
|
|
64
|
-
* A row from before
|
|
64
|
+
* A row from before source order was persisted has no `source_order` until the maintenance pass backfills it, and an
|
|
65
65
|
* ordinary wave must keep running over such a store rather than throwing. Those rows are older
|
|
66
66
|
* than everything written since — that is what "written before" means — so they read as the
|
|
67
67
|
* lowest possible key: anything may close them, and they may close nothing.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as MemoryLane, b as MemoryTier, g as MemoryEntry, h as MemoryCategory, r as AggregationQuery, v as MemoryMetadata, y as MemorySearchResult } from "./types-
|
|
1
|
+
import { _ as MemoryLane, b as MemoryTier, g as MemoryEntry, h as MemoryCategory, r as AggregationQuery, v as MemoryMetadata, y as MemorySearchResult } from "./types-DvQ6nTNC.js";
|
|
2
2
|
import "./index-DL8AVj0Z.js";
|
|
3
3
|
import { t as Embedder } from "./embedding-provider-client-vynZMuit.js";
|
|
4
|
-
import { K as RemFacetPolicy } from "./index-
|
|
4
|
+
import { K as RemFacetPolicy } from "./index-BO4RU_mc.js";
|
|
5
5
|
import { T as WriteTextVersionInput, h as RemMutationResult } from "./types-pVomjzqR.js";
|
|
6
6
|
import { a as StorageError } from "./errors-CeVRxf9V.js";
|
|
7
|
-
import { r as WriterAuthority } from "./memory-kind-policy-
|
|
8
|
-
import { t as DrizzleDB } from "./connection-
|
|
7
|
+
import { r as WriterAuthority } from "./memory-kind-policy-DnHY7l0n.js";
|
|
8
|
+
import { t as DrizzleDB } from "./connection-3IVXpuPE.js";
|
|
9
9
|
import { r as SqliteDatabaseLike } from "./sqlite-runtime-L_ywirTm.js";
|
|
10
10
|
import { n as MemoryTelemetryKeySet, t as MemoryTelemetryReceiptService } from "./memory-telemetry-receipts-MAJecvXQ.js";
|
|
11
11
|
import { a as MemoryTelemetryMetadata, i as MemoryTelemetryEventType, r as MemoryTelemetryDeleteReason } from "./memory-telemetry-types-CufVmrCs.js";
|
|
@@ -263,8 +263,7 @@ interface SearchOptions {
|
|
|
263
263
|
/**
|
|
264
264
|
* When set, search excludes memories whose metadata.invalidated_at is <= this
|
|
265
265
|
* timestamp. Fires on EVERY recall path — manual + auto + slash commands —
|
|
266
|
-
* because a superseded fact is obsolete regardless of recall mode
|
|
267
|
-
* memora-fama OD-3, FAA binary).
|
|
266
|
+
* because a superseded fact is obsolete regardless of recall mode.
|
|
268
267
|
*/
|
|
269
268
|
excludeInvalidatedBefore?: number;
|
|
270
269
|
/** Explicit historical recall retains an invalidated row only when it names a successor. */
|
|
@@ -2,7 +2,7 @@ import "./internal/config/index.js";
|
|
|
2
2
|
import { Ct as PERSISTED_CONTENT_HASH_V3, St as PERSISTED_CONTENT_HASH_V1 } from "./signed-registry-constants-yq3DlG3B.js";
|
|
3
3
|
import { StorageError } from "./internal/engine/shared/errors.js";
|
|
4
4
|
import "./internal/engine/shared/utils.js";
|
|
5
|
-
import "./connection-
|
|
5
|
+
import "./connection-C9YD5sgm.js";
|
|
6
6
|
import { CHUNKING_VERSION, aggregateChunksToMemories, buildChunkId, buildDensePayload, chunk as chunk$1, expandSnippetWindow, extractMetadataHeader, headExtract, shouldDropSummary } from "@snoai/chunking";
|
|
7
7
|
import { createLogger } from "@snoai/utils/logger";
|
|
8
8
|
import { randomUUID as randomUUID$1 } from "node:crypto";
|
|
@@ -54,7 +54,7 @@ function readAmbientCaptureHashMetadata(metadata) {
|
|
|
54
54
|
*/
|
|
55
55
|
const log = createLogger("sno-station-mem:store");
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Reflection v3: discriminator added to content-hash input when the
|
|
58
58
|
* row carries a `metadata.mappedKind`. Two rows with same projectId + same store
|
|
59
59
|
* category + same text but distinct mappedKinds (e.g. user-model vs
|
|
60
60
|
* agent-model both → category=preference) must coexist as distinct rows. The
|
package/dist/{memory-temporality-classifier-CKiTAHXe.js → memory-temporality-classifier-AetVby94.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isSupportedLocale } from "./internal/engine/i18n/locales.js";
|
|
2
2
|
import { parseIsoDateTimeMs } from "./internal/engine/shared/iso-date-time.js";
|
|
3
|
-
import { n as modelCallDestination } from "./model-call-table-
|
|
4
|
-
import { a as isTerminalLlmFailure } from "./llm-client-
|
|
3
|
+
import { n as modelCallDestination } from "./model-call-table-BZJQkbKX.js";
|
|
4
|
+
import { a as isTerminalLlmFailure } from "./llm-client-BhkzlTnH.js";
|
|
5
5
|
import { n as readModelReplyJson } from "./model-reply-text-CKopStP2.js";
|
|
6
6
|
import { n as RESOURCES_BY_LOCALE } from "./all-resources-BQK2ugjB.js";
|
|
7
7
|
import { a as sessionZoneCarriedBy, n as calendarInstructionSchema, r as calendarSessionTimestamp, t as calculateCalendarTime } from "./calendar-instruction-CzqZbAPG.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as MemoryCategory, w as InsightMetadata } from "./types-
|
|
1
|
+
import { h as MemoryCategory, w as InsightMetadata } from "./types-DvQ6nTNC.js";
|
|
2
2
|
//#region src/engine/extraction/memory-temporality-classifier.d.ts
|
|
3
3
|
type TemporalType = "static" | "dynamic";
|
|
4
4
|
type TemporalResolutionStatus = "resolved" | "unresolved" | "static";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as MemoryTier, l as DecayScore } from "./types-
|
|
1
|
+
import { b as MemoryTier, l as DecayScore } from "./types-DvQ6nTNC.js";
|
|
2
2
|
//#region src/engine/operations/memory-tier-promoter.d.ts
|
|
3
3
|
interface TierConfig {
|
|
4
4
|
/** Minimum access count for Core promotion (default: 10) */
|
|
@@ -7,7 +7,7 @@ import "./internal/engine/shared/utils.js";
|
|
|
7
7
|
import "./all-resources-BQK2ugjB.js";
|
|
8
8
|
import "./capture-policy-detector-DaMfy9CZ.js";
|
|
9
9
|
import "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
10
|
-
import "./memory-temporality-classifier-
|
|
10
|
+
import "./memory-temporality-classifier-AetVby94.js";
|
|
11
11
|
import "./runtime-audit-log-BCeujlEp.js";
|
|
12
12
|
import "./internal/engine/operations/daily-spend-estimator.js";
|
|
13
13
|
import "./internal/engine/operations/learning-file-maintenance.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./types-DvQ6nTNC.js";
|
|
2
|
+
import "./index-DL8AVj0Z.js";
|
|
3
|
+
import "./embedding-provider-client-vynZMuit.js";
|
|
4
|
+
import "./retriever-CXeB7-A2.js";
|
|
5
|
+
import "./memory-metadata-codec-DbrRyhCg.js";
|
|
6
|
+
import "./store-Dbo7MIzt.js";
|
|
7
|
+
import "./capture-policy-detector-CN3vfdNU.js";
|
|
8
|
+
import "./memory-temporality-classifier-D91grvZ3.js";
|
|
9
|
+
import "./runtime-audit-log-CIYiNvwf.js";
|
|
10
|
+
import { z as z$1 } from "zod";
|
|
11
|
+
import "@snoai/chunking";
|
|
12
|
+
import "@sinclair/typebox";
|
|
13
|
+
import "async-mutex";
|
|
14
|
+
export { z$1 as t };
|
|
@@ -411,6 +411,15 @@ const MODEL_CALLS = {
|
|
|
411
411
|
"rem-enhanced": "sno-gpu"
|
|
412
412
|
}
|
|
413
413
|
},
|
|
414
|
+
R5: {
|
|
415
|
+
description: "generate local lessons and skill reminders nightly",
|
|
416
|
+
calledBy: "RSI skill",
|
|
417
|
+
destinations: {
|
|
418
|
+
"local-first": "host",
|
|
419
|
+
"agent-native": "off",
|
|
420
|
+
"rem-enhanced": "off"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
414
423
|
REM1: {
|
|
415
424
|
description: "replace conflict pair",
|
|
416
425
|
occasion: "conflictAdjudication",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PluginObservability } from "./adapter-
|
|
1
|
+
import { n as PluginObservability } from "./adapter-CeQ7rViY.js";
|
|
2
2
|
import { r as EmbeddingConfig, t as Embedder } from "./embedding-provider-client-vynZMuit.js";
|
|
3
3
|
//#region src/engine/observability/observable-embedder.d.ts
|
|
4
4
|
type SessionUuidProvider = () => string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as LlmClientConfig, r as LlmClient, s as MemoryLlmRequest } from "./plugin-config-schema-
|
|
2
|
-
import { n as PluginObservability } from "./adapter-
|
|
3
|
-
import "./llm-client-
|
|
1
|
+
import { i as LlmClientConfig, r as LlmClient, s as MemoryLlmRequest } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
|
+
import { n as PluginObservability } from "./adapter-CeQ7rViY.js";
|
|
3
|
+
import "./llm-client-PC0yQuCq.js";
|
|
4
4
|
//#region src/engine/observability/observable-llm-client.d.ts
|
|
5
5
|
type SessionUuidProvider = () => string | undefined;
|
|
6
6
|
declare class ObservableLlmClient implements LlmClient {
|
package/dist/{observable-memory-store-BaZKbhgq.d.ts → observable-memory-store-BykVMQXt.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as MemoryTier, g as MemoryEntry, v as MemoryMetadata, y as MemorySearchResult } from "./types-
|
|
2
|
-
import { n as PluginObservability } from "./adapter-
|
|
1
|
+
import { b as MemoryTier, g as MemoryEntry, v as MemoryMetadata, y as MemorySearchResult } from "./types-DvQ6nTNC.js";
|
|
2
|
+
import { n as PluginObservability } from "./adapter-CeQ7rViY.js";
|
|
3
3
|
import { r as EmbeddingConfig } from "./embedding-provider-client-vynZMuit.js";
|
|
4
|
-
import { C as MemoryStore, F as TaskLifecycleBatchWriteResult, M as SupersedeClose, N as SupersedePreserveExisting, P as TaskLifecycleBatchWriteInput, at as ListOptions, dt as RecordUnplacedCandidateResult, f as AtomicExtractionWriteResult, ft as SearchOptions, gt as StoreResult, ht as StoreInput, j as SupersedeActiveFactGuard, mt as StoreConfig, ot as MemoryRow, rt as ChunkSearchResult, u as AtomicExtractionWriteInput, ut as RecordUnplacedCandidateInput, w as MemoryStoreInternals, yt as UpdateChanges } from "./memory-store-base-
|
|
5
|
-
import "./store-
|
|
4
|
+
import { C as MemoryStore, F as TaskLifecycleBatchWriteResult, M as SupersedeClose, N as SupersedePreserveExisting, P as TaskLifecycleBatchWriteInput, at as ListOptions, dt as RecordUnplacedCandidateResult, f as AtomicExtractionWriteResult, ft as SearchOptions, gt as StoreResult, ht as StoreInput, j as SupersedeActiveFactGuard, mt as StoreConfig, ot as MemoryRow, rt as ChunkSearchResult, u as AtomicExtractionWriteInput, ut as RecordUnplacedCandidateInput, w as MemoryStoreInternals, yt as UpdateChanges } from "./memory-store-base-Dx6oSqiv.js";
|
|
5
|
+
import "./store-Dbo7MIzt.js";
|
|
6
6
|
//#region src/engine/observability/observable-memory-store.d.ts
|
|
7
7
|
type SessionUuidProvider = () => string | undefined;
|
|
8
8
|
declare class ObservableMemoryStore extends MemoryStore {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { x as RetrievalResult } from "./types-
|
|
2
|
-
import { n as PluginObservability } from "./adapter-
|
|
1
|
+
import { x as RetrievalResult } from "./types-DvQ6nTNC.js";
|
|
2
|
+
import { n as PluginObservability } from "./adapter-CeQ7rViY.js";
|
|
3
3
|
import { r as EmbeddingConfig, t as Embedder } from "./embedding-provider-client-vynZMuit.js";
|
|
4
|
-
import { d as RetrievalConfig, f as RetrievalContext, t as MemoryRetriever } from "./retriever-
|
|
5
|
-
import { C as MemoryStore } from "./memory-store-base-
|
|
6
|
-
import "./store-
|
|
4
|
+
import { d as RetrievalConfig, f as RetrievalContext, t as MemoryRetriever } from "./retriever-CXeB7-A2.js";
|
|
5
|
+
import { C as MemoryStore } from "./memory-store-base-Dx6oSqiv.js";
|
|
6
|
+
import "./store-Dbo7MIzt.js";
|
|
7
7
|
//#region src/engine/observability/observable-retriever.d.ts
|
|
8
8
|
type SessionUuidProvider = () => string | undefined;
|
|
9
9
|
type RetrievalTraceResult = Awaited<ReturnType<MemoryRetriever["retrieveWithTrace"]>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./profile-DbIDAmnc.js";
|
|
@@ -149,6 +149,7 @@ type LlmRoutingConfig = {
|
|
|
149
149
|
language: Locale;
|
|
150
150
|
modelCalls?: Settings["modelCalls"];
|
|
151
151
|
};
|
|
152
|
+
declare const modelCallsConfigSchema: z.ZodType<Settings["modelCalls"] | undefined>;
|
|
152
153
|
declare const llmRoutingConfigSchema: z.ZodType<LlmRoutingConfig, unknown>;
|
|
153
154
|
type LlmRoutingConfigInput = {
|
|
154
155
|
mode: ProductMode;
|
|
@@ -159,7 +160,7 @@ type LlmRoutingConfigInput = {
|
|
|
159
160
|
//#region src/model/model-call-table.d.ts
|
|
160
161
|
type ModelDestination = "off" | "host" | "sno-gpu";
|
|
161
162
|
type ModelCallId = "E1" | "E2" | "E3" | "E4" | "E5" | "E6" | "E7" | "E8" | "E9" | "E10" | "E11" | "E12" | "P1" | "P2" | "P3" | "P4" | "P5" | "P6" | "T1" | "R1" | "REM1" | "REM2" | "REM3" | "REM4" | "REM5" | "REM6" | "REM7" | "REM8";
|
|
162
|
-
type RsiModelCallId = "R2" | "R3" | "R4";
|
|
163
|
+
type RsiModelCallId = "R2" | "R3" | "R4" | "R5";
|
|
163
164
|
type ModelCall = {
|
|
164
165
|
description: string;
|
|
165
166
|
occasion: LlmOccasion;
|
|
@@ -410,4 +411,4 @@ type PluginConfigOutput = {
|
|
|
410
411
|
declare const pluginConfigSchema: z.ZodType<PluginConfigOutput, unknown>;
|
|
411
412
|
type PluginConfig = z.output<typeof pluginConfigSchema>;
|
|
412
413
|
//#endregion
|
|
413
|
-
export {
|
|
414
|
+
export { settingsToPluginConfig as C, settingsSchema as S, SessionStrategy as T, llmRoutingConfigSchema as _, LlmPreset as a, Settings as b, ResolvedLlmConfig as c, LLM_OCCASIONS as d, LlmOccasion as f, ProductMode as g, PRODUCT_MODES as h, LlmClientConfig as i, ModelCallId as l, LlmRoutingConfigInput as m, pluginConfigSchema as n, LlmProvider as o, LlmRoutingConfig as p, LlmClient as r, MemoryLlmRequest as s, PluginConfig as t, DEFAULT_MODEL_MODE as u, modelCallsConfigSchema as v, SESSION_STRATEGIES as w, defaultSettings as x, remEnhancedConfigSchema as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_AUTO_RECALL_MAX_QUERY_LENGTH, DEFAULT_BM25_WEIGHT, DEFAULT_REFLECTION_MAX_INPUT_CHARS, DEFAULT_REFLECTION_TIMEOUT_MS, DEFAULT_RERANK_MODEL, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_SCOPE, DEFAULT_VECTOR_WEIGHT, RECENCY_WEIGHT, RECENCY_WEIGHT_MAX, SNO_OBSERVE_DEFAULT_AGENT_ID, SNO_OBSERVE_DEFAULT_BASE_URL, VECTOR_DIMENSION_DEFAULT, recallLifecycleSchema } from "./internal/config/index.js";
|
|
2
2
|
import { SUPPORTED_LOCALES } from "./internal/engine/i18n/locales.js";
|
|
3
3
|
import { $ as FIXED_MEMORY_SNO_EXTRACT_PROFILE, Q as FIXED_MEMORY_SNO_EXTRACT_CHAT, X as FIXED_MEMORY_SNO_AI_EXTRACT, Z as FIXED_MEMORY_SNO_CONFLICT_VERDICT, dt as FIXED_PROTOCOL_VALUE_72, lt as FIXED_PROTOCOL_VALUE_70, ut as FIXED_PROTOCOL_VALUE_71, wt as PERSISTED_PROVIDER_SYSTEM } from "./signed-registry-constants-yq3DlG3B.js";
|
|
4
|
-
import { DEFAULT_MODEL_MODE, PRODUCT_MODES, remEnhancedConfigSchema } from "./internal/config/product-mode.js";
|
|
4
|
+
import { DEFAULT_MODEL_MODE, PRODUCT_MODES, modelCallsConfigSchema, remEnhancedConfigSchema } from "./internal/config/product-mode.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { createLogger } from "@snoai/utils/logger";
|
|
7
7
|
//#region config/session-strategy.ts
|
|
@@ -338,11 +338,7 @@ const pluginConfigSchema = z.object({
|
|
|
338
338
|
* config requires an explicit product mode.
|
|
339
339
|
*/
|
|
340
340
|
mode: z.enum(PRODUCT_MODES).default(DEFAULT_MODEL_MODE),
|
|
341
|
-
modelCalls:
|
|
342
|
-
"off",
|
|
343
|
-
"host",
|
|
344
|
-
"sno-gpu"
|
|
345
|
-
]))).optional(),
|
|
341
|
+
modelCalls: modelCallsConfigSchema,
|
|
346
342
|
remOperations: z.array(z.enum(REM_OPERATIONS)).min(1).max(2).default([...REM_OPERATIONS]),
|
|
347
343
|
remEnhanced: remEnhancedConfigSchema,
|
|
348
344
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as Settings } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
2
|
//#region src/contract/profile.d.ts
|
|
3
3
|
declare function getStateDir(defaultStateDir?: string): string;
|
|
4
4
|
declare function getSettingsPath(): string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { MAX_LIST_LIMIT } from "./internal/config/index.js";
|
|
2
2
|
import { SnoStationMemError, StorageError } from "./internal/engine/shared/errors.js";
|
|
3
3
|
import { a as buildInsightMetadata, c as stringifyInsightMetadata, h as deriveFactKey, s as parseInsightMetadata } from "./memory-metadata-codec-DL1sbJiN.js";
|
|
4
|
-
import { n as LlmClientTerminalError } from "./llm-client-
|
|
4
|
+
import { n as LlmClientTerminalError } from "./llm-client-BhkzlTnH.js";
|
|
5
5
|
import { resolveLlmRoute } from "./internal/model/llm-mode-routing.js";
|
|
6
6
|
import { boundSectionContent, buildIndexedText } from "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
7
7
|
import { d as runWithMutationAttempt, i as currentMutationAttemptId } from "./runtime-audit-log-BCeujlEp.js";
|
|
8
8
|
import { adapterAViewFromRecord, orderAdapterAPair, parseAdapterAChatVerdict, prospectiveProfileView, renderAdapterAChatPrompt, renderAdapterAPrompt } from "./internal/engine/rem/index.js";
|
|
9
|
-
import { C as TaskLifecycleStaleResolutionError, a as resolveTaskLifecycle, c as buildTaskLifecycleCommandClaim, i as findUniqueActiveTaskByDescription, l as resolveTaskLifecycleEffectiveTime, n as acceptsTaskLifecycleJudgment, o as taskLifecycleCandidateSetVersion, r as buildTaskLifecycleCandidateSet, s as admitTaskLifecycleAssertion, x as StaleSupersedeTargetError } from "./store-
|
|
9
|
+
import { C as TaskLifecycleStaleResolutionError, a as resolveTaskLifecycle, c as buildTaskLifecycleCommandClaim, i as findUniqueActiveTaskByDescription, l as resolveTaskLifecycleEffectiveTime, n as acceptsTaskLifecycleJudgment, o as taskLifecycleCandidateSetVersion, r as buildTaskLifecycleCandidateSet, s as admitTaskLifecycleAssertion, x as StaleSupersedeTargetError } from "./store-D3n1P7Xn.js";
|
|
10
10
|
import { o as canonicalizeProfileSectionName, r as recordTokenCounter } from "./memory-store-write-validation-B_hDG2zf.js";
|
|
11
11
|
import { canExtractorWrite } from "./internal/engine/shared/memory-kind-policy.js";
|
|
12
12
|
import { resolveHookAgentId } from "./internal/engine/bindings/sno-station-mem-runtime-mode.js";
|
|
@@ -716,7 +716,7 @@ const LIFECYCLE_RETIREMENT_MAX_DEFERRALS = 3;
|
|
|
716
716
|
* the route can ever answer, and three timeouts is an ordinary afternoon on a busy GPU — counting
|
|
717
717
|
* them would throw away a retirement and leave the stale row it named live for good. A malformed
|
|
718
718
|
* or empty answer from a route that resolved ON is the failure that repeats, so it is the one
|
|
719
|
-
* that counts.
|
|
719
|
+
* that counts.
|
|
720
720
|
*/
|
|
721
721
|
function deferLifecycleRetirement(retiredClauses, incomingAssertion, liveSiblingSectionNames, attempts = 0, failure = "malformed-answer") {
|
|
722
722
|
const nextAttempts = failure === "transport" ? attempts : attempts + 1;
|
|
@@ -1188,7 +1188,7 @@ function renderRetirementRecheckPrompt(input) {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
/**
|
|
1190
1190
|
* The second key on every clause the profile judgement retired from `preferences.general`.
|
|
1191
|
-
* Measured 2026-09-01 on the
|
|
1191
|
+
* Measured 2026-09-01 on the Memora store: 753 clauses were retired across 1,149
|
|
1192
1192
|
* rewrites, 317 of them shared no content word with the incoming assertion, and 238 of those in
|
|
1193
1193
|
* the general section had no live sibling carrying them; replayed one by one, 39 of 40 such
|
|
1194
1194
|
* retirements were judged wrong, while 14 of 20 genuine replacements were still retired. A
|
|
@@ -6,7 +6,7 @@ import { clampInt } from "./internal/engine/shared/utils.js";
|
|
|
6
6
|
import { listCanonicalMemoryFiles, readCanonicalMemoryFile, searchCanonicalMemoryFiles } from "./internal/engine/provider/canonical-memory-corpus.js";
|
|
7
7
|
import { isProviderRowId, providerRowPath, renderProviderRowMemory } from "./internal/engine/provider/provider-row-renderer.js";
|
|
8
8
|
import { createLogger, currentLogContext, privateLogReference, withLogContext } from "@snoai/utils/logger";
|
|
9
|
-
import { resolve } from "node:path";
|
|
9
|
+
import { isAbsolute, resolve } from "node:path";
|
|
10
10
|
import { createUUIDv7, isLowercaseCanonicalUUIDv7 } from "@snoai/common-core";
|
|
11
11
|
import { bootstrapIdentity } from "@snoai/observability";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
@@ -15,6 +15,36 @@ import { randomUUID } from "node:crypto";
|
|
|
15
15
|
* @purpose Resolves SnoStationMem external project/agent keys to internal provider authority.
|
|
16
16
|
* @boundary SQLite mapping tables and project-agent membership checks.
|
|
17
17
|
*/
|
|
18
|
+
function inspectProviderProjects(store, userId, op) {
|
|
19
|
+
const projects = store.sqlite.prepare(`
|
|
20
|
+
WITH counts AS (SELECT project_id, COUNT(*) AS memory_count FROM nodix_memories GROUP BY project_id)
|
|
21
|
+
SELECT mapping.project_id AS projectId, mapping.external_project_key AS workspace,
|
|
22
|
+
COALESCE(counts.memory_count, 0) AS memoryCount
|
|
23
|
+
FROM nodix_provider_project_mappings AS mapping
|
|
24
|
+
LEFT JOIN counts ON counts.project_id = mapping.project_id
|
|
25
|
+
WHERE mapping.user_id = ? AND mapping.external_system = ?
|
|
26
|
+
UNION ALL
|
|
27
|
+
SELECT counts.project_id, NULL, counts.memory_count FROM counts
|
|
28
|
+
WHERE NOT EXISTS (SELECT 1 FROM nodix_provider_project_mappings AS mapping WHERE mapping.project_id = counts.project_id)
|
|
29
|
+
ORDER BY projectId
|
|
30
|
+
`).all(userId, PERSISTED_PROVIDER_SYSTEM).map((row) => ({
|
|
31
|
+
...row,
|
|
32
|
+
workspace: row.workspace && isAbsolute(row.workspace) ? row.workspace : null,
|
|
33
|
+
kind: row.projectId === "global" ? "general" : "project"
|
|
34
|
+
}));
|
|
35
|
+
if (op.op === "projects") return {
|
|
36
|
+
op: "projects",
|
|
37
|
+
projects
|
|
38
|
+
};
|
|
39
|
+
const workspace = resolve(op.workspace);
|
|
40
|
+
const project = projects.find((row) => row.workspace === workspace) ?? null;
|
|
41
|
+
return {
|
|
42
|
+
op: "currentProject",
|
|
43
|
+
workspace,
|
|
44
|
+
status: project ? "known" : "unknown",
|
|
45
|
+
project
|
|
46
|
+
};
|
|
47
|
+
}
|
|
18
48
|
function validateAuthorityInput(input) {
|
|
19
49
|
const userId = input.trustedUserId.trim();
|
|
20
50
|
if (userId.length === 0) throw new StorageError("Provider authority userId is required");
|
|
@@ -718,4 +748,4 @@ function createMemoryRuntime(params) {
|
|
|
718
748
|
};
|
|
719
749
|
}
|
|
720
750
|
//#endregion
|
|
721
|
-
export { readTrustedUserId as a, readProviderIdentity as i, readAgentWorkspace as n, resolveProviderIdentity as o, readConfiguredAgents as r, SnoStationMemProviderSearchManager as s, createMemoryRuntime as t };
|
|
751
|
+
export { readTrustedUserId as a, inspectProviderProjects as c, readProviderIdentity as i, readAgentWorkspace as n, resolveProviderIdentity as o, readConfiguredAgents as r, SnoStationMemProviderSearchManager as s, createMemoryRuntime as t };
|
|
@@ -3,14 +3,14 @@ import { a as buildInsightMetadata, c as stringifyInsightMetadata } from "./memo
|
|
|
3
3
|
import { redactSecrets } from "./internal/engine/security/redact.js";
|
|
4
4
|
import { t as checkMemoryOperation } from "./operation-cancellation-CTKWwNHk.js";
|
|
5
5
|
import { setLruEntry } from "./internal/engine/shared/lru.js";
|
|
6
|
-
import { i as createLlmClient } from "./llm-client-
|
|
6
|
+
import { i as createLlmClient } from "./llm-client-BhkzlTnH.js";
|
|
7
7
|
import { pickLlmRoutingConfig } from "./internal/model/llm-mode-routing.js";
|
|
8
8
|
import { appendSelfImprovementEntry } from "./internal/engine/operations/learning-file-maintenance.js";
|
|
9
9
|
import { getSnoStationMemDataDir } from "./internal/store/data-paths.js";
|
|
10
10
|
import { resolveHookAgentId } from "./internal/engine/bindings/sno-station-mem-runtime-mode.js";
|
|
11
|
-
import { n as createRetireByNameRunBudget, r as runProfileSectionUpdate } from "./profile-section-writer-
|
|
11
|
+
import { n as createRetireByNameRunBudget, r as runProfileSectionUpdate } from "./profile-section-writer-BV605K78.js";
|
|
12
12
|
import { a as generateReflectionText, c as shouldSkipReflectionMessage, l as writeReflectionToFilesystem, s as readSessionConversationWithResetFallback, u as extractTextContent } from "./daily-log-generator-CH_KuWHs.js";
|
|
13
|
-
import { a as resolveWorkspaceDirFromEvent, f as setReflectionDerivedCacheEntry, l as isSessionBoundaryReflectionAction, n as createReflectionGenerator, o as DEFAULT_REFLECTION_BOUNDARY_DERIVED_SUPPRESSION_MS, t as DEFAULT_MEMORY_LLM_CONFIG, u as setReflectionDerivedSuppression } from "./reflection-embedded-generator-
|
|
13
|
+
import { a as resolveWorkspaceDirFromEvent, f as setReflectionDerivedCacheEntry, l as isSessionBoundaryReflectionAction, n as createReflectionGenerator, o as DEFAULT_REFLECTION_BOUNDARY_DERIVED_SUPPRESSION_MS, t as DEFAULT_MEMORY_LLM_CONFIG, u as setReflectionDerivedSuppression } from "./reflection-embedded-generator-D5OhLLVw.js";
|
|
14
14
|
import { i as buildReflectionMappedMetadata, n as createReflectionEventId, o as extractInjectableReflectionMappedMemoryItems, r as buildReflectionAntiPatternSignature, s as extractReflectionLearningGovernanceCandidates, t as storeReflectionEntries } from "./memory-entry-projector-DHo8jH10.js";
|
|
15
15
|
import { createLogger, currentLogContext, privateLogReference, withLogContext } from "@snoai/utils/logger";
|
|
16
16
|
import { basename, join } from "node:path";
|
|
@@ -224,7 +224,7 @@ function governanceEntryType(area) {
|
|
|
224
224
|
*/
|
|
225
225
|
const diagnosticLog$1 = createLogger("sno-station-mem:session-serial-guard");
|
|
226
226
|
/**
|
|
227
|
-
* Serial guard for reflection
|
|
227
|
+
* Serial guard for reflection.
|
|
228
228
|
*
|
|
229
229
|
* Two distinct protections:
|
|
230
230
|
* (1) In-flight lock - boolean, no time bound, blocks parallel re-entry.
|
package/dist/{reflection-command-hooks-C1Vxgb-O.d.ts → reflection-command-hooks-h2CbYuXx.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
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 { n as createErrorSignalTracker } from "./error-signals-D8_3vYu4.js";
|
|
4
|
-
import { n as ReflectionDerivedCache, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-
|
|
5
|
-
import { t as ReflectionDeps } from "./reflection-deps-
|
|
4
|
+
import { n as ReflectionDerivedCache, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-BZdBZSdK.js";
|
|
5
|
+
import { t as ReflectionDeps } from "./reflection-deps-MWVeBZcs.js";
|
|
6
6
|
//#region src/engine/reflection/reflection-command-hooks.d.ts
|
|
7
7
|
declare function createRunMemoryReflection(params: ReflectionCommandParams): (event: {
|
|
8
8
|
sessionKey: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as AgentLlmPort } from "./agent-llm-port-5oXgBpzJ.js";
|
|
2
2
|
import { n as createEmbedder } from "./embedding-provider-client-vynZMuit.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
|
import { r as MemoryTelemetryUsageOutbox } from "./memory-telemetry-outbox-ddTdImt7.js";
|
|
6
6
|
import { n as createScopePolicy } from "./memory-scope-policy-1gg5QlWZ.js";
|
|
7
7
|
//#region src/engine/reflection/reflection-deps.d.ts
|
package/dist/{reflection-embedded-generator-CDUhgV96.js → reflection-embedded-generator-D5OhLLVw.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { X as FIXED_MEMORY_SNO_AI_EXTRACT } from "./signed-registry-constants-yq3DlG3B.js";
|
|
2
|
-
import { i as createLlmClient } from "./llm-client-
|
|
2
|
+
import { i as createLlmClient } from "./llm-client-BhkzlTnH.js";
|
|
3
3
|
//#region src/engine/reflection/derived-line-cache.ts
|
|
4
4
|
/**
|
|
5
5
|
* Returns reflection derived cache entry from reflection cache keys state without side effects.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as LlmRoutingConfig, t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { p as LlmRoutingConfig, t as PluginConfig } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
|
+
import "./types-DvQ6nTNC.js";
|
|
3
3
|
import { n as AgentLlmPort } from "./agent-llm-port-5oXgBpzJ.js";
|
|
4
4
|
import { n as ReflectionGenerator } from "./daily-log-generator-CsQPHl4A.js";
|
|
5
5
|
import { n as createErrorSignalTracker } from "./error-signals-D8_3vYu4.js";
|
|
6
|
-
import { n as ReflectionDerivedCache, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-
|
|
6
|
+
import { n as ReflectionDerivedCache, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-BZdBZSdK.js";
|
|
7
7
|
//#region src/engine/reflection/reflection-embedded-generator.d.ts
|
|
8
8
|
declare const DEFAULT_MEMORY_LLM_CONFIG: NonNullable<PluginConfig["extraction"]["llm"]>;
|
|
9
9
|
declare function isInternalReflectionSessionKey(sessionKey: unknown): boolean;
|
package/dist/{reflection-injection-hooks-DfUgqu8f.d.ts → reflection-injection-hooks-B0fGkENX.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import "./types-
|
|
3
|
-
import "./store-
|
|
1
|
+
import { t as PluginConfig } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
|
+
import "./types-DvQ6nTNC.js";
|
|
3
|
+
import "./store-Dbo7MIzt.js";
|
|
4
4
|
import { r as MemoryTelemetryUsageOutbox } from "./memory-telemetry-outbox-ddTdImt7.js";
|
|
5
5
|
import { n as createScopePolicy } from "./memory-scope-policy-1gg5QlWZ.js";
|
|
6
6
|
import { n as createErrorSignalTracker } from "./error-signals-D8_3vYu4.js";
|
|
7
|
-
import { n as ReflectionDerivedCache, r as LoadedReflectionSlices, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-
|
|
7
|
+
import { n as ReflectionDerivedCache, r as LoadedReflectionSlices, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-BZdBZSdK.js";
|
|
8
8
|
//#region src/engine/reflection/reflection-slice-loader.d.ts
|
|
9
9
|
interface ReflectionSliceLoader {
|
|
10
10
|
loadAgentReflectionSlices: (agentId: string, projectIdFilter: string[]) => Promise<LoadedReflectionSlices>;
|
package/dist/{reflection-lifecycle-hooks-Ct5HBdSG.d.ts → reflection-lifecycle-hooks-Bg_JBS6c.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
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 { n as createErrorSignalTracker } from "./error-signals-D8_3vYu4.js";
|
|
4
|
-
import { n as ReflectionDerivedCache, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-
|
|
4
|
+
import { n as ReflectionDerivedCache, t as ReflectionDerivedSuppressionCache } from "./derived-suppression-cache-BZdBZSdK.js";
|
|
5
5
|
//#region src/engine/reflection/reflection-lifecycle-hooks.d.ts
|
|
6
6
|
type ReflectionLifecycleParams = {
|
|
7
7
|
reflectionCfg: PluginConfig["memoryReflection"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as runRemProductionOrderedWave } from "./rem-batch-executor-
|
|
1
|
+
import { o as runRemProductionOrderedWave } from "./rem-batch-executor-B4OoDBVK.js";
|
|
2
2
|
export { runRemProductionOrderedWave };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as FIXED_IDX_MEMORY_ACTIVE_TASK_EVIDENCE_INSTANCE, $n as MAX_CHUNK_FETCH_LIMIT, $t as FIXED_VEC_MEMORY, At as FIXED_MEMORY_PROVIDER_AGENT_MAPPINGS, B as FIXED_EXTERNAL_VALUE_51, C as getSnoStationMemStateDir, Cn as CHUNK_TARGET_TOKENS, Cr as LOCAL_EMBEDDING_CACHE_DIR_DEFAULT, Ct as FIXED_MEMORY_CHUNKS_MEM_IDX, D as settingsToPluginConfig, Dn as DEFAULT_RECALL_LIFECYCLE, Dr as ensureModelDownloaded, Dt as FIXED_MEMORY_MEMORIES_FACT_ID_UPDATE_GUARD, En as DEFAULT_IMPORTANCE, Er as LocalEmbedProvider, Et as FIXED_MEMORY_MEMORIES_FACT_ID_INSERT_GUARD, Fn as EMBEDDER_DIM, Ft as FIXED_MEMORY_SNO_EXTRACT_CHAT, G as FIXED_EXTERNAL_VALUE_56, Gt as FIXED_PROTOCOL_VALUE_69, H as FIXED_EXTERNAL_VALUE_53, Hn as HEAD_EXTRACT_OVERLAP_DROP_RATIO, In as EMBEDDER_MODEL_DEFAULT, J as FIXED_EXTERNAL_VALUE_62, Jn as LIGHTWEIGHT_FUSION_WEIGHT, K as FIXED_EXTERNAL_VALUE_57, Kn as INTRA_MEMORY_COSINE_THRESHOLD, Kt as FIXED_PROTOCOL_VALUE_73, Ln as EMBEDDER_PROVIDER_DEFAULT, Lt as FIXED_MEMORY_TASK_LIFECYCLE_COMMANDS, Mn as DEFAULT_RERANK_TIMEOUT_MS, Mt as FIXED_MEMORY_PROVIDER_PROJECT_MAPPINGS, O as MODEL_CALLS, Ot as FIXED_MEMORY_MIGRATION_MARKERS, Pn as DEFAULT_VECTOR_WEIGHT, Q as FIXED_IDX_MEMORY_ACTIVE_TASK_CURRENT_REVISION, Rn as EVAL_QA_TRACES_FILENAME, Rt as FIXED_MEMORY_UNPLACED_CANDIDATES, Sn as CHUNK_OVERLAP_TOKENS, Sr as CachedEmbeddingProvider, St as FIXED_MEMORY_CHUNKS_MEM_FACET_IDX, T as readSettings, Tn as DEFAULT_BM25_WEIGHT, Tt as FIXED_MEMORY_MEMORIES, U as FIXED_EXTERNAL_VALUE_54, Un as HEAD_EXTRACT_TOKEN_BUDGET, V as FIXED_EXTERNAL_VALUE_52, Vn as HEAD_EXTRACT_MIN_CONTENT_TOKENS, W as FIXED_EXTERNAL_VALUE_55, Wn as IMPORTANCE_WEIGHT_BASE, X as FIXED_EXTERNAL_VALUE_9, Y as FIXED_EXTERNAL_VALUE_8, Yn as LIGHTWEIGHT_RERANK_PENALTY, Z as FIXED_IDX_MEMORY, _n as BONUS_TOTAL_INVARIANT, _t as FIXED_MEMORY_CHUNKS_AD, a as REM_MODEL_OUTPUT_TOKEN_CAP, ar as MULTI_HIT_BONUS_CAP, at as FIXED_IDX_MEMORY_MEMORIES_PROJECT, bn as CHUNK_MAX_TOKENS, br as experimentMmrDisabled, bt as FIXED_MEMORY_CHUNKS_FTS, cr as RECENCY_WEIGHT, ct as FIXED_IDX_MEMORY_MEMORIES_PROJECT_TIMESTAMP, dr as RERANK_BLEND_CROSS, dt as FIXED_MEMORY_ACTIVE_TASK_INSTANCES, en as FIXED_VEC_MEMORY_CHUNKS, er as MAX_LIST_LIMIT, et as FIXED_IDX_MEMORY_ACTIVE_TASK_INSTANCES_PROJECTION, fr as RERANK_BLEND_VECTOR, ft as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_EVIDENCE, g as readRemOperationalConfig, gt as FIXED_MEMORY_CHUNKS, hr as TIME_DECAY_FLOOR, ht as FIXED_MEMORY_ACTIVE_TASK_TRANSITIONS, in as PERSISTED_PROVIDER_SYSTEM, ir as MMR_LAMBDA, it as FIXED_IDX_MEMORY_MEMORIES_LANE_PROJECT, jn as DEFAULT_RERANK_MODEL, jt as FIXED_MEMORY_PROVIDER_PROJECT_AGENTS, k as modelCallDestination, kt as FIXED_MEMORY_PROFILE_RECOVERY_ENTRIES, ln as ADJACENCY_BONUS_CAP, lt as FIXED_MEMORY, mt as FIXED_MEMORY_ACTIVE_TASK_REVISIONS, nn as PERSISTED_CONTENT_HASH_V1, nt as FIXED_IDX_MEMORY_MEMORIES_CONTENT_HASH, on as llmRoutingConfigSchema, or as MULTI_HIT_BONUS_PER_HIT, ot as FIXED_IDX_MEMORY_MEMORIES_PROJECT_CONTENT_HASH, pr as RETRIEVAL_STORAGE_CHUNK_PROFILE, pt as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_MANIFESTS, q as FIXED_EXTERNAL_VALUE_58, qn as LIGHTWEIGHT_COSINE_WEIGHT, rn as PERSISTED_CONTENT_HASH_V3, rt as FIXED_IDX_MEMORY_MEMORIES_FACT_ID, sn as SUPPORTED_LOCALES, st as FIXED_IDX_MEMORY_MEMORIES_PROJECT_FACT_KEY_ACTIVE, tn as PERSISTED_CANDIDATE_HASH_V1, tt as FIXED_IDX_MEMORY_MEMORIES_CATEGORY, un as ADJACENCY_BONUS_PER_PAIR, ut as FIXED_MEMORY_ACTIVE_TASK_EVIDENCE, vn as CACHE_TTL_MS, vt as FIXED_MEMORY_CHUNKS_AI, wn as CHUNK_TOKENIZER_MODE, wr as LOCAL_EMBEDDING_MODEL, wt as FIXED_MEMORY_EXTRACTION_TIMESTAMPS, xn as CHUNK_MIN_TOKENS, xt as FIXED_MEMORY_CHUNKS_MEMORY_ID_IDX, yn as CHUNKING_VERSION$1, yr as experimentCandidatePoolOverride, yt as FIXED_MEMORY_CHUNKS_AU, z as FIXED_EXTERNAL_VALUE_49 } from "./config-CyH1VuJc.js";
|
|
2
2
|
import { createLogger, createLogger as createLogger$1, currentLogContext, privateLogReference, withLogContext } from "@snoai/utils/logger";
|
|
3
3
|
import path, { dirname, join, resolve } from "node:path";
|
|
4
4
|
import { appendFileSync, createReadStream, existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
@@ -5890,11 +5890,7 @@ const SNO_STATION_MEM_RELEASE_ANCHOR_URL = FIXED_EXTERNAL_VALUE_8;
|
|
|
5890
5890
|
const SNO_STATION_MEM_RELEASE_KEY_ID = FIXED_EXTERNAL_VALUE_9;
|
|
5891
5891
|
const SNO_STATION_MEM_RELEASE_ANCHOR_ATTEMPTS = 2;
|
|
5892
5892
|
const SNO_STATION_MEM_RELEASE_ANCHOR_RETRY_DELAY_MS = 50;
|
|
5893
|
-
const ALLOWED_HTTP_ENDPOINT_HOSTS = /* @__PURE__ */ new Set([
|
|
5894
|
-
"localhost",
|
|
5895
|
-
"127.0.0.1",
|
|
5896
|
-
"100.100.200.71"
|
|
5897
|
-
]);
|
|
5893
|
+
const ALLOWED_HTTP_ENDPOINT_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1"]);
|
|
5898
5894
|
function parsePresetId(preset) {
|
|
5899
5895
|
const [module, presetName] = preset.split("/");
|
|
5900
5896
|
if (!module || !presetName) throw new Error(`sno-station-mem llm-client: invalid LLMIx preset id "${preset}"`);
|
|
@@ -14851,7 +14847,7 @@ function isSafeInteger(value) {
|
|
|
14851
14847
|
/**
|
|
14852
14848
|
* The order key a row carries, or the one a row written before this change is treated as having.
|
|
14853
14849
|
*
|
|
14854
|
-
* A row from before
|
|
14850
|
+
* A row from before source order was persisted has no `source_order` until the maintenance pass backfills it, and an
|
|
14855
14851
|
* ordinary wave must keep running over such a store rather than throwing. Those rows are older
|
|
14856
14852
|
* than everything written since — that is what "written before" means — so they read as the
|
|
14857
14853
|
* lowest possible key: anything may close them, and they may close nothing.
|
|
@@ -17943,7 +17939,7 @@ function ensureChunkVecTable(db, vectorDim) {
|
|
|
17943
17939
|
return verified.dimension;
|
|
17944
17940
|
}
|
|
17945
17941
|
/**
|
|
17946
|
-
*
|
|
17942
|
+
* Loads the wangfenjin/simple SQLite
|
|
17947
17943
|
* tokenizer extension and registers its jieba dictionary path. Called once
|
|
17948
17944
|
* per connection, BEFORE migrations run, so 0006 can create the
|
|
17949
17945
|
* `nodix_memory_chunks_fts` virtual table with `tokenize='simple 0'`.
|
|
@@ -18066,7 +18062,7 @@ function ensureColumn(database, tableName, columnName, declaration) {
|
|
|
18066
18062
|
*/
|
|
18067
18063
|
const log$11 = createLogger("sno-station-mem:store");
|
|
18068
18064
|
/**
|
|
18069
|
-
*
|
|
18065
|
+
* Reflection v3: discriminator added to content-hash input when the
|
|
18070
18066
|
* row carries a `metadata.mappedKind`. Two rows with same projectId + same store
|
|
18071
18067
|
* category + same text but distinct mappedKinds (e.g. user-model vs
|
|
18072
18068
|
* agent-model both → category=preference) must coexist as distinct rows. The
|
|
@@ -26341,7 +26337,7 @@ function createEmbedder(config, stateDir) {
|
|
|
26341
26337
|
* @boundary Filesystem (JSONL/JSON write) and config constants surface.
|
|
26342
26338
|
* @see ../retrieval/retriever.ts, ../../config/index.ts.
|
|
26343
26339
|
*
|
|
26344
|
-
* Minimum-viable trace emission
|
|
26340
|
+
* Minimum-viable trace emission. Off by default; enabled by the
|
|
26345
26341
|
* eval harness via `EVAL_TRACE_ENABLED=true` (env or build constant) and a
|
|
26346
26342
|
* run-dir provided via `EVAL_TRACE_DIR` (env). Phase 0 instrumentation
|
|
26347
26343
|
* (MRR/Recall, gold-rank, miss classification) remains explicitly waived.
|
|
@@ -26904,7 +26900,7 @@ var TraceCollector = class {
|
|
|
26904
26900
|
* @boundary Types and defaults only; no ranking execution.
|
|
26905
26901
|
*/
|
|
26906
26902
|
/**
|
|
26907
|
-
* The serving-path validity default
|
|
26903
|
+
* The serving-path validity default. This is the one named code
|
|
26908
26904
|
* point that supplies it: reading the default here is what makes the
|
|
26909
26905
|
* invalidated-row filter a property of the serving path rather than a parameter
|
|
26910
26906
|
* every caller has to remember, and the omission is no longer silent.
|
|
@@ -26914,7 +26910,7 @@ var TraceCollector = class {
|
|
|
26914
26910
|
*
|
|
26915
26911
|
* Scope is the retriever, never the store layer: six write-side consumers (dedup,
|
|
26916
26912
|
* reflection loops, observability, the REM batch executor) call the store search
|
|
26917
|
-
* APIs directly and legitimately read invalidated rows.
|
|
26913
|
+
* APIs directly and legitimately read invalidated rows. Do not move this
|
|
26918
26914
|
* down a layer.
|
|
26919
26915
|
*/
|
|
26920
26916
|
function withServingValidityDefault(context) {
|
|
@@ -27946,7 +27942,7 @@ function getTierFloor(tier) {
|
|
|
27946
27942
|
}
|
|
27947
27943
|
}
|
|
27948
27944
|
/**
|
|
27949
|
-
* Multiplier formula
|
|
27945
|
+
* Multiplier formula + retention-
|
|
27950
27946
|
* scoring spec §62. Bounded to `[SEARCH_BOOST_MIN, 1.0]`; never amplifies,
|
|
27951
27947
|
* only suppresses, so existing scores are an upper bound after the stage.
|
|
27952
27948
|
*
|
|
@@ -30499,7 +30495,7 @@ function invalidWriterOperation(writer, row, successor) {
|
|
|
30499
30495
|
/**
|
|
30500
30496
|
* The order key a row carries, or the order it can still be given from what it has.
|
|
30501
30497
|
*
|
|
30502
|
-
*
|
|
30498
|
+
* Extraction persists `metadata.source_order` on every row extraction writes, and the maintenance pass
|
|
30503
30499
|
* backfills the rows written before it. Until that pass has run on a store, its rows have no key,
|
|
30504
30500
|
* and the wave still has to order them: a row's own content time is what it has, and that is what
|
|
30505
30501
|
* the executor compared before this change. Falling back to it keeps an unmigrated store working
|
|
@@ -31334,7 +31330,7 @@ async function buildRemReplaceCandidateQueue(input) {
|
|
|
31334
31330
|
* A profile or state row about a subject is paired with that subject's live profile and state rows
|
|
31335
31331
|
* by similarity alone, no floor: extraction files one fact under different categories, sections
|
|
31336
31332
|
* and attributes run to run, and a real correction pair scored 0.571 to 0.688, below any floor
|
|
31337
|
-
* that keeps unrelated rows out
|
|
31333
|
+
* that keeps unrelated rows out. Such a row still runs the threshold search, so a
|
|
31338
31334
|
* pair with a row outside that set keeps address and threshold pairing.
|
|
31339
31335
|
*/
|
|
31340
31336
|
function pairsBySubject(candidate) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_RECALL_TOKEN_BUDGET, MIN_RECALL_TOKEN_BUDGET } from "./internal/config/index.js";
|
|
2
|
-
import { o as readMemorySourceOrderOrOldest, r as compareMemorySourceOrder } from "./memory-source-order-
|
|
2
|
+
import { o as readMemorySourceOrderOrOldest, r as compareMemorySourceOrder } from "./memory-source-order-YMRoeDLd.js";
|
|
3
3
|
//#region src/engine/retrieval/recall-token-packer.ts
|
|
4
4
|
/** @file recall-token-packer.ts
|
|
5
5
|
* @purpose Packs recall rows into a character-estimated token budget without changing rank order.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { $ as appendAuditEntryStrict, r as enumerateRemCandidateScopes, tt as getAuditPath } from "./rem-batch-executor-
|
|
2
|
-
import {
|
|
1
|
+
import { $ as appendAuditEntryStrict, r as enumerateRemCandidateScopes, tt as getAuditPath } from "./rem-batch-executor-B4OoDBVK.js";
|
|
2
|
+
import { s as REM_SIDECAR_TOKEN_HEADER } from "./routes-DLHT__Ay.js";
|
|
3
|
+
import { d as getRemDiscoveryPath, o as REM_RUN_PATH, r as REM_CORRELATION_ID_HEADER, s as REM_SIDECAR_HOST } from "./config-CyH1VuJc.js";
|
|
3
4
|
import { createLogger } from "@snoai/utils/logger";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { z } from "zod";
|