@memextend/claude-code 0.1.2 → 0.1.9
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/dist/hooks/pre-compact.cjs +22 -0
- package/dist/hooks/session-start.cjs +22 -0
- package/dist/hooks/stop.cjs +22 -0
- package/dist/mcp/server.cjs +23 -1
- package/dist/mcp/server.js +1 -1
- package/package.json +2 -2
|
@@ -483,6 +483,28 @@ var LanceDBStorage = class _LanceDBStorage {
|
|
|
483
483
|
}
|
|
484
484
|
async close() {
|
|
485
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* Optimize the LanceDB table to reduce storage.
|
|
488
|
+
* This compacts files, prunes old versions, and optimizes indices.
|
|
489
|
+
* Should be called periodically (e.g., after many inserts or on cleanup command).
|
|
490
|
+
*
|
|
491
|
+
* @param cleanupOlderThan - Date before which old versions should be pruned (default: now)
|
|
492
|
+
*/
|
|
493
|
+
async optimize(cleanupOlderThan) {
|
|
494
|
+
if (!this.table)
|
|
495
|
+
return null;
|
|
496
|
+
try {
|
|
497
|
+
const table = this.table;
|
|
498
|
+
const stats = await table.optimize({ cleanupOlderThan: cleanupOlderThan ?? /* @__PURE__ */ new Date() });
|
|
499
|
+
return {
|
|
500
|
+
compacted: stats?.compaction?.filesRemoved ?? 0,
|
|
501
|
+
pruned: stats?.prune?.versionsRemoved ?? 0
|
|
502
|
+
};
|
|
503
|
+
} catch (error) {
|
|
504
|
+
console.error("[memextend] LanceDB optimize failed:", error);
|
|
505
|
+
return null;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
486
508
|
};
|
|
487
509
|
|
|
488
510
|
// ../../core/dist/embedding/local.js
|
|
@@ -483,6 +483,28 @@ var LanceDBStorage = class _LanceDBStorage {
|
|
|
483
483
|
}
|
|
484
484
|
async close() {
|
|
485
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* Optimize the LanceDB table to reduce storage.
|
|
488
|
+
* This compacts files, prunes old versions, and optimizes indices.
|
|
489
|
+
* Should be called periodically (e.g., after many inserts or on cleanup command).
|
|
490
|
+
*
|
|
491
|
+
* @param cleanupOlderThan - Date before which old versions should be pruned (default: now)
|
|
492
|
+
*/
|
|
493
|
+
async optimize(cleanupOlderThan) {
|
|
494
|
+
if (!this.table)
|
|
495
|
+
return null;
|
|
496
|
+
try {
|
|
497
|
+
const table = this.table;
|
|
498
|
+
const stats = await table.optimize({ cleanupOlderThan: cleanupOlderThan ?? /* @__PURE__ */ new Date() });
|
|
499
|
+
return {
|
|
500
|
+
compacted: stats?.compaction?.filesRemoved ?? 0,
|
|
501
|
+
pruned: stats?.prune?.versionsRemoved ?? 0
|
|
502
|
+
};
|
|
503
|
+
} catch (error) {
|
|
504
|
+
console.error("[memextend] LanceDB optimize failed:", error);
|
|
505
|
+
return null;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
486
508
|
};
|
|
487
509
|
|
|
488
510
|
// ../../core/dist/embedding/local.js
|
package/dist/hooks/stop.cjs
CHANGED
|
@@ -483,6 +483,28 @@ var LanceDBStorage = class _LanceDBStorage {
|
|
|
483
483
|
}
|
|
484
484
|
async close() {
|
|
485
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* Optimize the LanceDB table to reduce storage.
|
|
488
|
+
* This compacts files, prunes old versions, and optimizes indices.
|
|
489
|
+
* Should be called periodically (e.g., after many inserts or on cleanup command).
|
|
490
|
+
*
|
|
491
|
+
* @param cleanupOlderThan - Date before which old versions should be pruned (default: now)
|
|
492
|
+
*/
|
|
493
|
+
async optimize(cleanupOlderThan) {
|
|
494
|
+
if (!this.table)
|
|
495
|
+
return null;
|
|
496
|
+
try {
|
|
497
|
+
const table = this.table;
|
|
498
|
+
const stats = await table.optimize({ cleanupOlderThan: cleanupOlderThan ?? /* @__PURE__ */ new Date() });
|
|
499
|
+
return {
|
|
500
|
+
compacted: stats?.compaction?.filesRemoved ?? 0,
|
|
501
|
+
pruned: stats?.prune?.versionsRemoved ?? 0
|
|
502
|
+
};
|
|
503
|
+
} catch (error) {
|
|
504
|
+
console.error("[memextend] LanceDB optimize failed:", error);
|
|
505
|
+
return null;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
486
508
|
};
|
|
487
509
|
|
|
488
510
|
// ../../core/dist/embedding/local.js
|
package/dist/mcp/server.cjs
CHANGED
|
@@ -14177,6 +14177,28 @@ var LanceDBStorage = class _LanceDBStorage {
|
|
|
14177
14177
|
}
|
|
14178
14178
|
async close() {
|
|
14179
14179
|
}
|
|
14180
|
+
/**
|
|
14181
|
+
* Optimize the LanceDB table to reduce storage.
|
|
14182
|
+
* This compacts files, prunes old versions, and optimizes indices.
|
|
14183
|
+
* Should be called periodically (e.g., after many inserts or on cleanup command).
|
|
14184
|
+
*
|
|
14185
|
+
* @param cleanupOlderThan - Date before which old versions should be pruned (default: now)
|
|
14186
|
+
*/
|
|
14187
|
+
async optimize(cleanupOlderThan) {
|
|
14188
|
+
if (!this.table)
|
|
14189
|
+
return null;
|
|
14190
|
+
try {
|
|
14191
|
+
const table = this.table;
|
|
14192
|
+
const stats = await table.optimize({ cleanupOlderThan: cleanupOlderThan ?? /* @__PURE__ */ new Date() });
|
|
14193
|
+
return {
|
|
14194
|
+
compacted: stats?.compaction?.filesRemoved ?? 0,
|
|
14195
|
+
pruned: stats?.prune?.versionsRemoved ?? 0
|
|
14196
|
+
};
|
|
14197
|
+
} catch (error2) {
|
|
14198
|
+
console.error("[memextend] LanceDB optimize failed:", error2);
|
|
14199
|
+
return null;
|
|
14200
|
+
}
|
|
14201
|
+
}
|
|
14180
14202
|
};
|
|
14181
14203
|
|
|
14182
14204
|
// ../../core/dist/embedding/local.js
|
|
@@ -14491,7 +14513,7 @@ async function getStorage() {
|
|
|
14491
14513
|
var server = new Server(
|
|
14492
14514
|
{
|
|
14493
14515
|
name: "memextend",
|
|
14494
|
-
version: "0.1.
|
|
14516
|
+
version: "0.1.9"
|
|
14495
14517
|
},
|
|
14496
14518
|
{
|
|
14497
14519
|
capabilities: {
|
package/dist/mcp/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memextend/claude-code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Claude Code adapter for memextend - hooks and MCP server for persistent AI memory",
|
|
5
5
|
"author": "ZodTTD LLC <repo@zodttd.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "vitest run"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@memextend/core": "^0.1.
|
|
16
|
+
"@memextend/core": "^0.1.9",
|
|
17
17
|
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|