hippo-memory 1.16.0 → 1.18.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/bin/hippo.js +2 -2
- package/dist/api.d.ts +28 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +31 -7
- package/dist/api.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +107 -12
- package/dist/cli.js.map +1 -1
- package/dist/connectors/github/backfill.js +4 -4
- package/dist/connectors/github/cli-impl.js +6 -6
- package/dist/connectors/github/dlq.js +14 -14
- package/dist/connectors/slack/backfill.js +1 -1
- package/dist/connectors/slack/dlq.js +10 -10
- package/dist/connectors/slack/workspaces.js +4 -4
- package/dist/dag.js +6 -6
- package/dist/dashboard.js +7 -7
- package/dist/goals.d.ts +11 -0
- package/dist/goals.d.ts.map +1 -1
- package/dist/goals.js +61 -49
- package/dist/goals.js.map +1 -1
- package/dist/graph-extract.d.ts +28 -12
- package/dist/graph-extract.d.ts.map +1 -1
- package/dist/graph-extract.js +138 -20
- package/dist/graph-extract.js.map +1 -1
- package/dist/hooks.js +24 -24
- package/dist/physics-state.js +27 -27
- package/dist/predictions.js +67 -67
- package/dist/refine-llm.js +13 -13
- package/dist/search.d.ts +33 -0
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +7 -0
- package/dist/server.js.map +1 -1
- package/dist/src/api.js +31 -7
- package/dist/src/api.js.map +1 -1
- package/dist/src/cli.js +107 -12
- package/dist/src/cli.js.map +1 -1
- package/dist/src/connectors/github/backfill.js +4 -4
- package/dist/src/connectors/github/cli-impl.js +6 -6
- package/dist/src/connectors/github/dlq.js +14 -14
- package/dist/src/connectors/slack/backfill.js +1 -1
- package/dist/src/connectors/slack/dlq.js +10 -10
- package/dist/src/connectors/slack/workspaces.js +4 -4
- package/dist/src/dag.js +6 -6
- package/dist/src/dashboard.js +7 -7
- package/dist/src/goals.js +61 -49
- package/dist/src/goals.js.map +1 -1
- package/dist/src/graph-extract.js +138 -20
- package/dist/src/graph-extract.js.map +1 -1
- package/dist/src/hooks.js +24 -24
- package/dist/src/physics-state.js +27 -27
- package/dist/src/predictions.js +67 -67
- package/dist/src/refine-llm.js +13 -13
- package/dist/src/search.js.map +1 -1
- package/dist/src/server.js +7 -0
- package/dist/src/server.js.map +1 -1
- package/dist/src/store.js +260 -260
- package/dist/src/version.js +1 -1
- package/dist/src/working-memory.js +19 -19
- package/dist/store.js +260 -260
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/working-memory.js +19 -19
- package/dist-ui/index.html +12 -12
- package/extensions/openclaw-plugin/index.ts +650 -650
- package/extensions/openclaw-plugin/openclaw.plugin.json +1 -1
- package/extensions/openclaw-plugin/package.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/dist/benchmarks/e1.3/scenarios.json +0 -2587
package/dist/src/version.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* an ESM `import` can resolve cleanly, and a hardcoded constant survives
|
|
19
19
|
* any packager that drops .json files.
|
|
20
20
|
*/
|
|
21
|
-
export const PACKAGE_VERSION = '1.
|
|
21
|
+
export const PACKAGE_VERSION = '1.18.0';
|
|
22
22
|
// Bump on every release alongside the 4 other manifests + lockfile.
|
|
23
23
|
/**
|
|
24
24
|
* Compare two semver strings. Returns positive if a > b, 0 if equal, negative
|
|
@@ -42,26 +42,26 @@ export function wmPush(hippoRoot, opts) {
|
|
|
42
42
|
const importance = opts.importance ?? 0;
|
|
43
43
|
db.exec('BEGIN');
|
|
44
44
|
try {
|
|
45
|
-
const result = db.prepare(`
|
|
46
|
-
INSERT INTO working_memory(scope, session_id, task_id, importance, content, metadata_json, created_at, updated_at)
|
|
47
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
45
|
+
const result = db.prepare(`
|
|
46
|
+
INSERT INTO working_memory(scope, session_id, task_id, importance, content, metadata_json, created_at, updated_at)
|
|
47
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
48
48
|
`).run(opts.scope, opts.sessionId ?? null, opts.taskId ?? null, importance, opts.content, JSON.stringify(opts.metadata ?? {}), now, now);
|
|
49
49
|
const id = Number(result.lastInsertRowid ?? 0);
|
|
50
50
|
// Evict if over capacity for this scope
|
|
51
|
-
const countRow = db.prepare(`
|
|
52
|
-
SELECT COUNT(*) AS cnt FROM working_memory WHERE scope = ?
|
|
51
|
+
const countRow = db.prepare(`
|
|
52
|
+
SELECT COUNT(*) AS cnt FROM working_memory WHERE scope = ?
|
|
53
53
|
`).get(opts.scope);
|
|
54
54
|
const count = Number(countRow?.cnt ?? 0);
|
|
55
55
|
if (count > WM_MAX_ENTRIES) {
|
|
56
56
|
const excess = count - WM_MAX_ENTRIES;
|
|
57
|
-
db.prepare(`
|
|
58
|
-
DELETE FROM working_memory
|
|
59
|
-
WHERE id IN (
|
|
60
|
-
SELECT id FROM working_memory
|
|
61
|
-
WHERE scope = ?
|
|
62
|
-
ORDER BY importance ASC, created_at ASC
|
|
63
|
-
LIMIT ?
|
|
64
|
-
)
|
|
57
|
+
db.prepare(`
|
|
58
|
+
DELETE FROM working_memory
|
|
59
|
+
WHERE id IN (
|
|
60
|
+
SELECT id FROM working_memory
|
|
61
|
+
WHERE scope = ?
|
|
62
|
+
ORDER BY importance ASC, created_at ASC
|
|
63
|
+
LIMIT ?
|
|
64
|
+
)
|
|
65
65
|
`).run(opts.scope, excess);
|
|
66
66
|
}
|
|
67
67
|
db.exec('COMMIT');
|
|
@@ -99,12 +99,12 @@ export function wmRead(hippoRoot, opts) {
|
|
|
99
99
|
const limit = Math.max(1, Math.trunc(opts?.limit ?? WM_MAX_ENTRIES));
|
|
100
100
|
params.push(limit);
|
|
101
101
|
const where = clauses.length > 0 ? `WHERE ${clauses.join(' AND ')}` : '';
|
|
102
|
-
const rows = db.prepare(`
|
|
103
|
-
SELECT id, scope, session_id, task_id, importance, content, metadata_json, created_at, updated_at
|
|
104
|
-
FROM working_memory
|
|
105
|
-
${where}
|
|
106
|
-
ORDER BY importance DESC, created_at DESC
|
|
107
|
-
LIMIT ?
|
|
102
|
+
const rows = db.prepare(`
|
|
103
|
+
SELECT id, scope, session_id, task_id, importance, content, metadata_json, created_at, updated_at
|
|
104
|
+
FROM working_memory
|
|
105
|
+
${where}
|
|
106
|
+
ORDER BY importance DESC, created_at DESC
|
|
107
|
+
LIMIT ?
|
|
108
108
|
`).all(...params);
|
|
109
109
|
return rows.map(rowToItem);
|
|
110
110
|
}
|