Skip to content
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmemory",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "Persistent memory for Cursor: auto-captures sessions, prompts, and tool use via hooks, recalls with hybrid BM25 + vector + graph search, and exposes 55 memory tools over MCP. Keyless by default, runs entirely on your machine.",
"author": {
"name": "Rohit Ghumare",
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).

## Testing

- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (7,000+ tests). Commit anything the generators changed. CI runs the same build, skills check and tests.
- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (7,100+ tests). Commit anything the generators changed. CI runs the same build, skills check and tests.
- Before any npm publish: `npm run release:gate` must pass. It installs the packed tarballs into a clean home and runs capture, recovery, restart, export/import, MCP and status checks against the installed CLI (see CONTRIBUTING.md, Release process)
- Mock pattern: `vi.mock("iii-sdk")` with mock `sdk.trigger`, `kv.get/set/list`
- Test files go in `test/` with `.test.ts` extension
Expand All @@ -121,7 +121,7 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).
- 6 MCP resources, 3 MCP prompts
- 12 hooks, 17 skills
- 355+ iii functions
- 7,000+ tests
- 7,100+ tests

## Personal fork verification isolation

Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.9.33-daniel.76 — Request-local search hydration

- Reuse unchanged hydration within one expanding search request, preserving pinned State identity checks and invalidating on State writes or index publication.
- Bound observers and release them on every request exit; no cross-request cache or backend safety bypass. Synthetic sparse-project RPC reads halve with identical results; production latency is not yet measured.
- Make compatibility-hook test fixtures wait for their actual detached writers before cleanup and propagate child failures; production hook behavior is unchanged.
- Details: `docs/customizations/SEARCH-REQUEST-HYDRATION.md`.

## 0.9.33-daniel.75 — Additive memory-pressure recovery

- Preserve the existing available-memory normal/recovery paths; Linux PSI adds a separately qualified recovery path rather than vetoing previously allowed work.
Expand Down Expand Up @@ -30,6 +37,7 @@

## [Unreleased]

