@snoai/memory 1.2.9 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/{access-tracker-D1e-2-Bb.d.ts → access-tracker-BOPHSJjf.d.ts} +4 -4
- package/dist/{adapter-TCrv5P-C.d.ts → adapter-lyb6RaQE.d.ts} +2 -2
- package/dist/{atomic-memory-extraction-C0n0wHzt.d.ts → atomic-memory-extraction-B_XpkhMd.d.ts} +7 -5
- package/dist/{atomic-memory-extraction-BG42OXou.js → atomic-memory-extraction-o2v8mp7G.js} +109 -50
- package/dist/{b-profile-section-dictionary-provider-y3DMQ518.d.ts → b-profile-section-dictionary-provider-BK5NBs-y.d.ts} +1 -1
- package/dist/{capture-policy-detector-BY7v5Cq1.d.ts → capture-policy-detector-BvVGmxxX.d.ts} +1 -1
- package/dist/{classifier-DnbbtwTS.d.ts → classifier-CXQxJJPP.d.ts} +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/{coding-skin-_Qu3INZD.js → coding-skin-azRXA51Z.js} +2 -1
- package/dist/coding-skin.d.ts +1 -0
- package/dist/coding-skin.js +2 -2
- package/dist/{config-BCZRhUvW.js → config-C7LzSWhG.js} +9 -4
- package/dist/{connection-C9YD5sgm.js → connection-PQcq3TPO.js} +1 -1
- package/dist/{derived-suppression-cache-BLAH0nB9.d.ts → derived-suppression-cache-Ckwjey7I.d.ts} +1 -1
- package/dist/diagnostic-encoder.js +1 -1
- package/dist/{index-dQMkc_6y.d.ts → index-CsPUNkcm.d.ts} +2 -2
- package/dist/{index-BO4RU_mc.d.ts → index-DPfJrOFD.d.ts} +1 -1
- package/dist/{index-DL8AVj0Z.d.ts → index-Pb9LrHgL.d.ts} +4 -5
- package/dist/index.d.ts +12 -9
- package/dist/index.js +106 -51
- package/dist/internal/config/index.d.ts +1 -1
- package/dist/internal/config/index.js +4 -5
- 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 +4 -4
- package/dist/internal/config/skin-defaults.d.ts +1 -1
- package/dist/internal/contract/profile.d.ts +1 -1
- package/dist/internal/contract/routes.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-cli-shared.d.ts +4 -4
- package/dist/internal/engine/bindings/memory-forget-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-list-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-recall-tool.js +2 -2
- package/dist/internal/engine/bindings/memory-reflection-resolve-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-stats-tool.js +2 -2
- package/dist/internal/engine/bindings/memory-store-tool.js +4 -4
- package/dist/internal/engine/bindings/memory-tool-access.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-access.js +1 -1
- package/dist/internal/engine/bindings/memory-tool-results.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-results.js +1 -1
- package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +5 -5
- package/dist/internal/engine/bindings/memory-tool-schemas.js +1 -1
- package/dist/internal/engine/bindings/memory-update-tool.js +3 -3
- 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 +4 -4
- 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 +3 -3
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.d.ts +6 -6
- package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +7 -5
- 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/bindings/sno-station-mem-runtime-mode.js +3 -3
- package/dist/internal/engine/extraction/atomic-memory-extraction.d.ts +1 -1
- package/dist/internal/engine/extraction/atomic-memory-extraction.js +1 -1
- package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.d.ts +1 -1
- package/dist/internal/engine/extraction/b-profile-section-rekey.d.ts +5 -5
- package/dist/internal/engine/extraction/capture-policy-detector.d.ts +1 -1
- package/dist/internal/engine/extraction/memory-metadata-codec.d.ts +2 -2
- package/dist/internal/engine/extraction/memory-temporality-classifier.d.ts +1 -1
- package/dist/internal/engine/extraction/memory-temporality-classifier.js +1 -1
- package/dist/internal/engine/observability/adapter.d.ts +1 -1
- package/dist/internal/engine/observability/memory-snapshot.d.ts +1 -1
- package/dist/internal/engine/observability/observable-embedder.d.ts +1 -1
- package/dist/internal/engine/observability/observable-llm-client.d.ts +1 -1
- package/dist/internal/engine/observability/observable-llm-client.js +0 -2
- package/dist/internal/engine/observability/observable-memory-store.d.ts +1 -1
- package/dist/internal/engine/observability/observable-memory-store.js +2 -2
- package/dist/internal/engine/observability/observable-retriever.d.ts +1 -1
- package/dist/internal/engine/observability/observable-retriever.js +2 -2
- package/dist/internal/engine/observability/runtime-diagnostics.d.ts +1 -1
- package/dist/internal/engine/observability/runtime-diagnostics.js +3 -3
- package/dist/internal/engine/operations/daily-spend-estimator.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 +3 -3
- package/dist/internal/engine/operations/runtime-audit-log.js +2 -2
- package/dist/internal/engine/provider/provider-registration.d.ts +4 -4
- package/dist/internal/engine/provider/provider-row-renderer.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-command-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-command-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-deps.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.js +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +1 -1
- package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +3 -3
- package/dist/internal/engine/reflection/strategy-hook-runner.js +2 -2
- package/dist/internal/engine/rem/classifier.d.ts +1 -1
- package/dist/internal/engine/rem/index.d.ts +2 -2
- package/dist/internal/engine/rem/index.js +9 -7
- package/dist/internal/engine/retrieval/access-tracker.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.js +1 -1
- package/dist/internal/engine/security/memory-scope-policy.js +1 -1
- package/dist/internal/engine/security/scopes.js +2 -2
- 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/shared/utils.d.ts +1 -1
- package/dist/internal/engine/shared/utils.js +2 -3
- package/dist/internal/engine/telemetry/memory-telemetry-api.js +2 -2
- package/dist/internal/engine/telemetry/observe-ledger.d.ts +1 -1
- package/dist/internal/engine/telemetry/observe-ledger.js +46 -19
- package/dist/internal/model/llm-client.d.ts +2 -2
- package/dist/internal/model/llm-client.js +1 -1
- package/dist/internal/model/llm-mode-routing.d.ts +1 -1
- package/dist/internal/model/llm-mode-routing.js +1 -1
- package/dist/internal/store/atomic-memory-cutover-sql.js +1 -1
- package/dist/internal/store/connection.js +1 -1
- package/dist/internal/store/maintenance.d.ts +2 -2
- package/dist/internal/store/maintenance.js +444 -40
- package/dist/internal/store/memory-kinds-cutover-migrator.js +1 -1
- package/dist/internal/store/migrations.js +1 -1
- package/dist/internal/store/store.d.ts +2 -2
- package/dist/internal/store/store.js +1 -1
- package/dist/{llm-client-RqmOEQkg.d.ts → llm-client-BTaUVmDe.d.ts} +1 -1
- package/dist/{llm-client-fVrzPcyz.js → llm-client-ConEyQEs.js} +51 -12
- package/dist/{log-site-catalog.generated-By86ZBRB.js → log-site-catalog.generated-Dzgj9o5c.js} +230 -195
- package/dist/log-site-catalog.json +1 -1
- package/dist/{memory-kind-policy-BOGb8thm.d.ts → memory-kind-policy-ClQEXeOL.d.ts} +1 -1
- package/dist/{memory-metadata-codec-DcSqjbWR.d.ts → memory-metadata-codec-wVAuoKrG.d.ts} +1 -1
- package/dist/{memory-runtime-CbuNkL0G.js → memory-runtime-C8ZIW2WL.js} +495 -304
- package/dist/{memory-scope-policy-DICSCURA.js → memory-scope-policy--TiLZnrE.js} +2 -2
- package/dist/{memory-snapshot-C5BnJ2rO.d.ts → memory-snapshot-uTdxJnIh.d.ts} +2 -2
- package/dist/{memory-store-base-z593oJ4h.d.ts → memory-store-base-Bk2dOKED.d.ts} +5 -6
- package/dist/{memory-store-shared-DqpWJXZZ.js → memory-store-shared-CURizQIy.js} +1 -1
- package/dist/{memory-telemetry-receipts-YsxbwOAf.js → memory-telemetry-receipts-cjIQGwdp.js} +5 -1
- package/dist/{memory-temporality-classifier-SzlUCgTj.d.ts → memory-temporality-classifier-CcxfHYoT.d.ts} +1 -1
- package/dist/{memory-temporality-classifier-CeSOL2vq.js → memory-temporality-classifier-MBJyJdvB.js} +2 -2
- package/dist/{memory-tier-promoter-Z7jprFB7.d.ts → memory-tier-promoter-MkZPQ8u1.d.ts} +1 -1
- package/dist/memory-tool-dependencies-CWnD5mia.d.ts +14 -0
- package/dist/{memory-tool-dependencies-CnaGABQG.js → memory-tool-dependencies-DUMY8SwB.js} +3 -3
- package/dist/{model-call-table-BZJQkbKX.js → model-call-table-BE97f37s.js} +6 -1
- package/dist/{observable-embedder-DjhGxHx2.d.ts → observable-embedder-CGr3Zejf.d.ts} +1 -1
- package/dist/{observable-llm-client-CLJLMmwA.d.ts → observable-llm-client-CXUA7Gi3.d.ts} +3 -3
- package/dist/{observable-memory-store-B48HV2NK.d.ts → observable-memory-store-BwwKcUzf.d.ts} +4 -4
- package/dist/{observable-retriever-CAdHncKh.d.ts → observable-retriever-bJbG9WtJ.d.ts} +5 -5
- package/dist/paths-DmmPxD_v.d.ts +1 -0
- package/dist/{plugin-config-schema-VBSPGEG3.d.ts → plugin-config-schema-BrhMvnXJ.d.ts} +3 -1
- package/dist/{plugin-config-schema-hIfZTELX.js → plugin-config-schema-Di-uKTP0.js} +1 -1
- package/dist/{profile-CQNCtVIu.d.ts → profile-CF5oDjR7.d.ts} +1 -1
- package/dist/{profile-section-writer-joJEIYhF.js → profile-section-writer-CmNa95uN.js} +3 -3
- package/dist/{reflection-command-hooks-Cl0ShtbF.d.ts → reflection-command-hooks-CM2mWb69.d.ts} +4 -4
- package/dist/{reflection-command-hooks-CG8n1GNK.js → reflection-command-hooks-CnTj8cKL.js} +3 -3
- package/dist/{reflection-deps-B0_cPBZt.d.ts → reflection-deps-B5I0nYZS.d.ts} +2 -2
- package/dist/{reflection-embedded-generator-C5kA0T0v.d.ts → reflection-embedded-generator-CogQIBcG.d.ts} +3 -3
- package/dist/{reflection-embedded-generator-D342_5o_.js → reflection-embedded-generator-DR525Moy.js} +1 -1
- package/dist/{reflection-injection-hooks-CtgcjLGx.d.ts → reflection-injection-hooks-BnbfZqpj.d.ts} +4 -4
- package/dist/{reflection-lifecycle-hooks-Pd7P9wya.d.ts → reflection-lifecycle-hooks-DMDhtidj.d.ts} +3 -3
- package/dist/{rem-batch-executor-ryxxkzQp.js → rem-batch-executor-DbV8Y-B-.js} +1 -1
- package/dist/{rem-consumer-retrieval-CR0dtcHR.js → rem-consumer-retrieval-CDMSCJYI.js} +2 -1
- package/dist/{rem-trigger-Dz_Jrr9p.js → rem-trigger-BSrGyG0s.js} +1666 -1010
- package/dist/{retriever-BXQmJMh0.js → retriever-Bzz6H8Mn.js} +2 -2
- package/dist/{retriever-DQdyGlkr.d.ts → retriever-DyxY59Lg.d.ts} +10 -8
- package/dist/{runtime-audit-log-BCeujlEp.js → runtime-audit-log-DK6xAYxh.js} +103 -2
- package/dist/{runtime-audit-log-Bn3JLBPj.d.ts → runtime-audit-log-DdhLlTxi.d.ts} +4 -2
- package/dist/{scopes-CSOn6zdd.js → scopes-a4Kly9n7.js} +1 -1
- package/dist/{server-DFLEPkQA.js → server-CjwHZY1P.js} +17 -320
- package/dist/sidecar/main.js +11 -4
- package/dist/sno-station-mem-runtime-dependencies-BZjUo6Jr.d.ts +31 -0
- package/dist/{sno-station-mem-runtime-dependencies-CY-XDHxU.js → sno-station-mem-runtime-dependencies-DlvM6mL7.js} +9 -9
- package/dist/{store-DKndKig1.d.ts → store-BDIAl2cc.d.ts} +1 -1
- package/dist/{store-CUk-jEGA.js → store-BQxkgJTX.js} +31 -23
- package/dist/{strategy-hook-runner-BSk_o6Yt.d.ts → strategy-hook-runner-DT9emgCZ.d.ts} +7 -7
- package/dist/{strategy-hook-runner-CWApiUZW.js → strategy-hook-runner-SvyyGBXw.js} +1 -1
- package/dist/{types-Del9J7UB.d.ts → types-Ae3a8562.d.ts} +1 -1
- package/dist/{utils-Ctb9aevJ.d.ts → utils-CDw2ttQf.d.ts} +2 -3
- package/package.json +2 -2
- package/settings.default.json +4 -4
- package/dist/memory-tool-dependencies-CJNppsKh.d.ts +0 -14
- package/dist/paths-D3dEsoE4.d.ts +0 -1
- package/dist/sno-station-mem-runtime-dependencies-8CRIkARK.d.ts +0 -31
- package/dist/{unplaced-candidate-migration-CbQHzcEM.js → unplaced-candidate-migration-BCcdQkcx.js} +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @snoai/memory
|
|
2
2
|
|
|
3
|
-
The memory engine behind Sno Station: encrypted, local,
|
|
3
|
+
The memory engine behind Sno Station: encrypted, local, used by every agent you run.
|
|
4
4
|
|
|
5
5
|
It stores what your coding agents learn, finds it again when it matters, and corrects it
|
|
6
6
|
without losing history. Claude Code, Codex, OpenClaw and Hermes Agent all talk to this one
|
|
@@ -13,14 +13,14 @@ engine, so what one agent learns is there for the next.
|
|
|
13
13
|
- **Encrypted from first use.** The store is a SQLite database encrypted with a key made once
|
|
14
14
|
on your machine (`@snoai/sqlite-crypto`). Sno never receives your database or your key.
|
|
15
15
|
- **No account, no API key to start.** Local First mode runs fully on your machine; Agent
|
|
16
|
-
Native and REM Enhanced let a model help with the memory work.
|
|
16
|
+
Native and REM Enhanced let a model help with the memory work. REM is how your agents dream: overnight they strengthen their memory and settle what they learned. In REM Enhanced your memory text and lessons go to your own space in Sno's cloud, which works like your own cloud drive: a Sno program processes it for you alone, and you can delete it at any time.
|
|
17
17
|
- **Eight languages.** English, Chinese (Simplified and Traditional), Japanese, Korean,
|
|
18
18
|
German, French, Spanish and Russian, with each memory stored with its language.
|
|
19
19
|
- **No daemon.** The engine runs as a local service on `127.0.0.1` that the agent plugins
|
|
20
20
|
start when they need it.
|
|
21
21
|
|
|
22
22
|
Who it is for: you do not use this package directly. Follow the
|
|
23
|
-
[
|
|
23
|
+
[memory service setup](https://github.com/sno-ai/sno-station/blob/main/docs/memory-setup.md)
|
|
24
24
|
(it installs this package into `~/.sno`), then add the plugin for your agent:
|
|
25
25
|
[Codex](https://www.npmjs.com/package/@snoai/mem-codex),
|
|
26
26
|
[Claude Code](https://www.npmjs.com/package/@snoai/mem-claude) or
|
|
@@ -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.11
|
|
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-
|
|
2
|
-
import { sn as RecallLifecycleConfig } from "./index-
|
|
3
|
-
import { C as MemoryStore } from "./memory-store-base-
|
|
4
|
-
import "./store-
|
|
1
|
+
import { v as MemoryMetadata } from "./types-Ae3a8562.js";
|
|
2
|
+
import { sn as RecallLifecycleConfig } from "./index-Pb9LrHgL.js";
|
|
3
|
+
import { C as MemoryStore } from "./memory-store-base-Bk2dOKED.js";
|
|
4
|
+
import "./store-BDIAl2cc.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-BrhMvnXJ.js";
|
|
2
|
+
import "./types-Ae3a8562.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
|
package/dist/{atomic-memory-extraction-C0n0wHzt.d.ts → atomic-memory-extraction-B_XpkhMd.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-BrhMvnXJ.js";
|
|
2
2
|
import { n as Locale } from "./locales-JxGmkG6t.js";
|
|
3
|
-
import { qt as AdapterAMemoryView } from "./index-
|
|
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-
|
|
3
|
+
import { qt as AdapterAMemoryView } from "./index-DPfJrOFD.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-Bk2dOKED.js";
|
|
5
|
+
import "./store-BDIAl2cc.js";
|
|
6
|
+
import "./llm-client-BTaUVmDe.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";
|
|
@@ -296,6 +296,8 @@ interface AtomicExtractPersistResult {
|
|
|
296
296
|
interface AtomicInsightDistillerConfig {
|
|
297
297
|
defaultScope: string;
|
|
298
298
|
locale?: Locale;
|
|
299
|
+
scheduleArrivalRetirement?: (task: () => Promise<void>) => void;
|
|
300
|
+
captureBatch?: boolean;
|
|
299
301
|
}
|
|
300
302
|
interface WindowDiagnostics {
|
|
301
303
|
proposed: number;
|
|
@@ -2,22 +2,22 @@ import { ATOMIC_CAPTURE_OUTPUT_TOKEN_BUDGET, ATOMIC_CAPTURE_TIMEOUT_MS, ATOMIC_E
|
|
|
2
2
|
import "./internal/engine/i18n/locales.js";
|
|
3
3
|
import { $ as FIXED_MEMORY_SNO_EXTRACT_PROFILE, Q as FIXED_MEMORY_SNO_EXTRACT_CHAT } from "./signed-registry-constants-yq3DlG3B.js";
|
|
4
4
|
import { redactSecrets } from "./internal/engine/security/redact.js";
|
|
5
|
-
import {
|
|
5
|
+
import { t as appendAuditEntry } from "./runtime-audit-log-DK6xAYxh.js";
|
|
6
|
+
import { a as isTerminalLlmFailure, i as createLlmClient, n as LlmClientTerminalError } from "./llm-client-ConEyQEs.js";
|
|
6
7
|
import { n as readModelReplyJson } from "./model-reply-text-CKopStP2.js";
|
|
7
8
|
import { resolveLlmRoute } from "./internal/model/llm-mode-routing.js";
|
|
8
9
|
import { n as ATOMIC_EXTRACTION_SKILL_HASH, r as atomicExtractionSkillReference, t as ATOMIC_EXTRACTION_SKILL } from "./atomic-extraction-skill-CcXmuCqL.js";
|
|
9
10
|
import { stripEnvelopeMetadata } from "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
10
11
|
import { a as sessionZoneCarriedBy, t as calculateCalendarTime } from "./calendar-instruction-CzqZbAPG.js";
|
|
11
|
-
import "./memory-temporality-classifier-
|
|
12
|
-
import { t as appendAuditEntry } from "./runtime-audit-log-BCeujlEp.js";
|
|
12
|
+
import "./memory-temporality-classifier-MBJyJdvB.js";
|
|
13
13
|
import { a as parseAtomicCaptureReply, c as atomic_extraction_response_schema_default, i as fallbackAtomicCapturedFact, l as excludeProgressRecords, n as ATOMIC_ENRICHMENT_RESPONSE_JSON_SCHEMA, o as parseAtomicEnrichmentReply, r as ATOMIC_EXTRACTION_RESPONSE_JSON_SCHEMA, s as parseAtomicExtractionReply, t as ATOMIC_CAPTURE_RESPONSE_JSON_SCHEMA } from "./atomic-extraction-reply-BJ9XV_9s.js";
|
|
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
|
-
import { g as randomUUID$1 } from "./memory-store-shared-
|
|
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-
|
|
16
|
+
import { g as randomUUID$1 } from "./memory-store-shared-CURizQIy.js";
|
|
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-BQxkgJTX.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-CmNa95uN.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";
|
|
@@ -909,7 +909,8 @@ function parseBProfileMessages(conversationText) {
|
|
|
909
909
|
* One logical task: one initial attempt plus at most one retry.
|
|
910
910
|
*
|
|
911
911
|
* The transport collapses "could not reach it" and "it answered with nothing" into a null
|
|
912
|
-
* completion
|
|
912
|
+
* completion; an empty answer ends the turn at once (asking again gets the same nothing), while
|
|
913
|
+
* a connection failure or a reply that fails either validation stage is retried. A reply
|
|
913
914
|
* that passes is never retried — including one whose candidates all dropped, which is a real
|
|
914
915
|
* answer about that turn and not a failure to get one.
|
|
915
916
|
*/
|
|
@@ -920,13 +921,14 @@ async function extractOneTurn(prompt, llm, turnIndex, turnText) {
|
|
|
920
921
|
raw = await llm.completeText({
|
|
921
922
|
prompt,
|
|
922
923
|
callId: "E9",
|
|
923
|
-
maxTokens: PROFILE_EXTRACTION_MAX_TOKENS
|
|
924
|
+
maxTokens: PROFILE_EXTRACTION_MAX_TOKENS,
|
|
925
|
+
emptyReplyAttempts: 1
|
|
924
926
|
});
|
|
925
927
|
} catch (error) {
|
|
926
928
|
if (isRetryableTransportError(error)) continue;
|
|
927
929
|
throw error;
|
|
928
930
|
}
|
|
929
|
-
if (raw === null)
|
|
931
|
+
if (raw === null) return void 0;
|
|
930
932
|
const outcome = readReply(raw, turnIndex, turnText);
|
|
931
933
|
if (outcome) return outcome;
|
|
932
934
|
}
|
|
@@ -1364,12 +1366,22 @@ function buildAtomicGenericExtractionPrompt(turns, sessionDateTime, locale = "en
|
|
|
1364
1366
|
}
|
|
1365
1367
|
function renderAtomicLaneContext(input) {
|
|
1366
1368
|
const locale = input.locale ?? "en";
|
|
1369
|
+
const turns = numberAtomicTurns(input.turns);
|
|
1370
|
+
const preceding = [...input.contextTurns ?? []];
|
|
1371
|
+
const following = [...input.followingTurns ?? []];
|
|
1372
|
+
while (countTokens(JSON.stringify({
|
|
1373
|
+
turns,
|
|
1374
|
+
preceding,
|
|
1375
|
+
following
|
|
1376
|
+
})) > input.runParameters.maxInputTokens) if (preceding.length > 0) preceding.shift();
|
|
1377
|
+
else if (following.length > 0) following.pop();
|
|
1378
|
+
else break;
|
|
1367
1379
|
return [
|
|
1368
1380
|
`session_date_time: ${input.sessionDateTime ?? "unknown"}`,
|
|
1369
1381
|
atomicExtractionSkillReference("surrounding-context"),
|
|
1370
|
-
`preceding_context: ${renderAtomicPromptData(
|
|
1371
|
-
`following_context: ${renderAtomicPromptData(
|
|
1372
|
-
`transcript:\n${renderAtomicPromptData(
|
|
1382
|
+
`preceding_context: ${renderAtomicPromptData(preceding, locale).value}`,
|
|
1383
|
+
`following_context: ${renderAtomicPromptData(following, locale).value}`,
|
|
1384
|
+
`transcript:\n${renderAtomicPromptData(turns, locale).value}`
|
|
1373
1385
|
].join("\n\n");
|
|
1374
1386
|
}
|
|
1375
1387
|
function buildAtomicCapturePrompt(input) {
|
|
@@ -1856,6 +1868,22 @@ async function splitAtomicCaptureTurn(input, outputTokenBudget, attempts, failed
|
|
|
1856
1868
|
};
|
|
1857
1869
|
}
|
|
1858
1870
|
async function captureAtomicWindow(input, outputTokenBudget, attempts) {
|
|
1871
|
+
if (countTokens(JSON.stringify({
|
|
1872
|
+
turns: numberAtomicTurns(input.turns),
|
|
1873
|
+
preceding: [],
|
|
1874
|
+
following: []
|
|
1875
|
+
})) > input.runParameters.maxInputTokens) {
|
|
1876
|
+
if (input.turns.length > 1) return splitAtomicCaptureWindow(input, outputTokenBudget, attempts);
|
|
1877
|
+
if (splitTurnContent(input.turns[0]?.content ?? "") === void 0) {
|
|
1878
|
+
input.store.recordAtomicExtractionCalls(input.ledgerKey, input.nowMs());
|
|
1879
|
+
return {
|
|
1880
|
+
status: "pending",
|
|
1881
|
+
reason: "input-overflow",
|
|
1882
|
+
failedReply: ""
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1885
|
+
return splitAtomicCaptureTurn(input, outputTokenBudget, attempts, "");
|
|
1886
|
+
}
|
|
1859
1887
|
const sanitizedInput = sanitizeAtomicPromptValue(input.turns, input.locale ?? "en");
|
|
1860
1888
|
const prompt = buildAtomicCapturePrompt(input);
|
|
1861
1889
|
let lastReply = "";
|
|
@@ -2372,6 +2400,7 @@ function countTodoTransitionsWithoutSource(database) {
|
|
|
2372
2400
|
*/
|
|
2373
2401
|
const log = createLogger("sno-station-mem:atomic-extraction-windows");
|
|
2374
2402
|
const windowDiagnosticContext = new AsyncLocalStorage();
|
|
2403
|
+
const arrivalRetirementContext = new AsyncLocalStorage();
|
|
2375
2404
|
function windowDiagnostics() {
|
|
2376
2405
|
return {
|
|
2377
2406
|
proposed: 0,
|
|
@@ -2575,10 +2604,10 @@ function parseAtomicConversationTurns(conversationText) {
|
|
|
2575
2604
|
if (current) turns.push(current);
|
|
2576
2605
|
return turns;
|
|
2577
2606
|
}
|
|
2578
|
-
function atomicConversationWindows(turns) {
|
|
2607
|
+
function atomicConversationWindows(turns, captureBatch = false) {
|
|
2579
2608
|
const userIndexes = turns.flatMap((turn, index) => turn.role === "user" ? [index] : []);
|
|
2580
2609
|
if (userIndexes.length === 0) return [];
|
|
2581
|
-
if (userIndexes.length <= 2) return [{
|
|
2610
|
+
if (captureBatch || userIndexes.length <= 2) return [{
|
|
2582
2611
|
turns: [...turns],
|
|
2583
2612
|
contextTurns: [],
|
|
2584
2613
|
followingTurns: [],
|
|
@@ -2743,7 +2772,14 @@ function createSignedAtomicMemoryExtractionTransports(config, locale = "en") {
|
|
|
2743
2772
|
retirementVerdict: { judge: (pair) => chat.completeText({
|
|
2744
2773
|
prompt: adapterPrompt ? renderAdapterAPrompt(pair.older, pair.newer) : renderAdapterAChatPrompt(pair),
|
|
2745
2774
|
hostPrompt: renderAdapterAChatPrompt(pair),
|
|
2746
|
-
callId: "E10"
|
|
2775
|
+
callId: "E10",
|
|
2776
|
+
takeProviderAttempt: () => {
|
|
2777
|
+
const work = arrivalRetirementContext.getStore();
|
|
2778
|
+
if (!work) return true;
|
|
2779
|
+
if (work.providerCallsLeft <= 0) return false;
|
|
2780
|
+
work.providerCallsLeft -= 1;
|
|
2781
|
+
return true;
|
|
2782
|
+
}
|
|
2747
2783
|
}) }
|
|
2748
2784
|
};
|
|
2749
2785
|
}
|
|
@@ -2757,7 +2793,12 @@ var AtomicInsightDistiller = class {
|
|
|
2757
2793
|
this.config = config;
|
|
2758
2794
|
}
|
|
2759
2795
|
async extractAndPersist(conversationText, sessionKey, options = {}) {
|
|
2760
|
-
|
|
2796
|
+
const retirement = {
|
|
2797
|
+
remaining: 3,
|
|
2798
|
+
providerCallsLeft: 3,
|
|
2799
|
+
...this.config.scheduleArrivalRetirement ? { tasks: [] } : {}
|
|
2800
|
+
};
|
|
2801
|
+
return arrivalRetirementContext.run(retirement, () => withLogContext({
|
|
2761
2802
|
operation_id: currentLogContext().operation_id ?? randomUUID(),
|
|
2762
2803
|
session_reference: sessionKey
|
|
2763
2804
|
}, async () => {
|
|
@@ -2766,7 +2807,7 @@ var AtomicInsightDistiller = class {
|
|
|
2766
2807
|
let captureOutcome = "failed";
|
|
2767
2808
|
try {
|
|
2768
2809
|
if (!sessionKey.trim()) throw new Error("Atomic extraction requires sessionKey");
|
|
2769
|
-
const windows = atomicConversationWindows(parseAtomicConversationTurns(conversationText));
|
|
2810
|
+
const windows = atomicConversationWindows(parseAtomicConversationTurns(conversationText), this.config.captureBatch);
|
|
2770
2811
|
if (windows.length === 0) log.warn("atomic extraction found no parseable turn; nothing will be stored", { session_reference: privateLogReference(sessionKey) }, {
|
|
2771
2812
|
event_name: "memory.atomic_memory_extraction.diagnostic",
|
|
2772
2813
|
file: "packages/memory/src/engine/extraction/atomic-memory-extraction.ts",
|
|
@@ -2882,6 +2923,10 @@ var AtomicInsightDistiller = class {
|
|
|
2882
2923
|
...llmFailures > 0 ? { llmFailures } : {}
|
|
2883
2924
|
};
|
|
2884
2925
|
} finally {
|
|
2926
|
+
const tasks = retirement.tasks;
|
|
2927
|
+
if (tasks && tasks.length > 0) this.config.scheduleArrivalRetirement?.(async () => {
|
|
2928
|
+
for (const task of tasks) await task();
|
|
2929
|
+
});
|
|
2885
2930
|
const sum = (field) => diagnostics.reduce((total, row) => total + row[field], 0);
|
|
2886
2931
|
log[captureOutcome === "failed" ? "error" : "info"]("Memory capture completed", {
|
|
2887
2932
|
outcome: captureOutcome === "failed" && sum("persisted") > 0 ? "partial" : captureOutcome,
|
|
@@ -2910,7 +2955,7 @@ var AtomicInsightDistiller = class {
|
|
|
2910
2955
|
site_id: "memory.capture.completed"
|
|
2911
2956
|
});
|
|
2912
2957
|
}
|
|
2913
|
-
});
|
|
2958
|
+
}));
|
|
2914
2959
|
}
|
|
2915
2960
|
};
|
|
2916
2961
|
async function resolveSubjects(store, projectId, records, transport, jobId, nowMs) {
|
|
@@ -3476,37 +3521,47 @@ async function runAtomicMemoryExtraction(input) {
|
|
|
3476
3521
|
diagnostic.outcome = write.createdCount > 0 ? "success" : "empty_success";
|
|
3477
3522
|
publishClaims();
|
|
3478
3523
|
const nominatedCards = cards.filter((card) => card.lane === "active");
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3524
|
+
const retirement = arrivalRetirementContext.getStore() ?? {
|
|
3525
|
+
remaining: 3,
|
|
3526
|
+
providerCallsLeft: 3
|
|
3527
|
+
};
|
|
3528
|
+
const retire = async () => {
|
|
3529
|
+
for (const card of nominatedCards) {
|
|
3530
|
+
if (retirement.remaining <= 0 || retirement.providerCallsLeft <= 0) break;
|
|
3531
|
+
const stored = input.store.findByExtractionIdempotencyKey(input.projectId, card.idempotencyKey);
|
|
3532
|
+
if (stored === void 0) continue;
|
|
3533
|
+
try {
|
|
3534
|
+
await runAtomicArrivalRetirementJudgment({
|
|
3535
|
+
store: input.store,
|
|
3536
|
+
projectId: input.projectId,
|
|
3537
|
+
jobId: input.ledgerKey.conversationId,
|
|
3538
|
+
nominatedRowId: stored.id,
|
|
3539
|
+
nowMs: atomicFactWrite.nowMs,
|
|
3540
|
+
transport: input.transports.retirementVerdict,
|
|
3541
|
+
budget: retirement
|
|
3542
|
+
});
|
|
3543
|
+
} catch (error) {
|
|
3544
|
+
log.error("atomic arrival retirement failed after write; older facts stay current", {
|
|
3545
|
+
nominatedRowId: stored.id,
|
|
3546
|
+
session_reference: privateLogReference(input.ledgerKey.conversationId),
|
|
3547
|
+
error
|
|
3548
|
+
}, {
|
|
3549
|
+
event_name: "memory.atomic_memory_extraction.diagnostic",
|
|
3550
|
+
file: "packages/memory/src/engine/extraction/atomic-memory-extraction.ts",
|
|
3551
|
+
function: "runAtomicMemoryExtraction",
|
|
3552
|
+
site_id: "extraction.atomic-memory-extraction.runAtomicMemoryExtraction.0d9673d494"
|
|
3553
|
+
});
|
|
3554
|
+
journalAtomicArrivalRetirementRefusal(input.store, {
|
|
3555
|
+
jobId: input.ledgerKey.conversationId,
|
|
3556
|
+
nominatedRowId: stored.id,
|
|
3557
|
+
reason: `judgment_failed:${error instanceof Error ? error.message : String(error)}`,
|
|
3558
|
+
candidateSetSize: 0
|
|
3559
|
+
});
|
|
3560
|
+
}
|
|
3508
3561
|
}
|
|
3509
|
-
}
|
|
3562
|
+
};
|
|
3563
|
+
if (retirement.tasks) retirement.tasks.push(retire);
|
|
3564
|
+
else await retire();
|
|
3510
3565
|
return {
|
|
3511
3566
|
status: "complete",
|
|
3512
3567
|
records: resolved.records,
|
|
@@ -3604,9 +3659,13 @@ async function runAtomicArrivalRetirementJudgment(input) {
|
|
|
3604
3659
|
const candidateSet = await readAtomicArrivalRetirementCandidateSet(input.store, input);
|
|
3605
3660
|
if (candidateSet === void 0 || candidateSet.candidateRows.length === 0) return;
|
|
3606
3661
|
const replaced = /* @__PURE__ */ new Set();
|
|
3607
|
-
const queue =
|
|
3662
|
+
const queue = candidateSet.candidateRows.slice(0, input.budget.remaining);
|
|
3663
|
+
input.budget.remaining -= queue.length;
|
|
3608
3664
|
const judgeQueued = async () => {
|
|
3609
|
-
for (let candidate = queue.shift(); candidate !== void 0; candidate = queue.shift())
|
|
3665
|
+
for (let candidate = queue.shift(); candidate !== void 0; candidate = queue.shift()) {
|
|
3666
|
+
if (input.budget.providerCallsLeft <= 0) break;
|
|
3667
|
+
if (await judgeArrivalRetirementPair(input, candidateSet, candidate) === "replacement") replaced.add(candidate.id);
|
|
3668
|
+
}
|
|
3610
3669
|
};
|
|
3611
3670
|
await Promise.all(Array.from({ length: ARRIVAL_RETIREMENT_PAIRS_IN_FLIGHT }, judgeQueued));
|
|
3612
3671
|
await closeAtomicArrivalRetirementTargets(input.store, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ProductMode } from "./plugin-config-schema-
|
|
1
|
+
import { g as ProductMode } from "./plugin-config-schema-BrhMvnXJ.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-BY7v5Cq1.d.ts → capture-policy-detector-BvVGmxxX.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as MemoryCategory } from "./types-
|
|
1
|
+
import { h as MemoryCategory } from "./types-Ae3a8562.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. */
|
|
@@ -123,7 +123,7 @@ interface RemRepository {
|
|
|
123
123
|
pairingConfigHash: string;
|
|
124
124
|
}): VerdictGenerationRef | undefined;
|
|
125
125
|
listVerdictPairs(generationId: string): VerdictPairQueueItem[];
|
|
126
|
-
/** The given pairs already
|
|
126
|
+
/** The given pairs already settled or exhausted in any generation. */
|
|
127
127
|
readClosedVerdictPairIds(pairIds: readonly string[]): Set<string>;
|
|
128
128
|
claimNextPair(input: {
|
|
129
129
|
generationId: string;
|
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-CsPUNkcm.js";
|
|
3
3
|
//#region src/contract/client.d.ts
|
|
4
4
|
export interface ConnectOptions {
|
|
5
5
|
skinId: string;
|
|
@@ -158,6 +158,7 @@ const CODING_SKIN_CHILD_DEADLINE_MS = 11e4;
|
|
|
158
158
|
const CODING_SKIN_WORKER_LIFETIME_MS = 54e4;
|
|
159
159
|
const CODING_SKIN_RETRY_DELAYS_MS = [2e3, 1e4];
|
|
160
160
|
const CODING_SKIN_MAX_ATTEMPTS = 3;
|
|
161
|
+
const CODING_SKIN_MAX_PENDING_CAPTURES = 1e3;
|
|
161
162
|
const CODING_SKIN_IMPORT_INTERVAL_MS = 2010;
|
|
162
163
|
const CODING_SKIN_CHILD_MAX_BUFFER_BYTES = 8388608;
|
|
163
164
|
const CODING_SKIN_MANUAL_SESSION_ID = "manual";
|
|
@@ -255,4 +256,4 @@ function isCodingSkinHookCommand(command, subcommand, harness) {
|
|
|
255
256
|
return basename(snoProgramPath(program)) === "sno";
|
|
256
257
|
}
|
|
257
258
|
//#endregion
|
|
258
|
-
export {
|
|
259
|
+
export { isAgentText as C, foldActivity as S, isCodingSkinHookCommand as _, CODING_SKIN_IMPORT_INTERVAL_MS as a, EMPTY_ACTIVITY_CURSOR as b, CODING_SKIN_MAX_ATTEMPTS as c, CODING_SKIN_RECALL_ITEM_MAX_CHARS as d, CODING_SKIN_RECALL_SENTENCE_MAX_CHARS as f, codingSkinHookCommand as g, CODING_SKIN_WORKER_LIFETIME_MS as h, CODING_SKIN_HOOKS as i, CODING_SKIN_MAX_PENDING_CAPTURES as l, CODING_SKIN_SESSION_QUERY as m, CODING_SKIN_CHILD_MAX_BUFFER_BYTES as n, CODING_SKIN_LEDGER_MAX_CHARS as o, CODING_SKIN_RETRY_DELAYS_MS as p, CODING_SKIN_CURSOR_HOOKS as r, CODING_SKIN_MANUAL_SESSION_ID as s, CODING_SKIN_CHILD_DEADLINE_MS as t, CODING_SKIN_MODEL_COMMANDS as u, shellQuote as v, readNewLines as w, activityCursorSchema as x, snoProgramPath as y };
|
package/dist/coding-skin.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export declare const CODING_SKIN_CHILD_DEADLINE_MS = 11e4;
|
|
|
61
61
|
export declare const CODING_SKIN_WORKER_LIFETIME_MS: number;
|
|
62
62
|
export declare const CODING_SKIN_RETRY_DELAYS_MS: readonly [2_000, 10_000];
|
|
63
63
|
export declare const CODING_SKIN_MAX_ATTEMPTS = 3;
|
|
64
|
+
export declare const CODING_SKIN_MAX_PENDING_CAPTURES = 1e3;
|
|
64
65
|
export declare const CODING_SKIN_IMPORT_INTERVAL_MS = 2010;
|
|
65
66
|
export declare const CODING_SKIN_CHILD_MAX_BUFFER_BYTES: number;
|
|
66
67
|
export declare const CODING_SKIN_MANUAL_SESSION_ID = "manual";
|
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
3
|
import { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, HOST_MODEL_DEADLINE_HEADER } from "./internal/config/skin-defaults.js";
|
|
4
|
-
import { C as
|
|
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 };
|
|
4
|
+
import { C as isAgentText, S as foldActivity, _ as isCodingSkinHookCommand, a as CODING_SKIN_IMPORT_INTERVAL_MS, b as EMPTY_ACTIVITY_CURSOR, c as CODING_SKIN_MAX_ATTEMPTS, d as CODING_SKIN_RECALL_ITEM_MAX_CHARS, f as CODING_SKIN_RECALL_SENTENCE_MAX_CHARS, g as codingSkinHookCommand, h as CODING_SKIN_WORKER_LIFETIME_MS, i as CODING_SKIN_HOOKS, l as CODING_SKIN_MAX_PENDING_CAPTURES, m as CODING_SKIN_SESSION_QUERY, n as CODING_SKIN_CHILD_MAX_BUFFER_BYTES, o as CODING_SKIN_LEDGER_MAX_CHARS, p as CODING_SKIN_RETRY_DELAYS_MS, r as CODING_SKIN_CURSOR_HOOKS, s as CODING_SKIN_MANUAL_SESSION_ID, t as CODING_SKIN_CHILD_DEADLINE_MS, u as CODING_SKIN_MODEL_COMMANDS, v as shellQuote, w as readNewLines, x as activityCursorSchema, y as snoProgramPath } from "./coding-skin-azRXA51Z.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_MAX_PENDING_CAPTURES, 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 };
|
|
@@ -1571,7 +1571,7 @@ const scopesConfigSchema = z.object({
|
|
|
1571
1571
|
definitions: z.record(z.string(), z.object({
|
|
1572
1572
|
description: z.string().optional(),
|
|
1573
1573
|
metadata: z.record(z.string(), z.unknown()).optional()
|
|
1574
|
-
})).prefault({ global: { description: "
|
|
1574
|
+
})).prefault({ global: { description: "Knowledge used by all your agents" } }),
|
|
1575
1575
|
agentAccess: z.record(z.string(), z.array(z.string())).default({})
|
|
1576
1576
|
}).prefault({});
|
|
1577
1577
|
const providerConfigSchema = z.object({ userId: z.string().trim().optional() }).strict().prefault({});
|
|
@@ -1669,6 +1669,11 @@ const host = {
|
|
|
1669
1669
|
"agent-native": "host",
|
|
1670
1670
|
"rem-enhanced": "host"
|
|
1671
1671
|
};
|
|
1672
|
+
const offByDefault = {
|
|
1673
|
+
"local-first": "off",
|
|
1674
|
+
"agent-native": "off",
|
|
1675
|
+
"rem-enhanced": "off"
|
|
1676
|
+
};
|
|
1672
1677
|
const profile = {
|
|
1673
1678
|
"local-first": "host",
|
|
1674
1679
|
"agent-native": "host",
|
|
@@ -1726,7 +1731,7 @@ const MODEL_CALLS = {
|
|
|
1726
1731
|
E3: {
|
|
1727
1732
|
description: "missed figure recovery",
|
|
1728
1733
|
occasion: "memoryExtract",
|
|
1729
|
-
destinations:
|
|
1734
|
+
destinations: offByDefault,
|
|
1730
1735
|
snoPreset: chat,
|
|
1731
1736
|
transport: {
|
|
1732
1737
|
host: "agent-host-seam",
|
|
@@ -2412,7 +2417,7 @@ function defaultSettings() {
|
|
|
2412
2417
|
},
|
|
2413
2418
|
telemetry: {
|
|
2414
2419
|
memoryUsage: {
|
|
2415
|
-
enabled:
|
|
2420
|
+
enabled: true,
|
|
2416
2421
|
key: "",
|
|
2417
2422
|
historicKeys: []
|
|
2418
2423
|
},
|
|
@@ -2423,7 +2428,7 @@ function defaultSettings() {
|
|
|
2423
2428
|
redactionRules: []
|
|
2424
2429
|
},
|
|
2425
2430
|
logging: {
|
|
2426
|
-
level: "
|
|
2431
|
+
level: "debug",
|
|
2427
2432
|
file: "",
|
|
2428
2433
|
debugContent: false
|
|
2429
2434
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageError } from "./internal/engine/shared/errors.js";
|
|
2
|
-
import { a as schema_exports, i as migrateLegacyDatabaseNamespace, n as loadSqliteVecExtension, o as applyEntityNameKeyMigration, r as resolveSimpleTokenizerPath, t as migrateUnplacedCandidates } from "./unplaced-candidate-migration-
|
|
2
|
+
import { a as schema_exports, i as migrateLegacyDatabaseNamespace, n as loadSqliteVecExtension, o as applyEntityNameKeyMigration, r as resolveSimpleTokenizerPath, t as migrateUnplacedCandidates } from "./unplaced-candidate-migration-BCcdQkcx.js";
|
|
3
3
|
import { SqliteFileMissingError, openSqliteDatabase } from "./internal/store/sqlite-runtime.js";
|
|
4
4
|
import { createLogger } from "@snoai/utils/logger";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
@@ -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-Dzgj9o5c.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-BrhMvnXJ.js";
|
|
2
|
+
import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-Ae3a8562.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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as RemConfig, d as RemEnableGateArtifact, g as RemOperationType, o as RemBuiltOperationType, u as RemDatabaseLike } from "./types-pVomjzqR.js";
|
|
2
|
-
import { g as JournalEntry } from "./classifier-
|
|
2
|
+
import { g as JournalEntry } from "./classifier-CXQxJJPP.js";
|
|
3
3
|
//#region src/engine/rem/adapter-a-conflict-adjudicator.d.ts
|
|
4
4
|
type AdapterAVerdict = "replacement" | "keep" | "uncertain";
|
|
5
5
|
interface AdapterAMemoryView {
|
|
@@ -73,12 +73,11 @@ declare const MAX_RECALL_TOOL_CANDIDATES = 512;
|
|
|
73
73
|
*/
|
|
74
74
|
declare const ARRIVAL_RETIREMENT_CANDIDATE_CAP = 128;
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* for the others, 2026-09-23); a target outside this cap is left to the REM replace wave.
|
|
76
|
+
* Total arrival conflict-adjudication calls one capture may cause across all written rows and
|
|
77
|
+
* windows, including provider retries. Candidates are considered most similar first; targets
|
|
78
|
+
* outside this cap are left to the REM replace wave.
|
|
80
79
|
*/
|
|
81
|
-
declare const ARRIVAL_RETIREMENT_JUDGED_CANDIDATE_CAP =
|
|
80
|
+
declare const ARRIVAL_RETIREMENT_JUDGED_CANDIDATE_CAP = 3;
|
|
82
81
|
/**
|
|
83
82
|
* Measurement-only overrides for the block 210 retrieval-breadth experiment.
|
|
84
83
|
*
|
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-BrhMvnXJ.js";
|
|
2
|
+
import "./types-Ae3a8562.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-lyb6RaQE.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-CsPUNkcm.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-DyxY59Lg.js";
|
|
8
|
+
import { C as MemoryStore } from "./memory-store-base-Bk2dOKED.js";
|
|
9
|
+
import "./store-BDIAl2cc.js";
|
|
10
|
+
import { n as AccessTracker } from "./access-tracker-BOPHSJjf.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-CM2mWb69.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 {
|
|
@@ -30,6 +30,7 @@ export declare class MemoryContractRuntime implements MemoryContract {
|
|
|
30
30
|
private registration;
|
|
31
31
|
private readonly providers;
|
|
32
32
|
private readonly reflectionStates;
|
|
33
|
+
private readonly arrivalRetirements;
|
|
33
34
|
private recall;
|
|
34
35
|
constructor(services: MemoryRuntimeServices);
|
|
35
36
|
/** Takes over a replaced runtime's per-session recall turns, so a mid-turn re-registration keeps same-turn omission. */
|
|
@@ -54,6 +55,8 @@ export declare class MemoryContractRuntime implements MemoryContract {
|
|
|
54
55
|
private recordRecalled;
|
|
55
56
|
private clearRecallSession;
|
|
56
57
|
private autoRecall;
|
|
58
|
+
private recordRecallPreview;
|
|
59
|
+
private recordReadUsage;
|
|
57
60
|
mutate(op: Mutation, scope: ScopeCtx, signal?: AbortSignal): Promise<ContractOutputs["mutate"]>;
|
|
58
61
|
private correct;
|
|
59
62
|
inspect(op: Inspection, scope: ScopeCtx): Promise<ContractOutputs["inspect"]>;
|