wyrm-mcp 3.2.0 → 3.3.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/database.d.ts +0 -1
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +9 -205
- package/dist/database.js.map +1 -1
- package/dist/index.js +839 -39
- package/dist/index.js.map +1 -1
- package/dist/indexer.d.ts +84 -0
- package/dist/indexer.d.ts.map +1 -0
- package/dist/indexer.js +160 -0
- package/dist/indexer.js.map +1 -0
- package/dist/intelligence.d.ts +116 -0
- package/dist/intelligence.d.ts.map +1 -0
- package/dist/intelligence.js +278 -0
- package/dist/intelligence.js.map +1 -0
- package/dist/knowledge-graph.d.ts +113 -0
- package/dist/knowledge-graph.d.ts.map +1 -0
- package/dist/knowledge-graph.js +235 -0
- package/dist/knowledge-graph.js.map +1 -0
- package/dist/memory-artifacts.d.ts +106 -0
- package/dist/memory-artifacts.d.ts.map +1 -0
- package/dist/memory-artifacts.js +291 -0
- package/dist/memory-artifacts.js.map +1 -0
- package/dist/migrations.d.ts +31 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +525 -0
- package/dist/migrations.js.map +1 -0
- package/dist/providers/embedding-provider.d.ts +81 -0
- package/dist/providers/embedding-provider.d.ts.map +1 -0
- package/dist/providers/embedding-provider.js +149 -0
- package/dist/providers/embedding-provider.js.map +1 -0
- package/dist/security.js +1 -1
- package/dist/security.js.map +1 -1
- package/dist/vectors.d.ts +32 -48
- package/dist/vectors.d.ts.map +1 -1
- package/dist/vectors.js +119 -225
- package/dist/vectors.js.map +1 -1
- package/package.json +2 -2
package/dist/vectors.js
CHANGED
|
@@ -1,70 +1,53 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wyrm Vector Embeddings
|
|
2
|
+
* Wyrm Vector Embeddings — Semantic Search Support
|
|
3
3
|
*
|
|
4
4
|
* @copyright 2026 Ghost Protocol (Pvt) Ltd. All Rights Reserved.
|
|
5
5
|
* @license Proprietary - See LICENSE file for details.
|
|
6
6
|
*
|
|
7
7
|
* Features:
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* - Automatic embedding on memory creation
|
|
8
|
+
* - Provider-agnostic embeddings (local, OpenAI, Ollama)
|
|
9
|
+
* - SQLite-backed vector storage (no external DB needed)
|
|
10
|
+
* - Cosine similarity search with content-hash deduplication
|
|
11
|
+
* - Graceful degradation when no provider is configured
|
|
13
12
|
*/
|
|
14
|
-
import {
|
|
15
|
-
import { join } from 'path';
|
|
16
|
-
import { homedir } from 'os';
|
|
17
|
-
// Vector dimension for different models
|
|
18
|
-
const EMBEDDING_DIMENSIONS = {
|
|
19
|
-
'local': 384, // all-MiniLM-L6-v2 (default local)
|
|
20
|
-
'openai': 1536, // text-embedding-3-small
|
|
21
|
-
'openai-large': 3072, // text-embedding-3-large
|
|
22
|
-
'ollama': 768, // nomic-embed-text
|
|
23
|
-
};
|
|
13
|
+
import { createProvider, NoneProvider, } from './providers/embedding-provider.js';
|
|
24
14
|
/**
|
|
25
|
-
*
|
|
26
|
-
* For production, consider using sqlite-vss or similar
|
|
15
|
+
* SQLite-backed vector store with pluggable embedding providers.
|
|
27
16
|
*/
|
|
28
17
|
export class VectorStore {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
const wyrmDir = join(homedir(), '.wyrm');
|
|
37
|
-
if (!existsSync(wyrmDir)) {
|
|
38
|
-
mkdirSync(wyrmDir, { recursive: true });
|
|
18
|
+
provider;
|
|
19
|
+
db;
|
|
20
|
+
constructor(provider, db) {
|
|
21
|
+
this.provider = provider;
|
|
22
|
+
this.db = db || null;
|
|
23
|
+
if (this.db) {
|
|
24
|
+
this.ensureTable();
|
|
39
25
|
}
|
|
40
|
-
this.storePath = join(wyrmDir, 'vectors.json');
|
|
41
|
-
this.loadVectors();
|
|
42
26
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
writeFileSync(this.storePath, JSON.stringify(data));
|
|
27
|
+
/** Create the vectors table if it doesn't exist */
|
|
28
|
+
ensureTable() {
|
|
29
|
+
if (!this.db)
|
|
30
|
+
return;
|
|
31
|
+
this.db.exec(`
|
|
32
|
+
CREATE TABLE IF NOT EXISTS vectors (
|
|
33
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
34
|
+
project_id INTEGER,
|
|
35
|
+
content_type TEXT NOT NULL,
|
|
36
|
+
content_id INTEGER NOT NULL,
|
|
37
|
+
content_hash TEXT NOT NULL,
|
|
38
|
+
embedding BLOB NOT NULL,
|
|
39
|
+
model TEXT NOT NULL,
|
|
40
|
+
dimensions INTEGER NOT NULL,
|
|
41
|
+
created_at TEXT DEFAULT (datetime('now')),
|
|
42
|
+
UNIQUE(content_type, content_id, model)
|
|
43
|
+
);
|
|
44
|
+
CREATE INDEX IF NOT EXISTS idx_vectors_project ON vectors(project_id);
|
|
45
|
+
CREATE INDEX IF NOT EXISTS idx_vectors_content ON vectors(content_type, content_id);
|
|
46
|
+
CREATE INDEX IF NOT EXISTS idx_vectors_hash ON vectors(content_hash);
|
|
47
|
+
`);
|
|
65
48
|
}
|
|
66
49
|
/**
|
|
67
|
-
* Hash content for deduplication
|
|
50
|
+
* Hash content for deduplication — same hash means same content, skip re-embedding.
|
|
68
51
|
*/
|
|
69
52
|
hashContent(content) {
|
|
70
53
|
let hash = 0;
|
|
@@ -76,136 +59,43 @@ export class VectorStore {
|
|
|
76
59
|
return Math.abs(hash).toString(16);
|
|
77
60
|
}
|
|
78
61
|
/**
|
|
79
|
-
* Add or update a vector entry
|
|
62
|
+
* Add or update a vector entry.
|
|
63
|
+
* Returns the content hash, or null if the provider is disabled.
|
|
80
64
|
*/
|
|
81
65
|
async addVector(content, contentType, contentId, projectId) {
|
|
82
|
-
if (this.
|
|
66
|
+
if (this.provider instanceof NoneProvider)
|
|
83
67
|
return null;
|
|
84
|
-
}
|
|
85
68
|
const contentHash = this.hashContent(content);
|
|
86
|
-
// Skip if
|
|
87
|
-
if (this.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (!embedding) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
const entry = {
|
|
95
|
-
id: this.vectors.size + 1,
|
|
96
|
-
content_hash: contentHash,
|
|
97
|
-
content_type: contentType,
|
|
98
|
-
content_id: contentId,
|
|
99
|
-
project_id: projectId,
|
|
100
|
-
embedding,
|
|
101
|
-
created_at: new Date().toISOString(),
|
|
102
|
-
};
|
|
103
|
-
this.vectors.set(contentHash, entry);
|
|
104
|
-
this.saveVectors();
|
|
105
|
-
return contentHash;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Generate embedding for text
|
|
109
|
-
*/
|
|
110
|
-
async generateEmbedding(text) {
|
|
111
|
-
switch (this.config.provider) {
|
|
112
|
-
case 'local':
|
|
113
|
-
return this.generateLocalEmbedding(text);
|
|
114
|
-
case 'openai':
|
|
115
|
-
return this.generateOpenAIEmbedding(text);
|
|
116
|
-
case 'ollama':
|
|
117
|
-
return this.generateOllamaEmbedding(text);
|
|
118
|
-
default:
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Local embedding using simple TF-IDF-like approach
|
|
124
|
-
* For production, use @xenova/transformers
|
|
125
|
-
*/
|
|
126
|
-
async generateLocalEmbedding(text) {
|
|
127
|
-
// Simple hash-based embedding (placeholder for real transformers)
|
|
128
|
-
// In production, use: import { pipeline } from '@xenova/transformers';
|
|
129
|
-
const embedding = new Float32Array(this.dimension);
|
|
130
|
-
const words = text.toLowerCase().split(/\s+/);
|
|
131
|
-
for (let i = 0; i < words.length; i++) {
|
|
132
|
-
const word = words[i];
|
|
133
|
-
for (let j = 0; j < word.length; j++) {
|
|
134
|
-
const idx = (word.charCodeAt(j) * (i + 1) * (j + 1)) % this.dimension;
|
|
135
|
-
embedding[idx] += 1 / words.length;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
// Normalize
|
|
139
|
-
const magnitude = Math.sqrt(embedding.reduce((sum, val) => sum + val * val, 0));
|
|
140
|
-
if (magnitude > 0) {
|
|
141
|
-
for (let i = 0; i < embedding.length; i++) {
|
|
142
|
-
embedding[i] /= magnitude;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return embedding;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* OpenAI embedding API
|
|
149
|
-
*/
|
|
150
|
-
async generateOpenAIEmbedding(text) {
|
|
151
|
-
if (!this.config.apiKey) {
|
|
152
|
-
console.error('OpenAI API key not configured');
|
|
153
|
-
return null;
|
|
69
|
+
// Skip if content unchanged (same hash + same model already stored)
|
|
70
|
+
if (this.db) {
|
|
71
|
+
const existing = this.db.prepare('SELECT id FROM vectors WHERE content_type = ? AND content_id = ? AND model = ? AND content_hash = ?').get(contentType, contentId, this.provider.model, contentHash);
|
|
72
|
+
if (existing)
|
|
73
|
+
return contentHash;
|
|
154
74
|
}
|
|
75
|
+
let embedding;
|
|
155
76
|
try {
|
|
156
|
-
|
|
157
|
-
method: 'POST',
|
|
158
|
-
headers: {
|
|
159
|
-
'Authorization': `Bearer ${this.config.apiKey}`,
|
|
160
|
-
'Content-Type': 'application/json',
|
|
161
|
-
},
|
|
162
|
-
body: JSON.stringify({
|
|
163
|
-
input: text,
|
|
164
|
-
model: this.config.model || 'text-embedding-3-small',
|
|
165
|
-
}),
|
|
166
|
-
});
|
|
167
|
-
if (!response.ok) {
|
|
168
|
-
console.error('OpenAI API error:', response.status);
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
const data = await response.json();
|
|
172
|
-
return new Float32Array(data.data[0].embedding);
|
|
77
|
+
embedding = await this.provider.embed(content);
|
|
173
78
|
}
|
|
174
|
-
catch
|
|
175
|
-
console.error('OpenAI embedding error:', e);
|
|
79
|
+
catch {
|
|
176
80
|
return null;
|
|
177
81
|
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Ollama embedding (local LLM)
|
|
181
|
-
*/
|
|
182
|
-
async generateOllamaEmbedding(text) {
|
|
183
|
-
const ollamaUrl = this.config.ollamaUrl || 'http://localhost:11434';
|
|
184
|
-
try {
|
|
185
|
-
const response = await fetch(`${ollamaUrl}/api/embeddings`, {
|
|
186
|
-
method: 'POST',
|
|
187
|
-
headers: {
|
|
188
|
-
'Content-Type': 'application/json',
|
|
189
|
-
},
|
|
190
|
-
body: JSON.stringify({
|
|
191
|
-
model: this.config.model || 'nomic-embed-text',
|
|
192
|
-
prompt: text,
|
|
193
|
-
}),
|
|
194
|
-
});
|
|
195
|
-
if (!response.ok) {
|
|
196
|
-
console.error('Ollama API error:', response.status);
|
|
197
|
-
return null;
|
|
198
|
-
}
|
|
199
|
-
const data = await response.json();
|
|
200
|
-
return new Float32Array(data.embedding);
|
|
201
|
-
}
|
|
202
|
-
catch (e) {
|
|
203
|
-
console.error('Ollama embedding error:', e);
|
|
82
|
+
if (embedding.length === 0)
|
|
204
83
|
return null;
|
|
84
|
+
if (this.db) {
|
|
85
|
+
// Upsert: replace if same content_type + content_id + model
|
|
86
|
+
this.db.prepare(`
|
|
87
|
+
INSERT INTO vectors (project_id, content_type, content_id, content_hash, embedding, model, dimensions)
|
|
88
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
89
|
+
ON CONFLICT(content_type, content_id, model) DO UPDATE SET
|
|
90
|
+
content_hash = excluded.content_hash,
|
|
91
|
+
embedding = excluded.embedding,
|
|
92
|
+
created_at = datetime('now')
|
|
93
|
+
`).run(projectId, contentType, contentId, contentHash, Buffer.from(embedding.buffer), this.provider.model, this.provider.dimensions);
|
|
205
94
|
}
|
|
95
|
+
return contentHash;
|
|
206
96
|
}
|
|
207
97
|
/**
|
|
208
|
-
* Cosine similarity between two vectors
|
|
98
|
+
* Cosine similarity between two vectors.
|
|
209
99
|
*/
|
|
210
100
|
cosineSimilarity(a, b) {
|
|
211
101
|
if (a.length !== b.length)
|
|
@@ -222,90 +112,94 @@ export class VectorStore {
|
|
|
222
112
|
return magnitude > 0 ? dotProduct / magnitude : 0;
|
|
223
113
|
}
|
|
224
114
|
/**
|
|
225
|
-
* Search for similar content
|
|
115
|
+
* Search for similar content by embedding the query and comparing.
|
|
226
116
|
*/
|
|
227
117
|
async search(query, limit = 10, projectId, contentTypes) {
|
|
228
|
-
|
|
229
|
-
if (!queryEmbedding) {
|
|
118
|
+
if (this.provider instanceof NoneProvider || !this.db)
|
|
230
119
|
return [];
|
|
120
|
+
let queryEmbedding;
|
|
121
|
+
try {
|
|
122
|
+
queryEmbedding = await this.provider.embed(query);
|
|
231
123
|
}
|
|
124
|
+
catch {
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
if (queryEmbedding.length === 0)
|
|
128
|
+
return [];
|
|
129
|
+
// Load all matching vectors from SQLite
|
|
130
|
+
let sql = 'SELECT * FROM vectors WHERE model = ?';
|
|
131
|
+
const params = [this.provider.model];
|
|
132
|
+
if (projectId !== undefined) {
|
|
133
|
+
sql += ' AND project_id = ?';
|
|
134
|
+
params.push(projectId);
|
|
135
|
+
}
|
|
136
|
+
if (contentTypes && contentTypes.length > 0) {
|
|
137
|
+
sql += ` AND content_type IN (${contentTypes.map(() => '?').join(',')})`;
|
|
138
|
+
params.push(...contentTypes);
|
|
139
|
+
}
|
|
140
|
+
const rows = this.db.prepare(sql).all(...params);
|
|
232
141
|
const results = [];
|
|
233
|
-
for (const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
continue;
|
|
237
|
-
}
|
|
238
|
-
// Filter by content type if specified
|
|
239
|
-
if (contentTypes && !contentTypes.includes(entry.content_type)) {
|
|
240
|
-
continue;
|
|
241
|
-
}
|
|
242
|
-
const similarity = this.cosineSimilarity(queryEmbedding, entry.embedding);
|
|
142
|
+
for (const row of rows) {
|
|
143
|
+
const storedEmbedding = new Float32Array(row.embedding.buffer, row.embedding.byteOffset, row.dimensions);
|
|
144
|
+
const similarity = this.cosineSimilarity(queryEmbedding, storedEmbedding);
|
|
243
145
|
results.push({
|
|
244
|
-
content_type:
|
|
245
|
-
content_id:
|
|
246
|
-
project_id:
|
|
146
|
+
content_type: row.content_type,
|
|
147
|
+
content_id: row.content_id,
|
|
148
|
+
project_id: row.project_id,
|
|
247
149
|
similarity,
|
|
248
|
-
content_hash:
|
|
150
|
+
content_hash: row.content_hash,
|
|
249
151
|
});
|
|
250
152
|
}
|
|
251
|
-
// Sort by similarity descending
|
|
252
153
|
results.sort((a, b) => b.similarity - a.similarity);
|
|
253
154
|
return results.slice(0, limit);
|
|
254
155
|
}
|
|
255
156
|
/**
|
|
256
|
-
* Remove vector by content hash
|
|
157
|
+
* Remove vector by content hash.
|
|
257
158
|
*/
|
|
258
159
|
removeVector(contentHash) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return deleted;
|
|
160
|
+
if (!this.db)
|
|
161
|
+
return false;
|
|
162
|
+
const result = this.db.prepare('DELETE FROM vectors WHERE content_hash = ?').run(contentHash);
|
|
163
|
+
return result.changes > 0;
|
|
264
164
|
}
|
|
265
165
|
/**
|
|
266
|
-
* Clear all vectors for a project
|
|
166
|
+
* Clear all vectors for a project.
|
|
267
167
|
*/
|
|
268
168
|
clearProjectVectors(projectId) {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
count++;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
if (count > 0) {
|
|
277
|
-
this.saveVectors();
|
|
278
|
-
}
|
|
279
|
-
return count;
|
|
169
|
+
if (!this.db)
|
|
170
|
+
return 0;
|
|
171
|
+
const result = this.db.prepare('DELETE FROM vectors WHERE project_id = ?').run(projectId);
|
|
172
|
+
return result.changes;
|
|
280
173
|
}
|
|
281
174
|
/**
|
|
282
|
-
* Get stats about the vector store
|
|
175
|
+
* Get stats about the vector store.
|
|
283
176
|
*/
|
|
284
177
|
getStats() {
|
|
285
178
|
const byType = {};
|
|
286
179
|
const byProject = {};
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
180
|
+
let total = 0;
|
|
181
|
+
if (this.db) {
|
|
182
|
+
const typeRows = this.db.prepare('SELECT content_type, COUNT(*) as cnt FROM vectors GROUP BY content_type').all();
|
|
183
|
+
for (const r of typeRows) {
|
|
184
|
+
byType[r.content_type] = r.cnt;
|
|
185
|
+
total += r.cnt;
|
|
186
|
+
}
|
|
187
|
+
const projRows = this.db.prepare('SELECT project_id, COUNT(*) as cnt FROM vectors GROUP BY project_id').all();
|
|
188
|
+
for (const r of projRows) {
|
|
189
|
+
byProject[r.project_id] = r.cnt;
|
|
190
|
+
}
|
|
290
191
|
}
|
|
291
|
-
return {
|
|
292
|
-
total: this.vectors.size,
|
|
293
|
-
byType,
|
|
294
|
-
byProject,
|
|
295
|
-
};
|
|
192
|
+
return { total, byType, byProject, provider: this.provider.name, model: this.provider.model };
|
|
296
193
|
}
|
|
194
|
+
/** Get the active embedding provider */
|
|
195
|
+
getProvider() { return this.provider; }
|
|
297
196
|
}
|
|
298
197
|
/**
|
|
299
|
-
* Create a vector store instance with config
|
|
198
|
+
* Create a vector store instance with config.
|
|
199
|
+
* Accepts an optional SQLite database for persistent storage.
|
|
300
200
|
*/
|
|
301
|
-
export function createVectorStore(config) {
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
model: config?.model,
|
|
305
|
-
apiKey: config?.apiKey || process.env.OPENAI_API_KEY,
|
|
306
|
-
ollamaUrl: config?.ollamaUrl || process.env.OLLAMA_URL,
|
|
307
|
-
dimension: config?.dimension,
|
|
308
|
-
};
|
|
309
|
-
return new VectorStore(fullConfig);
|
|
201
|
+
export function createVectorStore(config, db) {
|
|
202
|
+
const provider = createProvider(config);
|
|
203
|
+
return new VectorStore(provider, db);
|
|
310
204
|
}
|
|
311
205
|
//# sourceMappingURL=vectors.js.map
|
package/dist/vectors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectors.js","sourceRoot":"","sources":["../src/vectors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vectors.js","sourceRoot":"","sources":["../src/vectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAGL,cAAc,EACd,YAAY,GACb,MAAM,mCAAmC,CAAC;AAyB3C;;GAEG;AACH,MAAM,OAAO,WAAW;IACd,QAAQ,CAAoB;IAC5B,EAAE,CAA2B;IAErC,YAAY,QAA2B,EAAE,EAAsB;QAC7D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC;QAErB,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;YACZ,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IAED,mDAAmD;IAC3C,WAAW;QACjB,IAAI,CAAC,IAAI,CAAC,EAAE;YAAE,OAAO;QACrB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;KAgBZ,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,WAAW,CAAC,OAAe;QACjC,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACnC,IAAI,GAA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CAAC,CAAC,GAAG,CAAC;YACjB,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAC9B,qEAAqE,CACtE,CAAC,GAAG,EAAgD,CAAC;YACtD,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;gBACzB,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;YAClC,CAAC;QACH,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAChG,CAAC;IAED,wCAAwC;IACxC,WAAW,KAAwB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC3D;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAgC,EAAE,EAAsB;IACxF,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wyrm-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "🐉 Wyrm - Persistent AI Memory System with encryption, full-text search, and infinite storage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"full-text-search"
|
|
44
44
|
],
|
|
45
45
|
"author": "Ghost Protocol (Pvt) Ltd <legal@ghosts.lk>",
|
|
46
|
-
"license": "
|
|
46
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
47
47
|
"homepage": "https://github.com/ghosts-lk/Wyrm",
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|