hippo-memory 1.10.0 → 1.11.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 (42) hide show
  1. package/README.md +5 -0
  2. package/dist/cli.js +6 -3
  3. package/dist/cli.js.map +1 -1
  4. package/dist/mcp/server.js +3 -3
  5. package/dist/mcp/server.js.map +1 -1
  6. package/dist/rate-limit.d.ts +33 -0
  7. package/dist/rate-limit.d.ts.map +1 -0
  8. package/dist/rate-limit.js +60 -0
  9. package/dist/rate-limit.js.map +1 -0
  10. package/dist/server-detect.d.ts +25 -0
  11. package/dist/server-detect.d.ts.map +1 -1
  12. package/dist/server-detect.js +39 -0
  13. package/dist/server-detect.js.map +1 -1
  14. package/dist/server.d.ts.map +1 -1
  15. package/dist/server.js +31 -4
  16. package/dist/server.js.map +1 -1
  17. package/dist/src/cli.js +6 -3
  18. package/dist/src/cli.js.map +1 -1
  19. package/dist/src/mcp/server.js +3 -3
  20. package/dist/src/mcp/server.js.map +1 -1
  21. package/dist/src/rate-limit.js +60 -0
  22. package/dist/src/rate-limit.js.map +1 -0
  23. package/dist/src/server-detect.js +39 -0
  24. package/dist/src/server-detect.js.map +1 -1
  25. package/dist/src/server.js +31 -4
  26. package/dist/src/server.js.map +1 -1
  27. package/dist/src/store.js +70 -21
  28. package/dist/src/store.js.map +1 -1
  29. package/dist/src/version.js +1 -1
  30. package/dist/src/version.js.map +1 -1
  31. package/dist/store.d.ts +2 -2
  32. package/dist/store.d.ts.map +1 -1
  33. package/dist/store.js +70 -21
  34. package/dist/store.js.map +1 -1
  35. package/dist/version.d.ts +1 -1
  36. package/dist/version.d.ts.map +1 -1
  37. package/dist/version.js +1 -1
  38. package/dist/version.js.map +1 -1
  39. package/extensions/openclaw-plugin/openclaw.plugin.json +1 -1
  40. package/extensions/openclaw-plugin/package.json +1 -1
  41. package/openclaw.plugin.json +1 -1
  42. package/package.json +1 -1
package/README.md CHANGED
@@ -85,6 +85,11 @@ hippo recall "data pipeline issues" --budget 2000
85
85
 
86
86
  ---
87
87
 
88
+ ### What's new in v1.10.1
89
+
90
+ - **`stop()` pidfile-ownership guard.** Closes the last open item in the v0.37 server-hardening cluster. `serve()`'s `stop()` and the `cli.ts` stale-pidfile self-heal removed `server.pid` unconditionally, so a shutting-down server could delete a newer live server's pidfile and orphan it. The new `removePidfileIfOwned` unlinks the pidfile only on a `(pid, started_at)` identity match; both call sites are rewired to it. Built via the `/dev-framework-rl` pipeline (plan-eng 91, code-review 88, independent-review 88, ship-readiness 92, canary 96).
91
+ - **Version-field sync.** `package.json`, the lockfile, `openclaw.plugin.json`, `src/version.ts`, and both `extensions/openclaw-plugin` manifests are now all `1.10.1`, correcting drift left by v1.9.x/v1.10.0 that left `/health` and the MCP `serverInfo` under-reporting the version.
92
+
88
93
  ### What's new in v1.10.0
89
94
 
90
95
  - **Server and lifecycle hardening.** Closes the `TODOS.md` "server / lifecycle hardening" cluster (deferred follow-ups from the v0.37 server-mode work, the v0.40 security pass, and the A3 envelope review), six items in all. `detectServer` is now async and confirms a recorded server is genuinely this hippo process by matching a `/health` `started_at` before the CLI routes to it (H1). The pidfile carries a `schema` version (L3). `hippo serve` refuses to start when a live peer already serves the hippoRoot (H3). The 413 over-cap-body path closes the socket instead of draining the rest (M3). A `HIPPO_REQUIRE_SERVER` env knob turns a missing server into a loud error instead of a silent direct-mode fallback that discards `HIPPO_API_KEY` (H2). And `hippo forget --archive --reason` gives raw, append-only memories a real removal path via `archiveRaw` instead of a misleading "not found" (A3).
package/dist/cli.js CHANGED
@@ -57,7 +57,7 @@ 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 client from './client.js';
60
- import { detectServer, removePidfile } from './server-detect.js';
60
+ import { detectServer, removePidfileIfOwned } from './server-detect.js';
61
61
  import { resolveTenantId } from './tenant.js';
62
62
  import { runEval, bootstrapCorpus, compareSummaries } from './eval.js';
63
63
  import { runFeatureEval, formatResult, resultToBaseline, detectRegressions } from './eval-suite.js';
@@ -137,7 +137,8 @@ function failIfServerRequired(reason) {
137
137
  * was already surfaced to stdout/stderr by `httpFn`),
138
138
  * - false if no server was detected, or if the detected pidfile turned out
139
139
  * to be stale (connection refused). On stale, the pidfile is removed
140
- * and the caller should fall back to the direct path.
140
+ * if it still names that dead server (a newer one may have replaced
141
+ * it) and the caller should fall back to the direct path.
141
142
  *
142
143
  * Per the A1 plan footgun #1: stale pidfiles must self-heal, not crash.
143
144
  * H2: when HIPPO_REQUIRE_SERVER is set, both fallback paths throw instead of
@@ -159,7 +160,9 @@ async function runViaServerIfAvailable(hippoRoot, httpFn) {
159
160
  if (client.isConnectionRefused(err)) {
160
161
  failIfServerRequired('the server pidfile was stale (connection refused)');
161
162
  console.error('hippo: stale server pidfile detected, falling back to direct mode');
162
- removePidfile(hippoRoot);
163
+ // Clear the pidfile only if it still names the dead server we just
164
+ // probed — a newer server may have rewritten it (removePidfileIfOwned).
165
+ removePidfileIfOwned(hippoRoot, { pid: info.pid, startedAt: info.started_at });
163
166
  return false;
164
167
  }
165
168
  throw err;