hippo-memory 1.17.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.
Files changed (65) hide show
  1. package/bin/hippo.js +2 -2
  2. package/dist/api.d.ts +28 -0
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +31 -7
  5. package/dist/api.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +105 -11
  8. package/dist/cli.js.map +1 -1
  9. package/dist/connectors/github/backfill.js +4 -4
  10. package/dist/connectors/github/cli-impl.js +6 -6
  11. package/dist/connectors/github/dlq.js +14 -14
  12. package/dist/connectors/slack/backfill.js +1 -1
  13. package/dist/connectors/slack/dlq.js +10 -10
  14. package/dist/connectors/slack/workspaces.js +4 -4
  15. package/dist/dag.js +6 -6
  16. package/dist/dashboard.js +7 -7
  17. package/dist/goals.d.ts +11 -0
  18. package/dist/goals.d.ts.map +1 -1
  19. package/dist/goals.js +61 -49
  20. package/dist/goals.js.map +1 -1
  21. package/dist/hooks.js +24 -24
  22. package/dist/physics-state.js +27 -27
  23. package/dist/predictions.js +67 -67
  24. package/dist/refine-llm.js +13 -13
  25. package/dist/search.d.ts +33 -0
  26. package/dist/search.d.ts.map +1 -1
  27. package/dist/search.js.map +1 -1
  28. package/dist/server.d.ts.map +1 -1
  29. package/dist/server.js +7 -0
  30. package/dist/server.js.map +1 -1
  31. package/dist/src/api.js +31 -7
  32. package/dist/src/api.js.map +1 -1
  33. package/dist/src/cli.js +105 -11
  34. package/dist/src/cli.js.map +1 -1
  35. package/dist/src/connectors/github/backfill.js +4 -4
  36. package/dist/src/connectors/github/cli-impl.js +6 -6
  37. package/dist/src/connectors/github/dlq.js +14 -14
  38. package/dist/src/connectors/slack/backfill.js +1 -1
  39. package/dist/src/connectors/slack/dlq.js +10 -10
  40. package/dist/src/connectors/slack/workspaces.js +4 -4
  41. package/dist/src/dag.js +6 -6
  42. package/dist/src/dashboard.js +7 -7
  43. package/dist/src/goals.js +61 -49
  44. package/dist/src/goals.js.map +1 -1
  45. package/dist/src/hooks.js +24 -24
  46. package/dist/src/physics-state.js +27 -27
  47. package/dist/src/predictions.js +67 -67
  48. package/dist/src/refine-llm.js +13 -13
  49. package/dist/src/search.js.map +1 -1
  50. package/dist/src/server.js +7 -0
  51. package/dist/src/server.js.map +1 -1
  52. package/dist/src/store.js +260 -260
  53. package/dist/src/version.js +1 -1
  54. package/dist/src/working-memory.js +19 -19
  55. package/dist/store.js +260 -260
  56. package/dist/version.d.ts +1 -1
  57. package/dist/version.js +1 -1
  58. package/dist/working-memory.js +19 -19
  59. package/dist-ui/index.html +12 -12
  60. package/extensions/openclaw-plugin/index.ts +650 -650
  61. package/extensions/openclaw-plugin/openclaw.plugin.json +1 -1
  62. package/extensions/openclaw-plugin/package.json +1 -1
  63. package/openclaw.plugin.json +1 -1
  64. package/package.json +1 -1
  65. package/dist/benchmarks/e1.3/scenarios.json +0 -2587
@@ -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.17.0';
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
  }