## [0.9.33-daniel.76] — 2026-11-14
## [0.9.33-daniel.75] — 2026-11-14
## [0.9.33-daniel.74] — 2026-11-14
## [0.9.33-daniel.73] — 2026-11-14
Expand Down Expand Up @@ -700,6 +708,7 @@ Wave release closing several breaking regressions reported against v0.9.26, plus
- `/agentmemory:forget` skill still calls `memory_governance_delete` which only touches `KV.memories` and never observations ([#833](https://github.com/rohitg00/agentmemory/issues/833)). Skill rewrite + new `memory_forget` MCP tool tracked separately.
- `crypto.randomUUID()` global-only on Node <19 ([#715](https://github.com/rohitg00/agentmemory/issues/715)). Drop-in import fix tracked.

[0.9.33-daniel.76]: https://github.com/rohitg00/agentmemory/compare/v0.9.33-daniel.75...v0.9.33-daniel.76
[0.9.33-daniel.75]: https://github.com/rohitg00/agentmemory/compare/v0.9.33-daniel.74...v0.9.33-daniel.75
[0.9.33-daniel.74]: https://github.com/rohitg00/agentmemory/compare/v0.9.33-daniel.73...v0.9.33-daniel.74
[0.9.33-daniel.73]: https://github.com/rohitg00/agentmemory/compare/v0.9.33-daniel.72...v0.9.33-daniel.73
Expand Down
4 changes: 2 additions & 2 deletions assets/tags/light/stat-tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/tags/stat-tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions docs/customizations/SEARCH-REQUEST-HYDRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Request-local search hydration reuse

Sparse project filtering may expand hybrid search through 100, 200, 400, 800,
and 1,000 candidates. Earlier rounds previously fetched the same State records
again. A request-local positive hydration cache avoids those repeated RPCs.

## Safety and lifetime

- Reuse requires both State mutation-key observers and the existing pinned State
read-admission predicate. Other backends/clients retain the uncached path.
- Each reused result checks the exact current State/engine identity predicate
before and after its asynchronous continuation. No identity TTL, RPC fence,
writer-lease condition, or mutation protection is removed.
- Index publication and observation/memory key mutation invalidate entries and
associated request-local project/session filtering caches. An invalidation
during hydration cannot publish that obsolete result.
- Failed/missing reads are not retained, including memory fallback after a
failed observation read. There is no cross-request cache or transactional
snapshot promise; concurrent mutations retain read-time search semantics.
- At most 1,000 hydrated entries each observe two State keys. All request
observers are released in `finally`, including authorization errors.

## Evidence and limits

A deterministic sparse-project fixture keeps identical result order and
100→200→400→800→1,000 expansion. Total State reads drop from 6,000 to 3,000:
observation hydration 2,500→1,000, memory hydration/filter reads 3,500→2,000.
Identity checks still run on cache hits and may dominate native filesystem cost.
This is an RPC-count improvement, not a measured production latency guarantee.
No production search was repeated to benchmark this change.

Regression cases include deletion, mutation before index publication, publication
revision changes, mutation during hydration, writer loss before/after an async
cache continuation, failed reads, concurrent requests, absent admission support,
and observer cleanup. Remove this customization when upstream supplies equivalent
request reuse with mutation freshness, pinned admission, and bounded cleanup.
2 changes: 1 addition & 1 deletion integrations/hermes/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: agentmemory
version: 0.9.33-daniel.75
version: 0.9.33-daniel.76
description: "Persistent memory for Hermes Agent with profile-scoped capture, recall, and native memory tools."
author: "Rohit Ghumare"
homepage: "https://github.com/rohitg00/agentmemory"
Expand Down
2 changes: 1 addition & 1 deletion integrations/omp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "agentmemory-omp-extension",
"private": true,
"type": "module",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"omp": {
"name": "agentmemory",
"description": "Persistent cross-session memory for omp \u2014 captures sessions, tools, approvals, and compaction; injects smart-search recall.",
Expand Down
2 changes: 1 addition & 1 deletion integrations/openclaw/openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "memory",
"name": "agentmemory",
"description": "Persistent cross-session memory for OpenClaw via agentmemory.",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"configSchema": {
"type": "object",
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion integrations/openclaw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmemory",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"type": "module",
"openclaw": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion integrations/openclaw/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: agentmemory
version: 0.9.33-daniel.75
version: 0.9.33-daniel.76
description: "Persistent cross-session memory for OpenClaw via agentmemory."
author: "Rohit Ghumare"
homepage: "https://github.com/rohitg00/agentmemory"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agentmemory/agentmemory",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "Persistent memory for AI coding agents, powered by iii-engine's three primitives",
"type": "module",
"main": "dist/index.mjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agentmemory/mcp",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "Standalone MCP server for agentmemory — thin shim that re-exposes @agentmemory/agentmemory's MCP entrypoint",
"type": "module",
"bin": {
Expand Down Expand Up @@ -28,7 +28,7 @@
"homepage": "https://github.com/rohitg00/agentmemory#readme",
"bugs": "https://github.com/rohitg00/agentmemory/issues",
"dependencies": {
"@agentmemory/agentmemory": "0.9.33-daniel.75"
"@agentmemory/agentmemory": "0.9.33-daniel.76"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmemory",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 55 MCP tools, 17 skills, real-time viewer.",
"author": {
"name": "Rohit Ghumare",
Expand Down
2 changes: 1 addition & 1 deletion plugin/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmemory",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "Local persistent memory for coding agents. Recall decisions, resume sessions, learn from corrections, and manage memory through 55 MCP tools and 17 skills. Optional capture through 6 Codex hooks.",
"author": {
"name": "Rohit Ghumare",
Expand Down
4 changes: 2 additions & 2 deletions plugin/.devin-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agentmemory",
"displayName": "agentmemory",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "Persistent memory for Devin CLI and Devin Desktop. Captures every session automatically, recalls with hybrid BM25 + vector + graph search, and exposes 55 memory tools over MCP. Keyless by default, runs on your machine. Not supported in cloud sessions.",
"logo": "assets/icon.svg",
"author": {
Expand All @@ -23,7 +23,7 @@
"command": "npx",
"args": [
"-y",
"@agentmemory/mcp@0.9.33-daniel.75"
"@agentmemory/mcp@0.9.33-daniel.76"
],
"env": {
"AGENTMEMORY_URL": "${AGENTMEMORY_URL:-http://localhost:3111}"
Expand Down
2 changes: 1 addition & 1 deletion plugin/opencode/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmemory-capture",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "OpenCode plugin for agentmemory — full Claude Code hook parity: session lifecycle (create/idle/status/compacted/update/diff/delete/error), messages & prompts (chat.message, message.updated user+assistant, message.removed), tool lifecycle (ToolPart states with timing), part tracking (subtask, step-finish, reasoning, file, patch, compaction, agent, retry), file enrichment pipeline, permissions, task tracking (w/ priority), commands, config & model tracking. 22 hooks, 2 slash commands.",
"author": {
"name": "Rohit Ghumare",
Expand Down
2 changes: 1 addition & 1 deletion plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmemory",
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 55 MCP tools, 17 skills, real-time viewer.",
"author": {
"name": "Rohit Ghumare",
Expand Down
2 changes: 1 addition & 1 deletion plugin/scripts/plugin-bridge.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { readFileSync, realpathSync } from "node:fs";
import { homedir } from "node:os";
import { join } from "node:path";
//#region src/version.ts
const VERSION = "0.9.33-daniel.75";
const VERSION = "0.9.33-daniel.76";
//#endregion
//#region src/secret-store.ts
const SECRET_KEY = "AGENTMEMORY_SECRET";
Expand Down
4 changes: 2 additions & 2 deletions scripts/docs-sync.state.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.33-daniel.75",
"version": "0.9.33-daniel.76",
"facts": {
"mcpTools": [
"55"
Expand All @@ -20,7 +20,7 @@
"12"
],
"tests": [
"7000+"
"7100+"
],
"functions": [
"355"
Expand Down
2 changes: 1 addition & 1 deletion src/functions/export-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export function registerExportImportFunction(sdk: IIIClient, state: StateKV): vo
const strategy = data.strategy || "merge";
const importData = data.exportData;

const supportedVersions = new Set(["0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.7.0", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6", "0.8.7", "0.8.8", "0.8.9", "0.8.10", "0.8.11", "0.8.12", "0.8.13", "0.9.0", "0.9.1", "0.9.2", "0.9.3", "0.9.4", "0.9.5", "0.9.6", "0.9.7", "0.9.8", "0.9.9", "0.9.10", "0.9.11", "0.9.12", "0.9.13", "0.9.14", "0.9.15", "0.9.16", "0.9.17", "0.9.18", "0.9.19", "0.9.20", "0.9.21", "0.9.22", "0.9.23", "0.9.24", "0.9.25", "0.9.26", "0.9.27", "0.9.28", "0.9.29", "0.9.30", "0.9.31", "0.9.31-daniel.1", "0.9.31-daniel.33", "0.9.31-daniel.34", "0.9.31-daniel.35", "0.9.31-daniel.36", "0.9.31-daniel.37", "0.9.31-daniel.38", "0.9.31-daniel.39", "0.9.31-daniel.40", "0.9.31-daniel.41", "0.9.31-daniel.42", "0.9.31-daniel.43", "0.9.31-daniel.44", "0.9.31-daniel.45", "0.9.31-daniel.46", "0.9.31-daniel.47", "0.9.31-daniel.48", "0.9.31-daniel.49", "0.9.31-daniel.50", "0.9.31-daniel.51", "0.9.31-daniel.52", "0.9.31-daniel.53", "0.9.31-daniel.54", "0.9.32-daniel.55", "0.9.32-daniel.57", "0.9.32-daniel.58", "0.9.32-daniel.59", "0.9.32-daniel.60", "0.9.32-daniel.61", "0.9.32-daniel.62", "0.9.32-daniel.63", "0.9.32-daniel.64", "0.9.32-daniel.65", "0.9.32-daniel.66", "0.9.32-daniel.67", "0.9.32-daniel.68", "0.9.33-daniel.69", "0.9.33-daniel.70", "0.9.33-daniel.71", "0.9.33-daniel.72", "0.9.33-daniel.73", "0.9.33-daniel.74", "0.9.33-daniel.75", "0.9.30-daniel.1", "0.9.30-daniel.10", "0.9.30-daniel.11", "0.9.30-daniel.15", "0.9.30-daniel.16", "0.9.30-daniel.18", "0.9.30-daniel.19", "0.9.30-daniel.2", "0.9.30-daniel.20", "0.9.30-daniel.21", "0.9.30-daniel.22", "0.9.30-daniel.23", "0.9.30-daniel.24", "0.9.30-daniel.25", "0.9.30-daniel.26", "0.9.30-daniel.27", "0.9.30-daniel.28", "0.9.30-daniel.3", "0.9.30-daniel.4", "0.9.30-daniel.5", "0.9.30-daniel.6", "0.9.30-daniel.7", "0.9.30-daniel.8", "0.9.30-daniel.9", "0.9.30-daniel.29", "0.9.30-daniel.30", "0.9.30-daniel.31", "0.9.30-daniel.32"]);
const supportedVersions = new Set(["0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.7.0", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6", "0.8.7", "0.8.8", "0.8.9", "0.8.10", "0.8.11", "0.8.12", "0.8.13", "0.9.0", "0.9.1", "0.9.2", "0.9.3", "0.9.4", "0.9.5", "0.9.6", "0.9.7", "0.9.8", "0.9.9", "0.9.10", "0.9.11", "0.9.12", "0.9.13", "0.9.14", "0.9.15", "0.9.16", "0.9.17", "0.9.18", "0.9.19", "0.9.20", "0.9.21", "0.9.22", "0.9.23", "0.9.24", "0.9.25", "0.9.26", "0.9.27", "0.9.28", "0.9.29", "0.9.30", "0.9.31", "0.9.31-daniel.1", "0.9.31-daniel.33", "0.9.31-daniel.34", "0.9.31-daniel.35", "0.9.31-daniel.36", "0.9.31-daniel.37", "0.9.31-daniel.38", "0.9.31-daniel.39", "0.9.31-daniel.40", "0.9.31-daniel.41", "0.9.31-daniel.42", "0.9.31-daniel.43", "0.9.31-daniel.44", "0.9.31-daniel.45", "0.9.31-daniel.46", "0.9.31-daniel.47", "0.9.31-daniel.48", "0.9.31-daniel.49", "0.9.31-daniel.50", "0.9.31-daniel.51", "0.9.31-daniel.52", "0.9.31-daniel.53", "0.9.31-daniel.54", "0.9.32-daniel.55", "0.9.32-daniel.57", "0.9.32-daniel.58", "0.9.32-daniel.59", "0.9.32-daniel.60", "0.9.32-daniel.61", "0.9.32-daniel.62", "0.9.32-daniel.63", "0.9.32-daniel.64", "0.9.32-daniel.65", "0.9.32-daniel.66", "0.9.32-daniel.67", "0.9.32-daniel.68", "0.9.33-daniel.69", "0.9.33-daniel.70", "0.9.33-daniel.71", "0.9.33-daniel.72", "0.9.33-daniel.73", "0.9.33-daniel.74", "0.9.33-daniel.75", "0.9.33-daniel.76", "0.9.30-daniel.1", "0.9.30-daniel.10", "0.9.30-daniel.11", "0.9.30-daniel.15", "0.9.30-daniel.16", "0.9.30-daniel.18", "0.9.30-daniel.19", "0.9.30-daniel.2", "0.9.30-daniel.20", "0.9.30-daniel.21", "0.9.30-daniel.22", "0.9.30-daniel.23", "0.9.30-daniel.24", "0.9.30-daniel.25", "0.9.30-daniel.26", "0.9.30-daniel.27", "0.9.30-daniel.28", "0.9.30-daniel.3", "0.9.30-daniel.4", "0.9.30-daniel.5", "0.9.30-daniel.6", "0.9.30-daniel.7", "0.9.30-daniel.8", "0.9.30-daniel.9", "0.9.30-daniel.29", "0.9.30-daniel.30", "0.9.30-daniel.31", "0.9.30-daniel.32"]);
if (!supportedVersions.has(importData.version)) {
return {
success: false,
Expand Down
6 changes: 4 additions & 2 deletions src/functions/search.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { observationIndexEligible } from '../ops/observation-index-policy.mjs';
import type { IIIClient } from 'iii-sdk'
import type { GraphObservationAuthorization } from "./graph-retrieval.js";
import type { HybridSearchRequest } from "../state/hybrid-search.js";
import { releaseHybridSearchRequest, type HybridSearchRequest } from "../state/hybrid-search.js";
import type { IndexPersistenceStatus } from "../state/index-persistence.js";
import type { CompressedObservation, Memory, SearchResult, Session } from '../types.js'
import { KV } from '../state/schema.js'
Expand Down Expand Up @@ -948,7 +948,8 @@ export function registerSearchFunction(sdk: IIIClient, kv: StateKV): void {
observation: CompressedObservation
layer: SearchResultLayer
} | null>>()
const hybridRequest: HybridSearchRequest = {}
const hybridRequest: HybridSearchRequest = { onHydrationInvalidated: () => { sessionCache.clear(); memoryProjectCache.clear(); observationCache.clear(); } }
try {
let enriched: SearchResult[] = []
let useHybridRanker = hybridRanker !== null
while (true) {
Expand Down Expand Up @@ -1051,6 +1052,7 @@ export function registerSearchFunction(sdk: IIIClient, kv: StateKV): void {
hasCwdFilter: !!cwdFilter,
})
return response
} finally { releaseHybridSearchRequest(hybridRequest); }
}
)
}
2 changes: 2 additions & 0 deletions src/ops/state-epoch.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type {EngineEpochEvidence} from './engine-epoch.mjs';
export interface StateBootIdentity {version:1;pid:number;start:string;instanceId:string;bootId:string;adapter:string;storePath:string|null}
export function createStateBoundEvidence(options:{engineEvidence:EngineEpochEvidence;identity:StateBootIdentity;expectedExecutable:{path:string;sha256:string};storePath:string;procRoot?:string}):EngineEpochEvidence;
export function pinStateClient(sdk:IIIClient,prefix:string,current?:()=>boolean,diagnostic?:()=>string|null):IIIClient;

export function pinnedStateReadCurrent(client:IIIClient):(()=>boolean)|null;
Loading
Loading