dsh-mnemon-source-memory-spaces 0.5.2 → 0.5.4
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 +11 -15
- package/lib/client.js +1264 -348
- package/lib/contracts.d.ts +44 -22
- package/lib/{definitions-CEpa-tvm.d.ts → definitions-C5y84OE6.d.ts} +22 -17
- package/lib/index.d.ts +18 -3
- package/lib/index.js +260 -280
- package/lib/native-cli.d.ts +15 -0
- package/lib/native-cli.js +108 -0
- package/lib/provider-sdk.d.ts +11 -9
- package/lib/provider-sdk.js +7 -4
- package/lib/testing.d.ts +3 -3
- package/lib/types/client/api.d.ts +13 -9
- package/lib/types/client/pages.d.ts +8 -6
- package/lib/types/client/presentation.d.ts +6 -0
- package/lib/types/contracts.d.ts +49 -22
- package/package.json +22 -13
- package/presentation/locales.json +716 -0
- package/presentation/page.module.css +489 -0
- package/presentation/sidebar.module.css +286 -0
package/lib/contracts.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ interface MemoryProviderRuntimeStatus {
|
|
|
148
148
|
activeMemoryBodyCount: number;
|
|
149
149
|
error?: string;
|
|
150
150
|
}
|
|
151
|
-
interface
|
|
151
|
+
interface MemorySpaceProvider {
|
|
152
152
|
id: MemoryProviderId;
|
|
153
153
|
/** Implementation type; differs from id when one module has several child instances. */
|
|
154
154
|
typeId?: string;
|
|
@@ -166,7 +166,7 @@ interface MemoryBodyProvider {
|
|
|
166
166
|
configuredSecrets: string[];
|
|
167
167
|
capabilities: MemoryProviderCapabilities;
|
|
168
168
|
}
|
|
169
|
-
interface
|
|
169
|
+
interface OpenVikingSpaceConnection {
|
|
170
170
|
endpoint: string;
|
|
171
171
|
targetUri: string;
|
|
172
172
|
apiKey?: string;
|
|
@@ -174,18 +174,18 @@ interface OpenVikingBodyConnection {
|
|
|
174
174
|
user?: string;
|
|
175
175
|
actorPeerId?: string;
|
|
176
176
|
}
|
|
177
|
-
interface
|
|
177
|
+
interface MemorySpace {
|
|
178
178
|
id: string;
|
|
179
179
|
name: string;
|
|
180
180
|
description: string;
|
|
181
181
|
active: boolean;
|
|
182
182
|
dbPath: string;
|
|
183
|
-
provider:
|
|
183
|
+
provider: MemorySpaceProvider;
|
|
184
184
|
placement?: MemoryPlacementDecision;
|
|
185
185
|
createdAt: string;
|
|
186
186
|
updatedAt: string;
|
|
187
187
|
}
|
|
188
|
-
interface
|
|
188
|
+
interface CreateMemorySpaceRequest {
|
|
189
189
|
name: string;
|
|
190
190
|
description: string;
|
|
191
191
|
active?: boolean;
|
|
@@ -193,30 +193,30 @@ interface CreateMemoryBodyRequest {
|
|
|
193
193
|
connection?: MemoryProviderConnection;
|
|
194
194
|
/** Candidate-specific settings used only while resolving automatic placement. */
|
|
195
195
|
providerConnections?: Partial<Record<MemoryProviderId, MemoryProviderConnection>>;
|
|
196
|
-
openViking?:
|
|
196
|
+
openViking?: OpenVikingSpaceConnection;
|
|
197
197
|
placement?: AutomaticMemoryPlacementRequest;
|
|
198
198
|
}
|
|
199
|
-
interface
|
|
199
|
+
interface UpdateMemorySpaceRequest {
|
|
200
200
|
name?: string;
|
|
201
201
|
description?: string;
|
|
202
202
|
active?: boolean;
|
|
203
203
|
connection?: MemoryProviderConnection;
|
|
204
204
|
clearSecrets?: string[];
|
|
205
|
-
openViking?: Partial<
|
|
205
|
+
openViking?: Partial<OpenVikingSpaceConnection> & {
|
|
206
206
|
clearApiKey?: boolean;
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
interface
|
|
209
|
+
interface MemorySpaceMetadataUpdate {
|
|
210
210
|
memoryBodyId: string;
|
|
211
211
|
title: string;
|
|
212
212
|
description: string;
|
|
213
213
|
}
|
|
214
|
-
interface
|
|
214
|
+
interface MemorySpaceMetadataMaintenanceResult {
|
|
215
215
|
delegated: true;
|
|
216
216
|
runId: string;
|
|
217
217
|
provider: string;
|
|
218
218
|
summary: string;
|
|
219
|
-
updates:
|
|
219
|
+
updates: MemorySpaceMetadataUpdate[];
|
|
220
220
|
}
|
|
221
221
|
type Category = 'preference' | 'decision' | 'fact' | 'insight' | 'context' | 'general';
|
|
222
222
|
declare const CATEGORIES: readonly ["preference", "decision", "fact", "insight", "context", "general"];
|
|
@@ -275,7 +275,7 @@ interface RememberRequest {
|
|
|
275
275
|
source?: Source;
|
|
276
276
|
memoryBodyId?: string;
|
|
277
277
|
}
|
|
278
|
-
interface
|
|
278
|
+
interface MemorySpaceStats {
|
|
279
279
|
totalInsights: number;
|
|
280
280
|
deletedInsights: number;
|
|
281
281
|
edgeCount: number;
|
|
@@ -287,7 +287,7 @@ interface MemoryBodyStats {
|
|
|
287
287
|
count: number;
|
|
288
288
|
}>;
|
|
289
289
|
}
|
|
290
|
-
interface
|
|
290
|
+
interface MemorySpaceView extends MemorySpace {
|
|
291
291
|
/** True when Mnemon's persisted active-file selection points to this Store. */
|
|
292
292
|
mnemonDefault: boolean;
|
|
293
293
|
/** False when an external provider is disabled while its Memory Space registration remains preserved. */
|
|
@@ -296,10 +296,10 @@ interface MemoryBodyView extends MemoryBody {
|
|
|
296
296
|
/** A fast directory response is visible while provider health resolves independently. */
|
|
297
297
|
statusLoading?: boolean;
|
|
298
298
|
error?: string;
|
|
299
|
-
stats?:
|
|
299
|
+
stats?: MemorySpaceStats;
|
|
300
300
|
}
|
|
301
|
-
interface
|
|
302
|
-
items:
|
|
301
|
+
interface MemorySpaceCatalog {
|
|
302
|
+
items: MemorySpaceView[];
|
|
303
303
|
providers: MemoryProviderDescriptor[];
|
|
304
304
|
/** Sanitized policy exposed to memory workers; provider connection values are never included. */
|
|
305
305
|
persistenceStrategy?: Omit<ResolvedMemoryPersistenceStrategy, 'providerConnections'>;
|
|
@@ -327,7 +327,7 @@ interface MemoryGraphSnapshot {
|
|
|
327
327
|
nodes: MemoryGraphNode[];
|
|
328
328
|
edges: MemoryGraphEdge[];
|
|
329
329
|
generatedAt: string;
|
|
330
|
-
memoryBodies?: Array<Pick<
|
|
330
|
+
memoryBodies?: Array<Pick<MemorySpace, 'id' | 'name' | 'active'>>;
|
|
331
331
|
/** Per-space observation state for capability-aware overview rendering. */
|
|
332
332
|
sources?: MemoryReadSource[];
|
|
333
333
|
}
|
|
@@ -378,11 +378,11 @@ interface MemoryListView {
|
|
|
378
378
|
/** Omitted only when talking to a pre-provider-aware Host. */
|
|
379
379
|
sources?: MemoryReadSource[];
|
|
380
380
|
}
|
|
381
|
-
interface
|
|
381
|
+
interface MemorySpaceMetadataSample {
|
|
382
382
|
memoryBodyId: string;
|
|
383
383
|
name: string;
|
|
384
384
|
description: string;
|
|
385
|
-
providerId:
|
|
385
|
+
providerId: MemorySpace['provider']['id'];
|
|
386
386
|
providerLabel: string;
|
|
387
387
|
method: 'native-basic' | 'browse' | 'search';
|
|
388
388
|
evidence: Array<Pick<Insight, 'content' | 'category' | 'entities'>>;
|
|
@@ -478,9 +478,9 @@ interface MemorySpacesStatus {
|
|
|
478
478
|
defaultRecallLimit: number;
|
|
479
479
|
recallQuality: ResolvedRecallQualityConfig;
|
|
480
480
|
memoryBodyDirectory: string;
|
|
481
|
-
memoryBodies:
|
|
481
|
+
memoryBodies: MemorySpaceView[];
|
|
482
482
|
providerServices?: MemoryProviderRuntimeStatus[];
|
|
483
|
-
stats?:
|
|
483
|
+
stats?: MemorySpaceStats & {
|
|
484
484
|
dbPath?: string;
|
|
485
485
|
};
|
|
486
486
|
}
|
|
@@ -494,5 +494,27 @@ interface EntityView {
|
|
|
494
494
|
/** Omitted only when talking to a pre-provider-aware Host. */
|
|
495
495
|
sources?: MemoryReadSource[];
|
|
496
496
|
}
|
|
497
|
+
/** @deprecated Use CreateMemorySpaceRequest. The wire shape is unchanged. */
|
|
498
|
+
type CreateMemoryBodyRequest = CreateMemorySpaceRequest;
|
|
499
|
+
/** @deprecated Use UpdateMemorySpaceRequest. The wire shape is unchanged. */
|
|
500
|
+
type UpdateMemoryBodyRequest = UpdateMemorySpaceRequest;
|
|
501
|
+
/** @deprecated Use MemorySpace. The wire shape is unchanged. */
|
|
502
|
+
type MemoryBody = MemorySpace;
|
|
503
|
+
/** @deprecated Use MemorySpaceCatalog. The wire shape is unchanged. */
|
|
504
|
+
type MemoryBodyCatalog = MemorySpaceCatalog;
|
|
505
|
+
/** @deprecated Use MemorySpaceMetadataMaintenanceResult. The wire shape is unchanged. */
|
|
506
|
+
type MemoryBodyMetadataMaintenanceResult = MemorySpaceMetadataMaintenanceResult;
|
|
507
|
+
/** @deprecated Use MemorySpaceMetadataSample. The wire shape is unchanged. */
|
|
508
|
+
type MemoryBodyMetadataSample = MemorySpaceMetadataSample;
|
|
509
|
+
/** @deprecated Use MemorySpaceMetadataUpdate. The wire shape is unchanged. */
|
|
510
|
+
type MemoryBodyMetadataUpdate = MemorySpaceMetadataUpdate;
|
|
511
|
+
/** @deprecated Use MemorySpaceProvider. The wire shape is unchanged. */
|
|
512
|
+
type MemoryBodyProvider = MemorySpaceProvider;
|
|
513
|
+
/** @deprecated Use MemorySpaceStats. The wire shape is unchanged. */
|
|
514
|
+
type MemoryBodyStats = MemorySpaceStats;
|
|
515
|
+
/** @deprecated Use MemorySpaceView. The wire shape is unchanged. */
|
|
516
|
+
type MemoryBodyView = MemorySpaceView;
|
|
517
|
+
/** @deprecated Use OpenVikingSpaceConnection. The wire shape is unchanged. */
|
|
518
|
+
type OpenVikingBodyConnection = OpenVikingSpaceConnection;
|
|
497
519
|
//#endregion
|
|
498
|
-
export { AutomaticMemoryPlacementRequest, CATEGORIES, Category, CreateMemoryBodyRequest, DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, EDGE_TYPES, EMBEDDING_PROTOCOL_AUTO, EMBEDDING_PROTOCOL_OLLAMA, EMBEDDING_PROTOCOL_OPENAI, EdgeType, EntityView, INTENTS, Insight, Intent, type JsonValue, LlmMemoryPlacementSelection, MNEMON_EMBEDDING_PROTOCOLS, MemoryBody, MemoryBodyCatalog, MemoryBodyMetadataMaintenanceResult, MemoryBodyMetadataSample, MemoryBodyMetadataUpdate, MemoryBodyProvider, MemoryBodyStats, MemoryBodyView, MemoryGraphEdge, MemoryGraphNode, MemoryGraphSnapshot, MemoryListRequest, MemoryListView, MemoryPersistenceStrategy, MemoryPlacementCandidate, MemoryPlacementCapability, MemoryPlacementDecision, MemoryPlacementPreference, MemoryPlacementRules, MemoryProviderCapabilities, MemoryProviderConfigField, MemoryProviderConfigOption, MemoryProviderConnection, MemoryProviderConnectionValue, MemoryProviderDescriptor, MemoryProviderIcon, MemoryProviderId, MemoryProviderRuntimeStatus, MemoryProviderServiceCatalog, MemoryProviderServiceView, MemoryReadMode, MemoryReadSource, MemoryReadStatus, MemorySpacesStatus, MnemonEmbeddingConfig, MnemonEmbeddingProtocol, MnemonEmbeddingStatus, OpenVikingBodyConnection, PreparedMemoryPlacement, RecallQualityConfig, RecallQualityStats, RecallRelevanceTier, RememberRequest, ResolvedMemoryPersistenceStrategy, ResolvedMnemonEmbeddingConfig, ResolvedRecallQualityConfig, SOURCES, SearchRequest, Source, UpdateMemoryBodyRequest, UpdateMemoryProviderServiceRequest };
|
|
520
|
+
export { AutomaticMemoryPlacementRequest, CATEGORIES, Category, CreateMemoryBodyRequest, CreateMemorySpaceRequest, DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, EDGE_TYPES, EMBEDDING_PROTOCOL_AUTO, EMBEDDING_PROTOCOL_OLLAMA, EMBEDDING_PROTOCOL_OPENAI, EdgeType, EntityView, INTENTS, Insight, Intent, type JsonValue, LlmMemoryPlacementSelection, MNEMON_EMBEDDING_PROTOCOLS, MemoryBody, MemoryBodyCatalog, MemoryBodyMetadataMaintenanceResult, MemoryBodyMetadataSample, MemoryBodyMetadataUpdate, MemoryBodyProvider, MemoryBodyStats, MemoryBodyView, MemoryGraphEdge, MemoryGraphNode, MemoryGraphSnapshot, MemoryListRequest, MemoryListView, MemoryPersistenceStrategy, MemoryPlacementCandidate, MemoryPlacementCapability, MemoryPlacementDecision, MemoryPlacementPreference, MemoryPlacementRules, MemoryProviderCapabilities, MemoryProviderConfigField, MemoryProviderConfigOption, MemoryProviderConnection, MemoryProviderConnectionValue, MemoryProviderDescriptor, MemoryProviderIcon, MemoryProviderId, MemoryProviderRuntimeStatus, MemoryProviderServiceCatalog, MemoryProviderServiceView, MemoryReadMode, MemoryReadSource, MemoryReadStatus, MemorySpace, MemorySpaceCatalog, MemorySpaceMetadataMaintenanceResult, MemorySpaceMetadataSample, MemorySpaceMetadataUpdate, MemorySpaceProvider, MemorySpaceStats, MemorySpaceView, MemorySpacesStatus, MnemonEmbeddingConfig, MnemonEmbeddingProtocol, MnemonEmbeddingStatus, OpenVikingBodyConnection, OpenVikingSpaceConnection, PreparedMemoryPlacement, RecallQualityConfig, RecallQualityStats, RecallRelevanceTier, RememberRequest, ResolvedMemoryPersistenceStrategy, ResolvedMnemonEmbeddingConfig, ResolvedRecallQualityConfig, SOURCES, SearchRequest, Source, UpdateMemoryBodyRequest, UpdateMemoryProviderServiceRequest, UpdateMemorySpaceRequest };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EdgeType, Insight, JsonValue,
|
|
1
|
+
import { EdgeType, Insight, JsonValue, MemoryGraphSnapshot, MemoryListRequest, MemoryProviderCapabilities, MemoryProviderConfigField, MemoryProviderConnection, MemoryProviderDescriptor, MemoryProviderIcon, MemorySpace, MemorySpaceStats, RememberRequest, SearchRequest } from "./contracts.js";
|
|
2
2
|
import { Context, Plugin } from "@deepseek-ai/cordis";
|
|
3
3
|
//#region src/providers/adapter.d.ts
|
|
4
4
|
/** Minimum parent authority a Provider needs; no private controller class. */
|
|
@@ -6,7 +6,7 @@ interface MemorySpaceAuthority {
|
|
|
6
6
|
readonly runner: {
|
|
7
7
|
effectiveDataDir(): string;
|
|
8
8
|
};
|
|
9
|
-
list():
|
|
9
|
+
list(): MemorySpace[];
|
|
10
10
|
providerConnection(id: string, expectedProviderId?: string): MemoryProviderConnection;
|
|
11
11
|
}
|
|
12
12
|
/** Scoped command transport consumed by the Native Provider. */
|
|
@@ -21,6 +21,9 @@ interface MemorySpaceNativeRunner {
|
|
|
21
21
|
}): Promise<string>;
|
|
22
22
|
}
|
|
23
23
|
interface MemoryProviderAdapterFactoryContext {
|
|
24
|
+
/** Canonical name; optional while older Source hosts remain supported. */
|
|
25
|
+
memorySpaces?: MemorySpaceAuthority;
|
|
26
|
+
/** @deprecated Use memorySpaces when present; retained for existing Provider factories. */
|
|
24
27
|
memoryBodies: MemorySpaceAuthority;
|
|
25
28
|
config: {
|
|
26
29
|
timeoutMs: number;
|
|
@@ -28,10 +31,10 @@ interface MemoryProviderAdapterFactoryContext {
|
|
|
28
31
|
};
|
|
29
32
|
nativeRunner?: MemorySpaceNativeRunner;
|
|
30
33
|
}
|
|
31
|
-
interface
|
|
34
|
+
interface ProviderSpaceStatus {
|
|
32
35
|
healthy: boolean;
|
|
33
36
|
error?: string;
|
|
34
|
-
stats?:
|
|
37
|
+
stats?: MemorySpaceStats;
|
|
35
38
|
}
|
|
36
39
|
interface ProviderSearchResult {
|
|
37
40
|
results: Insight[];
|
|
@@ -53,30 +56,32 @@ interface ProviderMemorySpace {
|
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
58
|
* Third-layer memory data plane. DSH owns routing and lifecycle; adapters own
|
|
56
|
-
* only one
|
|
59
|
+
* only one memory space's persistence and retrieval semantics.
|
|
57
60
|
*/
|
|
58
61
|
interface MemoryProviderAdapter {
|
|
59
|
-
readonly id:
|
|
62
|
+
readonly id: MemorySpace['provider']['id'];
|
|
60
63
|
readonly scoreSemantics?: ProviderScoreSemantics;
|
|
61
64
|
/** Enumerate the complete set of namespaces visible to this service connection. */
|
|
62
65
|
discover?(connection: MemoryProviderConnection, signal?: AbortSignal): Promise<ProviderMemorySpace[]>;
|
|
63
66
|
/** Drop a short-lived health result before an explicit user reconnect. */
|
|
64
67
|
invalidateStatus?(memoryBodyId?: string): void;
|
|
65
|
-
status(body:
|
|
66
|
-
search(body:
|
|
67
|
-
graph(body:
|
|
68
|
-
list(body:
|
|
69
|
-
remember(body:
|
|
68
|
+
status(body: MemorySpace, signal?: AbortSignal): Promise<ProviderSpaceStatus>;
|
|
69
|
+
search(body: MemorySpace, request: SearchRequest, signal?: AbortSignal): Promise<ProviderSearchResult>;
|
|
70
|
+
graph(body: MemorySpace, signal?: AbortSignal): Promise<MemoryGraphSnapshot>;
|
|
71
|
+
list(body: MemorySpace, request: MemoryListRequest, signal?: AbortSignal): Promise<Insight[]>;
|
|
72
|
+
remember(body: MemorySpace, request: RememberRequest, signal?: AbortSignal): Promise<JsonValue>;
|
|
70
73
|
/** Optional cheap bounded metadata sampling, without a graph projection. */
|
|
71
|
-
metadataSample?(body:
|
|
74
|
+
metadataSample?(body: MemorySpace, limit: number, signal?: AbortSignal): Promise<Insight[]>;
|
|
72
75
|
/** Persist an ordered host-authorized batch and return one receipt per request. */
|
|
73
|
-
rememberMany?(body:
|
|
74
|
-
related?(body:
|
|
75
|
-
link?(body:
|
|
76
|
-
forget?(body:
|
|
76
|
+
rememberMany?(body: MemorySpace, requests: readonly RememberRequest[], signal?: AbortSignal): Promise<JsonValue[]>;
|
|
77
|
+
related?(body: MemorySpace, id: string, depth: number, edge?: EdgeType, signal?: AbortSignal): Promise<Insight[]>;
|
|
78
|
+
link?(body: MemorySpace, sourceId: string, targetId: string, type: EdgeType, weight: number, reason?: string, signal?: AbortSignal): Promise<JsonValue>;
|
|
79
|
+
forget?(body: MemorySpace, id: string, signal?: AbortSignal): Promise<JsonValue>;
|
|
77
80
|
/** Release generation-owned clients, timers, pools, or subprocess handles. */
|
|
78
81
|
dispose?(): void | Promise<void>;
|
|
79
82
|
}
|
|
83
|
+
/** @deprecated Use ProviderSpaceStatus. */
|
|
84
|
+
type ProviderBodyStatus = ProviderSpaceStatus;
|
|
80
85
|
//#endregion
|
|
81
86
|
//#region src/providers/definitions.d.ts
|
|
82
87
|
declare const MEMORY_SPACE_PROVIDER_API_VERSION: "dsh-mnemon.memory-space-provider/v1";
|
|
@@ -132,4 +137,4 @@ interface MemorySpaceProviderEntry<Config = unknown> {
|
|
|
132
137
|
declare function defineMemorySpaceProvider<Config>(module: MemorySpaceProviderModule<Config>): MemorySpaceProviderModule<Config>;
|
|
133
138
|
declare function defineMemorySpaceProviderDefinition(definition: MemorySpaceProviderDefinition): MemorySpaceProviderDefinition;
|
|
134
139
|
//#endregion
|
|
135
|
-
export { NORMALIZED_RELEVANCE_SCORE as _, MemorySpaceProviderHost as a, ProviderScoreSemantics as b, MemorySpaceProviderRuntimeContext as c, defineMemorySpaceProviderDefinition as d, MemoryProviderAdapter as f, MemorySpaceNativeRunner as g, MemorySpaceAuthority as h, MemorySpaceProviderEntry as i, MemorySpaceProviderScoreSemantics as l, MemoryProviderScoreSemantics as m, MemorySpaceProviderDefinition as n, MemorySpaceProviderManifest as o, MemoryProviderAdapterFactoryContext as p, MemorySpaceProviderDisposer as r, MemorySpaceProviderModule as s, MEMORY_SPACE_PROVIDER_API_VERSION as t, defineMemorySpaceProvider as u, ProviderBodyStatus as v, ProviderSearchResult as x, ProviderMemorySpace as y };
|
|
140
|
+
export { ProviderSpaceStatus as S, NORMALIZED_RELEVANCE_SCORE as _, MemorySpaceProviderHost as a, ProviderScoreSemantics as b, MemorySpaceProviderRuntimeContext as c, defineMemorySpaceProviderDefinition as d, MemoryProviderAdapter as f, MemorySpaceNativeRunner as g, MemorySpaceAuthority as h, MemorySpaceProviderEntry as i, MemorySpaceProviderScoreSemantics as l, MemoryProviderScoreSemantics as m, MemorySpaceProviderDefinition as n, MemorySpaceProviderManifest as o, MemoryProviderAdapterFactoryContext as p, MemorySpaceProviderDisposer as r, MemorySpaceProviderModule as s, MEMORY_SPACE_PROVIDER_API_VERSION as t, defineMemorySpaceProvider as u, ProviderBodyStatus as v, ProviderSearchResult as x, ProviderMemorySpace as y };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutomaticMemoryPlacementRequest, CATEGORIES, Category, CreateMemoryBodyRequest, DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, EDGE_TYPES, EMBEDDING_PROTOCOL_AUTO, EMBEDDING_PROTOCOL_OLLAMA, EMBEDDING_PROTOCOL_OPENAI, EdgeType, EntityView, INTENTS, Insight, Intent, JsonValue, LlmMemoryPlacementSelection, MNEMON_EMBEDDING_PROTOCOLS, MemoryBody, MemoryBodyCatalog, MemoryBodyMetadataMaintenanceResult, MemoryBodyMetadataSample, MemoryBodyMetadataUpdate, MemoryBodyProvider, MemoryBodyStats, MemoryBodyView, MemoryGraphEdge, MemoryGraphNode, MemoryGraphSnapshot, MemoryListRequest, MemoryListView, MemoryPersistenceStrategy, MemoryPlacementCandidate, MemoryPlacementCapability, MemoryPlacementDecision, MemoryPlacementPreference, MemoryPlacementRules, MemoryProviderCapabilities, MemoryProviderConfigField, MemoryProviderConfigOption, MemoryProviderConnection, MemoryProviderConnectionValue, MemoryProviderDescriptor, MemoryProviderIcon, MemoryProviderId, MemoryProviderRuntimeStatus, MemoryProviderServiceCatalog, MemoryProviderServiceView, MemoryReadMode, MemoryReadSource, MemoryReadStatus, MemorySpacesStatus, MnemonEmbeddingConfig, MnemonEmbeddingProtocol, MnemonEmbeddingStatus, OpenVikingBodyConnection, PreparedMemoryPlacement, RecallQualityConfig, RecallQualityStats, RecallRelevanceTier, RememberRequest, ResolvedMemoryPersistenceStrategy, ResolvedMnemonEmbeddingConfig, ResolvedRecallQualityConfig, SOURCES, SearchRequest, Source, UpdateMemoryBodyRequest, UpdateMemoryProviderServiceRequest } from "./contracts.js";
|
|
2
|
-
import { i as MemorySpaceProviderEntry } from "./definitions-
|
|
1
|
+
import { AutomaticMemoryPlacementRequest, CATEGORIES, Category, CreateMemoryBodyRequest, CreateMemorySpaceRequest, DEFAULT_EMBEDDING_ENDPOINT, DEFAULT_EMBEDDING_MODEL, DEFAULT_EMBEDDING_PROTOCOL, EDGE_TYPES, EMBEDDING_PROTOCOL_AUTO, EMBEDDING_PROTOCOL_OLLAMA, EMBEDDING_PROTOCOL_OPENAI, EdgeType, EntityView, INTENTS, Insight, Intent, JsonValue, LlmMemoryPlacementSelection, MNEMON_EMBEDDING_PROTOCOLS, MemoryBody, MemoryBodyCatalog, MemoryBodyMetadataMaintenanceResult, MemoryBodyMetadataSample, MemoryBodyMetadataUpdate, MemoryBodyProvider, MemoryBodyStats, MemoryBodyView, MemoryGraphEdge, MemoryGraphNode, MemoryGraphSnapshot, MemoryListRequest, MemoryListView, MemoryPersistenceStrategy, MemoryPlacementCandidate, MemoryPlacementCapability, MemoryPlacementDecision, MemoryPlacementPreference, MemoryPlacementRules, MemoryProviderCapabilities, MemoryProviderConfigField, MemoryProviderConfigOption, MemoryProviderConnection, MemoryProviderConnectionValue, MemoryProviderDescriptor, MemoryProviderIcon, MemoryProviderId, MemoryProviderRuntimeStatus, MemoryProviderServiceCatalog, MemoryProviderServiceView, MemoryReadMode, MemoryReadSource, MemoryReadStatus, MemorySpace, MemorySpaceCatalog, MemorySpaceMetadataMaintenanceResult, MemorySpaceMetadataSample, MemorySpaceMetadataUpdate, MemorySpaceProvider, MemorySpaceStats, MemorySpaceView, MemorySpacesStatus, MnemonEmbeddingConfig, MnemonEmbeddingProtocol, MnemonEmbeddingStatus, OpenVikingBodyConnection, OpenVikingSpaceConnection, PreparedMemoryPlacement, RecallQualityConfig, RecallQualityStats, RecallRelevanceTier, RememberRequest, ResolvedMemoryPersistenceStrategy, ResolvedMnemonEmbeddingConfig, ResolvedRecallQualityConfig, SOURCES, SearchRequest, Source, UpdateMemoryBodyRequest, UpdateMemoryProviderServiceRequest, UpdateMemorySpaceRequest } from "./contracts.js";
|
|
2
|
+
import { i as MemorySpaceProviderEntry } from "./definitions-C5y84OE6.js";
|
|
3
3
|
import z from "schemastery";
|
|
4
4
|
import { Context } from "@deepseek-ai/cordis";
|
|
5
5
|
//#region src/config.d.ts
|
|
@@ -14,7 +14,22 @@ interface MemorySpacesConfig {
|
|
|
14
14
|
recallQuality?: RecallQualityConfig;
|
|
15
15
|
persistenceStrategy?: MemoryPersistenceStrategy;
|
|
16
16
|
}
|
|
17
|
+
interface ResolvedMemorySpacesConfig {
|
|
18
|
+
storageScope: 'global' | 'workspace' | 'custom';
|
|
19
|
+
dataDir?: string;
|
|
20
|
+
cliPath?: string;
|
|
21
|
+
store?: string;
|
|
22
|
+
timeoutMs: number;
|
|
23
|
+
defaultRecallLimit: number;
|
|
24
|
+
writeEnabled: boolean;
|
|
25
|
+
embedding: ResolvedMnemonEmbeddingConfig;
|
|
26
|
+
recallQuality: ResolvedRecallQualityConfig;
|
|
27
|
+
persistenceStrategy: ResolvedMemoryPersistenceStrategy;
|
|
28
|
+
}
|
|
17
29
|
declare const MemorySpacesConfig: z<MemorySpacesConfig>;
|
|
30
|
+
declare function resolvePersistenceStrategy(value: MemoryPersistenceStrategy | undefined): ResolvedMemorySpacesConfig['persistenceStrategy'];
|
|
31
|
+
declare function resolveEmbedding(value: MemorySpacesConfig['embedding']): ResolvedMemorySpacesConfig['embedding'];
|
|
32
|
+
declare function resolveRecallQuality(value: RecallQualityConfig | undefined): ResolvedMemorySpacesConfig['recallQuality'];
|
|
18
33
|
//#endregion
|
|
19
34
|
//#region src/index.d.ts
|
|
20
35
|
declare const name = "dsh-mnemon-source-memory-spaces";
|
|
@@ -44,4 +59,4 @@ declare function resolveMemorySpaceProviderEntries(ctx: Context, declarations: r
|
|
|
44
59
|
declare function installMemorySpaces(ctx: Context, entries: readonly MemorySpaceProviderEntry[], options?: InstallMemorySpacesOptions): Promise<void>;
|
|
45
60
|
declare function apply(ctx: Context, config?: Config): Promise<void>;
|
|
46
61
|
//#endregion
|
|
47
|
-
export { type AutomaticMemoryPlacementRequest, type CATEGORIES, type Category, Config, type CreateMemoryBodyRequest, type DEFAULT_EMBEDDING_ENDPOINT, type DEFAULT_EMBEDDING_MODEL, type DEFAULT_EMBEDDING_PROTOCOL, type EDGE_TYPES, type EMBEDDING_PROTOCOL_AUTO, type EMBEDDING_PROTOCOL_OLLAMA, type EMBEDDING_PROTOCOL_OPENAI, type EdgeType, type EntityView, type INTENTS, type Insight, InstallMemorySpacesOptions, type Intent, type JsonValue, type LlmMemoryPlacementSelection, type MNEMON_EMBEDDING_PROTOCOLS, type MemoryBody, type MemoryBodyCatalog, type MemoryBodyMetadataMaintenanceResult, type MemoryBodyMetadataSample, type MemoryBodyMetadataUpdate, type MemoryBodyProvider, type MemoryBodyStats, type MemoryBodyView, type MemoryGraphEdge, type MemoryGraphNode, type MemoryGraphSnapshot, type MemoryListRequest, type MemoryListView, type MemoryPersistenceStrategy, type MemoryPlacementCandidate, type MemoryPlacementCapability, type MemoryPlacementDecision, type MemoryPlacementPreference, type MemoryPlacementRules, type MemoryProviderCapabilities, type MemoryProviderConfigField, type MemoryProviderConfigOption, type MemoryProviderConnection, type MemoryProviderConnectionValue, type MemoryProviderDescriptor, type MemoryProviderIcon, type MemoryProviderId, type MemoryProviderRuntimeStatus, type MemoryProviderServiceCatalog, type MemoryProviderServiceView, type MemoryReadMode, type MemoryReadSource, type MemoryReadStatus, MemorySpaceProviderDeclaration, MemorySpaceProviderDeclarationSchema, type MemorySpacesStatus, type MnemonEmbeddingConfig, type MnemonEmbeddingProtocol, type MnemonEmbeddingStatus, type OpenVikingBodyConnection, type PreparedMemoryPlacement, type RecallQualityConfig, type RecallQualityStats, type RecallRelevanceTier, type RememberRequest, type ResolvedMemoryPersistenceStrategy, type ResolvedMnemonEmbeddingConfig, type ResolvedRecallQualityConfig, type SOURCES, type SearchRequest, type Source, type UpdateMemoryBodyRequest, type UpdateMemoryProviderServiceRequest, apply, inject, installMemorySpaces, memoryPlugin, name, resolveMemorySpaceProviderEntries };
|
|
62
|
+
export { type AutomaticMemoryPlacementRequest, type CATEGORIES, type Category, Config, type CreateMemoryBodyRequest, type CreateMemorySpaceRequest, type DEFAULT_EMBEDDING_ENDPOINT, type DEFAULT_EMBEDDING_MODEL, type DEFAULT_EMBEDDING_PROTOCOL, type EDGE_TYPES, type EMBEDDING_PROTOCOL_AUTO, type EMBEDDING_PROTOCOL_OLLAMA, type EMBEDDING_PROTOCOL_OPENAI, type EdgeType, type EntityView, type INTENTS, type Insight, InstallMemorySpacesOptions, type Intent, type JsonValue, type LlmMemoryPlacementSelection, type MNEMON_EMBEDDING_PROTOCOLS, type MemoryBody, type MemoryBodyCatalog, type MemoryBodyMetadataMaintenanceResult, type MemoryBodyMetadataSample, type MemoryBodyMetadataUpdate, type MemoryBodyProvider, type MemoryBodyStats, type MemoryBodyView, type MemoryGraphEdge, type MemoryGraphNode, type MemoryGraphSnapshot, type MemoryListRequest, type MemoryListView, type MemoryPersistenceStrategy, type MemoryPlacementCandidate, type MemoryPlacementCapability, type MemoryPlacementDecision, type MemoryPlacementPreference, type MemoryPlacementRules, type MemoryProviderCapabilities, type MemoryProviderConfigField, type MemoryProviderConfigOption, type MemoryProviderConnection, type MemoryProviderConnectionValue, type MemoryProviderDescriptor, type MemoryProviderIcon, type MemoryProviderId, type MemoryProviderRuntimeStatus, type MemoryProviderServiceCatalog, type MemoryProviderServiceView, type MemoryReadMode, type MemoryReadSource, type MemoryReadStatus, type MemorySpace, type MemorySpaceCatalog, type MemorySpaceMetadataMaintenanceResult, type MemorySpaceMetadataSample, type MemorySpaceMetadataUpdate, type MemorySpaceProvider, MemorySpaceProviderDeclaration, MemorySpaceProviderDeclarationSchema, type MemorySpaceStats, type MemorySpaceView, type MemorySpacesStatus, type MnemonEmbeddingConfig, type MnemonEmbeddingProtocol, type MnemonEmbeddingStatus, type OpenVikingBodyConnection, type OpenVikingSpaceConnection, type PreparedMemoryPlacement, type RecallQualityConfig, type RecallQualityStats, type RecallRelevanceTier, type RememberRequest, type ResolvedMemoryPersistenceStrategy, type ResolvedMnemonEmbeddingConfig, type ResolvedRecallQualityConfig, type SOURCES, type SearchRequest, type Source, type UpdateMemoryBodyRequest, type UpdateMemoryProviderServiceRequest, type UpdateMemorySpaceRequest, apply, inject, installMemorySpaces, memoryPlugin, name, resolveEmbedding, resolveMemorySpaceProviderEntries, resolvePersistenceStrategy, resolveRecallQuality };
|