@agentplugged/claw 0.3.1 → 0.3.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/sidecar/routes/memory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/sidecar/routes/memory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA+HxC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CAwKjE;AAMD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CA+GnE"}
|
|
@@ -35,9 +35,76 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.handleListMemory = handleListMemory;
|
|
37
37
|
exports.handleListSessions = handleListSessions;
|
|
38
|
+
const http = __importStar(require("http"));
|
|
38
39
|
const fs = __importStar(require("fs"));
|
|
39
40
|
const url = __importStar(require("url"));
|
|
40
41
|
const utils_1 = require("../utils");
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
// Qdrant HTTP helpers (localhost:6333)
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
function qdrantRequest(method, path, body) {
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
const options = {
|
|
48
|
+
hostname: "127.0.0.1",
|
|
49
|
+
port: 6333,
|
|
50
|
+
path,
|
|
51
|
+
method,
|
|
52
|
+
headers: { "Content-Type": "application/json" },
|
|
53
|
+
timeout: 3000,
|
|
54
|
+
};
|
|
55
|
+
const req = http.request(options, (res) => {
|
|
56
|
+
let data = "";
|
|
57
|
+
res.on("data", (chunk) => { data += chunk.toString(); });
|
|
58
|
+
res.on("end", () => {
|
|
59
|
+
try {
|
|
60
|
+
resolve(JSON.parse(data));
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
resolve(null);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
req.on("error", reject);
|
|
68
|
+
req.on("timeout", () => { req.destroy(); reject(new Error("Qdrant timeout")); });
|
|
69
|
+
if (body)
|
|
70
|
+
req.write(JSON.stringify(body));
|
|
71
|
+
req.end();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async function qdrantCount(collection) {
|
|
75
|
+
try {
|
|
76
|
+
const info = await qdrantRequest("GET", `/collections/${collection}`);
|
|
77
|
+
return info?.result?.points_count ?? info?.result?.vectors_count ?? 0;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async function qdrantAvailable() {
|
|
84
|
+
try {
|
|
85
|
+
await qdrantRequest("GET", "/collections");
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async function qdrantScroll(collection, limit, offset) {
|
|
93
|
+
try {
|
|
94
|
+
const body = {
|
|
95
|
+
limit,
|
|
96
|
+
with_payload: true,
|
|
97
|
+
with_vector: false,
|
|
98
|
+
};
|
|
99
|
+
if (offset != null)
|
|
100
|
+
body.offset = offset;
|
|
101
|
+
const result = await qdrantRequest("POST", `/collections/${collection}/points/scroll`, body);
|
|
102
|
+
return result?.result ?? { points: [] };
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return { points: [] };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
41
108
|
/**
|
|
42
109
|
* Counts rows in a SQLite table without loading all data.
|
|
43
110
|
* Returns 0 if the DB or table doesn't exist.
|
|
@@ -77,11 +144,15 @@ function handleListMemory(config) {
|
|
|
77
144
|
const vectorStoreDbPath = `${workspaceDir}/vector_store.db`;
|
|
78
145
|
const legacyMemoryDbPath = `${config.dataDir}/memory.db`;
|
|
79
146
|
const openclawMemoryDb = `${config.dataDir}/.openclaw/memory/main.sqlite`;
|
|
147
|
+
// Check Qdrant first (primary), then fallback to SQLite file
|
|
148
|
+
const hasQdrant = await qdrantAvailable();
|
|
149
|
+
const qdrantMemCount = hasQdrant ? await qdrantCount("memories") : 0;
|
|
150
|
+
const sqliteMemCount = countRows(vectorStoreDbPath, "vectors");
|
|
80
151
|
const sources = [
|
|
81
152
|
{
|
|
82
153
|
source: "mem0",
|
|
83
|
-
count:
|
|
84
|
-
available: fs.existsSync(vectorStoreDbPath),
|
|
154
|
+
count: hasQdrant ? qdrantMemCount : sqliteMemCount,
|
|
155
|
+
available: hasQdrant || fs.existsSync(vectorStoreDbPath),
|
|
85
156
|
},
|
|
86
157
|
{
|
|
87
158
|
source: "legacy",
|
|
@@ -99,56 +170,112 @@ function handleListMemory(config) {
|
|
|
99
170
|
(0, utils_1.sendJson)(res, 200, { total, sources });
|
|
100
171
|
return;
|
|
101
172
|
}
|
|
102
|
-
//
|
|
103
|
-
|
|
104
|
-
if (mode === "full" && fs.existsSync(vectorStoreDbPath)) {
|
|
173
|
+
// mode=full — read actual memories for dashboard viewer (read-only)
|
|
174
|
+
if (mode === "full") {
|
|
105
175
|
const page = Math.max(1, parseInt(parsedUrl.query["page"] ?? "1", 10));
|
|
106
176
|
const pageSize = Math.min(100, Math.max(1, parseInt(parsedUrl.query["pageSize"] ?? "20", 10)));
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
createdAt: payload.createdAt ?? null,
|
|
124
|
-
};
|
|
177
|
+
// Strategy 1: Qdrant server (primary — new instances)
|
|
178
|
+
if (hasQdrant && qdrantMemCount > 0) {
|
|
179
|
+
try {
|
|
180
|
+
// Qdrant scroll API for pagination
|
|
181
|
+
// For simplicity, scroll from beginning for each page (good enough for dashboard)
|
|
182
|
+
let allPoints = [];
|
|
183
|
+
let nextOffset = null;
|
|
184
|
+
const needed = page * pageSize;
|
|
185
|
+
while (allPoints.length < needed) {
|
|
186
|
+
const batch = await qdrantScroll("memories", Math.min(100, needed - allPoints.length), nextOffset);
|
|
187
|
+
if (!batch?.points?.length)
|
|
188
|
+
break;
|
|
189
|
+
allPoints = allPoints.concat(batch.points);
|
|
190
|
+
nextOffset = batch.next_page_offset;
|
|
191
|
+
if (nextOffset == null)
|
|
192
|
+
break;
|
|
125
193
|
}
|
|
126
|
-
|
|
194
|
+
const sliced = allPoints.slice((page - 1) * pageSize, page * pageSize);
|
|
195
|
+
const memories = sliced.map((pt) => {
|
|
196
|
+
const payload = pt.payload ?? {};
|
|
127
197
|
return {
|
|
128
|
-
id: `mem0:${
|
|
129
|
-
content:
|
|
130
|
-
type: "fact",
|
|
131
|
-
source:
|
|
132
|
-
createdAt: null,
|
|
198
|
+
id: `mem0:${pt.id}`,
|
|
199
|
+
content: payload.data ?? payload.text ?? "",
|
|
200
|
+
type: payload.category ?? "fact",
|
|
201
|
+
source: `mem0/${payload.user_id ?? "default"}`,
|
|
202
|
+
createdAt: payload.created_at ?? null,
|
|
133
203
|
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
204
|
+
});
|
|
205
|
+
(0, utils_1.sendJson)(res, 200, {
|
|
206
|
+
memories,
|
|
207
|
+
total,
|
|
208
|
+
page,
|
|
209
|
+
pageSize,
|
|
210
|
+
totalPages: Math.ceil(total / pageSize) || 1,
|
|
211
|
+
sources,
|
|
212
|
+
});
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
catch (err) {
|
|
216
|
+
// Fall through to SQLite
|
|
217
|
+
console.warn(`[memory] Qdrant scroll failed: ${err.message}`);
|
|
218
|
+
}
|
|
147
219
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
220
|
+
// Strategy 2: vector_store.db SQLite (legacy — old instances)
|
|
221
|
+
if (fs.existsSync(vectorStoreDbPath)) {
|
|
222
|
+
const offset = (page - 1) * pageSize;
|
|
223
|
+
let db = null;
|
|
224
|
+
try {
|
|
225
|
+
const Database = require("better-sqlite3");
|
|
226
|
+
db = new Database(vectorStoreDbPath, { readonly: true });
|
|
227
|
+
const rows = db
|
|
228
|
+
.prepare("SELECT id, payload FROM vectors LIMIT ? OFFSET ?")
|
|
229
|
+
.all(pageSize, offset);
|
|
230
|
+
const memories = rows.map((r) => {
|
|
231
|
+
try {
|
|
232
|
+
const payload = JSON.parse(r.payload);
|
|
233
|
+
return {
|
|
234
|
+
id: `mem0:${r.id}`,
|
|
235
|
+
content: payload.data ?? "",
|
|
236
|
+
type: "fact",
|
|
237
|
+
source: `mem0/${payload.runId ?? payload.userId ?? "default"}`,
|
|
238
|
+
createdAt: payload.createdAt ?? null,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
return {
|
|
243
|
+
id: `mem0:${r.id}`,
|
|
244
|
+
content: r.payload,
|
|
245
|
+
type: "fact",
|
|
246
|
+
source: "mem0/unknown",
|
|
247
|
+
createdAt: null,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
(0, utils_1.sendJson)(res, 200, {
|
|
252
|
+
memories,
|
|
253
|
+
total,
|
|
254
|
+
page,
|
|
255
|
+
pageSize,
|
|
256
|
+
totalPages: Math.ceil(total / pageSize) || 1,
|
|
257
|
+
sources,
|
|
258
|
+
});
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
catch (err) {
|
|
262
|
+
(0, utils_1.sendError)(res, 500, `Failed to read memories: ${err.message}`);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
finally {
|
|
266
|
+
if (db)
|
|
267
|
+
db.close();
|
|
268
|
+
}
|
|
151
269
|
}
|
|
270
|
+
// No memories found in any source
|
|
271
|
+
(0, utils_1.sendJson)(res, 200, {
|
|
272
|
+
memories: [],
|
|
273
|
+
total: 0,
|
|
274
|
+
page,
|
|
275
|
+
pageSize,
|
|
276
|
+
totalPages: 1,
|
|
277
|
+
sources,
|
|
278
|
+
});
|
|
152
279
|
return;
|
|
153
280
|
}
|
|
154
281
|
// Default: just stats
|
|
@@ -172,27 +299,27 @@ function handleListSessions(config) {
|
|
|
172
299
|
let sessions = [];
|
|
173
300
|
try {
|
|
174
301
|
sessions = db
|
|
175
|
-
.prepare(`SELECT
|
|
176
|
-
session_id,
|
|
177
|
-
model,
|
|
178
|
-
COUNT(*) as message_count,
|
|
179
|
-
SUM(inputTokens + outputTokens) as total_tokens,
|
|
180
|
-
SUM(cost) as total_cost,
|
|
181
|
-
MAX(timestamp) as last_activity,
|
|
182
|
-
MIN(timestamp) as first_activity
|
|
183
|
-
FROM router_logs
|
|
184
|
-
WHERE timestamp >= datetime('now', '-24 hours')
|
|
185
|
-
GROUP BY session_id
|
|
186
|
-
ORDER BY last_activity DESC
|
|
302
|
+
.prepare(`SELECT
|
|
303
|
+
session_id,
|
|
304
|
+
model,
|
|
305
|
+
COUNT(*) as message_count,
|
|
306
|
+
SUM(inputTokens + outputTokens) as total_tokens,
|
|
307
|
+
SUM(cost) as total_cost,
|
|
308
|
+
MAX(timestamp) as last_activity,
|
|
309
|
+
MIN(timestamp) as first_activity
|
|
310
|
+
FROM router_logs
|
|
311
|
+
WHERE timestamp >= datetime('now', '-24 hours')
|
|
312
|
+
GROUP BY session_id
|
|
313
|
+
ORDER BY last_activity DESC
|
|
187
314
|
LIMIT 50`)
|
|
188
315
|
.all();
|
|
189
316
|
}
|
|
190
317
|
catch {
|
|
191
318
|
const recent = db
|
|
192
|
-
.prepare(`SELECT rowid as id, model, inputTokens, outputTokens, cost, timestamp, success
|
|
193
|
-
FROM router_logs
|
|
194
|
-
WHERE timestamp >= datetime('now', '-1 hour')
|
|
195
|
-
ORDER BY timestamp DESC
|
|
319
|
+
.prepare(`SELECT rowid as id, model, inputTokens, outputTokens, cost, timestamp, success
|
|
320
|
+
FROM router_logs
|
|
321
|
+
WHERE timestamp >= datetime('now', '-1 hour')
|
|
322
|
+
ORDER BY timestamp DESC
|
|
196
323
|
LIMIT 50`)
|
|
197
324
|
.all();
|
|
198
325
|
db.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/sidecar/routes/memory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/sidecar/routes/memory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,4CAwKC;AAMD,gDA+GC;AAjaD,2CAA6B;AAC7B,uCAAyB;AACzB,yCAA2B;AAE3B,oCAA+C;AAe/C,8EAA8E;AAC9E,uCAAuC;AACvC,8EAA8E;AAE9E,SAAS,aAAa,CAAC,MAAc,EAAE,IAAY,EAAE,IAAc;IACjE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG;YACd,QAAQ,EAAE,WAAW;YACrB,IAAI,EAAE,IAAI;YACV,IAAI;YACJ,MAAM;YACN,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,OAAO,EAAE,IAAI;SACd,CAAC;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACxC,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,GA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AAE,CAAC;YACX,EAAE,GAAG,IAAI,CAAC;YAEV,IAAA,gBAAQ,EAAC,GAAG,EAAE,GAAG,EAAE;gBACjB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC7B,SAAS,EAAE,CAAC,CAAC,UAAU;oBACvB,KAAK,EAAE,CAAC,CAAC,KAAK;oBACd,YAAY,EAAE,CAAC,CAAC,aAAa;oBAC7B,WAAW,EAAE,CAAC,CAAC,YAAY;oBAC3B,SAAS,EAAE,CAAC,CAAC,UAAU;oBACvB,YAAY,EAAE,CAAC,CAAC,aAAa;oBAC7B,aAAa,EAAE,CAAC,CAAC,cAAc;oBAC/B,MAAM,EACJ,IAAI,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;wBACzB,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;iBACvC,CAAC,CAAC;gBACH,KAAK,EAAE,QAAQ,CAAC,MAAM;aACvB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,EAAE;gBAAE,EAAE,CAAC,KAAK,EAAE,CAAC;YACnB,IAAA,iBAAS,EACP,GAAG,EACH,GAAG,EACH,6BAA8B,GAAa,CAAC,OAAO,EAAE,CACtD,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@agentplugged/claw",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "AgentPlugged Claw — Enhanced OpenClaw distribution with smart routing, memory, observability, and security",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"bin": {
|
|
8
|
-
"agentplugged-claw": "dist/cli.js"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc",
|
|
15
|
-
"dev": "tsc --watch",
|
|
16
|
-
"prepublishOnly": "npm run build",
|
|
17
|
-
"start:router": "node dist/router/index.js",
|
|
18
|
-
"start:sidecar": "node dist/sidecar/index.js",
|
|
19
|
-
"start": "node dist/cli.js start"
|
|
20
|
-
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"agentplugged",
|
|
23
|
-
"openclaw",
|
|
24
|
-
"ai-agent",
|
|
25
|
-
"llm-router",
|
|
26
|
-
"sidecar"
|
|
27
|
-
],
|
|
28
|
-
"license": "MIT",
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "https://github.com/rezopress/AgentPlugged.git",
|
|
32
|
-
"directory": "packages/claw"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"better-sqlite3": "^11.0.0"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@types/better-sqlite3": "^7.6.0",
|
|
39
|
-
"@types/node": "^22.0.0",
|
|
40
|
-
"typescript": "^5.5.0"
|
|
41
|
-
},
|
|
42
|
-
"engines": {
|
|
43
|
-
"node": ">=22.0.0"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentplugged/claw",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "AgentPlugged Claw — Enhanced OpenClaw distribution with smart routing, memory, observability, and security",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"agentplugged-claw": "dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "tsc --watch",
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"start:router": "node dist/router/index.js",
|
|
18
|
+
"start:sidecar": "node dist/sidecar/index.js",
|
|
19
|
+
"start": "node dist/cli.js start"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"agentplugged",
|
|
23
|
+
"openclaw",
|
|
24
|
+
"ai-agent",
|
|
25
|
+
"llm-router",
|
|
26
|
+
"sidecar"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/rezopress/AgentPlugged.git",
|
|
32
|
+
"directory": "packages/claw"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"better-sqlite3": "^11.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/better-sqlite3": "^7.6.0",
|
|
39
|
+
"@types/node": "^22.0.0",
|
|
40
|
+
"typescript": "^5.5.0"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=22.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|