hippo-memory 1.67.0 → 1.69.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 (82) hide show
  1. package/README.md +1 -1
  2. package/dist/agent-memories/copilot.d.ts +3 -1
  3. package/dist/agent-memories/copilot.js +2 -2
  4. package/dist/api/auth.d.ts +14 -18
  5. package/dist/api/auth.js +93 -60
  6. package/dist/api/context-select.d.ts +10 -0
  7. package/dist/api/context-select.js +16 -18
  8. package/dist/api/context.js +101 -60
  9. package/dist/api/forget.d.ts +2 -2
  10. package/dist/api/forget.js +11 -0
  11. package/dist/api/outcome.d.ts +4 -4
  12. package/dist/api/outcome.js +29 -6
  13. package/dist/api/promote.d.ts +3 -3
  14. package/dist/api/promote.js +45 -90
  15. package/dist/api/remember.d.ts +3 -2
  16. package/dist/api/remember.js +38 -11
  17. package/dist/api/types.d.ts +9 -0
  18. package/dist/auth.d.ts +19 -0
  19. package/dist/auth.js +14 -6
  20. package/dist/capture/compact.js +21 -2
  21. package/dist/capture/copilot-transcript.d.ts +3 -0
  22. package/dist/capture/copilot-transcript.js +8 -1
  23. package/dist/capture/session-worker.d.ts +13 -0
  24. package/dist/capture/session-worker.js +194 -0
  25. package/dist/capture-contract.d.ts +3 -1
  26. package/dist/capture-contract.js +36 -0
  27. package/dist/cli/session-hooks.js +90 -22
  28. package/dist/cli/setup.js +70 -24
  29. package/dist/cli/usage.js +4 -1
  30. package/dist/cli.js +1 -1
  31. package/dist/connectors/github/ingest.js +2 -1
  32. package/dist/connectors/slack/deletion.js +2 -1
  33. package/dist/connectors/slack/ingest.js +2 -1
  34. package/dist/embeddings.d.ts +10 -10
  35. package/dist/embeddings.js +103 -18
  36. package/dist/env.d.ts +2 -0
  37. package/dist/env.js +2 -0
  38. package/dist/hooks/copilot.d.ts +50 -8
  39. package/dist/hooks/copilot.js +116 -30
  40. package/dist/hooks/json-hooks.d.ts +2 -0
  41. package/dist/hooks/json-hooks.js +11 -2
  42. package/dist/hooks/shared.d.ts +7 -1
  43. package/dist/hooks/shared.js +18 -3
  44. package/dist/mcp/memory-tools.d.ts +2 -2
  45. package/dist/mcp/memory-tools.js +9 -8
  46. package/dist/mcp/request.js +3 -3
  47. package/dist/memory.d.ts +2 -0
  48. package/dist/memory.js +7 -0
  49. package/dist/prompt-recall.d.ts +5 -0
  50. package/dist/prompt-recall.js +13 -0
  51. package/dist/raw-archive.d.ts +2 -2
  52. package/dist/raw-archive.js +5 -3
  53. package/dist/recall-scope.d.ts +2 -5
  54. package/dist/recall-scope.js +5 -6
  55. package/dist/server/routes/admin.js +2 -2
  56. package/dist/server/routes/memories.js +9 -6
  57. package/dist/server-detect.js +3 -2
  58. package/dist/server.d.ts +20 -4
  59. package/dist/server.js +23 -11
  60. package/dist/store/audit-event.d.ts +1 -1
  61. package/dist/store/audit-event.js +1 -1
  62. package/dist/store/entry-writes-group.d.ts +9 -0
  63. package/dist/store/entry-writes-group.js +157 -0
  64. package/dist/store/handoffs.d.ts +5 -2
  65. package/dist/store/handoffs.js +35 -5
  66. package/dist/store/key-writes.d.ts +9 -0
  67. package/dist/store/key-writes.js +30 -0
  68. package/dist/store/open.d.ts +2 -0
  69. package/dist/store/open.js +10 -0
  70. package/dist/store/search-rows.js +3 -9
  71. package/dist/store/sessions.d.ts +5 -0
  72. package/dist/store/sessions.js +4 -1
  73. package/dist/store/vector-writes.d.ts +6 -0
  74. package/dist/store/vector-writes.js +59 -0
  75. package/dist/store-port.d.ts +143 -1
  76. package/dist/store-port.js +48 -12
  77. package/dist/version.d.ts +1 -1
  78. package/dist/version.js +1 -1
  79. package/extensions/openclaw-plugin/openclaw.plugin.json +1 -1
  80. package/extensions/openclaw-plugin/package.json +1 -1
  81. package/openclaw.plugin.json +1 -1
  82. package/package.json +1 -1
