@snoai/memory 1.2.10 → 1.2.11
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/diagnostic-encoder.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -4
- package/dist/internal/engine/bindings/memory-cli-shared.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-recall-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-tool-access.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-results.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.js +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.d.ts +2 -2
- 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 +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-message-transcript.js +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-reset-hook.d.ts +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +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.js +1 -1
- package/dist/internal/engine/retrieval/retriever.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.js +1 -1
- package/dist/internal/store/maintenance.js +1 -1
- package/dist/{log-site-catalog.generated-C9RmyAA0.js → log-site-catalog.generated-Dzgj9o5c.js} +13 -13
- package/dist/log-site-catalog.json +1 -1
- package/dist/{memory-runtime-HibOMCFa.js → memory-runtime-C8ZIW2WL.js} +24 -18
- package/dist/{memory-tool-dependencies--SrMdT3P.d.ts → memory-tool-dependencies-CWnD5mia.d.ts} +1 -1
- package/dist/{observable-retriever-BZpdv93Y.d.ts → observable-retriever-bJbG9WtJ.d.ts} +1 -1
- package/dist/{rem-batch-executor-8x4FBLtW.js → rem-batch-executor-DbV8Y-B-.js} +1 -1
- package/dist/{rem-consumer-retrieval-CR0dtcHR.js → rem-consumer-retrieval-CDMSCJYI.js} +2 -1
- package/dist/{rem-trigger-DmRERTNH.js → rem-trigger-BSrGyG0s.js} +2 -2
- package/dist/{retriever-BXQmJMh0.js → retriever-Bzz6H8Mn.js} +2 -2
- package/dist/{retriever-BpxV-0fB.d.ts → retriever-DyxY59Lg.d.ts} +2 -0
- package/dist/{server-CCduS_Ea.js → server-CjwHZY1P.js} +3 -3
- package/dist/sidecar/main.js +1 -1
- package/dist/{sno-station-mem-runtime-dependencies-AdFFr3bU.d.ts → sno-station-mem-runtime-dependencies-BZjUo6Jr.d.ts} +2 -2
- package/dist/{sno-station-mem-runtime-dependencies-CexFtaY6.js → sno-station-mem-runtime-dependencies-DlvM6mL7.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as renderAdapterAChatPrompt, $t as MEMORY_CATEGORIES, A as journalAtomicArrivalRetirementRefusal, B as StaleSupersedeTargetError, Bt as debugContentPreview, C as buildTaskLifecycleCommandClaim, Cn as withMemoryOperation, Ct as withProviderResponses, D as normalizeEntityName, E as listAtomicMemoryEntityCandidates, Et as appendAuditEntry, F as normalizeTopicToSectionName, Ft as CODING_SKIN_LEDGER_MAX_CHARS, G as loadSqliteVecExtension, Gt as redactSecrets, H as validateMemoryTelemetryMetadata, Ht as stripHtmlTags, I as getSnoStationMemDataDir, It as CODING_SKIN_SESSION_QUERY, J as adapterAViewFromRecord, Jt as stringifyInsightMetadata, Kt as buildInsightMetadata, L as AtomicExtractionCompletedElsewhere, Lt as HOST_MODEL_DEADLINE_HEADER, M as recordTokenCounter, Mt as runWithMemoryAuditSync, N as canExtractorWrite, Nt as runWithMutationAttempt, O as recordAtomicEntityIdentityJournal, P as canonicalizeProfileSectionName, Q as prospectiveProfileView, Qt as AGGREGATION_OPERATIONS, R as normalizeMemoryRelationPredicate, Rt as clamp01, S as admitTaskLifecycleAssertion, Sn as memoryOperationSignal, St as isTerminalLlmFailure, T as resolveHookAgentId, Tt as isTerminalLlmFailure$1, U as randomUUID$1, Ut as stripRoleLabelPrefix, V as TaskLifecycleStaleResolutionError, Vt as stableHash, W as readChunkVecTableState, Wt as truncateGraphemes, X as orderAdapterAPair, Xt as parseIsoDateTimeMs, Y as isAdapterAVerdictReply, Yt as normalizeIsoDateTimeString, Z as parseAdapterAChatVerdict, Zt as deriveFactKey, _ as acceptsTaskLifecycleJudgment, _n as initSqliteRuntime, _t as createScopePolicy, an as atomicExtractionSkillReference, at as resolveMemoryDate, b as resolveTaskLifecycle, bn as checkMemoryOperation, cn as state_vocabulary_default, ct as buildIndexedText, dn as calendarInstructionSchema, dt as ALL_RESOURCES, en as normalizeCategory, et as renderAdapterAPrompt, fn as isCalendarLabel, ft as RESOURCES_BY_LOCALE, g as Embedder, gn as isMemoryTelemetryEventType, gt as MemoryScopePolicy, h as AccessTracker, hn as MEMORY_TELEMETRY_DELETE_REASONS, ht as StorageError, in as ATOMIC_EXTRACTION_SKILL_HASH, it as serializeIntervalMetadata, j as readAtomicArrivalRetirementCandidateSet, jt as runWithMemoryAudit, k as closeAtomicArrivalRetirementTargets, kt as currentMutationAttemptId, ln as relations, lt as stripEnvelopeMetadata, m as DEFAULT_RETRIEVAL_CONFIG, mn as attribute_dictionary_default, mt as SnoStationMemError, nn as resolveLlmRoute, nt as readMemorySourceOrderOrOldest, on as modelReplyJsonCandidates, ot as unresolvedMemoryDate, p as MemoryRetriever, pn as sessionZoneCarriedBy, pt as RetrievalError, qt as parseInsightMetadata, rn as ATOMIC_EXTRACTION_SKILL, rt as parseSessionTimestamp, sn as readModelReplyJson, st as boundSectionContent, t as evaluateRemAutomaticTriggers, tn as pickLlmRoutingConfig, tt as compareMemorySourceOrder, un as calculateCalendarTime, ut as normalizeAmbientLearningText, v as buildTaskLifecycleCandidateSet, vn as openSqliteDatabase, vt as parseAgentIdFromSessionKey, w as resolveTaskLifecycleEffectiveTime, wn as forwardObserveLedgerUntilIdle, wt as classifyLlmFailure, x as taskLifecycleCandidateSetVersion, xn as memoryFileWrite, xt as createLlmClient, y as findUniqueActiveTaskByDescription, yn as openSqliteDatabaseReadonly, yt as LlmClientTerminalError, z as MemoryStore, zt as clampInt } from "./rem-trigger-
|
|
1
|
+
import { $ as renderAdapterAChatPrompt, $t as MEMORY_CATEGORIES, A as journalAtomicArrivalRetirementRefusal, B as StaleSupersedeTargetError, Bt as debugContentPreview, C as buildTaskLifecycleCommandClaim, Cn as withMemoryOperation, Ct as withProviderResponses, D as normalizeEntityName, E as listAtomicMemoryEntityCandidates, Et as appendAuditEntry, F as normalizeTopicToSectionName, Ft as CODING_SKIN_LEDGER_MAX_CHARS, G as loadSqliteVecExtension, Gt as redactSecrets, H as validateMemoryTelemetryMetadata, Ht as stripHtmlTags, I as getSnoStationMemDataDir, It as CODING_SKIN_SESSION_QUERY, J as adapterAViewFromRecord, Jt as stringifyInsightMetadata, Kt as buildInsightMetadata, L as AtomicExtractionCompletedElsewhere, Lt as HOST_MODEL_DEADLINE_HEADER, M as recordTokenCounter, Mt as runWithMemoryAuditSync, N as canExtractorWrite, Nt as runWithMutationAttempt, O as recordAtomicEntityIdentityJournal, P as canonicalizeProfileSectionName, Q as prospectiveProfileView, Qt as AGGREGATION_OPERATIONS, R as normalizeMemoryRelationPredicate, Rt as clamp01, S as admitTaskLifecycleAssertion, Sn as memoryOperationSignal, St as isTerminalLlmFailure, T as resolveHookAgentId, Tt as isTerminalLlmFailure$1, U as randomUUID$1, Ut as stripRoleLabelPrefix, V as TaskLifecycleStaleResolutionError, Vt as stableHash, W as readChunkVecTableState, Wt as truncateGraphemes, X as orderAdapterAPair, Xt as parseIsoDateTimeMs, Y as isAdapterAVerdictReply, Yt as normalizeIsoDateTimeString, Z as parseAdapterAChatVerdict, Zt as deriveFactKey, _ as acceptsTaskLifecycleJudgment, _n as initSqliteRuntime, _t as createScopePolicy, an as atomicExtractionSkillReference, at as resolveMemoryDate, b as resolveTaskLifecycle, bn as checkMemoryOperation, cn as state_vocabulary_default, ct as buildIndexedText, dn as calendarInstructionSchema, dt as ALL_RESOURCES, en as normalizeCategory, et as renderAdapterAPrompt, fn as isCalendarLabel, ft as RESOURCES_BY_LOCALE, g as Embedder, gn as isMemoryTelemetryEventType, gt as MemoryScopePolicy, h as AccessTracker, hn as MEMORY_TELEMETRY_DELETE_REASONS, ht as StorageError, in as ATOMIC_EXTRACTION_SKILL_HASH, it as serializeIntervalMetadata, j as readAtomicArrivalRetirementCandidateSet, jt as runWithMemoryAudit, k as closeAtomicArrivalRetirementTargets, kt as currentMutationAttemptId, ln as relations, lt as stripEnvelopeMetadata, m as DEFAULT_RETRIEVAL_CONFIG, mn as attribute_dictionary_default, mt as SnoStationMemError, nn as resolveLlmRoute, nt as readMemorySourceOrderOrOldest, on as modelReplyJsonCandidates, ot as unresolvedMemoryDate, p as MemoryRetriever, pn as sessionZoneCarriedBy, pt as RetrievalError, qt as parseInsightMetadata, rn as ATOMIC_EXTRACTION_SKILL, rt as parseSessionTimestamp, sn as readModelReplyJson, st as boundSectionContent, t as evaluateRemAutomaticTriggers, tn as pickLlmRoutingConfig, tt as compareMemorySourceOrder, un as calculateCalendarTime, ut as normalizeAmbientLearningText, v as buildTaskLifecycleCandidateSet, vn as openSqliteDatabase, vt as parseAgentIdFromSessionKey, w as resolveTaskLifecycleEffectiveTime, wn as forwardObserveLedgerUntilIdle, wt as classifyLlmFailure, x as taskLifecycleCandidateSetVersion, xn as memoryFileWrite, xt as createLlmClient, y as findUniqueActiveTaskByDescription, yn as openSqliteDatabaseReadonly, yt as LlmClientTerminalError, z as MemoryStore, zt as clampInt } from "./rem-trigger-BSrGyG0s.js";
|
|
2
2
|
import { A as SESSION_STRATEGIES, An as DEFAULT_REFLECTION_SESSION_TTL_MS, Bn as FTS_MERGE_INTERVAL_MS, Bt as FIXED_PROTOCOL_VALUE_64, C as getSnoStationMemStateDir, D as settingsToPluginConfig, E as defaultSettings, En as DEFAULT_IMPORTANCE, F as extractionConfigSchema, Ft as FIXED_MEMORY_SNO_EXTRACT_CHAT, Gn as INTEGRITY_CHECK_INTERVAL_MS, Ht as FIXED_PROTOCOL_VALUE_66, I as memoryReflectionConfigSchema, It as FIXED_MEMORY_SNO_EXTRACT_PROFILE, L as selfImprovementConfigSchema, M as isObserveAgentId, N as observeAgentId, Nt as FIXED_MEMORY_ROW_PATH_PATTERN, O as MODEL_CALLS, On as DEFAULT_RECALL_TOKEN_BUDGET, P as observeConfigSchema, Pt as FIXED_MEMORY_SNO_AI_EXTRACT, Qn as MAX_CANDIDATE_POOL_SIZE, Qt as FIXED_PROTOCOL_VALUE_79, R as sessionMemoryConfigSchema, T as readSettings, Ut as FIXED_PROTOCOL_VALUE_67, Vt as FIXED_PROTOCOL_VALUE_65, Wt as FIXED_PROTOCOL_VALUE_68, Xn as MAINTENANCE_TICK_MS, Xt as FIXED_PROTOCOL_VALUE_77, Yt as FIXED_PROTOCOL_VALUE_76, Zn as MAX_AGGREGATION_RESULT_TOKENS, Zt as FIXED_PROTOCOL_VALUE_78, _r as USAGE_OUTBOX_INTERVAL_MS, an as embeddingConfigSchema, b as getPrincipal, cn as isSupportedLocale, dn as ATOMIC_CAPTURE_OUTPUT_TOKEN_BUDGET, er as MAX_LIST_LIMIT, fn as ATOMIC_CAPTURE_TIMEOUT_MS, gn as BACKUP_MIN_FREE_DISK_RATIO, gr as USAGE_EVENT_RETENTION_INTERVAL_MS, h as readMaintenanceOverrides, hn as BACKUP_INTERVAL_MS, in as PERSISTED_PROVIDER_SYSTEM, j as retrievalConfigSchema, k as modelCallDestination, kn as DEFAULT_REFLECTION_ERROR_SCAN_MAX_CHARS, mn as ATOMIC_EXTRACTION_MAX_INPUT_TOKENS, mr as SNO_OBSERVE_FLUSH_TIMEOUT_MS, n as MEMORY_USAGE_FLUSH_INTERVAL_MS, qt as FIXED_PROTOCOL_VALUE_74, rr as MIN_RECALL_TOKEN_BUDGET, sr as PLANNER_STATISTICS_INTERVAL_MS, ur as REM_TRIGGER_CHECK_INTERVAL_MS, w as getStateDir, x as getSettingsPath, xr as recallLifecycleSchema, zn as FORGET_QUERY_MIN_SCORE, zt as FIXED_PROTOCOL_VALUE_63 } from "./config-C7LzSWhG.js";
|
|
3
3
|
import { n as DEGRADED_REASONS, t as ContractError } from "./error-D-wb-rZw.js";
|
|
4
4
|
import { configureLogger, createLogger, currentLogContext, effectiveLogLevel, loggerFileStatus, privateLogReference, withLogContext } from "@snoai/utils/logger";
|
|
@@ -196,7 +196,7 @@ function addNumber(target, key, value) {
|
|
|
196
196
|
}
|
|
197
197
|
//#endregion
|
|
198
198
|
//#region package.json
|
|
199
|
-
var version = "1.2.
|
|
199
|
+
var version = "1.2.11";
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region config/atomic-extraction-response.schema.json
|
|
202
202
|
var atomic_extraction_response_schema_default = {
|
|
@@ -1057,7 +1057,7 @@ function fallbackAtomicCapturedFact(fact) {
|
|
|
1057
1057
|
//#endregion
|
|
1058
1058
|
//#region src/engine/observability/log-site-catalog.generated.ts
|
|
1059
1059
|
const logSiteCatalog = {
|
|
1060
|
-
"build_id": "
|
|
1060
|
+
"build_id": "cfa0a6dc2622349a7cce144e91fc42d5d716fba04fbbad8133ae8a0627bc1150",
|
|
1061
1061
|
"sites": {
|
|
1062
1062
|
"memory.recall.budget.checked": {
|
|
1063
1063
|
"file": "packages/memory/src/engine/bindings/memory-recall-tool.ts",
|
|
@@ -2282,42 +2282,42 @@ const logSiteCatalog = {
|
|
|
2282
2282
|
"function": "retrieve",
|
|
2283
2283
|
"line": 41,
|
|
2284
2284
|
"column": 3,
|
|
2285
|
-
"file_hash": "
|
|
2285
|
+
"file_hash": "23aa1ca28a758a8b5a14b83054e7f7ba6ba8d8cb332f0260461bcc4383c68263"
|
|
2286
2286
|
},
|
|
2287
2287
|
"memory.retrieval.completed": {
|
|
2288
2288
|
"file": "packages/memory/src/engine/retrieval/retriever-execution.ts",
|
|
2289
2289
|
"function": "retrieve",
|
|
2290
|
-
"line":
|
|
2290
|
+
"line": 174,
|
|
2291
2291
|
"column": 4,
|
|
2292
|
-
"file_hash": "
|
|
2292
|
+
"file_hash": "23aa1ca28a758a8b5a14b83054e7f7ba6ba8d8cb332f0260461bcc4383c68263"
|
|
2293
2293
|
},
|
|
2294
2294
|
"memory.retrieval.failed": {
|
|
2295
2295
|
"file": "packages/memory/src/engine/retrieval/retriever-execution.ts",
|
|
2296
2296
|
"function": "retrieve",
|
|
2297
|
-
"line":
|
|
2297
|
+
"line": 186,
|
|
2298
2298
|
"column": 4,
|
|
2299
|
-
"file_hash": "
|
|
2299
|
+
"file_hash": "23aa1ca28a758a8b5a14b83054e7f7ba6ba8d8cb332f0260461bcc4383c68263"
|
|
2300
2300
|
},
|
|
2301
2301
|
"memory.retrieval.traced.completed": {
|
|
2302
2302
|
"file": "packages/memory/src/engine/retrieval/retriever-execution.ts",
|
|
2303
2303
|
"function": "retrieveWithTrace",
|
|
2304
|
-
"line":
|
|
2304
|
+
"line": 262,
|
|
2305
2305
|
"column": 4,
|
|
2306
|
-
"file_hash": "
|
|
2306
|
+
"file_hash": "23aa1ca28a758a8b5a14b83054e7f7ba6ba8d8cb332f0260461bcc4383c68263"
|
|
2307
2307
|
},
|
|
2308
2308
|
"memory.retrieval.traced.failed": {
|
|
2309
2309
|
"file": "packages/memory/src/engine/retrieval/retriever-execution.ts",
|
|
2310
2310
|
"function": "retrieveWithTrace",
|
|
2311
|
-
"line":
|
|
2311
|
+
"line": 270,
|
|
2312
2312
|
"column": 4,
|
|
2313
|
-
"file_hash": "
|
|
2313
|
+
"file_hash": "23aa1ca28a758a8b5a14b83054e7f7ba6ba8d8cb332f0260461bcc4383c68263"
|
|
2314
2314
|
},
|
|
2315
2315
|
"memory.retrieval.tier.failed": {
|
|
2316
2316
|
"file": "packages/memory/src/engine/retrieval/retriever-execution.ts",
|
|
2317
2317
|
"function": "evaluateTopKTierTransitions",
|
|
2318
|
-
"line":
|
|
2318
|
+
"line": 339,
|
|
2319
2319
|
"column": 5,
|
|
2320
|
-
"file_hash": "
|
|
2320
|
+
"file_hash": "23aa1ca28a758a8b5a14b83054e7f7ba6ba8d8cb332f0260461bcc4383c68263"
|
|
2321
2321
|
},
|
|
2322
2322
|
"retrieval.retriever-rerank.rerank.6fbc6b3a22": {
|
|
2323
2323
|
"file": "packages/memory/src/engine/retrieval/retriever-rerank.ts",
|
|
@@ -5912,7 +5912,8 @@ async function retrieveForAutoRecall(retriever, input) {
|
|
|
5912
5912
|
facetPolicy: "current-only",
|
|
5913
5913
|
includeRefused: true,
|
|
5914
5914
|
excludeInvalidatedBefore: input.nowMs,
|
|
5915
|
-
excludeSuperseded: true
|
|
5915
|
+
excludeSuperseded: true,
|
|
5916
|
+
...input.trackAccess === void 0 ? {} : { trackAccess: input.trackAccess }
|
|
5916
5917
|
});
|
|
5917
5918
|
const openRows = retrieved.filter((row) => isOpenRecallMetadata(row.entry.metadata));
|
|
5918
5919
|
if (input.diagnostics) {
|
|
@@ -17567,8 +17568,9 @@ var MemoryContractRuntime = class {
|
|
|
17567
17568
|
const minimum = current === "prompt" ? options.minScore ?? settings.prompt.minScore : 0;
|
|
17568
17569
|
const hits = await retrieveForAutoRecall(this.services.retriever, {
|
|
17569
17570
|
query: current === "session-start" ? CODING_SKIN_SESSION_QUERY : query,
|
|
17570
|
-
limit,
|
|
17571
|
+
limit: current === "prompt" ? limit * 4 : limit,
|
|
17571
17572
|
minScore: minimum,
|
|
17573
|
+
trackAccess: current !== "prompt",
|
|
17572
17574
|
scopeFilter: [context.scopePolicy.getDefaultScope()],
|
|
17573
17575
|
signal: retrievalSignal,
|
|
17574
17576
|
nowMs: Date.now(),
|
|
@@ -17576,8 +17578,9 @@ var MemoryContractRuntime = class {
|
|
|
17576
17578
|
});
|
|
17577
17579
|
retrievalSignal.throwIfAborted();
|
|
17578
17580
|
prepared.push({
|
|
17579
|
-
hits: current === "prompt" ? hits.filter((hit) => hit.denseScore === void 0 || hit.denseScore >= .5) : hits,
|
|
17580
|
-
cap: cfg.maxChars
|
|
17581
|
+
hits: current === "prompt" ? hits.filter((hit) => hit.denseScore === void 0 || hit.denseScore >= .5).slice(0, limit) : hits,
|
|
17582
|
+
cap: cfg.maxChars,
|
|
17583
|
+
trackServed: current === "prompt"
|
|
17581
17584
|
});
|
|
17582
17585
|
}
|
|
17583
17586
|
signal?.throwIfAborted();
|
|
@@ -17588,6 +17591,7 @@ var MemoryContractRuntime = class {
|
|
|
17588
17591
|
const cap = Math.min(options.maxChars ?? prepared.reduce((sum, item) => sum + item.cap, 0), CODING_SKIN_LEDGER_MAX_CHARS - state.chars);
|
|
17589
17592
|
const lines = [INJECTION_HEADER];
|
|
17590
17593
|
const memoryIds = [];
|
|
17594
|
+
const servedFromPrompt = [];
|
|
17591
17595
|
for (const batch of prepared) {
|
|
17592
17596
|
let phaseChars = 67;
|
|
17593
17597
|
for (const hit of batch.hits) {
|
|
@@ -17600,8 +17604,10 @@ var MemoryContractRuntime = class {
|
|
|
17600
17604
|
lines.push(line);
|
|
17601
17605
|
phaseChars += line.length + 1;
|
|
17602
17606
|
memoryIds.push(current.id);
|
|
17607
|
+
if (batch.trackServed) servedFromPrompt.push(current.id);
|
|
17603
17608
|
}
|
|
17604
17609
|
}
|
|
17610
|
+
if (servedFromPrompt.length && this.services.config.recallLifecycle?.autoRecallAccessTracking === true) this.services.accessTracker.recordAccess(servedFromPrompt);
|
|
17605
17611
|
this.recordRecallPreview(query, memoryIds.map((id) => this.services.store.getById(id)?.text));
|
|
17606
17612
|
if (!memoryIds.length) return empty;
|
|
17607
17613
|
const contextText = lines.join("\n");
|
package/dist/{memory-tool-dependencies--SrMdT3P.d.ts → memory-tool-dependencies-CWnD5mia.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./types-Ae3a8562.js";
|
|
2
2
|
import "./index-Pb9LrHgL.js";
|
|
3
3
|
import "./embedding-provider-client-vynZMuit.js";
|
|
4
|
-
import "./retriever-
|
|
4
|
+
import "./retriever-DyxY59Lg.js";
|
|
5
5
|
import "./memory-metadata-codec-wVAuoKrG.js";
|
|
6
6
|
import "./store-BDIAl2cc.js";
|
|
7
7
|
import "./capture-policy-detector-BvVGmxxX.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { x as RetrievalResult } from "./types-Ae3a8562.js";
|
|
2
2
|
import { n as PluginObservability } from "./adapter-lyb6RaQE.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-
|
|
4
|
+
import { d as RetrievalConfig, f as RetrievalContext, t as MemoryRetriever } from "./retriever-DyxY59Lg.js";
|
|
5
5
|
import { C as MemoryStore } from "./memory-store-base-Bk2dOKED.js";
|
|
6
6
|
import "./store-BDIAl2cc.js";
|
|
7
7
|
//#region src/engine/observability/observable-retriever.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as runRemProductionOrderedWave } from "./rem-trigger-
|
|
1
|
+
import { c as runRemProductionOrderedWave } from "./rem-trigger-BSrGyG0s.js";
|
|
2
2
|
export { runRemProductionOrderedWave };
|
|
@@ -198,7 +198,8 @@ async function retrieveForAutoRecall(retriever, input) {
|
|
|
198
198
|
facetPolicy: "current-only",
|
|
199
199
|
includeRefused: true,
|
|
200
200
|
excludeInvalidatedBefore: input.nowMs,
|
|
201
|
-
excludeSuperseded: true
|
|
201
|
+
excludeSuperseded: true,
|
|
202
|
+
...input.trackAccess === void 0 ? {} : { trackAccess: input.trackAccess }
|
|
202
203
|
});
|
|
203
204
|
const openRows = retrieved.filter((row) => isOpenRecallMetadata(row.entry.metadata));
|
|
204
205
|
if (input.diagnostics) {
|
|
@@ -28459,7 +28459,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28459
28459
|
const beforeFinalFilter = results.length;
|
|
28460
28460
|
results = results.filter((result) => this.store.isMemoryOnFactSurface(result.entry.id));
|
|
28461
28461
|
this.throwIfAborted(context);
|
|
28462
|
-
if (!isExplicitAggregation && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
28462
|
+
if (!isExplicitAggregation && context.trackAccess !== false && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
28463
28463
|
if (!isExplicitAggregation && this._recallLifecycle?.tierPromoter && this._tierPromoter && results.length > 0) await this.evaluateTopKTierTransitions(results);
|
|
28464
28464
|
const mode = isExplicitAggregation ? "aggregation" : this.config.mode === "vector" || !this.store.hasFtsSupport ? "vector" : "precision-recall";
|
|
28465
28465
|
const finalTrace = trace?.finalize(context.query, mode);
|
|
@@ -28576,7 +28576,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28576
28576
|
this.throwIfAborted(context);
|
|
28577
28577
|
const mode = isExplicitAggregation ? "aggregation" : this.config.mode === "vector" || !this.store.hasFtsSupport ? "vector" : "precision-recall";
|
|
28578
28578
|
const finalTrace = trace.finalize(context.query, mode);
|
|
28579
|
-
if (!isExplicitAggregation && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
28579
|
+
if (!isExplicitAggregation && context.trackAccess !== false && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
28580
28580
|
if (!isExplicitAggregation && this._recallLifecycle?.tierPromoter && this._tierPromoter && results.length > 0) await this.evaluateTopKTierTransitions(results);
|
|
28581
28581
|
if (this._statsCollector) this._statsCollector.recordQuery(finalTrace, context.source ?? "debug");
|
|
28582
28582
|
log$4.info("Traced memory retrieval completed", {
|
|
@@ -1546,7 +1546,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
1546
1546
|
const beforeFinalFilter = results.length;
|
|
1547
1547
|
results = results.filter((result) => this.store.isMemoryOnFactSurface(result.entry.id));
|
|
1548
1548
|
this.throwIfAborted(context);
|
|
1549
|
-
if (!isExplicitAggregation && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
1549
|
+
if (!isExplicitAggregation && context.trackAccess !== false && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
1550
1550
|
if (!isExplicitAggregation && this._recallLifecycle?.tierPromoter && this._tierPromoter && results.length > 0) await this.evaluateTopKTierTransitions(results);
|
|
1551
1551
|
const mode = isExplicitAggregation ? "aggregation" : this.config.mode === "vector" || !this.store.hasFtsSupport ? "vector" : "precision-recall";
|
|
1552
1552
|
const finalTrace = trace?.finalize(context.query, mode);
|
|
@@ -1663,7 +1663,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
1663
1663
|
this.throwIfAborted(context);
|
|
1664
1664
|
const mode = isExplicitAggregation ? "aggregation" : this.config.mode === "vector" || !this.store.hasFtsSupport ? "vector" : "precision-recall";
|
|
1665
1665
|
const finalTrace = trace.finalize(context.query, mode);
|
|
1666
|
-
if (!isExplicitAggregation && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
1666
|
+
if (!isExplicitAggregation && context.trackAccess !== false && this._accessTracker && (this._recallLifecycle?.autoRecallAccessTracking === true || context.source === "manual") && results.length > 0) this._accessTracker.recordAccess(results.map((r) => r.entry.id));
|
|
1667
1667
|
if (!isExplicitAggregation && this._recallLifecycle?.tierPromoter && this._tierPromoter && results.length > 0) await this.evaluateTopKTierTransitions(results);
|
|
1668
1668
|
if (this._statsCollector) this._statsCollector.recordQuery(finalTrace, context.source ?? "debug");
|
|
1669
1669
|
log.info("Traced memory retrieval completed", {
|
|
@@ -314,6 +314,8 @@ interface RetrievalContext {
|
|
|
314
314
|
* to `limit` before anything downstream can filter it.
|
|
315
315
|
*/
|
|
316
316
|
excludeSuperseded?: boolean;
|
|
317
|
+
/** False when the caller records access itself, for the rows it actually serves. */
|
|
318
|
+
trackAccess?: boolean;
|
|
317
319
|
}
|
|
318
320
|
/**
|
|
319
321
|
* The serving-path validity default. This is the one named code
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as getAuditPath, Dt as appendAuditEntryStrict, K as REM_BUILT_OPERATION_TYPES, Ot as compactAuditLog, Pt as readJsonlLines, bt as ModelCallRefusedError, d as RemJobStore, f as parseRemJobStats, n as remNeedsHost, q as parseRemOperationType } from "./rem-trigger-
|
|
1
|
+
import { At as getAuditPath, Dt as appendAuditEntryStrict, K as REM_BUILT_OPERATION_TYPES, Ot as compactAuditLog, Pt as readJsonlLines, bt as ModelCallRefusedError, d as RemJobStore, f as parseRemJobStats, n as remNeedsHost, q as parseRemOperationType } from "./rem-trigger-BSrGyG0s.js";
|
|
2
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-C7LzSWhG.js";
|
|
3
3
|
import { t as ContractError } from "./error-D-wb-rZw.js";
|
|
4
4
|
import { setImmediate } from "node:timers/promises";
|
|
@@ -334,7 +334,7 @@ async function startOwnedRemSidecar() {
|
|
|
334
334
|
async open() {
|
|
335
335
|
if (currentMemory) return currentMemory;
|
|
336
336
|
if (settingsError) throw settingsError;
|
|
337
|
-
openingMemory ??= import("./memory-runtime-
|
|
337
|
+
openingMemory ??= import("./memory-runtime-C8ZIW2WL.js").then((module) => module.MemoryRuntimePool.open()).then((pool) => {
|
|
338
338
|
currentMemory = pool;
|
|
339
339
|
if (stopping) pool.stopTimers();
|
|
340
340
|
return pool;
|
|
@@ -729,7 +729,7 @@ async function runChassisJob(store, journal, waveId, holdMs, runtime) {
|
|
|
729
729
|
cleanRefusalReasons.push(reason);
|
|
730
730
|
await appendChassisRefusal(journal, queued, operation, "refused", reason);
|
|
731
731
|
}
|
|
732
|
-
const { runRemProductionOrderedWave } = await import("./rem-batch-executor-
|
|
732
|
+
const { runRemProductionOrderedWave } = await import("./rem-batch-executor-DbV8Y-B-.js");
|
|
733
733
|
const result = enabledOperations.length === 0 ? {
|
|
734
734
|
decision: "allow",
|
|
735
735
|
reasonCode: null,
|
package/dist/sidecar/main.js
CHANGED
|
@@ -6,7 +6,7 @@ import { addLogFileTarget, closeLogger, createLogger } from "@snoai/utils/logger
|
|
|
6
6
|
* @purpose Boots the standalone local REM sidecar process.
|
|
7
7
|
* @boundary Process environment, sidecar lifecycle, and local request-log destination.
|
|
8
8
|
*/
|
|
9
|
-
const { startRemSidecar, DuplicateSidecarError } = await import("../server-
|
|
9
|
+
const { startRemSidecar, DuplicateSidecarError } = await import("../server-CjwHZY1P.js");
|
|
10
10
|
let sidecar;
|
|
11
11
|
for (let attempt = 1; !sidecar; attempt++) try {
|
|
12
12
|
sidecar = await startRemSidecar();
|
|
@@ -2,7 +2,7 @@ import "./types-Ae3a8562.js";
|
|
|
2
2
|
import "./index-Pb9LrHgL.js";
|
|
3
3
|
import "./adapter-lyb6RaQE.js";
|
|
4
4
|
import "./embedding-provider-client-vynZMuit.js";
|
|
5
|
-
import "./retriever-
|
|
5
|
+
import "./retriever-DyxY59Lg.js";
|
|
6
6
|
import "./connection-3IVXpuPE.js";
|
|
7
7
|
import "./sqlite-runtime-L_ywirTm.js";
|
|
8
8
|
import "./store-BDIAl2cc.js";
|
|
@@ -17,7 +17,7 @@ import "./memory-snapshot-uTdxJnIh.js";
|
|
|
17
17
|
import "./observable-embedder-CGr3Zejf.js";
|
|
18
18
|
import "./observable-llm-client-CXUA7Gi3.js";
|
|
19
19
|
import "./observable-memory-store-BwwKcUzf.js";
|
|
20
|
-
import "./observable-retriever-
|
|
20
|
+
import "./observable-retriever-bJbG9WtJ.js";
|
|
21
21
|
import "./reflection-embedded-generator-CogQIBcG.js";
|
|
22
22
|
import "./strategy-hook-runner-DT9emgCZ.js";
|
|
23
23
|
import "./data-bootstrap-Bl3lthzE.js";
|
|
@@ -19,7 +19,7 @@ import "./internal/engine/observability/observable-embedder.js";
|
|
|
19
19
|
import "./internal/engine/observability/observable-llm-client.js";
|
|
20
20
|
import "./internal/engine/observability/observable-memory-store.js";
|
|
21
21
|
import "./internal/engine/retrieval/access-tracker.js";
|
|
22
|
-
import "./retriever-
|
|
22
|
+
import "./retriever-Bzz6H8Mn.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";
|