claude-memory-layer 1.0.38 → 1.0.40
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/cli/index.js +11 -12
- package/dist/cli/index.js.map +2 -2
- package/dist/server/api/index.js +10 -11
- package/dist/server/api/index.js.map +2 -2
- package/dist/server/index.js +10 -11
- package/dist/server/index.js.map +2 -2
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -9307,7 +9307,7 @@ function computeKpiMetrics(events, usefulRecallRate) {
|
|
|
9307
9307
|
};
|
|
9308
9308
|
}
|
|
9309
9309
|
statsRouter.get("/shared", async (c) => {
|
|
9310
|
-
const memoryService =
|
|
9310
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9311
9311
|
try {
|
|
9312
9312
|
await memoryService.initialize();
|
|
9313
9313
|
const sharedStats = await memoryService.getSharedStoreStats();
|
|
@@ -9331,8 +9331,7 @@ statsRouter.get("/shared", async (c) => {
|
|
|
9331
9331
|
}
|
|
9332
9332
|
});
|
|
9333
9333
|
statsRouter.get("/endless", async (c) => {
|
|
9334
|
-
const
|
|
9335
|
-
const memoryService = getMemoryServiceForProject(projectPath);
|
|
9334
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9336
9335
|
try {
|
|
9337
9336
|
await memoryService.initialize();
|
|
9338
9337
|
const status = await memoryService.getEndlessModeStatus();
|
|
@@ -9364,7 +9363,7 @@ statsRouter.get("/levels/:level", async (c) => {
|
|
|
9364
9363
|
if (!validLevels.includes(level)) {
|
|
9365
9364
|
return c.json({ error: `Invalid level. Must be one of: ${validLevels.join(", ")}` }, 400);
|
|
9366
9365
|
}
|
|
9367
|
-
const memoryService =
|
|
9366
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9368
9367
|
try {
|
|
9369
9368
|
await memoryService.initialize();
|
|
9370
9369
|
let events = await memoryService.getEventsByLevel(level, { limit: limit * 2, offset });
|
|
@@ -9456,7 +9455,7 @@ statsRouter.get("/", async (c) => {
|
|
|
9456
9455
|
});
|
|
9457
9456
|
statsRouter.get("/most-accessed", async (c) => {
|
|
9458
9457
|
const limit = parseInt(c.req.query("limit") || "10", 10);
|
|
9459
|
-
const memoryService =
|
|
9458
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9460
9459
|
try {
|
|
9461
9460
|
await memoryService.initialize();
|
|
9462
9461
|
console.log("[most-accessed] Fetching most accessed memories, limit:", limit);
|
|
@@ -9487,7 +9486,7 @@ statsRouter.get("/most-accessed", async (c) => {
|
|
|
9487
9486
|
});
|
|
9488
9487
|
statsRouter.get("/timeline", async (c) => {
|
|
9489
9488
|
const days = parseInt(c.req.query("days") || "7", 10);
|
|
9490
|
-
const memoryService =
|
|
9489
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9491
9490
|
try {
|
|
9492
9491
|
await memoryService.initialize();
|
|
9493
9492
|
const recentEvents = await memoryService.getRecentEvents(1e4);
|
|
@@ -9519,7 +9518,7 @@ statsRouter.get("/timeline", async (c) => {
|
|
|
9519
9518
|
});
|
|
9520
9519
|
statsRouter.get("/helpfulness", async (c) => {
|
|
9521
9520
|
const limit = parseInt(c.req.query("limit") || "10", 10);
|
|
9522
|
-
const memoryService =
|
|
9521
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9523
9522
|
try {
|
|
9524
9523
|
await memoryService.initialize();
|
|
9525
9524
|
const stats = await memoryService.getHelpfulnessStats();
|
|
@@ -9576,7 +9575,7 @@ statsRouter.get("/usefulness", async (c) => {
|
|
|
9576
9575
|
});
|
|
9577
9576
|
statsRouter.get("/retrieval-traces", async (c) => {
|
|
9578
9577
|
const limit = parseInt(c.req.query("limit") || "50", 10);
|
|
9579
|
-
const memoryService =
|
|
9578
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9580
9579
|
try {
|
|
9581
9580
|
await memoryService.initialize();
|
|
9582
9581
|
const traces = await memoryService.getRecentRetrievalTraces(limit);
|
|
@@ -9630,7 +9629,7 @@ statsRouter.get("/retrieval-traces", async (c) => {
|
|
|
9630
9629
|
statsRouter.get("/retrieval-review-queue", async (c) => {
|
|
9631
9630
|
const limit = parseStatsLimit(c.req.query("limit"), 10, 50);
|
|
9632
9631
|
const scanLimit = parseStatsLimit(c.req.query("scanLimit"), 500, 5e3);
|
|
9633
|
-
const memoryService =
|
|
9632
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9634
9633
|
try {
|
|
9635
9634
|
await memoryService.initialize();
|
|
9636
9635
|
const traces = await memoryService.getRecentRetrievalTraces(scanLimit);
|
|
@@ -9664,7 +9663,7 @@ statsRouter.get("/retrieval-review-queue", async (c) => {
|
|
|
9664
9663
|
statsRouter.get("/kpi", async (c) => {
|
|
9665
9664
|
const rawWindow = c.req.query("window") || "7d";
|
|
9666
9665
|
const window = rawWindow === "24h" || rawWindow === "30d" ? rawWindow : "7d";
|
|
9667
|
-
const memoryService =
|
|
9666
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
9668
9667
|
try {
|
|
9669
9668
|
await memoryService.initialize();
|
|
9670
9669
|
const now = Date.now();
|
|
@@ -10367,7 +10366,7 @@ function streamClaudeResponse(prompt, stream) {
|
|
|
10367
10366
|
import { Hono as Hono9 } from "hono";
|
|
10368
10367
|
var healthRouter = new Hono9();
|
|
10369
10368
|
healthRouter.get("/", async (c) => {
|
|
10370
|
-
const memoryService =
|
|
10369
|
+
const memoryService = getLightweightServiceFromQuery(c);
|
|
10371
10370
|
try {
|
|
10372
10371
|
await memoryService.initialize();
|
|
10373
10372
|
const [stats, outbox] = await Promise.all([
|