@@ -1,20 +1,25 @@
1
- // The async seam the server reaches its store through, so an add-on can serve from a database other than hippo.db.
2
- import { readApiKeyRecord } from './auth.js';
1
+ import { loadAmbientTallies } from './ambient-store.js';
2
+ import { listApiKeyRows, readApiKeyRecord } from './auth.js';
3
3
  import { appendAuditEvent, listAuditEventsAfter } from './audit.js';
4
- import { closeHippoDb, openHippoDb, withWriteScope } from './db.js';
4
+ import { withWriteScope } from './db.js';
5
5
  import { StoreNotPortedError } from './db/sqlite-blocked.js';
6
6
  import { embeddingIndexStateAt, loadStoredVectors } from './embeddings.js';
7
7
  import { activeGoalsWithPolicies, localGoalRecallRows, writeGoalRecallLog, } from './goals.js';
8
8
  import { loadPhysicsState } from './physics-state.js';
9
9
  import { planningFallacyEvidenceAt } from './predictions/planning-fallacy.js';
10
10
  import { writeRecallTrace } from './recall-trace.js';
11
+ import { loadAmbientCandidates, loadContextCandidates, } from './store/candidates.js';
11
12
  import { loadEntriesByIds, loadFreshRawMemories } from './store/entry-reads.js';
12
13
  import { auditHighIdAt, revokeKeyAt } from './store/key-audit.js';
14
+ import { createKeyAt, createSelfKeyAt } from './store/key-writes.js';
13
15
  import { strengthenRetrievedInOwnTx } from './store/entry-writes.js';
16
+ import { sqliteEntryWrites } from './store/entry-writes-group.js';
14
17
  import { loadLatestHandoff } from './store/handoffs.js';
15
18
  import { updateStats } from './store/index-and-stats.js';
19
+ import { onHandle } from './store/open.js';
16
20
  import { loadRecallSearchEntries, loadVectorCandidateEntries } from './store/search-rows.js';
17
21
  import { listSessionEvents, loadActiveTaskSnapshot } from './store/sessions.js';
22
+ import { entriesWithoutVectorAt, writeVectorsAt } from './store/vector-writes.js';
18
23
  import { recordTokenUse } from './token-ledger.js';
19
24
  export function hasGroup(store, group) {
20
25
  return group === 'base' || store[group] !== undefined;
@@ -27,15 +32,6 @@ export function requireGroup(store, group) {
27
32
  throw new StoreNotPortedError(store.kind, group);
28
33
  return methods;
29
34
  }
30
- function onHandle(hippoRoot, fn) {
31
- const db = openHippoDb(hippoRoot);
32
- try {
33
- return fn(db);
34
- }
35
- finally {
36
- closeHippoDb(db);
37
- }
38
- }
39
35
  /** The store a request runs on: the served one, else hippo.db under its root, as the CLI and SDK callers have it. */
40
36
  export function storeFor(ctx) {
41
37
  return ctx.store ?? sqliteStore(ctx.hippoRoot);
@@ -98,9 +94,49 @@ export function sqliteStore(hippoRoot) {
98
94
  },
99
95
  },
100
96
  keyAudit: sqliteKeyAudit(hippoRoot),
97
+ keyWrites: sqliteKeyWrites(hippoRoot),
98
+ vectorWrites: {
99
+ async entriesWithoutVector(query) {
100
+ return onHandle(hippoRoot, (db) => entriesWithoutVectorAt(db, query));
101
+ },
102
+ async writeVectors(write) {
103
+ return onHandle(hippoRoot, (db) => writeVectorsAt(db, write));
104
+ },
105
+ },
106
+ entryWrites: sqliteEntryWrites(hippoRoot),
107
+ contextReads: sqliteContextReads(hippoRoot),
101
108
  async close() { },
102
109
  };
