@danielzfliu/memory 2.1.0 → 2.2.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 +8 -351
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +35 -0
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +314 -44
- package/dist/server.js.map +1 -1
- package/dist/store.d.ts +6 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +43 -14
- package/dist/store.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +9 -0
- package/docs/configuration.md +55 -0
- package/docs/getting-started.md +71 -0
- package/docs/mcp-server.md +61 -0
- package/docs/npm-package.md +100 -0
- package/docs/rest-api.md +455 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -3,361 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
# Memory
|
|
5
5
|
|
|
6
|
-
A fully local MCP server
|
|
6
|
+
A fully local MCP server, Node.js library, and REST API for storing, semantically searching, and querying tagged or titled text with ChromaDB and Ollama.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Documentation
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
- npm Package — Install `@danielzfliu/memory` in your own project and use the classes directly (store, embeddings, RAG, and MCP server class).
|
|
12
|
-
- REST API Server — Run the standalone HTTP server with CRUD, semantic search, and RAG endpoints.
|
|
10
|
+
- [Docs index](./docs/README.md)
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
Use [Configuration](./docs/configuration.md) for runtime options and environment variable overrides.
|
|
15
13
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
- **Node.js** ≥ 18
|
|
19
|
-
- **Ollama** running locally
|
|
20
|
-
- **ChromaDB** server running locally
|
|
21
|
-
|
|
22
|
-
### Setting up Ollama
|
|
23
|
-
|
|
24
|
-
Install Ollama ([install](https://ollama.com)) and pull the default models:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
ollama pull nomic-embed-text-v2-moe:latest
|
|
28
|
-
ollama pull gemma3:latest
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Then run:
|
|
32
|
-
```bash
|
|
33
|
-
npm run ollama # start Ollama on default port 11434
|
|
34
|
-
npm run ollama:port -- 11435 # start Ollama on a custom port
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Setting up ChromaDB
|
|
38
|
-
|
|
39
|
-
**Option 1: Docker**
|
|
40
|
-
|
|
41
|
-
The repo includes a Docker Compose file that runs ChromaDB and stores its data in `./chroma/`.
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
npm run docker:up # start ChromaDB on port 8000
|
|
45
|
-
npm run docker:logs # view logs
|
|
46
|
-
npm run docker:down # stop ChromaDB
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Option 2: pip**
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
pip install chromadb
|
|
53
|
-
chroma run --port 8000 # start ChromaDB on port 8000
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Note: You may need to add Python's Scripts folder to your PATH after installing.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Option A: MCP Server
|
|
61
|
-
|
|
62
|
-
Use this option to run Memory as a standalone MCP server.
|
|
63
|
-
|
|
64
|
-
### 1. Setup
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
git clone https://github.com/DanielZFLiu/memory.git
|
|
68
|
-
cd memory
|
|
69
|
-
npm install
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 2. Build and run the MCP server
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npm run build
|
|
76
|
-
node ./dist/main.js
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Memory MCP communicates over stdio, so it does not bind an HTTP port.
|
|
80
|
-
|
|
81
|
-
### MCP Client Configuration
|
|
82
|
-
|
|
83
|
-
#### Claude Desktop (example)
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"mcpServers": {
|
|
88
|
-
"memory": {
|
|
89
|
-
"command": "npx",
|
|
90
|
-
"args": ["-y", "@danielzfliu/memory"]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
If you are running from a local clone instead of npm:
|
|
97
|
-
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"mcpServers": {
|
|
101
|
-
"memory": {
|
|
102
|
-
"command": "node",
|
|
103
|
-
"args": ["c:/path/to/memory/dist/main.js"]
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### MCP Tools
|
|
110
|
-
|
|
111
|
-
| Tool | Description |
|
|
112
|
-
|------|-------------|
|
|
113
|
-
| `add_piece` | Add a new piece with optional title and tags |
|
|
114
|
-
| `get_piece` | Retrieve a piece by id |
|
|
115
|
-
| `update_piece` | Update piece content, title, and/or tags (`title: null` clears title) |
|
|
116
|
-
| `delete_piece` | Delete a piece by id |
|
|
117
|
-
| `query_pieces` | Semantic search over content, plus title when present. Supports hybrid search (vector + keyword via RRF). |
|
|
118
|
-
| `rag_query` | Retrieve + generate answer with citations using content and title context. Supports hybrid search. |
|
|
119
|
-
| `list_collections` | List all collection names in the memory store |
|
|
120
|
-
| `delete_collection` | Delete an entire collection and all its pieces |
|
|
121
|
-
|
|
122
|
-
All piece-level tools accept an optional `collection` parameter to target a specific collection instead of the default. This allows multiple agents to use isolated memory stores.
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Option B: npm Package
|
|
127
|
-
|
|
128
|
-
Use this option to integrate Memory into your own Node.js/TypeScript project.
|
|
129
|
-
|
|
130
|
-
### 1. Install
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
npm install @danielzfliu/memory
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### 2. Programmatic usage
|
|
137
|
-
|
|
138
|
-
#### Using PieceStore and RagPipeline directly
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
import { PieceStore, RagPipeline, MemoryConfig } from "@danielzfliu/memory";
|
|
142
|
-
|
|
143
|
-
async function main() {
|
|
144
|
-
const config: MemoryConfig = {
|
|
145
|
-
chromaUrl: "http://localhost:8000",
|
|
146
|
-
ollamaUrl: "http://localhost:11434",
|
|
147
|
-
embeddingModel: "nomic-embed-text-v2-moe:latest",
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// Store: CRUD + semantic search
|
|
151
|
-
const store = new PieceStore(config);
|
|
152
|
-
await store.init();
|
|
153
|
-
|
|
154
|
-
await store.addPiece(
|
|
155
|
-
"TypeScript is a typed superset of JavaScript.",
|
|
156
|
-
["typescript", "programming"],
|
|
157
|
-
"TypeScript overview",
|
|
158
|
-
);
|
|
159
|
-
await store.addPiece("Python is great for data science.", [
|
|
160
|
-
"python",
|
|
161
|
-
"data-science",
|
|
162
|
-
]);
|
|
163
|
-
|
|
164
|
-
const results = await store.queryPieces("typed languages", { topK: 5 });
|
|
165
|
-
console.log("results", results);
|
|
166
|
-
|
|
167
|
-
const filtered = await store.queryPieces("typed languages", {
|
|
168
|
-
tags: ["typescript"],
|
|
169
|
-
topK: 5,
|
|
170
|
-
});
|
|
171
|
-
console.log("filtered", filtered);
|
|
172
|
-
|
|
173
|
-
// Hybrid search: combines vector similarity with keyword matching via RRF
|
|
174
|
-
const hybrid = await store.queryPieces("typed languages", {
|
|
175
|
-
topK: 5,
|
|
176
|
-
useHybridSearch: true,
|
|
177
|
-
});
|
|
178
|
-
console.log("hybrid", hybrid);
|
|
179
|
-
|
|
180
|
-
// RAG: retrieve relevant pieces → generate an answer via Ollama
|
|
181
|
-
const rag = new RagPipeline(store, config.ollamaUrl!, "gemma3:latest");
|
|
182
|
-
const answer = await rag.query("What is TypeScript?", {
|
|
183
|
-
tags: ["programming"],
|
|
184
|
-
});
|
|
185
|
-
console.log("answer", answer);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
main().catch((err) => {
|
|
189
|
-
console.error(err);
|
|
190
|
-
process.exit(1);
|
|
191
|
-
});
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
#### Embedding the REST API in your own Express app
|
|
195
|
-
|
|
196
|
-
`createServer` returns a configured Express app you can mount or extend:
|
|
197
|
-
|
|
198
|
-
```typescript
|
|
199
|
-
import { createServer } from "@danielzfliu/memory";
|
|
200
|
-
|
|
201
|
-
const app = createServer({
|
|
202
|
-
chromaUrl: "http://localhost:8000",
|
|
203
|
-
ollamaUrl: "http://localhost:11434",
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
app.listen(4000, () => console.log("Running on :4000"));
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
---
|
|
210
|
-
|
|
211
|
-
## Option C: REST API Server
|
|
212
|
-
|
|
213
|
-
Use this option to run Memory as a standalone HTTP service.
|
|
214
|
-
|
|
215
|
-
### 1. Setup
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
git clone https://github.com/DanielZFLiu/memory.git
|
|
219
|
-
cd memory
|
|
220
|
-
npm install
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### 2. Start the REST server
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
npm run dev:http
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Server starts on `http://localhost:3000` by default (set `PORT` env var to change).
|
|
230
|
-
|
|
231
|
-
### API Endpoints
|
|
232
|
-
|
|
233
|
-
#### Add a piece
|
|
234
|
-
```bash
|
|
235
|
-
curl -X POST http://localhost:3000/pieces \
|
|
236
|
-
-H "Content-Type: application/json" \
|
|
237
|
-
-d '{"title": "TypeScript overview", "content": "TypeScript is a typed superset of JavaScript.", "tags": ["typescript", "programming"]}'
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
With a specific collection:
|
|
241
|
-
```bash
|
|
242
|
-
curl -X POST http://localhost:3000/pieces \
|
|
243
|
-
-H "Content-Type: application/json" \
|
|
244
|
-
-d '{"content": "Agent-specific memory.", "tags": ["agent"], "collection": "agent-alice"}'
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
#### Get a piece by ID
|
|
248
|
-
```bash
|
|
249
|
-
curl http://localhost:3000/pieces/<id>
|
|
250
|
-
curl http://localhost:3000/pieces/<id>?collection=agent-alice
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
#### Update a piece
|
|
254
|
-
```bash
|
|
255
|
-
curl -X PUT http://localhost:3000/pieces/<id> \
|
|
256
|
-
-H "Content-Type: application/json" \
|
|
257
|
-
-d '{"title": "Updated title", "content": "Updated content.", "tags": ["new-tag"]}'
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
Set `title` to `null` to clear it.
|
|
261
|
-
|
|
262
|
-
#### Delete a piece
|
|
263
|
-
```bash
|
|
264
|
-
curl -X DELETE http://localhost:3000/pieces/<id>
|
|
265
|
-
curl -X DELETE http://localhost:3000/pieces/<id>?collection=agent-alice
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
#### Semantic search
|
|
269
|
-
```bash
|
|
270
|
-
curl -X POST http://localhost:3000/query \
|
|
271
|
-
-H "Content-Type: application/json" \
|
|
272
|
-
-d '{"query": "What is TypeScript?", "topK": 5}'
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
With tag filtering:
|
|
276
|
-
```bash
|
|
277
|
-
curl -X POST http://localhost:3000/query \
|
|
278
|
-
-H "Content-Type: application/json" \
|
|
279
|
-
-d '{"query": "What is TypeScript?", "tags": ["programming"], "topK": 5}'
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
With hybrid search (vector + keyword via Reciprocal Rank Fusion):
|
|
283
|
-
```bash
|
|
284
|
-
curl -X POST http://localhost:3000/query \
|
|
285
|
-
-H "Content-Type: application/json" \
|
|
286
|
-
-d '{"query": "What is TypeScript?", "topK": 5, "useHybridSearch": true}'
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
#### RAG query (retrieve + generate)
|
|
290
|
-
```bash
|
|
291
|
-
curl -X POST http://localhost:3000/rag \
|
|
292
|
-
-H "Content-Type: application/json" \
|
|
293
|
-
-d '{"query": "Explain TypeScript", "tags": ["programming"], "topK": 5}'
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
Returns:
|
|
297
|
-
```json
|
|
298
|
-
{
|
|
299
|
-
"answer": "Generated answer based on retrieved context...",
|
|
300
|
-
"sources": [
|
|
301
|
-
{
|
|
302
|
-
"piece": { "id": "...", "title": "...", "content": "...", "tags": ["..."] },
|
|
303
|
-
"score": 0.87
|
|
304
|
-
}
|
|
305
|
-
]
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
#### List collections
|
|
310
|
-
```bash
|
|
311
|
-
curl http://localhost:3000/collections
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
#### Delete a collection
|
|
315
|
-
```bash
|
|
316
|
-
curl -X DELETE http://localhost:3000/collections/agent-alice
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
> **Multi-collection:** All piece and query endpoints accept an optional `collection` parameter (in the request body for POST/PUT, as a query string for GET/DELETE) to target a specific collection. Omitting it uses the default collection.
|
|
320
|
-
|
|
321
|
-
---
|
|
322
|
-
|
|
323
|
-
## Exports
|
|
324
|
-
|
|
325
|
-
| Export | Description |
|
|
326
|
-
|--------|-------------|
|
|
327
|
-
| `PieceStore` | CRUD + semantic search over tagged text pieces |
|
|
328
|
-
| `RagPipeline` | Retrieve-then-generate pipeline using `PieceStore` + Ollama |
|
|
329
|
-
| `EmbeddingClient` | Low-level Ollama embedding wrapper |
|
|
330
|
-
| `MemoryMcpServer` | MCP server class (stdio transport) exposing memory tools |
|
|
331
|
-
| `createServer` | Express app factory with all REST endpoints pre-configured |
|
|
332
|
-
| `MemoryConfig` | Configuration interface (all fields optional with defaults) |
|
|
333
|
-
| `DEFAULT_MEMORY_CONFIG` | The default values for `MemoryConfig` |
|
|
334
|
-
| `Piece` | `{ id, content, title?, tags }` |
|
|
335
|
-
| `QueryOptions` | `{ tags?, topK?, useHybridSearch? }` |
|
|
336
|
-
| `QueryResult` | `{ piece, score }` |
|
|
337
|
-
| `RagResult` | `{ answer, sources }` |
|
|
338
|
-
|
|
339
|
-
---
|
|
340
|
-
|
|
341
|
-
## Configuration (`MemoryConfig`)
|
|
342
|
-
|
|
343
|
-
All fields are optional. Defaults are applied automatically.
|
|
344
|
-
|
|
345
|
-
| Option | Default | Description |
|
|
346
|
-
|--------|---------|-------------|
|
|
347
|
-
| `chromaUrl` | `http://localhost:8000` | ChromaDB server URL |
|
|
348
|
-
| `ollamaUrl` | `http://localhost:11434` | Ollama server URL |
|
|
349
|
-
| `embeddingModel` | `nomic-embed-text-v2-moe:latest` | Ollama model for embeddings |
|
|
350
|
-
| `generationModel` | `gemma3:latest` | Ollama model for RAG generation |
|
|
351
|
-
| `collectionName` | `pieces` | ChromaDB collection name |
|
|
352
|
-
|
|
353
|
-
> **Note:** `generationModel` is used by `createServer` and `MemoryMcpServer`. When constructing `RagPipeline` directly, you pass the model name to its constructor.
|
|
354
|
-
|
|
355
|
-
Environment variables with the names above can override these defaults at runtime.
|
|
356
|
-
|
|
357
|
-
## Testing
|
|
14
|
+
## Development
|
|
358
15
|
|
|
359
16
|
```bash
|
|
360
|
-
npm test
|
|
361
|
-
npm run test:watch
|
|
362
|
-
npm run test:coverage
|
|
17
|
+
npm test
|
|
18
|
+
npm run test:watch
|
|
19
|
+
npm run test:coverage
|
|
363
20
|
```
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,SAAS,CAAC;AAE3D,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,YAAY,CAQxD,CAAC;AAmDF,wBAAgB,aAAa,CAAC,MAAM,GAAE,YAAiB,GAAG,QAAQ,CAAC,YAAY,CAAC,CAmC/E"}
|
package/dist/config.js
CHANGED
|
@@ -8,6 +8,8 @@ exports.DEFAULT_MEMORY_CONFIG = {
|
|
|
8
8
|
embeddingModel: "nomic-embed-text-v2-moe:latest",
|
|
9
9
|
generationModel: "gemma3:latest",
|
|
10
10
|
collectionName: "pieces",
|
|
11
|
+
requestLogging: "off",
|
|
12
|
+
corsOrigins: [],
|
|
11
13
|
};
|
|
12
14
|
const ENV_CONFIG_KEYS = {
|
|
13
15
|
chromaUrl: ["MEMORY_CHROMA_URL", "CHROMA_URL"],
|
|
@@ -15,6 +17,8 @@ const ENV_CONFIG_KEYS = {
|
|
|
15
17
|
embeddingModel: ["MEMORY_EMBEDDING_MODEL", "EMBEDDING_MODEL"],
|
|
16
18
|
generationModel: ["MEMORY_GENERATION_MODEL", "GENERATION_MODEL"],
|
|
17
19
|
collectionName: ["MEMORY_COLLECTION_NAME", "COLLECTION_NAME"],
|
|
20
|
+
requestLogging: ["MEMORY_REQUEST_LOGGING", "REQUEST_LOGGING"],
|
|
21
|
+
corsOrigins: ["MEMORY_CORS_ORIGINS", "CORS_ORIGINS"],
|
|
18
22
|
};
|
|
19
23
|
function resolveEnvOverride(keys) {
|
|
20
24
|
for (const key of keys) {
|
|
@@ -25,7 +29,36 @@ function resolveEnvOverride(keys) {
|
|
|
25
29
|
}
|
|
26
30
|
return undefined;
|
|
27
31
|
}
|
|
32
|
+
function resolveRequestLoggingEnvOverride(keys) {
|
|
33
|
+
const value = resolveEnvOverride(keys);
|
|
34
|
+
if (value === undefined) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
const normalized = value.toLowerCase();
|
|
38
|
+
if (normalized === "off" || normalized === "metadata" || normalized === "body") {
|
|
39
|
+
return normalized;
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
function resolveCorsOriginsEnvOverride(keys) {
|
|
44
|
+
const value = resolveEnvOverride(keys);
|
|
45
|
+
if (value === undefined) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
const origins = value
|
|
49
|
+
.split(",")
|
|
50
|
+
.map((origin) => origin.trim())
|
|
51
|
+
.filter((origin) => origin.length > 0);
|
|
52
|
+
return origins.length > 0 ? origins : undefined;
|
|
53
|
+
}
|
|
28
54
|
function resolveConfig(config = {}) {
|
|
55
|
+
const envRequestLogging = resolveRequestLoggingEnvOverride(ENV_CONFIG_KEYS.requestLogging);
|
|
56
|
+
const requestLogging = config.requestLogging ??
|
|
57
|
+
envRequestLogging ??
|
|
58
|
+
exports.DEFAULT_MEMORY_CONFIG.requestLogging;
|
|
59
|
+
const corsOrigins = config.corsOrigins ??
|
|
60
|
+
resolveCorsOriginsEnvOverride(ENV_CONFIG_KEYS.corsOrigins) ??
|
|
61
|
+
exports.DEFAULT_MEMORY_CONFIG.corsOrigins;
|
|
29
62
|
return {
|
|
30
63
|
chromaUrl: config.chromaUrl ??
|
|
31
64
|
resolveEnvOverride(ENV_CONFIG_KEYS.chromaUrl) ??
|
|
@@ -42,6 +75,8 @@ function resolveConfig(config = {}) {
|
|
|
42
75
|
collectionName: config.collectionName ??
|
|
43
76
|
resolveEnvOverride(ENV_CONFIG_KEYS.collectionName) ??
|
|
44
77
|
exports.DEFAULT_MEMORY_CONFIG.collectionName,
|
|
78
|
+
requestLogging,
|
|
79
|
+
corsOrigins,
|
|
45
80
|
};
|
|
46
81
|
}
|
|
47
82
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/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AC,cAAc;YACrB,kBAAkB,CAAC,eAAe,CAAC,cAAc,CAAC;YAClD,6BAAqB,CAAC,cAAc;QACxC,eAAe,EACX,MAAM,CAAC,eAAe;YACtB,kBAAkB,CAAC,eAAe,CAAC,eAAe,CAAC;YACnD,6BAAqB,CAAC,eAAe;QACzC,cAAc,EACV,MAAM,CAAC,cAAc;YACrB,kBAAkB,CAAC,eAAe,CAAC,cAAc,CAAC;YAClD,6BAAqB,CAAC,cAAc;QACxC,cAAc;QACd,WAAW;KACd,CAAC;AACN,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export { RagPipeline } from "./rag";
|
|
|
3
3
|
export { EmbeddingClient } from "./embeddings";
|
|
4
4
|
export { MemoryMcpServer } from "./mcp";
|
|
5
5
|
export { createServer } from "./server";
|
|
6
|
-
export { Piece, MemoryConfig, QueryOptions, QueryResult, RagResult, } from "./types";
|
|
6
|
+
export { Piece, MemoryConfig, RequestLoggingMode, QueryOptions, QueryResult, RagResult, } from "./types";
|
|
7
7
|
export { DEFAULT_MEMORY_CONFIG } from "./config";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACH,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACH,KAAK,EACL,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,SAAS,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AAA5B,mGAAA,UAAU,OAAA;AACnB,6BAAoC;AAA3B,kGAAA,WAAW,OAAA;AACpB,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,6BAAwC;AAA/B,sGAAA,eAAe,OAAA;AACxB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AAA5B,mGAAA,UAAU,OAAA;AACnB,6BAAoC;AAA3B,kGAAA,WAAW,OAAA;AACpB,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,6BAAwC;AAA/B,sGAAA,eAAe,OAAA;AACxB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AASrB,mCAAiD;AAAxC,+GAAA,qBAAqB,OAAA"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA6OvC,wBAAgB,YAAY,CAAC,MAAM,GAAE,YAAiB,+CA8UrD"}
|