@snoai/memory 1.2.10 → 1.2.12
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/{atomic-memory-extraction-o2v8mp7G.js → atomic-memory-extraction-B5FW2HhR.js} +4 -4
- package/dist/{config-C7LzSWhG.js → config-BWHnCb_Z.js} +32 -1
- package/dist/diagnostic-encoder.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -8
- package/dist/internal/config/settings.js +1 -1
- package/dist/internal/engine/bindings/memory-cli-shared.d.ts +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +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 +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 +1 -1
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +1 -1
- package/dist/internal/engine/extraction/atomic-memory-extraction.js +1 -1
- package/dist/internal/engine/extraction/memory-temporality-classifier.js +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.js +2 -2
- package/dist/internal/engine/reflection/reflection-command-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.js +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +1 -1
- package/dist/internal/engine/reflection/strategy-hook-runner.js +2 -2
- package/dist/internal/engine/retrieval/retriever.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.js +1 -1
- package/dist/internal/model/llm-client.js +1 -1
- package/dist/internal/model/llm-mode-routing.js +1 -1
- package/dist/internal/store/maintenance.js +3 -3
- package/dist/internal/store/store.js +1 -1
- package/dist/{llm-client-ConEyQEs.js → llm-client-DPBhPtmQ.js} +20 -3
- package/dist/{log-site-catalog.generated-C9RmyAA0.js → log-site-catalog.generated-B4LkDXe0.js} +15 -15
- package/dist/log-site-catalog.json +1 -1
- package/dist/{memory-runtime-HibOMCFa.js → memory-runtime-D6cAHd34.js} +27 -21
- package/dist/{memory-temporality-classifier-MBJyJdvB.js → memory-temporality-classifier-Bm4-tqB5.js} +2 -2
- package/dist/{memory-tool-dependencies--SrMdT3P.d.ts → memory-tool-dependencies-CWnD5mia.d.ts} +1 -1
- package/dist/{memory-tool-dependencies-DUMY8SwB.js → memory-tool-dependencies-R_yWuFEg.js} +1 -1
- package/dist/{model-call-table-BE97f37s.js → model-call-table-DoIl2S0P.js} +32 -1
- package/dist/{observable-retriever-BZpdv93Y.d.ts → observable-retriever-bJbG9WtJ.d.ts} +1 -1
- package/dist/{profile-section-writer-CmNa95uN.js → profile-section-writer-Cu3ND3j7.js} +2 -2
- package/dist/{reflection-command-hooks-CnTj8cKL.js → reflection-command-hooks-vKpljnqv.js} +3 -3
- package/dist/{reflection-embedded-generator-DR525Moy.js → reflection-embedded-generator-CwTXvERI.js} +1 -1
- package/dist/{rem-batch-executor-8x4FBLtW.js → rem-batch-executor-Cn-MBe4m.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-B_S0CBa7.js} +22 -5
- 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-C2XTjGFr.js} +4 -4
- package/dist/sidecar/main.js +2 -2
- 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-BaaXGrZb.js} +6 -6
- package/dist/{store-BQxkgJTX.js → store-BzWYcvpF.js} +1 -1
- package/dist/{strategy-hook-runner-SvyyGBXw.js → strategy-hook-runner-GaJKb3O8.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { A as
|
|
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-B_S0CBa7.js";
|
|
2
|
+
import { $n as MAX_CANDIDATE_POOL_SIZE, $t as FIXED_PROTOCOL_VALUE_79, A as modelCallDestination, An as DEFAULT_REFLECTION_ERROR_SCAN_MAX_CHARS, Bn as FORGET_QUERY_MIN_SCORE, Bt as FIXED_PROTOCOL_VALUE_63, C as getSnoStationMemStateDir, D as settingsToPluginConfig, Dn as DEFAULT_IMPORTANCE, E as defaultSettings, F as observeConfigSchema, Ft as FIXED_MEMORY_SNO_AI_EXTRACT, Gt as FIXED_PROTOCOL_VALUE_68, Ht as FIXED_PROTOCOL_VALUE_65, I as extractionConfigSchema, It as FIXED_MEMORY_SNO_EXTRACT_CHAT, Jt as FIXED_PROTOCOL_VALUE_74, Kn as INTEGRITY_CHECK_INTERVAL_MS, L as memoryReflectionConfigSchema, Lt as FIXED_MEMORY_SNO_EXTRACT_PROFILE, M as retrievalConfigSchema, N as isObserveAgentId, O as MODEL_CALLS, P as observeAgentId, Pt as FIXED_MEMORY_ROW_PATH_PATTERN, Qn as MAX_AGGREGATION_RESULT_TOKENS, Qt as FIXED_PROTOCOL_VALUE_78, R as selfImprovementConfigSchema, Sr as recallLifecycleSchema, T as readSettings, Ut as FIXED_PROTOCOL_VALUE_66, Vn as FTS_MERGE_INTERVAL_MS, Vt as FIXED_PROTOCOL_VALUE_64, Wt as FIXED_PROTOCOL_VALUE_67, Xt as FIXED_PROTOCOL_VALUE_76, Zn as MAINTENANCE_TICK_MS, Zt as FIXED_PROTOCOL_VALUE_77, _n as BACKUP_MIN_FREE_DISK_RATIO, _r as USAGE_EVENT_RETENTION_INTERVAL_MS, an as PERSISTED_PROVIDER_SYSTEM, b as getPrincipal, cr as PLANNER_STATISTICS_INTERVAL_MS, dr as REM_TRIGGER_CHECK_INTERVAL_MS, fn as ATOMIC_CAPTURE_OUTPUT_TOKEN_BUDGET, gn as BACKUP_INTERVAL_MS, h as readMaintenanceOverrides, hn as ATOMIC_EXTRACTION_MAX_INPUT_TOKENS, hr as SNO_OBSERVE_FLUSH_TIMEOUT_MS, ir as MIN_RECALL_TOKEN_BUDGET, j as SESSION_STRATEGIES, jn as DEFAULT_REFLECTION_SESSION_TTL_MS, kn as DEFAULT_RECALL_TOKEN_BUDGET, ln as isSupportedLocale, n as MEMORY_USAGE_FLUSH_INTERVAL_MS, on as embeddingConfigSchema, pn as ATOMIC_CAPTURE_TIMEOUT_MS, tr as MAX_LIST_LIMIT, vr as USAGE_OUTBOX_INTERVAL_MS, w as getStateDir, x as getSettingsPath, z as sessionMemoryConfigSchema } from "./config-BWHnCb_Z.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";
|
|
5
5
|
import path, { basename, dirname, isAbsolute, join, posix, relative, resolve } from "node:path";
|
|
@@ -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.12";
|
|
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": "a396e44ddf21082b9c9a4581b038ad8bcacd7fc51fb51aadfedcdadcc7f343db",
|
|
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",
|
|
@@ -2616,9 +2616,9 @@ const logSiteCatalog = {
|
|
|
2616
2616
|
"llm.transport.request.completed": {
|
|
2617
2617
|
"file": "packages/memory/src/model/llm-provider-transport.ts",
|
|
2618
2618
|
"function": "observeRequest",
|
|
2619
|
-
"line":
|
|
2619
|
+
"line": 82,
|
|
2620
2620
|
"column": 4,
|
|
2621
|
-
"file_hash": "
|
|
2621
|
+
"file_hash": "4779c2b9d4b4222719a8b1c1f65212b4235119c18db256d58072499140fd695d"
|
|
2622
2622
|
},
|
|
2623
2623
|
"memory.host.degraded": {
|
|
2624
2624
|
"file": "packages/memory/src/model/registered-agent-port.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-temporality-classifier-MBJyJdvB.js → memory-temporality-classifier-Bm4-tqB5.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 {
|
|
4
|
-
import { a as isTerminalLlmFailure } from "./llm-client-
|
|
3
|
+
import { r as modelCallDestination } from "./model-call-table-DoIl2S0P.js";
|
|
4
|
+
import { a as isTerminalLlmFailure } from "./llm-client-DPBhPtmQ.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";
|
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";
|
|
@@ -8,7 +8,7 @@ import "./runtime-audit-log-DK6xAYxh.js";
|
|
|
8
8
|
import "./all-resources-BQK2ugjB.js";
|
|
9
9
|
import "./capture-policy-detector-DaMfy9CZ.js";
|
|
10
10
|
import "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
11
|
-
import "./memory-temporality-classifier-
|
|
11
|
+
import "./memory-temporality-classifier-Bm4-tqB5.js";
|
|
12
12
|
import "./internal/engine/operations/daily-spend-estimator.js";
|
|
13
13
|
import "./internal/engine/operations/learning-file-maintenance.js";
|
|
14
14
|
import "./scopes-a4Kly9n7.js";
|
|
@@ -570,8 +570,39 @@ const MODEL_CALLS = {
|
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
};
|
|
573
|
+
/** Sno GPU workload label per call (GPU_REQUEST_METADATA_STANDARD): what the caller is doing, one stable value per group. */
|
|
574
|
+
const MODEL_CALL_WORKLOAD = {
|
|
575
|
+
E1: "station-extract",
|
|
576
|
+
E2: "station-extract",
|
|
577
|
+
E3: "station-extract",
|
|
578
|
+
E4: "station-extract",
|
|
579
|
+
E5: "station-extract",
|
|
580
|
+
E6: "station-subject",
|
|
581
|
+
E7: "station-subject",
|
|
582
|
+
E8: "station-subject",
|
|
583
|
+
E9: "station-profile-key",
|
|
584
|
+
E12: "station-profile-key",
|
|
585
|
+
E10: "station-verdict",
|
|
586
|
+
P1: "station-verdict",
|
|
587
|
+
P2: "station-profile-merge",
|
|
588
|
+
P3: "station-profile-merge",
|
|
589
|
+
P4: "station-profile-merge",
|
|
590
|
+
P5: "station-profile-merge",
|
|
591
|
+
P6: "station-profile-merge",
|
|
592
|
+
REM1: "station-rem-replace",
|
|
593
|
+
REM2: "station-rem-replace",
|
|
594
|
+
REM3: "station-rem-replace",
|
|
595
|
+
REM4: "station-rem-replace",
|
|
596
|
+
REM5: "station-rem-update",
|
|
597
|
+
REM6: "station-rem-update",
|
|
598
|
+
REM7: "station-rem-update",
|
|
599
|
+
REM8: "station-rem-update",
|
|
600
|
+
E11: "station-aux",
|
|
601
|
+
T1: "station-aux",
|
|
602
|
+
R1: "station-aux"
|
|
603
|
+
};
|
|
573
604
|
function modelCallDestination(callId, mode, modelCalls) {
|
|
574
605
|
return modelCalls[callId][mode];
|
|
575
606
|
}
|
|
576
607
|
//#endregion
|
|
577
|
-
export {
|
|
608
|
+
export { MODEL_CALL_WORKLOAD as n, modelCallDestination as r, MODEL_CALLS as t };
|
|
@@ -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
|
|
@@ -2,11 +2,11 @@ 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
4
|
import { a as currentMutationAttemptId, f as runWithMutationAttempt } from "./runtime-audit-log-DK6xAYxh.js";
|
|
5
|
-
import { n as LlmClientTerminalError } from "./llm-client-
|
|
5
|
+
import { n as LlmClientTerminalError } from "./llm-client-DPBhPtmQ.js";
|
|
6
6
|
import { resolveLlmRoute } from "./internal/model/llm-mode-routing.js";
|
|
7
7
|
import { boundSectionContent, buildIndexedText } from "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
8
8
|
import { adapterAViewFromRecord, orderAdapterAPair, parseAdapterAChatVerdict, prospectiveProfileView, renderAdapterAChatPrompt, renderAdapterAPrompt } from "./internal/engine/rem/index.js";
|
|
9
|
-
import { S as StaleSupersedeTargetError, a as resolveTaskLifecycle, c as buildTaskLifecycleCommandClaim, i as findUniqueActiveTaskByDescription, l as resolveTaskLifecycleEffectiveTime, n as acceptsTaskLifecycleJudgment, o as taskLifecycleCandidateSetVersion, r as buildTaskLifecycleCandidateSet, s as admitTaskLifecycleAssertion, w as TaskLifecycleStaleResolutionError } from "./store-
|
|
9
|
+
import { S as StaleSupersedeTargetError, a as resolveTaskLifecycle, c as buildTaskLifecycleCommandClaim, i as findUniqueActiveTaskByDescription, l as resolveTaskLifecycleEffectiveTime, n as acceptsTaskLifecycleJudgment, o as taskLifecycleCandidateSetVersion, r as buildTaskLifecycleCandidateSet, s as admitTaskLifecycleAssertion, w as TaskLifecycleStaleResolutionError } from "./store-BzWYcvpF.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";
|
|
@@ -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-DPBhPtmQ.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-Cu3ND3j7.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-CwTXvERI.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";
|
package/dist/{reflection-embedded-generator-DR525Moy.js → reflection-embedded-generator-CwTXvERI.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-DPBhPtmQ.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,2 +1,2 @@
|
|
|
1
|
-
import { c as runRemProductionOrderedWave } from "./rem-trigger-
|
|
1
|
+
import { c as runRemProductionOrderedWave } from "./rem-trigger-B_S0CBa7.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) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as FIXED_IDX_MEMORY_ACTIVE_TASK_CURRENT_REVISION, A as modelCallDestination, At as FIXED_MEMORY_PROFILE_RECOVERY_ENTRIES, B as FIXED_EXTERNAL_VALUE_49, C as getSnoStationMemStateDir, Cn as CHUNK_OVERLAP_TOKENS, Cr as CachedEmbeddingProvider, Ct as FIXED_MEMORY_CHUNKS_MEM_FACET_IDX, D as settingsToPluginConfig, Dn as DEFAULT_IMPORTANCE, Dr as LocalEmbedProvider, Dt as FIXED_MEMORY_MEMORIES_FACT_ID_INSERT_GUARD, En as DEFAULT_BM25_WEIGHT, Et as FIXED_MEMORY_MEMORIES, Fn as DEFAULT_VECTOR_WEIGHT, Fr as REM_SIDECAR_TOKEN_HEADER, G as FIXED_EXTERNAL_VALUE_55, Gn as IMPORTANCE_WEIGHT_BASE, H as FIXED_EXTERNAL_VALUE_52, Hn as HEAD_EXTRACT_MIN_CONTENT_TOKENS, In as EMBEDDER_DIM, It as FIXED_MEMORY_SNO_EXTRACT_CHAT, J as FIXED_EXTERNAL_VALUE_58, Jn as LIGHTWEIGHT_COSINE_WEIGHT, K as FIXED_EXTERNAL_VALUE_56, Kt as FIXED_PROTOCOL_VALUE_69, Ln as EMBEDDER_MODEL_DEFAULT, Mn as DEFAULT_RERANK_MODEL, Mt as FIXED_MEMORY_PROVIDER_PROJECT_AGENTS, Nn as DEFAULT_RERANK_TIMEOUT_MS, Nt as FIXED_MEMORY_PROVIDER_PROJECT_MAPPINGS, O as MODEL_CALLS, On as DEFAULT_RECALL_LIFECYCLE, Or as ensureModelDownloaded, Ot as FIXED_MEMORY_MEMORIES_FACT_ID_UPDATE_GUARD, P as observeAgentId, Q as FIXED_IDX_MEMORY, Rn as EMBEDDER_PROVIDER_DEFAULT, Rt as FIXED_MEMORY_TASK_LIFECYCLE_COMMANDS, Sn as CHUNK_MIN_TOKENS, St as FIXED_MEMORY_CHUNKS_MEMORY_ID_IDX, T as readSettings, Tn as CHUNK_TOKENIZER_MODE, Tr as LOCAL_EMBEDDING_MODEL, Tt as FIXED_MEMORY_EXTRACTION_TIMESTAMPS, U as FIXED_EXTERNAL_VALUE_53, Un as HEAD_EXTRACT_OVERLAP_DROP_RATIO, V as FIXED_EXTERNAL_VALUE_51, W as FIXED_EXTERNAL_VALUE_54, Wn as HEAD_EXTRACT_TOKEN_BUDGET, X as FIXED_EXTERNAL_VALUE_8, Xn as LIGHTWEIGHT_RERANK_PENALTY, Y as FIXED_EXTERNAL_VALUE_62, Yn as LIGHTWEIGHT_FUSION_WEIGHT, Z as FIXED_EXTERNAL_VALUE_9, _t as FIXED_MEMORY_CHUNKS, a as REM_MODEL_OUTPUT_TOKEN_CAP, an as PERSISTED_PROVIDER_SYSTEM, ar as MMR_LAMBDA, at as FIXED_IDX_MEMORY_MEMORIES_LANE_PROJECT, bn as CHUNKING_VERSION$1, br as experimentCandidatePoolOverride, bt as FIXED_MEMORY_CHUNKS_AU, cn as SUPPORTED_LOCALES, ct as FIXED_IDX_MEMORY_MEMORIES_PROJECT_FACT_KEY_ACTIVE, d as getRemDiscoveryPath, dn as ADJACENCY_BONUS_PER_PAIR, dt as FIXED_MEMORY_ACTIVE_TASK_EVIDENCE, en as FIXED_VEC_MEMORY, er as MAX_CHUNK_FETCH_LIMIT, et as FIXED_IDX_MEMORY_ACTIVE_TASK_EVIDENCE_INSTANCE, fr as RERANK_BLEND_CROSS, ft as FIXED_MEMORY_ACTIVE_TASK_INSTANCES, g as readRemOperationalConfig, gr as TIME_DECAY_FLOOR, gt as FIXED_MEMORY_ACTIVE_TASK_TRANSITIONS, ht as FIXED_MEMORY_ACTIVE_TASK_REVISIONS, in as PERSISTED_CONTENT_HASH_V3, it as FIXED_IDX_MEMORY_MEMORIES_FACT_ID, jt as FIXED_MEMORY_PROVIDER_AGENT_MAPPINGS, k as MODEL_CALL_WORKLOAD, kt as FIXED_MEMORY_MIGRATION_MARKERS, lr as RECENCY_WEIGHT, lt as FIXED_IDX_MEMORY_MEMORIES_PROJECT_TIMESTAMP, mr as RETRIEVAL_STORAGE_CHUNK_PROFILE, mt as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_MANIFESTS, nn as PERSISTED_CANDIDATE_HASH_V1, nt as FIXED_IDX_MEMORY_MEMORIES_CATEGORY, o as REM_RUN_PATH, or as MULTI_HIT_BONUS_CAP, ot as FIXED_IDX_MEMORY_MEMORIES_PROJECT, pr as RERANK_BLEND_VECTOR, pt as FIXED_MEMORY_ACTIVE_TASK_MIGRATION_EVIDENCE, q as FIXED_EXTERNAL_VALUE_57, qn as INTRA_MEMORY_COSINE_THRESHOLD, qt as FIXED_PROTOCOL_VALUE_73, r as REM_CORRELATION_ID_HEADER, rn as PERSISTED_CONTENT_HASH_V1, rt as FIXED_IDX_MEMORY_MEMORIES_CONTENT_HASH, s as REM_SIDECAR_HOST, sn as llmRoutingConfigSchema, sr as MULTI_HIT_BONUS_PER_HIT, st as FIXED_IDX_MEMORY_MEMORIES_PROJECT_CONTENT_HASH, tn as FIXED_VEC_MEMORY_CHUNKS, tr as MAX_LIST_LIMIT, tt as FIXED_IDX_MEMORY_ACTIVE_TASK_INSTANCES_PROJECTION, un as ADJACENCY_BONUS_CAP, ut as FIXED_MEMORY, vn as BONUS_TOTAL_INVARIANT, vt as FIXED_MEMORY_CHUNKS_AD, wn as CHUNK_TARGET_TOKENS, wr as LOCAL_EMBEDDING_CACHE_DIR_DEFAULT, wt as FIXED_MEMORY_CHUNKS_MEM_IDX, xn as CHUNK_MAX_TOKENS, xr as experimentMmrDisabled, xt as FIXED_MEMORY_CHUNKS_FTS, yn as CACHE_TTL_MS, yt as FIXED_MEMORY_CHUNKS_AI, zn as EVAL_QA_TRACES_FILENAME, zt as FIXED_MEMORY_UNPLACED_CANDIDATES } from "./config-BWHnCb_Z.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, closeSync, createReadStream, existsSync, fstatSync, fsyncSync, ftruncateSync, mkdirSync, openSync, readFileSync, readSync, realpathSync, renameSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
@@ -6655,11 +6655,23 @@ const providerResponses = new AsyncLocalStorage();
|
|
|
6655
6655
|
function withProviderResponses(responses, run) {
|
|
6656
6656
|
return providerResponses.run(responses, run);
|
|
6657
6657
|
}
|
|
6658
|
+
/** Sno GPU request attribution (GPU_REQUEST_METADATA_STANDARD): self-reported labels, never identity. */
|
|
6659
|
+
const SNO_GPU_SOURCE = "sno-station";
|
|
6660
|
+
function snoGpuAttributionHeaders(clientRequestId, callId) {
|
|
6661
|
+
return {
|
|
6662
|
+
"X-Sno-Source": SNO_GPU_SOURCE,
|
|
6663
|
+
"X-Sno-Workload": callId ? MODEL_CALL_WORKLOAD[callId] : "station-aux",
|
|
6664
|
+
"X-Request-ID": clientRequestId
|
|
6665
|
+
};
|
|
6666
|
+
}
|
|
6658
6667
|
async function observeRequest(input, run) {
|
|
6659
6668
|
const route = createHash("sha256").update(input.endpoint).digest("hex");
|
|
6660
6669
|
const inFlight = (routeInFlight.get(route) ?? 0) + 1;
|
|
6661
6670
|
routeInFlight.set(route, inFlight);
|
|
6662
|
-
const diagnostic = {
|
|
6671
|
+
const diagnostic = {
|
|
6672
|
+
started: performance.now(),
|
|
6673
|
+
clientRequestId: input.requestId ?? randomUUID()
|
|
6674
|
+
};
|
|
6663
6675
|
return withLogContext({ attempt_id: randomUUID() }, async () => {
|
|
6664
6676
|
let outcome = "failed";
|
|
6665
6677
|
let failure;
|
|
@@ -6679,6 +6691,7 @@ async function observeRequest(input, run) {
|
|
|
6679
6691
|
outcome,
|
|
6680
6692
|
error: failure,
|
|
6681
6693
|
call_id: input.slot ?? "unavailable",
|
|
6694
|
+
client_request_id: diagnostic.clientRequestId,
|
|
6682
6695
|
destination: input.label ?? "unavailable",
|
|
6683
6696
|
route_hash: route,
|
|
6684
6697
|
transport: input.transport,
|
|
@@ -6689,6 +6702,7 @@ async function observeRequest(input, run) {
|
|
|
6689
6702
|
prompt_template_unavailable_reason: input.promptTemplateHash ? void 0 : "caller_does_not_provide_template_identity",
|
|
6690
6703
|
config_hash: createHash("sha256").update(JSON.stringify({
|
|
6691
6704
|
...input,
|
|
6705
|
+
requestId: void 0,
|
|
6692
6706
|
endpoint: route
|
|
6693
6707
|
})).digest("hex"),
|
|
6694
6708
|
output_cap: input.cap ?? "unavailable",
|
|
@@ -6847,6 +6861,7 @@ async function callSnoProfileCompletion(request) {
|
|
|
6847
6861
|
transport: "raw-completions",
|
|
6848
6862
|
slot: request.callId,
|
|
6849
6863
|
label: request.destination,
|
|
6864
|
+
requestId: request.requestId,
|
|
6850
6865
|
timeout: request.timeoutMs,
|
|
6851
6866
|
cap: request.singleTokenVerdict ? 1 : request.maxTokens,
|
|
6852
6867
|
sampling: {},
|
|
@@ -6862,7 +6877,7 @@ async function callSnoProfileCompletion(request) {
|
|
|
6862
6877
|
headers: {
|
|
6863
6878
|
"Content-Type": "application/json",
|
|
6864
6879
|
"X-Internal-Token": request.apiKey,
|
|
6865
|
-
...
|
|
6880
|
+
...snoGpuAttributionHeaders(diagnostic.clientRequestId, request.callId),
|
|
6866
6881
|
...request.operationId ? { "X-Sno-Operation": request.operationId } : {}
|
|
6867
6882
|
},
|
|
6868
6883
|
body: JSON.stringify({
|
|
@@ -6942,6 +6957,7 @@ async function snoStationMemDispatch(ctx) {
|
|
|
6942
6957
|
transport: "chat-completions",
|
|
6943
6958
|
slot: cfgExt.callId,
|
|
6944
6959
|
label: cfgExt.destination,
|
|
6960
|
+
requestId: typeof cfgExt.requestId === "string" ? cfgExt.requestId : void 0,
|
|
6945
6961
|
timeout: timeoutMs,
|
|
6946
6962
|
cap: typeof callBody.max_tokens === "number" ? callBody.max_tokens : typeof callBody.max_completion_tokens === "number" ? callBody.max_completion_tokens : void 0,
|
|
6947
6963
|
sampling,
|
|
@@ -6961,6 +6977,7 @@ async function snoStationMemDispatch(ctx) {
|
|
|
6961
6977
|
if (typeof cfgExt.requestId === "string") headers["X-Request-ID"] = cfgExt.requestId;
|
|
6962
6978
|
if (provider === "sno-gpu") {
|
|
6963
6979
|
headers["X-Internal-Token"] = ctx.apiKey;
|
|
6980
|
+
Object.assign(headers, snoGpuAttributionHeaders(diagnostic.clientRequestId, cfgExt.callId));
|
|
6964
6981
|
if (typeof cfgExt.operationId === "string") headers["X-Sno-Operation"] = cfgExt.operationId;
|
|
6965
6982
|
} else headers.Authorization = `Bearer ${ctx.apiKey}`;
|
|
6966
6983
|
let response;
|
|
@@ -28459,7 +28476,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28459
28476
|
const beforeFinalFilter = results.length;
|
|
28460
28477
|
results = results.filter((result) => this.store.isMemoryOnFactSurface(result.entry.id));
|
|
28461
28478
|
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));
|
|
28479
|
+
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
28480
|
if (!isExplicitAggregation && this._recallLifecycle?.tierPromoter && this._tierPromoter && results.length > 0) await this.evaluateTopKTierTransitions(results);
|
|
28464
28481
|
const mode = isExplicitAggregation ? "aggregation" : this.config.mode === "vector" || !this.store.hasFtsSupport ? "vector" : "precision-recall";
|
|
28465
28482
|
const finalTrace = trace?.finalize(context.query, mode);
|
|
@@ -28576,7 +28593,7 @@ Object.assign(MemoryRetriever.prototype, {
|
|
|
28576
28593
|
this.throwIfAborted(context);
|
|
28577
28594
|
const mode = isExplicitAggregation ? "aggregation" : this.config.mode === "vector" || !this.store.hasFtsSupport ? "vector" : "precision-recall";
|
|
28578
28595
|
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));
|
|
28596
|
+
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
28597
|
if (!isExplicitAggregation && this._recallLifecycle?.tierPromoter && this._tierPromoter && results.length > 0) await this.evaluateTopKTierTransitions(results);
|
|
28581
28598
|
if (this._statsCollector) this._statsCollector.recordQuery(finalTrace, context.source ?? "debug");
|
|
28582
28599
|
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,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { Ar as
|
|
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-B_S0CBa7.js";
|
|
2
|
+
import { Ar as MEMORY_DEFAULT_SKIN_ID, C as getSnoStationMemStateDir, Ir as memoryMethod, Nr as MEMORY_ROUTES, Pr 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, jr as MEMORY_ERROR_STATUS, l as REM_SOURCE, r as REM_CORRELATION_ID_HEADER, rr as MEMORY_SHUTDOWN_TIMEOUT_MS, s as REM_SIDECAR_HOST, u as getRemChassisJournalPath, v as SettingsUnavailableError, y as getDiscoveryPath } from "./config-BWHnCb_Z.js";
|
|
3
3
|
import { t as ContractError } from "./error-D-wb-rZw.js";
|
|
4
4
|
import { setImmediate } from "node:timers/promises";
|
|
5
5
|
import { createLogger, currentLogContext, effectiveLogLevel, emitDiagnostic } from "@snoai/utils/logger";
|
|
@@ -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-D6cAHd34.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-Cn-MBe4m.js");
|
|
733
733
|
const result = enabledOperations.length === 0 ? {
|
|
734
734
|
decision: "allow",
|
|
735
735
|
reasonCode: null,
|
package/dist/sidecar/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mr as MEMORY_RECONNECT_INTERVAL_MS, m as isRemTraceEnabled, p as getRemTraceLogPath, v as SettingsUnavailableError } from "../config-BWHnCb_Z.js";
|
|
2
2
|
import { setTimeout } from "node:timers/promises";
|
|
3
3
|
import { addLogFileTarget, closeLogger, createLogger } from "@snoai/utils/logger";
|
|
4
4
|
//#region src/sidecar/main.ts
|
|
@@ -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-C2XTjGFr.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";
|
|
@@ -4,12 +4,12 @@ import "./internal/engine/shared/types.js";
|
|
|
4
4
|
import "./internal/engine/security/redact.js";
|
|
5
5
|
import "./internal/engine/shared/utils.js";
|
|
6
6
|
import "./runtime-audit-log-DK6xAYxh.js";
|
|
7
|
-
import "./llm-client-
|
|
7
|
+
import "./llm-client-DPBhPtmQ.js";
|
|
8
8
|
import "./capture-policy-detector-DaMfy9CZ.js";
|
|
9
9
|
import "./ambient-learning-text-normalizer-CxjATmMp.js";
|
|
10
|
-
import "./memory-temporality-classifier-
|
|
10
|
+
import "./memory-temporality-classifier-Bm4-tqB5.js";
|
|
11
11
|
import "./scopes-a4Kly9n7.js";
|
|
12
|
-
import "./atomic-memory-extraction-
|
|
12
|
+
import "./atomic-memory-extraction-B5FW2HhR.js";
|
|
13
13
|
import "./internal/store/sqlite-runtime.js";
|
|
14
14
|
import "./connection-PQcq3TPO.js";
|
|
15
15
|
import "./internal/store/data-paths.js";
|
|
@@ -19,12 +19,12 @@ 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";
|
|
26
|
-
import "./reflection-embedded-generator-
|
|
27
|
-
import "./strategy-hook-runner-
|
|
26
|
+
import "./reflection-embedded-generator-CwTXvERI.js";
|
|
27
|
+
import "./strategy-hook-runner-GaJKb3O8.js";
|
|
28
28
|
import "./data-bootstrap-P8sie9WA.js";
|
|
29
29
|
import "@snoai/sqlite-crypto";
|
|
30
30
|
export {};
|
|
@@ -10,7 +10,7 @@ import { t as checkMemoryOperation } from "./operation-cancellation-CTKWwNHk.js"
|
|
|
10
10
|
import { u as runWithMemoryAudit } from "./runtime-audit-log-DK6xAYxh.js";
|
|
11
11
|
import { getSnoStationMemStateDir } from "./internal/contract/profile.js";
|
|
12
12
|
import "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
13
|
-
import "./memory-temporality-classifier-
|
|
13
|
+
import "./memory-temporality-classifier-Bm4-tqB5.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";
|
|
15
15
|
import { REM_UPDATE_LOCALES, deriveRemWriteIdentity, getRemUpdateLocaleResource, writeRemTwoFacetTransaction } from "./internal/engine/rem/index.js";
|
|
16
16
|
import { n as state_vocabulary_default, r as attribute_dictionary_default, t as relations } from "./relation-dictionary-Cev1kyLe.js";
|
|
@@ -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-CwTXvERI.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
|