103
110
  }
111
+ function sqliteContextReads(hippoRoot) {
112
+ return {
113
+ async unfinishedHandoff(tenantId, maxAgeMs, key) {
114
+ return loadLatestHandoff(hippoRoot, tenantId, undefined, { unfinishedOnly: true, maxAgeMs, scopeFilter: 'default-deny' }, key ?? undefined);
115
+ },
116
+ async ambientCandidates(tenantId, { recentNeeded, admit, recall, origins }) {
117
+ return loadAmbientCandidates(hippoRoot, tenantId, recentNeeded, admit, recall, origins);
118
+ },
119
+ async contextCandidates(tenantId, filter) {
120
+ return loadContextCandidates(hippoRoot, tenantId, filter);
121
+ },
122
+ async ambientTallies(tenantId, filter) {
123
+ return loadAmbientTallies(hippoRoot, tenantId, filter);
124
+ },
125
+ };
126
+ }
127
+ function sqliteKeyWrites(hippoRoot) {
128
+ return {
129
+ async createApiKey(mint) {
130
+ onHandle(hippoRoot, (db) => createKeyAt(db, mint));
131
+ },
132
+ async createSelfApiKey(mint) {
133
+ return onHandle(hippoRoot, (db) => createSelfKeyAt(db, mint));
134
+ },
135
+ async listApiKeys(query) {
136
+ return onHandle(hippoRoot, (db) => listApiKeyRows(db, query));
137
+ },
138
+ };
139
+ }
104
140
  function sqliteKeyAudit(hippoRoot) {
105
141
  return {
106
142
  async revokeApiKey(revoke) {
package/dist/version.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * an ESM `import` can resolve cleanly, and a hardcoded constant survives
17
17
  * any packager that drops .json files.
18
18
  */
19
- export declare const PACKAGE_VERSION = "1.67.0";
19
+ export declare const PACKAGE_VERSION = "1.69.0";
20
20
  /** The floor a store takes on its first expiring key: the first release with schema v53, set by hand in that release; scripts/check-expiring-keys-floor.mjs gates it. */
21
21
  export declare const EXPIRING_KEYS_MIN_BINARY = "1.64.0";
22
22
  /** The floor a store takes on its first session bind or owner snapshot: first release with v54; set by hand in that release. */
package/dist/version.js CHANGED
@@ -16,7 +16,7 @@
16
16
  * an ESM `import` can resolve cleanly, and a hardcoded constant survives
17
17
  * any packager that drops .json files.
18
18
  */
19
- export const PACKAGE_VERSION = '1.67.0';
19
+ export const PACKAGE_VERSION = '1.69.0';
20
20
  /** The floor a store takes on its first expiring key: the first release with schema v53, set by hand in that release; scripts/check-expiring-keys-floor.mjs gates it. */
21
21
  export const EXPIRING_KEYS_MIN_BINARY = '1.64.0';
22
22
  /** The floor a store takes on its first session bind or owner snapshot: first release with v54; set by hand in that release. */
@@ -2,7 +2,7 @@
2
2
  "id": "hippo-memory",
3
3
  "name": "Hippo Memory",
4
4
  "description": "Make your agent's memory work like a brain. Hippo is long-term memory for coding agents.",
5
- "version": "1.67.0",
5
+ "version": "1.69.0",
6
6
 
7
7
  "configSchema": {
8
8
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hippo-memory",
3
- "version": "1.67.0",
3
+ "version": "1.69.0",
4
4
  "type": "module",
5
5
  "description": "Make your agent's memory work like a brain. Hippo is long-term memory for coding agents.",
6
6
  "main": "index.ts",
@@ -2,7 +2,7 @@
2
2
  "id": "hippo-memory",
3
3
  "name": "Hippo Memory",
4
4
  "description": "Make your agent's memory work like a brain. Hippo is long-term memory for coding agents.",
5
- "version": "1.67.0",
5
+ "version": "1.69.0",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hippo-memory",
3
- "version": "1.67.0",
3
+ "version": "1.69.0",
4
4
  "description": "Make your agent's memory work like a brain. Hippo is long-term memory for coding agents.",
5
5
  "mcpName": "io.github.kitfunso/hippo-memory",
6
6
  "type": "module",