@snoai/memory 1.2.4 → 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-D20cgP0X.d.ts → access-tracker-gzQVC6ur.d.ts} +3 -3
- package/dist/{adapter-RxQ9CJ7f.js → adapter-CG-UbOjU.js} +1 -0
- package/dist/{adapter-Dx92oSuo.d.ts → adapter-CMMmIzGe.d.ts} +2 -2
- package/dist/{atomic-memory-extraction-BWYEdBhl.js → atomic-memory-extraction-Dj5LX-e7.js} +26 -11
- package/dist/{atomic-memory-extraction-Dz-fe3h0.d.ts → atomic-memory-extraction-vz2gIrqC.d.ts} +4 -4
- package/dist/{b-profile-section-dictionary-provider-D-VJRSOs.d.ts → b-profile-section-dictionary-provider-YawRtzNC.d.ts} +1 -1
- package/dist/{capture-policy-detector-D7rPVLFp.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-D3Hc1__G.js → config-BCZRhUvW.js} +2 -1
- package/dist/{derived-suppression-cache-BGcKAg2p.d.ts → derived-suppression-cache-CJuzDpoR.d.ts} +1 -1
- package/dist/diagnostic-encoder.js +1 -1
- package/dist/{index-CgqHi0Rw.d.ts → index-Dg3p5cmw.d.ts} +2 -2
- package/dist/index.d.ts +9 -9
- package/dist/index.js +6 -6
- 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-store-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 +5 -5
- 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 +1 -1
- 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 +5 -5
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-message-transcript.js +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-reset-hook.d.ts +3 -3
- package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +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/memory-metadata-codec.d.ts +2 -2
- package/dist/internal/engine/extraction/memory-temporality-classifier.d.ts +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-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-injection-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +3 -3
- 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/llm-client.d.ts +2 -2
- 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 +24 -13
- package/dist/internal/store/store.d.ts +3 -3
- package/dist/internal/store/store.js +2 -2
- package/dist/{llm-client-CtNzuoRc.d.ts → llm-client-BdS_IKvU.d.ts} +1 -1
- package/dist/{log-site-catalog.generated-DoCYZhJF.js → log-site-catalog.generated-6Yhsft4u.js} +98 -98
- package/dist/log-site-catalog.json +1 -1
- package/dist/{memory-kind-policy-iKHUsuwu.d.ts → memory-kind-policy-cIq80koH.d.ts} +1 -1
- package/dist/{memory-metadata-codec-n-CFKYjn.d.ts → memory-metadata-codec-DqmbQiE6.d.ts} +1 -1
- package/dist/{memory-runtime-CVbnnCfB.js → memory-runtime-CvxA1mP0.js} +163 -132
- package/dist/{memory-snapshot-DhtNqVPs.d.ts → memory-snapshot-DBcnAnOn.d.ts} +2 -2
- package/dist/{memory-store-base-QoyY3sxH.d.ts → memory-store-base-5tTeqT7l.d.ts} +2 -2
- package/dist/{memory-temporality-classifier-Bon6IpEm.d.ts → memory-temporality-classifier-DztzPNxV.d.ts} +1 -1
- package/dist/{memory-tier-promoter-DeJbiH1w.d.ts → memory-tier-promoter-Du9gPBxH.d.ts} +1 -1
- package/dist/memory-tool-dependencies-CrbtLLjj.d.ts +14 -0
- package/dist/{observable-embedder-B5ZLQv4-.d.ts → observable-embedder-B7Si8IxG.d.ts} +1 -1
- package/dist/{observable-llm-client-D65rHe8y.d.ts → observable-llm-client-BD0_NE26.d.ts} +3 -3
- package/dist/{observable-memory-store-CAdLg_OF.d.ts → observable-memory-store-CHC6Dy1d.d.ts} +4 -4
- package/dist/{observable-retriever-DPPwzSY1.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-DmbzYMYe.d.ts → plugin-config-schema-B-Zve3i5.d.ts} +1 -1
- package/dist/{plugin-config-schema-CC-2N9Xw.js → plugin-config-schema-hIfZTELX.js} +1 -1
- package/dist/{profile-C2e9mF3H.d.ts → profile-8bUJR11P.d.ts} +1 -1
- package/dist/{profile-section-writer-qPqgOH-a.js → profile-section-writer-DYcoa4ld.js} +1 -1
- package/dist/{reflection-command-hooks-xeMMA4Ik.d.ts → reflection-command-hooks-BkbZyh-G.d.ts} +4 -4
- package/dist/{reflection-command-hooks-Ctumt-yD.js → reflection-command-hooks-_AiaIqap.js} +1 -1
- package/dist/{reflection-deps-Btr849dc.d.ts → reflection-deps-r8wTzFMJ.d.ts} +2 -2
- package/dist/{reflection-embedded-generator-W6MWE9e3.d.ts → reflection-embedded-generator-BAsTsaVA.d.ts} +3 -3
- package/dist/{reflection-injection-hooks-BR-bvDmD.d.ts → reflection-injection-hooks-Cn-VUTIN.d.ts} +4 -4
- package/dist/{reflection-lifecycle-hooks-DnQp5cvp.d.ts → reflection-lifecycle-hooks-rCqXcF1o.d.ts} +3 -3
- package/dist/{rem-batch-executor-C7iItB5x.js → rem-batch-executor-Dpysz3or.js} +1 -1
- package/dist/{rem-trigger-BEIQodYk.js → rem-trigger-DiHK3BKP.js} +39 -13
- package/dist/{retriever-DgVRB1Zq.d.ts → retriever-CI0r-RAK.d.ts} +6 -6
- package/dist/{runtime-audit-log-DNPzk6Wy.d.ts → runtime-audit-log-B_tsjFZl.d.ts} +1 -1
- package/dist/{server-DyWtDUHh.js → server-0KpYuZ69.js} +9 -15
- package/dist/sidecar/main.js +2 -2
- package/dist/sno-station-mem-runtime-dependencies-eO6jFEYJ.d.ts +31 -0
- package/dist/{sno-station-mem-runtime-dependencies-D47FAvbm.js → sno-station-mem-runtime-dependencies-jmuWbSfR.js} +2 -2
- package/dist/{store-ByUy8ukD.js → store-B81Qk2RF.js} +12 -1
- package/dist/{store-DmFEfRbK.d.ts → store-h8QmkTwl.d.ts} +8 -2
- package/dist/{strategy-hook-runner-BdG_ktbm.d.ts → strategy-hook-runner-C3WFg1oP.d.ts} +7 -7
- package/dist/{types-CCPXb_iJ.d.ts → types-Dcr6GKHy.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/memory-tool-dependencies-CDvVqE6_.d.ts +0 -14
- package/dist/paths-AoHWqjCM.d.ts +0 -1
- package/dist/sno-station-mem-runtime-dependencies-EbtwfQh0.d.ts +0 -31
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Who it is for: you do not use this package directly. Follow the
|
|
|
28
28
|
plugins use to reach the service.
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
npm install @snoai/memory@1.2.
|
|
31
|
+
npm install @snoai/memory@1.2.5
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Needs Node.js 22.22.3+, 24.15.0+ or 25.9.0+. Licensed under Apache-2.0.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { v as MemoryMetadata } from "./types-
|
|
1
|
+
import { v as MemoryMetadata } from "./types-Dcr6GKHy.js";
|
|
2
2
|
import { sn as RecallLifecycleConfig } from "./index-DL8AVj0Z.js";
|
|
3
|
-
import { C as MemoryStore } from "./memory-store-base-
|
|
4
|
-
import "./store-
|
|
3
|
+
import { C as MemoryStore } from "./memory-store-base-5tTeqT7l.js";
|
|
4
|
+
import "./store-h8QmkTwl.js";
|
|
5
5
|
//#region src/engine/retrieval/access-tracker.d.ts
|
|
6
6
|
interface AccessMetadata {
|
|
7
7
|
readonly accessCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { t as PluginConfig } from "./plugin-config-schema-B-Zve3i5.js";
|
|
2
|
+
import "./types-Dcr6GKHy.js";
|
|
3
3
|
import { t as ObserveLogger } from "./best-effort-BPZSzKk0.js";
|
|
4
4
|
import { AgentId, EventType, JsonObject } from "@snoai/observability";
|
|
5
5
|
//#region src/engine/observability/cost-aggregator.d.ts
|
|
@@ -14,10 +14,10 @@ import { a as parseAtomicCaptureReply, c as atomic_extraction_response_schema_de
|
|
|
14
14
|
import { adapterAViewFromRecord, isAdapterAVerdictReply, parseAdapterAChatVerdict, renderAdapterAChatPrompt, renderAdapterAPrompt } from "./internal/engine/rem/index.js";
|
|
15
15
|
import { n as state_vocabulary_default, r as attribute_dictionary_default, t as relations } from "./relation-dictionary-Cev1kyLe.js";
|
|
16
16
|
import { g as randomUUID$1 } from "./memory-store-shared-DqpWJXZZ.js";
|
|
17
|
-
import { d as normalizeEntityName, f as recordAtomicEntityIdentityJournal, g as readAtomicArrivalRetirementCandidateSet, h as journalAtomicArrivalRetirementRefusal, m as closeAtomicArrivalRetirementTargets, u as listAtomicMemoryEntityCandidates,
|
|
17
|
+
import { b as normalizeMemoryRelationPredicate, d as normalizeEntityName, f as recordAtomicEntityIdentityJournal, g as readAtomicArrivalRetirementCandidateSet, h as journalAtomicArrivalRetirementRefusal, m as closeAtomicArrivalRetirementTargets, u as listAtomicMemoryEntityCandidates, v as AtomicExtractionCompletedElsewhere } from "./store-B81Qk2RF.js";
|
|
18
18
|
import { o as normalizeTopicToSectionName } from "./b-profile-section-dictionary-provider-BHkoNqgk.js";
|
|
19
19
|
import { r as recordTokenCounter } from "./memory-store-write-validation-B_hDG2zf.js";
|
|
20
|
-
import { i as prepareDeterministicTaskLifecycleWrite, t as PROFILE_IDENTITY_SECTION } from "./profile-section-writer-
|
|
20
|
+
import { i as prepareDeterministicTaskLifecycleWrite, t as PROFILE_IDENTITY_SECTION } from "./profile-section-writer-DYcoa4ld.js";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
import { countTokens } from "@snoai/chunking";
|
|
23
23
|
import { createLogger, currentLogContext, privateLogReference, withLogContext } from "@snoai/utils/logger";
|
|
@@ -1751,16 +1751,24 @@ async function runAtomicGenericExtractionPass(input) {
|
|
|
1751
1751
|
};
|
|
1752
1752
|
return runAtomicGenericExtractionPass(input);
|
|
1753
1753
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
input.
|
|
1759
|
-
|
|
1754
|
+
try {
|
|
1755
|
+
const attempts = { count: 0 };
|
|
1756
|
+
const outputTokenBudget = Math.min(begin.entry.runParameters.outputTokenBudget, input.runParameters.outputTokenBudget);
|
|
1757
|
+
const inputOverflow = input.estimatedInputTokens > begin.entry.runParameters.maxInputTokens;
|
|
1758
|
+
if (inputOverflow && !(input.turns.length === 1 && splitTurnContent(input.turns[0]?.content ?? "") !== void 0)) {
|
|
1759
|
+
input.store.recordAtomicExtractionCalls(input.ledgerKey, input.nowMs());
|
|
1760
|
+
return markPending(input, "input-overflow", null, 0);
|
|
1761
|
+
}
|
|
1762
|
+
const result = inputOverflow ? await splitAtomicCaptureTurn(input, outputTokenBudget, attempts, "") : await captureAtomicWindow(input, outputTokenBudget, attempts);
|
|
1763
|
+
if (result.status === "pending") return markPending(input, result.reason, result.failedReply, attempts.count);
|
|
1764
|
+
return result;
|
|
1765
|
+
} catch (error) {
|
|
1766
|
+
if (error instanceof AtomicExtractionCompletedElsewhere) return {
|
|
1767
|
+
status: "skip",
|
|
1768
|
+
entry: error.entry
|
|
1769
|
+
};
|
|
1770
|
+
throw error;
|
|
1760
1771
|
}
|
|
1761
|
-
const result = inputOverflow ? await splitAtomicCaptureTurn(input, outputTokenBudget, attempts, "") : await captureAtomicWindow(input, outputTokenBudget, attempts);
|
|
1762
|
-
if (result.status === "pending") return markPending(input, result.reason, result.failedReply, attempts.count);
|
|
1763
|
-
return result;
|
|
1764
1772
|
}
|
|
1765
1773
|
async function splitAtomicCaptureWindow(input, outputTokenBudget, attempts) {
|
|
1766
1774
|
const records = [];
|
|
@@ -3505,6 +3513,13 @@ async function runAtomicMemoryExtraction(input) {
|
|
|
3505
3513
|
write
|
|
3506
3514
|
};
|
|
3507
3515
|
} catch (error) {
|
|
3516
|
+
if (error instanceof AtomicExtractionCompletedElsewhere) {
|
|
3517
|
+
diagnostic.outcome = "skip";
|
|
3518
|
+
return {
|
|
3519
|
+
status: "skip",
|
|
3520
|
+
entry: error.entry
|
|
3521
|
+
};
|
|
3522
|
+
}
|
|
3508
3523
|
diagnostic.outcome = diagnostic.persisted > 0 ? "partial" : "failed";
|
|
3509
3524
|
throw error;
|
|
3510
3525
|
} finally {
|
package/dist/{atomic-memory-extraction-Dz-fe3h0.d.ts → atomic-memory-extraction-vz2gIrqC.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as LlmClientConfig, l as ModelCallId, p as LlmRoutingConfig, r as LlmClient } from "./plugin-config-schema-
|
|
1
|
+
import { i as LlmClientConfig, l as ModelCallId, p as LlmRoutingConfig, r as LlmClient } from "./plugin-config-schema-B-Zve3i5.js";
|
|
2
2
|
import { n as Locale } from "./locales-JxGmkG6t.js";
|
|
3
3
|
import { qt as AdapterAMemoryView } from "./index-BO4RU_mc.js";
|
|
4
|
-
import { C as MemoryStore, c as AtomicExtractionRunParameters, f as AtomicExtractionWriteResult, g as BeginAtomicExtractionChunkResult, r as AtomicExtractionLedgerKey, s as AtomicExtractionReprocessReason, x as MemoryRelationPredicate } from "./memory-store-base-
|
|
5
|
-
import "./store-
|
|
6
|
-
import "./llm-client-
|
|
4
|
+
import { C as MemoryStore, c as AtomicExtractionRunParameters, f as AtomicExtractionWriteResult, g as BeginAtomicExtractionChunkResult, r as AtomicExtractionLedgerKey, s as AtomicExtractionReprocessReason, x as MemoryRelationPredicate } from "./memory-store-base-5tTeqT7l.js";
|
|
5
|
+
import "./store-h8QmkTwl.js";
|
|
6
|
+
import "./llm-client-BdS_IKvU.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/engine/extraction/calendar-instruction.d.ts
|
|
9
9
|
type CalendarPrecision = "year" | "month" | "week" | "day" | "minute";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ProductMode } from "./plugin-config-schema-
|
|
1
|
+
import { g as ProductMode } from "./plugin-config-schema-B-Zve3i5.js";
|
|
2
2
|
import { n as Locale } from "./locales-JxGmkG6t.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/engine/extraction/b-profile-section-registry.d.ts
|
package/dist/{capture-policy-detector-D7rPVLFp.d.ts → capture-policy-detector-B9Gzx-1V.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as MemoryCategory } from "./types-
|
|
1
|
+
import { h as MemoryCategory } from "./types-Dcr6GKHy.js";
|
|
2
2
|
//#region src/engine/extraction/capture-policy-detector.d.ts
|
|
3
3
|
declare const PROMPT_INJECTION_PATTERNS: RegExp[];
|
|
4
4
|
/** Implements looks like prompt injection as the local memory capture policy operation. */
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Discovery } from "./internal/contract/discovery.js";
|
|
2
|
-
import { B as ScopeCtx, F as JsonValue, H as UsageSignal, I as Message, L as Mutation, M as HostEvent, N as InitRegistration, P as Inspection, R as RecallOptions, V as Turn, et as ContractError, n as MemoryContract, nt as DegradedReason, v as ContractOutputs, z as Registration } from "./index-
|
|
2
|
+
import { B as ScopeCtx, F as JsonValue, H as UsageSignal, I as Message, L as Mutation, M as HostEvent, N as InitRegistration, P as Inspection, R as RecallOptions, V as Turn, et as ContractError, n as MemoryContract, nt as DegradedReason, v as ContractOutputs, z as Registration } from "./index-Dg3p5cmw.js";
|
|
3
3
|
//#region src/contract/client.d.ts
|
|
4
4
|
export interface ConnectOptions {
|
|
5
5
|
skinId: string;
|
package/dist/client.js
CHANGED
|
@@ -8,11 +8,28 @@ import { mkdir, open } from "node:fs/promises";
|
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { request } from "node:http";
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
11
|
+
import { connect as connect$1 } from "node:net";
|
|
11
12
|
import { setTimeout } from "node:timers/promises";
|
|
12
13
|
//#region src/contract/start.ts
|
|
14
|
+
/** True when something accepts connections on the loopback port; the sidecar listens before it writes discovery. */
|
|
15
|
+
function listening(port) {
|
|
16
|
+
return new Promise((resolve) => {
|
|
17
|
+
const socket = connect$1({
|
|
18
|
+
host: "127.0.0.1",
|
|
19
|
+
port
|
|
20
|
+
});
|
|
21
|
+
const done = (open) => {
|
|
22
|
+
socket.destroy();
|
|
23
|
+
resolve(open);
|
|
24
|
+
};
|
|
25
|
+
socket.setTimeout(1e3, () => done(false));
|
|
26
|
+
socket.once("connect", () => done(true));
|
|
27
|
+
socket.once("error", () => done(false));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
13
30
|
async function startSidecar(memoryPackage) {
|
|
14
31
|
const current = await readDiscovery();
|
|
15
|
-
if (current && processAlive(current.pid)) {
|
|
32
|
+
if (current && processAlive(current.pid) && await listening(current.port)) {
|
|
16
33
|
const deadline = Date.now() + MEMORY_START_TIMEOUT_MS;
|
|
17
34
|
while (Date.now() < deadline) {
|
|
18
35
|
if (await checkDiscovery(current).then(() => true, () => false)) return current;
|
|
@@ -50,7 +67,7 @@ async function startSidecar(memoryPackage) {
|
|
|
50
67
|
const deadline = Date.now() + MEMORY_START_TIMEOUT_MS;
|
|
51
68
|
while (Date.now() < deadline) {
|
|
52
69
|
const discovery = await readDiscovery();
|
|
53
|
-
if (discovery && processAlive(discovery.pid)) {
|
|
70
|
+
if (discovery && processAlive(discovery.pid) && await listening(discovery.port)) {
|
|
54
71
|
await checkDiscovery(discovery);
|
|
55
72
|
return discovery;
|
|
56
73
|
}
|
|
@@ -197,6 +197,37 @@ const CODING_SKIN_HOOKS = {
|
|
|
197
197
|
timeout: 8
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
+
/** Cursor's hook events (`hooks.json` names); timeouts match the Claude/Codex event each one stands in for. */
|
|
201
|
+
const CODING_SKIN_CURSOR_HOOKS = {
|
|
202
|
+
sessionStart: {
|
|
203
|
+
subcommand: "session-start",
|
|
204
|
+
timeout: 15
|
|
205
|
+
},
|
|
206
|
+
beforeSubmitPrompt: {
|
|
207
|
+
subcommand: "user-prompt-submit",
|
|
208
|
+
timeout: 8
|
|
209
|
+
},
|
|
210
|
+
afterAgentResponse: {
|
|
211
|
+
subcommand: "after-agent-response",
|
|
212
|
+
timeout: 5
|
|
213
|
+
},
|
|
214
|
+
afterAgentThought: {
|
|
215
|
+
subcommand: "after-agent-thought",
|
|
216
|
+
timeout: 5
|
|
217
|
+
},
|
|
218
|
+
stop: {
|
|
219
|
+
subcommand: "stop",
|
|
220
|
+
timeout: 5
|
|
221
|
+
},
|
|
222
|
+
preCompact: {
|
|
223
|
+
subcommand: "pre-compact",
|
|
224
|
+
timeout: 5
|
|
225
|
+
},
|
|
226
|
+
sessionEnd: {
|
|
227
|
+
subcommand: "session-end",
|
|
228
|
+
timeout: 8
|
|
229
|
+
}
|
|
230
|
+
};
|
|
200
231
|
const CODING_SKIN_MODEL_COMMANDS = [
|
|
201
232
|
"recall",
|
|
202
233
|
"get",
|
|
@@ -206,6 +237,10 @@ const CODING_SKIN_MODEL_COMMANDS = [
|
|
|
206
237
|
function shellQuote(value) {
|
|
207
238
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
208
239
|
}
|
|
240
|
+
/** Linux reports a running binary that was replaced on disk as "<path> (deleted)"; the path itself is still the right one. */
|
|
241
|
+
function snoProgramPath(path) {
|
|
242
|
+
return path.endsWith(" (deleted)") ? path.slice(0, -10) : path;
|
|
243
|
+
}
|
|
209
244
|
/** The command an agent hook runs: the `sno` binary that ran setup, then `memory hook <event> --harness <name>`. */
|
|
210
245
|
function codingSkinHookCommand(snoPath, subcommand, harness) {
|
|
211
246
|
return `${shellQuote(snoPath)} memory hook ${subcommand} --harness ${harness}`;
|
|
@@ -217,7 +252,7 @@ function isCodingSkinHookCommand(command, subcommand, harness) {
|
|
|
217
252
|
if (!trimmed.endsWith(suffix)) return false;
|
|
218
253
|
const encoded = trimmed.slice(0, -suffix.length);
|
|
219
254
|
const program = encoded.startsWith("'") && encoded.endsWith("'") ? encoded.slice(1, -1).replaceAll("'\\''", "'") : encoded;
|
|
220
|
-
return basename(program) === "sno";
|
|
255
|
+
return basename(snoProgramPath(program)) === "sno";
|
|
221
256
|
}
|
|
222
257
|
//#endregion
|
|
223
|
-
export {
|
|
258
|
+
export { readNewLines as C, isAgentText as S, shellQuote as _, CODING_SKIN_IMPORT_INTERVAL_MS as a, activityCursorSchema as b, CODING_SKIN_MAX_ATTEMPTS as c, CODING_SKIN_RECALL_SENTENCE_MAX_CHARS as d, CODING_SKIN_RETRY_DELAYS_MS as f, isCodingSkinHookCommand as g, codingSkinHookCommand as h, CODING_SKIN_HOOKS as i, CODING_SKIN_MODEL_COMMANDS as l, CODING_SKIN_WORKER_LIFETIME_MS as m, CODING_SKIN_CHILD_MAX_BUFFER_BYTES as n, CODING_SKIN_LEDGER_MAX_CHARS as o, CODING_SKIN_SESSION_QUERY as p, CODING_SKIN_CURSOR_HOOKS as r, CODING_SKIN_MANUAL_SESSION_ID as s, CODING_SKIN_CHILD_DEADLINE_MS as t, CODING_SKIN_RECALL_ITEM_MAX_CHARS as u, snoProgramPath as v, foldActivity as x, EMPTY_ACTIVITY_CURSOR as y };
|
package/dist/coding-skin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ObserveLedgerRow, appendObserveLedgerRows } from "./internal/engine/telemetry/observe-ledger.js";
|
|
2
2
|
import { SKILL_CATEGORIES, skillVersionFor } from "./internal/config/skill-categories.js";
|
|
3
|
-
import { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH } from "./internal/config/skin-defaults.js";
|
|
3
|
+
import { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, HOST_MODEL_DEADLINE_HEADER } from "./internal/config/skin-defaults.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region config/session-activity.d.ts
|
|
6
6
|
/** True when the text of a user message came from another agent's tooling: a Reach ring or seat start, or a heartbeat wake. */
|
|
@@ -101,12 +101,46 @@ export declare const CODING_SKIN_HOOKS: {
|
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
103
|
export type CodingSkinHookName = keyof typeof CODING_SKIN_HOOKS;
|
|
104
|
+
/** Cursor's hook events (`hooks.json` names); timeouts match the Claude/Codex event each one stands in for. */
|
|
105
|
+
export declare const CODING_SKIN_CURSOR_HOOKS: {
|
|
106
|
+
readonly sessionStart: {
|
|
107
|
+
readonly subcommand: "session-start";
|
|
108
|
+
readonly timeout: 15;
|
|
109
|
+
};
|
|
110
|
+
readonly beforeSubmitPrompt: {
|
|
111
|
+
readonly subcommand: "user-prompt-submit";
|
|
112
|
+
readonly timeout: 8;
|
|
113
|
+
};
|
|
114
|
+
readonly afterAgentResponse: {
|
|
115
|
+
readonly subcommand: "after-agent-response";
|
|
116
|
+
readonly timeout: 5;
|
|
117
|
+
};
|
|
118
|
+
readonly afterAgentThought: {
|
|
119
|
+
readonly subcommand: "after-agent-thought";
|
|
120
|
+
readonly timeout: 5;
|
|
121
|
+
};
|
|
122
|
+
readonly stop: {
|
|
123
|
+
readonly subcommand: "stop";
|
|
124
|
+
readonly timeout: 5;
|
|
125
|
+
};
|
|
126
|
+
readonly preCompact: {
|
|
127
|
+
readonly subcommand: "pre-compact";
|
|
128
|
+
readonly timeout: 5;
|
|
129
|
+
};
|
|
130
|
+
readonly sessionEnd: {
|
|
131
|
+
readonly subcommand: "session-end";
|
|
132
|
+
readonly timeout: 8;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export type CodingSkinCursorHookName = keyof typeof CODING_SKIN_CURSOR_HOOKS;
|
|
104
136
|
export declare const CODING_SKIN_MODEL_COMMANDS: readonly ["recall", "get", "remember", "correct"];
|
|
105
|
-
export type CodingSkinHarness = "claude" | "codex";
|
|
137
|
+
export type CodingSkinHarness = "claude" | "codex" | "cursor";
|
|
106
138
|
export declare function shellQuote(value: string): string;
|
|
139
|
+
/** Linux reports a running binary that was replaced on disk as "<path> (deleted)"; the path itself is still the right one. */
|
|
140
|
+
export declare function snoProgramPath(path: string): string;
|
|
107
141
|
/** The command an agent hook runs: the `sno` binary that ran setup, then `memory hook <event> --harness <name>`. */
|
|
108
142
|
export declare function codingSkinHookCommand(snoPath: string, subcommand: string, harness: CodingSkinHarness): string;
|
|
109
143
|
/** True for a hook command of that shape, whatever the path to `sno` is. */
|
|
110
144
|
export declare function isCodingSkinHookCommand(command: string, subcommand: string, harness: CodingSkinHarness): boolean;
|
|
111
145
|
//#endregion
|
|
112
|
-
export { type ActivityCursor, type ActivityRecord, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, type ObserveLedgerRow, SKILL_CATEGORIES, type SessionActivityPayload, appendObserveLedgerRows, skillVersionFor };
|
|
146
|
+
export { type ActivityCursor, type ActivityRecord, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, HOST_MODEL_DEADLINE_HEADER, type ObserveLedgerRow, SKILL_CATEGORIES, type SessionActivityPayload, appendObserveLedgerRows, skillVersionFor };
|
package/dist/coding-skin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { appendObserveLedgerRows } from "./internal/engine/telemetry/observe-ledger.js";
|
|
2
2
|
import { SKILL_CATEGORIES, skillVersionFor } from "./internal/config/skill-categories.js";
|
|
3
|
-
import { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH } from "./internal/config/skin-defaults.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
export { CODING_SKIN_CHILD_DEADLINE_MS, CODING_SKIN_CHILD_MAX_BUFFER_BYTES, CODING_SKIN_HOOKS, CODING_SKIN_IMPORT_INTERVAL_MS, CODING_SKIN_LEDGER_MAX_CHARS, CODING_SKIN_MANUAL_SESSION_ID, CODING_SKIN_MAX_ATTEMPTS, CODING_SKIN_MODEL_COMMANDS, CODING_SKIN_RECALL_ITEM_MAX_CHARS, CODING_SKIN_RECALL_SENTENCE_MAX_CHARS, CODING_SKIN_RETRY_DELAYS_MS, CODING_SKIN_SESSION_QUERY, CODING_SKIN_WORKER_LIFETIME_MS, EMPTY_ACTIVITY_CURSOR, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, SKILL_CATEGORIES, activityCursorSchema, appendObserveLedgerRows, codingSkinHookCommand, foldActivity, isAgentText, isCodingSkinHookCommand, readNewLines, shellQuote, skillVersionFor };
|
|
3
|
+
import { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, HOST_MODEL_DEADLINE_HEADER } from "./internal/config/skin-defaults.js";
|
|
4
|
+
import { C as readNewLines, S as isAgentText, _ as shellQuote, a as CODING_SKIN_IMPORT_INTERVAL_MS, b as activityCursorSchema, c as CODING_SKIN_MAX_ATTEMPTS, d as CODING_SKIN_RECALL_SENTENCE_MAX_CHARS, f as CODING_SKIN_RETRY_DELAYS_MS, g as isCodingSkinHookCommand, h as codingSkinHookCommand, i as CODING_SKIN_HOOKS, l as CODING_SKIN_MODEL_COMMANDS, m as CODING_SKIN_WORKER_LIFETIME_MS, n as CODING_SKIN_CHILD_MAX_BUFFER_BYTES, o as CODING_SKIN_LEDGER_MAX_CHARS, p as CODING_SKIN_SESSION_QUERY, r as CODING_SKIN_CURSOR_HOOKS, s as CODING_SKIN_MANUAL_SESSION_ID, t as CODING_SKIN_CHILD_DEADLINE_MS, u as CODING_SKIN_RECALL_ITEM_MAX_CHARS, v as snoProgramPath, x as foldActivity, y as EMPTY_ACTIVITY_CURSOR } from "./coding-skin-_Qu3INZD.js";
|
|
5
|
+
export { CODING_SKIN_CHILD_DEADLINE_MS, CODING_SKIN_CHILD_MAX_BUFFER_BYTES, CODING_SKIN_CURSOR_HOOKS, CODING_SKIN_HOOKS, CODING_SKIN_IMPORT_INTERVAL_MS, CODING_SKIN_LEDGER_MAX_CHARS, CODING_SKIN_MANUAL_SESSION_ID, CODING_SKIN_MAX_ATTEMPTS, CODING_SKIN_MODEL_COMMANDS, CODING_SKIN_RECALL_ITEM_MAX_CHARS, CODING_SKIN_RECALL_SENTENCE_MAX_CHARS, CODING_SKIN_RETRY_DELAYS_MS, CODING_SKIN_SESSION_QUERY, CODING_SKIN_WORKER_LIFETIME_MS, EMPTY_ACTIVITY_CURSOR, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, HOST_MODEL_DEADLINE_HEADER, SKILL_CATEGORIES, activityCursorSchema, appendObserveLedgerRows, codingSkinHookCommand, foldActivity, isAgentText, isCodingSkinHookCommand, readNewLines, shellQuote, skillVersionFor, snoProgramPath };
|
|
@@ -1406,7 +1406,8 @@ const AGENT_IDS = [
|
|
|
1406
1406
|
PERSISTED_PROVIDER_SYSTEM,
|
|
1407
1407
|
FIXED_PROTOCOL_VALUE_70,
|
|
1408
1408
|
FIXED_PROTOCOL_VALUE_71,
|
|
1409
|
-
FIXED_PROTOCOL_VALUE_72
|
|
1409
|
+
FIXED_PROTOCOL_VALUE_72,
|
|
1410
|
+
"cursor"
|
|
1410
1411
|
];
|
|
1411
1412
|
const observeAgentIdSchema = z.enum(AGENT_IDS, { error: () => `observe.agentId must be one of ${AGENT_IDS.join(", ")}` });
|
|
1412
1413
|
/** The observe agent id a skin reports under; a skin id outside the SDK's set is a hard error. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as version, t as logSiteCatalog } from "./log-site-catalog.generated-
|
|
1
|
+
import { n as version, t as logSiteCatalog } from "./log-site-catalog.generated-6Yhsft4u.js";
|
|
2
2
|
import { diagnosticProcessInstanceId, encodeDiagnostic as encodeDiagnostic$1, writeEmergencyDiagnostic as writeEmergencyDiagnostic$1 } from "@snoai/utils/log-encoder";
|
|
3
3
|
//#region src/engine/observability/early-diagnostics.ts
|
|
4
4
|
function bindApplication(input) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as LlmRoutingConfig, t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-
|
|
1
|
+
import { p as LlmRoutingConfig, t as PluginConfig } from "./plugin-config-schema-B-Zve3i5.js";
|
|
2
|
+
import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-Dcr6GKHy.js";
|
|
3
3
|
import { r as SnoStationMemMemorySearchResult } from "./provider-runtime-types-DFhtdA6d.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/contract/error.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { b as Settings, t as PluginConfig } from "./plugin-config-schema-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { b as Settings, t as PluginConfig } from "./plugin-config-schema-B-Zve3i5.js";
|
|
2
|
+
import "./types-Dcr6GKHy.js";
|
|
3
3
|
import { n as AgentLlmPort } from "./agent-llm-port-DY2290EK.js";
|
|
4
|
-
import { n as PluginObservability } from "./adapter-
|
|
5
|
-
import { $ as usageSignalSchema, A as HostContext, B as ScopeCtx, C as inspectDataSchema, D as toolResponseSchema, E as retrievalResultSchema, F as JsonValue, G as inputSchemas, H as UsageSignal, I as Message, J as mutationSchema, K as inspectionSchema, L as Mutation, M as HostEvent, N as InitRegistration, O as AgentModelRegistration, P as Inspection, Q as turnSchema, R as RecallOptions, S as ToolResponse, T as outputSchemas, U as hostEventSchema, V as Turn, W as initRegistrationSchema, X as registrationSchema, Y as recallOptionsSchema, Z as scopeSchema, _ as engineSettingsSchema, a as parseOutput, b as ProjectSummary, c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, et as ContractError, f as MEMORY_SKIN_HEADER, g as EngineSettings, h as memoryMethod, i as parseInput, j as HostDecision, k as ContractInputs, l as MEMORY_HEALTH_TIMEOUT_MS, m as REM_SIDECAR_TOKEN_HEADER, n as MemoryContract, nt as DegradedReason, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, q as messageSchema, r as contractJsonSchemas, s as MEMORY_DEFAULT_SKIN_ID, t as ContractMethod, tt as DEGRADED_REASONS, u as MEMORY_RECONNECT_INTERVAL_MS, v as ContractOutputs, w as memoryEntrySchema, x as Result, y as InspectData, z as Registration } from "./index-
|
|
4
|
+
import { n as PluginObservability } from "./adapter-CMMmIzGe.js";
|
|
5
|
+
import { $ as usageSignalSchema, A as HostContext, B as ScopeCtx, C as inspectDataSchema, D as toolResponseSchema, E as retrievalResultSchema, F as JsonValue, G as inputSchemas, H as UsageSignal, I as Message, J as mutationSchema, K as inspectionSchema, L as Mutation, M as HostEvent, N as InitRegistration, O as AgentModelRegistration, P as Inspection, Q as turnSchema, R as RecallOptions, S as ToolResponse, T as outputSchemas, U as hostEventSchema, V as Turn, W as initRegistrationSchema, X as registrationSchema, Y as recallOptionsSchema, Z as scopeSchema, _ as engineSettingsSchema, a as parseOutput, b as ProjectSummary, c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, et as ContractError, f as MEMORY_SKIN_HEADER, g as EngineSettings, h as memoryMethod, i as parseInput, j as HostDecision, k as ContractInputs, l as MEMORY_HEALTH_TIMEOUT_MS, m as REM_SIDECAR_TOKEN_HEADER, n as MemoryContract, nt as DegradedReason, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, q as messageSchema, r as contractJsonSchemas, s as MEMORY_DEFAULT_SKIN_ID, t as ContractMethod, tt as DEGRADED_REASONS, u as MEMORY_RECONNECT_INTERVAL_MS, v as ContractOutputs, w as memoryEntrySchema, x as Result, y as InspectData, z as Registration } from "./index-Dg3p5cmw.js";
|
|
6
6
|
import { t as Embedder } from "./embedding-provider-client-vynZMuit.js";
|
|
7
|
-
import { t as MemoryRetriever } from "./retriever-
|
|
8
|
-
import { C as MemoryStore } from "./memory-store-base-
|
|
9
|
-
import "./store-
|
|
10
|
-
import { n as AccessTracker } from "./access-tracker-
|
|
7
|
+
import { t as MemoryRetriever } from "./retriever-CI0r-RAK.js";
|
|
8
|
+
import { C as MemoryStore } from "./memory-store-base-5tTeqT7l.js";
|
|
9
|
+
import "./store-h8QmkTwl.js";
|
|
10
|
+
import { n as AccessTracker } from "./access-tracker-gzQVC6ur.js";
|
|
11
11
|
import { r as MemoryTelemetryUsageOutbox } from "./memory-telemetry-outbox-ddTdImt7.js";
|
|
12
|
-
import { t as ReflectionCommandParams } from "./reflection-command-hooks-
|
|
12
|
+
import { t as ReflectionCommandParams } from "./reflection-command-hooks-BkbZyh-G.js";
|
|
13
13
|
import { createMemoryRuntime } from "./internal/engine/provider/provider-registration.js";
|
|
14
14
|
//#region src/engine/contract-runtime.d.ts
|
|
15
15
|
interface MemoryRuntimeServices {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as selfImprovementConfigSchema, c as SESSION_STRATEGIES, i as memoryReflectionConfigSchema, n as retrievalConfigSchema, o as sessionMemoryConfigSchema, r as extractionConfigSchema, s as embeddingConfigSchema } from "./plugin-config-schema-
|
|
1
|
+
import { a as selfImprovementConfigSchema, c as SESSION_STRATEGIES, i as memoryReflectionConfigSchema, n as retrievalConfigSchema, o as sessionMemoryConfigSchema, r as extractionConfigSchema, s as embeddingConfigSchema } from "./plugin-config-schema-hIfZTELX.js";
|
|
2
2
|
import { recallLifecycleSchema } from "./internal/config/index.js";
|
|
3
|
-
import { n as observeConfigSchema } from "./plugin-config-observe-schema-
|
|
3
|
+
import { n as observeConfigSchema } from "./plugin-config-observe-schema-ue9XxUj_.js";
|
|
4
4
|
import { AGGREGATION_OPERATIONS, MEMORY_CATEGORIES } from "./internal/engine/shared/types.js";
|
|
5
5
|
import { n as DEGRADED_REASONS, t as ContractError } from "./error-D-wb-rZw.js";
|
|
6
6
|
import { a as toolResponseSchema, i as retrievalResultSchema, n as memoryEntrySchema, r as outputSchemas, t as inspectDataSchema } from "./results-BkMsHy7M.js";
|
|
@@ -8,7 +8,7 @@ import { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, M
|
|
|
8
8
|
import { a as readTrustedUserId, c as inspectProviderProjects, o as resolveProviderIdentity, s as SnoStationMemProviderSearchManager, t as createMemoryRuntime } from "./provider-registration-qLSA9CQl.js";
|
|
9
9
|
import { s as withMemoryOperation, t as checkMemoryOperation } from "./operation-cancellation-CTKWwNHk.js";
|
|
10
10
|
import { pruneOldestEntries, setLruEntry } from "./internal/engine/shared/lru.js";
|
|
11
|
-
import {
|
|
11
|
+
import { o as CODING_SKIN_LEDGER_MAX_CHARS, p as CODING_SKIN_SESSION_QUERY } from "./coding-skin-_Qu3INZD.js";
|
|
12
12
|
import { defaultSettings } from "./internal/config/settings.js";
|
|
13
13
|
import { i as createLlmClient } from "./llm-client-BOkokxti.js";
|
|
14
14
|
import { pickLlmRoutingConfig } from "./internal/model/llm-mode-routing.js";
|
|
@@ -24,7 +24,7 @@ import { executeMemoryStoreTool } from "./internal/engine/bindings/memory-store-
|
|
|
24
24
|
import { executeMemoryForgetTool } from "./internal/engine/bindings/memory-forget-tool.js";
|
|
25
25
|
import { executeMemoryUpdateTool } from "./internal/engine/bindings/memory-update-tool.js";
|
|
26
26
|
import { executeMemoryReflectionResolveTool } from "./internal/engine/bindings/memory-reflection-resolve-tool.js";
|
|
27
|
-
import { t as createRunMemoryReflection } from "./reflection-command-hooks-
|
|
27
|
+
import { t as createRunMemoryReflection } from "./reflection-command-hooks-_AiaIqap.js";
|
|
28
28
|
import { createReflectionLifecycleHandler1, createReflectionLifecycleHandler2 } from "./internal/engine/reflection/reflection-lifecycle-hooks.js";
|
|
29
29
|
import { createReflectionInjectionHandler1, createReflectionInjectionHandler2, createReflectionInjectionHandler3 } from "./internal/engine/reflection/reflection-injection-hooks.js";
|
|
30
30
|
import { z } from "zod";
|
|
@@ -820,14 +820,14 @@ var MemoryContractRuntime = class {
|
|
|
820
820
|
query: current === "session-start" ? CODING_SKIN_SESSION_QUERY : query,
|
|
821
821
|
limit,
|
|
822
822
|
minScore: minimum,
|
|
823
|
-
scopeFilter: context.scopePolicy.
|
|
823
|
+
scopeFilter: [context.scopePolicy.getDefaultScope()],
|
|
824
824
|
signal: retrievalSignal,
|
|
825
825
|
nowMs: Date.now(),
|
|
826
826
|
sessionId: key
|
|
827
827
|
});
|
|
828
828
|
retrievalSignal.throwIfAborted();
|
|
829
829
|
prepared.push({
|
|
830
|
-
hits,
|
|
830
|
+
hits: current === "prompt" ? hits.filter((hit) => hit.denseScore === void 0 || hit.denseScore >= .5) : hits,
|
|
831
831
|
cap: cfg.maxChars
|
|
832
832
|
});
|
|
833
833
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as pluginConfigSchema, t as PluginConfig } from "../../plugin-config-schema-
|
|
1
|
+
import { n as pluginConfigSchema, t as PluginConfig } from "../../plugin-config-schema-B-Zve3i5.js";
|
|
2
2
|
export { PluginConfig, pluginConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as pluginConfigSchema } from "../../plugin-config-schema-
|
|
1
|
+
import { t as pluginConfigSchema } from "../../plugin-config-schema-hIfZTELX.js";
|
|
2
2
|
export { pluginConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as llmRoutingConfigSchema, d as LLM_OCCASIONS, f as LlmOccasion, g as ProductMode, h as PRODUCT_MODES, m as LlmRoutingConfigInput, p as LlmRoutingConfig, u as DEFAULT_MODEL_MODE, v as modelCallsConfigSchema, y as remEnhancedConfigSchema } from "../../plugin-config-schema-
|
|
1
|
+
import { _ as llmRoutingConfigSchema, d as LLM_OCCASIONS, f as LlmOccasion, g as ProductMode, h as PRODUCT_MODES, m as LlmRoutingConfigInput, p as LlmRoutingConfig, u as DEFAULT_MODEL_MODE, v as modelCallsConfigSchema, y as remEnhancedConfigSchema } from "../../plugin-config-schema-B-Zve3i5.js";
|
|
2
2
|
export { DEFAULT_MODEL_MODE, LLM_OCCASIONS, LlmOccasion, LlmRoutingConfig, LlmRoutingConfigInput, PRODUCT_MODES, ProductMode, llmRoutingConfigSchema, modelCallsConfigSchema, remEnhancedConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as settingsToPluginConfig, S as settingsSchema, b as Settings, x as defaultSettings } from "../../plugin-config-schema-
|
|
1
|
+
import { C as settingsToPluginConfig, S as settingsSchema, b as Settings, x as defaultSettings } from "../../plugin-config-schema-B-Zve3i5.js";
|
|
2
2
|
export { Settings, defaultSettings, settingsSchema, settingsToPluginConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SESSION_STRATEGIES, t as pluginConfigSchema } from "../../plugin-config-schema-
|
|
1
|
+
import { c as SESSION_STRATEGIES, t as pluginConfigSchema } from "../../plugin-config-schema-hIfZTELX.js";
|
|
2
2
|
import { EMBEDDER_MODEL_DEFAULT } from "./index.js";
|
|
3
3
|
import { SUPPORTED_LOCALES } from "../engine/i18n/locales.js";
|
|
4
4
|
import { PRODUCT_MODES } from "./product-mode.js";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { g as ProductMode, h as PRODUCT_MODES, u as DEFAULT_MODEL_MODE } from "../../plugin-config-schema-
|
|
1
|
+
import { g as ProductMode, h as PRODUCT_MODES, u as DEFAULT_MODEL_MODE } from "../../plugin-config-schema-B-Zve3i5.js";
|
|
2
2
|
//#region config/skin-defaults.d.ts
|
|
3
3
|
export declare const HOST_MODEL_CALLBACK_HOST = "127.0.0.1";
|
|
4
4
|
export declare const HOST_MODEL_CALLBACK_PATH = "/v1/chat/completions";
|
|
5
|
+
/** Epoch milliseconds after which the requester no longer waits for the answer. */
|
|
6
|
+
export declare const HOST_MODEL_DEADLINE_HEADER = "x-sno-deadline";
|
|
5
7
|
//#endregion
|
|
6
8
|
export { DEFAULT_MODEL_MODE, PRODUCT_MODES, type ProductMode };
|
|
@@ -2,5 +2,7 @@ import { DEFAULT_MODEL_MODE, PRODUCT_MODES } from "./product-mode.js";
|
|
|
2
2
|
//#region config/skin-defaults.ts
|
|
3
3
|
const HOST_MODEL_CALLBACK_HOST = "127.0.0.1";
|
|
4
4
|
const HOST_MODEL_CALLBACK_PATH = "/v1/chat/completions";
|
|
5
|
+
/** Epoch milliseconds after which the requester no longer waits for the answer. */
|
|
6
|
+
const HOST_MODEL_DEADLINE_HEADER = "x-sno-deadline";
|
|
5
7
|
//#endregion
|
|
6
|
-
export { DEFAULT_MODEL_MODE, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, PRODUCT_MODES };
|
|
8
|
+
export { DEFAULT_MODEL_MODE, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, HOST_MODEL_DEADLINE_HEADER, PRODUCT_MODES };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getSidecarSocketPath, c as getStateDir, i as getSettingsPath, l as readSettings, n as getDiscoveryPath, o as getSnoStationMemStateDir, r as getPrincipal, s as getStartupLogPath, t as SettingsUnavailableError } from "../../profile-
|
|
1
|
+
import { a as getSidecarSocketPath, c as getStateDir, i as getSettingsPath, l as readSettings, n as getDiscoveryPath, o as getSnoStationMemStateDir, r as getPrincipal, s as getStartupLogPath, t as SettingsUnavailableError } from "../../profile-8bUJR11P.js";
|
|
2
2
|
export { SettingsUnavailableError, getDiscoveryPath, getPrincipal, getSettingsPath, getSidecarSocketPath, getSnoStationMemStateDir, getStartupLogPath, getStateDir, readSettings };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, f as MEMORY_SKIN_HEADER, h as memoryMethod, l as MEMORY_HEALTH_TIMEOUT_MS, m as REM_SIDECAR_TOKEN_HEADER, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, s as MEMORY_DEFAULT_SKIN_ID, u as MEMORY_RECONNECT_INTERVAL_MS } from "../../index-
|
|
1
|
+
import { c as MEMORY_ERROR_STATUS, d as MEMORY_ROUTES, f as MEMORY_SKIN_HEADER, h as memoryMethod, l as MEMORY_HEALTH_TIMEOUT_MS, m as REM_SIDECAR_TOKEN_HEADER, o as MEMORY_BODY_LIMIT_BYTES, p as MEMORY_START_TIMEOUT_MS, s as MEMORY_DEFAULT_SKIN_ID, u as MEMORY_RECONNECT_INTERVAL_MS } from "../../index-Dg3p5cmw.js";
|
|
2
2
|
export { MEMORY_BODY_LIMIT_BYTES, MEMORY_DEFAULT_SKIN_ID, MEMORY_ERROR_STATUS, MEMORY_HEALTH_TIMEOUT_MS, MEMORY_RECONNECT_INTERVAL_MS, MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, REM_SIDECAR_TOKEN_HEADER, memoryMethod };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as MemoryCategory } from "../../../types-
|
|
1
|
+
import { h as MemoryCategory } from "../../../types-Dcr6GKHy.js";
|
|
2
2
|
import { t as Embedder } from "../../../embedding-provider-client-vynZMuit.js";
|
|
3
|
-
import { t as MemoryRetriever } from "../../../retriever-
|
|
4
|
-
import { C as MemoryStore } from "../../../memory-store-base-
|
|
5
|
-
import "../../../store-
|
|
3
|
+
import { t as MemoryRetriever } from "../../../retriever-CI0r-RAK.js";
|
|
4
|
+
import { C as MemoryStore } from "../../../memory-store-base-5tTeqT7l.js";
|
|
5
|
+
import "../../../store-h8QmkTwl.js";
|
|
6
6
|
import { r as MemoryTelemetryUsageOutbox } from "../../../memory-telemetry-outbox-ddTdImt7.js";
|
|
7
7
|
import { Writable } from "node:stream";
|
|
8
8
|
//#region src/engine/bindings/memory-cli-shared.d.ts
|
|
@@ -10,7 +10,7 @@ import "../../../memory-tool-dependencies-CiofG6Lj.js";
|
|
|
10
10
|
import { assertAccessibleScopeForTool, getDefaultScopeForTool } from "./memory-tool-access.js";
|
|
11
11
|
import { makeResult, runWithAudit } from "./memory-tool-results.js";
|
|
12
12
|
import { storeParamsSchema } from "./memory-tool-schemas.js";
|
|
13
|
-
import { n as createRetireByNameRunBudget, r as runProfileSectionUpdate } from "../../../profile-section-writer-
|
|
13
|
+
import { n as createRetireByNameRunBudget, r as runProfileSectionUpdate } from "../../../profile-section-writer-DYcoa4ld.js";
|
|
14
14
|
//#region src/engine/bindings/memory-store-tool.ts
|
|
15
15
|
/** @file memory-store-tool.ts
|
|
16
16
|
* @purpose Registers the memory_store tool.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as MemoryScopePolicy } from "../../../memory-scope-policy-1gg5QlWZ.js";
|
|
2
|
-
import "../../../memory-tool-dependencies-
|
|
2
|
+
import "../../../memory-tool-dependencies-CrbtLLjj.js";
|
|
3
3
|
//#region src/engine/bindings/memory-tool-access.d.ts
|
|
4
4
|
export declare function assertAccessibleScope(scopePolicy: MemoryScopePolicy, scope: string, agentId?: string): string;
|
|
5
5
|
export declare function resolveAgentId(runtimeAgentId: unknown, fallback?: string): string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as SnoStationMemError } from "../../../errors-CeVRxf9V.js";
|
|
2
|
-
import "../../../memory-tool-dependencies-
|
|
2
|
+
import "../../../memory-tool-dependencies-CrbtLLjj.js";
|
|
3
3
|
import { ToolContext, ToolResult } from "./memory-tool-schemas.js";
|
|
4
4
|
//#region src/engine/bindings/memory-tool-results.d.ts
|
|
5
5
|
export declare function makeResult(text: string, details: Record<string, unknown>, isError?: boolean): ToolResult;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { p as LlmRoutingConfig, r as LlmClient } from "../../../plugin-config-schema-
|
|
2
|
-
import { h as MemoryCategory, r as AggregationQuery } from "../../../types-
|
|
1
|
+
import { p as LlmRoutingConfig, r as LlmClient } from "../../../plugin-config-schema-B-Zve3i5.js";
|
|
2
|
+
import { h as MemoryCategory, r as AggregationQuery } from "../../../types-Dcr6GKHy.js";
|
|
3
3
|
import { n as Locale } from "../../../locales-JxGmkG6t.js";
|
|
4
4
|
import { t as Embedder } from "../../../embedding-provider-client-vynZMuit.js";
|
|
5
|
-
import { t as MemoryRetriever } from "../../../retriever-
|
|
6
|
-
import { C as MemoryStore } from "../../../memory-store-base-
|
|
5
|
+
import { t as MemoryRetriever } from "../../../retriever-CI0r-RAK.js";
|
|
6
|
+
import { C as MemoryStore } from "../../../memory-store-base-5tTeqT7l.js";
|
|
7
7
|
import { t as MemoryScopePolicy } from "../../../memory-scope-policy-1gg5QlWZ.js";
|
|
8
|
-
import { t as z } from "../../../memory-tool-dependencies-
|
|
8
|
+
import { t as z } from "../../../memory-tool-dependencies-CrbtLLjj.js";
|
|
9
9
|
//#region src/engine/bindings/memory-tool-schemas.d.ts
|
|
10
10
|
export declare const recallParamsSchema: z.ZodType<{
|
|
11
11
|
query: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as PluginConfig } from "../../../plugin-config-schema-
|
|
1
|
+
import { t as PluginConfig } from "../../../plugin-config-schema-B-Zve3i5.js";
|
|
2
2
|
import { t as Embedder } from "../../../embedding-provider-client-vynZMuit.js";
|
|
3
|
-
import { C as MemoryStore } from "../../../memory-store-base-
|
|
3
|
+
import { C as MemoryStore } from "../../../memory-store-base-5tTeqT7l.js";
|
|
4
4
|
import { n as createScopePolicy } from "../../../memory-scope-policy-1gg5QlWZ.js";
|
|
5
5
|
import { PluginHookAgentContext, PluginHookAgentEndEvent } from "./sno-station-mem-hook-types.js";
|
|
6
|
-
import { r as AtomicInsightDistiller } from "../../../atomic-memory-extraction-
|
|
7
|
-
import { t as SnoStationMemPluginApi } from "../../../sno-station-mem-runtime-dependencies-
|
|
6
|
+
import { r as AtomicInsightDistiller } from "../../../atomic-memory-extraction-vz2gIrqC.js";
|
|
7
|
+
import { t as SnoStationMemPluginApi } from "../../../sno-station-mem-runtime-dependencies-eO6jFEYJ.js";
|
|
8
8
|
//#region src/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts
|
|
9
9
|
/** Runs atomic extraction after a successful top-level agent conversation. */
|
|
10
10
|
export type AmbientCaptureOutcome = "skipped" | "success" | "partial" | "failed";
|
|
@@ -7,7 +7,7 @@ import { a as serializeIntervalMetadata, i as parseSessionTimestamp, s as unreso
|
|
|
7
7
|
import { t as appendAuditEntry } from "../../../runtime-audit-log-BCeujlEp.js";
|
|
8
8
|
import { resolveHookAgentId } from "./sno-station-mem-runtime-mode.js";
|
|
9
9
|
import { c as shouldSkipReflectionMessage } from "../../../daily-log-generator-CH_KuWHs.js";
|
|
10
|
-
import "../../../sno-station-mem-runtime-dependencies-
|
|
10
|
+
import "../../../sno-station-mem-runtime-dependencies-jmuWbSfR.js";
|
|
11
11
|
import { buildConversationText, deriveSessionDateTime, extractAllMessageTexts, isAmbientLearningMessage, transcriptSessionDateTime } from "./sno-station-mem-message-transcript.js";
|
|
12
12
|
import { createLogger, currentLogContext, withLogContext } from "@snoai/utils/logger";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as PluginConfig } from "../../../plugin-config-schema-
|
|
2
|
-
import { t as MemoryRetriever } from "../../../retriever-
|
|
3
|
-
import { C as MemoryStore } from "../../../memory-store-base-
|
|
1
|
+
import { t as PluginConfig } from "../../../plugin-config-schema-B-Zve3i5.js";
|
|
2
|
+
import { t as MemoryRetriever } from "../../../retriever-CI0r-RAK.js";
|
|
3
|
+
import { C as MemoryStore } from "../../../memory-store-base-5tTeqT7l.js";
|
|
4
4
|
import { r as MemoryTelemetryUsageOutbox } from "../../../memory-telemetry-outbox-ddTdImt7.js";
|
|
5
5
|
import { n as createScopePolicy } from "../../../memory-scope-policy-1gg5QlWZ.js";
|
|
6
6
|
import { PluginHookAgentContext, PluginHookBeforeAgentStartEvent, PluginHookBeforeAgentStartResult } from "./sno-station-mem-hook-types.js";
|
|
7
|
-
import { t as SnoStationMemPluginApi } from "../../../sno-station-mem-runtime-dependencies-
|
|
7
|
+
import { t as SnoStationMemPluginApi } from "../../../sno-station-mem-runtime-dependencies-eO6jFEYJ.js";
|
|
8
8
|
//#region src/engine/bindings/sno-station-mem-auto-recall-hook.d.ts
|
|
9
9
|
export declare function extractAutoRecallQuery(prompt: string): string;
|
|
10
10
|
/** Injects relevant memories into the next agent turn after scope and cache checks. */
|
|
@@ -8,7 +8,7 @@ import { episodicEventDate, saidOnDate, sourceQuote } from "./memory-tool-format
|
|
|
8
8
|
import { r as retrieveForAutoRecall } from "../../../rem-consumer-retrieval-CR0dtcHR.js";
|
|
9
9
|
import { isChatIdBasedAgentId, resolveHookAgentId } from "./sno-station-mem-runtime-mode.js";
|
|
10
10
|
import { t as parseReflectionMetadata } from "../../../entry-metadata-parser-BIVSMCIk.js";
|
|
11
|
-
import "../../../sno-station-mem-runtime-dependencies-
|
|
11
|
+
import "../../../sno-station-mem-runtime-dependencies-jmuWbSfR.js";
|
|
12
12
|
import { resolveRuntimeSessionId } from "./sno-station-mem-session-state.js";
|
|
13
13
|
import { createLogger, currentLogContext, withLogContext } from "@snoai/utils/logger";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|