hippo-memory 1.13.0 → 1.13.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.
- package/dist/api.d.ts +69 -6
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +64 -1
- package/dist/api.js.map +1 -1
- package/dist/audit.d.ts +1 -1
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js.map +1 -1
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +133 -1
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +12 -0
- package/dist/client.js.map +1 -1
- package/dist/forward-claim-detector.d.ts +38 -0
- package/dist/forward-claim-detector.d.ts.map +1 -0
- package/dist/forward-claim-detector.js +117 -0
- package/dist/forward-claim-detector.js.map +1 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +121 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/predictions.d.ts +73 -1
- package/dist/predictions.d.ts.map +1 -1
- package/dist/predictions.js +210 -16
- package/dist/predictions.js.map +1 -1
- package/dist/recall-history.d.ts +127 -0
- package/dist/recall-history.d.ts.map +1 -0
- package/dist/recall-history.js +235 -0
- package/dist/recall-history.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +81 -0
- package/dist/server.js.map +1 -1
- package/dist/src/api.js +64 -1
- package/dist/src/api.js.map +1 -1
- package/dist/src/audit.js.map +1 -1
- package/dist/src/cli.js +133 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/client.js +12 -0
- package/dist/src/client.js.map +1 -1
- package/dist/src/forward-claim-detector.js +117 -0
- package/dist/src/forward-claim-detector.js.map +1 -0
- package/dist/src/mcp/server.js +121 -2
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/predictions.js +210 -16
- package/dist/src/predictions.js.map +1 -1
- package/dist/src/recall-history.js +235 -0
- package/dist/src/recall-history.js.map +1 -0
- package/dist/src/server.js +81 -0
- package/dist/src/server.js.map +1 -1
- 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/src/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/audit.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO;IACnE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI;IAC/D,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACjE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ;IACvE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK;IACrE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM;IACtE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK;CACpE,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,gBAAgB,CAAC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C,CAAC,CAAE,CAA6B,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/src/cli.js
CHANGED
|
@@ -57,6 +57,31 @@ import { buildProvenanceCoverage } from './provenance-coverage.js';
|
|
|
57
57
|
import { buildCorrectionLatency } from './correction-latency.js';
|
|
58
58
|
import * as api from './api.js';
|
|
59
59
|
import * as predictionsModule from './predictions.js';
|
|
60
|
+
import { computePlanningFallacyHint } from './predictions.js';
|
|
61
|
+
import { createHash } from 'node:crypto';
|
|
62
|
+
import { detectAnchoring, hashQueryText, buildSessionKey, getOrCreateRing, appendRecall, snapshotRing, } from './recall-history.js';
|
|
63
|
+
// v0.33 / J1 — Module-level per-(tenant, session) recall-history ring map.
|
|
64
|
+
// Each CLI process maintains its OWN Map; no IPC / no cross-process sharing
|
|
65
|
+
// (plan v3 decision: per-pipeline rings, see docs/plans/2026-05-26-j1-anchoring-detector.md).
|
|
66
|
+
//
|
|
67
|
+
// IMPORTANT single-shot CLI limitation (codex round-2 catch): in normal
|
|
68
|
+
// terminal usage each `hippo recall` invocation spawns a fresh Node
|
|
69
|
+
// process, so this Map is recreated empty every time and J1 cannot
|
|
70
|
+
// accumulate history across invocations. CLI J1 only fires in
|
|
71
|
+
// long-running processes (the cmdSleep / consolidate loops, batch
|
|
72
|
+
// scripts that call cmdRecall in-process, or tests). MCP and HTTP
|
|
73
|
+
// pipelines DO accumulate because their host processes are long-lived
|
|
74
|
+
// (hippo serve, MCP server). For CLI users who want per-session
|
|
75
|
+
// anchoring in single-shot mode, the recommendation is to run via
|
|
76
|
+
// `hippo serve` and call HTTP /v1/memories?session_id=... (the HTTP
|
|
77
|
+
// ring persists across calls within the server process). A J1-v1.1
|
|
78
|
+
// follow-up may add SQLite-backed CLI persistence (migration v30
|
|
79
|
+
// recall_history table per the original brainstorm option D).
|
|
80
|
+
const sessionRecallHistoryCli = new Map();
|
|
81
|
+
/** Test-only: reset the module-level recall-history Map. Call from beforeEach. */
|
|
82
|
+
export function __resetSessionRecallHistoryCli() {
|
|
83
|
+
sessionRecallHistoryCli.clear();
|
|
84
|
+
}
|
|
60
85
|
import * as client from './client.js';
|
|
61
86
|
import { detectServer, removePidfileIfOwned } from './server-detect.js';
|
|
62
87
|
import { resolveTenantId } from './tenant.js';
|
|
@@ -1021,18 +1046,76 @@ async function cmdRecall(hippoRoot, query, flags) {
|
|
|
1021
1046
|
droppedByBudgetCountCmd = results.length - limit;
|
|
1022
1047
|
results = results.slice(0, limit);
|
|
1023
1048
|
}
|
|
1049
|
+
// v0.33 / J1 — CLI per-pipeline anchoring detector. Each pipeline (api.recall,
|
|
1050
|
+
// cmdRecall, MCP) computes its own AnchoringHint via the shared detectAnchoring
|
|
1051
|
+
// helper against its own top-1 + its own per-(tenant, session) ring buffer.
|
|
1052
|
+
// HIPPO_ANCHORING=off short-circuits BEFORE both the ring lookup and the
|
|
1053
|
+
// detect call so disabled tenants pay truly zero work. When sessionId is
|
|
1054
|
+
// absent we emit recall_anchor_skipped_no_session for J1-v2 telemetry.
|
|
1055
|
+
let cmdAnchoringHint = null;
|
|
1056
|
+
if (process.env.HIPPO_ANCHORING !== 'off') {
|
|
1057
|
+
if (sessionId) {
|
|
1058
|
+
const ringKey = buildSessionKey(tenantId, sessionId);
|
|
1059
|
+
const ring = getOrCreateRing(sessionRecallHistoryCli, ringKey);
|
|
1060
|
+
const queryHash = hashQueryText(query);
|
|
1061
|
+
const topId = results[0]?.entry.id ?? null;
|
|
1062
|
+
cmdAnchoringHint = detectAnchoring(snapshotRing(ring), queryHash, topId);
|
|
1063
|
+
// Append AFTER detect (snapshot was taken before). anchoredOn carries
|
|
1064
|
+
// the memoryId of any hint that fired, feeding the cooldown logic for
|
|
1065
|
+
// the NEXT cmdRecall on this session.
|
|
1066
|
+
appendRecall(ring, queryHash, topId, cmdAnchoringHint?.memoryId);
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
// Telemetry: caller had no sessionId so ring tracking is skipped.
|
|
1070
|
+
// Per the recall-audit convention at api.ts:854, use SHA-256/16
|
|
1071
|
+
// for prompt hashing (NOT hashQueryText which is FNV-1a 32-bit
|
|
1072
|
+
// for recall matching; brute-force trivial for low-entropy
|
|
1073
|
+
// queries). Codex round-1 P1 / round-2 P2 catch.
|
|
1074
|
+
emitCliAudit(hippoRoot, 'recall_anchor_skipped_no_session', undefined, {
|
|
1075
|
+
query_hash: createHash('sha256').update(query).digest('hex').slice(0, 16),
|
|
1076
|
+
query_length: query.length,
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1024
1080
|
// v1.12.13 / C5 — Build suppressionSummary for cmdRecall pipeline. Surfaced
|
|
1025
1081
|
// in --why text output and in the --json JSON output. cmdRecall does not
|
|
1026
1082
|
// run the summarizeOverflow path (api.recall does) and does not currently
|
|
1027
1083
|
// expose fresh-tail in the CLI, so those two counters are 0 here.
|
|
1084
|
+
// v0.33 / J1: suppressedByInterference is bumped by 1 when cmdAnchoringHint
|
|
1085
|
+
// fires with reason='memory_dominance' (the only reason that counts as
|
|
1086
|
+
// interference; query_repeat is a re-ask, not memory competition).
|
|
1087
|
+
const cmdSuppressedByInterference = cmdAnchoringHint?.reason === 'memory_dominance' ? 1 : 0;
|
|
1028
1088
|
const cmdSuppressionSummary = api.buildSuppressionSummary({
|
|
1029
1089
|
totalCandidates: totalCandidatesCountCmd,
|
|
1030
1090
|
droppedPreRank: droppedPreRankCountCmd,
|
|
1031
1091
|
droppedByBudget: droppedByBudgetCountCmd,
|
|
1032
1092
|
summarySubstitutionsAdded: 0,
|
|
1033
1093
|
freshTailAdded: 0,
|
|
1034
|
-
suppressedByInterference:
|
|
1094
|
+
suppressedByInterference: cmdSuppressedByInterference,
|
|
1035
1095
|
});
|
|
1096
|
+
// v0.33 / J1 — emit pipeline-local audit op when a hint fires (lockstep
|
|
1097
|
+
// with api.recall's audit pattern; each pipeline emits for its own hits).
|
|
1098
|
+
if (cmdAnchoringHint?.reason === 'memory_dominance') {
|
|
1099
|
+
emitCliAudit(hippoRoot, 'recall_anchor_detected_memory_dominance', cmdAnchoringHint.memoryId, {
|
|
1100
|
+
memory_id: cmdAnchoringHint.memoryId,
|
|
1101
|
+
query_count: cmdAnchoringHint.queryCount ?? null,
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
else if (cmdAnchoringHint?.reason === 'query_repeat') {
|
|
1105
|
+
emitCliAudit(hippoRoot, 'recall_anchor_detected_query_repeat', cmdAnchoringHint.memoryId, {
|
|
1106
|
+
memory_id: cmdAnchoringHint.memoryId,
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
// v0.32 / J3.2 — auto-injection of reference-class baserate when the
|
|
1110
|
+
// CLI query carries a forward-prediction phrase AND a class matches.
|
|
1111
|
+
// cmdRecall runs its own pipeline (doesn't go through api.recall for
|
|
1112
|
+
// the memory list), so it computes the hint here. The hint VALUE is
|
|
1113
|
+
// pipeline-invariant — same (hippoRoot, tenantId, query) inputs would
|
|
1114
|
+
// produce the same hint in api.recall — but the audit emission is
|
|
1115
|
+
// pipeline-local (one audit row per actual call, actor='cli' here).
|
|
1116
|
+
// computePlanningFallacyHint short-circuits BEFORE the regex gate
|
|
1117
|
+
// when HIPPO_AUTODEBIAS=off so the no-match path is effectively free.
|
|
1118
|
+
const cmdPlanningFallacyHint = computePlanningFallacyHint(hippoRoot, tenantId, query, { actor: 'cli' });
|
|
1036
1119
|
// A5 audit: emit one 'recall' event per query, capturing the (truncated)
|
|
1037
1120
|
// query text and the post-filter result count. Tenant resolved by emitCliAudit.
|
|
1038
1121
|
// Emit before the early-empty return so zero-result recalls are still logged.
|
|
@@ -1117,6 +1200,14 @@ async function cmdRecall(hippoRoot, query, flags) {
|
|
|
1117
1200
|
results: [],
|
|
1118
1201
|
total: 0,
|
|
1119
1202
|
suppressionSummary: cmdSuppressionSummary,
|
|
1203
|
+
// v0.32 / J3.2 — preserve planningFallacyHint on zero-result
|
|
1204
|
+
// recalls. Codex review round 1 catch: hint was previously only
|
|
1205
|
+
// included in the populated-results JSON branch, breaking parity
|
|
1206
|
+
// with HTTP/MCP which surface the hint regardless of memory
|
|
1207
|
+
// matches. A forward-claim query that finds no memories STILL
|
|
1208
|
+
// produces useful planning-fallacy debias when the class resolves.
|
|
1209
|
+
...(cmdPlanningFallacyHint ? { planningFallacyHint: cmdPlanningFallacyHint } : {}),
|
|
1210
|
+
...(cmdAnchoringHint ? { anchoringHint: cmdAnchoringHint } : {}),
|
|
1120
1211
|
};
|
|
1121
1212
|
if (includeContinuity) {
|
|
1122
1213
|
out.continuity = {
|
|
@@ -1129,6 +1220,20 @@ async function cmdRecall(hippoRoot, query, flags) {
|
|
|
1129
1220
|
console.log(JSON.stringify(out));
|
|
1130
1221
|
return;
|
|
1131
1222
|
}
|
|
1223
|
+
// v0.33 / J1 — render anchoring hint above planning hint (anchoring
|
|
1224
|
+
// is the stronger cognitive-pull warning so it gets first position).
|
|
1225
|
+
if (cmdAnchoringHint) {
|
|
1226
|
+
console.log(`[anchored_on: ${cmdAnchoringHint.memoryId}] ${cmdAnchoringHint.summary}`);
|
|
1227
|
+
}
|
|
1228
|
+
// v0.32 / J3.2 — render hint BEFORE the no-memories message so the
|
|
1229
|
+
// calling agent sees its track record even when the query missed
|
|
1230
|
+
// every memory. Same single-line shape + JSON.stringify-safe phrase
|
|
1231
|
+
// as the populated-results path below.
|
|
1232
|
+
if (cmdPlanningFallacyHint) {
|
|
1233
|
+
const safePhrase = JSON.stringify(cmdPlanningFallacyHint.detectedPhrase);
|
|
1234
|
+
console.log(`Planning fallacy hint (class: ${cmdPlanningFallacyHint.classTag}): ${cmdPlanningFallacyHint.baserateSummary} [detected: ${safePhrase}]`);
|
|
1235
|
+
console.log();
|
|
1236
|
+
}
|
|
1132
1237
|
if (hasContinuity) {
|
|
1133
1238
|
// Print continuity even when no memories matched. The resume packet
|
|
1134
1239
|
// is the whole point of `--continuity` and must not be dropped here.
|
|
@@ -1193,6 +1298,8 @@ async function cmdRecall(hippoRoot, query, flags) {
|
|
|
1193
1298
|
results: output,
|
|
1194
1299
|
total: output.length,
|
|
1195
1300
|
suppressionSummary: cmdSuppressionSummary,
|
|
1301
|
+
...(cmdPlanningFallacyHint ? { planningFallacyHint: cmdPlanningFallacyHint } : {}),
|
|
1302
|
+
...(cmdAnchoringHint ? { anchoringHint: cmdAnchoringHint } : {}),
|
|
1196
1303
|
};
|
|
1197
1304
|
if (includeContinuity) {
|
|
1198
1305
|
jsonOut.continuity = {
|
|
@@ -1214,6 +1321,25 @@ async function cmdRecall(hippoRoot, query, flags) {
|
|
|
1214
1321
|
if (recentSessionEvents.length > 0)
|
|
1215
1322
|
printSessionEvents(recentSessionEvents);
|
|
1216
1323
|
}
|
|
1324
|
+
// v0.33 / J1 — render anchoring hint above planning-fallacy hint
|
|
1325
|
+
// (anchoring is the stronger cognitive-pull warning so it gets first
|
|
1326
|
+
// position). Hint absent (env disabled, no sessionId, or no R1/R2)
|
|
1327
|
+
// is silent.
|
|
1328
|
+
if (cmdAnchoringHint) {
|
|
1329
|
+
console.log(`[anchored_on: ${cmdAnchoringHint.memoryId}] ${cmdAnchoringHint.summary}`);
|
|
1330
|
+
console.log();
|
|
1331
|
+
}
|
|
1332
|
+
// v0.32 / J3.2 — render planning-fallacy hint ABOVE the result list so
|
|
1333
|
+
// the agent sees its track record before scrolling. Hint absent (env
|
|
1334
|
+
// disabled or no forward-claim match) is silent. detectedPhrase is
|
|
1335
|
+
// sanitised against control chars and ASCII quotes via JSON.stringify
|
|
1336
|
+
// to head off rendering ambiguity when a regex match contains quotes
|
|
1337
|
+
// or parens (plan-eng-critic round 2 LOW).
|
|
1338
|
+
if (cmdPlanningFallacyHint) {
|
|
1339
|
+
const safePhrase = JSON.stringify(cmdPlanningFallacyHint.detectedPhrase);
|
|
1340
|
+
console.log(`Planning fallacy hint (class: ${cmdPlanningFallacyHint.classTag}): ${cmdPlanningFallacyHint.baserateSummary} [detected: ${safePhrase}]`);
|
|
1341
|
+
console.log();
|
|
1342
|
+
}
|
|
1217
1343
|
console.log(`Found ${results.length} memories (${totalTokens} tokens) for: "${query}"\n`);
|
|
1218
1344
|
for (const r of results) {
|
|
1219
1345
|
const e = r.entry;
|
|
@@ -4518,6 +4644,12 @@ const VALID_AUDIT_OPS = new Set([
|
|
|
4518
4644
|
'predict_create', // v0.31 / E2 prediction first-class object — emitted by savePrediction
|
|
4519
4645
|
'predict_close', // v0.31 / E2 — emitted by closePrediction
|
|
4520
4646
|
'predict_baserate', // v0.31 / J3 — emitted by computePredictionBaserate
|
|
4647
|
+
'recall_autodebias_hint', // v0.32 / J3.2 — emitted by computePlanningFallacyHint on success
|
|
4648
|
+
'recall_autodebias_hint_no_class_match', // v0.32 / J3.2 — telemetry: forward-claim, no class scored
|
|
4649
|
+
'recall_autodebias_hint_tiebreak', // v0.32 / J3.2 — telemetry: forward-claim, >=2 classes tied
|
|
4650
|
+
'recall_anchor_detected_query_repeat', // v0.33 / J1 — emitted by detector on R1 fire
|
|
4651
|
+
'recall_anchor_detected_memory_dominance', // v0.33 / J1 — emitted by detector on R2 fire
|
|
4652
|
+
'recall_anchor_skipped_no_session', // v0.33 / J1 — telemetry: no sessionId, ring skipped
|
|
4521
4653
|
]);
|
|
4522
4654
|
function formatAuditRow(ev) {
|
|
4523
4655
|
const target = ev.targetId ?? '-';
|