@snoai/memory 1.2.3 → 1.2.5
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 +1 -1
- package/dist/{access-tracker-BNqlgChq.d.ts → access-tracker-gzQVC6ur.d.ts} +3 -3
- package/dist/{adapter-RxQ9CJ7f.js → adapter-CG-UbOjU.js} +1 -0
- package/dist/{adapter-J6IQ0rvr.d.ts → adapter-CMMmIzGe.d.ts} +2 -2
- package/dist/{agent-llm-port-5oXgBpzJ.d.ts → agent-llm-port-DY2290EK.d.ts} +2 -0
- package/dist/{atomic-memory-extraction-By0axKHc.js → atomic-memory-extraction-Dj5LX-e7.js} +28 -13
- package/dist/{atomic-memory-extraction-BT8lFE5t.d.ts → atomic-memory-extraction-vz2gIrqC.d.ts} +4 -4
- package/dist/{b-profile-section-dictionary-provider-DGtF4dB7.d.ts → b-profile-section-dictionary-provider-YawRtzNC.d.ts} +1 -1
- package/dist/{capture-policy-detector-CN3vfdNU.d.ts → capture-policy-detector-B9Gzx-1V.d.ts} +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +19 -2
- package/dist/{coding-skin-C7gwOKsc.js → coding-skin-_Qu3INZD.js} +37 -2
- package/dist/coding-skin.d.ts +37 -3
- package/dist/coding-skin.js +3 -3
- package/dist/{config-CyH1VuJc.js → config-BCZRhUvW.js} +62 -2
- package/dist/{derived-suppression-cache-BZdBZSdK.d.ts → derived-suppression-cache-CJuzDpoR.d.ts} +1 -1
- package/dist/diagnostic-encoder.js +1 -1
- package/dist/{embedding-provider-client-Q_hJonK9.js → embedding-provider-client-40tpzKou.js} +5 -1
- package/dist/{index-DtqgCT8u.d.ts → index-Dg3p5cmw.d.ts} +2 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +9 -9
- 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 +1 -1
- package/dist/internal/config/settings.d.ts +1 -1
- package/dist/internal/config/settings.js +1 -1
- package/dist/internal/config/skin-defaults.d.ts +3 -1
- package/dist/internal/config/skin-defaults.js +3 -1
- package/dist/internal/contract/profile.d.ts +1 -1
- package/dist/internal/contract/routes.d.ts +1 -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 +1 -1
- 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 +2 -2
- 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 +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.d.ts +6 -6
- 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 +1 -1
- 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/embedding-provider-client.js +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/adapter.js +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-embedder.js +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/runtime-diagnostics.d.ts +1 -1
- package/dist/internal/engine/observability/runtime-diagnostics.js +1 -1
- 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-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/retrieval/access-tracker.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.d.ts +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/engine/telemetry/observe-ledger.js +1 -1
- package/dist/internal/model/agent-llm-port.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/store/maintenance.d.ts +2 -2
- package/dist/internal/store/maintenance.js +31 -6
- package/dist/internal/store/store.d.ts +3 -3
- package/dist/internal/store/store.js +2 -2
- package/dist/{llm-client-BhkzlTnH.js → llm-client-BOkokxti.js} +1 -0
- package/dist/{llm-client-PC0yQuCq.d.ts → llm-client-BdS_IKvU.d.ts} +2 -1
- package/dist/{log-site-catalog.generated-NI-E9zjv.js → log-site-catalog.generated-6Yhsft4u.js} +160 -160
- package/dist/log-site-catalog.json +1 -1
- package/dist/{memory-kind-policy-DnHY7l0n.d.ts → memory-kind-policy-cIq80koH.d.ts} +1 -1
- package/dist/{memory-metadata-codec-DbrRyhCg.d.ts → memory-metadata-codec-DqmbQiE6.d.ts} +1 -1
- package/dist/{memory-runtime-BKBFbD1E.js → memory-runtime-CvxA1mP0.js} +247 -177
- package/dist/{memory-snapshot-shzK-0C8.d.ts → memory-snapshot-DBcnAnOn.d.ts} +2 -2
- package/dist/{memory-store-base-Dx6oSqiv.d.ts → memory-store-base-5tTeqT7l.d.ts} +2 -2
- package/dist/{memory-temporality-classifier-AetVby94.js → memory-temporality-classifier-C6MW_0i4.js} +1 -1
- package/dist/{memory-temporality-classifier-D91grvZ3.d.ts → memory-temporality-classifier-DztzPNxV.d.ts} +1 -1
- package/dist/{memory-tier-promoter-DzX7GMZ2.d.ts → memory-tier-promoter-Du9gPBxH.d.ts} +1 -1
- package/dist/{memory-tool-dependencies-4Vl4QwBY.js → memory-tool-dependencies-CiofG6Lj.js} +1 -1
- package/dist/memory-tool-dependencies-CrbtLLjj.d.ts +14 -0
- package/dist/{observable-embedder-rKGU0LqW.d.ts → observable-embedder-B7Si8IxG.d.ts} +1 -1
- package/dist/{observable-llm-client-Cw04DElM.d.ts → observable-llm-client-BD0_NE26.d.ts} +3 -3
- package/dist/{observable-memory-store-CHLQvW9E.d.ts → observable-memory-store-CHC6Dy1d.d.ts} +4 -4
- package/dist/{observable-retriever-DJKBEkBC.d.ts → observable-retriever-CTkpsSKo.d.ts} +5 -5
- package/dist/paths-BNJZ-i4I.d.ts +1 -0
- package/dist/{plugin-config-observe-schema-BORZ9_7q.js → plugin-config-observe-schema-ue9XxUj_.js} +2 -1
- package/dist/{plugin-config-schema-CCwv_K7R.d.ts → plugin-config-schema-B-Zve3i5.d.ts} +2 -2
- package/dist/{plugin-config-schema-CC-2N9Xw.js → plugin-config-schema-hIfZTELX.js} +1 -1
- package/dist/{profile-DbIDAmnc.d.ts → profile-8bUJR11P.d.ts} +1 -1
- package/dist/{profile-section-writer-BV605K78.js → profile-section-writer-DYcoa4ld.js} +2 -2
- package/dist/{reflection-command-hooks-h2CbYuXx.d.ts → reflection-command-hooks-BkbZyh-G.d.ts} +4 -4
- package/dist/{reflection-command-hooks-CTYkYqM3.js → reflection-command-hooks-_AiaIqap.js} +3 -3
- package/dist/{reflection-deps-MWVeBZcs.d.ts → reflection-deps-r8wTzFMJ.d.ts} +3 -3
- package/dist/{reflection-embedded-generator-D5OhLLVw.js → reflection-embedded-generator-B5K0O1sJ.js} +1 -1
- package/dist/{reflection-embedded-generator-Dk7sL8uy.d.ts → reflection-embedded-generator-BAsTsaVA.d.ts} +4 -4
- package/dist/{reflection-injection-hooks-B0fGkENX.d.ts → reflection-injection-hooks-Cn-VUTIN.d.ts} +4 -4
- package/dist/{reflection-lifecycle-hooks-Bg_JBS6c.d.ts → reflection-lifecycle-hooks-rCqXcF1o.d.ts} +3 -3
- package/dist/rem-batch-executor-Dpysz3or.js +2 -0
- package/dist/{rem-batch-executor-vssXCmmE.js → rem-trigger-DiHK3BKP.js} +881 -138
- package/dist/{retriever-CXeB7-A2.d.ts → retriever-CI0r-RAK.d.ts} +6 -6
- package/dist/{runtime-audit-log-CIYiNvwf.d.ts → runtime-audit-log-B_tsjFZl.d.ts} +1 -1
- package/dist/{server-BkDfjx4w.js → server-0KpYuZ69.js} +16 -22
- package/dist/sidecar/main.js +2 -3
- package/dist/sno-station-mem-runtime-dependencies-eO6jFEYJ.d.ts +31 -0
- package/dist/{sno-station-mem-runtime-dependencies-DEdpOj7z.js → sno-station-mem-runtime-dependencies-jmuWbSfR.js} +6 -6
- package/dist/{store-D3n1P7Xn.js → store-B81Qk2RF.js} +13 -2
- package/dist/{store-Dbo7MIzt.d.ts → store-h8QmkTwl.d.ts} +8 -2
- package/dist/{strategy-hook-runner-C6qUCnzY.d.ts → strategy-hook-runner-C3WFg1oP.d.ts} +7 -7
- package/dist/{strategy-hook-runner-CHpG8vXD.js → strategy-hook-runner-CD5X8gs3.js} +1 -1
- package/dist/{types-DvQ6nTNC.d.ts → types-Dcr6GKHy.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/memory-tool-dependencies-BGFjBpkG.d.ts +0 -14
- package/dist/paths-DHU342hf.d.ts +0 -1
- package/dist/rem-batch-executor-_J7QoDuG.js +0 -2
- package/dist/rem-trigger-BZBf_rmt.js +0 -730
- package/dist/routes-DLHT__Ay.js +0 -60
- package/dist/sno-station-mem-runtime-dependencies-DjA-KpD8.d.ts +0 -31
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { h as MemoryCategory, l as DecayScore, r as AggregationQuery, u as DecayableMemory, x as RetrievalResult, y as MemorySearchResult } from "./types-
|
|
1
|
+
import { h as MemoryCategory, l as DecayScore, r as AggregationQuery, u as DecayableMemory, x as RetrievalResult, y as MemorySearchResult } from "./types-Dcr6GKHy.js";
|
|
2
2
|
import { sn as RecallLifecycleConfig } from "./index-DL8AVj0Z.js";
|
|
3
3
|
import { t as Embedder } from "./embedding-provider-client-vynZMuit.js";
|
|
4
4
|
import "./trace-C1JxMfs-.js";
|
|
5
|
-
import "./memory-metadata-codec-
|
|
5
|
+
import "./memory-metadata-codec-DqmbQiE6.js";
|
|
6
6
|
import { K as RemFacetPolicy } from "./index-BO4RU_mc.js";
|
|
7
|
-
import { C as MemoryStore } from "./memory-store-base-
|
|
8
|
-
import "./store-
|
|
9
|
-
import { n as AccessTracker } from "./access-tracker-
|
|
10
|
-
import { r as TierPromoter } from "./memory-tier-promoter-
|
|
7
|
+
import { C as MemoryStore } from "./memory-store-base-5tTeqT7l.js";
|
|
8
|
+
import "./store-h8QmkTwl.js";
|
|
9
|
+
import { n as AccessTracker } from "./access-tracker-gzQVC6ur.js";
|
|
10
|
+
import { r as TierPromoter } from "./memory-tier-promoter-Du9gPBxH.js";
|
|
11
11
|
import "@snoai/utils/logger";
|
|
12
12
|
//#region src/engine/retrieval/retrieval-trace.d.ts
|
|
13
13
|
/** @file retrieval-trace.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./paths-
|
|
1
|
+
import "./paths-BNJZ-i4I.js";
|
|
2
2
|
//#region src/engine/operations/runtime-audit-log.d.ts
|
|
3
3
|
type AuditEvent = "tool_call" | "hook_trigger" | "kill_switch" | "startup" | "error" | "auto_recall" | "ambient_learning" | "session_summary" | "envelope_strip" | "storage_integrity" | "memory_injected" | "memory_searched" | "memory_read" | "memory_updated" | "memory_superseded" | "memory_deleted" | "memory_purged" | "rem_trigger_evaluated" | "rem_triggered" | "rem_completed" | "rem_failed";
|
|
4
4
|
type AuditStatus = "ok" | "error" | "skipped" | "partial";
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as remNeedsHost, r as ContractError } from "./rem-trigger-BZBf_rmt.js";
|
|
1
|
+
import { Et as ModelCallRefusedError, G as parseRemOperationType, W as REM_BUILT_OPERATION_TYPES, ct as readJsonlLines, it as getAuditPath, n as remNeedsHost, nt as appendAuditEntryStrict } from "./rem-trigger-DiHK3BKP.js";
|
|
2
|
+
import { Ar as MEMORY_ERROR_STATUS, C as getSnoStationMemStateDir, Fr as memoryMethod, Mr as MEMORY_ROUTES, Nr as MEMORY_SKIN_HEADER, S as getSidecarSocketPath, _ as readRemTestHoldMs, c as REM_SIDECAR_ORIGIN, d as getRemDiscoveryPath, f as getRemJobJournalPath, g as readRemOperationalConfig, i as REM_JOBS_PATH_PREFIX, kr as MEMORY_DEFAULT_SKIN_ID, l as REM_SOURCE, nr as MEMORY_SHUTDOWN_TIMEOUT_MS, r as REM_CORRELATION_ID_HEADER, s as REM_SIDECAR_HOST, u as getRemChassisJournalPath, v as SettingsUnavailableError, y as getDiscoveryPath } from "./config-BCZRhUvW.js";
|
|
3
|
+
import { t as ContractError } from "./error-D-wb-rZw.js";
|
|
5
4
|
import { setImmediate } from "node:timers/promises";
|
|
6
5
|
import { createLogger, currentLogContext, effectiveLogLevel, emitDiagnostic } from "@snoai/utils/logger";
|
|
7
6
|
import path from "node:path";
|
|
8
|
-
import { existsSync, readFileSync, rmSync } from "node:fs";
|
|
7
|
+
import { constants, existsSync, readFileSync, rmSync } from "node:fs";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
11
10
|
import { mkdir, open, readFile, rename, rm } from "node:fs/promises";
|
|
12
11
|
import { withLogContext as withLogContext$1 } from "@snoai/utils/log-context";
|
|
13
|
-
import { createServer } from "node:
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
12
|
+
import { createConnection, createServer } from "node:net";
|
|
13
|
+
import { createServer as createServer$1 } from "node:http";
|
|
14
|
+
import { tryLock } from "fs-native-extensions";
|
|
16
15
|
//#region src/contract/discovery.ts
|
|
17
16
|
const discoverySchema = z.strictObject({
|
|
18
17
|
pid: z.number().int().positive(),
|
|
@@ -574,16 +573,10 @@ async function bindSidecarSocket() {
|
|
|
574
573
|
recursive: true,
|
|
575
574
|
mode: 448
|
|
576
575
|
});
|
|
577
|
-
const
|
|
576
|
+
const lock = await open(`${socketPath}.lock`, constants.O_RDWR | constants.O_CREAT | constants.O_NOFOLLOW, 384);
|
|
578
577
|
try {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
break;
|
|
582
|
-
} catch (error) {
|
|
583
|
-
if (!(error instanceof Error && "code" in error && error.code === "EAGAIN")) throw error;
|
|
584
|
-
await setImmediate();
|
|
585
|
-
}
|
|
586
|
-
const guard = createServer$1((socket) => socket.destroy());
|
|
578
|
+
while (!tryLock(lock.fd)) await setImmediate();
|
|
579
|
+
const guard = createServer((socket) => socket.destroy());
|
|
587
580
|
for (;;) try {
|
|
588
581
|
await new Promise((resolve, reject) => {
|
|
589
582
|
guard.once("error", reject);
|
|
@@ -608,7 +601,7 @@ async function bindSidecarSocket() {
|
|
|
608
601
|
await rm(socketPath, { force: true });
|
|
609
602
|
}
|
|
610
603
|
} finally {
|
|
611
|
-
await
|
|
604
|
+
await lock.close();
|
|
612
605
|
}
|
|
613
606
|
}
|
|
614
607
|
async function startRemSidecar() {
|
|
@@ -650,7 +643,7 @@ async function startOwnedRemSidecar() {
|
|
|
650
643
|
async open() {
|
|
651
644
|
if (currentMemory) return currentMemory;
|
|
652
645
|
if (settingsError) throw settingsError;
|
|
653
|
-
openingMemory ??= import("./memory-runtime-
|
|
646
|
+
openingMemory ??= import("./memory-runtime-CvxA1mP0.js").then((module) => module.MemoryRuntimePool.open()).then((pool) => {
|
|
654
647
|
currentMemory = pool;
|
|
655
648
|
if (stopping) pool.stopTimers();
|
|
656
649
|
return pool;
|
|
@@ -687,7 +680,7 @@ async function startOwnedRemSidecar() {
|
|
|
687
680
|
};
|
|
688
681
|
const activeTasks = /* @__PURE__ */ new Set();
|
|
689
682
|
const pendingRequests = /* @__PURE__ */ new Set();
|
|
690
|
-
const server = createServer((request, response) => {
|
|
683
|
+
const server = createServer$1((request, response) => {
|
|
691
684
|
const started = performance.now();
|
|
692
685
|
const operationId = `rem-http-${randomUUID()}`;
|
|
693
686
|
const context = {};
|
|
@@ -1019,7 +1012,8 @@ async function runChassisJob(store, journal, waveId, holdMs, runtime) {
|
|
|
1019
1012
|
});
|
|
1020
1013
|
let writesApplied = false;
|
|
1021
1014
|
try {
|
|
1022
|
-
|
|
1015
|
+
const host = runtime.connectedRemPort();
|
|
1016
|
+
if (remNeedsHost(runtime.config.mode, runtime.settings.modelCalls) && !(host && await (host.reachable?.() ?? true))) {
|
|
1023
1017
|
await skipNonTerminalJob(store, queued.job_id, "no host model connected");
|
|
1024
1018
|
return;
|
|
1025
1019
|
}
|
|
@@ -1044,7 +1038,7 @@ async function runChassisJob(store, journal, waveId, holdMs, runtime) {
|
|
|
1044
1038
|
cleanRefusalReasons.push(reason);
|
|
1045
1039
|
await appendChassisRefusal(journal, queued, operation, "refused", reason);
|
|
1046
1040
|
}
|
|
1047
|
-
const { runRemProductionOrderedWave } = await import("./rem-batch-executor-
|
|
1041
|
+
const { runRemProductionOrderedWave } = await import("./rem-batch-executor-Dpysz3or.js");
|
|
1048
1042
|
const result = enabledOperations.length === 0 ? {
|
|
1049
1043
|
decision: "allow",
|
|
1050
1044
|
reasonCode: null,
|
package/dist/sidecar/main.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as isRemTraceEnabled, p as getRemTraceLogPath, v as SettingsUnavailableError } from "../config-CyH1VuJc.js";
|
|
1
|
+
import { jr as MEMORY_RECONNECT_INTERVAL_MS, m as isRemTraceEnabled, p as getRemTraceLogPath, v as SettingsUnavailableError } from "../config-BCZRhUvW.js";
|
|
3
2
|
import { setTimeout } from "node:timers/promises";
|
|
4
3
|
import { addLogFileTarget, closeLogger, createLogger } from "@snoai/utils/logger";
|
|
5
4
|
//#region src/sidecar/main.ts
|
|
@@ -7,7 +6,7 @@ import { addLogFileTarget, closeLogger, createLogger } from "@snoai/utils/logger
|
|
|
7
6
|
* @purpose Boots the standalone local REM sidecar process.
|
|
8
7
|
* @boundary Process environment, sidecar lifecycle, and local request-log destination.
|
|
9
8
|
*/
|
|
10
|
-
const { startRemSidecar, DuplicateSidecarError } = await import("../server-
|
|
9
|
+
const { startRemSidecar, DuplicateSidecarError } = await import("../server-0KpYuZ69.js");
|
|
11
10
|
let sidecar;
|
|
12
11
|
while (!sidecar) try {
|
|
13
12
|
sidecar = await startRemSidecar();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "./types-Dcr6GKHy.js";
|
|
2
|
+
import "./index-DL8AVj0Z.js";
|
|
3
|
+
import "./adapter-CMMmIzGe.js";
|
|
4
|
+
import "./embedding-provider-client-vynZMuit.js";
|
|
5
|
+
import "./retriever-CI0r-RAK.js";
|
|
6
|
+
import "./connection-3IVXpuPE.js";
|
|
7
|
+
import "./sqlite-runtime-L_ywirTm.js";
|
|
8
|
+
import "./store-h8QmkTwl.js";
|
|
9
|
+
import "./access-tracker-gzQVC6ur.js";
|
|
10
|
+
import "./memory-tier-promoter-Du9gPBxH.js";
|
|
11
|
+
import "./capture-policy-detector-B9Gzx-1V.js";
|
|
12
|
+
import "./memory-temporality-classifier-DztzPNxV.js";
|
|
13
|
+
import "./runtime-audit-log-B_tsjFZl.js";
|
|
14
|
+
import "./atomic-memory-extraction-vz2gIrqC.js";
|
|
15
|
+
import "./llm-client-BdS_IKvU.js";
|
|
16
|
+
import "./memory-snapshot-DBcnAnOn.js";
|
|
17
|
+
import "./observable-embedder-B7Si8IxG.js";
|
|
18
|
+
import "./observable-llm-client-BD0_NE26.js";
|
|
19
|
+
import "./observable-memory-store-CHC6Dy1d.js";
|
|
20
|
+
import "./observable-retriever-CTkpsSKo.js";
|
|
21
|
+
import "./reflection-embedded-generator-BAsTsaVA.js";
|
|
22
|
+
import "./strategy-hook-runner-C3WFg1oP.js";
|
|
23
|
+
import "./data-bootstrap-Bl3lthzE.js";
|
|
24
|
+
import "@snoai/sqlite-crypto";
|
|
25
|
+
//#region src/engine/bindings/sno-station-mem-runtime-dependencies.d.ts
|
|
26
|
+
/** Legacy parameters carry only an unused logger slot; no host operations are exposed. */
|
|
27
|
+
type SnoStationMemPluginApi = {
|
|
28
|
+
logger: unknown;
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { SnoStationMemPluginApi as t };
|
|
@@ -3,17 +3,17 @@ import "./internal/engine/i18n/locales.js";
|
|
|
3
3
|
import "./internal/engine/shared/types.js";
|
|
4
4
|
import "./internal/engine/security/redact.js";
|
|
5
5
|
import "./internal/engine/shared/utils.js";
|
|
6
|
-
import "./llm-client-
|
|
6
|
+
import "./llm-client-BOkokxti.js";
|
|
7
7
|
import "./capture-policy-detector-DaMfy9CZ.js";
|
|
8
8
|
import "./ambient-learning-text-normalizer-CxjATmMp.js";
|
|
9
|
-
import "./memory-temporality-classifier-
|
|
9
|
+
import "./memory-temporality-classifier-C6MW_0i4.js";
|
|
10
10
|
import "./runtime-audit-log-BCeujlEp.js";
|
|
11
11
|
import "./scopes-CSOn6zdd.js";
|
|
12
|
-
import "./atomic-memory-extraction-
|
|
12
|
+
import "./atomic-memory-extraction-Dj5LX-e7.js";
|
|
13
13
|
import "./internal/store/sqlite-runtime.js";
|
|
14
14
|
import "./connection-C9YD5sgm.js";
|
|
15
15
|
import "./internal/store/data-paths.js";
|
|
16
|
-
import "./adapter-
|
|
16
|
+
import "./adapter-CG-UbOjU.js";
|
|
17
17
|
import "./internal/engine/observability/memory-snapshot.js";
|
|
18
18
|
import "./internal/engine/observability/observable-embedder.js";
|
|
19
19
|
import "./internal/engine/observability/observable-llm-client.js";
|
|
@@ -23,8 +23,8 @@ import "./retriever-ZoLvPRHq.js";
|
|
|
23
23
|
import "./internal/engine/observability/observable-retriever.js";
|
|
24
24
|
import "./internal/engine/observability/session-registry.js";
|
|
25
25
|
import "./daily-log-generator-CH_KuWHs.js";
|
|
26
|
-
import "./reflection-embedded-generator-
|
|
27
|
-
import "./strategy-hook-runner-
|
|
26
|
+
import "./reflection-embedded-generator-B5K0O1sJ.js";
|
|
27
|
+
import "./strategy-hook-runner-CD5X8gs3.js";
|
|
28
28
|
import "./data-bootstrap-P8sie9WA.js";
|
|
29
29
|
import "@snoai/sqlite-crypto";
|
|
30
30
|
export {};
|
|
@@ -8,7 +8,7 @@ import { normalizeForCompare, tokenizeForFts } from "./internal/engine/shared/i1
|
|
|
8
8
|
import { bytesToF32, clamp01, clampInt, f32ToBytes, sanitizeFtsConjunctiveQuery, sanitizeFtsQuery, stableHash } from "./internal/engine/shared/utils.js";
|
|
9
9
|
import { t as checkMemoryOperation } from "./operation-cancellation-CTKWwNHk.js";
|
|
10
10
|
import "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
11
|
-
import "./memory-temporality-classifier-
|
|
11
|
+
import "./memory-temporality-classifier-C6MW_0i4.js";
|
|
12
12
|
import { l as runWithMemoryAudit } from "./runtime-audit-log-BCeujlEp.js";
|
|
13
13
|
import { getSnoStationMemStateDir } from "./internal/contract/profile.js";
|
|
14
14
|
import { a as readMemorySourceOrder, i as readCorrectionMoment, n as compareMemoryRetirementOrder, o as readMemorySourceOrderOrOldest, r as compareMemorySourceOrder, s as sameSourceTurn, t as closeMemoryRow } from "./memory-source-order-YMRoeDLd.js";
|
|
@@ -755,6 +755,14 @@ Object.assign(MemoryStore.prototype, { walkMemoryRelations(input) {
|
|
|
755
755
|
* @purpose Persists atomic extraction chunk state and bounded reprocess repairs.
|
|
756
756
|
* @boundary Serial chunk lifecycle and transaction completion only; no model calls or extraction.
|
|
757
757
|
*/
|
|
758
|
+
/** Another capture of the same turn completed this chunk while this one was still running; its rows are written. */
|
|
759
|
+
var AtomicExtractionCompletedElsewhere = class extends StorageError {
|
|
760
|
+
entry;
|
|
761
|
+
constructor(entry, message) {
|
|
762
|
+
super(message);
|
|
763
|
+
this.entry = entry;
|
|
764
|
+
}
|
|
765
|
+
};
|
|
758
766
|
const SELECT_LEDGER_ROW = `
|
|
759
767
|
SELECT
|
|
760
768
|
conversation_id AS conversationId,
|
|
@@ -924,6 +932,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
924
932
|
validateKey(key);
|
|
925
933
|
assertTimestamp(nowMs);
|
|
926
934
|
const entry = readEntry(this, key);
|
|
935
|
+
if (entry.state === "complete") throw new AtomicExtractionCompletedElsewhere(entry, "Cannot record calls from atomic extraction state 'complete'");
|
|
927
936
|
if (entry.state !== "open" && entry.state !== "calls_recorded") throw new StorageError(`Cannot record calls from atomic extraction state '${entry.state}'`);
|
|
928
937
|
this.sqlite.prepare(`
|
|
929
938
|
UPDATE nodix_atomic_extraction_ledger
|
|
@@ -936,6 +945,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
936
945
|
assertTimestamp(nowMs);
|
|
937
946
|
if (runParameters !== void 0) validateRunParameters(runParameters);
|
|
938
947
|
const entry = readEntry(this, key);
|
|
948
|
+
if (entry.state === "complete") throw new AtomicExtractionCompletedElsewhere(entry, "Cannot pend atomic extraction from state 'complete'");
|
|
939
949
|
if (entry.state !== "calls_recorded") throw new StorageError(`Cannot pend atomic extraction from state '${entry.state}'`);
|
|
940
950
|
this.sqlite.prepare(`
|
|
941
951
|
UPDATE nodix_atomic_extraction_ledger
|
|
@@ -987,6 +997,7 @@ Object.assign(MemoryStore.prototype, {
|
|
|
987
997
|
assertTimestamp(nowMs);
|
|
988
998
|
return this.sqlite.transaction(() => {
|
|
989
999
|
const entry = readEntry(this, key);
|
|
1000
|
+
if (entry.state === "complete") throw new AtomicExtractionCompletedElsewhere(entry, "Cannot complete atomic extraction from state 'complete'");
|
|
990
1001
|
if (entry.state !== "calls_recorded") throw new StorageError(`Cannot complete atomic extraction from state '${entry.state}'`);
|
|
991
1002
|
if (isPromiseLike(write(this.sqlite))) throw new StorageError("Atomic extraction completion callback must be synchronous");
|
|
992
1003
|
this.sqlite.prepare(`
|
|
@@ -5827,4 +5838,4 @@ Object.assign(MemoryStore.prototype, {
|
|
|
5827
5838
|
}
|
|
5828
5839
|
});
|
|
5829
5840
|
//#endregion
|
|
5830
|
-
export {
|
|
5841
|
+
export { TaskLifecycleCommandCollisionError as C, TaskLifecycleTimestampCollisionError as E, StaleSupersedeTargetError as S, TaskLifecycleStateCollisionError as T, hashMemorySuppressionContent as _, resolveTaskLifecycle as a, normalizeMemoryRelationPredicate as b, buildTaskLifecycleCommandClaim as c, normalizeEntityName as d, recordAtomicEntityIdentityJournal as f, readAtomicArrivalRetirementCandidateSet as g, journalAtomicArrivalRetirementRefusal as h, findUniqueActiveTaskByDescription as i, resolveTaskLifecycleEffectiveTime as l, closeAtomicArrivalRetirementTargets as m, acceptsTaskLifecycleJudgment as n, taskLifecycleCandidateSetVersion as o, ATOMIC_FACT_SURFACE_LANE as p, buildTaskLifecycleCandidateSet as r, admitTaskLifecycleAssertion as s, buildTaskLifecycleMigrationManifest as t, listAtomicMemoryEntityCandidates as u, AtomicExtractionCompletedElsewhere as v, TaskLifecycleStaleResolutionError as w, MemoryStore as x, repairAtomicExtractionParameters as y };
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import "./embedding-provider-client-vynZMuit.js";
|
|
2
|
-
import { B as TaskLifecycleMigrationManifest, H as TaskLifecycleMigrationSourceRow, a as AtomicExtractionRepairStrategy, c as AtomicExtractionRunParameters, o as AtomicExtractionReprocessBounds, s as AtomicExtractionReprocessReason, x as MemoryRelationPredicate, z as TaskLifecycleMigrationCensusRow } from "./memory-store-base-
|
|
2
|
+
import { B as TaskLifecycleMigrationManifest, H as TaskLifecycleMigrationSourceRow, a as AtomicExtractionRepairStrategy, c as AtomicExtractionRunParameters, n as AtomicExtractionLedgerEntry, o as AtomicExtractionReprocessBounds, s as AtomicExtractionReprocessReason, x as MemoryRelationPredicate, z as TaskLifecycleMigrationCensusRow } from "./memory-store-base-5tTeqT7l.js";
|
|
3
|
+
import { a as StorageError } from "./errors-CeVRxf9V.js";
|
|
3
4
|
import "./sqlite-runtime-L_ywirTm.js";
|
|
4
5
|
//#region src/store/memory-store-relation-api.d.ts
|
|
5
6
|
declare function normalizeMemoryRelationPredicate(predicate: string): MemoryRelationPredicate;
|
|
6
7
|
//#endregion
|
|
7
8
|
//#region src/store/memory-store-atomic-extraction-ledger-api.d.ts
|
|
9
|
+
/** Another capture of the same turn completed this chunk while this one was still running; its rows are written. */
|
|
10
|
+
declare class AtomicExtractionCompletedElsewhere extends StorageError {
|
|
11
|
+
readonly entry: AtomicExtractionLedgerEntry;
|
|
12
|
+
constructor(entry: AtomicExtractionLedgerEntry, message: string);
|
|
13
|
+
}
|
|
8
14
|
declare function repairAtomicExtractionParameters(reason: AtomicExtractionReprocessReason, parameters: AtomicExtractionRunParameters, bounds: AtomicExtractionReprocessBounds): {
|
|
9
15
|
strategy: AtomicExtractionRepairStrategy;
|
|
10
16
|
parameters: AtomicExtractionRunParameters;
|
|
@@ -24,4 +30,4 @@ declare function buildTaskLifecycleMigrationManifest(input: {
|
|
|
24
30
|
inputStoreHash: string;
|
|
25
31
|
}): TaskLifecycleMigrationManifest;
|
|
26
32
|
//#endregion
|
|
27
|
-
export {
|
|
33
|
+
export { repairAtomicExtractionParameters as a, AtomicExtractionCompletedElsewhere as i, ATOMIC_FACT_SURFACE_LANE as n, normalizeMemoryRelationPredicate as o, hashMemorySuppressionContent as r, buildTaskLifecycleMigrationManifest as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import "./types-
|
|
3
|
-
import "./reflection-embedded-generator-
|
|
4
|
-
import { t as ReflectionLifecycleParams } from "./reflection-lifecycle-hooks-
|
|
5
|
-
import { t as ReflectionInjectionParams } from "./reflection-injection-hooks-
|
|
6
|
-
import { t as ReflectionDeps } from "./reflection-deps-
|
|
7
|
-
import { t as ReflectionCommandParams } from "./reflection-command-hooks-
|
|
1
|
+
import { t as PluginConfig } from "./plugin-config-schema-B-Zve3i5.js";
|
|
2
|
+
import "./types-Dcr6GKHy.js";
|
|
3
|
+
import "./reflection-embedded-generator-BAsTsaVA.js";
|
|
4
|
+
import { t as ReflectionLifecycleParams } from "./reflection-lifecycle-hooks-rCqXcF1o.js";
|
|
5
|
+
import { t as ReflectionInjectionParams } from "./reflection-injection-hooks-Cn-VUTIN.js";
|
|
6
|
+
import { t as ReflectionDeps } from "./reflection-deps-r8wTzFMJ.js";
|
|
7
|
+
import { t as ReflectionCommandParams } from "./reflection-command-hooks-BkbZyh-G.js";
|
|
8
8
|
//#region src/engine/reflection/strategy-hook-runner.d.ts
|
|
9
9
|
declare function createReflectionStrategyState(config: PluginConfig, deps: ReflectionDeps): ReflectionStrategyState;
|
|
10
10
|
type ReflectionStrategyState = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_REFLECTION_SESSION_TTL_MS } from "./internal/config/index.js";
|
|
2
2
|
import { setLruEntry, touchLruEntry } from "./internal/engine/shared/lru.js";
|
|
3
3
|
import { n as createErrorSignalTracker } from "./error-signals-lMH2uAdV.js";
|
|
4
|
-
import { i as pruneReflectionState } from "./reflection-embedded-generator-
|
|
4
|
+
import { i as pruneReflectionState } from "./reflection-embedded-generator-B5K0O1sJ.js";
|
|
5
5
|
import { a as loadAgentReflectionSlicesFromEntries } from "./memory-entry-projector-DHo8jH10.js";
|
|
6
6
|
import { createLogger } from "@snoai/utils/logger";
|
|
7
7
|
//#region src/engine/reflection/reflection-slice-loader.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snoai/memory",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": { "access": "public" },
|
|
6
6
|
"repository": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@snoai/embedder": "^1.1.0",
|
|
93
93
|
"@snoai/llmix": "2.2.0",
|
|
94
94
|
"@snoai/mda-config": "^1.1.2",
|
|
95
|
-
"@snoai/observability": "^1.2.
|
|
95
|
+
"@snoai/observability": "^1.2.2",
|
|
96
96
|
"@snoai/sqlite-crypto": "^1.1.2",
|
|
97
97
|
"@snoai/utils": "^1.1.0",
|
|
98
98
|
"argon2": "^0.45.1",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"tar": "^7.4.3",
|
|
110
110
|
"uuid": "^14.0.0",
|
|
111
111
|
"zod": "^4.5.4",
|
|
112
|
-
"fs-
|
|
112
|
+
"fs-native-extensions": "^1.5.1"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@babel/parser": "^7.29.8",
|
|
@@ -1,14 +0,0 @@
|
|
|
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 };
|
package/dist/paths-DHU342hf.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./profile-DbIDAmnc.js";
|