@melandlabs/memory-store 1.2.5 → 1.3.1
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 +47 -16
- package/dist/{config-Dw4aXj2a.d.ts → config-CbE2t4SW.d.ts} +172 -17
- package/dist/http.d.ts +2 -1
- package/dist/http.js +594 -270
- package/dist/index.d.ts +10 -6
- package/dist/index.js +316 -99
- package/dist/mcp.d.ts +2 -1
- package/dist/mcp.js +615 -250
- package/dist/search/derive.d.ts +2 -1
- package/dist/search/distill.d.ts +2 -1
- package/dist/search/unified-search.d.ts +3 -2
- package/dist/search/unified-search.js +316 -99
- package/dist/server/cli-http.js +966 -320
- package/dist/server/cli-mcp.js +987 -300
- package/dist/server/cli-shared.d.ts +20 -7
- package/dist/server/cli-shared.js +370 -48
- package/dist/storage/postgres-raw-message-factory.d.ts +2 -1
- package/dist/storage/raw-message-store.d.ts +20 -2
- package/dist/storage/sqlite-raw-message-store.d.ts +8 -1
- package/dist/storage/sqlite-vector-index.d.ts +2 -1
- package/dist/storage/sqlite-vector-index.js +1 -1
- package/dist/{unified-search-DfE8ek7W.d.ts → unified-search-2YQ6EGuQ.d.ts} +17 -6
- package/package.json +15 -11
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { VectorSearchResult } from '@melandlabs/rag/vector-service';
|
|
2
|
-
import { a as MemoryStoreEnv } from '../config-
|
|
2
|
+
import { a as MemoryStoreEnv } from '../config-CbE2t4SW.js';
|
|
3
3
|
import '@melandlabs/memory-consolidation';
|
|
4
4
|
import '@melandlabs/contracts/peer';
|
|
5
5
|
import '@melandlabs/contracts';
|
|
6
6
|
import '@melandlabs/contracts/derived-fact';
|
|
7
7
|
import '@melandlabs/contracts/entity-edge';
|
|
8
|
+
import '@melandlabs/indexeddb';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* SQLite-vec-backed raw-message + insight vector index.
|
|
@@ -24,7 +24,7 @@ function isInsightSQLiteVecEnabled(_env) {
|
|
|
24
24
|
}
|
|
25
25
|
async function getInsightSQLiteVecStore(_env) {
|
|
26
26
|
const dbPath = resolveSQLiteRawMessageDbPath();
|
|
27
|
-
const { getSQLiteVecStore } = await import('@melandlabs/rag/sqlite-vec-store');
|
|
27
|
+
const { getSQLiteVecStore } = await import('@melandlabs/ai-rag/sqlite-vec-store');
|
|
28
28
|
return await getSQLiteVecStore(dbPath, void 0, {
|
|
29
29
|
collectionName: process.env.SQLITE_VEC_INSIGHTS_COLLECTION || "opencontext_insights"
|
|
30
30
|
});
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import { S as SearchTier, b as UnifiedMemorySearchWarning, c as SearchEvidence, U as UnifiedSearchDeps, d as SearchInput, e as SearchOutput, f as UnifiedMemorySearchInput, g as UnifiedMemorySearchOutput, h as UnifiedMemorySearchResult } from './config-
|
|
1
|
+
import { S as SearchTier, b as UnifiedMemorySearchWarning, c as SearchEvidence, U as UnifiedSearchDeps, d as SearchInput, e as SearchOutput, f as UnifiedMemorySearchInput, g as UnifiedMemorySearchOutput, h as UnifiedMemorySearchResult } from './config-CbE2t4SW.js';
|
|
2
|
+
import { MemoryApplicabilityContext, OwnerScope, MemoryConsolidationPlan, ReflectApplyClusterKeyFn, MemoryStorageAdapterLike, MemoryGraphStoreWithOperationHistory, MemoryGraphUpdateResult } from '@melandlabs/memory-consolidation';
|
|
2
3
|
import { MemoryStorageAdapter } from '@melandlabs/ai/memory';
|
|
3
4
|
import { Peer } from '@melandlabs/contracts/peer';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Trusted, in-process context for one `search()` call. Hosts must derive these
|
|
8
|
+
* contexts from authenticated server-side state rather than public payloads.
|
|
9
|
+
* An explicit empty array requests global-only retrieval; omitting the runtime
|
|
10
|
+
* context preserves legacy unscoped behaviour.
|
|
11
|
+
*/
|
|
12
|
+
interface SearchRuntimeContext {
|
|
13
|
+
applicabilityContexts: readonly MemoryApplicabilityContext[];
|
|
14
|
+
}
|
|
5
15
|
|
|
6
16
|
/**
|
|
7
17
|
* `applyReflectedPlan` — agentic write-back facade.
|
|
@@ -87,16 +97,17 @@ declare function applyReflectedPlan(deps: UnifiedSearchDeps, store: MemoryStoreL
|
|
|
87
97
|
* dependencies via `UnifiedSearchDeps` so this module stays
|
|
88
98
|
* framework-agnostic.
|
|
89
99
|
*
|
|
90
|
-
* The public entry point is `search(input)` — a single method. Set
|
|
100
|
+
* The public entry point is `search(input, runtimeContext?)` — a single method. Set
|
|
91
101
|
* `synthesize: true` to opt into the LLM synthesis step.
|
|
92
102
|
*/
|
|
93
103
|
|
|
94
104
|
interface UnifiedSearch {
|
|
95
105
|
/**
|
|
96
106
|
* Single unified read entry point. Set `synthesize: true` to opt into
|
|
97
|
-
* LLM synthesis.
|
|
107
|
+
* LLM synthesis. The optional second argument is trusted in-process
|
|
108
|
+
* applicability context and is intentionally separate from `SearchInput`.
|
|
98
109
|
*/
|
|
99
|
-
search(input: SearchInput): Promise<SearchOutput>;
|
|
110
|
+
search(input: SearchInput, runtimeContext?: SearchRuntimeContext): Promise<SearchOutput>;
|
|
100
111
|
/**
|
|
101
112
|
* @deprecated Use `search(input)` instead. Forwarding shim kept for
|
|
102
113
|
* one release window.
|
|
@@ -119,4 +130,4 @@ interface UnifiedSearch {
|
|
|
119
130
|
}
|
|
120
131
|
declare function createUnifiedSearch(deps?: UnifiedSearchDeps): UnifiedSearch;
|
|
121
132
|
|
|
122
|
-
export { type ApplyConsolidateInput as A, type UnifiedSearch as U, type ApplyConsolidateOutput as a, applyReflectedPlan as b, createUnifiedSearch as c };
|
|
133
|
+
export { type ApplyConsolidateInput as A, type SearchRuntimeContext as S, type UnifiedSearch as U, type ApplyConsolidateOutput as a, applyReflectedPlan as b, createUnifiedSearch as c };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melandlabs/memory-store",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
"./postgres-raw-message-factory": "./dist/storage/postgres-raw-message-factory.js",
|
|
29
29
|
"./sqlite-vector-index": "./dist/storage/sqlite-vector-index.js",
|
|
30
30
|
"./chroma-memory-index": "./dist/storage/chroma-memory-index.js",
|
|
31
|
+
"./cli-shared": {
|
|
32
|
+
"types": "./dist/server/cli-shared.d.ts",
|
|
33
|
+
"import": "./dist/server/cli-shared.js"
|
|
34
|
+
},
|
|
31
35
|
"./unified-search": "./dist/search/unified-search.js",
|
|
32
36
|
"./memory-graph-write-policy": "./dist/policies/memory-graph-write-policy.js",
|
|
33
37
|
"./memory-graph-correction-policy": "./dist/policies/memory-graph-correction-policy.js"
|
|
@@ -60,19 +64,19 @@
|
|
|
60
64
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
61
65
|
"hono": "^4.6.14",
|
|
62
66
|
"zod": "^4.3.6",
|
|
63
|
-
"@melandlabs/
|
|
67
|
+
"@melandlabs/ai": "0.10.5",
|
|
64
68
|
"@melandlabs/contracts": "0.7.0",
|
|
65
|
-
"@melandlabs/
|
|
66
|
-
"@melandlabs/
|
|
67
|
-
"@melandlabs/
|
|
68
|
-
"@melandlabs/
|
|
69
|
-
"@melandlabs/
|
|
70
|
-
"@melandlabs/sqlite": "0.5.
|
|
69
|
+
"@melandlabs/env-config": "0.4.0",
|
|
70
|
+
"@melandlabs/memory-consolidation": "0.5.3",
|
|
71
|
+
"@melandlabs/okf": "0.3.3",
|
|
72
|
+
"@melandlabs/rag": "0.3.2",
|
|
73
|
+
"@melandlabs/shared": "0.4.2",
|
|
74
|
+
"@melandlabs/sqlite": "0.5.3",
|
|
71
75
|
"@melandlabs/vsa": "0.3.0"
|
|
72
76
|
},
|
|
73
77
|
"peerDependencies": {
|
|
74
|
-
"@melandlabs/ai-rag": "0.2.
|
|
75
|
-
"@melandlabs/indexeddb": "0.5.
|
|
78
|
+
"@melandlabs/ai-rag": "0.2.11",
|
|
79
|
+
"@melandlabs/indexeddb": "0.5.9"
|
|
76
80
|
},
|
|
77
81
|
"peerDependenciesMeta": {
|
|
78
82
|
"@melandlabs/ai-rag": {
|
|
@@ -85,7 +89,7 @@
|
|
|
85
89
|
"devDependencies": {
|
|
86
90
|
"@types/node": "^22.13.10",
|
|
87
91
|
"typescript": "^5.6.3",
|
|
88
|
-
"@melandlabs/ai-rag": "0.2.
|
|
92
|
+
"@melandlabs/ai-rag": "0.2.11",
|
|
89
93
|
"@melandlabs/config": "0.3.0"
|
|
90
94
|
},
|
|
91
95
|
"scripts": {
|