@snoai/memory 1.0.1 → 1.1.0
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-BbEvEocb.d.ts → access-tracker-BNqlgChq.d.ts} +3 -3
- package/dist/{adapter-B7Jox9-6.d.ts → adapter-CeQ7rViY.d.ts} +2 -2
- package/dist/{atomic-memory-extraction-d9EG-4ti.d.ts → atomic-memory-extraction-BT8lFE5t.d.ts} +4 -4
- package/dist/{atomic-memory-extraction-C5rmogoY.js → atomic-memory-extraction-By0axKHc.js} +4 -4
- package/dist/{b-profile-section-dictionary-provider-BxbksLj3.d.ts → b-profile-section-dictionary-provider-DGtF4dB7.d.ts} +1 -1
- package/dist/{capture-policy-detector-CxbHPkMX.d.ts → capture-policy-detector-CN3vfdNU.d.ts} +1 -1
- package/dist/client.d.ts +11 -1
- package/dist/client.js +32 -3
- package/dist/coding-skin.d.ts +6 -0
- package/dist/coding-skin.js +18 -1
- package/dist/{config-CL90qYva.js → config-CyH1VuJc.js} +17 -11
- package/dist/{derived-suppression-cache-CI0durYx.d.ts → derived-suppression-cache-BZdBZSdK.d.ts} +1 -1
- package/dist/diagnostic-encoder.js +1 -1
- package/dist/{index-0aqS8pVF.d.ts → index-DtqgCT8u.d.ts} +22 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +16 -7
- 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 +2 -2
- package/dist/internal/config/product-mode.js +7 -6
- package/dist/internal/config/settings.d.ts +1 -1
- package/dist/internal/config/settings.js +3 -3
- 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 +1 -1
- package/dist/internal/engine/bindings/memory-reflection-resolve-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-stats-tool.js +1 -1
- package/dist/internal/engine/bindings/memory-store-tool.js +3 -3
- package/dist/internal/engine/bindings/memory-tool-access.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-access.js +1 -1
- package/dist/internal/engine/bindings/memory-tool-results.d.ts +1 -1
- package/dist/internal/engine/bindings/memory-tool-results.js +1 -1
- package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +5 -5
- package/dist/internal/engine/bindings/memory-tool-schemas.js +1 -1
- package/dist/internal/engine/bindings/memory-update-tool.js +2 -2
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts +4 -4
- package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.js +3 -3
- 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/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-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 +2 -2
- 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-registration.js +1 -1
- package/dist/internal/engine/provider/provider-row-renderer.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-command-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-command-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-deps.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-embedded-generator.js +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-injection-hooks.js +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +1 -1
- package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +1 -1
- package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +3 -3
- package/dist/internal/engine/reflection/strategy-hook-runner.js +2 -2
- package/dist/internal/engine/retrieval/access-tracker.d.ts +1 -1
- package/dist/internal/engine/retrieval/retriever.d.ts +1 -1
- package/dist/internal/engine/shared/memory-kind-policy.d.ts +1 -1
- package/dist/internal/engine/shared/paths.d.ts +2 -2
- package/dist/internal/engine/shared/types.d.ts +2 -2
- package/dist/internal/engine/shared/types.js +1 -1
- package/dist/internal/engine/telemetry/observe-ledger.d.ts +1 -1
- package/dist/internal/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/maintenance.d.ts +2 -2
- package/dist/internal/store/maintenance.js +2 -2
- package/dist/internal/store/store.d.ts +2 -2
- package/dist/internal/store/store.js +1 -1
- package/dist/{llm-client-BSYUAcUb.js → llm-client-BhkzlTnH.js} +1 -1
- package/dist/{llm-client-DOTSGzhe.d.ts → llm-client-PC0yQuCq.d.ts} +1 -1
- package/dist/{log-site-catalog.generated-BMKWj-Nx.js → log-site-catalog.generated-CylmA5IF.js} +32 -32
- package/dist/log-site-catalog.json +1 -1
- package/dist/memdump.js +1 -1
- package/dist/{memory-kind-policy-BiuRjSJc.d.ts → memory-kind-policy-DnHY7l0n.d.ts} +1 -1
- package/dist/{memory-metadata-codec-DUvsYe_X.d.ts → memory-metadata-codec-DbrRyhCg.d.ts} +1 -1
- package/dist/{memory-runtime-DqUS4cWi.js → memory-runtime-DUzKtwlW.js} +131 -51
- package/dist/{memory-snapshot-CqY1BUUA.d.ts → memory-snapshot-shzK-0C8.d.ts} +2 -2
- package/dist/{memory-store-base-CQ_bHlYA.d.ts → memory-store-base-Dx6oSqiv.d.ts} +2 -2
- package/dist/{memory-temporality-classifier-BUjXG5o7.js → memory-temporality-classifier-AetVby94.js} +2 -2
- package/dist/{memory-temporality-classifier-Brht5jyK.d.ts → memory-temporality-classifier-D91grvZ3.d.ts} +1 -1
- package/dist/{memory-tier-promoter-CqGxCkue.d.ts → memory-tier-promoter-DzX7GMZ2.d.ts} +1 -1
- package/dist/{memory-tool-dependencies-DjUoelnm.js → memory-tool-dependencies-4Vl4QwBY.js} +1 -1
- package/dist/memory-tool-dependencies-BGFjBpkG.d.ts +14 -0
- package/dist/{model-call-table-CspopkBg.js → model-call-table-BZJQkbKX.js} +9 -0
- package/dist/{observable-embedder-CNNe9gkg.d.ts → observable-embedder-CbFylzsx.d.ts} +1 -1
- package/dist/{observable-llm-client-CRuKlefQ.d.ts → observable-llm-client-BC6Bc8t3.d.ts} +3 -3
- package/dist/{observable-memory-store-CnGDpOY5.d.ts → observable-memory-store-BykVMQXt.d.ts} +4 -4
- package/dist/{observable-retriever-Cooc62Qw.d.ts → observable-retriever-C-c9O83s.d.ts} +5 -5
- package/dist/paths-DHU342hf.d.ts +1 -0
- package/dist/{plugin-config-schema-C0UUbOmG.d.ts → plugin-config-schema-CCwv_K7R.d.ts} +3 -2
- package/dist/{plugin-config-schema-YJLyIIcJ.js → plugin-config-schema-CTLb-ChF.js} +2 -6
- package/dist/{profile-TWPJ_myr.d.ts → profile-DbIDAmnc.d.ts} +1 -1
- package/dist/{profile-section-writer-BhGKPBjw.js → profile-section-writer-BV605K78.js} +2 -2
- package/dist/{provider-registration-CF1tg8Xy.js → provider-registration-qLSA9CQl.js} +32 -2
- package/dist/{reflection-command-hooks-ClUl-iv6.js → reflection-command-hooks-CTYkYqM3.js} +3 -3
- package/dist/{reflection-command-hooks-G1-dI2Av.d.ts → reflection-command-hooks-h2CbYuXx.d.ts} +4 -4
- package/dist/{reflection-deps-Ccm2Jf5W.d.ts → reflection-deps-MWVeBZcs.d.ts} +2 -2
- package/dist/{reflection-embedded-generator-BRvqV5N-.js → reflection-embedded-generator-D5OhLLVw.js} +1 -1
- package/dist/{reflection-embedded-generator-kfQfKEYV.d.ts → reflection-embedded-generator-Dk7sL8uy.d.ts} +3 -3
- package/dist/{reflection-injection-hooks-CS_uhjoD.d.ts → reflection-injection-hooks-B0fGkENX.d.ts} +4 -4
- package/dist/{reflection-lifecycle-hooks-CRSpUdLi.d.ts → reflection-lifecycle-hooks-Bg_JBS6c.d.ts} +3 -3
- package/dist/{rem-batch-executor-Dg2HgROM.js → rem-batch-executor-5IR3e-gG.js} +1 -1
- package/dist/{rem-batch-executor-DuC4nYyf.js → rem-batch-executor-B4OoDBVK.js} +1 -1
- package/dist/{rem-trigger-Hn6od8IV.js → rem-trigger-CYMupvFh.js} +2 -2
- package/dist/{results-C3ZLroMb.js → results-BkMsHy7M.js} +16 -0
- package/dist/{retriever-Dxss5fRv.d.ts → retriever-CXeB7-A2.d.ts} +6 -6
- package/dist/{runtime-audit-log-zpQiR9HT.d.ts → runtime-audit-log-CIYiNvwf.d.ts} +1 -1
- package/dist/{server-CSvxchqg.js → server-WGLpvv3K.js} +6 -5
- package/dist/sidecar/main.js +2 -2
- package/dist/{sno-station-mem-runtime-dependencies-CoWqUMbK.js → sno-station-mem-runtime-dependencies-Bzfg4hGZ.js} +5 -5
- package/dist/sno-station-mem-runtime-dependencies-cFPSMqDD.d.ts +31 -0
- package/dist/{store-nPql26YM.js → store-D3n1P7Xn.js} +1 -1
- package/dist/{store-C8sUTssE.d.ts → store-Dbo7MIzt.d.ts} +1 -1
- package/dist/{strategy-hook-runner-Bxy851Xx.d.ts → strategy-hook-runner-C6qUCnzY.d.ts} +7 -7
- package/dist/{strategy-hook-runner-Djify5Rw.js → strategy-hook-runner-CHpG8vXD.js} +1 -1
- package/dist/{types-CWdhXLxr.d.ts → types-DvQ6nTNC.d.ts} +1 -1
- package/package.json +7 -7
- package/settings.default.json +5 -0
- package/dist/memory-tool-dependencies-CatGzI9R.d.ts +0 -14
- package/dist/paths-qVF-5uBq.d.ts +0 -1
- package/dist/sno-station-mem-runtime-dependencies-DHESIuPn.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.0
|
|
31
|
+
npm install @snoai/memory@1.1.0
|
|
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-DvQ6nTNC.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-Dx6oSqiv.js";
|
|
4
|
+
import "./store-Dbo7MIzt.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-CCwv_K7R.js";
|
|
2
|
+
import "./types-DvQ6nTNC.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-d9EG-4ti.d.ts → atomic-memory-extraction-BT8lFE5t.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-CCwv_K7R.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-Dx6oSqiv.js";
|
|
5
|
+
import "./store-Dbo7MIzt.js";
|
|
6
|
+
import "./llm-client-PC0yQuCq.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";
|
|
@@ -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 { a as isTerminalLlmFailure, i as createLlmClient, n as LlmClientTerminalError } from "./llm-client-
|
|
5
|
+
import { a as isTerminalLlmFailure, i as createLlmClient, n as LlmClientTerminalError } from "./llm-client-BhkzlTnH.js";
|
|
6
6
|
import { n as readModelReplyJson } from "./model-reply-text-CKopStP2.js";
|
|
7
7
|
import { resolveLlmRoute } from "./internal/model/llm-mode-routing.js";
|
|
8
8
|
import { n as ATOMIC_EXTRACTION_SKILL_HASH, r as atomicExtractionSkillReference, t as ATOMIC_EXTRACTION_SKILL } from "./atomic-extraction-skill-CcXmuCqL.js";
|
|
9
9
|
import { stripEnvelopeMetadata } from "./internal/engine/extraction/extraction-text-sanitizer.js";
|
|
10
10
|
import { a as sessionZoneCarriedBy, t as calculateCalendarTime } from "./calendar-instruction-CzqZbAPG.js";
|
|
11
|
-
import "./memory-temporality-classifier-
|
|
11
|
+
import "./memory-temporality-classifier-AetVby94.js";
|
|
12
12
|
import { t as appendAuditEntry } from "./runtime-audit-log-BCeujlEp.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
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, y as normalizeMemoryRelationPredicate } from "./store-
|
|
17
|
+
import { d as normalizeEntityName, f as recordAtomicEntityIdentityJournal, g as readAtomicArrivalRetirementCandidateSet, h as journalAtomicArrivalRetirementRefusal, m as closeAtomicArrivalRetirementTargets, u as listAtomicMemoryEntityCandidates, y as normalizeMemoryRelationPredicate } from "./store-D3n1P7Xn.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-BV605K78.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ProductMode } from "./plugin-config-schema-
|
|
1
|
+
import { g as ProductMode } from "./plugin-config-schema-CCwv_K7R.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-CxbHPkMX.d.ts → capture-policy-detector-CN3vfdNU.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as MemoryCategory } from "./types-
|
|
1
|
+
import { h as MemoryCategory } from "./types-DvQ6nTNC.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 {
|
|
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-DtqgCT8u.js";
|
|
3
3
|
//#region src/contract/client.d.ts
|
|
4
4
|
export interface ConnectOptions {
|
|
5
5
|
skinId: string;
|
|
@@ -9,7 +9,17 @@ export interface DegradedConnection {
|
|
|
9
9
|
reason: DegradedReason;
|
|
10
10
|
error?: string;
|
|
11
11
|
}
|
|
12
|
+
export type ReportingInspection = Extract<Inspection, {
|
|
13
|
+
op: "projects" | "currentProject";
|
|
14
|
+
}> | {
|
|
15
|
+
op: "stats";
|
|
16
|
+
};
|
|
17
|
+
export type ReportingClient = Pick<MemoryClient, "degraded" | "principal"> & {
|
|
18
|
+
inspect(op: ReportingInspection, scope: ScopeCtx): Promise<ContractOutputs["inspect"]>;
|
|
19
|
+
};
|
|
12
20
|
export declare function connect(options: ConnectOptions): Promise<MemoryClient | DegradedConnection>;
|
|
21
|
+
/** Connect to an already running service without starting it or registering a skin. */
|
|
22
|
+
export declare function connectReporting(options: ConnectOptions): Promise<ReportingClient | DegradedConnection>;
|
|
13
23
|
export declare class MemoryClient implements MemoryContract {
|
|
14
24
|
#private;
|
|
15
25
|
readonly skinId: string;
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as DEGRADED_REASONS, t as ContractError } from "./error-D-wb-rZw.js";
|
|
2
|
-
import { r as outputSchemas } from "./results-
|
|
2
|
+
import { r as outputSchemas } from "./results-BkMsHy7M.js";
|
|
3
3
|
import { MEMORY_ROUTES, MEMORY_SKIN_HEADER, MEMORY_START_TIMEOUT_MS, REM_SIDECAR_TOKEN_HEADER } from "./internal/contract/routes.js";
|
|
4
4
|
import { getPrincipal, getSettingsPath, getSnoStationMemStateDir, getStartupLogPath } from "./internal/contract/profile.js";
|
|
5
5
|
import { checkDiscovery, processAlive, readDiscovery } from "./internal/contract/discovery.js";
|
|
@@ -149,6 +149,22 @@ async function connect(options) {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
/** Connect to an already running service without starting it or registering a skin. */
|
|
153
|
+
async function connectReporting(options) {
|
|
154
|
+
try {
|
|
155
|
+
const { storePath } = clientSettings();
|
|
156
|
+
const discovery = await readDiscovery();
|
|
157
|
+
if (!discovery) throw new ContractError("sidecar-unreachable");
|
|
158
|
+
await checkDiscovery(discovery);
|
|
159
|
+
return new MemoryClient(options.skinId, storePath, discovery);
|
|
160
|
+
} catch (error) {
|
|
161
|
+
return {
|
|
162
|
+
degraded: true,
|
|
163
|
+
reason: failureReason(error),
|
|
164
|
+
...error instanceof Error && { error: error.message }
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
152
168
|
var MemoryClient = class {
|
|
153
169
|
skinId;
|
|
154
170
|
storePath;
|
|
@@ -168,12 +184,15 @@ var MemoryClient = class {
|
|
|
168
184
|
const route = MEMORY_ROUTES[method];
|
|
169
185
|
try {
|
|
170
186
|
signal?.throwIfAborted();
|
|
187
|
+
const inspection = method === "inspect" && "op" in input ? input.op : void 0;
|
|
188
|
+
const reporting = inspection?.op === "projects" || inspection?.op === "currentProject" || inspection?.op === "stats" && !inspection.scope;
|
|
171
189
|
let discovery = await readDiscovery();
|
|
172
190
|
if (!discovery || !processAlive(discovery.pid)) {
|
|
191
|
+
if (reporting) throw new ContractError("sidecar-unreachable");
|
|
173
192
|
const { memoryPackage } = clientSettings();
|
|
174
193
|
discovery = await startSidecar(memoryPackage);
|
|
175
194
|
}
|
|
176
|
-
if (method !== "init" && this.#registration && this.#registeredPid !== discovery.pid) await this.request("init", this.#registration, signal);
|
|
195
|
+
if (method !== "init" && !reporting && this.#registration && this.#registeredPid !== discovery.pid) await this.request("init", this.#registration, signal);
|
|
177
196
|
const response = await postJson(discovery.port, route.path, {
|
|
178
197
|
"Content-Type": "application/json",
|
|
179
198
|
[MEMORY_SKIN_HEADER]: this.skinId,
|
|
@@ -264,6 +283,16 @@ var MemoryClient = class {
|
|
|
264
283
|
op: "get",
|
|
265
284
|
entry: null
|
|
266
285
|
};
|
|
286
|
+
else if (op.op === "projects") result = {
|
|
287
|
+
op: "projects",
|
|
288
|
+
projects: []
|
|
289
|
+
};
|
|
290
|
+
else if (op.op === "currentProject") result = {
|
|
291
|
+
op: "currentProject",
|
|
292
|
+
workspace: op.workspace,
|
|
293
|
+
status: "unknown",
|
|
294
|
+
project: null
|
|
295
|
+
};
|
|
267
296
|
else result = {
|
|
268
297
|
op: op.op,
|
|
269
298
|
project: scope.project,
|
|
@@ -303,4 +332,4 @@ var MemoryClient = class {
|
|
|
303
332
|
}
|
|
304
333
|
};
|
|
305
334
|
//#endregion
|
|
306
|
-
export { ContractError, MemoryClient, connect };
|
|
335
|
+
export { ContractError, MemoryClient, connect, connectReporting };
|
package/dist/coding-skin.d.ts
CHANGED
|
@@ -47,5 +47,11 @@ export declare const CODING_SKIN_HOOKS: {
|
|
|
47
47
|
};
|
|
48
48
|
export type CodingSkinHookName = keyof typeof CODING_SKIN_HOOKS;
|
|
49
49
|
export declare const CODING_SKIN_MODEL_COMMANDS: readonly ["recall", "get", "remember", "correct"];
|
|
50
|
+
export type CodingSkinHarness = "claude" | "codex";
|
|
51
|
+
export declare function shellQuote(value: string): string;
|
|
52
|
+
/** The command an agent hook runs: the `sno` binary that ran setup, then `memory hook <event> --harness <name>`. */
|
|
53
|
+
export declare function codingSkinHookCommand(snoPath: string, subcommand: string, harness: CodingSkinHarness): string;
|
|
54
|
+
/** True for a hook command of that shape, whatever the path to `sno` is. */
|
|
55
|
+
export declare function isCodingSkinHookCommand(command: string, subcommand: string, harness: CodingSkinHarness): boolean;
|
|
50
56
|
//#endregion
|
|
51
57
|
export { HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, type ObserveLedgerRow, SKILL_CATEGORIES, appendObserveLedgerRows, skillVersionFor };
|
package/dist/coding-skin.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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 } from "./internal/config/skin-defaults.js";
|
|
4
|
+
import { basename } from "node:path";
|
|
4
5
|
//#region config/coding-skin.ts
|
|
5
6
|
const CODING_SKIN_CHILD_DEADLINE_MS = 11e4;
|
|
6
7
|
const CODING_SKIN_WORKER_LIFETIME_MS = 54e4;
|
|
@@ -51,5 +52,21 @@ const CODING_SKIN_MODEL_COMMANDS = [
|
|
|
51
52
|
"remember",
|
|
52
53
|
"correct"
|
|
53
54
|
];
|
|
55
|
+
function shellQuote(value) {
|
|
56
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
57
|
+
}
|
|
58
|
+
/** The command an agent hook runs: the `sno` binary that ran setup, then `memory hook <event> --harness <name>`. */
|
|
59
|
+
function codingSkinHookCommand(snoPath, subcommand, harness) {
|
|
60
|
+
return `${shellQuote(snoPath)} memory hook ${subcommand} --harness ${harness}`;
|
|
61
|
+
}
|
|
62
|
+
/** True for a hook command of that shape, whatever the path to `sno` is. */
|
|
63
|
+
function isCodingSkinHookCommand(command, subcommand, harness) {
|
|
64
|
+
const suffix = ` memory hook ${subcommand} --harness ${harness}`;
|
|
65
|
+
const trimmed = command.trim();
|
|
66
|
+
if (!trimmed.endsWith(suffix)) return false;
|
|
67
|
+
const encoded = trimmed.slice(0, -suffix.length);
|
|
68
|
+
const program = encoded.startsWith("'") && encoded.endsWith("'") ? encoded.slice(1, -1).replaceAll("'\\''", "'") : encoded;
|
|
69
|
+
return basename(program) === "sno";
|
|
70
|
+
}
|
|
54
71
|
//#endregion
|
|
55
|
-
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, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, SKILL_CATEGORIES, appendObserveLedgerRows, skillVersionFor };
|
|
72
|
+
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, HOST_MODEL_CALLBACK_HOST, HOST_MODEL_CALLBACK_PATH, SKILL_CATEGORIES, appendObserveLedgerRows, codingSkinHookCommand, isCodingSkinHookCommand, shellQuote, skillVersionFor };
|
|
@@ -1149,14 +1149,15 @@ const PRODUCT_MODES = [
|
|
|
1149
1149
|
];
|
|
1150
1150
|
const DEFAULT_MODEL_MODE = "agent-native";
|
|
1151
1151
|
const remEnhancedConfigSchema = z.object({ trigger: z.object({ tick: z.boolean().default(true) }).strict().prefault({}) }).strict().prefault({});
|
|
1152
|
+
const modelCallsConfigSchema = z.record(z.string(), z.record(z.enum(PRODUCT_MODES), z.enum([
|
|
1153
|
+
"off",
|
|
1154
|
+
"host",
|
|
1155
|
+
"sno-gpu"
|
|
1156
|
+
]))).optional();
|
|
1152
1157
|
const llmRoutingConfigSchema = z.object({
|
|
1153
1158
|
mode: z.enum(PRODUCT_MODES),
|
|
1154
1159
|
language: z.enum(SUPPORTED_LOCALES).default("en"),
|
|
1155
|
-
modelCalls:
|
|
1156
|
-
"off",
|
|
1157
|
-
"host",
|
|
1158
|
-
"sno-gpu"
|
|
1159
|
-
]))).optional()
|
|
1160
|
+
modelCalls: modelCallsConfigSchema
|
|
1160
1161
|
}).strict();
|
|
1161
1162
|
//#endregion
|
|
1162
1163
|
//#region config/plugin-config-embedding-schema.ts
|
|
@@ -1581,11 +1582,7 @@ const pluginConfigSchema = z.object({
|
|
|
1581
1582
|
* config requires an explicit product mode.
|
|
1582
1583
|
*/
|
|
1583
1584
|
mode: z.enum(PRODUCT_MODES).default(DEFAULT_MODEL_MODE),
|
|
1584
|
-
modelCalls:
|
|
1585
|
-
"off",
|
|
1586
|
-
"host",
|
|
1587
|
-
"sno-gpu"
|
|
1588
|
-
]))).optional(),
|
|
1585
|
+
modelCalls: modelCallsConfigSchema,
|
|
1589
1586
|
remOperations: z.array(z.enum(REM_OPERATIONS)).min(1).max(2).default([...REM_OPERATIONS]),
|
|
1590
1587
|
remEnhanced: remEnhancedConfigSchema,
|
|
1591
1588
|
/**
|
|
@@ -2013,6 +2010,15 @@ const MODEL_CALLS = {
|
|
|
2013
2010
|
"rem-enhanced": "sno-gpu"
|
|
2014
2011
|
}
|
|
2015
2012
|
},
|
|
2013
|
+
R5: {
|
|
2014
|
+
description: "generate local lessons and skill reminders nightly",
|
|
2015
|
+
calledBy: "RSI skill",
|
|
2016
|
+
destinations: {
|
|
2017
|
+
"local-first": "host",
|
|
2018
|
+
"agent-native": "off",
|
|
2019
|
+
"rem-enhanced": "off"
|
|
2020
|
+
}
|
|
2021
|
+
},
|
|
2016
2022
|
REM1: {
|
|
2017
2023
|
description: "replace conflict pair",
|
|
2018
2024
|
occasion: "conflictAdjudication",
|
|
@@ -2173,7 +2179,7 @@ const destinations = z.strictObject({
|
|
|
2173
2179
|
"agent-native": destination,
|
|
2174
2180
|
"rem-enhanced": destination
|
|
2175
2181
|
});
|
|
2176
|
-
const modelCalls = z.strictObject(Object.fromEntries(Object.keys(MODEL_CALLS).map((id) => [id, destinations])));
|
|
2182
|
+
const modelCalls = z.strictObject(Object.fromEntries(Object.keys(MODEL_CALLS).map((id) => [id, destinations]))).extend({ R5: destinations.default(MODEL_CALLS.R5.destinations) });
|
|
2177
2183
|
const settingsSchema = z.strictObject({
|
|
2178
2184
|
mode: z.enum(PRODUCT_MODES),
|
|
2179
2185
|
modelCalls,
|
|
@@ -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-CylmA5IF.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-CCwv_K7R.js";
|
|
2
|
+
import { g as MemoryEntry, h as MemoryCategory, t as AGGREGATION_OPERATIONS, x as RetrievalResult } from "./types-DvQ6nTNC.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
|
|
@@ -134,6 +134,11 @@ type Inspection = {
|
|
|
134
134
|
op: "listReflection";
|
|
135
135
|
limit?: number;
|
|
136
136
|
unresolvedOnly?: boolean;
|
|
137
|
+
} | {
|
|
138
|
+
op: "projects";
|
|
139
|
+
} | {
|
|
140
|
+
op: "currentProject";
|
|
141
|
+
workspace: string;
|
|
137
142
|
};
|
|
138
143
|
type UsageSignal = {
|
|
139
144
|
event: "inject" | "used" | "rejected" | "tool-error";
|
|
@@ -237,6 +242,12 @@ type ToolResponse = {
|
|
|
237
242
|
}>;
|
|
238
243
|
details: Record<string, JsonValue>;
|
|
239
244
|
};
|
|
245
|
+
type ProjectSummary = {
|
|
246
|
+
projectId: string;
|
|
247
|
+
workspace: string | null;
|
|
248
|
+
memoryCount: number;
|
|
249
|
+
kind: "general" | "project";
|
|
250
|
+
};
|
|
240
251
|
type InspectData = {
|
|
241
252
|
op: "storage";
|
|
242
253
|
dimension: number | null;
|
|
@@ -262,6 +273,14 @@ type InspectData = {
|
|
|
262
273
|
lines?: number;
|
|
263
274
|
nextFrom?: number;
|
|
264
275
|
};
|
|
276
|
+
} | {
|
|
277
|
+
op: "projects";
|
|
278
|
+
projects: ProjectSummary[];
|
|
279
|
+
} | {
|
|
280
|
+
op: "currentProject";
|
|
281
|
+
workspace: string;
|
|
282
|
+
status: "known" | "unknown";
|
|
283
|
+
project: ProjectSummary | null;
|
|
265
284
|
};
|
|
266
285
|
interface ContractOutputs {
|
|
267
286
|
init: Result<{
|
|
@@ -348,4 +367,4 @@ declare function contractJsonSchemas(method: ContractMethod): {
|
|
|
348
367
|
output: z.core.JSONSchema.JSONSchema;
|
|
349
368
|
};
|
|
350
369
|
//#endregion
|
|
351
|
-
export {
|
|
370
|
+
export { usageSignalSchema as $, HostContext as A, ScopeCtx as B, inspectDataSchema as C, toolResponseSchema as D, retrievalResultSchema as E, JsonValue as F, inputSchemas as G, UsageSignal as H, Message as I, mutationSchema as J, inspectionSchema as K, Mutation as L, HostEvent as M, InitRegistration as N, AgentModelRegistration as O, Inspection as P, turnSchema as Q, RecallOptions as R, ToolResponse as S, outputSchemas as T, hostEventSchema as U, Turn as V, initRegistrationSchema as W, registrationSchema as X, recallOptionsSchema as Y, scopeSchema as Z, engineSettingsSchema as _, parseOutput as a, ProjectSummary as b, MEMORY_ERROR_STATUS as c, MEMORY_ROUTES as d, ContractError as et, MEMORY_SKIN_HEADER as f, EngineSettings as g, memoryMethod as h, parseInput as i, HostDecision as j, ContractInputs as k, MEMORY_HEALTH_TIMEOUT_MS as l, REM_SIDECAR_TOKEN_HEADER as m, MemoryContract as n, DegradedReason as nt, MEMORY_BODY_LIMIT_BYTES as o, MEMORY_START_TIMEOUT_MS as p, messageSchema as q, contractJsonSchemas as r, MEMORY_DEFAULT_SKIN_ID as s, ContractMethod as t, DEGRADED_REASONS as tt, MEMORY_RECONNECT_INTERVAL_MS as u, ContractOutputs as v, memoryEntrySchema as w, Result as x, InspectData as y, Registration as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./types-
|
|
1
|
+
import { b as Settings, t as PluginConfig } from "./plugin-config-schema-CCwv_K7R.js";
|
|
2
|
+
import "./types-DvQ6nTNC.js";
|
|
3
3
|
import { n as AgentLlmPort } from "./agent-llm-port-5oXgBpzJ.js";
|
|
4
|
-
import { n as PluginObservability } from "./adapter-
|
|
5
|
-
import { $ as
|
|
4
|
+
import { n as PluginObservability } from "./adapter-CeQ7rViY.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-DtqgCT8u.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-CXeB7-A2.js";
|
|
8
|
+
import { C as MemoryStore } from "./memory-store-base-Dx6oSqiv.js";
|
|
9
|
+
import "./store-Dbo7MIzt.js";
|
|
10
|
+
import { n as AccessTracker } from "./access-tracker-BNqlgChq.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-h2CbYuXx.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 {
|
|
@@ -62,4 +62,4 @@ export declare class MemoryContractRuntime implements MemoryContract {
|
|
|
62
62
|
staticBlock(scope: ScopeCtx): Promise<ContractOutputs["staticBlock"]>;
|
|
63
63
|
}
|
|
64
64
|
//#endregion
|
|
65
|
-
export { AgentModelRegistration, ContractError, ContractInputs, ContractMethod, ContractOutputs, DEGRADED_REASONS, DegradedReason, EngineSettings, HostContext, HostDecision, HostEvent, InitRegistration, InspectData, Inspection, JsonValue, 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, MemoryContract, type MemoryRuntimeServices, Message, Mutation, REM_SIDECAR_TOKEN_HEADER, RecallOptions, Registration, Result, ScopeCtx, ToolResponse, Turn, UsageSignal, contractJsonSchemas, createMemoryRuntime, engineSettingsSchema, hostEventSchema, initRegistrationSchema, inputSchemas, inspectDataSchema, inspectionSchema, memoryEntrySchema, memoryMethod, messageSchema, mutationSchema, outputSchemas, parseInput, parseOutput, recallOptionsSchema, registrationSchema, retrievalResultSchema, scopeSchema, toolResponseSchema, turnSchema, usageSignalSchema };
|
|
65
|
+
export { AgentModelRegistration, ContractError, ContractInputs, ContractMethod, ContractOutputs, DEGRADED_REASONS, DegradedReason, EngineSettings, HostContext, HostDecision, HostEvent, InitRegistration, InspectData, Inspection, JsonValue, 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, MemoryContract, type MemoryRuntimeServices, Message, Mutation, ProjectSummary, REM_SIDECAR_TOKEN_HEADER, RecallOptions, Registration, Result, ScopeCtx, ToolResponse, Turn, UsageSignal, contractJsonSchemas, createMemoryRuntime, engineSettingsSchema, hostEventSchema, initRegistrationSchema, inputSchemas, inspectDataSchema, inspectionSchema, memoryEntrySchema, memoryMethod, messageSchema, mutationSchema, outputSchemas, parseInput, parseOutput, recallOptionsSchema, registrationSchema, retrievalResultSchema, scopeSchema, toolResponseSchema, turnSchema, usageSignalSchema };
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { a as memoryReflectionConfigSchema, c as embeddingConfigSchema, i as extractionConfigSchema, l as SESSION_STRATEGIES, n as retrievalConfigSchema, o as selfImprovementConfigSchema, r as observeConfigSchema, s as sessionMemoryConfigSchema } from "./plugin-config-schema-
|
|
1
|
+
import { a as memoryReflectionConfigSchema, c as embeddingConfigSchema, i as extractionConfigSchema, l as SESSION_STRATEGIES, n as retrievalConfigSchema, o as selfImprovementConfigSchema, r as observeConfigSchema, s as sessionMemoryConfigSchema } from "./plugin-config-schema-CTLb-ChF.js";
|
|
2
2
|
import { recallLifecycleSchema } from "./internal/config/index.js";
|
|
3
3
|
import { AGGREGATION_OPERATIONS, MEMORY_CATEGORIES } from "./internal/engine/shared/types.js";
|
|
4
4
|
import { n as DEGRADED_REASONS, t as ContractError } from "./error-D-wb-rZw.js";
|
|
5
|
-
import { a as toolResponseSchema, i as retrievalResultSchema, n as memoryEntrySchema, r as outputSchemas, t as inspectDataSchema } from "./results-
|
|
5
|
+
import { a as toolResponseSchema, i as retrievalResultSchema, n as memoryEntrySchema, r as outputSchemas, t as inspectDataSchema } from "./results-BkMsHy7M.js";
|
|
6
6
|
import { 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 } from "./internal/contract/routes.js";
|
|
7
|
-
import { o as resolveProviderIdentity, s as SnoStationMemProviderSearchManager, t as createMemoryRuntime } from "./provider-registration-
|
|
7
|
+
import { a as readTrustedUserId, c as inspectProviderProjects, o as resolveProviderIdentity, s as SnoStationMemProviderSearchManager, t as createMemoryRuntime } from "./provider-registration-qLSA9CQl.js";
|
|
8
8
|
import { s as withMemoryOperation, t as checkMemoryOperation } from "./operation-cancellation-CTKWwNHk.js";
|
|
9
9
|
import { pruneOldestEntries, setLruEntry } from "./internal/engine/shared/lru.js";
|
|
10
10
|
import { CODING_SKIN_LEDGER_MAX_CHARS, CODING_SKIN_SESSION_QUERY } from "./coding-skin.js";
|
|
11
11
|
import { defaultSettings } from "./internal/config/settings.js";
|
|
12
|
-
import { i as createLlmClient } from "./llm-client-
|
|
12
|
+
import { i as createLlmClient } from "./llm-client-BhkzlTnH.js";
|
|
13
13
|
import { pickLlmRoutingConfig } from "./internal/model/llm-mode-routing.js";
|
|
14
14
|
import { a as parseAgentIdFromSessionKey, n as createScopePolicy, t as MemoryScopePolicy } from "./memory-scope-policy-DICSCURA.js";
|
|
15
|
-
import { a as serializeIntervalMetadata, o as resolveMemoryDate } from "./memory-temporality-classifier-
|
|
15
|
+
import { a as serializeIntervalMetadata, o as resolveMemoryDate } from "./memory-temporality-classifier-AetVby94.js";
|
|
16
16
|
import { resolveAgentAccess, resolveAgentId } from "./internal/engine/bindings/memory-tool-access.js";
|
|
17
17
|
import { r as retrieveForAutoRecall, t as isOpenRecallMetadata } from "./rem-consumer-retrieval-CR0dtcHR.js";
|
|
18
18
|
import { executeMemoryRecallTool } from "./internal/engine/bindings/memory-recall-tool.js";
|
|
19
|
-
import { t as createReflectionStrategyState } from "./strategy-hook-runner-
|
|
19
|
+
import { t as createReflectionStrategyState } from "./strategy-hook-runner-CHpG8vXD.js";
|
|
20
20
|
import { buildInsightDistiller } from "./internal/engine/bindings/sno-station-mem-insight-distill-factory.js";
|
|
21
21
|
import { onAgentEnd } from "./internal/engine/bindings/sno-station-mem-ambient-learning-hook.js";
|
|
22
22
|
import { executeMemoryStoreTool } from "./internal/engine/bindings/memory-store-tool.js";
|
|
23
23
|
import { executeMemoryForgetTool } from "./internal/engine/bindings/memory-forget-tool.js";
|
|
24
24
|
import { executeMemoryUpdateTool } from "./internal/engine/bindings/memory-update-tool.js";
|
|
25
25
|
import { executeMemoryReflectionResolveTool } from "./internal/engine/bindings/memory-reflection-resolve-tool.js";
|
|
26
|
-
import { t as createRunMemoryReflection } from "./reflection-command-hooks-
|
|
26
|
+
import { t as createRunMemoryReflection } from "./reflection-command-hooks-CTYkYqM3.js";
|
|
27
27
|
import { createReflectionLifecycleHandler1, createReflectionLifecycleHandler2 } from "./internal/engine/reflection/reflection-lifecycle-hooks.js";
|
|
28
28
|
import { createReflectionInjectionHandler1, createReflectionInjectionHandler2, createReflectionInjectionHandler3 } from "./internal/engine/reflection/reflection-injection-hooks.js";
|
|
29
29
|
import { z } from "zod";
|
|
@@ -190,6 +190,11 @@ const inspectionSchema = z.discriminatedUnion("op", [
|
|
|
190
190
|
op: z.literal("listReflection"),
|
|
191
191
|
limit: z.number().int().optional(),
|
|
192
192
|
unresolvedOnly: z.boolean().optional()
|
|
193
|
+
}),
|
|
194
|
+
z.object({ op: z.literal("projects") }),
|
|
195
|
+
z.object({
|
|
196
|
+
op: z.literal("currentProject"),
|
|
197
|
+
workspace: nonempty
|
|
193
198
|
})
|
|
194
199
|
]);
|
|
195
200
|
const usageSignalSchema = z.object({
|
|
@@ -1032,6 +1037,10 @@ var MemoryContractRuntime = class {
|
|
|
1032
1037
|
op,
|
|
1033
1038
|
scope
|
|
1034
1039
|
});
|
|
1040
|
+
if (op.op === "projects" || op.op === "currentProject") return {
|
|
1041
|
+
degraded: false,
|
|
1042
|
+
result: inspectProviderProjects(this.services.store, readTrustedUserId(this.services.config), op)
|
|
1043
|
+
};
|
|
1035
1044
|
if (op.op === "stats" && !op.scope) return {
|
|
1036
1045
|
degraded: false,
|
|
1037
1046
|
result: {
|
|
@@ -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-CCwv_K7R.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-CTLb-ChF.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 remEnhancedConfigSchema } from "../../plugin-config-schema-
|
|
2
|
-
export { DEFAULT_MODEL_MODE, LLM_OCCASIONS, LlmOccasion, LlmRoutingConfig, LlmRoutingConfigInput, PRODUCT_MODES, ProductMode, llmRoutingConfigSchema, remEnhancedConfigSchema };
|
|
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-CCwv_K7R.js";
|
|
2
|
+
export { DEFAULT_MODEL_MODE, LLM_OCCASIONS, LlmOccasion, LlmRoutingConfig, LlmRoutingConfigInput, PRODUCT_MODES, ProductMode, llmRoutingConfigSchema, modelCallsConfigSchema, remEnhancedConfigSchema };
|
|
@@ -23,14 +23,15 @@ const LLM_OCCASIONS = [
|
|
|
23
23
|
"dateResolution"
|
|
24
24
|
];
|
|
25
25
|
const remEnhancedConfigSchema = z.object({ trigger: z.object({ tick: z.boolean().default(true) }).strict().prefault({}) }).strict().prefault({});
|
|
26
|
+
const modelCallsConfigSchema = z.record(z.string(), z.record(z.enum(PRODUCT_MODES), z.enum([
|
|
27
|
+
"off",
|
|
28
|
+
"host",
|
|
29
|
+
"sno-gpu"
|
|
30
|
+
]))).optional();
|
|
26
31
|
const llmRoutingConfigSchema = z.object({
|
|
27
32
|
mode: z.enum(PRODUCT_MODES),
|
|
28
33
|
language: z.enum(SUPPORTED_LOCALES).default("en"),
|
|
29
|
-
modelCalls:
|
|
30
|
-
"off",
|
|
31
|
-
"host",
|
|
32
|
-
"sno-gpu"
|
|
33
|
-
]))).optional()
|
|
34
|
+
modelCalls: modelCallsConfigSchema
|
|
34
35
|
}).strict();
|
|
35
36
|
//#endregion
|
|
36
|
-
export { DEFAULT_MODEL_MODE, LLM_OCCASIONS, PRODUCT_MODES, llmRoutingConfigSchema, remEnhancedConfigSchema };
|
|
37
|
+
export { DEFAULT_MODEL_MODE, LLM_OCCASIONS, PRODUCT_MODES, llmRoutingConfigSchema, modelCallsConfigSchema, remEnhancedConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as settingsToPluginConfig, S as settingsSchema, b as Settings, x as defaultSettings } from "../../plugin-config-schema-CCwv_K7R.js";
|
|
2
2
|
export { Settings, defaultSettings, settingsSchema, settingsToPluginConfig };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as SESSION_STRATEGIES, t as pluginConfigSchema } from "../../plugin-config-schema-
|
|
1
|
+
import { l as SESSION_STRATEGIES, t as pluginConfigSchema } from "../../plugin-config-schema-CTLb-ChF.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";
|
|
5
|
-
import { t as MODEL_CALLS } from "../../model-call-table-
|
|
5
|
+
import { t as MODEL_CALLS } from "../../model-call-table-BZJQkbKX.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { LOCAL_EMBEDDING_MODEL_REVISION } from "@snoai/embedder";
|
|
8
8
|
import { isLowercaseCanonicalUUIDv7 } from "@snoai/common-core";
|
|
@@ -17,7 +17,7 @@ const destinations = z.strictObject({
|
|
|
17
17
|
"agent-native": destination,
|
|
18
18
|
"rem-enhanced": destination
|
|
19
19
|
});
|
|
20
|
-
const modelCalls = z.strictObject(Object.fromEntries(Object.keys(MODEL_CALLS).map((id) => [id, destinations])));
|
|
20
|
+
const modelCalls = z.strictObject(Object.fromEntries(Object.keys(MODEL_CALLS).map((id) => [id, destinations]))).extend({ R5: destinations.default(MODEL_CALLS.R5.destinations) });
|
|
21
21
|
const settingsSchema = z.strictObject({
|
|
22
22
|
mode: z.enum(PRODUCT_MODES),
|
|
23
23
|
modelCalls,
|
|
@@ -1,4 +1,4 @@
|
|
|
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-CCwv_K7R.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";
|
|
@@ -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-DbIDAmnc.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-DtqgCT8u.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-DvQ6nTNC.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-CXeB7-A2.js";
|
|
4
|
+
import { C as MemoryStore } from "../../../memory-store-base-Dx6oSqiv.js";
|
|
5
|
+
import "../../../store-Dbo7MIzt.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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FORGET_QUERY_MIN_SCORE, MAX_CANDIDATE_POOL_SIZE } from "../../config/index.js";
|
|
2
2
|
import { SnoStationMemError } from "../shared/errors.js";
|
|
3
3
|
import { clamp01, clampInt } from "../shared/utils.js";
|
|
4
|
-
import "../../../memory-tool-dependencies-
|
|
4
|
+
import "../../../memory-tool-dependencies-4Vl4QwBY.js";
|
|
5
5
|
import { assertAccessibleScopeForTool, isScopeAccessibleForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
|
|
6
6
|
import { makeResult, runWithAudit } from "./memory-tool-results.js";
|
|
7
7
|
import { forgetParamsSchema } from "./memory-tool-schemas.js";
|
|
@@ -3,7 +3,7 @@ import { normalizeCategory } from "../shared/types.js";
|
|
|
3
3
|
import { SnoStationMemError } from "../shared/errors.js";
|
|
4
4
|
import { clampInt } from "../shared/utils.js";
|
|
5
5
|
import { readEstimatedSpendToday } from "../operations/daily-spend-estimator.js";
|
|
6
|
-
import "../../../memory-tool-dependencies-
|
|
6
|
+
import "../../../memory-tool-dependencies-4Vl4QwBY.js";
|
|
7
7
|
import { assertAccessibleScopeForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
|
|
8
8
|
import { serializeMemory } from "./memory-tool-formatting.js";
|
|
9
9
|
import { makeResult, runWithAudit } from "./memory-tool-results.js";
|
|
@@ -3,7 +3,7 @@ import { normalizeCategory } from "../shared/types.js";
|
|
|
3
3
|
import { truncateGraphemes } from "../shared/i18n-text.js";
|
|
4
4
|
import { clamp01, clampInt } from "../shared/utils.js";
|
|
5
5
|
import { formatAtDepth } from "../retrieval/intent-analyzer.js";
|
|
6
|
-
import { t as countTokens } from "../../../memory-tool-dependencies-
|
|
6
|
+
import { t as countTokens } from "../../../memory-tool-dependencies-4Vl4QwBY.js";
|
|
7
7
|
import { assertAccessibleScopeForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
|
|
8
8
|
import { episodicEventDate, safeParseMetadata, sanitizeRecalledText, serializeMemory } from "./memory-tool-formatting.js";
|
|
9
9
|
import { makeResult, runWithAudit } from "./memory-tool-results.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clampInt } from "../shared/utils.js";
|
|
2
|
-
import "../../../memory-tool-dependencies-
|
|
2
|
+
import "../../../memory-tool-dependencies-4Vl4QwBY.js";
|
|
3
3
|
import { assertAccessibleScopeForTool, isScopeAccessibleForTool, resolveReadableScopesForTool } from "./memory-tool-access.js";
|
|
4
4
|
import { makeResult, runWithAudit } from "./memory-tool-results.js";
|
|
5
5
|
import { t as parseReflectionMetadata } from "../../../entry-metadata-parser-BIVSMCIk.js";
|