hippo-memory 3.6.0 → 3.7.1
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/README.md +263 -191
- package/dist/api/context/context-pools.js +2 -2
- package/dist/base/config/config-keys.js +2 -1
- package/dist/base/config/config.d.ts +3 -1
- package/dist/base/config/config.js +1 -0
- package/dist/base/memory/entry.d.ts +10 -2
- package/dist/base/memory/entry.js +12 -4
- package/dist/base/scope/read-admission.js +2 -2
- package/dist/base/util/version.d.ts +1 -1
- package/dist/base/util/version.js +1 -1
- package/dist/domain/consolidate/conflicts.js +3 -1
- package/dist/domain/context/select-policy.d.ts +1 -1
- package/dist/domain/context/select-policy.js +3 -3
- package/dist/domain/sharing/share.js +3 -1
- package/dist/store/sqlite/capture/captures.js +19 -6
- package/dist/store/sqlite/recall/candidates.js +3 -2
- package/dist/surface/capture/capture-error.d.ts +4 -1
- package/dist/surface/capture/capture-error.js +2 -1
- package/dist/surface/capture/command.d.ts +8 -3
- package/dist/surface/capture/command.js +61 -11
- package/dist/surface/capture/extract.d.ts +2 -0
- package/dist/surface/capture/extract.js +7 -0
- package/dist/surface/capture/failure-caller.js +1 -0
- package/dist/surface/capture/user-messages.d.ts +9 -0
- package/dist/surface/capture/user-messages.js +42 -0
- package/dist/surface/cli/hooks/capture-error.js +7 -1
- package/dist/surface/cli/hooks/codex-session-end-worker.js +1 -0
- package/dist/surface/cli/hooks/session-end-worker.js +14 -2
- package/dist/surface/cli/usage.d.ts +1 -1
- package/dist/surface/cli/usage.js +1 -1
- package/extensions/openclaw-plugin/README.md +5 -13
- package/extensions/openclaw-plugin/openclaw.plugin.json +2 -2
- package/extensions/openclaw-plugin/package.json +2 -2
- package/openclaw.plugin.json +2 -2
- package/package.json +4 -5
|
@@ -4,6 +4,8 @@ import { parseJson } from '../../../base/util/json.js';
|
|
|
4
4
|
import { isInitialized } from '../../../host/project-identity.js';
|
|
5
5
|
import { flushDeliveryRecorder, startToolFailureRecorder } from '../../../api/ledger-db.js';
|
|
6
6
|
import { captureToolFailure } from '../../capture/capture-error.js';
|
|
7
|
+
import { detachedEmbedder } from '../../../api/embeddings.js';
|
|
8
|
+
import { withDetached } from '../../../api/detached.js';
|
|
7
9
|
import { readHookStdin } from '../stdin.js';
|
|
8
10
|
import { cliApiContext, cliHookRequest } from '../api-context.js';
|
|
9
11
|
import { hookRuntime, hookStoreRoot, hostSessionId, payloadCwdRoot } from '../hook-runtime.js';
|
|
@@ -24,8 +26,12 @@ export async function handleCaptureError({ hippoRoot, tenantId, flags, }) {
|
|
|
24
26
|
runtime: hookRuntime(flags),
|
|
25
27
|
envSessionId: hostSessionId(),
|
|
26
28
|
});
|
|
29
|
+
const folder = { store: ctx.store, config: ctx.config, embedderFor: ctx.infra.embedderFor };
|
|
27
30
|
try {
|
|
28
|
-
return await
|
|
31
|
+
return await withDetached(ctx, (detached) => {
|
|
32
|
+
const embed = detachedEmbedder(folder, ctx.infra, detached);
|
|
33
|
+
return captureToolFailure({ ...ctx, embed }, failure, (id) => rec?.logged(id));
|
|
34
|
+
});
|
|
29
35
|
}
|
|
30
36
|
finally {
|
|
31
37
|
await flushDeliveryRecorder(rec);
|
|
@@ -83,6 +83,7 @@ async function captureCodexRollout({ hippoRoot, tenantId, store, logFile }, tran
|
|
|
83
83
|
tenantId,
|
|
84
84
|
originProject: store === hippoRoot ? undefined : resolveProjectIdentity(process.cwd()),
|
|
85
85
|
sessionTurns: scan?.turns,
|
|
86
|
+
saveMessages: store === hippoRoot,
|
|
86
87
|
};
|
|
87
88
|
try {
|
|
88
89
|
await runCapture(captureTarget(store, 'full'), captureOpts);
|
|
@@ -43,7 +43,17 @@ function runSessionEndWork({ hippoRoot, tenantId, flags, mode, held, }) {
|
|
|
43
43
|
const root = into === ctx ? hippoRoot : ctx.reach?.global?.root;
|
|
44
44
|
if (root === undefined)
|
|
45
45
|
return false;
|
|
46
|
-
const
|
|
46
|
+
const saveMessages = into === ctx;
|
|
47
|
+
const ended = {
|
|
48
|
+
tenantId,
|
|
49
|
+
flags,
|
|
50
|
+
transcriptPath,
|
|
51
|
+
turns,
|
|
52
|
+
originProject,
|
|
53
|
+
fromStart,
|
|
54
|
+
mode,
|
|
55
|
+
saveMessages,
|
|
56
|
+
};
|
|
47
57
|
return captureEndedSession(root, ended);
|
|
48
58
|
},
|
|
49
59
|
digest: (scan, key, log) => recordSessionDigest(hippoRoot, ctx.store, scan, { key, tenantId, log, config: ctx.config }),
|
|
@@ -64,7 +74,7 @@ async function sleepFolderStore(hippoRoot, tenantId, flags, closeLogFile) {
|
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
76
|
/** True when capture ran to the end, so a turn close may move its cursor past these turns. */
|
|
67
|
-
async function captureEndedSession(store, { tenantId, flags, transcriptPath, turns, originProject, fromStart, mode }) {
|
|
77
|
+
async function captureEndedSession(store, { tenantId, flags, transcriptPath, turns, originProject, fromStart, mode, saveMessages, }) {
|
|
68
78
|
const logFile = stringFlag(flags, 'log-file') ?? null;
|
|
69
79
|
try {
|
|
70
80
|
await runCapture(captureTarget(store, mode), {
|
|
@@ -76,6 +86,8 @@ async function captureEndedSession(store, { tenantId, flags, transcriptPath, tur
|
|
|
76
86
|
tenantId,
|
|
77
87
|
originProject,
|
|
78
88
|
sessionTurns: turns,
|
|
89
|
+
sessionId: stringFlag(flags, 'session-id'),
|
|
90
|
+
saveMessages,
|
|
79
91
|
fromStart,
|
|
80
92
|
});
|
|
81
93
|
return true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function printAuditPruneUsage(): void;
|
|
2
2
|
export declare function printSlackBackfillUsage(): void;
|
|
3
3
|
export declare function printSlackWorkspacesUsage(): void;
|
|
4
|
-
export declare const USAGE_HEADER = "\nHippo -
|
|
4
|
+
export declare const USAGE_HEADER = "\nHippo - One memory for every agent you'll ever use.\n\nUsage: hippo <command> [options]\n\nCommands:";
|
|
5
5
|
export declare const USAGE_EXAMPLES = "\n\nExamples:\n hippo init\n hippo remember \"FRED cache can silently drop series\" --tag error\n hippo recall \"data pipeline issues\" --budget 2000\n hippo context --auto --budget 1500\n hippo conflicts\n hippo reject mem_abc123 --reason \"leaked credential\"\n hippo reject --value \"never store my key again\" --reason \"secret\"\n hippo rejections\n hippo unreject a1b2c3d4e5f6\n hippo dormant \"staging hostname\"\n hippo dormant restore mem_abc123\n hippo tokens --days 7\n hippo session log --id sess_123 --task \"Ship feature\" --type progress --content \"Build is green, next step is docs\"\n hippo session latest --json\n hippo session resume\n hippo snapshot save --task \"Ship feature\" --summary \"Tests are green\" --next-step \"Open the PR\" --session sess_123\n hippo handoff create --summary \"PR is open, tests green\" --next \"Merge after review\" --session sess_123 --artifact src/foo.ts\n hippo handoff create --summary s --constraint a --constraint b --outcome partial --target-runtime codex --card-id c1 --tests pass\n hippo card create --title \"Add cards table\" --repo hippo --depends-on card_abc\n hippo card claim card_abc --runtime codex\n hippo card complete card_abc --outcome success\n hippo card heartbeat card_abc --run 7\n hippo card reclaim\n hippo embed --status\n hippo watch -- npm run build\n hippo learn --git --days 30\n hippo promote mem_abc123\n hippo sync\n hippo setup\n hippo hook install claude-code\n hippo decide \"Use PostgreSQL for new services\" --context \"JSONB support\"\n hippo incident \"Prod outage: DB connection pool exhausted\" --context \"spike at 14:00\"\n hippo process new \"Release\" --step \"run tests\" --step \"bump version\" --step \"publish\"\n hippo policy new \"Data retention\" --text \"Delete logs after 90 days\" --from 2026-01-01\n hippo policy asof 2026-03-01 --name \"Data retention\"\n hippo skill new \"Run tests\" --instructions \"npm test before every commit\" --trigger \"before commit\"\n hippo skill export\n hippo brief new \"hippo\" --summary \"Agent-memory library; E2 first-class objects in progress\"\n hippo brief refresh \"hippo\"\n hippo note new \"Acme Corp\" --text \"Renewal call: wants SSO before Q3; champion is the VP Eng\"\n hippo note list --customer \"Acme Corp\" --status active\n hippo graph extract\n hippo invalidate \"REST API\" --dry-run\n hippo invalidate \"REST API\" --reason \"migrated to GraphQL\"\n hippo invalidate --id mem_a1b2c3d4e5f6 --reason \"superseded by new policy\"\n hippo invalidate --churn --dry-run\n hippo export memories.json\n hippo export --format markdown memories.md\n hippo sleep --dry-run\n hippo outcome --good\n hippo status\n";
|
|
6
6
|
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -19,7 +19,7 @@ export function printSlackWorkspacesUsage() {
|
|
|
19
19
|
console.log(' remove --team <T> Remove a workspace registration');
|
|
20
20
|
}
|
|
21
21
|
export const USAGE_HEADER = `
|
|
22
|
-
Hippo -
|
|
22
|
+
Hippo - One memory for every agent you'll ever use.
|
|
23
23
|
|
|
24
24
|
Usage: hippo <command> [options]
|
|
25
25
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Hippo Memory - OpenClaw Plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One memory for every agent you'll ever use. Hippo writes what you teach a coding agent into a store in your repo, and your other agents read that same store.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The plugin puts your project's memories in front of the OpenClaw agent at session start, saves the errors its tools hit and gives it hippo's memory tools. Claude Code, Codex, Cursor and any MCP client read the same store.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -101,17 +101,9 @@ When `autoLearn` is enabled, the plugin captures tool errors as memories. To pre
|
|
|
101
101
|
|
|
102
102
|
Errors that pass these three filters are stored with `hippo remember`.
|
|
103
103
|
|
|
104
|
-
###
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|---|---|---|
|
|
108
|
-
| Decay | Yes, 365-day half-life by default | No, saves everything |
|
|
109
|
-
| Retrieval strengthening | Yes | No |
|
|
110
|
-
| Outcome feedback | Yes | No |
|
|
111
|
-
| Cross-tool | Claude Code, Codex, Cursor, OpenClaw | Claude Code only |
|
|
112
|
-
| API calls | None by default. If `ANTHROPIC_API_KEY` is set, `hippo sleep` sends memory text to Anthropic; `{"extraction":{"enabled":false}}` stops it | Uses Claude API for compression |
|
|
113
|
-
| Token cost | ~1500 tokens/session (configurable) | Variable |
|
|
114
|
-
| Memecoin | No | Yes ($CMEM on Solana) |
|
|
104
|
+
### Model calls
|
|
105
|
+
|
|
106
|
+
Storing a memory makes no model call. The exception is `hippo sleep`, which sends text to Anthropic when `ANTHROPIC_API_KEY` is set, and `{"extraction":{"enabled":false}}` turns it off.
|
|
115
107
|
|
|
116
108
|
## Requirements
|
|
117
109
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "hippo-memory",
|
|
3
3
|
"name": "Hippo Memory",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "3.
|
|
4
|
+
"description": "One memory for every agent you'll ever use. Hippo writes what you teach a coding agent into a store in your repo, and your other agents read that same store.",
|
|
5
|
+
"version": "3.7.1",
|
|
6
6
|
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hippo-memory",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "One memory for every agent you'll ever use. Hippo writes what you teach a coding agent into a store in your repo, and your other agents read that same store.",
|
|
6
6
|
"main": "index.ts",
|
|
7
7
|
"openclaw": {
|
|
8
8
|
"extensions": [
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "hippo-memory",
|
|
3
3
|
"name": "Hippo Memory",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "3.
|
|
4
|
+
"description": "One memory for every agent you'll ever use. Hippo writes what you teach a coding agent into a store in your repo, and your other agents read that same store.",
|
|
5
|
+
"version": "3.7.1",
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hippo-memory",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.7.1",
|
|
4
|
+
"description": "One memory for every agent you'll ever use. Hippo writes what you teach a coding agent into a store in your repo, and your other agents read that same store.",
|
|
5
5
|
"mcpName": "io.github.kitfunso/hippo-memory",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"fmt": "oxfmt src tests scripts bin",
|
|
53
53
|
"fmt:check": "oxfmt --check src tests scripts bin",
|
|
54
54
|
"sbom": "node scripts/sbom.mjs",
|
|
55
|
-
"audit:security": "
|
|
55
|
+
"audit:security": "node scripts/checks/check-audit.mjs",
|
|
56
56
|
"smoke:pack": "node scripts/smoke-pack.mjs",
|
|
57
57
|
"smoke:openclaw-install": "node scripts/smoke-openclaw-install.mjs",
|
|
58
58
|
"build:ui": "cd ui && npm ci && npm run build",
|
|
@@ -81,12 +81,11 @@
|
|
|
81
81
|
"coding-agent",
|
|
82
82
|
"agents",
|
|
83
83
|
"llm",
|
|
84
|
-
"rag",
|
|
85
84
|
"retrieval",
|
|
86
|
-
"hybrid-search",
|
|
87
85
|
"embeddings",
|
|
88
86
|
"sqlite",
|
|
89
87
|
"local-first",
|
|
88
|
+
"open-source",
|
|
90
89
|
"cli",
|
|
91
90
|
"context",
|
|
92
91
|
"recall"
|