#1 Persistent memory for AI coding agents based on real-world benchmarks
TypeScript agentmemoryagentsaiclaudeclaudecodecodexcopilotcursorgenaiharnesshermesmemoryompopenclawopencodepi
chore: 0.9.30 release prep (#1478)
Rohit Ghumare359c30ad22bb
diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.jsonindex 7fe3ea1f..f1c6698c 100644--- a/.cursor-plugin/plugin.json+++ b/.cursor-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "agentmemory",- "version": "0.9.29",+ "version": "0.9.30","description": "Persistent memory for Cursor: auto-captures sessions, prompts, and tool use via hooks, recalls with hybrid BM25 + vector + graph search, and exposes 54 memory tools over MCP. Keyless by default, runs entirely on your machine.","author": {"name": "Rohit Ghumare",diff --git a/.env.example b/.env.exampleindex 7afb54b8..6f112252 100644--- a/.env.example+++ b/.env.example@@ -150,6 +150,7 @@# AGENTMEMORY_IMAGE_EMBEDDINGS=true # Enable image embeddings when an image provider is present (experimental).# AGENTMEMORY_AUDIT_RETENTION_MONTHS=6 # Drop whole audit-log month scopes older than N months on a daily sweep. Default 0 = keep audit history forever.# AGENTMEMORY_AUDIT_MIGRATE_MAX_BYTES=33554432 # Largest legacy mem:audit scope file the one-time migration will read locally. Default 32 MiB; bigger or unreadable stores are left frozen.+# AGENTMEMORY_AUDIT_INDEX_PERSIST=false # Set to 1 or true to audit index migration and cleanup writes (debugging only)# AGENTMEMORY_INDEX_SAVE_INTERVAL_MS=600000 # Minimum time between search index saves; shutdown and deletes still save immediately.# AGENTMEMORY_VECTOR_BUCKET_SIZE=500 # Vectors held per storage bucket before a new bucket opens; a save only rewrites buckets it changed.# AGENTMEMORY_VECTOR_BACKFILL_MAX=500 # Batch size for re-embedding vectors missing since the last save (continues across restarts); also caps the whole-store opt-in per boot.diff --git a/AGENTS.md b/AGENTS.mdindex 02de31a3..b7b5bb4d 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -11,29 +11,19 @@ agentmemory is a persistent memory system for AI coding agents, built on iii-eng## Consistency Rules-**When adding or removing MCP tools, you MUST update ALL of the following:**+**Before every commit, run `npm run docs:sync` and commit what it changes.** It computes MCP tool counts (all, core, local fallback), REST endpoints, skills, hooks, tests, iii functions, source files, lines of code and KV scopes from the source, and rewrites them in README.md, the translated READMEs, AGENTS.md, INSTALL_FOR_AGENTS.md, plugin manifests, integration READMEs, the stat badges and the `src/index.ts` banner. The last synced values live in `scripts/docs-sync.state.json`; commit that file with the rest. `npm run docs:check` exits non-zero when anything is out of date. When the sync prints `check <fact> <old> left in <file>`, open that line: either fix it by hand or add its noun to the fact in `scripts/docs-sync.ts` so the next sync catches it. Never hand-edit these numbers or versions in the docs; change the source and sync.++**When adding or removing MCP tools, update:**1. `src/mcp/tools-registry.ts` — tool definition + `getAllTools()` array2. `src/mcp/server.ts` — handler case in the `mcp::tools::call` switch3. `src/triggers/api.ts` — REST endpoint registration-4. `src/index.ts` — function registration + endpoint count in the log line+4. `src/index.ts` — function registration5. `test/mcp-standalone.test.ts` — tool count assertion-6. `README.md` — tool counts (search for "MCP tools")-7. `plugin/.claude-plugin/plugin.json` — tool count in description-8. `plugin/plugin.json` and `plugin/.mcp.copilot.json` (when present) — tool count or MCP exposure-**When adding REST endpoints, you MUST update:**+**When adding REST endpoints, update:**1. `src/triggers/api.ts` — endpoint registration-2. `src/index.ts` — endpoint count in the log line-3. `README.md` — endpoint count (search for "REST endpoints" and "endpoints on port")--**When bumping version, you MUST update ALL of the following:**-1. `package.json` — version field-2. `src/version.ts` — VERSION constant and type union-3. `src/types.ts` — ExportData version union-4. `src/functions/export-import.ts` — supportedVersions set-5. `test/export-import.test.ts` — version assertion-6. `plugin/.claude-plugin/plugin.json` — version field-7. `plugin/plugin.json` (when present) — version field++**When bumping version, change only `package.json`.** `npm run docs:sync` carries the new version into `src/version.ts`, the `src/types.ts` ExportData union, the `supportedVersions` set in `src/functions/export-import.ts`, every plugin and package manifest that shared the old version, the deploy templates, the AGENTS.md stats heading, and CHANGELOG.md (the Unreleased section becomes the new version with today's date, plus its compare link).**When adding new KV scopes:**1. `src/state/schema.ts` — add to the KV object@@ -111,17 +101,17 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).## Testing-- All tests must pass before PR: `npm test` (1,596+ tests)+- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (2,500+ 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- Follow existing patterns in `test/crystallize.test.ts` for function tests-## Current Stats (v0.9.29)+## Current Stats (v0.9.30)- 54 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)- 138 REST endpoints- 6 MCP resources, 3 MCP prompts- 12 hooks, 17 skills-- 260+ iii functions-- 1,596+ tests+- 311+ iii functions+- 2,500+ testsdiff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5d5c5985..77bc3915 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,35 +6,128 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),## [Unreleased]-### Changed+## [0.9.30] - 2026-10-06++Scale, durability and safety release. The iii engine moves from 0.11.2 to 0.22.1. The stores that grew without bound on shared daemons (graph provenance, the audit log, the vector index, the viewer stream backlog) are bounded and heal themselves at boot. Capture is durable end to end: the server accepts each observation into a persistent inbox with a restart-safe event id, and hooks keep an offline spool while the server is down. Vectors survive a force-kill through a pending log. The REST API requires auth by default. Redis becomes an opt-in state backend, and the viewer is rebuilt around one snapshot plus live stream events with a Health page backed by `GET /agentmemory/status`. Every publish now goes through a release gate that installs the packed tarballs and runs capture and recovery against them. Contributions from david-waltermire, a652, cbsincool, dmazhukov and Tyxiel, with earlier work by DaveCole, Srinath279, joyjit and cristianbdev carried into merged PRs.++### Breaking changes++- **Auth is on by default** (#1462). When `AGENTMEMORY_SECRET` is not set, the server generates a secret into `~/.agentmemory/secret` (mode 0600) on first start. The CLI, viewer, hooks, MCP server and shim, `agentmemory connect` configs and the bundled integrations read it for loopback URLs, so they keep working with no change. Hand-written requests to `:3111` now need `Authorization: Bearer $(cat ~/.agentmemory/secret)`. An explicit `AGENTMEMORY_SECRET` still wins, and mesh sync still requires an explicit one.+- **File import and export paths are confined** (#1462). `/compress-file`, `/replay/import-jsonl`, `/graph/import-graphify`, the Obsidian export and `/migrate` resolve symlinks and only accept paths inside the data dir, `~/.agentmemory` or a directory listed in `AGENTMEMORY_IMPORT_ROOT`. `/replay/import-jsonl` also keeps its default `~/.claude/projects`.+- **Browser writes need JSON and an allowed origin** (#1462). `POST`, `PUT`, `PATCH` and `DELETE` requests with a body must send `Content-Type: application/json`, and a present `Origin` header must be a loopback origin for the configured ports, the viewer's own origin, or listed in `VIEWER_ALLOWED_ORIGINS`. Clients that send no `Origin` (CLI, hooks, MCP, curl) are unaffected.+- **`AGENTMEMORY_VECTOR_BACKFILL_MAX` is now a batch size** (#1467). Recovery re-embeds missing vectors in batches of this size until the backlog is empty, across restarts, instead of stopping at the cap once per boot.+- **iii engine 0.22.1** (#1396, #1397). Keep the `iii-` prefixed builtin worker names (`iii-http`, `iii-state`, `iii-queue`, `iii-pubsub`, `iii-cron`) in any custom config: on 0.22.1 the bare names resolve to standalone registry workers.+- **Hooks skip agentmemory's own tools** (#1452). PostToolUse no longer captures `memory_*` MCP calls or `toolsearch`, `listmcpresources` and `fetchmcpresource`.+- **Changed response shapes.**+ - `mem::forget`, `mem::governance-delete` and `mem::governance-bulk` count only records that were really deleted. Absent ids come back in `notFound` and failed deletes in `failed` and `failures`, with `success: false` when anything failed. `governance-bulk` refuses an empty filter and unsupported keys on both the dry run and the live call (#1449).+ - `GET /agentmemory/audit` and the `memory_audit` MCP tool return `{ entries, legacyFrozen, legacyFrozenBytes }`; the MCP tool used to return a bare list (#1419).+ - `GET /agentmemory/memories` returns newest first and adds `nextCursor` (plus `search` and `facets` when requested) (#1433).+ - `GET /agentmemory/export` returns 413 with the refusal body (`oversized`, `bytes`, `limitBytes`, `stoppedAt`) instead of 200 when the export is too large (#1422, #1449).+ - `POST /agentmemory/session/end` for an unknown, malformed or already completed session returns 200 with `ended: false` and writes nothing (#1252).+ - `memory_patterns` / `mem::patterns` reads the 50 most recent sessions by default (`limit`, max 500) and stops after 5,000 observations (#1424).+ - Consolidation decay applies at most once per decay period, and `results.decay` reports `{ scanned, written }` per tier (#1417).++### Upgrade notes++- Scripts or tools that call the REST API by hand on `:3111`: add `Authorization: Bearer $(cat ~/.agentmemory/secret)`, or set your own `AGENTMEMORY_SECRET` and send that.+- Imports or exports from folders outside `~/.agentmemory` and the data dir: list those folders in `AGENTMEMORY_IMPORT_ROOT` (separate several with `:`, or `;` on Windows).+- A web page on another origin that writes through the viewer: add its origin to `VIEWER_ALLOWED_ORIGINS`.+- Nothing else is required. Stores load unchanged, and the one-time migrations below run by themselves.-- **iii engine and `iii-sdk` move from 0.11.2 to 0.22.1, with `@iii-dev/helpers` 0.22.1 alongside.** Same release on both sides, as before; the CLI downloads the pinned engine into `~/.agentmemory/bin`, the bundled `docker-compose.yml` pulls `iiidev/iii:0.22.1`, and `agentmemory upgrade` pins both packages to the version this package was built against. The deploy templates under `deploy/` install the published npm package, so their engine pair moves together with `AGENTMEMORY_VERSION` at release time. 0.22.x is the last engine line before 0.23 removes the `config.yaml` worker lifecycle the CLI relies on; it carries the upstream fix that keeps HTTP routes owned by the reconnecting worker, so `/agentmemory/*` no longer answers 404 after the engine reconnects (#1013), and its Node SDK bounds WebSocket connect attempts and detects half-open sockets. The bundled configs keep the `iii-` prefixed builtin workers (`iii-http`, `iii-state`, `iii-queue`, `iii-pubsub`, `iii-cron`): on 0.22.1 the unprefixed names resolve to the standalone registry workers, which is the 0.23 migration. Existing state stores load unchanged.-- **Runtime config is re-seeded on every start.** Engines from 0.19.4 on persist each builtin worker's `config:` block on first boot (0.22 writes `config/<worker>.yaml` next to the config file; earlier engines wrote `data/configuration/` under the working directory) and treat that copy as the source of truth afterwards, which would have made `--port`, `--instance` and data-dir changes silently ineffective after the first run. The CLI now clears those persisted entries in both locations right before it spawns the engine, so the runtime config it renders from your environment is the seed every time. If one of them cannot be removed, `agentmemory start` stops with the path instead of launching an engine that would ignore the requested ports. The bundled `docker-compose.yml` keeps the same directory on a tmpfs so container starts behave the same way.-- Dependabot no longer proposes `iii-sdk` bumps; the engine pin and the SDK version are updated together by hand.-- The deploy Dockerfiles (`deploy/fly`, `railway`, `render`, `coolify`) refuse to build when `III_VERSION` and `III_SDK_VERSION` differ, so overriding the engine tag alone can no longer produce a worker that speaks the wrong wire protocol.-- **The pinned engine starts quiet.** The CLI spawns it with `--no-update-check` (no update or security-advisory lookups against GitHub at boot) and with iii's anonymous usage telemetry off (`III_TELEMETRY_ENABLED=false` unless you export the variable yourself); the bundled compose file passes the same flag and variable.-- The deploy entrypoints (`deploy/*/entrypoint.sh`) generate the same observability settings as the bundled `iii-config.yaml` (`sampling_ratio: 0.1`, console log output off) instead of full sampling with console logs, the combination behind the log feedback loop fixed in 0.9.22.-- The README section on extending agentmemory with registry workers no longer lists builtins that already ship in `iii-config.yaml`, uses the current registry names (`database` replaced `iii-database`), and says where a custom config lives (`~/.agentmemory/iii-config.yaml`).+### What happens on the first start++- **Graph provenance is compacted once in the background.** Every node, edge, superseded edge and the cached snapshot is trimmed to 32 observation ids in slices, without blocking boot, search or the viewer. Progress is saved and resumes after a restart. `AGENTMEMORY_GRAPH_COMPACT_ON_BOOT=false` skips it; `POST /agentmemory/graph/compact` runs it by hand (#1455).+- **The audit log moves to monthly scopes** (`mem:audit:YYYY-MM`) with a one-time background migration. A legacy scope larger than `AGENTMEMORY_AUDIT_MIGRATE_MAX_BYTES` (default 32 MiB) or unreadable is left frozen and reported as `legacyFrozen` (#1419).+- **The vector index migrates to buckets** (`AGENTMEMORY_VECTOR_BUCKET_SIZE`, default 500) by copying vectors, with no embedding calls. BM25 is no longer persisted and is rebuilt at every boot (#1416).+- **State is saved every 2 s** instead of 5 s, and `agentmemory stop` waits for the engine flush, so it takes a few seconds longer (#1457, #1449).+- **Stale sessions are marked abandoned** after `AGENTMEMORY_SESSION_SWEEP_STALE_HOURS` (default 24) by an hourly sweep that deletes nothing (#1453).+- **Viewer stream groups.** Observations stop writing to per-session `mem-live` groups and the shared `viewer` group is capped at `AGENTMEMORY_VIEWER_STREAM_MAX` (default 500). Existing per-session groups are left in place (#1420).### Added-- **`GET /agentmemory/status` and a Health tab in the viewer.** One report of what is wrong and how to fix it: the health monitor state and alerts, the LLM and embedding providers and the circuit breaker, functions failing on at least 20% of their calls (with a provider-specific fix for summarize, compress and graph extraction), observations missing from the search index (the same exact check the boot reconcile runs), graph snapshot age, ports, uptime, the pinned engine version and every feature flag with how to enable it. Browsers get an HTML page with no scripts and a strict CSP; everything else gets JSON (`?format=json` or `?format=html` force either). Every probe is time-boxed at 5 s so a slow store cannot hang the page. Uses the same bearer auth as the rest of the API.-- **`agentmemory console`** launches the iii web console (workers, functions, triggers, queues, traces) through the pinned engine, against the ports agentmemory resolved, one port above the viewer by default (`--console-port` overrides). Engine 0.22 ships the console as part of `iii` and downloads it on first use, so the "install iii console?" prompt on start and the `skipConsoleInstall` preference are gone; the ready panel now points at the command instead.+- **Durable capture** (#1460). Hooks send a stable event id with every observation (the host tool use id when present, otherwise a hash of the event). The server writes each event to a capture inbox before storing it, keeps completed ids for `AGENTMEMORY_CAPTURE_DEDUP_HOURS`, and answers a replay with the existing observation. Failed writes retry with backoff, also after a restart, and end as dead letters shown on `/status`, the viewer Health page and `GET /agentmemory/capture`, with `POST /agentmemory/capture/retry` to retry them.+- **Offline hook spool** (#1460, #1468). When the server is down, times out or returns a 5xx, hooks keep a copy of the observation in a bounded private spool under the data dir until the engine has saved it. The spool drains at boot and from the next hook that reaches the server. New: `agentmemory capture [--drain]` and `POST /agentmemory/capture/drain`.+- **Vector pending log** (#1467). Every vector added to or removed from the live index is also written to a small pending log. Boot replays it after the snapshot with 0 embedding calls, and whatever is still missing is re-embedded as a durable backlog that resumes after a restart instead of stopping at a 500 cap. `/status` and the viewer show the log size and a paused backfill.+- **Release gate** (#1463). `npm run release:gate` packs `@agentmemory/agentmemory` and `@agentmemory/mcp`, installs both tarballs into a clean home and runs named scenarios against the installed CLI: capture through the bundled hooks, offline capture recovered from the spool, replay dedup after a force kill, dead letters that survive a restart, vectors surviving a crash, stop and start, export and import, the MCP shim, the viewer and `/status`. A Release gate workflow runs it on Ubuntu and macOS.+- **Capture cost bench** (#1464). `npm run bench:capture-costs` measures disk bytes per state scope, engine and worker memory and CPU, hook latency, provider requests, agent-visible context bytes and force-kill recovery, with separate capture and recovery budgets in `benchmark/capture-costs-budgets.json` and a figure in `docs/benchmarks/capture-costs.svg`. Optional Ollama, Redis and crash-offline variants.+- **Codex plugin package** (#1459). The Codex plugin bundles a small stdio bridge that forwards tools, resources and prompts to the configured agentmemory daemon and reports connection errors instead of falling back to a separate store. Authenticated non-loopback connections require HTTPS. `npm run plugin:pack:codex` builds a local package with the six Codex hooks and a review package without lifecycle hooks, and `npm run plugin:verify:published` refuses a release whose runtime, MCP shim and iii versions do not match.+- **Rebuilt viewer that streams every page** (#1433, #1407). One snapshot on connect (`GET /agentmemory/viewer/snapshot`, `GET /agentmemory/counts`), then live `<entity>.created/updated/deleted` events with no polling. 12 tabs in four groups with live counts, deep links, keyboard shortcuts and a mobile menu, a memories detail panel with version chain, diff and provenance, sessions with an inline timeline, and a searchable graph. Cursor pagination and facets on memories, sessions and observations, `GET /graph/node` and `GET /observations/locate` back it.+- **`GET /agentmemory/status` and a Health tab in the viewer** (#1408). One report of what is wrong and how to fix it: providers and circuit breaker, failing functions, observations missing from the search index, index save state per leg (#1415), the state backend, graph compaction progress, capture inbox and spool, ports, the pinned engine version and every feature flag. HTML for browsers, JSON otherwise.+- **`GET /agentmemory/consolidation/status`** and a "Memory layers" panel (#1407).+- **Opt-in Redis backend for state and streams**: `AGENTMEMORY_STATE_BACKEND=file|redis` and `AGENTMEMORY_REDIS_URL` (#1425). Use one Redis server per instance, and move data with `agentmemory export` and `import` when switching.+- **`POST /agentmemory/graph/compact`** trims oversized node, edge, edge history and snapshot provenance in slices (#1454, carries #1445 by david-waltermire), and **`AGENTMEMORY_GRAPH_COMPACT_ON_BOOT`** runs it once after upgrade (#1455).+- **Stale session sweep**: `AGENTMEMORY_SESSION_SWEEP_ENABLED` and `AGENTMEMORY_SESSION_SWEEP_STALE_HOURS` (#1453, carries #1411 by cristianbdev).+- **Capture filters for hooks**: `AGENTMEMORY_CAPTURE_ALLOW`, `AGENTMEMORY_CAPTURE_DENY`, `AGENTMEMORY_CAPTURE_OUTPUT_MAX` (default 8000) and `AGENTMEMORY_PRE_COMPACT_BUDGET` (default 1500, 0 disables) (#1452, carries #994 by joyjit).+- **`AGENTMEMORY_AUDIT_INDEX_PERSIST`** (off by default) re-enables index persistence audit rows for debugging (#1182 by dmazhukov).+- **`AGENTMEMORY_AUDIT_RETENTION_MONTHS`** and **`AGENTMEMORY_AUDIT_MIGRATE_MAX_BYTES`** for the monthly audit log (#1419).+- **`AGENTMEMORY_STATE_SAVE_INTERVAL_MS`**, **`AGENTMEMORY_INDEX_SAVE_INTERVAL_MS`**, **`AGENTMEMORY_VECTOR_BUCKET_SIZE`**, **`AGENTMEMORY_VECTOR_BACKFILL`** and **`AGENTMEMORY_VIEWER_STREAM_MAX`** (#1457, #1415, #1416, #1420).+- **`agentmemory console`** launches the iii web console through the pinned engine; the "install iii console?" prompt and the `skipConsoleInstall` preference are gone (#1397).+- **Multi-instance installs**: `--instance N` gets its own port quartet, data directory and lifecycle state, and `--port` derives the other ports (#892).+- Procedures are extracted from finished sessions when consolidation is on and an LLM provider is configured (#1407).+- `memory_patterns` takes an optional `limit` (#1424). `POST /lessons` accepts `sourceIds`, and `mem::evolve` returns 409, 400 and 404 errors (#1433).+- **OpenCode 2 support in the OpenCode plugin** (#1476, building on #1451 by Tyxiel). One `agentmemory-capture.ts` serves both plugin APIs: OpenCode 2 loads its `setup()` entry and OpenCode 1.x keeps the existing hooks. On OpenCode 2 it captures prompts, tool calls with their output, the assistant's answer, step and compaction events, injects memory on every model call, and requests a summary when a run finishes. Checked in live sessions on OpenCode 2.0.24, 1.18.34 and 1.17.10.### Fixed-- **The "Memory elevated" alert no longer fires on a healthy process (#1406).** The health check divided the heap in use by the heap Node had allocated so far, which Node keeps just above what is in use, so a normal process read 90% or more and raised the alert once its memory passed 512 MB. The check now divides by the V8 heap limit, which is about 4 GB on 64-bit Node by default, and the viewer's Heap gauge shows used against that limit. The reported 589 of 629 MB is 14% of the limit and no longer alerts.-- **The viewer updates from the live stream instead of re-fetching, and stops blinking.** The dashboard used to wipe itself to "Loading dashboard..." and re-fetch everything on a 30 s timer and on every stream event; on an idle store that was 73 rebuilds and 20 requests a minute, and 21 live events cost 200 requests. The worker now pushes `session.updated`, `session.deleted`, `memory.updated` and `memory.deleted` on the `mem-live` viewer group next to the existing observation and `session.activity` events (which the viewer used to drop because it read the wrong field), and the viewer applies them to what is on screen: sessions, observation counts, session status and the memory total update with zero requests, redraws are batched to at most one every 250 ms and skipped when nothing changed. The 30 s timer is gone, no refresh path blanks a loaded view, and polling remains only as the fallback when the stream cannot connect (#921, #1340). The viewer now connects with the stream mode engine 0.22 serves first instead of failing twice on the other one. Live buffers on the Timeline and Activity tabs are capped at a few hundred entries so a large stream backlog cannot freeze the tab (#609). When the stream reconnects, the loaded views re-fetch once so changes made while it was down show up, and a list that was loading when live events arrived replays them, so a deleted session does not come back. Session counts no longer reload or blank the open session detail, bursts of memory events coalesce into one list reload, and with an isolated agent scope (`AGENT_ID` plus `AGENTMEMORY_AGENT_SCOPE=isolated`) the worker only pushes that agent's sessions and memories.-- **A failed dashboard refresh keeps the last data.** Panels that fail to refresh keep their previous values behind a "could not refresh" note instead of flipping to the new-install screen; a first load that cannot reach the API shows a retry button (#1340).-- **Dashboard numbers match the API.** The Memories card uses the server total instead of counting a capped list (#1279, #951), token savings only counts sessions that produced observations (#944), and the Graph Nodes card shows when its snapshot was taken.-- **Session summaries stored as objects render as text instead of `[object Object]`** (#1229), and tags stored as a comma-separated string no longer break the Actions, Lessons or Sessions views (#906).-- **`GET /agentmemory/memories` returns newest first**, so a `limit` page shows the latest memories rather than the oldest (#990).-- **Rebuild Graph asks before replaying the corpus**, ignores repeat clicks while it runs, and reports how many sessions, nodes and edges it produced (#1383).-- **The dashboard explains consolidation instead of showing three bare counters.** Semantic Memory, Procedural Memory and Consolidation Status are one "Memory layers" panel: each layer says what it is built from, how many items it holds, and whether it is off (with the exact setting to change), waiting (for example "3 of 5 session summaries needed"), ready, active with the last run's output, or failed with the error. The consolidation pipeline now stores each run's per-tier results, served at `GET /agentmemory/consolidation/status`.-- **Procedures are extracted from finished sessions.** Procedural memory only came from a cross-session pass that needs two pattern memories each seen in two or more sessions, so it stayed empty on almost every install, and `mem::skill-extract` (which turns one session with a summary and three or more observations into a procedure) had no caller. It now runs for the stopping session inside the existing consolidation cooldown, only when consolidation is on and an LLM provider is configured, so it adds at most one LLM call per cooldown window and none on keyless installs.-- **The viewer reconnects its live stream when the tab becomes visible again** after a sleep or network drop, instead of staying disconnected until a manual reload (#1370).-- **The search index snapshot is written continuously, not only on clean shutdown.** Every observation, compression result and memory save now schedules the debounced snapshot write, and bulk indexing (import, replay, rebuild) does the same. Before, the BM25/vector snapshot was written only by a graceful shutdown; after a crash, `kill -9` or power loss the worker booted the stale snapshot, skipped the rebuild because the snapshot was not empty, and every observation captured since the last clean stop stayed invisible to search for good. On boot the worker now also compares the loaded snapshot against each session's observation count and re-indexes whatever is missing. Re-adding an observation under an id that is already indexed (compression replacing the synthetic entry) now replaces the index document instead of stacking postings on top of the old ones.-- **Worker shutdown no longer hangs when the engine is already gone.** The SIGTERM handler waited on a state write that can never land while the SDK is reconnecting, so `agentmemory stop` had to SIGKILL an orphaned worker after its grace period. The final index flush and the SDK shutdown are now time-boxed at 4 s each, with a hard exit at 8 s, and open viewer connections are closed instead of awaited. `agentmemory stop` gives an orphaned worker that full budget before escalating to SIGKILL.+- **Repeated identical prompts are kept** (#1468). Hooks whose host sends no event id or time now include the hook timestamp in the id, so typing the same prompt twice stores it twice; retries still reuse the stored id.+- **Cursor prompts are stored once** (#1470). A per-session prompt ledger matches the session-end transcript back-fill against live captures, so a back-filled prompt is answered as a duplicate instead of stored a second time. Live prompts are never deduped by content.+- **Concurrent spool writers cannot overwrite each other** (#1468), and printed recovery commands (dead letter retry, spool drain, graph compact, the status page example) send the bearer token.+- **Graph provenance is bounded.** Each node and edge records only its own observation ids, capped at 32, which stops huge graph rows from crash-looping the worker during search (#1454, carries #1445 by david-waltermire).+- **Search skips graph retrieval when `AGENTMEMORY_GRAPH_WEIGHT=0`** (#1446 by david-waltermire).+- **A failed graph snapshot read no longer zeroes the snapshot**; the delta is aborted instead (#1384 by cbsincool).+- **The graph snapshot total can no longer be lower than the nodes it returns** (#1385 by cbsincool).+- **Ending an unknown session no longer creates a partial row** that hung the sessions listing (#1252 by a652).+- **Memories and vectors written just before `agentmemory stop` survive the restart** (#1449).+- **Forget and governance deletes count and audit only real deletions** (#1449).+- **Export refuses an oversized payload before assembling it** and the REST endpoint returns 413; the MCP shim surfaces the refusal (#1449, #1422).+- **Session and graph read-modify-write paths take locks**, closing lost updates when several agents share one daemon (#1421).+- **Hooks no longer exit before their observe request is sent** on a slow start (#1456).+- **A fresh vector index is checkpointed within 5 s** and observations keep a bounded, sanitized copy of their source for replay and export (#1448).+- **Runtime config is re-seeded on every start**, so `--port`, `--instance` and data-dir changes take effect after the first run (#1396, #1397).+- **The "Memory elevated" alert no longer fires on a healthy process** (#1409).+- **The viewer stops blinking and keeps data on a failed refresh**, and dashboard numbers match the API (#1407).+- Consolidation and provider detection use the same check, and functions that need an LLM show as off instead of failed (#1433).+- Worker shutdown no longer hangs when the engine is already gone (#1396).+- Fresh installs are portable and persistent, and native and Docker removal stops the worker before the engine (#892).+- **`OPENAI_EMBEDDING_API_KEY` is honored** when the embedding provider is auto-detected or chosen, and wins over `OPENAI_API_KEY`; blank keys count as unset (#1472).+- **SessionStart context reaches hosts that expect structured hook output.** When the hook input names the `SessionStart` event, context is returned as `hookSpecificOutput.additionalContext`; hosts that send no event name still get plain text (#1472).++### Security++- **Request hardening** (#1462, supersedes #878 by DaveCole and #922 by Srinath279). Auth on by default, origin and content type checks on writes, and confined file paths, as described under Breaking changes. Confined files are replaced only after the new content is fully written, and a destination that is a symlink is refused.+- **Scrubbing on every write** (#1462). Write functions run the secret scrubber on their input, and compression, summary, crystal, graph, replay, team share, session title, commit message and image description text is scrubbed before storage. New patterns cover PEM private key blocks and credentials in URLs. Stored text is escaped before it goes into the injected context block.+- **Clients resolve the API secret the same way as the server** (#1462): environment first, then `~/.agentmemory/.env`, then the generated secret file, and the stored secret is only sent to loopback URLs.+- **Supply chain** (#1461). The automatic engine installer verifies the downloaded archive against a SHA-256 pinned in the CLI for each platform before extracting it, and refuses an unpinned version or platform. `npm run engine:hashes` refreshes the pins. Installer paths reach the shell as arguments, so a home directory containing shell syntax is never evaluated. The CI workflow runs with read-only permissions, and the deploy Dockerfiles check that the copied iii binary matches `III_VERSION`.+- `GET /agentmemory/status` serves HTML with no scripts under a strict CSP and the same bearer auth as the rest of the API (#1408).+- The Redis URL stays out of files and output (#1425).+- `mem::governance-bulk` cannot widen a dry run to the whole store (#1449).+- The pinned engine starts with `--no-update-check` and iii's anonymous usage telemetry off (#1396).+- A profile read no longer writes a `share` audit entry (#1433).++### Performance++- **Vectors are stored per key in fill-and-roll buckets**, so a save rewrites a few buckets instead of the whole index and the store no longer hits V8's string limit at about 49,000 vectors (#1416).+- **Index saves are throttled and each leg reports its own state**, so one failing leg no longer skips the others (#1415).+- **The audit log lives in monthly scopes** read newest first (#1419).+- **Session start context and observation lookups use small secondary indexes** instead of listing every session (#1418).+- **`mem::remember` calls the embedding provider outside the global save lock** (#1423).+- **`mem::patterns` is bounded** to recent sessions and an observation budget (#1424).+- **Consolidation decay writes only rows that changed** (#1417).+- **The viewer stream backlog is bounded** (#1420).+- **Faster state saves**, `MALLOC_ARENA_MAX=2` for the engine on Linux, and a higher open-file limit in Docker and deploy entrypoints (#1457).++### Docs and internal++- **agent-memory.dev is rebuilt** around use cases and sourced proof: agent sessions showing what memory changes, a view of the 1,571 tokens the next session gets out of a month of history, live GitHub and all-time npm numbers, and new /benchmarks, /security, /privacy, /changelog and /vs comparison pages. It ships robots.txt, a sitemap, llms.txt and llms-full.txt, and link previews now point at agent-memory.dev instead of a parked domain.+- `npm run docs:sync` and `npm run docs:check` keep the documented counts and versions in README, the translated READMEs and AGENTS.md in step with the code.+- The README documents auth by default, request rules, file path roots, the capture inbox and spool, and the pending vector log (#1460, #1462, #1467).+- The README, the config skill reference and `agentmemory --help` document `AGENTMEMORY_III_CONFIG` and the engine bind address, including the Docker engine config (#1472).+- Code and tests no longer cite issue or PR numbers (#1469).+- The `index_persist` audit gating suite is restored against bucketed persistence and monthly audit scopes (#1477), originally written by dmazhukov in #1182.+- Unit tests grew from about 1,700 to more than 2,400.+- Dependabot no longer proposes `iii-sdk` bumps; the engine pin and the SDK move together by hand (#1396). `dotenv` 18.0.3 (#1430) and `@types/node` 26.6.2 (#1401, #1400).+- The deploy Dockerfiles refuse to build when `III_VERSION` and `III_SDK_VERSION` differ (#1396).+- Thanks to MarvinFS (discussion #1358), inix-x, sbynode-ux, ErikBPF and cmondragon023, whose measurements and earlier PRs shaped the scaling work.## [0.9.29] — 2026-08-16@@ -168,6 +261,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.30]: https://github.com/rohitg00/agentmemory/compare/v0.9.29...v0.9.30[0.9.29]: https://github.com/rohitg00/agentmemory/compare/v0.9.28...v0.9.29[0.9.28]: https://github.com/rohitg00/agentmemory/compare/v0.9.27...v0.9.28[0.9.27]: https://github.com/rohitg00/agentmemory/compare/v0.9.26...v0.9.27diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 7a9a8e45..6e58c49d 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -93,16 +93,7 @@ PRs with commits lacking sign-off will not merge.## Release process-Maintainers cut releases. Every bump touches these files in lockstep (the consistency tests fail if the trio of doc counts or any version drifts):--1. `package.json`-2. `src/version.ts`-3. `plugin/.claude-plugin/plugin.json`-4. `plugin/plugin.json`-5. `plugin/.codex-plugin/plugin.json`-6. `packages/mcp/package.json`-7. `src/types.ts` (`ExportData.version` union)-8. `src/functions/export-import.ts` (`supportedVersions` Set)+Maintainers cut releases. To bump the version, change only `package.json`, then run `npm run docs:sync`. It carries the new version into `src/version.ts`, the `ExportData.version` union in `src/types.ts`, the `supportedVersions` set in `src/functions/export-import.ts`, every plugin and package manifest that shared the old version, the deploy templates, the AGENTS.md stats heading, and CHANGELOG.md (the Unreleased section becomes the new version with today's date and its compare link). Commit everything it changes, and check with `npm run docs:check`.No lockfiles are committed. `test/export-import.test.ts` asserts against the `VERSION` constant, so it needs no per-release edit. Run `npm run skills:gen` if the endpoint or env surface changed.diff --git a/README.md b/README.mdindex 71235b98..324636bc 100644--- a/README.md+++ b/README.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-hooks.svg"><img src="assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-deps.svg"><img src="assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -611,31 +611,33 @@ codex plugin add agentmemory@agentmemoryThe Codex plugin ships from the same `plugin/` directory as the Claude Code plugin. It registers:-- `@agentmemory/mcp` as an MCP server (proxies all 54 tools when `AGENTMEMORY_URL` points at a running agentmemory server; falls back to 7 tools locally when no server is reachable)+- A bundled stdio MCP bridge to the running daemon, with no npm download or fallback store. See the [local Codex guide](docs/plugins/codex-local.md) to test an unreleased build.- 6 lifecycle hooks: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `Stop`- 9 invocable skills: `/recall`, `/remember`, `/session-history`, `/forget`, `/recap`, `/handoff`, `/lesson`, `/commit-context`, `/commit-history`, plus 8 reference skills the agent loads on demand (memory discipline, MCP tools, REST API, config, agents, hooks, architecture, and the skill-authoring guide)Codex's hook engine injects `CLAUDE_PLUGIN_ROOT` into hook subprocesses (per [`codex-rs/hooks/src/engine/discovery.rs`](https://github.com/openai/codex/blob/main/codex-rs/hooks/src/engine/discovery.rs)), so the same hook scripts work across both hosts without duplication. Subagent / SessionEnd / Notification / TaskCompleted / PostToolUseFailure events are Claude-Code-only and are not registered for Codex.-#### Codex Desktop: plugin hooks currently silent (workaround available)+#### Codex hook trust and compatibility-`CodexHooks` and `PluginHooks` are both stable + default-enabled in [`codex-rs/features/src/lib.rs`](https://github.com/openai/codex/blob/main/codex-rs/features/src/lib.rs), but Codex Desktop builds currently do not dispatch plugin-local `hooks.json` ([openai/codex#16430](https://github.com/openai/codex/issues/16430)). MCP tools still work; only the lifecycle observations are missing.+Native plugin hook dispatch is verified with Codex CLI 0.150.1. Trust the plugin hooks before expecting capture. Desktop behavior depends on its bundled runtime; check `/hooks` and confirm a captured event before enabling a workaround.-Until upstream lands the fix, mirror the same hook commands into the global `~/.codex/hooks.json`:+If your host requires global hooks, mirror the commands into `~/.codex/hooks.json`. When MCP is already wired, the current connector needs `--force` to reach hook installation:```bash-agentmemory connect codex --with-hooks+agentmemory connect codex --with-hooks --force```-This adds an idempotent block to `~/.codex/hooks.json` referencing absolute paths to the bundled scripts (no `${CLAUDE_PLUGIN_ROOT}` expansion needed at user-scope). Re-run the same command after upgrading agentmemory to refresh paths. User entries in the same file are preserved; only previous agentmemory entries are replaced.+This merges global hooks and rewrites the agentmemory MCP entry, preserving unrelated entries. Review any custom agentmemory endpoint settings before using `--force`. Re-run after upgrading to refresh script paths. Enable either native plugin hooks or global copies to avoid duplicate capture.### GitHub Copilot CLI+For VS Code agent mode, use the [Copilot MCP and automatic-capture guide](docs/plugins/copilot.md#vs-code-copilot-local-agent-sessions). The CLI connector does not configure VS Code.+```bash# MCP-only wiringagentmemory connect copilot-cli-# Full hooks/skills plugin from the GitHub subdir+# Alternatively, full hooks/skills plugin from the GitHub subdircopilot plugin install rohitg00/agentmemory:plugin```@@ -739,14 +741,14 @@ The agentmemory entry is the **same MCP server block** across every host that us| **GitHub Copilot CLI (full plugin)** | Copilot plugin install | `copilot plugin install rohitg00/agentmemory:plugin` for the plugin from the GitHub subdir. || **OpenClaw** | OpenClaw MCP config | Same `mcpServers` block. Deeper: `openclaw plugins install ./integrations/openclaw` claims OpenClaw's memory slot (auto-switches from `memory-core`); set `plugins.entries.agentmemory.hooks.allowConversationAccess=true` or turn capture is silently blocked. See [`integrations/openclaw`](integrations/openclaw/). || **Codex CLI (MCP only)** | `.codex/config.toml` | TOML shape: `codex mcp add agentmemory -- npx -y @agentmemory/mcp`, or add `[mcp_servers.agentmemory]` manually. |-| **Codex CLI (full plugin)** | Codex plugin marketplace | `codex plugin marketplace add rohitg00/agentmemory` then `codex plugin add agentmemory@agentmemory`. Registers MCP + 6 lifecycle hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, Stop) + 17 skills. On Codex Desktop, also run `agentmemory connect codex --with-hooks` until [openai/codex#16430](https://github.com/openai/codex/issues/16430) lands; plugin hooks are currently silent there. |+| **Codex CLI (full plugin)** | Codex plugin marketplace | `codex plugin marketplace add rohitg00/agentmemory` then `codex plugin add agentmemory@agentmemory`. Registers MCP + 6 lifecycle hooks + 17 skills. Trust hooks and verify capture in your host; see [Codex setup and validation](docs/plugins/codex-local.md). || **OpenCode (MCP only)** | `opencode.json` | Different shape: top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}`. || **OpenCode (full plugin)** | `plugin/opencode/` | 22 auto-capture hooks covering session lifecycle, messages, tools, errors. Project attribution is per-session, so one OpenCode process spanning several repositories files each session under its own project. Two slash commands (`/recall`, `/remember`). Copy `plugin/opencode/` into your OpenCode workspace and add the plugin entry to `opencode.json`. See [`plugin/opencode/README.md`](plugin/opencode/README.md) for the full hook table + gap analysis. || **pi** | `~/.pi/agent/extensions/agentmemory` | `agentmemory connect pi` installs the bundled extension into pi's auto-discovery directory (recall on agent start, capture on agent end, `memory_search` / `memory_save` / `memory_health` tools, `/agentmemory-status`). `/reload` in a running pi picks it up. [`integrations/pi`](integrations/pi/) is also a pi package (`pi install ./integrations/pi` from a checkout). || **Hermes Agent** | `~/.hermes/config.yaml` | `cp -r integrations/hermes ~/.hermes/plugins/agentmemory` + `memory.provider: agentmemory` gives the 6-hook memory provider (prefetch, turn capture, session end, pre-compress, MEMORY.md mirroring, system prompt block). Validate with `hermes plugins doctor` and `hermes memory status`. See [`integrations/hermes`](integrations/hermes/). || **Qwen Code** | `~/.qwen/settings.json` | `agentmemory connect qwen` writes the standard `mcpServers` block. Hook payload is field-compatible with Claude Code, so the existing 12-hook scripts work without modification; wire them via the `hooks` section in the same `settings.json`. |-| **Antigravity** (replaces Gemini CLI) | `mcp_config.json` (in Antigravity's User dir) | `agentmemory connect antigravity` writes the standard `mcpServers` block. macOS: `~/Library/Application Support/Antigravity/User/`. Linux: `~/.config/Antigravity/User/`. Use after the 2026-06-18 Gemini CLI sunset. |-| **Antigravity CLI** (`agy`) | `~/.gemini/config/mcp_config.json` | `agentmemory connect antigravity-cli`. The `agy` CLI keeps its own config under `~/.gemini/`, separate from the Antigravity IDE above. Pass `--with-hooks` for native auto-capture via `~/.gemini/config/hooks.json`. |+| **Antigravity IDE / 2.0** | `~/.gemini/config/mcp_config.json` | `agentmemory connect antigravity --with-hooks` installs MCP and capture hooks in the shared customization directory. See [Antigravity setup and limits](docs/plugins/antigravity.md). |+| **Antigravity CLI** (`agy`) | `~/.gemini/config/mcp_config.json` | `agentmemory connect antigravity-cli --with-hooks` uses the same MCP and hook configuration as current IDE versions. Existing installations should refresh with `--force`; see the [upgrade notes](docs/plugins/antigravity.md). || **Kiro** | `~/.kiro/settings/mcp.json` | `agentmemory connect kiro` writes the user-level config. Workspace overrides go in `.kiro/settings/mcp.json` next to your code. || **Warp** | `~/.warp/.mcp.json` | `agentmemory connect warp` writes the standard `mcpServers` block. Warp also auto-discovers skills from `.claude/skills/`; once the Claude Code plugin is installed the 8 agentmemory skills (`remember`, `recall`, `recap`, `handoff`, `forget`, `commit-context`, `commit-history`, `session-history`) appear natively in Warp's slash-command palette. || **Cline (CLI)** | `~/.cline/mcp.json` | `agentmemory connect cline` writes the standard `mcpServers` block. VS Code extension users: paste the same block via Cline Settings → MCP Servers → Edit JSON. |@@ -1190,7 +1192,14 @@ cp plugin/opencode/commands/*.md ~/.config/opencode/commands/<h2 id="real-time-viewer"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-viewer.svg"><img src="assets/tags/section-viewer.svg" alt="Real-Time Viewer" height="32" /></picture></h2>-Auto-starts on port `3113`. Live observation stream with a stream status indicator, a two-pane session explorer (list beside a sticky detail panel on wide screens), memory and lesson rows that expand to the full stored record including raw JSON and origin provenance, a knowledge graph that clusters nodes by type while relations are sparse, session replay, and a health dashboard.+Auto-starts on port `3113`. The viewer loads one snapshot when it connects (`GET /agentmemory/viewer/snapshot`) and then applies live stream events: new memories, lessons, observations, audit entries, graph changes and health updates appear without polling or page reloads. The only other requests are the actions you click, "load more" pages and searches. When the stream drops, the viewer shows how old its numbers are, reconnects with backoff and resyncs from one snapshot.++- **12 tabs in four groups** with live counts, deep links (`#memories/<id>`, `#sessions/<id>?obs=<id>`, `#graph/<id>`, `#health/consolidation`), keyboard shortcuts and a mobile menu.+- **Memories:** server-side search, filters by project, agent and type, a detail panel with the version chain and a word diff, provenance links, copy buttons for the id, the MCP call and a curl command, edit (a new version), forget with confirmation, bulk forget and JSON export.+- **Sessions:** an inline observation timeline with readable tool input and output, filters and paging, and the memories and lessons each session produced.+- **Graph:** search, node detail with relations and sources, a legend that does not rely on colour alone, and zoom controls.+- **Health:** the live version of `GET /agentmemory/status`. Every problem comes with its fix, plus the state backend, index save state, graph provenance compaction progress and a consolidation explainer with the real thresholds.+- **Audit, Activity, Profile, Replay, Lessons, Actions and Crystals** pages, each with an empty state that says what the section is, why it is empty and the command that fills it, and a `?` glossary tooltip on every term and number.```bashopen http://localhost:3113@@ -1377,7 +1386,7 @@ fi| Prometheus / Grafana | iii OTEL + health monitor || Custom plugin systems | `iii worker add <name>` |-**184 source files · ~42,200 LOC · 1,674 tests · 264 functions · 50 KV scopes**, all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself.+**219 source files · ~52,000 LOC · 2,500+ tests · 311 functions · 60 KV scopes**, all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself.---@@ -1677,6 +1686,36 @@ Create `~/.agentmemory/.env`:# CLAUDE_MEMORY_BRIDGE=false# SNAPSHOT_ENABLED=false+# Storage and durability+# AGENTMEMORY_STATE_BACKEND=file # file (default) or redis; see "Storage backend" below+# AGENTMEMORY_REDIS_URL=redis://localhost:6379 # Required with redis, plain redis:// only+# AGENTMEMORY_STATE_SAVE_INTERVAL_MS=2000 # How often the engine writes file state to disk.+ # A hard kill loses at most this window.+# AGENTMEMORY_INDEX_SAVE_INTERVAL_MS=600000 # Minimum time between search index saves;+ # shutdown and deletes still save at once.+# AGENTMEMORY_GRAPH_COMPACT_ON_BOOT=true # One-time background trim of oversized graph+ # provenance; false skips it++# Sessions+# AGENTMEMORY_SESSION_SWEEP_ENABLED=true # Hourly sweep marks sessions left active past+ # the threshold as abandoned. Deletes nothing;+ # new activity makes the session active again.+# AGENTMEMORY_SESSION_SWEEP_STALE_HOURS=24++# Capture filters (hooks)+# AGENTMEMORY_CAPTURE_ALLOW= # Comma or space list of tool names or globs;+ # when set, only these tools are captured+# AGENTMEMORY_CAPTURE_DENY= # Extra names or globs to skip, added to the+ # defaults: memory_*, toolsearch,+ # listmcpresources, fetchmcpresource+# AGENTMEMORY_CAPTURE_OUTPUT_MAX=8000 # Max characters of tool output per observation+# AGENTMEMORY_PRE_COMPACT_BUDGET=1500 # Token budget for PreCompact context; 0 disables++# Audit log+# AGENTMEMORY_AUDIT_RETENTION_MONTHS=0 # Drop month scopes older than N months; 0 keeps all+# AGENTMEMORY_AUDIT_INDEX_PERSIST=false # 1 or true records index migration and cleanup+ # rows (debugging only)+# Team# TEAM_ID=# USER_ID=@@ -1710,6 +1749,8 @@ curl -H "Authorization: Bearer $(cat ~/.agentmemory/secret)" http://localhost:31| Method | Path | Description ||--------|------|-------------|| `GET` | `/agentmemory/health` | Health check (always public) |+| `GET` | `/agentmemory/status` | What is wrong and how to fix it (HTML for browsers, JSON otherwise) |+| `GET` | `/agentmemory/viewer/snapshot` | Everything the viewer shows, in one response || `POST` | `/agentmemory/session/start` | Start session + get context || `POST` | `/agentmemory/session/end` | End session || `POST` | `/agentmemory/observe` | Capture observation (see capture delivery below) |@@ -1769,7 +1810,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Content-Type: a```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (requires running services)```diff --git a/READMEs/README.de-DE.md b/READMEs/README.de-DE.mdindex 02631d18..4b03c739 100644--- a/READMEs/README.de-DE.md+++ b/READMEs/README.de-DE.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1227,7 +1227,7 @@ Volle Registry: [workers.iii.dev](https://workers.iii.dev). Jeder Worker dort ko| Prometheus / Grafana | iii OTEL + Health-Monitor || Eigene Plugin-Systeme | `iii worker add <name>` |-**182 Quelldateien · ~41.600 LOC · 1.674 Tests · 264 Funktionen · 50 KV-Scopes**, alles auf drei Primitiven. Kein `agentmemory plugin install`. Das Plugin-System ist iii selbst.+**219 Quelldateien · ~52.000 LOC · 2.500+ Tests · 311 Funktionen · 60 KV-Scopes**, alles auf drei Primitiven. Kein `agentmemory plugin install`. Das Plugin-System ist iii selbst.---@@ -1526,7 +1526,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-124 Endpunkte auf Port `3111`. Die REST API bindet sich standardmäßig an `127.0.0.1`. Geschützte Endpunkte verlangen `Authorization: Bearer <secret>`, wenn `AGENTMEMORY_SECRET` gesetzt ist, und Mesh-Sync-Endpunkte erfordern `AGENTMEMORY_SECRET` auf beiden Peers.+138 Endpunkte auf Port `3111`. Die REST API bindet sich standardmäßig an `127.0.0.1`. Geschützte Endpunkte verlangen `Authorization: Bearer <secret>`, und Mesh-Sync-Endpunkte erfordern ein explizit gesetztes `AGENTMEMORY_SECRET` auf beiden Peers.<details><summary>Wichtige Endpunkte</summary>@@ -1560,7 +1560,7 @@ Volle Endpunktliste: [`src/triggers/api.ts`](../src/triggers/api.ts)```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (requires running services)```diff --git a/READMEs/README.es-ES.md b/READMEs/README.es-ES.mdindex a01a1618..f2ab5082 100644--- a/READMEs/README.es-ES.md+++ b/READMEs/README.es-ES.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1220,7 +1220,7 @@ Registro completo: [workers.iii.dev](https://workers.iii.dev). Cada worker allí| Prometheus / Grafana | iii OTEL + monitor de salud || Sistemas de plugins propios | `iii worker add <name>` |-**182 ficheros de código · ~41.600 LOC · 1.674 tests · 264 funciones · 50 scopes KV**, todo sobre tres primitivos. No hay `agentmemory plugin install`. El sistema de plugins es iii mismo.+**219 ficheros de código · ~52.000 LOC · 2.500+ tests · 311 funciones · 60 scopes KV**, todo sobre tres primitivos. No hay `agentmemory plugin install`. El sistema de plugins es iii mismo.---@@ -1519,7 +1519,7 @@ Crea `~/.agentmemory/.env`:<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-124 endpoints en el puerto `3111`. La REST API se enlaza a `127.0.0.1` por defecto. Los endpoints protegidos requieren `Authorization: Bearer <secret>` cuando `AGENTMEMORY_SECRET` está definido, y los endpoints de mesh sync requieren `AGENTMEMORY_SECRET` en ambos peers.+138 endpoints en el puerto `3111`. La REST API se enlaza a `127.0.0.1` por defecto. Los endpoints protegidos requieren `Authorization: Bearer <secret>`, y los endpoints de mesh sync requieren un `AGENTMEMORY_SECRET` definido explícitamente en ambos peers.<details><summary>Endpoints principales</summary>@@ -1553,7 +1553,7 @@ Lista completa de endpoints: [`src/triggers/api.ts`](../src/triggers/api.ts)```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (requires running services)```diff --git a/READMEs/README.fr-FR.md b/READMEs/README.fr-FR.mdindex 7261aea4..d12fc29a 100644--- a/READMEs/README.fr-FR.md+++ b/READMEs/README.fr-FR.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1227,7 +1227,7 @@ Registre complet : [workers.iii.dev](https://workers.iii.dev). Chaque worker là| Prometheus / Grafana | iii OTEL + moniteur de santé || Systèmes de plugins personnalisés | `iii worker add <name>` |-**182 fichiers sources · ~41 600 LOC · 1 619 tests · 264 fonctions · 50 scopes KV**, tout sur trois primitives. Pas de `agentmemory plugin install`. Le système de plugins, c'est iii lui-même.+**219 fichiers sources · ~52 000 LOC · 2 500+ tests · 311 fonctions · 60 scopes KV**, tout sur trois primitives. Pas de `agentmemory plugin install`. Le système de plugins, c'est iii lui-même.---@@ -1526,7 +1526,7 @@ Créez `~/.agentmemory/.env` :<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-124 endpoints sur le port `3111`. L'API REST se lie à `127.0.0.1` par défaut. Les endpoints protégés exigent `Authorization: Bearer <secret>` lorsque `AGENTMEMORY_SECRET` est défini, et les endpoints de mesh sync exigent `AGENTMEMORY_SECRET` sur les deux pairs.+138 endpoints sur le port `3111`. L'API REST se lie à `127.0.0.1` par défaut. Les endpoints protégés exigent `Authorization: Bearer <secret>`, et les endpoints de mesh sync exigent un `AGENTMEMORY_SECRET` défini explicitement sur les deux pairs.<details><summary>Endpoints clés</summary>@@ -1560,7 +1560,7 @@ Liste complète des endpoints : [`src/triggers/api.ts`](../src/triggers/api.ts)```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (requires running services)```diff --git a/READMEs/README.hi-IN.md b/READMEs/README.hi-IN.mdindex aa959dd3..08013d8d 100644--- a/READMEs/README.hi-IN.md+++ b/READMEs/README.hi-IN.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1209,7 +1209,7 @@ Full registry: [workers.iii.dev](https://workers.iii.dev)। वहाँ हर| Prometheus / Grafana | iii OTEL + health monitor || Custom plugin systems | `iii worker add <name>` |-**184 source files · ~42,200 LOC · 1,674 tests · 264 functions · 50 KV scopes**, सब कुछ तीन primitives पर। कोई `agentmemory plugin install` नहीं। Plugin system iii स्वयं है।+**219 source files · ~52,000 LOC · 2,500+ tests · 311 functions · 60 KV scopes**, सब कुछ तीन primitives पर। कोई `agentmemory plugin install` नहीं। Plugin system iii स्वयं है।---@@ -1508,7 +1508,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-Port `3111` पर 124 endpoints। REST API default रूप से `127.0.0.1` से bind होता है। `AGENTMEMORY_SECRET` set होने पर protected endpoints `Authorization: Bearer <secret>` की आवश्यकता रखते हैं, और mesh sync endpoints दोनों peers पर `AGENTMEMORY_SECRET` की आवश्यकता रखते हैं।+Port `3111` पर 138 endpoints। REST API default रूप से `127.0.0.1` से bind होता है। Protected endpoints `Authorization: Bearer <secret>` की आवश्यकता रखते हैं, और mesh sync endpoints दोनों peers पर स्पष्ट रूप से set किए गए `AGENTMEMORY_SECRET` की आवश्यकता रखते हैं।<details><summary>मुख्य endpoints</summary>@@ -1542,7 +1542,7 @@ Full endpoint list: [`src/triggers/api.ts`](../src/triggers/api.ts)```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (running services की आवश्यकता है)```diff --git a/READMEs/README.ja-JP.md b/READMEs/README.ja-JP.mdindex 0badfa5c..4efde4f5 100644--- a/READMEs/README.ja-JP.md+++ b/READMEs/README.ja-JP.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1230,7 +1230,7 @@ iii worker add mcp # agentmemory MCP の横に汎用 MCP ホス| Prometheus / Grafana | iii OTEL + ヘルスモニタ || カスタムプラグインシステム | `iii worker add <name>` |-**182 ソースファイル · ~41,600 LOC · 1,619 テスト · 264 functions · 50 KV スコープ** — すべて 3 つのプリミティブの上に。`agentmemory plugin install` はありません。プラグインシステムは iii そのものです。+**219 ソースファイル · ~52,000 LOC · 2,500+ テスト · 311 functions · 60 KV スコープ** — すべて 3 つのプリミティブの上に。`agentmemory plugin install` はありません。プラグインシステムは iii そのものです。---@@ -1529,7 +1529,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-ポート `3111` 上の 124 エンドポイント。REST API はデフォルトで `127.0.0.1` にバインドします。`AGENTMEMORY_SECRET` が設定されている場合、保護されたエンドポイントは `Authorization: Bearer <secret>` を要求し、mesh sync エンドポイントは両ピアで `AGENTMEMORY_SECRET` を要求します。+ポート `3111` 上の 138 エンドポイント。REST API はデフォルトで `127.0.0.1` にバインドします。保護されたエンドポイントは `Authorization: Bearer <secret>` を要求し、mesh sync エンドポイントは両ピアで明示的に設定された `AGENTMEMORY_SECRET` を要求します。<details><summary>主要エンドポイント</summary>@@ -1563,7 +1563,7 @@ CONSOLIDATION_ENABLED=true```bashnpm run dev # ホットリロードnpm run build # 本番ビルド-npm test # 1,619 テスト+npm test # 2,500+ テストnpm run test:integration # API テスト(サービス起動が必要)```diff --git a/READMEs/README.ko-KR.md b/READMEs/README.ko-KR.mdindex 1c3ae696..d6c0cad1 100644--- a/READMEs/README.ko-KR.md+++ b/READMEs/README.ko-KR.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1209,7 +1209,7 @@ iii worker add mcp # generic MCP host alongside the agentmemory| Prometheus / Grafana | iii OTEL + 헬스 모니터 || 사용자 정의 플러그인 시스템 | `iii worker add <name>` |-**182개 소스 파일 · ~41,600 LOC · 1,674 tests · 264개 함수 · 50개 KV 스코프**, 모두 세 가지 프리미티브 위에. `agentmemory plugin install`이 없습니다. 플러그인 시스템은 iii 자체입니다.+**219개 소스 파일 · ~52,000 LOC · 2,500+ tests · 311개 함수 · 60개 KV 스코프**, 모두 세 가지 프리미티브 위에. `agentmemory plugin install`이 없습니다. 플러그인 시스템은 iii 자체입니다.---@@ -1508,7 +1508,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-`3111` 포트의 124개 엔드포인트. REST API는 기본적으로 `127.0.0.1`에 바인딩됩니다. 보호된 엔드포인트는 `AGENTMEMORY_SECRET`이 설정되었을 때 `Authorization: Bearer <secret>`를 요구하며, mesh sync 엔드포인트는 양쪽 피어 모두에서 `AGENTMEMORY_SECRET`을 요구합니다.+`3111` 포트의 138개 엔드포인트. REST API는 기본적으로 `127.0.0.1`에 바인딩됩니다. 보호된 엔드포인트는 `Authorization: Bearer <secret>`를 요구하며, mesh sync 엔드포인트는 양쪽 피어 모두에서 명시적으로 설정된 `AGENTMEMORY_SECRET`을 요구합니다.<details><summary>주요 엔드포인트</summary>@@ -1542,7 +1542,7 @@ CONSOLIDATION_ENABLED=true```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (requires running services)```diff --git a/READMEs/README.pt-BR.md b/READMEs/README.pt-BR.mdindex 0dc6643d..49182ae6 100644--- a/READMEs/README.pt-BR.md+++ b/READMEs/README.pt-BR.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1220,7 +1220,7 @@ Registry completo: [workers.iii.dev](https://workers.iii.dev). Todo worker lá s| Prometheus / Grafana | iii OTEL + monitor de saúde || Sistemas de plugin customizados | `iii worker add <name>` |-**182 arquivos de código · ~41.600 LOC · 1.674 tests · 264 funções · 50 escopos KV**, tudo em cima de três primitivos. Sem `agentmemory plugin install`. O sistema de plugins é o próprio iii.+**219 arquivos de código · ~52.000 LOC · 2.500+ tests · 311 funções · 60 escopos KV**, tudo em cima de três primitivos. Sem `agentmemory plugin install`. O sistema de plugins é o próprio iii.---@@ -1519,7 +1519,7 @@ Crie `~/.agentmemory/.env`:<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-124 endpoints na porta `3111`. A REST API faz bind em `127.0.0.1` por padrão. Endpoints protegidos exigem `Authorization: Bearer <secret>` quando `AGENTMEMORY_SECRET` está definido, e endpoints de mesh sync exigem `AGENTMEMORY_SECRET` em ambos os peers.+138 endpoints na porta `3111`. A REST API faz bind em `127.0.0.1` por padrão. Endpoints protegidos exigem `Authorization: Bearer <secret>`, e endpoints de mesh sync exigem um `AGENTMEMORY_SECRET` definido explicitamente em ambos os peers.<details><summary>Endpoints principais</summary>@@ -1553,7 +1553,7 @@ Lista completa de endpoints: [`src/triggers/api.ts`](../src/triggers/api.ts)```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (requires running services)```diff --git a/READMEs/README.ru-RU.md b/READMEs/README.ru-RU.mdindex f41b0207..604277a6 100644--- a/READMEs/README.ru-RU.md+++ b/READMEs/README.ru-RU.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1227,7 +1227,7 @@ iii worker add mcp # generic MCP host alongside the agentmemory| Prometheus / Grafana | iii OTEL + монитор состояния || Самописные плагинные системы | `iii worker add <name>` |-**182 исходных файла · ~41 600 LOC · 1 619 тестов · 264 функции · 50 KV-scope'ов** — всё на трёх примитивах. Никакого `agentmemory plugin install`. Плагинная система — это сам iii.+**219 исходных файла · ~52 000 LOC · 2 500+ тестов · 311 функции · 60 KV-scope'ов** — всё на трёх примитивах. Никакого `agentmemory plugin install`. Плагинная система — это сам iii.---@@ -1526,7 +1526,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-124 эндпоинта на порту `3111`. REST API по умолчанию слушает на `127.0.0.1`. Защищённые эндпоинты требуют `Authorization: Bearer <secret>`, когда установлен `AGENTMEMORY_SECRET`, а эндпоинты mesh-синхронизации требуют `AGENTMEMORY_SECRET` на обоих узлах.+138 эндпоинта на порту `3111`. REST API по умолчанию слушает на `127.0.0.1`. Защищённые эндпоинты требуют `Authorization: Bearer <secret>`, а эндпоинты mesh-синхронизации требуют явно заданного `AGENTMEMORY_SECRET` на обоих узлах.<details><summary>Ключевые эндпоинты</summary>@@ -1560,7 +1560,7 @@ CONSOLIDATION_ENABLED=true```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API tests (requires running services)```diff --git a/READMEs/README.tr-TR.md b/READMEs/README.tr-TR.mdindex ae7923d5..ca1df27b 100644--- a/READMEs/README.tr-TR.md+++ b/READMEs/README.tr-TR.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1229,7 +1229,7 @@ Tam kayıt defteri: [workers.iii.dev](https://workers.iii.dev). Oradaki her work| Prometheus / Grafana | iii OTEL + sağlık monitörü || Özel eklenti sistemleri | `iii worker add <name>` |-**182 kaynak dosya · ~41,600 LOC · 1,619 test · 264 fonksiyon · 50 KV scope**, hepsi üç primitif üzerinde. `agentmemory plugin install` yok. Eklenti sistemi iii'nin kendisi.+**219 kaynak dosya · ~52,000 LOC · 2,500+ test · 311 fonksiyon · 60 KV scope**, hepsi üç primitif üzerinde. `agentmemory plugin install` yok. Eklenti sistemi iii'nin kendisi.---@@ -1528,7 +1528,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-`3111` portunda 124 endpoint. REST API varsayılan olarak `127.0.0.1`'e bağlanır. `AGENTMEMORY_SECRET` ayarlandığında korumalı endpoint'ler `Authorization: Bearer <secret>` gerektirir ve mesh sync endpoint'leri her iki eşte de `AGENTMEMORY_SECRET` gerektirir.+`3111` portunda 138 endpoint. REST API varsayılan olarak `127.0.0.1`'e bağlanır. Korumalı endpoint'ler `Authorization: Bearer <secret>` gerektirir ve mesh sync endpoint'leri her iki eşte de açıkça ayarlanmış bir `AGENTMEMORY_SECRET` gerektirir.<details><summary>Önemli endpoint'ler</summary>@@ -1562,7 +1562,7 @@ Tam endpoint listesi: [`src/triggers/api.ts`](../src/triggers/api.ts)```bashnpm run dev # Hot reloadnpm run build # Production build-npm test # 1,674 tests+npm test # 2,500+ testsnpm run test:integration # API testleri (çalışan servisler gerektirir)```diff --git a/READMEs/README.zh-CN.md b/READMEs/README.zh-CN.mdindex 7f7c8a03..2a0c590d 100644--- a/READMEs/README.zh-CN.md+++ b/READMEs/README.zh-CN.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1226,7 +1226,7 @@ iii worker add mcp # 在 agentmemory 的 MCP 旁开通用 MCP| Prometheus / Grafana | iii OTEL + 健康监控 || 自定义插件系统 | `iii worker add <name>` |-**182 个源文件 · ~41,600 行代码 · 1,619 个测试 · 264 个函数 · 50 个 KV 作用域**,全部基于三种原语。没有 `agentmemory plugin install`。插件系统就是 iii 本身。+**219 个源文件 · ~52,000 行代码 · 2,500+ 个测试 · 311 个函数 · 60 个 KV 作用域**,全部基于三种原语。没有 `agentmemory plugin install`。插件系统就是 iii 本身。---@@ -1525,7 +1525,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-端口 `3111` 上的 124 个端点。REST API 默认绑定 `127.0.0.1`。当 `AGENTMEMORY_SECRET` 已设置时,受保护端点需要 `Authorization: Bearer <secret>`,网状同步端点要求两端都设置 `AGENTMEMORY_SECRET`。+端口 `3111` 上的 138 个端点。REST API 默认绑定 `127.0.0.1`。受保护端点需要 `Authorization: Bearer <secret>`,网状同步端点要求两端都显式设置 `AGENTMEMORY_SECRET`。<details><summary>关键端点</summary>@@ -1559,7 +1559,7 @@ CONSOLIDATION_ENABLED=true```bashnpm run dev # 热重载npm run build # 生产构建-npm test # 1,619 测试+npm test # 2,500+ 测试npm run test:integration # API 测试(需要服务运行中)```diff --git a/READMEs/README.zh-TW.md b/READMEs/README.zh-TW.mdindex bf7362d3..f82a3dd6 100644--- a/READMEs/README.zh-TW.md+++ b/READMEs/README.zh-TW.md@@ -50,7 +50,7 @@<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-hooks.svg"><img src="../assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-deps.svg"><img src="../assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>- <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>+ <picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tests.svg"><img src="../assets/tags/stat-tests.svg" alt="2,500+ tests passing" height="38" /></picture></p><p align="center">@@ -1226,7 +1226,7 @@ iii worker add mcp # 在 agentmemory 的 MCP 旁開設通用 MCP| Prometheus / Grafana | iii OTEL + 健康監控 || 自訂外掛系統 | `iii worker add <name>` |-**182 個原始檔 · ~41,600 行程式碼 · 1,619 測試 · 264 個函式 · 50 個 KV 範圍**,全部基於三種原語。沒有 `agentmemory plugin install`。外掛系統就是 iii 本身。+**219 個原始檔 · ~52,000 行程式碼 · 2,500+ 測試 · 311 個函式 · 60 個 KV 範圍**,全部基於三種原語。沒有 `agentmemory plugin install`。外掛系統就是 iii 本身。---@@ -1525,7 +1525,7 @@ CONSOLIDATION_ENABLED=true<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/section-api.svg"><img src="../assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>-連接埠 `3111` 上的 124 個端點。REST API 預設繫結 `127.0.0.1`。當 `AGENTMEMORY_SECRET` 已設定時,受保護端點需要 `Authorization: Bearer <secret>`,網狀同步端點要求兩端都設定 `AGENTMEMORY_SECRET`。+連接埠 `3111` 上的 138 個端點。REST API 預設繫結 `127.0.0.1`。受保護端點需要 `Authorization: Bearer <secret>`,網狀同步端點要求兩端都明確設定 `AGENTMEMORY_SECRET`。<details><summary>關鍵端點</summary>@@ -1559,7 +1559,7 @@ CONSOLIDATION_ENABLED=true```bashnpm run dev # 熱重新載入npm run build # 生產建置-npm test # 1,619 測試+npm test # 2,500+ 測試npm run test:integration # API 測試(需要服務執行中)```diff --git a/assets/tags/light/stat-tests.svg b/assets/tags/light/stat-tests.svgindex f4675bd9..1bb69e34 100644--- a/assets/tags/light/stat-tests.svg+++ b/assets/tags/light/stat-tests.svg@@ -1,5 +1,5 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 48" fill="none" role="img" aria-label="TESTS PASSING: 1648+">+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 48" fill="none" role="img" aria-label="TESTS PASSING: 2500+"><rect x="0" y="0" width="140" height="48" rx="10" fill="#FFFFFF" stroke="#E5E7EB" stroke-width="1"/>- <text x="70" y="24" fill="#16A34A" font-family='ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif' font-size="18" font-weight="900" text-anchor="middle" letter-spacing="-0.3">1648+</text>+ <text x="70" y="24" fill="#16A34A" font-family='ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif' font-size="18" font-weight="900" text-anchor="middle" letter-spacing="-0.3">2500+</text><text x="70" y="38" fill="#64748B" font-family='ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif' font-size="9" font-weight="600" text-anchor="middle" letter-spacing="1.5">TESTS PASSING</text></svg>diff --git a/assets/tags/stat-tests.svg b/assets/tags/stat-tests.svgindex a7599939..44c9fc27 100644--- a/assets/tags/stat-tests.svg+++ b/assets/tags/stat-tests.svg@@ -1,5 +1,5 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 48" fill="none" role="img" aria-label="TESTS PASSING: 1648+">+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 48" fill="none" role="img" aria-label="TESTS PASSING: 2500+"><rect x="0" y="0" width="140" height="48" rx="10" fill="#1A1A1A" stroke="#2A2A2A" stroke-width="1"/>- <text x="70" y="24" fill="#00D26A" font-family='ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif' font-size="18" font-weight="900" text-anchor="middle" letter-spacing="-0.3">1648+</text>+ <text x="70" y="24" fill="#00D26A" font-family='ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif' font-size="18" font-weight="900" text-anchor="middle" letter-spacing="-0.3">2500+</text><text x="70" y="38" fill="#9CA3AF" font-family='ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif' font-size="9" font-weight="600" text-anchor="middle" letter-spacing="1.5">TESTS PASSING</text></svg>diff --git a/deploy/coolify/Dockerfile b/deploy/coolify/Dockerfileindex 8a100474..62105fcb 100644--- a/deploy/coolify/Dockerfile+++ b/deploy/coolify/Dockerfile@@ -1,12 +1,12 @@-ARG III_VERSION=0.11.2+ARG III_VERSION=0.22.1FROM iiidev/iii:${III_VERSION} AS iii-imageFROM node:22-slim-ARG AGENTMEMORY_VERSION=0.9.29-ARG III_VERSION=0.11.2-ARG III_SDK_VERSION=0.11.2+ARG AGENTMEMORY_VERSION=0.9.30+ARG III_VERSION=0.22.1+ARG III_SDK_VERSION=0.22.1RUN apt-get update \&& apt-get install -y --no-install-recommends openssl ca-certificates tini gosu curl \diff --git a/deploy/coolify/docker-compose.yml b/deploy/coolify/docker-compose.ymlindex b34823db..62c078ac 100644--- a/deploy/coolify/docker-compose.yml+++ b/deploy/coolify/docker-compose.yml@@ -4,9 +4,9 @@ services:context: .dockerfile: Dockerfileargs:- AGENTMEMORY_VERSION: "0.9.29"- III_VERSION: "0.11.2"- III_SDK_VERSION: "0.11.2"+ AGENTMEMORY_VERSION: "0.9.30"+ III_VERSION: "0.22.1"+ III_SDK_VERSION: "0.22.1"restart: unless-stoppedenvironment:SERVICE_FQDN_AGENTMEMORY_3111: ${SERVICE_FQDN_AGENTMEMORY_3111}diff --git a/deploy/fly/Dockerfile b/deploy/fly/Dockerfileindex 1a019879..3abf3663 100644--- a/deploy/fly/Dockerfile+++ b/deploy/fly/Dockerfile@@ -1,12 +1,12 @@-ARG III_VERSION=0.11.2+ARG III_VERSION=0.22.1FROM iiidev/iii:${III_VERSION} AS iii-imageFROM node:22-slim-ARG AGENTMEMORY_VERSION=0.9.29-ARG III_VERSION=0.11.2-ARG III_SDK_VERSION=0.11.2+ARG AGENTMEMORY_VERSION=0.9.30+ARG III_VERSION=0.22.1+ARG III_SDK_VERSION=0.22.1RUN apt-get update \&& apt-get install -y --no-install-recommends openssl ca-certificates tini gosu curl \diff --git a/deploy/railway/Dockerfile b/deploy/railway/Dockerfileindex 1a019879..3abf3663 100644--- a/deploy/railway/Dockerfile+++ b/deploy/railway/Dockerfile@@ -1,12 +1,12 @@-ARG III_VERSION=0.11.2+ARG III_VERSION=0.22.1FROM iiidev/iii:${III_VERSION} AS iii-imageFROM node:22-slim-ARG AGENTMEMORY_VERSION=0.9.29-ARG III_VERSION=0.11.2-ARG III_SDK_VERSION=0.11.2+ARG AGENTMEMORY_VERSION=0.9.30+ARG III_VERSION=0.22.1+ARG III_SDK_VERSION=0.22.1RUN apt-get update \&& apt-get install -y --no-install-recommends openssl ca-certificates tini gosu curl \diff --git a/deploy/render/Dockerfile b/deploy/render/Dockerfileindex 1a019879..3abf3663 100644--- a/deploy/render/Dockerfile+++ b/deploy/render/Dockerfile@@ -1,12 +1,12 @@-ARG III_VERSION=0.11.2+ARG III_VERSION=0.22.1FROM iiidev/iii:${III_VERSION} AS iii-imageFROM node:22-slim-ARG AGENTMEMORY_VERSION=0.9.29-ARG III_VERSION=0.11.2-ARG III_SDK_VERSION=0.11.2+ARG AGENTMEMORY_VERSION=0.9.30+ARG III_VERSION=0.22.1+ARG III_SDK_VERSION=0.22.1RUN apt-get update \&& apt-get install -y --no-install-recommends openssl ca-certificates tini gosu curl \diff --git a/deploy/render/render.yaml b/deploy/render/render.yamlindex d1871d57..17150b74 100644--- a/deploy/render/render.yaml+++ b/deploy/render/render.yaml@@ -15,8 +15,8 @@ services:- key: PORTvalue: "3111"- key: AGENTMEMORY_VERSION- value: "0.9.29"+ value: "0.9.30"- key: III_VERSION- value: "0.11.2"+ value: "0.22.1"- key: III_SDK_VERSION- value: "0.11.2"+ value: "0.22.1"diff --git a/docs/plugins/antigravity.md b/docs/plugins/antigravity.mdnew file mode 100644index 00000000..1284676f--- /dev/null+++ b/docs/plugins/antigravity.md@@ -0,0 +1,69 @@+# Agent Memory for Antigravity++Start the Agent Memory daemon, then configure the surface you use:++```sh+agentmemory connect antigravity-cli --with-hooks+# Antigravity IDE or 2.0:+agentmemory connect antigravity --with-hooks+```++Current Antigravity surfaces share `~/.gemini/config/mcp_config.json` and+`~/.gemini/config/hooks.json`. Workspace overrides live in `.agents/`. Restart the+host after installation. In the CLI, `agy mcp list` lists configured servers and+`/hooks` shows active hooks. This integration uses the MCP connector and bundled+hook scripts; the repository does not yet ship an Antigravity plugin bundle.++Older Agent Memory connectors wrote the IDE config into its application-support+directory and used shell-style environment defaults that Antigravity does not+expand. After upgrading, inspect your agentmemory MCP settings, then rerun the+appropriate command with `--force` to refresh that entry. Other servers and hook+bundles are preserved. Custom values on the agentmemory entry must be reapplied.++Launch the host with `AGENTMEMORY_URL` for a custom daemon endpoint and+`AGENTMEMORY_SECRET` when remote authentication requires it. The generated entry+inherits the process environment. Local clients also read the daemon-generated+credential. Do not paste secrets into committed configuration.++## Capture behavior++- The first model invocation opens the session. With+ `AGENTMEMORY_INJECT_CONTEXT=true`, recalled context is passed back through+ Antigravity's `injectSteps` response.+- Tool names, inputs, and reported failures are captured. Native PostToolUse+ payloads currently omit successful tool output, so full output replay is not+ available through this hook alone.+- Explicit user prompts are backfilled from the host transcript when execution+ becomes fully idle. Repeated backfills and tool deliveries use stable event IDs.+- Idle Stop closes the session once. Stops with pending background work do not+ close it.++Keep the installed package path free of spaces for Antigravity hook command+compatibility. The installer warns and skips hooks when that condition is not met.+MCP can still be configured. Re-run `connect ... --with-hooks` after moving or+upgrading the package so absolute script paths stay current.++## Repeat the native CLI test++```sh+npm run build+AGENTMEMORY_TEST_ANTIGRAVITY=/absolute/path/to/agy node scripts/plugins/test-antigravity-native.mjs+```++Verified with Antigravity CLI 1.3.0. The test uses a temporary profile, a synthetic+local Gemini endpoint, and a generated sample file. It checks connector discovery,+inherited MCP environment, recalled context reaching the model, native tool capture,+transcript prompt backfill, and one session lifecycle. It launches the bundled MCP+bridge from the checkout because the release-prep runtime is not yet published.+No Google account credentials or paid model calls are used.++The live daemon suite also exercises this bridge with the pinned iii engine,+including authentication, shared memory, offline capture recovery, and restart+persistence. IDE UI dispatch, native Windows execution, and an Antigravity plugin+bundle remain unverified or unimplemented.++Contract references checked October 6, 2026:++- [MCP configuration](https://antigravity.google/docs/mcp)+- [Hook events and payloads](https://antigravity.google/docs/hooks)+- [CLI model endpoint configuration](https://antigravity.google/docs/cli/install/)diff --git a/docs/plugins/codex-local.md b/docs/plugins/codex-local.mdindex 030f772e..c4c80660 100644--- a/docs/plugins/codex-local.md+++ b/docs/plugins/codex-local.md@@ -112,6 +112,24 @@ across an engine restart. It launches hook scripts directly;desktop hook dispatch and host trust UI still require a manual host test. Thenormal test suite skips this check unless the engine path is explicitly set.+To exercise native plugin discovery and hook dispatch with an installed Codex CLI:++```sh+npm run plugin:pack:codex+AGENTMEMORY_TEST_CODEX=/absolute/path/to/codex node scripts/plugins/test-codex-native.mjs+```++The test uses a temporary home and a synthetic local Responses API to make Codex+read one generated file. It checks MCP startup, session context reaching the model,+prompt/tool capture, and session completion. It trusts only the built test plugin+for that invocation through Codex's automation flag. No account credentials or+paid model calls are used. Verified with Codex CLI 0.150.1; desktop trust UI and+PreCompact dispatch are separate checks.++The current `connect codex --with-hooks` path skips hook installation if MCP is+already wired. The native plugin path above works. For global hooks, inspect your+agentmemory MCP settings before using `--force`, which rewrites that MCP entry.+After publishing the selected runtime and shim versions, run:```shdiff --git a/docs/plugins/copilot.md b/docs/plugins/copilot.mdnew file mode 100644index 00000000..db0a4593--- /dev/null+++ b/docs/plugins/copilot.md@@ -0,0 +1,110 @@+# GitHub Copilot setup and capture++MCP exposes memory tools. Automatic observation capture requires hooks as well. A working tool list alone does not prove that Copilot activity is being saved.++## Start the persistent service++Install Agent Memory and run its setup in a separate terminal:++```sh+npm install -g @agentmemory/agentmemory@latest+agentmemory+```++Then check `agentmemory status`. The API normally listens on port 3111; the viewer uses port 3113. A missing LLM provider disables optional compression and summarization. Capture, explicit saves, and keyword recall still work without a provider key. A Copilot subscription does not configure an Agent Memory LLM provider.++For this unreleased branch, run `npm run build` and use `node dist/cli.mjs` instead of the published CLI. Do not assume npm's latest version includes release-branch fixes.++## Copilot CLI++Choose either the full plugin or MCP-only wiring:++```sh+# Full plugin: MCP, skills, and lifecycle capture+copilot plugin install rohitg00/agentmemory:plugin++# Alternatively, tools and usage instructions without automatic capture+agentmemory connect copilot-cli+```++For a checkout of this branch, use `copilot plugin install /absolute/path/to/agentmemory/plugin`. Restart Copilot after installation or `copilot plugin update agentmemory`. Direct installs work in Copilot CLI 1.0.92 but that client warns that future versions will require marketplace installs.++The full plugin runs the bundled Node.js MCP bridge. Copilot loads the shared `.mcp.json` ahead of the manifest's `.mcp.copilot.json` reference, so both configurations must use that bridge. It forwards to the same persistent daemon as the hooks, reads locally generated credentials, and reports connection failures without switching to an in-memory store. It requires Node.js on Copilot's PATH and a running Agent Memory daemon.++The bridge and hooks inherit `AGENTMEMORY_URL` and `AGENTMEMORY_SECRET` from the host environment. Local credentials are also read from `~/.agentmemory/.env` or `~/.agentmemory/secret`. For remote servers, set the URL and secret explicitly; use HTTPS for authenticated remote MCP connections. Tool visibility is controlled by the daemon's `AGENTMEMORY_TOOLS` setting.++Capture runs by default. To also inject recalled context at session start, launch Copilot with `AGENTMEMORY_INJECT_CONTEXT=true` in its environment. Copilot CLI consumes JSON `additionalContext`; VS Code uses `hookSpecificOutput.additionalContext`.++## VS Code Copilot: local agent sessions++`agentmemory connect copilot-cli` configures the standalone CLI, not VS Code. VS Code currently requires manual MCP and hook configuration. These instructions target local agent sessions; remote Agent Host sessions have their own hook environment.++Find the global package directory with `npm root -g`. In the examples below, replace `/ABSOLUTE/PACKAGE` with that directory followed by `/@agentmemory/agentmemory`. For a source checkout, use the checkout directory after building it. On Windows, use forward slashes in JSON paths or escape backslashes.++Merge this entry into `.vscode/mcp.json`, preserving your existing servers. VS Code uses `servers` as the top-level key:++```json+{+ "servers": {+ "agentmemory": {+ "type": "stdio",+ "command": "node",+ "args": ["/ABSOLUTE/PACKAGE/plugin/scripts/plugin-bridge.mjs"]+ }+ }+}+```++The bundled bridge is present in the 0.9.30 release branch. Before that release is published, use a built checkout for this setup.++For automatic capture, create `.github/hooks/agentmemory.json` in the workspace:++```json+{+ "hooks": {+ "SessionStart": [+ {+ "type": "command",+ "command": "node \"/ABSOLUTE/PACKAGE/plugin/scripts/session-start.mjs\""+ }+ ],+ "UserPromptSubmit": [+ {+ "type": "command",+ "command": "node \"/ABSOLUTE/PACKAGE/plugin/scripts/prompt-submit.mjs\""+ }+ ],+ "PostToolUse": [+ {+ "type": "command",+ "command": "node \"/ABSOLUTE/PACKAGE/plugin/scripts/post-tool-use.mjs\""+ }+ ],+ "Stop": [+ {+ "type": "command",+ "command": "node \"/ABSOLUTE/PACKAGE/plugin/scripts/stop.mjs\""+ }+ ]+ }+}+```++Enable `chat.useHooks` and trust the workspace, then start a new local agent session. This captures prompts and completed tool calls as they happen; it does not require deleting a chat or closing VS Code. `Stop` requests session summarization after an agent turn. To inject recalled context, add `"env": { "AGENTMEMORY_INJECT_CONTEXT": "true" }` to the SessionStart entry.++Keep machine-specific absolute paths local, or adjust them for each machine. The hooks must run where the package, daemon, and memory data directory are accessible. If the daemon uses a custom `AGENTMEMORY_DATA_DIR`, pass the same directory to the hooks so offline capture is recovered on restart.++## Verify data, not just connectivity++1. Ask Copilot to save a unique synthetic fact with `memory_save`, then recall it with `memory_smart_search` in a new session.+2. Ask Copilot to read a small project file. Check `memory_sessions` for that session and a nonzero observation count. MCP-only setups need explicit saves; they do not automatically capture reads.+3. Run `agentmemory capture --json` to inspect offline spool records and failed capture delivery. `agentmemory capture --drain` requests recovery once the service is running.+4. If an older MCP log says `falling back to local InMemoryKV`, check the running daemon and update the MCP configuration. That fallback does not provide durable cross-session memory.++References: [Copilot plugin configuration](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference), [Copilot hook payloads](https://docs.github.com/en/copilot/reference/hooks-reference), [VS Code local hooks](https://code.visualstudio.com/docs/agents/reference/hooks-reference), [VS Code hook configuration](https://code.visualstudio.com/docs/agent-customization/hooks).++## Maintainer checks++After building, `node scripts/plugins/test-copilot-native.mjs` runs the actual Copilot plugin installer and runtime against a local synthetic model and capture server. Set `AGENTMEMORY_TEST_COPILOT` to the client executable and `AGENTMEMORY_TEST_COPILOT_SDK` to that client's bundled `copilot-sdk/index.js`. It uses a temporary home and project, verifies the loaded MCP command and skills, then checks prompt/tool capture and context delivery. It does not require a Copilot account or send project data to a model provider.++To separately verify persistent storage and recovery with the pinned iii engine, build the Codex package with `node scripts/plugins/package-codex.mjs`, then set `AGENTMEMORY_TEST_III` to the engine executable and run `node node_modules/vitest/vitest.mjs run test/codex-live-daemon.test.ts`. That suite exercises both Codex and Copilot configurations.diff --git a/integrations/hermes/plugin.yaml b/integrations/hermes/plugin.yamlindex 4d647c8a..25b3dc95 100644--- a/integrations/hermes/plugin.yaml+++ b/integrations/hermes/plugin.yaml@@ -1,5 +1,5 @@name: agentmemory-version: 0.9.29+version: 0.9.30description: "Persistent cross-session memory for Hermes Agent via agentmemory. 95.2% retrieval accuracy on LongMemEval."author: "Rohit Ghumare"homepage: "https://github.com/rohitg00/agentmemory"diff --git a/integrations/openclaw/README.md b/integrations/openclaw/README.mdindex 29c3a682..9f689172 100644--- a/integrations/openclaw/README.md+++ b/integrations/openclaw/README.md@@ -13,7 +13,7 @@</p><p align="center">- <img src="https://img.shields.io/badge/MCP-43_tools-1f6feb?style=flat-square" alt="43 MCP tools" />+ <img src="https://img.shields.io/badge/MCP-54_tools-1f6feb?style=flat-square" alt="54 MCP tools" /><img src="https://img.shields.io/badge/Plugin-memory_slot-1f6feb?style=flat-square" alt="OpenClaw memory plugin" /><img src="https://img.shields.io/badge/[email protected]%25-00875f?style=flat-square" alt="95.2% R@5" /><img src="https://img.shields.io/badge/Self--hosted-yes-00875f?style=flat-square" alt="Self-hosted" />@@ -29,7 +29,7 @@```textInstall agentmemory for OpenClaw. Run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server on localhost:3111.-For zero-code setup, add this MCP server so OpenClaw gets all 43 memory tools:+For zero-code setup, add this MCP server so OpenClaw gets all 54 memory tools:{"mcpServers": {@@ -88,7 +88,7 @@ Then add to your OpenClaw MCP config:}```-OpenClaw now has access to all 43 MCP tools including `memory_recall`, `memory_save`, `memory_smart_search`, `memory_timeline`, `memory_profile`, and more.+OpenClaw now has access to all 54 MCP tools including `memory_recall`, `memory_save`, `memory_smart_search`, `memory_timeline`, `memory_profile`, and more.## Option 2: OpenClaw memory plugin (deeper integration)diff --git a/integrations/openclaw/openclaw.plugin.json b/integrations/openclaw/openclaw.plugin.jsonindex aa990ccd..e6b67e09 100644--- a/integrations/openclaw/openclaw.plugin.json+++ b/integrations/openclaw/openclaw.plugin.json@@ -3,7 +3,7 @@"kind": "memory","name": "agentmemory","description": "Persistent cross-session memory for OpenClaw via agentmemory.",- "version": "0.9.29",+ "version": "0.9.30","configSchema": {"type": "object","additionalProperties": false,diff --git a/integrations/openclaw/package.json b/integrations/openclaw/package.jsonindex 75232379..d22e1c4d 100644--- a/integrations/openclaw/package.json+++ b/integrations/openclaw/package.json@@ -1,6 +1,6 @@{"name": "agentmemory",- "version": "0.9.29",+ "version": "0.9.30","type": "module","openclaw": {"extensions": [diff --git a/package.json b/package.jsonindex c0544dca..0441e623 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "@agentmemory/agentmemory",- "version": "0.9.29",+ "version": "0.9.30","description": "Persistent memory for AI coding agents, powered by iii-engine's three primitives","type": "module","main": "dist/index.mjs",@@ -29,6 +29,8 @@"skills:gen": "tsx scripts/skills/generate.ts","engine:hashes": "node scripts/engine-hashes.mjs","skills:check": "tsx scripts/skills/generate.ts --check && tsx scripts/skills/check.ts",+ "docs:sync": "tsx scripts/docs-sync.ts",+ "docs:check": "tsx scripts/docs-sync.ts --check","plugin:pack:codex": "npm run build && node scripts/plugins/package-codex.mjs","plugin:verify:published": "node scripts/plugins/verify-published.mjs","test:plugin:live": "node scripts/plugins/test-live.mjs",diff --git a/packages/mcp/package.json b/packages/mcp/package.jsonindex c88f9c89..0d90a18b 100644--- a/packages/mcp/package.json+++ b/packages/mcp/package.json@@ -1,6 +1,6 @@{"name": "@agentmemory/mcp",- "version": "0.9.29",+ "version": "0.9.30","description": "Standalone MCP server for agentmemory — thin shim that re-exposes @agentmemory/agentmemory's MCP entrypoint","type": "module","bin": {@@ -28,7 +28,7 @@"homepage": "https://github.com/rohitg00/agentmemory#readme","bugs": "https://github.com/rohitg00/agentmemory/issues","dependencies": {- "@agentmemory/agentmemory": "~0.9.0"+ "@agentmemory/agentmemory": "~0.9.30"},"publishConfig": {"access": "public",diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.jsonindex ab798622..44e0dac5 100644--- a/plugin/.claude-plugin/plugin.json+++ b/plugin/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "agentmemory",- "version": "0.9.29",+ "version": "0.9.30","description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 54 MCP tools, 17 skills, real-time viewer.","author": {"name": "Rohit Ghumare",diff --git a/plugin/.codex-plugin/plugin.json b/plugin/.codex-plugin/plugin.jsonindex a58536ed..b79927a6 100644--- a/plugin/.codex-plugin/plugin.json+++ b/plugin/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "agentmemory",- "version": "0.9.29",+ "version": "0.9.30","description": "Local persistent memory for coding agents. Recall decisions, resume sessions, learn from corrections, and manage memory through 54 MCP tools and 17 skills. Optional capture through 6 Codex hooks.","author": {"name": "Rohit Ghumare",diff --git a/plugin/.devin-plugin/plugin.json b/plugin/.devin-plugin/plugin.jsonindex ce592197..f4e00e48 100644--- a/plugin/.devin-plugin/plugin.json+++ b/plugin/.devin-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "agentmemory",- "version": "0.9.29",+ "version": "0.9.30","description": "Persistent memory for AI coding agents. Captures sessions, recalls with hybrid BM25 + vector + graph search, and exposes 54 memory tools over MCP. Keyless by default, runs on your machine.","author": {"name": "Rohit Ghumare",diff --git a/plugin/.mcp.copilot.json b/plugin/.mcp.copilot.jsonindex 827330ad..347d9537 100644--- a/plugin/.mcp.copilot.json+++ b/plugin/.mcp.copilot.json@@ -2,13 +2,8 @@"mcpServers": {"agentmemory": {"type": "local",- "command": "npx",- "args": ["-y", "@agentmemory/mcp"],- "env": {- "AGENTMEMORY_URL": "${AGENTMEMORY_URL:-http://localhost:3111}",- "AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET:-}",- "AGENTMEMORY_TOOLS": "${AGENTMEMORY_TOOLS:-all}"- },+ "command": "node",+ "args": ["${COPILOT_PLUGIN_ROOT}/scripts/plugin-bridge.mjs"],"tools": ["*"]}}diff --git a/plugin/.mcp.json b/plugin/.mcp.jsonindex 37f7754f..bae045eb 100644--- a/plugin/.mcp.json+++ b/plugin/.mcp.json@@ -1,13 +1,8 @@{"mcpServers": {"agentmemory": {- "command": "npx",- "args": ["-y", "@agentmemory/mcp"],- "env": {- "AGENTMEMORY_URL": "${AGENTMEMORY_URL:-http://localhost:3111}",- "AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET:-}",- "AGENTMEMORY_TOOLS": "${AGENTMEMORY_TOOLS:-all}"- }+ "command": "node",+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/plugin-bridge.mjs"]}}}diff --git a/plugin/hooks/hooks.copilot.json b/plugin/hooks/hooks.copilot.jsonindex b7d09f8b..8501fa08 100644--- a/plugin/hooks/hooks.copilot.json+++ b/plugin/hooks/hooks.copilot.json@@ -4,68 +4,68 @@"sessionStart": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/session-start.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/session-start.mjs\""}],"userPromptSubmitted": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/prompt-submit.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/prompt-submit.mjs\""}],"preToolUse": [{"type": "command","matcher": "edit|write|create|read|view|glob|grep",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/pre-tool-use.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/pre-tool-use.mjs\""}],"postToolUse": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/post-tool-use.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/post-tool-use.mjs\""}],"postToolUseFailure": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/post-tool-failure.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/post-tool-failure.mjs\""}],"preCompact": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/pre-compact.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/pre-compact.mjs\""}],"agentStop": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/stop.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/stop.mjs\""}],"sessionEnd": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/session-end.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/session-end.mjs\""}],"subagentStart": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/subagent-start.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/subagent-start.mjs\""}],"subagentStop": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/subagent-stop.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/subagent-stop.mjs\""}],"notification": [{"type": "command",- "command": "node ${COPILOT_PLUGIN_ROOT}/scripts/notification.mjs"+ "command": "node \"${COPILOT_PLUGIN_ROOT}/scripts/notification.mjs\""}]}diff --git a/plugin/opencode/plugin.json b/plugin/opencode/plugin.jsonindex cf06cee5..02a334f7 100644--- a/plugin/opencode/plugin.json+++ b/plugin/opencode/plugin.json@@ -1,6 +1,6 @@{"name": "agentmemory-capture",- "version": "0.9.29",+ "version": "0.9.30","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",diff --git a/plugin/plugin.json b/plugin/plugin.jsonindex 09ab9ba2..2577bd9e 100644--- a/plugin/plugin.json+++ b/plugin/plugin.json@@ -1,6 +1,6 @@{"name": "agentmemory",- "version": "0.9.29",+ "version": "0.9.30","description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 54 MCP tools, 17 skills, real-time viewer.","author": {"name": "Rohit Ghumare",diff --git a/plugin/scripts/antigravity-bridge.mjs b/plugin/scripts/antigravity-bridge.mjsindex 12d72ba9..0722274a 100755--- a/plugin/scripts/antigravity-bridge.mjs+++ b/plugin/scripts/antigravity-bridge.mjs@@ -1,6 +1,7 @@#!/usr/bin/env nodeimport { spawnSync } from "node:child_process";-import { dirname, join, resolve } from "node:path";+import { realpathSync } from "node:fs";+import { dirname, join } from "node:path";import { fileURLToPath } from "node:url";//#region src/hooks/antigravity-bridge.tsconst SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));@@ -62,7 +63,8 @@ function normalizePayload(event, raw) {out["native_tool_name"] = rawName;}out["tool_input"] = args;- const result = toolCall["result"] ?? raw["toolResult"] ?? raw["result"];+ if (out["tool_use_id"] === void 0 && Number.isInteger(raw["stepIdx"]) && raw["stepIdx"] >= 0) out["tool_use_id"] = `step:${raw["stepIdx"]}`;+ const result = toolCall["result"] ?? raw["toolResult"] ?? raw["result"] ?? firstString(raw["error"]);if (result !== void 0) out["tool_result"] = result;}return out;@@ -71,15 +73,16 @@ function targetsFor(event, raw) {switch (event) {case "PreInvocation": {const n = raw["invocationNum"];- return typeof n !== "number" || n <= 1 ? ["session-start.mjs", "prompt-submit.mjs"] : ["prompt-submit.mjs"];+ return typeof n !== "number" || n === 0 ? ["session-start.mjs"] : [];}case "PreToolUse": return ["pre-tool-use.mjs"];case "PostToolUse": return ["post-tool-use.mjs"];- case "Stop": return ["stop.mjs", "session-end.mjs"];+ case "Stop": return raw["fullyIdle"] === false ? [] : ["session-end.mjs"];default: return [];}}-function responseFor(event) {+function responseFor(event, context = "") {+ if (event === "PreInvocation" && context) return JSON.stringify({ injectSteps: [{ ephemeralMessage: context }] });return event === "PreToolUse" ? "{\"decision\":\"allow\"}" : "{}";}async function main() {@@ -95,17 +98,23 @@ async function main() {}if (!raw || typeof raw !== "object") return;const payload = JSON.stringify(normalizePayload(event, raw));- for (const script of targetsFor(event, raw)) spawnSync(process.execPath, [join(SCRIPTS_DIR, script)], {- input: payload,- stdio: [- "pipe",- "ignore",- "ignore"- ]- });+ let context = "";+ for (const script of targetsFor(event, raw)) {+ const child = spawnSync(process.execPath, [join(SCRIPTS_DIR, script)], {+ input: payload,+ encoding: "utf8",+ stdio: [+ "pipe",+ "pipe",+ "ignore"+ ]+ });+ if (event === "PreInvocation" && script === "session-start.mjs" && child.status === 0) context = child.stdout?.trim() ?? "";+ }+ return context;}-if (process.argv[1] !== void 0 && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) main().catch(() => {}).finally(() => {- process.stdout.write(responseFor(process.argv[2] ?? ""));+if (process.argv[1] !== void 0 && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) main().catch(() => void 0).then((context) => {+ process.stdout.write(responseFor(process.argv[2] ?? "", context));process.exit(0);});//#endregiondiff --git a/plugin/scripts/plugin-bridge.mjs b/plugin/scripts/plugin-bridge.mjsindex bdaf256b..4f00ed58 100644--- a/plugin/scripts/plugin-bridge.mjs+++ b/plugin/scripts/plugin-bridge.mjs@@ -1,9 +1,9 @@import { pathToFileURL } from "node:url";-import { readFileSync } from "node:fs";+import { readFileSync, realpathSync } from "node:fs";import { homedir } from "node:os";import { join } from "node:path";//#region src/version.ts-const VERSION = "0.9.29";+const VERSION = "0.9.30";//#endregion//#region src/secret-store.tsconst SECRET_KEY = "AGENTMEMORY_SECRET";@@ -368,7 +368,7 @@ function createPluginBridge() {}};}-if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) try {+if (process.argv[1] && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) try {createStdioTransport(createPluginBridge()).start();} catch {process.stderr.write("[agentmemory] Invalid MCP configuration. Check AGENTMEMORY_URL; authenticated non-loopback URLs require HTTPS.\n");diff --git a/plugin/scripts/session-end.mjs b/plugin/scripts/session-end.mjsindex c98f569c..9e98b275 100755--- a/plugin/scripts/session-end.mjs+++ b/plugin/scripts/session-end.mjs@@ -57,6 +57,13 @@ function extractTranscriptPrompts(data) {} catch {continue;}+ if (msg.type === "USER_INPUT" && msg.source === "USER_EXPLICIT" && typeof msg.content === "string") {+ if (prompts.length >= 50) return prompts;+ const match = msg.content.match(/<USER_REQUEST>\n?([\s\S]*?)\n?<\/USER_REQUEST>/);+ const text = (match ? match[1] : msg.content).trim();+ if (text) prompts.push(text.slice(0, 8e3));+ continue;+ }if (msg.role !== "user") continue;for (const block of msg.message?.content ?? []) {if (prompts.length >= 50) return prompts;diff --git a/plugin/scripts/session-start.mjs b/plugin/scripts/session-start.mjsindex 4a68ef54..e2c83b02 100755--- a/plugin/scripts/session-start.mjs+++ b/plugin/scripts/session-start.mjs@@ -124,6 +124,7 @@ function wantsStructuredOutput(data) {return data.hook_event_name === "SessionStart" && !isPlainTextHost();}function contextPayload(data, context) {+ if (process.env["COPILOT_PLUGIN_ROOT"] && !data.hook_event_name) return JSON.stringify({ additionalContext: context });if (typeof data.cursor_version === "string" || data.hook_event_name === "sessionStart") return JSON.stringify({ additional_context: context });if (wantsStructuredOutput(data)) return JSON.stringify({ hookSpecificOutput: {hookEventName: "SessionStart",diff --git a/plugin/skills/agentmemory-agents/REFERENCE.md b/plugin/skills/agentmemory-agents/REFERENCE.mdindex 57702319..989d258f 100644--- a/plugin/skills/agentmemory-agents/REFERENCE.md+++ b/plugin/skills/agentmemory-agents/REFERENCE.md@@ -7,8 +7,8 @@ Generated from `src/cli/connect/index.ts`. Do not edit the block below by hand;| Agent | Name | Protocol || --- | --- | --- |-| Antigravity | `antigravity` | Using MCP via mcp_config.json. Antigravity replaces Gemini CLI (sunset 2026-06-18). |-| Antigravity CLI (agy) | `antigravity-cli` | Using MCP via ~/.gemini/config/mcp_config.json (the agy CLI, not the Antigravity IDE, that one is `connect antigravity`). The `/mcp` slash command inside agy lists configured servers. Pass --with-hooks to also install the native ~/.gemini/config/hooks.json auto-capture hooks. |+| Antigravity | `antigravity` | Using MCP via ~/.gemini/config/mcp_config.json, shared by current Antigravity surfaces. Pass --with-hooks for capture through ~/.gemini/config/hooks.json. |+| Antigravity CLI (agy) | `antigravity-cli` | Using MCP via ~/.gemini/config/mcp_config.json, shared with current Antigravity IDE versions. The `/mcp` slash command inside agy lists configured servers. Pass --with-hooks to also install the native ~/.gemini/config/hooks.json auto-capture hooks. || Claude Code | `claude-code` | Using MCP. Hooks are also available, see https://github.com/rohitg00/agentmemory#claude-code-one-block-paste-it. || Cline | `cline` | Using MCP via ~/.cline/mcp.json (CLI). VS Code users: add the same block via Cline Settings → MCP Servers → Edit JSON. || Codex CLI | `codex` | Using MCP. Hooks ship via the Codex plugin; on Codex Desktop, also pass --with-hooks to install the global hooks.json workaround. |diff --git a/scripts/docs-sync.state.json b/scripts/docs-sync.state.jsonnew file mode 100644index 00000000..4fab8b88--- /dev/null+++ b/scripts/docs-sync.state.json@@ -0,0 +1,38 @@+{+ "version": "0.9.30",+ "facts": {+ "mcpTools": [+ "54"+ ],+ "coreTools": [+ "8"+ ],+ "fallbackTools": [+ "7"+ ],+ "restEndpoints": [+ "138"+ ],+ "skills": [+ "17"+ ],+ "hooks": [+ "12"+ ],+ "tests": [+ "2500+"+ ],+ "functions": [+ "311"+ ],+ "sourceFiles": [+ "219"+ ],+ "loc": [+ "52000"+ ],+ "kvScopes": [+ "60"+ ]+ }+}diff --git a/scripts/docs-sync.ts b/scripts/docs-sync.tsnew file mode 100644index 00000000..8b1284a6--- /dev/null+++ b/scripts/docs-sync.ts@@ -0,0 +1,331 @@+import { execFileSync } from "node:child_process";+import { existsSync, readFileSync, writeFileSync } from "node:fs";+import { dirname, join } from "node:path";+import { fileURLToPath } from "node:url";+import { ESSENTIAL_TOOLS, getAllTools } from "../src/mcp/tools-registry.js";++const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");+const STATE_PATH = "scripts/docs-sync.state.json";+const CHECK = process.argv.includes("--check");+const REPO_URL = "https://github.com/rohitg00/agentmemory";++type State = { version: string; facts: Record<string, string[]> };++interface Fact {+ key: string;+ label: string;+ value: () => string | null;+ nouns: string[];+ before?: string;+ badge?: string;+}++function read(path: string): string {+ return readFileSync(join(ROOT, path), "utf-8");+}++function trackedFiles(): string[] {+ return execFileSync("git", ["ls-files", "--cached", "--others", "--exclude-standard"], { cwd: ROOT, encoding: "utf-8" })+ .split("\n")+ .filter((f) => f && existsSync(join(ROOT, f)));+}++function countMatches(path: string, pattern: RegExp): number {+ return read(path).match(pattern)?.length ?? 0;+}++function floorTo(n: number, step: number): number {+ return Math.floor(n / step) * step;+}++function countHookTypes(): number {+ const union = read("src/types.ts").match(/export type HookType\s*=([\s\S]*?);/);+ return union ? union[1].split("|").filter((s) => /^\s*["'`]/.test(s)).length : 0;+}++function countKvScopes(): number {+ const src = read("src/state/schema.ts");+ const body = src.slice(src.indexOf("export const KV = {"));+ return (body.slice(0, body.indexOf("\n};")).match(/^ {2}\w+:/gm) ?? []).length;+}++function countFallbackTools(): number {+ const src = read("src/mcp/standalone.ts");+ const body = src.slice(src.indexOf("const IMPLEMENTED_TOOLS = new Set(["));+ return (body.slice(0, body.indexOf("]);")).match(/"memory_\w+"/g) ?? []).length;+}++function sourceFiles(): string[] {+ return trackedFiles().filter((f) => f.startsWith("src/") && f.endsWith(".ts"));+}++function countTests(): number | null {+ try {+ const out = execFileSync(+ process.execPath,+ [join(ROOT, "node_modules/vitest/vitest.mjs"), "list", "--json", "--exclude", "test/integration.test.ts"],+ { cwd: ROOT, encoding: "utf-8", maxBuffer: 64 * 1024 * 1024, stdio: ["ignore", "pipe", "ignore"] },+ );+ return (JSON.parse(out) as unknown[]).length;+ } catch {+ return null;+ }+}++const TOOL_NOUNS = [+ "MCP tools", "MCP-Tools", "memory tools", "tools", "tool", "outils", "herramientas", "ferramentas",+ "Werkzeuge", "инструмент", "ツール", "个工具", "個工具", "工具", "개의 도구", "개 도구", "araç", "टूल",+];++const FACTS: Fact[] = [+ {+ key: "mcpTools",+ label: "MCP tools",+ value: () => String(getAllTools().length),+ nouns: [...TOOL_NOUNS, "个", "個", "개", "'ü"],+ badge: "stat-tools.svg",+ },+ {+ key: "coreTools",+ label: "core tools",+ value: () => String(ESSENTIAL_TOOLS.size),+ nouns: ["core tools", "visible by default", "个必备工具", ...TOOL_NOUNS],+ before: "(?:\"core\" \\(|core\\) \\(|AGENTMEMORY_TOOLS=core`[^\\n]{0,40}?|lean |The |\\()",+ },+ {+ key: "fallbackTools",+ label: "local fallback tools",+ value: () => String(countFallbackTools()),+ nouns: [...TOOL_NOUNS, "个工具", "-Tool"],+ },+ {+ key: "restEndpoints",+ label: "REST endpoints",+ value: () => String(countMatches("src/triggers/api.ts", /api_path:\s*["`]/g)),+ nouns: [+ "REST endpoints", "REST API endpoints", "endpoints", "endpoint", "Endpunkte", "эндпоинт",+ "个端点", "個端點", "개 엔드포인트", "개의 엔드포인트", "エンドポイント", "uç nokta", "एंडपॉइंट",+ ],+ },+ {+ key: "skills",+ label: "skills",+ value: () => String(trackedFiles().filter((f) => /^plugin\/skills\/[^/_][^/]*\/SKILL\.md$/.test(f)).length),+ nouns: ["native skills", "skills", "skill", "SKILL", "個の skills", "個 skills", "個 Skills", "개의 skills", "개 skills", "навык"],+ },+ {+ key: "hooks",+ label: "hooks",+ value: () => String(countHookTypes()),+ nouns: [+ "auto hooks", "hooks", "hook", "-hook", "scripts de hooks", "Hook-Skripte", "хук", "скриптов хуков",+ "フック", "훅",+ ],+ badge: "stat-hooks.svg",+ },+ {+ key: "tests",+ label: "tests",+ value: () => {+ const n = countTests();+ return n === null ? null : `${floorTo(n, 100)}+`;+ },+ nouns: ["tests passing", "tests", "Tests", "test", "个测试", "個測試", "testes", "pruebas", "тест", "テスト", "测试", "測試", "테스트"],+ badge: "stat-tests.svg",+ },+ {+ key: "functions",+ label: "iii functions",+ value: () => String(sourceFiles().reduce((n, f) => n + (read(f).match(/registerFunction\(/g)?.length ?? 0), 0)),+ nouns: ["iii functions", "functions", "funciones", "funções", "fonctions", "Funktionen", "функци", "個函式", "个函数", "개 함수", "개의 함수", "fonksiyon"],+ },+ {+ key: "sourceFiles",+ label: "source files",+ value: () => String(sourceFiles().length),+ nouns: ["source files", "fichiers sources", "ficheros de código", "arquivos de código", "archivos fuente", "arquivos-fonte", "arquivos fonte", "fichiers source", "Quelldateien", "исходных файл", "個原始檔", "个源文件", "개 소스 파일", "개의 소스 파일", "ソースファイル", "kaynak dosya"],+ },+ {+ key: "loc",+ label: "lines of code",+ value: () => String(floorTo(sourceFiles().reduce((n, f) => n + read(f).split("\n").length, 0), 1000)),+ nouns: ["LOC", "行程式碼", "行代码", "行のコード"],+ before: "~",+ },+ {+ key: "kvScopes",+ label: "KV scopes",+ value: () => String(countKvScopes()),+ nouns: ["KV scopes", "KV-Scopes", "KV scope", "KV-scope", "scopes KV", "scopes de KV", "escopos KV", "областей KV", "個 KV", "个 KV", "개 KV", "KV スコープ", "KV kapsam"],+ },+];++const EXCLUDED = [+ /^CHANGELOG\.md$/,+ /^test\//,+ /^benchmark\//,+ /^docs\/benchmarks\//,+ /^eval\//,+ /^website\/lib\/generated-meta\.json$/,+ /(^|\/)package-lock\.json$/,+ /^scripts\/docs-sync/,+];+const TEXT_FILE = /\.(md|mdx|json|ts|tsx|mjs|yml|yaml|html)$/;++function escapeRegex(s: string): string {+ return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");+}++function numberPattern(display: string): string {+ const digits = display.replace(/\D/g, "");+ const groups: string[] = [];+ for (let end = digits.length; end > 0; end -= 3) groups.unshift(digits.slice(Math.max(0, end - 3), end));+ return groups.join("[,.\\u00a0\\u202f ]?");+}++function formatLike(matched: string, next: string): string {+ const separator = matched.match(/\d([,. ])\d{3}(?!\d)/)?.[1];+ const digits = next.replace(/\D/g, "");+ if (!separator || digits.length < 4) return digits;+ return digits.replace(/\B(?=(\d{3})+(?!\d))/g, separator);+}++function factRegex(fact: Fact, old: string): RegExp {+ const nouns = [...fact.nouns].sort((a, b) => b.length - a.length).map(escapeRegex).join("|");+ const before = fact.before ? `(?<=${fact.before})` : "";+ return new RegExp(+ `${before}(?<![\\w.,])(${numberPattern(old)})(\\+?)(?=(?:[\\s\\u00a0]+|-|')?(?:${nouns}))`,+ "giu",+ );+}++function replaceFact(text: string, fact: Fact, olds: string[], next: string): string {+ let out = text;+ for (const old of olds) {+ if (old === next) continue;+ out = out.replace(factRegex(fact, old), (_m, num: string, plus: string) => {+ const formatted = formatLike(num, next);+ return next.endsWith("+") ? `${formatted}+` : `${formatted}${plus}`;+ });+ if (fact.badge) {+ out = out.replace(new RegExp(`>${escapeRegex(old)}\\+?<`, "g"), `>${next}<`);+ out = out.replace(new RegExp(`(aria-label="[^"]*?)${escapeRegex(old)}\\+?(")`, "g"), `$1${next}$2`);+ }+ }+ return out;+}++const VERSION_FILES: Array<{ file: RegExp; pattern: (v: string) => RegExp; replace: (v: string) => string }> = [+ { file: /(^|\/)(package|plugin|openclaw\.plugin)\.json$/, pattern: (v) => new RegExp(`("version":\\s*")${escapeRegex(v)}(")`), replace: (v) => `$1${v}$2` },+ { file: /^integrations\/hermes\/plugin\.yaml$/, pattern: (v) => new RegExp(`^(version:\\s*)${escapeRegex(v)}$`, "m"), replace: (v) => `$1${v}` },+ { file: /^deploy\/.*(Dockerfile|\.ya?ml)$/, pattern: (v) => new RegExp(`(AGENTMEMORY_VERSION[=:]\\s*"?|value:\\s*")${escapeRegex(v)}\\b`, "g"), replace: (v) => `$1${v}` },+ { file: /^src\/version\.ts$/, pattern: (v) => new RegExp(`(VERSION = ")${escapeRegex(v)}(")`), replace: (v) => `$1${v}$2` },+ { file: /^AGENTS\.md$/, pattern: (v) => new RegExp(`(## Current Stats \\(v)${escapeRegex(v)}(\\))`), replace: (v) => `$1${v}$2` },+ { file: /^packages\/mcp\/package\.json$/, pattern: (v) => new RegExp(`("@agentmemory/agentmemory":\\s*"~?)${escapeRegex(v)}(")`), replace: (v) => `$1${v}$2` },+];++function syncVersion(files: Map<string, string>, from: string, to: string): void {+ for (const [path, text] of files) {+ let next = text;+ for (const rule of VERSION_FILES.filter((r) => r.file.test(path))) next = next.replace(rule.pattern(from), rule.replace(to));+ if (next !== text) files.set(path, next);+ }+ const types = files.get("src/types.ts");+ if (types && !types.includes(`"${to}"`)) {+ files.set("src/types.ts", types.replace(new RegExp(`(version: [^\\n]*"${escapeRegex(from)}")`), `$1 | "${to}"`));+ }+ const exportImport = files.get("src/functions/export-import.ts");+ if (exportImport && !exportImport.includes(`"${to}"`)) {+ files.set(+ "src/functions/export-import.ts",+ exportImport.replace(new RegExp(`(supportedVersions = new Set\\(\\[[^\\]]*"${escapeRegex(from)}")`), `$1, "${to}"`),+ );+ }+ const changelog = files.get("CHANGELOG.md");+ if (changelog && !changelog.includes(`## [${to}]`)) {+ const date = new Date().toISOString().slice(0, 10);+ let next = changelog.replace(/^## \[Unreleased\]\s*$/m, `## [Unreleased]\n\n## [${to}] — ${date}`);+ next = next.replace(/^(\[[0-9][^\]]*\]: )/m, `[${to}]: ${REPO_URL}/compare/v${from}...v${to}\n$1`);+ files.set("CHANGELOG.md", next);+ }+}++function main(): void {+ const state = JSON.parse(read(STATE_PATH)) as State;+ const paths = trackedFiles().filter((f) => (TEXT_FILE.test(f) || /Dockerfile$/.test(f) || /stat-[a-z]+\.svg$/.test(f)) && !EXCLUDED.some((r) => r.test(f)));+ const files = new Map(paths.map((p) => [p, read(p)] as const));+ const original = new Map(files);+ const nextState: State = { version: state.version, facts: { ...state.facts } };+ const report: string[] = [];+ const failed: string[] = [];++ const version = (JSON.parse(read("package.json")) as { version: string }).version;+ if (version !== state.version) {+ for (const extra of ["src/types.ts", "src/functions/export-import.ts", "CHANGELOG.md"]) {+ if (!files.has(extra)) files.set(extra, read(extra));+ if (!original.has(extra)) original.set(extra, read(extra));+ }+ syncVersion(files, state.version, version);+ report.push(`version: ${state.version} -> ${version}`);+ nextState.version = version;+ }++ for (const fact of FACTS) {+ const next = fact.value();+ if (next === null) {+ report.push(`${fact.label}: skipped (could not compute)`);+ failed.push(fact.label);+ continue;+ }+ const olds = state.facts[fact.key] ?? [];+ if (olds.length === 1 && olds[0] === next) continue;+ for (const [path, text] of files) {+ if (fact.badge && path.endsWith(".svg") && !path.endsWith(fact.badge)) continue;+ if (!fact.badge && path.endsWith(".svg")) continue;+ files.set(path, replaceFact(text, fact, olds, next));+ }+ report.push(`${fact.label}: ${olds.join(", ")} -> ${next}`);+ nextState.facts[fact.key] = [next];+ }++ const changed = [...files].filter(([p, t]) => original.get(p) !== t).map(([p]) => p);+ const stateChanged = JSON.stringify(nextState) !== JSON.stringify(state);++ if (CHECK) {+ if (failed.length > 0) {+ console.error(`docs-sync: could not compute ${failed.join(", ")}, so the check is incomplete.`);+ process.exit(1);+ }+ if (changed.length === 0 && !stateChanged) {+ console.log("docs-sync: documented numbers and versions are current.");+ return;+ }+ console.error("docs-sync: documented numbers or versions are out of date.");+ for (const line of report) console.error(` ${line}`);+ for (const p of changed) console.error(` would update ${p}`);+ console.error("Run `npm run docs:sync` and commit the result.");+ process.exit(1);+ }++ for (const fact of FACTS) {+ const next = nextState.facts[fact.key]?.[0];+ for (const old of state.facts[fact.key] ?? []) {+ if (!next || old.replace(/\D/g, "") === next.replace(/\D/g, "")) continue;+ const leftover = new RegExp(`(?<![\\w.,])${numberPattern(old)}\\+?(?=[\\s\\u00a0'-]?\\p{L})`, "gu");+ for (const [path, text] of files) {+ if (path.endsWith(".svg")) continue;+ text.split("\n").forEach((line, i) => {+ if (leftover.test(line)) report.push(`check ${fact.label} ${old} left in ${path}:${i + 1}`);+ leftover.lastIndex = 0;+ });+ }+ }+ }++ for (const p of changed) writeFileSync(join(ROOT, p), files.get(p)!, "utf-8");+ if (stateChanged) writeFileSync(join(ROOT, STATE_PATH), JSON.stringify(nextState, null, 2) + "\n", "utf-8");+ for (const line of report) console.log(`docs-sync: ${line}`);+ console.log(`docs-sync: ${changed.length} file(s) updated.`);+}++main();diff --git a/scripts/plugins/test-antigravity-native.mjs b/scripts/plugins/test-antigravity-native.mjsnew file mode 100644index 00000000..2b2c7a3e--- /dev/null+++ b/scripts/plugins/test-antigravity-native.mjs@@ -0,0 +1,214 @@+import assert from "node:assert/strict";+import { execFileSync, spawn } from "node:child_process";+import {+ mkdirSync,+ mkdtempSync,+ realpathSync,+ writeFileSync,+ readFileSync,+ rmSync,+} from "node:fs";+import { createServer } from "node:http";+import { tmpdir } from "node:os";+import { dirname, join, resolve } from "node:path";+import { fileURLToPath } from "node:url";+const repo = resolve(dirname(fileURLToPath(import.meta.url)), "../..");+const cli = process.env.AGENTMEMORY_TEST_ANTIGRAVITY || "agy";+const root = realpathSync(+ mkdtempSync(join(tmpdir(), "agentmemory-agy-native-")),+);+const work = join(root, "project");+mkdirSync(work);+mkdirSync(join(root, ".gemini/antigravity-cli"), { recursive: true });+writeFileSync(+ join(work, "sample.txt"),+ "antigravity synthetic capture verification",+);+writeFileSync(+ join(root, ".gemini/antigravity-cli/settings.json"),+ JSON.stringify({ modelProvider: "gemini" }),+);+const requests = [],+ models = [];+const server = createServer(async (req, res) => {+ let raw = "";+ for await (const chunk of req) raw += chunk;+ const body = raw ? JSON.parse(raw) : {};+ if (req.url.startsWith("/agentmemory/")) {+ requests.push({ path: req.url, body });+ res.setHeader("content-type", "application/json");+ return res.end(+ JSON.stringify(+ req.url.endsWith("/mcp/tools")+ ? { tools: [] }+ : { context: "SYNTHETIC_AGY_CONTEXT", accepted: true },+ ),+ );+ }+ models.push({ path: req.url, body });+ const done = !body.tools || models.filter((m) => m.body.tools).length > 1;+ const part = done+ ? { text: "Synthetic test completed." }+ : {+ functionCall: {+ name: "view_file",+ args: {+ AbsolutePath: join(work, "sample.txt"),+ toolSummary: "Synthetic file check",+ toolAction: "Reading test file",+ },+ },+ };+ const response = {+ candidates: [+ {+ content: { role: "model", parts: [part] },+ finishReason: "STOP",+ index: 0,+ },+ ],+ usageMetadata: {+ promptTokenCount: 10,+ candidatesTokenCount: 10,+ totalTokenCount: 20,+ },+ };+ if (req.url.includes("alt=sse")) {+ res.setHeader("content-type", "text/event-stream");+ res.end(`data: ${JSON.stringify(response)}\n\n`);+ } else {+ res.setHeader("content-type", "application/json");+ res.end(JSON.stringify(response));+ }+});+const env = Object.fromEntries(+ Object.entries(process.env).filter(([k]) =>+ ["PATH", "TMPDIR", "TEMP", "SYSTEMROOT", "LANG"].includes(k),+ ),+);+Object.assign(env, {+ HOME: root,+ USERPROFILE: root,+ GEMINI_API_KEY: "synthetic-local-only",+ AGENTMEMORY_INJECT_CONTEXT: "true",+ AGENTMEMORY_DATA_DIR: join(root, "capture"),+});+try {+ await new Promise((r, j) =>+ server.once("error", j).listen(0, "127.0.0.1", r),+ );+ const base = `http://127.0.0.1:${server.address().port}`;+ env.AGENTMEMORY_URL = base;+ env.GOOGLE_GEMINI_BASE_URL = base;+ console.log(+ execFileSync(cli, ["--version"], {+ env,+ encoding: "utf8",+ timeout: 30_000,+ }).trim(),+ );+ execFileSync(+ process.execPath,+ [join(repo, "dist/cli.mjs"), "connect", "antigravity-cli", "--with-hooks"],+ { env, cwd: work, encoding: "utf8", timeout: 30_000 },+ );+ assert.match(+ execFileSync(cli, ["mcp", "list"], {+ env,+ cwd: work,+ encoding: "utf8",+ timeout: 30_000,+ }),+ /agentmemory.*npx -y @agentmemory\/mcp/,+ );+ // Keep the connector's environment settings, but exercise this unpublished build.+ writeFileSync(+ join(root, ".gemini/config/mcp_config.json"),+ JSON.stringify({+ mcpServers: {+ agentmemory: {+ command: process.execPath,+ args: [join(repo, "plugin/scripts/plugin-bridge.mjs")],+ env: JSON.parse(+ readFileSync(join(root, ".gemini/config/mcp_config.json"), "utf8"),+ ).mcpServers.agentmemory.env,+ },+ },+ }),+ );+ const child = spawn(+ cli,+ [+ "--print",+ "Read sample.txt using view_file.",+ "--output-format",+ "json",+ "--print-timeout",+ "20s",+ "--sandbox",+ ],+ { env, cwd: work, stdio: ["ignore", "pipe", "pipe"] },+ );+ let out = "",+ err = "";+ child.stdout.on("data", (d) => (out += d));+ child.stderr.on("data", (d) => (err += d));+ const t = setTimeout(() => child.kill("SIGTERM"), 35000);+ const code = await new Promise((r, j) => {+ child.on("exit", r);+ child.on("error", j);+ });+ clearTimeout(t);+ assert.equal(code, 0, err);+ const result = JSON.parse(out);+ assert.equal(result.status, "SUCCESS");+ assert.match(result.response, /Synthetic test completed/);+ const turns = models.filter((m) => m.body.tools);+ assert.equal(turns.length, 2);+ assert.ok(+ JSON.stringify(turns[0]).includes("SYNTHETIC_AGY_CONTEXT"),+ "recalled context must reach the model",+ );+ assert.ok(+ JSON.stringify(turns[1]).includes(+ "antigravity synthetic capture verification",+ ),+ "native file read must reach the model",+ );+ assert.ok(+ requests.some((r) => r.path === "/agentmemory/mcp/tools"),+ "connector environment must reach the bundled MCP bridge",+ );+ assert.equal(+ requests.filter((r) => r.path === "/agentmemory/session/start").length,+ 1,+ );+ assert.equal(+ requests.filter((r) => r.path === "/agentmemory/session/end").length,+ 1,+ );+ const prompts = requests.filter((r) => r.body.hookType === "prompt_submit");+ assert.deepEqual(+ prompts.map((r) => r.body.data.prompt),+ ["Read sample.txt using view_file."],+ );+ const captures = requests.filter((r) => r.body.hookType === "post_tool_use");+ assert.equal(captures.length, 1);+ assert.equal(captures[0].body.data.tool_name, "read");+ assert.equal(+ captures[0].body.data.tool_input.file_path,+ join(work, "sample.txt"),+ );+ assert.ok(+ requests+ .filter((r) => r.body.hookType)+ .every((r) => r.body.sessionId === result.conversation_id),+ );+ console.log(+ "PASS: native Antigravity connector, bundled MCP, context injection, tool capture, transcript prompt backfill, and one session lifecycle. Synthetic model and capture server only.",+ );+} finally {+ server.closeAllConnections();+ await new Promise((r) => server.close(r));+ rmSync(root, { recursive: true, force: true });+}diff --git a/scripts/plugins/test-codex-native.mjs b/scripts/plugins/test-codex-native.mjsnew file mode 100644index 00000000..a84ce078--- /dev/null+++ b/scripts/plugins/test-codex-native.mjs@@ -0,0 +1,204 @@+import assert from "node:assert/strict";+import { execFileSync, spawn } from "node:child_process";+import {+ mkdirSync,+ mkdtempSync,+ realpathSync,+ writeFileSync,+ rmSync,+} from "node:fs";+import { createServer } from "node:http";+import { tmpdir } from "node:os";+import { dirname, join, resolve } from "node:path";+import { fileURLToPath } from "node:url";+const repo = resolve(dirname(fileURLToPath(import.meta.url)), "../..");+const cli = process.env.AGENTMEMORY_TEST_CODEX || "codex";+const root = realpathSync(+ mkdtempSync(join(tmpdir(), "agentmemory codex native ")),+);+const work = join(root, "project");+mkdirSync(work);+mkdirSync(join(root, ".codex"));+writeFileSync(join(work, "sample.txt"), "codex synthetic capture verification");+const requests = [],+ models = [];+const context = "SYNTHETIC_CODEX_CONTEXT";+const server = createServer(async (req, res) => {+ let raw = "";+ for await (const chunk of req) raw += chunk;+ const body = raw ? JSON.parse(raw) : {};+ if (req.url.startsWith("/agentmemory/")) {+ requests.push({ path: req.url, body });+ res.setHeader("content-type", "application/json");+ return res.end(+ JSON.stringify(+ req.url.endsWith("/mcp/tools")+ ? { tools: [] }+ : { context, accepted: true },+ ),+ );+ }+ models.push(body);+ const done = models.length > 1;+ const item = done+ ? {+ id: "msg_synthetic",+ type: "message",+ role: "assistant",+ status: "completed",+ content: [+ {+ type: "output_text",+ text: "Synthetic test completed.",+ annotations: [],+ },+ ],+ }+ : {+ id: "fc_synthetic",+ type: "function_call",+ call_id: "call_synthetic",+ name: "exec_command",+ arguments: JSON.stringify({+ cmd: "cat sample.txt",+ max_output_tokens: 100,+ }),+ };+ res.setHeader("content-type", "text/event-stream");+ const emit = (type, data) =>+ res.write(`event: ${type}\ndata: ${JSON.stringify({ type, ...data })}\n\n`);+ emit("response.created", {+ response: {+ id: "resp_synthetic",+ object: "response",+ status: "in_progress",+ output: [],+ },+ });+ emit("response.output_item.added", {+ output_index: 0,+ item: done ? { ...item, content: [] } : { ...item, arguments: "" },+ });+ if (done)+ emit("response.output_text.delta", {+ item_id: item.id,+ output_index: 0,+ content_index: 0,+ delta: "Synthetic test completed.",+ });+ emit("response.output_item.done", { output_index: 0, item });+ emit("response.completed", {+ response: {+ id: "resp_synthetic",+ object: "response",+ status: "completed",+ output: [item],+ usage: { input_tokens: 10, output_tokens: 10, total_tokens: 20 },+ },+ });+ res.end();+});+const env = Object.fromEntries(+ Object.entries(process.env).filter(([k]) =>+ ["PATH", "TMPDIR", "TEMP", "SYSTEMROOT", "LANG"].includes(k),+ ),+);+Object.assign(env, {+ HOME: root,+ USERPROFILE: root,+ CODEX_HOME: join(root, ".codex"),+ AGENTMEMORY_INJECT_CONTEXT: "true",+ AGENTMEMORY_DATA_DIR: join(root, "capture"),+});+try {+ await new Promise((r, j) =>+ server.once("error", j).listen(0, "127.0.0.1", r),+ );+ const base = `http://127.0.0.1:${server.address().port}`;+ env.AGENTMEMORY_URL = base;+ console.log(+ execFileSync(cli, ["--version"], { env, encoding: "utf8" }).trim(),+ );+ execFileSync(+ cli,+ ["plugin", "marketplace", "add", join(repo, "dist/plugins"), "--json"],+ { env, cwd: work, encoding: "utf8", timeout: 30_000 },+ );+ execFileSync(+ cli,+ ["plugin", "add", "agentmemory@agentmemory-local-preview", "--json"],+ { env, cwd: work, encoding: "utf8", timeout: 30_000 },+ );+ const args = [+ "exec",+ "--skip-git-repo-check",+ "--dangerously-bypass-hook-trust",+ "--json",+ "--sandbox",+ "read-only",+ "-C",+ work,+ "-c",+ 'model="synthetic"',+ "-c",+ 'model_provider="synthetic"',+ "-c",+ `model_providers.synthetic={name="Synthetic local test",base_url="${base}/v1",wire_api="responses",requires_openai_auth=false}`,+ "-c",+ "features.hooks=true",+ "Read sample.txt using exec_command.",+ ];+ const child = spawn(cli, args, {+ env,+ cwd: work,+ stdio: ["ignore", "pipe", "pipe"],+ });+ let out = "",+ err = "";+ child.stdout.on("data", (d) => (out += d));+ child.stderr.on("data", (d) => (err += d));+ const t = setTimeout(() => child.kill("SIGTERM"), 45000);+ const code = await new Promise((r, j) => {+ child.on("exit", r);+ child.on("error", j);+ });+ clearTimeout(t);+ assert.equal(code, 0, err);+ assert.equal(models.length, 2);+ assert.ok(out.includes("Synthetic test completed."));+ assert.ok(+ JSON.stringify(models[1]).includes("codex synthetic capture verification"),+ "native file read must reach the model",+ );+ assert.ok(JSON.stringify(models).includes(context));+ assert.ok(requests.some((r) => r.path === "/agentmemory/session/start"));+ assert.ok(requests.some((r) => r.body.hookType === "prompt_submit"));+ assert.ok(+ requests.some(+ (r) =>+ r.body.hookType === "post_tool_use" &&+ r.body.data.tool_output.includes(+ "codex synthetic capture verification",+ ),+ ),+ );+ assert.ok(requests.some((r) => r.path === "/agentmemory/mcp/tools"));+ const session = requests.find((r) => r.path === "/agentmemory/session/start")+ .body.sessionId;+ assert.ok(+ requests+ .filter((r) => r.body.hookType)+ .every((r) => r.body.sessionId === session),+ );+ assert.equal(+ requests.filter((r) => r.path === "/agentmemory/session/end").length,+ 1,+ );+ console.log(+ "PASS: native Codex plugin install, bundled MCP, context injection, prompt/tool capture, and session end. Synthetic model and capture server only.",+ );+} finally {+ server.closeAllConnections();+ await new Promise((r) => server.close(r));+ rmSync(root, { recursive: true, force: true });+}diff --git a/scripts/plugins/test-copilot-native.mjs b/scripts/plugins/test-copilot-native.mjsnew file mode 100644index 00000000..517e0264--- /dev/null+++ b/scripts/plugins/test-copilot-native.mjs@@ -0,0 +1,100 @@+import assert from "node:assert/strict";+import { execFileSync } from "node:child_process";+import { cpSync, mkdirSync, mkdtempSync, realpathSync, rmSync, writeFileSync } from "node:fs";+import { createServer } from "node:http";+import { tmpdir } from "node:os";+import { dirname, join, resolve } from "node:path";+import { fileURLToPath, pathToFileURL } from "node:url";++const cli = process.env.AGENTMEMORY_TEST_COPILOT;+const sdk = process.env.AGENTMEMORY_TEST_COPILOT_SDK;+if (!cli || !sdk) {+ console.error("Set AGENTMEMORY_TEST_COPILOT to the Copilot executable and AGENTMEMORY_TEST_COPILOT_SDK to its bundled copilot-sdk/index.js. Run npm run build first.");+ process.exit(1);+}+const { CopilotClient, RuntimeConnection, approveAll } = await import(pathToFileURL(resolve(sdk)).href);+const repo = resolve(dirname(fileURLToPath(import.meta.url)), "../..");+const root = realpathSync(mkdtempSync(join(tmpdir(), "agentmemory copilot native ")));+const work = join(root, "project");+const plugin = join(root, "plugin with spaces");+const sample = "copilot synthetic capture verification";+const context = "SYNTHETIC_SESSION_CONTEXT";+mkdirSync(work);+writeFileSync(join(work, "sample.txt"), sample);+cpSync(join(repo, "plugin"), plugin, { recursive: true });+const requests = [];+const modelRequests = [];+const server = createServer(async (req, res) => {+ try {+ let raw = "";+ for await (const chunk of req) raw += chunk;+ const body = raw ? JSON.parse(raw) : {};+ res.setHeader("content-type", "application/json");+ if (req.url.startsWith("/agentmemory/")) {+ requests.push({ path: req.url, body });+ if (req.url.endsWith("/mcp/tools")) return res.end(JSON.stringify({ tools: [] }));+ return res.end(JSON.stringify({ context, accepted: true }));+ }+ modelRequests.push(body);+ const done = modelRequests.length > 1;+ const message = done+ ? { role: "assistant", content: "Synthetic test completed." }+ : { role: "assistant", content: null, tool_calls: [{ id: "call_synthetic", type: "function",+ function: { name: "view", arguments: JSON.stringify({ path: join(work, "sample.txt") }) } }] };+ res.end(JSON.stringify({ id: "synthetic", object: "chat.completion", created: 1, model: "synthetic",+ choices: [{ index: 0, message, finish_reason: done ? "stop" : "tool_calls" }],+ usage: { prompt_tokens: 10, completion_tokens: 10, total_tokens: 20 } }));+ } catch {+ res.writeHead(500);+ res.end('{}');+ }+});+const env = Object.fromEntries(Object.entries(process.env).filter(([key]) =>+ ["PATH", "TMPDIR", "TEMP", "SYSTEMROOT", "LANG"].includes(key)));+Object.assign(env, { HOME: root, USERPROFILE: root, COPILOT_HOME: join(root, ".copilot"),+ COPILOT_CACHE_HOME: join(root, "cache"), COPILOT_AUTO_UPDATE: "false", AGENTMEMORY_INJECT_CONTEXT: "true",+ AGENTMEMORY_DATA_DIR: join(root, "capture") });+let client;+let session;+try {+ await new Promise((done, reject) => server.once("error", reject).listen(0, "127.0.0.1", done));+ const base = `http://127.0.0.1:${server.address().port}`;+ env.AGENTMEMORY_URL = base;+ console.log(execFileSync(cli, ["--version"], { env, encoding: "utf8", timeout: 30_000 }).trim());+ execFileSync(cli, ["plugin", "install", plugin], { env, cwd: work, encoding: "utf8", timeout: 30_000, stdio: ["ignore", "pipe", "pipe"] });+ const servers = JSON.parse(execFileSync(cli, ["mcp", "list", "--json"], { env, cwd: work, encoding: "utf8", timeout: 30_000 }));+ assert.equal(servers.mcpServers.agentmemory.command, "node");+ assert.match(servers.mcpServers.agentmemory.args[0], /scripts\/plugin-bridge\.mjs$/);+ const skills = JSON.parse(execFileSync(cli, ["skill", "list", "--json"], { env, cwd: work, encoding: "utf8", timeout: 30_000 }));+ const pluginSkills = skills.filter((skill) => skill.source === "plugin");+ assert.ok(pluginSkills.some((skill) => skill.name === "remember"));+ client = new CopilotClient({ connection: RuntimeConnection.forStdio({ path: cli }),+ baseDirectory: env.COPILOT_HOME, workingDirectory: work, useLoggedInUser: false, env, logLevel: "error" });+ await client.start();+ session = await client.createSession({ model: "synthetic", provider: { type: "openai", baseUrl: `${base}/v1` },+ workingDirectory: work, enableFileHooks: true, enableConfigDiscovery: true,+ availableTools: ["view"], streaming: false, onPermissionRequest: approveAll });+ const result = await session.sendAndWait("Read sample.txt using view.", 30_000);+ assert.equal(result?.data?.content, "Synthetic test completed.");+ await session.disconnect();+ session = undefined;+ assert.equal(modelRequests.length, 2);+ assert.ok(JSON.stringify(modelRequests).includes(context), "SessionStart context must reach the model");+ assert.ok(requests.some((r) => r.path === "/agentmemory/mcp/tools"), "the bundled MCP bridge must connect");+ const start = requests.find((r) => r.path === "/agentmemory/session/start");+ assert.ok(start);+ for (const type of ["prompt_submit", "post_tool_use"]) {+ const observation = requests.find((r) => r.body.hookType === type);+ assert.ok(observation, `missing ${type} capture`);+ assert.equal(observation.body.sessionId, start.body.sessionId);+ if (type === "post_tool_use") assert.equal(observation.body.data.tool_output, sample);+ }+ assert.ok(requests.some((r) => r.path === "/agentmemory/session/end"));+ console.log(`PASS: native plugin install, ${pluginSkills.length} plugin skills, bundled MCP, SessionStart context, prompt/tool capture, and session end. Synthetic model and capture server only.`);+} finally {+ if (session) await session.disconnect();+ if (client) await client.stop();+ server.closeAllConnections();+ await new Promise((done) => server.close(done));+ rmSync(root, { recursive: true, force: true });+}diff --git a/src/cli/connect/antigravity-cli.ts b/src/cli/connect/antigravity-cli.tsindex af64870f..05cc5b72 100644--- a/src/cli/connect/antigravity-cli.ts+++ b/src/cli/connect/antigravity-cli.ts@@ -18,11 +18,8 @@ import {writeJsonAtomic,} from "./util.js";-// The `agy` CLI shares no configuration with the Antigravity IDE that-// `antigravity.ts` wires — it reads MCP from ~/.gemini/config/mcp_config.json-// and hooks from ~/.gemini/config/hooks.json (per-workspace overrides in-// <repo>/.agents/hooks.json). Detection keys off ~/.gemini/antigravity-cli/,-// which only the CLI creates; ~/.gemini/ alone would also match Gemini CLI.+// Current Antigravity surfaces share ~/.gemini/config customizations.+// Detection keys off the CLI's own state directory, not Gemini CLI's home.// Sources: antigravity.google/docs/hooks, antigravity.google/docs/cli/usingconst GEMINI_DIR = join(homedir(), ".gemini");const ANTIGRAVITY_CLI_DIR = join(GEMINI_DIR, "antigravity-cli");@@ -34,9 +31,12 @@ export const adapter = createJsonMcpAdapter({displayName: "Antigravity CLI (agy)",detectDir: ANTIGRAVITY_CLI_DIR,configPath: join(CUSTOMIZATION_DIR, "mcp_config.json"),+ // agy does not expand shell-style ${NAME:-default} values. Inherit the+ // runtime environment so custom endpoints and credentials survive.+ extraEntryFields: { env: {} },docs: "https://github.com/rohitg00/agentmemory#other-agents",protocolNote:- "→ Using MCP via ~/.gemini/config/mcp_config.json (the agy CLI, not the Antigravity IDE — that one is `connect antigravity`). The `/mcp` slash command inside agy lists configured servers. Pass --with-hooks to also install the native ~/.gemini/config/hooks.json auto-capture hooks.",+ "→ Using MCP via ~/.gemini/config/mcp_config.json, shared with current Antigravity IDE versions. The `/mcp` slash command inside agy lists configured servers. Pass --with-hooks to also install the native ~/.gemini/config/hooks.json auto-capture hooks.",installHooks: installAntigravityCliHooks,});@@ -44,7 +44,7 @@ export const adapter = createJsonMcpAdapter({* Merge the bundled `plugin/hooks/hooks.antigravity.json` into* `~/.gemini/config/hooks.json`, replacing only the bundle agentmemory owns.*/-function installAntigravityCliHooks(opts: ConnectOptions): ConnectResult {+export function installAntigravityCliHooks(opts: ConnectOptions): ConnectResult {let pluginRoot: string;try {pluginRoot = findPluginRoot();diff --git a/src/cli/connect/antigravity.ts b/src/cli/connect/antigravity.tsindex 559a7b7c..a434d071 100644--- a/src/cli/connect/antigravity.ts+++ b/src/cli/connect/antigravity.ts@@ -1,25 +1,28 @@+import { existsSync } from "node:fs";import { homedir, platform } from "node:os";import { join } from "node:path";import { createJsonMcpAdapter } from "./json-mcp-adapter.js";+import { installAntigravityCliHooks } from "./antigravity-cli.js";-// Antigravity stores MCP config in mcp_config.json under its app-// support directory. The schema follows the standard MCP envelope —-// `{ mcpServers: { ... } }`. Path varies by platform:-// macOS: ~/Library/Application Support/Antigravity/User/mcp_config.json-// Linux: ~/.config/Antigravity/User/mcp_config.json-// Windows: %APPDATA%/Antigravity/User/mcp_config.json-// Connect is gated on win32 elsewhere; we cover macOS + Linux here.-const ANTIGRAVITY_DIR =+const LEGACY_USER_DIR =platform() === "darwin"? join(homedir(), "Library", "Application Support", "Antigravity", "User"): join(homedir(), ".config", "Antigravity", "User");-export const adapter = createJsonMcpAdapter({+const CUSTOMIZATION_DIR = join(homedir(), ".gemini", "config");+const mcpAdapter = createJsonMcpAdapter({name: "antigravity",displayName: "Antigravity",- detectDir: ANTIGRAVITY_DIR,- configPath: join(ANTIGRAVITY_DIR, "mcp_config.json"),+ detectDir: join(homedir(), ".gemini", "antigravity-ide"),+ configPath: join(CUSTOMIZATION_DIR, "mcp_config.json"),+ extraEntryFields: { env: {} },docs: "https://github.com/rohitg00/agentmemory#other-agents",protocolNote:- "→ Using MCP via mcp_config.json. Antigravity replaces Gemini CLI (sunset 2026-06-18).",+ "→ Using MCP via ~/.gemini/config/mcp_config.json, shared by current Antigravity surfaces. Pass --with-hooks for capture through ~/.gemini/config/hooks.json.",+ installHooks: installAntigravityCliHooks,});++export const adapter = {+ ...mcpAdapter,+ detect: () => mcpAdapter.detect() || existsSync(join(homedir(), ".gemini", "antigravity")) || existsSync(LEGACY_USER_DIR),+};diff --git a/src/functions/export-import.ts b/src/functions/export-import.tsindex eb49f012..c2a0add0 100644--- a/src/functions/export-import.ts+++ b/src/functions/export-import.ts@@ -226,7 +226,7 @@ export function registerExportImportFunction(sdk: IIIClient, kv: StateKV): voidconst 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"]);+ 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"]);if (!supportedVersions.has(importData.version)) {return {success: false,diff --git a/src/hooks/antigravity-bridge.ts b/src/hooks/antigravity-bridge.tsindex 60e65bac..8abfd07b 100644--- a/src/hooks/antigravity-bridge.ts+++ b/src/hooks/antigravity-bridge.ts@@ -1,13 +1,14 @@#!/usr/bin/env nodeimport { spawnSync } from "node:child_process";-import { dirname, join, resolve } from "node:path";+import { realpathSync } from "node:fs";+import { dirname, join } from "node:path";import { fileURLToPath } from "node:url";// Antigravity CLI (`agy`) bridge — sits in front of the canonical hooks// because three parts of agy's contract make them unusable as direct// `command` targets: only five events exist (no SessionStart/SessionEnd/-// UserPromptSubmit, so the lifecycle is synthesized from PreInvocation and-// Stop); the payload is camelCase and nests tool calls under `toolCall`; and+// UserPromptSubmit, so session boundaries use PreInvocation and Stop and+// prompts come from the transcript); tool calls are nested under `toolCall`; and// stdout must be a JSON object, which `pre-tool-use.mjs` breaks when// AGENTMEMORY_INJECT_CONTEXT=true makes it write raw context text.//@@ -117,7 +118,10 @@ export function normalizePayload(event: string, raw: Json): Json {out["native_tool_name"] = rawName;}out["tool_input"] = args;- const result = toolCall["result"] ?? raw["toolResult"] ?? raw["result"];+ if (out["tool_use_id"] === undefined && Number.isInteger(raw["stepIdx"]) && (raw["stepIdx"] as number) >= 0) {+ out["tool_use_id"] = `step:${raw["stepIdx"]}`;+ }+ const result = toolCall["result"] ?? raw["toolResult"] ?? raw["result"] ?? firstString(raw["error"]);if (result !== undefined) out["tool_result"] = result;}@@ -125,25 +129,20 @@ export function normalizePayload(event: string, raw: Json): Json {}// Map an Antigravity event to the bundled scripts it should drive.-// PreInvocation stands in for both SessionStart and UserPromptSubmit: the-// first invocation of a conversation opens the session, every later one is a-// fresh user turn. PostInvocation is deliberately unmapped — PostToolUse-// already captures the work, and firing again would double-record it.+// PreInvocation fires per model call, not per user prompt. Antigravity omits+// prompt text from that payload; session-end backfills it from the transcript.export function targetsFor(event: string, raw: Json): string[] {switch (event) {case "PreInvocation": {const n = raw["invocationNum"];- const isFirst = typeof n !== "number" || n <= 1;- return isFirst- ? ["session-start.mjs", "prompt-submit.mjs"]- : ["prompt-submit.mjs"];+ return typeof n !== "number" || n === 0 ? ["session-start.mjs"] : [];}case "PreToolUse":return ["pre-tool-use.mjs"];case "PostToolUse":return ["post-tool-use.mjs"];case "Stop":- return ["stop.mjs", "session-end.mjs"];+ return raw["fullyIdle"] === false ? [] : ["session-end.mjs"];default:return [];}@@ -152,8 +151,11 @@ export function targetsFor(event: string, raw: Json): string[] {// The stdout contract, per event. agy treats a PreToolUse response without// `decision` as a denial, so a bare `{}` there makes it refuse every matched// tool call (verified on 1.0.15). No other event carries a permission-// decision, so they stay on `{}` — sending one would override user settings.-export function responseFor(event: string): string {+// decision. PreInvocation can inject recalled context as an ephemeral step.+export function responseFor(event: string, context = ""): string {+ if (event === "PreInvocation" && context) {+ return JSON.stringify({ injectSteps: [{ ephemeralMessage: context }] });+ }return event === "PreToolUse" ? '{"decision":"allow"}' : "{}";}@@ -175,19 +177,22 @@ async function main() {if (!raw || typeof raw !== "object") return;const payload = JSON.stringify(normalizePayload(event, raw));+ let context = "";for (const script of targetsFor(event, raw)) {// Synchronous so the hook process does not exit before the capture// POSTs are issued. Each bundled hook already caps its own fetch// timeout, so the worst case here is bounded by those.- spawnSync(process.execPath, [join(SCRIPTS_DIR, script)], {+ const child = spawnSync(process.execPath, [join(SCRIPTS_DIR, script)], {input: payload,- // Child stdout is discarded on purpose: Antigravity parses this- // process's stdout as the hook response, and the bundled scripts- // emit prose when context injection is enabled.- stdio: ["pipe", "ignore", "ignore"],+ encoding: "utf8",+ stdio: ["pipe", "pipe", "ignore"],});+ if (event === "PreInvocation" && script === "session-start.mjs" && child.status === 0) {+ context = child.stdout?.trim() ?? "";+ }}+ return context;}// Guarded so the pure helpers above stay importable from tests without the@@ -195,16 +200,16 @@ async function main() {// needs no such guard.const invokedDirectly =process.argv[1] !== undefined &&- resolve(process.argv[1]) === fileURLToPath(import.meta.url);+ realpathSync(process.argv[1]) === fileURLToPath(import.meta.url);if (invokedDirectly) {main()- .catch(() => {})- .finally(() => {+ .catch(() => undefined)+ .then((context) => {// Always a well-formed, non-blocking response, emitted even when the// capture above threw or the payload was unparseable — a hook that// writes nothing is as fatal to PreToolUse as one that writes `{}`.- process.stdout.write(responseFor(process.argv[2] ?? ""));+ process.stdout.write(responseFor(process.argv[2] ?? "", context));process.exit(0);});}diff --git a/src/hooks/session-end.ts b/src/hooks/session-end.tsindex 61895918..8de00319 100644--- a/src/hooks/session-end.ts+++ b/src/hooks/session-end.ts@@ -23,6 +23,9 @@ function extractTranscriptPrompts(data: Record<string, unknown>): string[] {if (!line.trim()) continue;let msg: {role?: string;+ type?: string;+ source?: string;+ content?: unknown;message?: { content?: Array<{ type?: string; text?: string }> };};try {@@ -30,6 +33,13 @@ function extractTranscriptPrompts(data: Record<string, unknown>): string[] {} catch {continue;}+ if (msg.type === "USER_INPUT" && msg.source === "USER_EXPLICIT" && typeof msg.content === "string") {+ if (prompts.length >= 50) return prompts;+ const match = msg.content.match(/<USER_REQUEST>\n?([\s\S]*?)\n?<\/USER_REQUEST>/);+ const text = (match ? match[1] : msg.content).trim();+ if (text) prompts.push(text.slice(0, 8000));+ continue;+ }if (msg.role !== "user") continue;for (const block of msg.message?.content ?? []) {if (prompts.length >= 50) return prompts;diff --git a/src/hooks/session-start.ts b/src/hooks/session-start.tsindex 2103216d..91542130 100644--- a/src/hooks/session-start.ts+++ b/src/hooks/session-start.ts@@ -38,6 +38,9 @@ function wantsStructuredOutput(data: Record<string, unknown>): boolean {}function contextPayload(data: Record<string, unknown>, context: string): string {+ if (process.env["COPILOT_PLUGIN_ROOT"] && !data.hook_event_name) {+ return JSON.stringify({ additionalContext: context });+ }if (typeof data.cursor_version === "string" ||data.hook_event_name === "sessionStart"diff --git a/src/mcp/plugin-bridge.ts b/src/mcp/plugin-bridge.tsindex 49fbe8d4..01967881 100644--- a/src/mcp/plugin-bridge.ts+++ b/src/mcp/plugin-bridge.ts@@ -1,4 +1,5 @@import { pathToFileURL } from "node:url";+import { realpathSync } from "node:fs";import { VERSION } from "../version.js";import { resolveClientSecret } from "../secret-store.js";import { resolveEnvOrEmpty } from "./rest-proxy.js";@@ -116,7 +117,7 @@ export function createPluginBridge(): RequestHandler {};}-if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {+if (process.argv[1] && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) {try {createStdioTransport(createPluginBridge()).start();} catch {diff --git a/src/types.ts b/src/types.tsindex 02c1b520..f9a1298f 100644--- a/src/types.ts+++ b/src/types.ts@@ -356,7 +356,7 @@ export interface ExportPagination {}export interface ExportData {- version: "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";+ version: "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";exportedAt: string;sessions: Session[];observations: Record<string, CompressedObservation[]>;diff --git a/src/version.ts b/src/version.tsindex 2d78ca2d..95b0e98e 100644--- a/src/version.ts+++ b/src/version.ts@@ -1,2 +1,2 @@-export const VERSION = "0.9.29";+export const VERSION = "0.9.30";export const III_PINNED_VERSION = "0.22.1";diff --git a/test/antigravity-connect-hooks.test.ts b/test/antigravity-connect-hooks.test.tsindex 7b33f1e6..1bb043aa 100644--- a/test/antigravity-connect-hooks.test.ts+++ b/test/antigravity-connect-hooks.test.ts@@ -311,6 +311,16 @@ describe("antigravity bridge payload normalization", () => {);});+ it("preserves native failures and the trajectory step used for replay deduplication", () => {+ const out = normalizePayload("PostToolUse", {+ stepIdx: 0,+ toolCall: { name: "run_command", args: { CommandLine: "npm test" } },+ error: "exit status 1",+ });+ expect(out["tool_use_id"]).toBe("step:0");+ expect(out["tool_result"]).toBe("exit status 1");+ });+it("falls back to a placeholder session id rather than dropping the event", () => {expect(normalizePayload("Stop", {})["session_id"]).toBe("unknown");});@@ -352,13 +362,11 @@ describe("antigravity bridge stdout contract", () => {describe("antigravity bridge event routing", () => {it("opens the session on the first invocation only", () => {- expect(targetsFor("PreInvocation", { invocationNum: 1 })).toEqual([+ expect(targetsFor("PreInvocation", { invocationNum: 0 })).toEqual(["session-start.mjs",- "prompt-submit.mjs",- ]);- expect(targetsFor("PreInvocation", { invocationNum: 4 })).toEqual([- "prompt-submit.mjs",]);+ expect(targetsFor("PreInvocation", { invocationNum: 1 })).toEqual([]);+ expect(targetsFor("PreInvocation", { invocationNum: 4 })).toEqual([]);});it("treats a missing invocationNum as the first invocation", () => {@@ -366,7 +374,8 @@ describe("antigravity bridge event routing", () => {});it("closes the session on Stop", () => {- expect(targetsFor("Stop", {})).toEqual(["stop.mjs", "session-end.mjs"]);+ expect(targetsFor("Stop", {})).toEqual(["session-end.mjs"]);+ expect(targetsFor("Stop", { fullyIdle: false })).toEqual([]);});it("ignores PostInvocation to avoid double-capturing a turn", () => {diff --git a/test/antigravity-runtime.test.ts b/test/antigravity-runtime.test.tsnew file mode 100644index 00000000..362ee690--- /dev/null+++ b/test/antigravity-runtime.test.ts@@ -0,0 +1,122 @@+import { afterEach, describe, expect, it } from "vitest";+import { execFile } from "node:child_process";+import { promisify } from "node:util";+import { createServer, type Server } from "node:http";+import { mkdtempSync, rmSync, symlinkSync, writeFileSync } from "node:fs";+import { tmpdir } from "node:os";+import { join, resolve } from "node:path";++const exec = promisify(execFile);+let server: Server | undefined;+let root: string;+afterEach(async () => {+ if (server) await new Promise<void>((done) => server!.close(() => done()));+ if (root) rmSync(root, { recursive: true, force: true });+});++describe("bundled Antigravity bridge", () => {+ it("injects context, captures transcript prompts and tool identities, and closes only when idle", async () => {+ root = mkdtempSync(join(tmpdir(), "am-agy-runtime-"));+ const plugin = join(root, "plugin");+ symlinkSync(+ resolve(__dirname, "../plugin"),+ plugin,+ process.platform === "win32" ? "junction" : "dir",+ );+ const posts: Array<{ path: string; body: any }> = [];+ server = createServer(async (req, res) => {+ let raw = "";+ for await (const chunk of req) raw += chunk;+ posts.push({ path: req.url!, body: JSON.parse(raw || "{}") });+ res.setHeader("content-type", "application/json");+ res.end(JSON.stringify({ context: "Synthetic recalled decision" }));+ });+ await new Promise<void>((done) => server!.listen(0, "127.0.0.1", done));+ const port = (server.address() as { port: number }).port;+ const transcriptPath = join(root, "transcript.jsonl");+ writeFileSync(+ transcriptPath,+ [+ {+ step_index: 0,+ type: "USER_INPUT",+ source: "USER_EXPLICIT",+ content:+ "<USER_REQUEST>\nRead sample.txt.\n</USER_REQUEST>\n<ADDITIONAL_METADATA>synthetic metadata</ADDITIONAL_METADATA>",+ },+ {+ step_index: 1,+ type: "PLANNER_RESPONSE",+ source: "MODEL",+ content: "Not a user prompt",+ },+ {+ step_index: 2,+ type: "USER_INPUT",+ source: "SYSTEM",+ content: "Not an explicit user prompt",+ },+ ]+ .map((row) => JSON.stringify(row))+ .join("\n"),+ );+ const run = async (event: string, extra = {}) => {+ const child = exec(+ process.execPath,+ [join(plugin, "scripts/antigravity-bridge.mjs"), event],+ {+ env: {+ ...process.env,+ AGENTMEMORY_URL: `http://127.0.0.1:${port}`,+ AGENTMEMORY_INJECT_CONTEXT: "true",+ AGENTMEMORY_DATA_DIR: join(root, "capture"),+ },+ timeout: 15_000,+ },+ );+ child.child.stdin!.end(+ JSON.stringify({+ conversationId: "ag-test",+ workspacePaths: [root],+ transcriptPath,+ ...extra,+ }),+ );+ return JSON.parse((await child).stdout);+ };+ expect(await run("PreInvocation", { invocationNum: 0 })).toEqual({+ injectSteps: [{ ephemeralMessage: "Synthetic recalled decision" }],+ });+ expect(await run("PreInvocation", { invocationNum: 1 })).toEqual({});+ expect(+ await run("PreToolUse", {+ toolCall: { name: "view_file", args: { AbsolutePath: "/repo/a.ts" } },+ }),+ ).toEqual({ decision: "allow" });+ const tool = {+ stepIdx: 2,+ toolCall: { name: "view_file", args: { AbsolutePath: "/repo/a.ts" } },+ };+ await run("PostToolUse", tool);+ await run("PostToolUse", tool);+ await run("Stop", { fullyIdle: false });+ expect(posts.filter((p) => p.path.endsWith("/session/end"))).toHaveLength(+ 0,+ );+ await run("Stop", { fullyIdle: true });+ expect(posts.filter((p) => p.path.endsWith("/session/start"))).toHaveLength(+ 1,+ );+ expect(posts.filter((p) => p.path.endsWith("/session/end"))).toHaveLength(+ 1,+ );+ const prompts = posts.filter((p) => p.body.hookType === "prompt_submit");+ expect(prompts.map((p) => p.body.data.prompt)).toEqual([+ "Read sample.txt.",+ ]);+ const tools = posts.filter((p) => p.body.hookType === "post_tool_use");+ expect(tools).toHaveLength(2);+ expect(tools[0].body.data.tool_name).toBe("read");+ expect(tools[0].body.eventId).toBe(tools[1].body.eventId);+ }, 30_000);+});diff --git a/test/capture-review-fixes.test.ts b/test/capture-review-fixes.test.tsindex 7db797d9..5b64fc27 100644--- a/test/capture-review-fixes.test.ts+++ b/test/capture-review-fixes.test.ts@@ -132,7 +132,7 @@ describe("spool operations without the lock", () => {function statusInputs(capture: CaptureStatus | null | undefined): StatusInputs {return {now: new Date("2026-10-02T12:00:00.000Z"),- version: "0.10.0",+ version: "0.9.30",engineVersion: "0.22.1",uptimeSeconds: 60,stateBackend: "file",diff --git a/test/codex-live-daemon.test.ts b/test/codex-live-daemon.test.tsindex 1208e890..7d9aa342 100644--- a/test/codex-live-daemon.test.ts+++ b/test/codex-live-daemon.test.ts@@ -1,6 +1,6 @@-import { afterAll, describe, expect, it } from "vitest";+import { afterEach, describe, expect, it } from "vitest";import { spawn, execFileSync, type ChildProcess } from "node:child_process";-import { mkdtempSync, readFileSync, writeFileSync, rmSync, mkdirSync } from "node:fs";+import { mkdtempSync, readFileSync, writeFileSync, rmSync, mkdirSync, cpSync } from "node:fs";import { homedir, tmpdir } from "node:os";import { join, resolve } from "node:path";import { createServer } from "node:net";@@ -24,7 +24,7 @@ async function stop(child: ChildProcess) {children.delete(child);}-afterAll(async () => {+afterEach(async () => {await Promise.all([...children].map(stop));if (sandbox) rmSync(sandbox, { recursive: true, force: true });});@@ -77,7 +77,7 @@ function mcp(script: string, cwd: string, env: NodeJS.ProcessEnv) {return { child, request, tool };}-describe.skipIf(!engineBin)("local plugin against the pinned iii daemon", () => {+describe.skipIf(!engineBin).each(["codex", "copilot", "antigravity"] as const)("%s plugin against the pinned iii daemon", (host) => {it("authenticates locally, captures and recovers hooks, shares memory, and persists across restart", async () => {// vitest.config.ts isolates user configuration for the entire test process.expect(homedir()).toContain("agentmemory-test-home-");@@ -112,8 +112,12 @@ describe.skipIf(!engineBin)("local plugin against the pinned iii daemon", () =>}throw new Error(`Daemon failed to become ready:\n${engine.diagnostic()}\n${worker.diagnostic()}`);};- const packaged = join(root, "dist/plugins/agentmemory-codex-local");- const codex = mcp(join(packaged, "scripts/plugin-bridge.mjs"), packaged, env);+ const packaged = host === "codex" ? join(root, "dist/plugins/agentmemory-codex-local") : join(sandbox, `${host} plugin`);+ if (host !== "codex") cpSync(join(root, "plugin"), packaged, { recursive: true });+ const configPath = join(packaged, ".mcp.json");+ const mcpConfig = JSON.parse(readFileSync(configPath, "utf8")).mcpServers.agentmemory;+ const bridge = resolve(packaged, mcpConfig.args[0].replaceAll("${CLAUDE_PLUGIN_ROOT}", packaged));+ const codex = mcp(bridge, packaged, env);await codex.request("initialize", { protocolVersion: "2025-11-25" });expect((await codex.request("tools/list")).error).toBeDefined();let running = await daemon();@@ -134,11 +138,42 @@ describe.skipIf(!engineBin)("local plugin against the pinned iii daemon", () =>const cwd = join(sandbox, "smoke-alpha");mkdirSync(cwd);const sessionId = `ses_${token}`;+ let step = 0;const hook = async (name: string, input: Record<string, unknown>) => {- const { child, diagnostic } = launch(process.execPath, [join(packaged, `scripts/${name}.mjs`)], cwd, env);+ const event = { "session-start": "PreInvocation", "post-tool-use": "PostToolUse", stop: "Stop" }[name];+ const args = host === "antigravity"+ ? [join(packaged, "scripts/antigravity-bridge.mjs"), event!]+ : [join(packaged, `scripts/${name}.mjs`)];+ const { child, diagnostic } = launch(process.execPath, args, cwd, env);child.stdout.resume();const exit = new Promise<number | null>((done) => child.once("exit", done));- child.stdin.end(JSON.stringify({ session_id: sessionId, cwd, ...input }));+ const payload: Record<string, unknown> = { session_id: sessionId, cwd, ...input };+ if (host === "copilot") {+ for (const [from, to] of Object.entries({ session_id: "sessionId", tool_name: "toolName", tool_input: "toolArgs", tool_use_id: "toolUseId" })) {+ if (payload[from] !== undefined) { payload[to] = payload[from]; delete payload[from]; }+ }+ if (payload.tool_response !== undefined) {+ payload.toolResult = { resultType: "success", textResultForLlm: payload.tool_response };+ delete payload.tool_response;+ }+ }+ if (host === "antigravity") {+ payload.conversationId = sessionId;+ payload.workspacePaths = [cwd];+ payload.invocationNum = 0;+ payload.fullyIdle = true;+ delete payload.session_id;+ delete payload.cwd;+ if (payload.tool_name) {+ payload.stepIdx = step++;+ payload.toolCall = { name: "run_command", args: { CommandLine: (payload.tool_input as { cmd: string }).cmd } };+ delete payload.tool_name;+ delete payload.tool_input;+ delete payload.tool_response;+ delete payload.tool_use_id;+ }+ }+ child.stdin.end(JSON.stringify(payload));const code = await exit;expect(code, diagnostic()).toBe(0);};diff --git a/test/codex-plugin.test.ts b/test/codex-plugin.test.tsindex 6b711197..6946a36a 100644--- a/test/codex-plugin.test.ts+++ b/test/codex-plugin.test.ts@@ -81,15 +81,11 @@ describe("Codex plugin manifest (developers.openai.com/codex/plugins)", () => {>;}>(join(pluginRoot, ".mcp.json"));- // env interpolation must include defaults so Claude Code (and- // any other MCP host that fails parse on unset ${VAR}) doesn't drop- // the server silently when the user hasn't exported the var.- expect(mcp.mcpServers.agentmemory?.env?.AGENTMEMORY_URL).toMatch(- /\$\{AGENTMEMORY_URL:-/,- );- expect(mcp.mcpServers.agentmemory?.env?.AGENTMEMORY_SECRET).toMatch(- /\$\{AGENTMEMORY_SECRET:-/,- );+ expect(mcp.mcpServers.agentmemory?.env).toBeUndefined();+ expect(mcp.mcpServers.agentmemory?.command).toBe("node");+ expect(mcp.mcpServers.agentmemory?.args).toEqual([+ "${CLAUDE_PLUGIN_ROOT}/scripts/plugin-bridge.mjs",+ ]);});it("hooks.codex.json contains only events Codex supports (no Subagent / SessionEnd / Notification / TaskCompleted / PostToolUseFailure)", () => {diff --git a/test/connect-new-agents.test.ts b/test/connect-new-agents.test.tsindex 3c16a0b0..876eda86 100644--- a/test/connect-new-agents.test.ts+++ b/test/connect-new-agents.test.ts@@ -1,5 +1,5 @@import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";-import { mkdtempSync, mkdirSync, rmSync, readFileSync, existsSync } from "node:fs";+import { mkdtempSync, mkdirSync, rmSync, readFileSync, existsSync, writeFileSync } from "node:fs";import { tmpdir, platform } from "node:os";import { join } from "node:path";@@ -76,23 +76,26 @@ describe("connect: Antigravity", () => {rmSync(home, { recursive: true, force: true });});- it("writes mcpServers.agentmemory to the platform-specific config path", async () => {- const isMac = platform() === "darwin";- const userDir = isMac+ it.each(["antigravity", "antigravity-ide", "legacy"])("detects %s and writes the shared config while preserving other servers", async (surface) => {+ const legacyDir = platform() === "darwin"? join(home, "Library", "Application Support", "Antigravity", "User"): join(home, ".config", "Antigravity", "User");- mkdirSync(userDir, { recursive: true });+ mkdirSync(surface === "legacy" ? legacyDir : join(home, ".gemini", surface), { recursive: true });+ const configDir = join(home, ".gemini", "config");+ mkdirSync(configDir, { recursive: true });+ writeFileSync(join(configDir, "mcp_config.json"), JSON.stringify({ mcpServers: { existing: { command: "custom" } } }));const { adapter } = await import("../src/cli/connect/antigravity.js");expect(adapter.detect()).toBe(true);- const result = await adapter.install({ dryRun: false, force: false });+ const result = await adapter.install({ dryRun: false, force: false, withHooks: true });expect(result.kind).toBe("installed");const cfg = JSON.parse(- readFileSync(join(userDir, "mcp_config.json"), "utf-8"),+ readFileSync(join(configDir, "mcp_config.json"), "utf-8"),);expect(cfg.mcpServers.agentmemory.command).toBe("npx");- expect(cfg.mcpServers.agentmemory.env.AGENTMEMORY_URL).toMatch(- /\$\{AGENTMEMORY_URL:-/,- );+ expect(cfg.mcpServers.existing).toEqual({ command: "custom" });+ expect(existsSync(join(legacyDir, "mcp_config.json"))).toBe(false);+ expect(JSON.parse(readFileSync(join(configDir, "hooks.json"), "utf8")).agentmemory.enabled).toBe(true);+ expect(cfg.mcpServers.agentmemory.env).toEqual({});});});diff --git a/test/copilot-plugin.test.ts b/test/copilot-plugin.test.tsindex cd01b2d8..3b1295b4 100644--- a/test/copilot-plugin.test.ts+++ b/test/copilot-plugin.test.ts@@ -1,5 +1,6 @@import { describe, expect, it } from "vitest";-import { readFileSync, existsSync } from "node:fs";+import { readFileSync, existsSync, mkdtempSync, cpSync, rmSync } from "node:fs";+import { tmpdir } from "node:os";import { join, resolve } from "node:path";import { createServer } from "node:http";import { spawn } from "node:child_process";@@ -112,13 +113,9 @@ describe("Copilot MCP config (.mcp.copilot.json)", () => {}>(mcpPath);const server = config.mcpServers.agentmemory;expect(server.type).toBe("local");- expect(server.command).toBe("npx");- expect(server.args).toEqual(["-y", "@agentmemory/mcp"]);- expect(server.env["AGENTMEMORY_URL"]).toBe(- "${AGENTMEMORY_URL:-http://localhost:3111}",- );- expect(server.env["AGENTMEMORY_SECRET"]).toBe("${AGENTMEMORY_SECRET:-}");- expect(server.env["AGENTMEMORY_TOOLS"]).toBe("${AGENTMEMORY_TOOLS:-all}");+ expect(server.command).toBe("node");+ expect(server.args).toEqual(["${COPILOT_PLUGIN_ROOT}/scripts/plugin-bridge.mjs"]);+ expect(server.env).toBeUndefined();expect(server.tools).toContain("*");});});@@ -198,7 +195,7 @@ describe("Copilot hooks config (hooks/hooks.copilot.json)", () => {for (const entries of Object.values(config.hooks)) {for (const handler of entries) {const cmd = handler.command ?? handler.bash ?? handler.powershell ?? "";- const match = cmd.match(/\$\{(?:COPILOT_PLUGIN_ROOT|CLAUDE_PLUGIN_ROOT)\}\/(scripts\/[^\s]+)/);+ const match = cmd.match(/\$\{(?:COPILOT_PLUGIN_ROOT|CLAUDE_PLUGIN_ROOT)\}\/(scripts\/[^\s"']+)/);if (match) scriptRefs.add(match[1]);}}@@ -216,6 +213,7 @@ describe("Copilot hook scripts", () => {script: string,payload: Record<string, unknown>,env: Record<string, string> = {},+ command?: string,): Promise<{ requests: ObservedRequest[]; stdout: string }> {const requests: ObservedRequest[] = [];const server = createServer((req, res) => {@@ -244,7 +242,8 @@ describe("Copilot hook scripts", () => {}try {- const child = spawn(process.execPath, [join(pluginRoot, script)], {+ const child = spawn(command ?? process.execPath, command ? [] : [join(pluginRoot, script)], {+ shell: Boolean(command),env: {...process.env,AGENTMEMORY_URL: `http://127.0.0.1:${address.port}`,@@ -300,6 +299,39 @@ describe("Copilot hook scripts", () => {});});+ it("runs the manifest command from an installed path containing spaces", async () => {+ const sandbox = mkdtempSync(join(tmpdir(), "copilot plugin "));+ const installed = join(sandbox, "agentmemory");+ cpSync(pluginRoot, installed, { recursive: true });+ try {+ const hooks = readJson<{ hooks: Record<string, { command: string }[]> }>(+ join(installed, "hooks/hooks.copilot.json"),+ );+ const command = hooks.hooks.postToolUse[0].command.replaceAll("${COPILOT_PLUGIN_ROOT}", installed);+ const result = await runHook("", {+ sessionId: "copilot-manifest-session",+ cwd: sandbox,+ toolName: "view",+ toolArgs: { path: "sample.txt" },+ toolResult: { resultType: "success", textResultForLlm: "synthetic capture" },+ }, {}, command);+ expect(result.requests.find((r) => r.path === "/agentmemory/observe")?.body).toMatchObject({+ sessionId: "copilot-manifest-session",+ hookType: "post_tool_use",+ data: { tool_name: "view", tool_output: "synthetic capture" },+ });+ } finally {+ rmSync(sandbox, { recursive: true, force: true });+ }+ });++ it("returns the JSON context consumed by the native Copilot sessionStart hook", async () => {+ const result = await runHook("scripts/session-start.mjs", {+ sessionId: "copilot-context", cwd: "/repo", source: "startup",+ }, { AGENTMEMORY_INJECT_CONTEXT: "true", COPILOT_PLUGIN_ROOT: pluginRoot });+ expect(JSON.parse(result.stdout)).toEqual({ additionalContext: "remembered context" });+ });+it("pre-tool-use narrows Copilot sessionId to strings", async () => {const result = await runHook("scripts/pre-tool-use.mjs",diff --git a/test/graph-compact-boot.test.ts b/test/graph-compact-boot.test.tsindex bd1f88de..fa81a2ab 100644--- a/test/graph-compact-boot.test.ts+++ b/test/graph-compact-boot.test.ts@@ -336,7 +336,7 @@ describe("AGENTMEMORY_GRAPH_COMPACT_ON_BOOT", () => {describe("graph compaction in /agentmemory/status", () => {const base: StatusInputs = {now: new Date("2026-10-01T12:00:00.000Z"),- version: "0.10.0",+ version: "0.9.30",engineVersion: "0.22.1",uptimeSeconds: 10,stateBackend: "file",diff --git a/test/mcp-surface-default.test.ts b/test/mcp-surface-default.test.tsindex cb26cd27..ac50b909 100644--- a/test/mcp-surface-default.test.ts+++ b/test/mcp-surface-default.test.ts@@ -50,18 +50,11 @@ describe("MCP tool surface default", () => {}});- it("plugin .mcp.json provides default env interpolation so CC parse never fails", () => {- const raw = readFileSync("plugin/.mcp.json", "utf-8");- const cfg = JSON.parse(raw) as {- mcpServers: { agentmemory: { env: Record<string, string> } };- };- const env = cfg.mcpServers.agentmemory.env;- // Per Claude Code MCP docs: ${VAR} without a default fails config- // parse when VAR is unset, silently dropping the server. ${VAR:-x}- // form is what unblocks fresh installs that haven't exported- // AGENTMEMORY_URL.- expect(env["AGENTMEMORY_URL"]).toMatch(/\$\{AGENTMEMORY_URL:-/);- expect(env["AGENTMEMORY_SECRET"]).toMatch(/\$\{AGENTMEMORY_SECRET:-/);- expect(env["AGENTMEMORY_TOOLS"]).toMatch(/\$\{AGENTMEMORY_TOOLS:-all\}/);+ it("plugin MCP uses its bundled bridge and inherits the host environment", () => {+ const cfg = JSON.parse(readFileSync("plugin/.mcp.json", "utf-8"));+ expect(cfg.mcpServers.agentmemory).toEqual({+ command: "node",+ args: ["${CLAUDE_PLUGIN_ROOT}/scripts/plugin-bridge.mjs"],+ });});});diff --git a/test/plugin-bridge-entrypoint.test.ts b/test/plugin-bridge-entrypoint.test.tsnew file mode 100644index 00000000..c128ed36--- /dev/null+++ b/test/plugin-bridge-entrypoint.test.ts@@ -0,0 +1,24 @@+import { describe, expect, it } from "vitest";+import { execFileSync } from "node:child_process";+import { mkdtempSync, rmSync, symlinkSync } from "node:fs";+import { tmpdir } from "node:os";+import { join, resolve } from "node:path";++describe("bundled MCP bridge entrypoint", () => {+ it("answers initialize when the plugin directory is reached through a symlink", () => {+ const sandbox = mkdtempSync(join(tmpdir(), "agentmemory-linked-plugin-"));+ try {+ const linked = join(sandbox, "plugin link");+ symlinkSync(resolve(__dirname, "../plugin"), linked, "junction");+ const output = execFileSync(process.execPath, [join(linked, "scripts/plugin-bridge.mjs")], {+ input: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "initialize", params: { protocolVersion: "2025-11-25" } }) + "\n",+ encoding: "utf8",+ timeout: 5000,+ env: { ...process.env, AGENTMEMORY_URL: "http://127.0.0.1:1", AGENTMEMORY_SECRET: "" },+ });+ expect(JSON.parse(output)).toMatchObject({ id: 1, result: { serverInfo: { name: "agentmemory" } } });+ } finally {+ rmSync(sandbox, { recursive: true, force: true });+ }+ });+});diff --git a/test/plugin-published-compatibility.test.ts b/test/plugin-published-compatibility.test.tsindex 946a63d7..c0571f03 100644--- a/test/plugin-published-compatibility.test.ts+++ b/test/plugin-published-compatibility.test.ts@@ -1,8 +1,8 @@import { describe, expect, it } from "vitest";import { publishedCompatibilityErrors } from "../scripts/plugins/verify-published.mjs";-const local = { version: "0.10.0", dependencies: { "iii-sdk": "0.22.1", "@iii-dev/helpers": "0.22.1" } };-const shim = { version: "0.10.0", dependencies: { "@agentmemory/agentmemory": "0.10.0" } };+const local = { version: "0.9.30", dependencies: { "iii-sdk": "0.22.1", "@iii-dev/helpers": "0.22.1" } };+const shim = { version: "0.9.30", dependencies: { "@agentmemory/agentmemory": "0.9.30" } };describe("published plugin compatibility gate", () => {it("accepts an exact runtime, engine SDK, helper, and shim match", () => {diff --git a/website/app/benchmarks/page.module.css b/website/app/benchmarks/page.module.cssnew file mode 100644index 00000000..15af8fa9--- /dev/null+++ b/website/app/benchmarks/page.module.css@@ -0,0 +1,39 @@+.figure {+ margin-bottom: var(--s-8);+}++.tableWrap {+ overflow-x: auto;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+}++.tableWrap table {+ font-variant-numeric: tabular-nums;+}++.tableWrap td,+.tableWrap th {+ white-space: nowrap;+}++.tableWrap tr:last-child td {+ border-bottom: 0;+}++.tableWrap td:first-child {+ color: var(--ink);+}++.facts {+ list-style: none;+ padding: 0 !important;+}++.facts li {+ padding: 12px 14px;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+}diff --git a/website/app/benchmarks/page.tsx b/website/app/benchmarks/page.tsxnew file mode 100644index 00000000..6070b234--- /dev/null+++ b/website/app/benchmarks/page.tsx@@ -0,0 +1,243 @@+import type { Metadata } from "next";+import { DocPage, Prose } from "@/components/site/Doc";+import { QuestionDots } from "@/components/site/BenchFigures";+import { LONGMEMEVAL, TOKENS, src } from "@/lib/site";+import { BUDGETS, RECOVERY_FACTS, REPRODUCE, TOKEN_SETUP, TYPE_HITS, benchSrc } from "@/lib/bench";+import s from "./page.module.css";++export const metadata: Metadata = {+ title: "Benchmarks",+ description:+ "How agentmemory is measured: LongMemEval-S retrieval recall, token cost per query, crash recovery and the resource budgets the cost bench enforces. Every number links to its source file.",+ alternates: { canonical: "/benchmarks" },+};++const pct = (n: number) => `${n.toFixed(1)}%`;+const mib = (kib: number) => `${(kib / 1024).toFixed(0)} MiB`;+const kib = (bytes: number) => `${(bytes / 1024).toFixed(1)} KiB`;+const sec = (ms: number) => `${(ms / 1000).toFixed(1)} s`;++const TOKEN_ROWS = [+ { name: "Load every observation", r5: 37.0, r10: 55.8, p5: 78.0, ndcg: 80.3, mrr: 82.5, tokens: TOKENS.fullContext },+ { name: "BM25 only, keyless", r5: 43.8, r10: 55.9, p5: 95.0, ndcg: 82.7, mrr: 95.5, tokens: TOKENS.agentmemory },+ { name: "BM25 + local vectors", r5: 43.8, r10: 64.1, p5: 98.0, ndcg: 94.9, mrr: 100.0, tokens: TOKENS.agentmemory },+];++function Src({ href, children }: { href: string; children: string }) {+ return (+ <a className="src" href={href} target="_blank" rel="noreferrer">+ {children}+ </a>+ );+}++export default function BenchmarksPage() {+ return (+ <DocPage+ eyebrow="Benchmarks"+ title="Measured in the open, reproducible on your machine."+ lede="Retrieval quality, token cost, crash recovery and resource budgets. Each table names the file it comes from and the command that regenerates it."+ >+ <div className={s.figure}>+ <QuestionDots />+ </div>++ <Prose>+ <h2>What is measured</h2>+ <ul>+ <li>+ <strong>Dataset.</strong> LongMemEval-S: {LONGMEMEVAL.questions} questions, about 48 sessions and 115K tokens+ per question. <Src href={src.dataset}>dataset</Src> <Src href={src.paper}>paper</Src>+ </li>+ <li>+ <strong>Metric.</strong> recall_any@K: does any gold session appear in the top K results. Each question builds+ a fresh index from its own sessions and searches with the question text.+ </li>+ <li>+ <strong>Embeddings.</strong> {LONGMEMEVAL.embedding}. No API key and no LLM in the loop.+ </li>+ <li>+ <strong>What it is not.</strong> This is retrieval recall, not end-to-end answer accuracy. The official+ LongMemEval score adds answer generation and an LLM judge, and we do not claim one.+ </li>+ </ul>++ <h2>Retrieval recall</h2>+ <div className={s.tableWrap}>+ <table>+ <thead>+ <tr>+ <th>Mode</th>+ <th>R@5</th>+ <th>R@10</th>+ <th>R@20</th>+ <th>NDCG@10</th>+ <th>MRR</th>+ </tr>+ </thead>+ <tbody>+ {[+ { name: "BM25 + vectors", d: LONGMEMEVAL.hybrid },+ { name: "BM25 only, keyless", d: LONGMEMEVAL.bm25 },+ ].map((r) => (+ <tr key={r.name}>+ <td>{r.name}</td>+ <td>{pct(r.d.r5)}</td>+ <td>{pct(r.d.r10)}</td>+ <td>{pct(r.d.r20)}</td>+ <td>{pct(r.d.ndcg10)}</td>+ <td>{pct(r.d.mrr)}</td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ <p>+ Adding local vectors to BM25 lifts R@5 from {pct(LONGMEMEVAL.bm25.r5)} to {pct(LONGMEMEVAL.hybrid.r5)}.{" "}+ <Src href={src.longmemeval}>benchmark/LONGMEMEVAL.md</Src>+ </p>++ <h3>By question type, BM25 + vectors</h3>+ <div className={s.tableWrap}>+ <table>+ <thead>+ <tr>+ <th>Type</th>+ <th>Questions</th>+ <th>R@5</th>+ <th>R@10</th>+ <th>Found at top 5</th>+ </tr>+ </thead>+ <tbody>+ {LONGMEMEVAL.byType.map((t) => (+ <tr key={t.type}>+ <td>{t.type}</td>+ <td>{t.count}</td>+ <td>{pct(t.r5)}</td>+ <td>{pct(t.r10)}</td>+ <td>+ {TYPE_HITS.find((h) => h.type === t.type)?.hits[5]} of {t.count}+ </td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ <p>+ Preferences are the hardest type: they depend on implicit statements, and R@5 is {pct(LONGMEMEVAL.byType[5].r5)}.+ Knowledge updates and multi-session questions are the strongest.+ </p>++ <h2>Token cost per query</h2>+ <p>+ A smaller labeled set of coding-session observations: {TOKEN_SETUP.observations} observations across{" "}+ {TOKEN_SETUP.sessions} sessions and {TOKEN_SETUP.queries} queries, with {TOKEN_SETUP.model}. The baseline loads+ every observation into the prompt.+ </p>+ <div className={s.tableWrap}>+ <table>+ <thead>+ <tr>+ <th>Mode</th>+ <th>R@5</th>+ <th>R@10</th>+ <th>P@5</th>+ <th>NDCG@10</th>+ <th>MRR</th>+ <th>Tokens</th>+ </tr>+ </thead>+ <tbody>+ {TOKEN_ROWS.map((r) => (+ <tr key={r.name}>+ <td>{r.name}</td>+ <td>{pct(r.r5)}</td>+ <td>{pct(r.r10)}</td>+ <td>{pct(r.p5)}</td>+ <td>{pct(r.ndcg)}</td>+ <td>{pct(r.mrr)}</td>+ <td>{r.tokens.toLocaleString("en-US")}</td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ <p>+ {TOKENS.agentmemory.toLocaleString("en-US")} tokens instead of {TOKENS.fullContext.toLocaleString("en-US")} is{" "}+ {TOKENS.savedPct}% fewer, with higher precision, measured on v0.6.0.{" "}+ <Src href={src.tokens}>benchmark/REAL-EMBEDDINGS.md</Src>+ </p>++ <h2>Crash recovery</h2>+ <p>+ The cost bench runs the built package in an isolated home, captures N observations, kills the whole process+ tree with SIGKILL, boots it again and checks that nothing was lost.+ </p>+ <ul className={s.facts}>+ {RECOVERY_FACTS.map((f) => (+ <li key={f.value}>+ <strong>{f.value}</strong> {f.label}+ </li>+ ))}+ </ul>+ <p>+ <Src href={benchSrc.costsFigure}>docs/benchmarks/capture-costs.svg</Src>{" "}+ <Src href={benchSrc.readme}>benchmark/README.md</Src>+ </p>++ <h2>Resource budgets</h2>+ <p>+ The cost bench checks each run against these ceilings. They were derived from repeated runs, taking the worst run plus+ headroom, so they are upper limits rather than typical values, and they depend on the machine that runs them.+ The embed profile uses 768-dimension vectors.+ </p>+ <div className={s.tableWrap}>+ <table>+ <thead>+ <tr>+ <th>Profile</th>+ <th>Observations</th>+ <th>Hook p95</th>+ <th>Index ready after kill</th>+ <th>Disk per observation</th>+ <th>Idle memory</th>+ <th>Search tokens p50</th>+ </tr>+ </thead>+ <tbody>+ {BUDGETS.map((b) => (+ <tr key={`${b.profile}-${b.n}`}>+ <td>{b.profile}</td>+ <td>{b.n.toLocaleString("en-US")}</td>+ <td>{b.hookP95Ms} ms</td>+ <td>{sec(b.recoveryIndexReadyMs)}</td>+ <td>{kib(b.diskPerObsBytes)}</td>+ <td>{mib(b.idleRssKiB)}</td>+ <td>{b.searchTokensP50}</td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ <p>+ <Src href={benchSrc.budgets}>benchmark/capture-costs-budgets.json</Src>+ </p>++ <h2>Reproduce</h2>+ <p>Retrieval, from the repository root, after downloading the dataset:</p>+ <pre>+ <code>{`${REPRODUCE.download}\n\n${REPRODUCE.bm25}\n${REPRODUCE.hybrid}`}</code>+ </pre>+ <p>Costs and crash recovery, against the built package:</p>+ <pre>+ <code>{REPRODUCE.costs}</code>+ </pre>+ <p>+ Scripts: <Src href={benchSrc.longmemevalScript}>benchmark/longmemeval-bench.ts</Src>{" "}+ <Src href={benchSrc.realEmbeddingsScript}>benchmark/real-embeddings-eval.ts</Src>+ </p>+ </Prose>+ </DocPage>+ );+}diff --git a/website/app/changelog/changelog.module.css b/website/app/changelog/changelog.module.cssnew file mode 100644index 00000000..61a13bb7--- /dev/null+++ b/website/app/changelog/changelog.module.css@@ -0,0 +1,116 @@+.layout {+ display: grid;+ grid-template-columns: 200px minmax(0, 1fr);+ gap: clamp(24px, 5vw, 72px);+ align-items: start;+}++.toc {+ position: sticky;+ top: 84px;+ display: grid;+ gap: var(--s-3);+}++.toc > :global(.mono) {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+}++.toc ul {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ gap: 2px;+ border-left: 1px solid var(--line);+}++.toc a {+ display: flex;+ justify-content: space-between;+ gap: var(--s-2);+ padding: 4px 0 4px 12px;+ margin-left: -1px;+ border-left: 1px solid transparent;+ font-size: var(--t-12);+ color: var(--muted);+ transition: color var(--dur-1) ease, border-color var(--dur-1) ease;+}++.toc a :global(.mono) {+ color: var(--ink-2);+}++.toc a:hover {+ color: var(--ink);+ border-left-color: var(--ink);+}++.releases {+ display: grid;+ gap: var(--s-8);+ min-width: 0;+}++.release {+ display: grid;+ gap: var(--s-4);+ scroll-margin-top: 84px;+ min-width: 0;+}++.head {+ display: flex;+ align-items: baseline;+ gap: var(--s-4);+ padding-bottom: var(--s-3);+ border-bottom: 1px solid var(--line);+}++.head h2 {+ font-size: var(--t-31);+ letter-spacing: var(--track-head);+}++.head h2 a:hover {+ text-decoration: underline;+ text-underline-offset: 4px;+}++.head time {+ font-size: var(--t-12);+ color: var(--muted);+}++.release :global(ul ul) {+ margin-top: var(--s-2);+}++.release :global(h3) {+ font-size: var(--t-20);+}++.more {+ padding-top: var(--s-4);+}++@media (max-width: 900px) {+ .layout {+ grid-template-columns: minmax(0, 1fr);+ }+ .toc {+ position: static;+ }+ .toc ul {+ grid-template-columns: repeat(2, minmax(0, 1fr));+ border-left: 0;+ gap: 0 var(--s-4);+ }+ .toc a {+ padding-left: 0;+ border-left: 0;+ }+}diff --git a/website/app/changelog/page.tsx b/website/app/changelog/page.tsxnew file mode 100644index 00000000..06b913bf--- /dev/null+++ b/website/app/changelog/page.tsx@@ -0,0 +1,83 @@+import type { Metadata } from "next";+import changelog from "@/lib/generated-changelog.json" with { type: "json" };+import { DocPage, Prose } from "@/components/site/Doc";+import { Markdown } from "@/lib/markdown";+import { src } from "@/lib/site";+import s from "./changelog.module.css";++export const metadata: Metadata = {+ title: "Changelog",+ description: "Every agentmemory release: what changed, what was fixed, and what to do when you upgrade.",+ alternates: { canonical: "/changelog" },+};++interface Release {+ version: string;+ date: string;+ body: string;+}++function formatDate(d: string) {+ if (!d) return "";+ const date = new Date(`${d}T00:00:00Z`);+ return date.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric", timeZone: "UTC" });+}++export default function ChangelogPage() {+ const releases = changelog as Release[];+ return (+ <DocPage+ eyebrow="Changelog"+ title="What shipped, release by release."+ lede={+ <>+ The latest {releases.length} releases, generated from{" "}+ <a className="src" href={src.changelog} target="_blank" rel="noreferrer">+ CHANGELOG.md+ </a>{" "}+ when the site builds. Older releases are on GitHub.+ </>+ }+ >+ <div className={s.layout}>+ <nav className={s.toc} aria-label="Releases">+ <span className="mono">Releases</span>+ <ul>+ {releases.map((r) => (+ <li key={r.version}>+ <a href={`#v${r.version}`}>+ <span className="mono">v{r.version}</span>+ <span>{formatDate(r.date)}</span>+ </a>+ </li>+ ))}+ </ul>+ </nav>+ <div className={s.releases}>+ {releases.map((r) => (+ <article key={r.version} id={`v${r.version}`} className={s.release}>+ <header className={s.head}>+ <h2>+ <a href={`#v${r.version}`}>v{r.version}</a>+ </h2>+ {r.date && (+ <time className="mono" dateTime={r.date}>+ {formatDate(r.date)}+ </time>+ )}+ </header>+ <Prose>+ <Markdown source={r.body} idPrefix={`v${r.version}`} />+ </Prose>+ </article>+ ))}+ <p className={s.more}>+ <a className="btn btn-ghost" href={src.releases} target="_blank" rel="noreferrer">+ All releases on GitHub+ </a>+ </p>+ </div>+ </div>+ </DocPage>+ );+}diff --git a/website/app/globals.css b/website/app/globals.cssindex d4722678..e36c1202 100644--- a/website/app/globals.css+++ b/website/app/globals.css@@ -1,178 +1,358 @@:root {- --canvas: #0a0a0a;- --canvas-soft: #1a1c20;- --canvas-card: #191919;- --canvas-mid: #363a3f;- --hairline: #212327;- --ink: #ffffff;- --ink-hover: #fafaf7;- --body: #dadbdf;- --mute: #7d8187;- --sunset: #ff7a17;- --sunset-soft: #ffc285;- --breeze: #a0c3ec;- --ok: #7fce9a;- --radius-card: 8px;- --radius-pill: 9999px;- --border-ghost: rgba(255, 255, 255, 0.25);-}--* {+ --bg: #fafafa;+ --surface: #ffffff;+ --sunk: #f2f2f2;+ --ink: #0a0a0a;+ --ink-2: #3a3a3a;+ --muted: #6b6b6b;+ --faint: #a3a3a3;+ --line: #e6e6e6;+ --line-2: #d0d0d0;+ --invert-bg: #0a0a0a;+ --invert-ink: #fafafa;+ --dot: rgba(10, 10, 10, 0.16);+ --dot-on: #0a0a0a;+ --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.12);+ --accent: #ff7a17;+ --accent-strong: #e26a0f;+ --accent-ink: #b8520a;+ --accent-soft: rgba(255, 122, 23, 0.12);++ --t-12: 0.75rem;+ --t-14: 0.875rem;+ --t-16: 1rem;+ --t-20: 1.25rem;+ --t-25: 1.5625rem;+ --t-31: clamp(1.5rem, 1.2rem + 1.2vw, 1.953rem);+ --t-39: clamp(1.75rem, 1.3rem + 1.9vw, 2.441rem);+ --t-49: clamp(2rem, 1.3rem + 2.9vw, 3.052rem);+ --t-76: clamp(2.5rem, 1.2rem + 5.4vw, 4.768rem);++ --lh-tight: 1.04;+ --lh-snug: 1.2;+ --lh-body: 1.6;+ --track-display: -0.035em;+ --track-head: -0.02em;+ --track-mono: 0.06em;++ --s-1: 4px;+ --s-2: 8px;+ --s-3: 12px;+ --s-4: 16px;+ --s-5: 24px;+ --s-6: 32px;+ --s-7: 48px;+ --s-8: 64px;+ --s-9: 96px;+ --s-10: 128px;++ --radius: 6px;+ --radius-lg: 10px;+ --max: 1200px;+ --gutter: clamp(16px, 4vw, 40px);++ --ease-out: cubic-bezier(0.23, 1, 0.32, 1);+ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);+ --dur-1: 160ms;+ --dur-2: 240ms;+ --dur-3: 420ms;++ color-scheme: light;+}++@media (prefers-color-scheme: dark) {+ :root:not([data-theme="light"]) {+ --bg: #0a0a0a;+ --surface: #111111;+ --sunk: #161616;+ --ink: #f2f2f2;+ --ink-2: #c8c8c8;+ --muted: #8f8f8f;+ --faint: #5c5c5c;+ --line: #222222;+ --line-2: #333333;+ --invert-bg: #f2f2f2;+ --invert-ink: #0a0a0a;+ --dot: rgba(242, 242, 242, 0.16);+ --dot-on: #f2f2f2;+ --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px -12px rgba(0, 0, 0, 0.6);+ --accent-ink: #ff8f5e;+ --accent-soft: rgba(255, 122, 23, 0.16);+ color-scheme: dark;+ }+}++:root[data-theme="dark"] {+ --bg: #0a0a0a;+ --surface: #111111;+ --sunk: #161616;+ --ink: #f2f2f2;+ --ink-2: #c8c8c8;+ --muted: #8f8f8f;+ --faint: #5c5c5c;+ --line: #222222;+ --line-2: #333333;+ --invert-bg: #f2f2f2;+ --invert-ink: #0a0a0a;+ --dot: rgba(242, 242, 242, 0.16);+ --dot-on: #f2f2f2;+ --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px -12px rgba(0, 0, 0, 0.6);+ --accent-ink: #ff8f5e;+ --accent-soft: rgba(255, 122, 23, 0.16);+ color-scheme: dark;+}++*,+*::before,+*::after {box-sizing: border-box;}-html,+html {+ -webkit-text-size-adjust: 100%;+ scroll-padding-top: 72px;+}+body {margin: 0;- padding: 0;- background: var(--canvas);- color: var(--body);- font-family: var(--font-sans), Inter, system-ui, -apple-system, sans-serif;- font-size: 16px;- line-height: 1.5;+ background: var(--bg);+ color: var(--ink-2);+ font-family: var(--font-sans), system-ui, -apple-system, sans-serif;+ font-size: var(--t-16);+ line-height: var(--lh-body);-webkit-font-smoothing: antialiased;- scroll-behavior: smooth;+ -moz-osx-font-smoothing: grayscale;+ text-rendering: optimizeLegibility;+ overflow-x: clip;+}++h1,+h2,+h3,+h4 {+ color: var(--ink);+ margin: 0;+ font-weight: 560;+ letter-spacing: var(--track-head);+ line-height: var(--lh-snug);+ text-wrap: balance;+}++p {+ margin: 0;+ text-wrap: pretty;}a {color: inherit;text-decoration: none;- transition: color 160ms ease;-}-a:hover {- color: var(--ink);}button {- font-family: inherit;- cursor: pointer;- background: none;- border: none;+ font: inherit;color: inherit;+ background: none;+ border: 0;+ padding: 0;+ cursor: pointer;+}++code,+kbd,+pre,+.mono {+ font-family: var(--font-mono), ui-monospace, "SF Mono", Menlo, monospace;+}++img,+svg,+canvas {+ display: block;+ max-width: 100%;+}++img,+video {+ filter: grayscale(1);}:focus-visible {- outline: 2px solid rgba(255, 255, 255, 0.55);+ outline: 2px solid var(--accent);outline-offset: 3px;+ border-radius: 2px;}::selection {- background: var(--sunset);- color: var(--canvas);+ background: var(--accent);+ color: #0a0a0a;}-/* Reveal animation */-.reveal {- opacity: 0;- transform: translateY(32px);- transition: opacity 600ms ease,- transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);+.wrap {+ width: 100%;+ max-width: var(--max);+ margin: 0 auto;+ padding: 0 var(--gutter);}-.reveal.is-visible {- opacity: 1;- transform: translateY(0);++.eyebrow {+ font-family: var(--font-mono), ui-monospace, monospace;+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--accent-ink);+ display: inline-flex;+ align-items: center;+ gap: var(--s-2);}-@media (prefers-reduced-motion: reduce) {- *,- *::before,- *::after {- animation-duration: 0.001ms !important;- transition-duration: 0.001ms !important;- }+.eyebrow::before {+ content: "";+ width: 6px;+ height: 6px;+ background: var(--accent);+ border-radius: 1px;+}++.section {+ padding: var(--s-10) 0;+ border-top: 1px solid var(--line);+ position: relative;+}++.section-head {+ display: grid;+ gap: var(--s-4);+ max-width: 760px;+ margin-bottom: var(--s-8);+}++.section-head h2 {+ font-size: var(--t-49);+ letter-spacing: var(--track-display);+ line-height: 1.08;+}++.section-head p {+ font-size: var(--t-20);+ line-height: 1.5;+ color: var(--muted);+ max-width: 640px;}-/* Buttons shared — pill shapes, quiet states */.btn {display: inline-flex;align-items: center;- justify-content: center;- gap: 8px;- padding: 12px 24px;- font-size: 14px;- font-weight: 500;- letter-spacing: 0;- line-height: 20px;- border: 1px solid transparent;- border-radius: var(--radius-pill);- transition:- background 200ms ease,- color 200ms ease,- border-color 200ms ease,- opacity 200ms ease;- cursor: pointer;+ gap: var(--s-2);+ height: 44px;+ padding: 0 var(--s-5);+ border-radius: var(--radius);+ font-size: var(--t-14);+ font-weight: 520;+ white-space: nowrap;+ transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-1) ease,+ border-color var(--dur-1) ease, color var(--dur-1) ease;+}++.btn:active {+ transform: scale(0.97);}-.btn--accent {++.btn-solid {background: var(--ink);- color: var(--canvas);- border-color: var(--ink);- padding: 14px 28px;-}-.btn--accent:hover {- background: var(--ink-hover);- border-color: var(--ink-hover);- color: var(--canvas);-}-.btn--sunset {- background: var(--sunset);- color: var(--canvas);- border-color: var(--sunset);- padding: 14px 28px;-}-.btn--sunset:hover {- background: #ff8b35;- border-color: #ff8b35;- color: var(--canvas);-}-.btn--ghost {- background: transparent;- color: var(--ink);- border-color: var(--border-ghost);+ color: var(--bg);}-.btn--ghost:hover {- background: rgba(255, 255, 255, 0.06);- border-color: var(--border-ghost);++.btn-ghost {+ border: 1px solid var(--line-2);color: var(--ink);}-.btn--small {- padding: 8px 16px;- font-size: 13px;++@media (hover: hover) and (pointer: fine) {+ .btn-solid:hover {+ background: var(--ink-2);+ }+ .btn-ghost:hover {+ border-color: var(--ink);+ }}-/* Shared section head */-.section-head {- max-width: 1200px;- margin: 0 auto 56px;- padding: 0 40px;-}-.section-eyebrow {- display: inline-block;- font-family: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, monospace;- font-size: 12px;- letter-spacing: 1.4px;- color: var(--mute);- text-transform: uppercase;- margin-bottom: 20px;+.reveal {+ opacity: 0;+ transform: translateY(12px);+ transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);+ transition-delay: var(--d, 0ms);}-.section-title {- font-size: clamp(34px, 4.6vw, 56px);- font-weight: 400;- line-height: 1.06;- letter-spacing: -0.03em;- color: var(--ink);- margin: 0 0 20px;- text-wrap: balance;++.reveal.is-in {+ opacity: 1;+ transform: none;}-.section-lede {- max-width: 660px;- font-size: 16px;- line-height: 1.65;- color: var(--body);- margin: 0;++.src {+ font-family: var(--font-mono), ui-monospace, monospace;+ font-size: var(--t-12);+ color: var(--muted);+ border-bottom: 1px dotted var(--line-2);+ transition: color var(--dur-1) ease, border-color var(--dur-1) ease;+}++.src:hover {+ color: var(--accent-ink);+ border-color: var(--accent);+}++.theme-dark-only {+ display: none !important;+}++:root[data-theme="dark"] .theme-dark-only {+ display: block !important;+}++:root[data-theme="dark"] .theme-light-only {+ display: none !important;+}++@media (prefers-color-scheme: dark) {+ :root:not([data-theme="light"]) .theme-dark-only {+ display: block !important;+ }+ :root:not([data-theme="light"]) .theme-light-only {+ display: none !important;+ }+}++.sr-only {+ position: absolute;+ width: 1px;+ height: 1px;+ padding: 0;+ margin: -1px;+ overflow: hidden;+ clip: rect(0, 0, 0, 0);+ white-space: nowrap;+ border: 0;}-@media (max-width: 640px) {+@media (max-width: 720px) {+ .section {+ padding: var(--s-9) 0;+ }.section-head {- padding: 0 20px;+ margin-bottom: var(--s-7);+ }+ .section-head p {+ font-size: var(--t-16);+ }+}++@media (prefers-reduced-motion: reduce) {+ .reveal {+ opacity: 1;+ transform: none;+ transition: none;+ }+ html {+ scroll-behavior: auto;}}diff --git a/website/app/layout.tsx b/website/app/layout.tsxindex d7eca9db..68fb88cd 100644--- a/website/app/layout.tsx+++ b/website/app/layout.tsx@@ -1,57 +1,67 @@import type { Metadata, Viewport } from "next";-import { Inter, JetBrains_Mono } from "next/font/google";+import { Geist, Geist_Mono } from "next/font/google";import "./globals.css";+import { SITE_URL } from "@/lib/site";-const inter = Inter({+const sans = Geist({subsets: ["latin"],variable: "--font-sans",display: "swap",});-const jetbrains = JetBrains_Mono({+const mono = Geist_Mono({subsets: ["latin"],- weight: ["400", "500"],variable: "--font-mono",display: "swap",});+const description =+ "Persistent memory for AI coding agents. agentmemory captures what your agent did, keeps it on your machine, and hands the right context back in the next session. Open source, Apache-2.0.";+export const metadata: Metadata = {- metadataBase: new URL("https://agentmemory.dev"),- title: "agentmemory: persistent memory for AI coding agents",- description:- "Persistent memory for AI coding agents. Capture every session, recall it in the next one. Runs locally with zero external databases. Works with every MCP client.",+ metadataBase: new URL(SITE_URL),+ title: {+ default: "agentmemory: persistent memory for AI coding agents",+ template: "%s · agentmemory",+ },+ description,+ alternates: { canonical: "/" },icons: {icon: [{ url: "/icon.svg", type: "image/svg+xml" }],apple: "/icon.svg",},openGraph: {title: "agentmemory",- description:- "Persistent memory for AI coding agents. Runs locally. Zero external databases.",+ description,type: "website",url: "/",+ siteName: "agentmemory",},twitter: {card: "summary_large_image",title: "agentmemory",- description:- "Persistent memory for AI coding agents. Runs locally. Zero external databases.",+ description,},};export const viewport: Viewport = {- themeColor: "#0a0a0a",+ themeColor: [+ { media: "(prefers-color-scheme: light)", color: "#fafafa" },+ { media: "(prefers-color-scheme: dark)", color: "#0a0a0a" },+ ],width: "device-width",initialScale: 1,};-export default function RootLayout({- children,-}: {- children: React.ReactNode;-}) {+const themeScript = `try{var t=localStorage.getItem("am-theme");if(t==="light"||t==="dark")document.documentElement.dataset.theme=t}catch(e){}`;++export default function RootLayout({ children }: { children: React.ReactNode }) {return (- <html lang="en" className={`${inter.variable} ${jetbrains.variable}`}>+ <html lang="en" className={`${sans.variable} ${mono.variable}`} suppressHydrationWarning>+ <head>+ <script dangerouslySetInnerHTML={{ __html: themeScript }} />+ <link rel="alternate" type="text/plain" href="/llms.txt" title="llms.txt" />+ </head><body>{children}</body></html>);diff --git a/website/app/llms-full.txt/route.ts b/website/app/llms-full.txt/route.tsnew file mode 100644index 00000000..8b469c62--- /dev/null+++ b/website/app/llms-full.txt/route.ts@@ -0,0 +1,9 @@+import { llmsFullTxt } from "@/lib/llms";++export const dynamic = "force-static";++export function GET() {+ return new Response(llmsFullTxt(), {+ headers: { "content-type": "text/plain; charset=utf-8" },+ });+}diff --git a/website/app/llms.txt/route.ts b/website/app/llms.txt/route.tsnew file mode 100644index 00000000..ef8fea83--- /dev/null+++ b/website/app/llms.txt/route.ts@@ -0,0 +1,9 @@+import { llmsTxt } from "@/lib/llms";++export const dynamic = "force-static";++export function GET() {+ return new Response(llmsTxt(), {+ headers: { "content-type": "text/plain; charset=utf-8" },+ });+}diff --git a/website/app/opengraph-image.tsx b/website/app/opengraph-image.tsxindex bdd5f403..d962edf9 100644--- a/website/app/opengraph-image.tsx+++ b/website/app/opengraph-image.tsx@@ -1,12 +1,46 @@import { ImageResponse } from "next/og";-import { getProjectMeta } from "@/lib/meta";+import { compact, getProjectMeta } from "@/lib/meta";+import { LONGMEMEVAL } from "@/lib/site";-export const alt = "agentmemory: persistent memory for AI coding agents";+export const alt = "agentmemory: memory that outlives the session";export const size = { width: 1200, height: 630 };export const contentType = "image/png";+const INK = "#0a0a0a";+const MUTED = "#6b6b6b";+const LINE = "#e2e2e2";+const BG = "#fafafa";++function cluster() {+ let a = 20260930;+ const r = () => {+ a = (a + 0x6d2b79f5) | 0;+ let t = Math.imul(a ^ (a >>> 15), 1 | a);+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;+ };+ const centers = [+ [90, 90],+ [250, 70],+ [170, 190],+ [80, 290],+ [260, 280],+ ];+ const dots: Array<[number, number, boolean]> = [];+ centers.forEach(([cx, cy], c) => {+ for (let i = 0; i < 16; i++) {+ const ang = r() * Math.PI * 2;+ const rad = Math.sqrt(r()) * 46;+ dots.push([cx + Math.cos(ang) * rad, cy + Math.sin(ang) * rad, c === 0 && i < 5]);+ }+ });+ return dots;+}+export default function Image() {const meta = getProjectMeta();+ const dots = cluster();+ const query: [number, number] = [190, 120];return new ImageResponse((<div@@ -16,93 +50,70 @@ export default function Image() {display: "flex",flexDirection: "column",justifyContent: "space-between",- padding: "72px 80px",- background: "#0a0a0a",- color: "#fff",+ padding: "64px 72px",+ background: BG,+ color: INK,fontFamily: "system-ui, -apple-system, sans-serif",+ position: "relative",}}>- <div- style={{- display: "flex",- alignItems: "center",- gap: 16,- fontSize: 18,- letterSpacing: 3,- fontWeight: 400,- color: "#7d8187",- textTransform: "uppercase",- }}- >- <div- style={{- width: 12,- height: 12,- borderRadius: 12,- background: "#ff7a17",- }}- />- <span>AGENTMEMORY</span>+ <div style={{ display: "flex", alignItems: "center", justifyContent: "space-between" }}>+ <div style={{ display: "flex", alignItems: "center", gap: 16 }}>+ <svg width="44" height="44" viewBox="0 0 24 24">+ <rect x="1" y="1" width="22" height="22" rx="6" fill={INK} />+ <rect x="6" y="6.5" width="12" height="2.4" rx="1.2" fill={BG} />+ <rect x="6" y="10.4" width="12" height="2.4" rx="1.2" fill={BG} opacity="0.62" />+ <rect x="6" y="14.3" width="12" height="2.4" rx="1.2" fill={BG} opacity="0.4" />+ <rect x="6" y="18.2" width="12" height="1.6" rx="0.8" fill={BG} opacity="0.22" />+ </svg>+ <div style={{ fontSize: 32, fontWeight: 600, letterSpacing: -0.5 }}>agentmemory</div>+ </div>+ <div style={{ display: "flex", fontSize: 20, color: MUTED, fontFamily: "monospace" }}>+ v{meta.version} · Apache-2.0+ </div></div>- <div style={{ display: "flex", flexDirection: "column", gap: 28 }}>- <div- style={{- display: "flex",- fontSize: 124,- fontWeight: 400,- lineHeight: 1,- letterSpacing: -4,- color: "#ffffff",- }}- >- <span>agent</span>- <span style={{ color: "#dadbdf" }}>memory</span>- </div>- <div- style={{- display: "flex",- fontSize: 30,- color: "#dadbdf",- letterSpacing: 0,- maxWidth: 900,- lineHeight: 1.4,- fontWeight: 400,- }}- >- Persistent memory for AI coding agents. Runs locally. Zero external- databases.+ <div style={{ display: "flex", alignItems: "center", justifyContent: "space-between", gap: 40 }}>+ <div style={{ display: "flex", fontSize: 84, fontWeight: 650, letterSpacing: -3.5, lineHeight: 1.02, maxWidth: 680 }}>+ Memory that outlives the session.</div>+ <svg width="340" height="360" viewBox="0 0 340 360">+ {dots+ .filter((d) => d[2])+ .map((d, i) => (+ <line key={`l${i}`} x1={query[0]} y1={query[1]} x2={d[0]} y2={d[1]} stroke={INK} strokeWidth="1.5" opacity="0.6" />+ ))}+ {dots.map((d, i) => (+ <circle key={i} cx={d[0]} cy={d[1]} r={d[2] ? 6 : 4} fill={d[2] ? INK : MUTED} opacity={d[2] ? 1 : 0.4} />+ ))}+ <circle cx={query[0]} cy={query[1]} r="8" fill={INK} />+ <circle cx={query[0]} cy={query[1]} r="16" fill="none" stroke={INK} strokeWidth="1.5" opacity="0.3" />+ </svg></div><divstyle={{display: "flex",gap: 48,- fontSize: 20,- color: "#7d8187",- letterSpacing: 2,- textTransform: "uppercase",- fontWeight: 400,- borderTop: "1px solid #212327",paddingTop: 28,+ borderTop: `1px solid ${LINE}`,+ fontFamily: "monospace",+ fontSize: 22,+ color: MUTED,}}><div style={{ display: "flex", gap: 10 }}>- <span style={{ color: "#ffffff" }}>{meta.mcpTools}</span>- <span>MCP TOOLS</span>- </div>- <div style={{ display: "flex", gap: 10 }}>- <span style={{ color: "#ffffff" }}>{meta.restEndpoints}</span>- <span>REST ENDPOINTS</span>+ <span style={{ color: INK }}>{LONGMEMEVAL.hybrid.r5}%</span>+ <span>recall@5 LongMemEval-S</span></div><div style={{ display: "flex", gap: 10 }}>- <span style={{ color: "#ffffff" }}>0</span>- <span>EXTERNAL DBs</span>+ <span style={{ color: INK }}>{compact(meta.stars)}</span>+ <span>GitHub stars</span></div>+ <div style={{ display: "flex", marginLeft: "auto", color: INK }}>agent-memory.dev</div></div></div>),- { ...size },+ size,);}diff --git a/website/app/page.tsx b/website/app/page.tsxindex 962ab7d5..dbbf5756 100644--- a/website/app/page.tsx+++ b/website/app/page.tsx@@ -1,43 +1,37 @@-import { ScrollProgress } from "@/components/ScrollProgress";-import { Nav } from "@/components/Nav";-import { Hero } from "@/components/Hero";-import { Stats } from "@/components/Stats";-import { Primitives } from "@/components/Primitives";-import { Features } from "@/components/Features";-import { CommandCenter } from "@/components/CommandCenter";-import { LiveTerminal } from "@/components/LiveTerminal";-import { Testimonials } from "@/components/Testimonials";-import { Compare } from "@/components/Compare";-import { Agents } from "@/components/Agents";-import { Install } from "@/components/Install";-import { Footer } from "@/components/Footer";-import { getProjectMeta } from "@/lib/meta";+import { Nav } from "@/components/site/Nav";+import { Hero } from "@/components/site/Hero";+import { Proof } from "@/components/site/Proof";+import { Featured, InTheWild } from "@/components/site/InTheWild";+import { UseCases } from "@/components/site/UseCases";+import { ContextFunnel } from "@/components/site/ContextFunnel";+import { InfraTiles } from "@/components/site/InfraTiles";+import { MemoryScroll } from "@/components/site/MemoryScroll";+import { Benchmarks } from "@/components/site/Benchmarks";+import { Agents } from "@/components/site/Agents";+import { LocalFirst } from "@/components/site/LocalFirst";+import { Interfaces } from "@/components/site/Interfaces";+import { Faq } from "@/components/site/Faq";+import { Install } from "@/components/site/Install";+import { Footer } from "@/components/site/Footer";export default function Page() {- const meta = getProjectMeta();return (<>- <ScrollProgress /><Nav /><main id="top"><Hero />- <Stats- mcpTools={meta.mcpTools}- hooks={meta.hooks}- restEndpoints={meta.restEndpoints}- testsPassing={meta.testsPassing}- />- <Primitives />- <Features- hooks={meta.hooks}- mcpTools={meta.mcpTools}- restEndpoints={meta.restEndpoints}- />- <CommandCenter restEndpoints={meta.restEndpoints} />- <LiveTerminal mcpTools={meta.mcpTools} hooks={meta.hooks} />- <Compare />- <Testimonials />+ <Proof />+ <Featured />+ <UseCases />+ <ContextFunnel />+ <InfraTiles />+ <MemoryScroll />+ <InTheWild />+ <Benchmarks /><Agents />+ <LocalFirst />+ <Interfaces />+ <Faq /><Install /></main><Footer />diff --git a/website/app/privacy/page.tsx b/website/app/privacy/page.tsxnew file mode 100644index 00000000..78b0d076--- /dev/null+++ b/website/app/privacy/page.tsx@@ -0,0 +1,42 @@+import type { Metadata } from "next";+import { DocPage, Prose } from "@/components/site/Doc";++export const metadata: Metadata = {+ title: "Privacy",+ description: "agentmemory runs on your computer. No account, no hosted service, no analytics, no telemetry.",+ alternates: { canonical: "/privacy" },+};++export default function PrivacyPage() {+ return (+ <DocPage+ eyebrow="Privacy"+ title="Privacy"+ lede="agentmemory is open-source software that runs on your computer. There is no account, no hosted service and no analytics."+ >+ <Prose>+ <p>+ <strong>What it stores.</strong> Memories, and the agent activity you choose to capture, are saved in a data folder on your machine, for example{" "}+ <code>~/Library/Application Support/agentmemory</code> on macOS. You can export or delete them at any time.+ </p>+ <p>+ <strong>What leaves your machine.</strong> Nothing, unless you configure it. If you add an LLM or embedding+ provider, agentmemory sends that provider the text it needs, under the provider's own privacy policy. Local+ embeddings send nothing.+ </p>+ <p>+ <strong>Telemetry.</strong> None.+ </p>+ <p>+ <strong>Third parties.</strong> agentmemory itself never collects or receives your data. The tools you use with+ it, such as your coding agent, LLM and embedding providers, and the iii engine if you turn on its usage+ telemetry, may store data under their own policies.+ </p>+ <p>+ <strong>Contact.</strong>{" "}+ <a href="https://github.com/rohitg00/agentmemory/issues">github.com/rohitg00/agentmemory/issues</a>+ </p>+ </Prose>+ </DocPage>+ );+}diff --git a/website/app/robots.ts b/website/app/robots.tsnew file mode 100644index 00000000..d09759c1--- /dev/null+++ b/website/app/robots.ts@@ -0,0 +1,56 @@+import type { MetadataRoute } from "next";+import { SITE_URL } from "@/lib/site";++const ALLOW = [+ "Googlebot",+ "Bingbot",+ "DuckDuckBot",+ "Applebot",+ "ChatGPT-User",+ "OAI-SearchBot",+ "PerplexityBot",+ "Perplexity-User",+ "Claude-User",+ "Claude-SearchBot",+ "FirecrawlAgent",+ "Context7Bot",+ "Crawl4AI",+];++const DISALLOW = [+ "GPTBot",+ "ClaudeBot",+ "anthropic-ai",+ "CCBot",+ "Google-Extended",+ "Applebot-Extended",+ "Bytespider",+ "Amazonbot",+ "Meta-ExternalAgent",+ "cohere-ai",+ "Diffbot",+ "ImagesiftBot",+ "Omgilibot",+ "YouBot",+ "Timpibot",+ "FacebookBot",+ "AhrefsBot",+ "SemrushBot",+ "MJ12bot",+ "DotBot",+ "PetalBot",+ "BLEXBot",+ "DataForSeoBot",+];++export default function robots(): MetadataRoute.Robots {+ return {+ rules: [+ { userAgent: ALLOW, allow: "/" },+ { userAgent: DISALLOW, disallow: "/" },+ { userAgent: "*", allow: "/" },+ ],+ sitemap: `${SITE_URL}/sitemap.xml`,+ host: SITE_URL,+ };+}diff --git a/website/app/security/page.tsx b/website/app/security/page.tsxnew file mode 100644index 00000000..51cfbb74--- /dev/null+++ b/website/app/security/page.tsx@@ -0,0 +1,173 @@+import type { Metadata } from "next";+import { DocPage, Prose } from "@/components/site/Doc";+import { GATE_SOURCE, GATE_WORKFLOW } from "@/lib/trust";+import { REPO_URL } from "@/lib/site";+import { Durability } from "@/components/site/Durability";++export const metadata: Metadata = {+ title: "Security",+ description:+ "How agentmemory keeps memory local: loopback binding, auth on by default, secret redaction, file path roots, a pinned and checksummed engine, and a crash-tested release gate.",+ alternates: { canonical: "/security" },+};++export default function SecurityPage() {+ return (+ <DocPage+ eyebrow="Security"+ title="The security model, in plain language"+ lede="agentmemory is a local process that remembers what your coding agent did. This page lists what runs where, what is protected, and what is not."+ >+ <Prose>+ <h2>What runs where</h2>+ <p>Everything runs on your machine. A default install starts these listeners, all bound to 127.0.0.1:</p>+ <table>+ <thead>+ <tr>+ <th>Port</th>+ <th>Process</th>+ <th>Purpose</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td>+ <code>3111</code>+ </td>+ <td>agentmemory</td>+ <td>REST API and MCP over HTTP</td>+ </tr>+ <tr>+ <td>+ <code>3112</code>+ </td>+ <td>iii engine</td>+ <td>Internal streams for the server and the viewer</td>+ </tr>+ <tr>+ <td>+ <code>3113</code>+ </td>+ <td>agentmemory</td>+ <td>Real-time viewer</td>+ </tr>+ <tr>+ <td>+ <code>49134</code>+ </td>+ <td>iii engine</td>+ <td>Worker WebSocket</td>+ </tr>+ </tbody>+ </table>+ <p>+ Configuration and the secret live in <code>~/.agentmemory</code>. Stored state lives in the platform data+ directory: <code>~/Library/Application Support/agentmemory</code> on macOS,{" "}+ <code>$XDG_DATA_HOME/agentmemory</code> or <code>~/.local/share/agentmemory</code> on Linux, and{" "}+ <code>%APPDATA%\agentmemory</code> on Windows. <code>AGENTMEMORY_DATA_DIR</code> moves it.+ </p>++ <h2>Authentication is on by default</h2>+ <p>+ When <code>AGENTMEMORY_SECRET</code> is not set, the server generates a random secret on first start and writes+ it to <code>~/.agentmemory/secret</code> with mode <code>0600</code>. Every bundled client reads it from there:+ the CLI, the viewer, the hooks, the MCP server and the configs written by <code>agentmemory connect</code>. The+ stored secret is only sent to loopback addresses. Secrets are compared in constant time.+ </p>+ <pre>+ <code>{`curl -H "Authorization: Bearer $(cat ~/.agentmemory/secret)" \\+ http://localhost:3111/agentmemory/health`}</code>+ </pre>+ <p>+ An explicit <code>AGENTMEMORY_SECRET</code> always wins. Remote clients need it set, and mesh sync between+ machines requires it on both peers.+ </p>++ <h2>Requests from browsers</h2>+ <p>+ Writes to the REST API and the viewer must send <code>Content-Type: application/json</code>. When a request+ carries an <code>Origin</code> header, it must be a loopback origin for the configured ports or be listed in{" "}+ <code>VIEWER_ALLOWED_ORIGINS</code>. A web page you happen to visit cannot write to your memory.+ </p>++ <h2>File access is confined</h2>+ <p>+ Endpoints that read or write files only accept paths under <code>~/.agentmemory</code>, the data directory, or a+ directory you list in <code>AGENTMEMORY_IMPORT_ROOT</code>. Symlinks are resolved before every check.+ </p>++ <h2>What gets captured, and how to limit it</h2>+ <p>+ Hooks capture your prompts, the tools your agent calls and a bounded copy of their output. Tools named{" "}+ <code>memory_*</code> and a few discovery tools are skipped by default.+ </p>+ <ul>+ <li>+ <code>AGENTMEMORY_CAPTURE_DENY</code> adds tool names or globs to skip.+ </li>+ <li>+ <code>AGENTMEMORY_CAPTURE_ALLOW</code> captures only the tools you list.+ </li>+ <li>+ <code>AGENTMEMORY_CAPTURE_OUTPUT_MAX</code> caps how much tool output is stored per observation.+ </li>+ <li>+ Text inside <code><private></code> tags is replaced with <code>[REDACTED]</code> before it is stored.+ </li>+ </ul>++ <h2>Secrets are redacted before storage</h2>+ <p>+ Captured text is scanned before it is written. API keys, bearer tokens, private key blocks, credentials in URLs,+ and common token formats from model providers, GitHub, GitLab, Slack, AWS, Google and npm are replaced with{" "}+ <code>[REDACTED_SECRET]</code>. The offline capture spool applies the same redaction and is private to your+ user. Pattern matching catches common formats, not every secret, so keep secrets out of prompts when you can.+ </p>++ <h2>Export and deletion</h2>+ <p>+ <code>memory_export</code> and <code>GET /agentmemory/export</code> return everything stored.{" "}+ <code>memory_governance_delete</code> deletes records and keeps an audit entry of the deletion. Deleted+ observations stay deleted after a restart or a replayed event.+ </p>++ <h2>Supply chain</h2>+ <ul>+ <li>+ The iii engine is pinned to one version (<code>0.22.1</code>). The installer checks the downloaded archive+ against a SHA-256 recorded in the package before it extracts it.+ </li>+ <li>+ The engine starts with update checks off and its anonymous usage telemetry off (+ <code>III_TELEMETRY_ENABLED=false</code>), unless you set that variable yourself.+ </li>+ <li>+ Every pull request and push to main runs the{" "}+ <a href={GATE_SOURCE}>release gate</a> on Ubuntu and macOS (<a href={GATE_WORKFLOW}>workflow</a>): CI packs the+ npm tarball, installs it into an empty directory and checks capture, MCP, crash recovery and export round+ trips against the installed artifact.+ </li>+ </ul>++ <h2>What is not done</h2>+ <ul>+ <li>Stored memory is not encrypted at rest. File permissions on your account are what protect it.</li>+ <li>+ The iii console does not enforce auth. Keep it on 127.0.0.1, which is the default, and never expose it.+ </li>+ <li>+ Binding to anything other than 127.0.0.1 makes the API reachable from your network. Auth stays on, but only do+ it on networks you trust.+ </li>+ </ul>++ <h2>Report a vulnerability</h2>+ <p>+ Please report privately through{" "}+ <a href={`${REPO_URL}/security/advisories/new`}>GitHub security advisories</a> rather than a public issue.+ </p>+ </Prose>+ <Durability />+ </DocPage>+ );+}diff --git a/website/app/sitemap.ts b/website/app/sitemap.tsnew file mode 100644index 00000000..b06d9e94--- /dev/null+++ b/website/app/sitemap.ts@@ -0,0 +1,24 @@+import type { MetadataRoute } from "next";+import { SITE_URL } from "@/lib/site";+import { getProjectMeta } from "@/lib/meta";+import { COMPETITORS } from "@/lib/compare";++const PAGES: Array<{ path: string; priority: number; changeFrequency: "weekly" | "monthly" }> = [+ { path: "/", priority: 1, changeFrequency: "weekly" },+ { path: "/benchmarks", priority: 0.8, changeFrequency: "monthly" },+ { path: "/security", priority: 0.7, changeFrequency: "monthly" },+ { path: "/privacy", priority: 0.5, changeFrequency: "monthly" },+ { path: "/changelog", priority: 0.7, changeFrequency: "weekly" },+ { path: "/vs", priority: 0.6, changeFrequency: "monthly" },+ ...COMPETITORS.map((c) => ({ path: `/vs/${c.slug}`, priority: 0.6, changeFrequency: "monthly" as const })),+];++export default function sitemap(): MetadataRoute.Sitemap {+ const lastModified = new Date(getProjectMeta().generatedAt);+ return PAGES.map((p) => ({+ url: `${SITE_URL}${p.path === "/" ? "" : p.path}`,+ lastModified,+ changeFrequency: p.changeFrequency,+ priority: p.priority,+ }));+}diff --git a/website/app/vs/[slug]/page.tsx b/website/app/vs/[slug]/page.tsxnew file mode 100644index 00000000..7e11eafd--- /dev/null+++ b/website/app/vs/[slug]/page.tsx@@ -0,0 +1,154 @@+import type { Metadata } from "next";+import { notFound } from "next/navigation";+import Link from "next/link";+import { DocPage, Prose } from "@/components/site/Doc";+import { AGENTMEMORY, CHECKED_ON, COMPETITORS, ROWS, getCompetitor, type Fact } from "@/lib/compare";+import { REPO_URL } from "@/lib/site";+import s from "../vs.module.css";++export function generateStaticParams() {+ return COMPETITORS.map((c) => ({ slug: c.slug }));+}++export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {+ const { slug } = await params;+ const c = getCompetitor(slug);+ if (!c) return {};+ return {+ title: `agentmemory vs ${c.name}`,+ description: c.summary,+ alternates: { canonical: `/vs/${c.slug}` },+ };+}++function Cell({ fact }: { fact: Fact }) {+ return (+ <>+ <span>{fact.value}</span>+ {fact.src && (+ <a className={`src ${s.cite}`} href={fact.src} target="_blank" rel="noreferrer">+ source+ </a>+ )}+ </>+ );+}++export default async function Page({ params }: { params: Promise<{ slug: string }> }) {+ const { slug } = await params;+ const c = getCompetitor(slug);+ if (!c) notFound();+ const others = COMPETITORS.filter((o) => o.slug !== c.slug);+ return (+ <DocPage eyebrow="Compare" title={`agentmemory vs ${c.name}`} lede={c.summary}>+ <Prose>+ <h2>At a glance</h2>+ <div className={s.scroller} role="region" aria-label={`agentmemory and ${c.name} compared`} tabIndex={0}>+ <table className={s.table}>+ <thead>+ <tr>+ <th scope="col" className={s.rowHead}>+ <span className="sr-only">Aspect</span>+ </th>+ <th scope="col">agentmemory</th>+ <th scope="col">{c.name}</th>+ </tr>+ </thead>+ <tbody>+ {ROWS.map((r) => (+ <tr key={r.key}>+ <th scope="row" className={s.rowHead}>+ {r.label}+ </th>+ <td data-label="agentmemory">+ <Cell fact={AGENTMEMORY[r.key]} />+ </td>+ <td data-label={c.name}>+ <Cell fact={c.rows[r.key]} />+ </td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ <p className={s.note}>+ Benchmark figures are each project's own published results. Different benchmarks, metrics and harnesses are+ not directly comparable.+ </p>++ <h2>How they differ</h2>+ {c.differ.map((p, i) => (+ <p key={i}>{p}</p>+ ))}++ <div className={s.choose}>+ <div>+ <h3>Choose {c.name} if</h3>+ <ul>+ {c.chooseThem.map((x) => (+ <li key={x}>{x}</li>+ ))}+ </ul>+ </div>+ <div>+ <h3>Choose agentmemory if</h3>+ <ul>+ {c.chooseUs.map((x) => (+ <li key={x}>{x}</li>+ ))}+ </ul>+ </div>+ </div>++ {c.moving && (+ <>+ <h2>Moving from {c.name}</h2>+ <ol>+ {c.moving.map((m) => (+ <li key={m}>{m}</li>+ ))}+ </ol>+ </>+ )}++ <h2>Links</h2>+ <ul>+ <li>+ <a href={c.links.home} target="_blank" rel="noreferrer">+ {c.name} website+ </a>+ </li>+ <li>+ <a href={c.links.docs} target="_blank" rel="noreferrer">+ {c.name} docs+ </a>+ </li>+ {c.links.github && (+ <li>+ <a href={c.links.github} target="_blank" rel="noreferrer">+ {c.name} on GitHub+ </a>+ </li>+ )}+ </ul>++ <p className={s.checked}>+ Facts checked on {CHECKED_ON}. Spot something wrong?{" "}+ <a href={`${REPO_URL}/issues`} target="_blank" rel="noreferrer">+ open an issue+ </a>+ .+ </p>++ <h2>Other comparisons</h2>+ <ul className={s.others}>+ {others.map((o) => (+ <li key={o.slug}>+ <Link href={`/vs/${o.slug}`}>agentmemory vs {o.name}</Link>+ </li>+ ))}+ </ul>+ </Prose>+ </DocPage>+ );+}diff --git a/website/app/vs/page.tsx b/website/app/vs/page.tsxnew file mode 100644index 00000000..7eedb499--- /dev/null+++ b/website/app/vs/page.tsx@@ -0,0 +1,35 @@+import type { Metadata } from "next";+import Link from "next/link";+import { DocPage, Prose } from "@/components/site/Doc";+import { CHECKED_ON, COMPETITORS } from "@/lib/compare";+import s from "./vs.module.css";++export const metadata: Metadata = {+ title: "Compare",+ description: "How agentmemory compares with other memory tools for AI agents, with sources for every fact.",+ alternates: { canonical: "/vs" },+};++export default function Page() {+ return (+ <DocPage+ eyebrow="Compare"+ title="agentmemory compared"+ lede="Side by side with other memory tools for AI agents. Every fact links to its source, and each page says when to choose the other tool."+ >+ <Prose>+ <ul className={s.index}>+ {COMPETITORS.map((c) => (+ <li key={c.slug}>+ <Link href={`/vs/${c.slug}`} className={s.card}>+ <span className={s.cardTitle}>agentmemory vs {c.name}</span>+ <span className={s.cardSub}>{c.tagline}</span>+ </Link>+ </li>+ ))}+ </ul>+ <p className={s.checked}>Facts checked on {CHECKED_ON}.</p>+ </Prose>+ </DocPage>+ );+}diff --git a/website/app/vs/vs.module.css b/website/app/vs/vs.module.cssnew file mode 100644index 00000000..3d1e8cf1--- /dev/null+++ b/website/app/vs/vs.module.css@@ -0,0 +1,193 @@+.scroller {+ overflow-x: auto;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+}++.scroller:focus-visible {+ outline: 2px solid var(--ink);+ outline-offset: 2px;+}++.table {+ width: 100%;+ min-width: 640px;+ border-collapse: collapse;+ font-size: var(--t-14);+}++.table th,+.table td {+ text-align: left;+ vertical-align: top;+ padding: 12px 14px;+ border-bottom: 1px solid var(--line);+}++.table tbody tr:last-child th,+.table tbody tr:last-child td {+ border-bottom: 0;+}++.table thead th {+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--ink);+ font-weight: 600;+ background: var(--sunk);+}++.rowHead {+ width: 22%;+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ letter-spacing: 0.02em;+ color: var(--muted);+ font-weight: 500;+}++.table td {+ width: 39%;+ color: var(--ink-2);+ line-height: 1.55;+}++.table td span {+ display: block;+}++.cite {+ display: inline-block;+ margin-top: 4px;+}++.note,+.checked {+ font-size: var(--t-14);+ color: var(--muted);+}++.choose {+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ gap: var(--s-6);+ margin-top: var(--s-4);+}++.choose h3 {+ margin-top: 0;+ margin-bottom: var(--s-2);+}++.others {+ list-style: none;+ padding: 0;+ display: flex;+ flex-wrap: wrap;+ gap: var(--s-2);+}++.others a {+ display: inline-flex;+ padding: 6px 12px;+ border: 1px solid var(--line);+ border-radius: 999px;+ font-size: var(--t-14);+ text-decoration: none;+}++.index {+ list-style: none;+ padding: 0;+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ gap: var(--s-3);+}++.card {+ display: grid;+ gap: 6px;+ height: 100%;+ padding: var(--s-5);+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ text-decoration: none;+ transition: border-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.card:active {+ transform: scale(0.99);+}++@media (hover: hover) and (pointer: fine) {+ .card:hover {+ border-color: var(--ink);+ }+}++.cardTitle {+ font-size: var(--t-20);+ font-weight: 560;+ color: var(--ink);+}++.cardSub {+ font-size: var(--t-14);+ color: var(--muted);+ line-height: 1.5;+}++@media (max-width: 640px) {+ .scroller {+ overflow: visible;+ border: 0;+ background: none;+ }+ .table {+ min-width: 0;+ }+ .table thead {+ display: none;+ }+ .table,+ .table tbody,+ .table tr,+ .table th,+ .table td {+ display: block;+ width: 100%;+ }+ .table tr {+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+ margin-bottom: var(--s-3);+ }+ .table th,+ .table td {+ border-bottom: 0;+ padding: 10px 14px;+ }+ .rowHead {+ background: var(--sunk);+ color: var(--ink);+ }+ .table td::before {+ content: attr(data-label);+ display: block;+ margin-bottom: 4px;+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+ }+ .choose,+ .index {+ grid-template-columns: minmax(0, 1fr);+ }+}diff --git a/website/components/AgentInstall.module.css b/website/components/AgentInstall.module.cssdeleted file mode 100644index 142c06c9..00000000--- a/website/components/AgentInstall.module.css+++ /dev/null@@ -1,225 +0,0 @@-.wrap {- display: grid;- grid-template-columns: minmax(0, 1fr);- gap: 16px;- min-width: 0;-}--.stepLabel {- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 1.4px;- color: var(--mute);- text-transform: uppercase;-}-.helper {- margin: 0;- font-size: 13.5px;- color: var(--body);- line-height: 1.6;-}--.split {- display: grid;- grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.3fr);- gap: 16px;- align-items: start;- min-width: 0;-}-.chipsCol {- display: flex;- flex-direction: column;- gap: 12px;- min-width: 0;-}-.colHead {- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 1.4px;- color: var(--mute);- text-transform: uppercase;-}-.chips {- display: grid;- grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);- gap: 8px;- min-width: 0;-}-.chip {- appearance: none;- display: flex;- flex-direction: column;- align-items: flex-start;- justify-content: center;- gap: 4px;- padding: 12px 16px;- min-height: 60px;- background: var(--canvas-card);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- color: var(--ink);- text-decoration: none;- text-align: left;- cursor: pointer;- transition:- background 180ms ease,- border-color 180ms ease;-}-.chip:hover {- background: var(--canvas-soft);- border-color: var(--border-ghost);-}-.chipOk {- border-color: var(--ok) !important;-}-.chipOk .chipSub {- color: var(--ok);-}-.chipLabel {- font-size: 13.5px;- font-weight: 500;- letter-spacing: -0.01em;- color: var(--ink);-}-.chipSub {- font-family: var(--font-mono);- font-size: 9.5px;- letter-spacing: 1.2px;- color: var(--mute);- text-transform: uppercase;-}-.chipNote {- margin: 4px 0 0;- font-size: 12px;- color: var(--mute);- line-height: 1.55;-}--.snippetCol {- display: block;- min-width: 0;-}--.snippet {- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- background: var(--canvas-card);- overflow: hidden;-}-.snippetHead {- display: flex;- align-items: center;- justify-content: space-between;- gap: 12px;- padding: 12px 20px;- background: var(--canvas-soft);- border-bottom: 1px solid var(--hairline);-}-.snippetTitle {- font-family: var(--font-mono);- font-size: 11px;- font-weight: 500;- letter-spacing: 1.2px;- color: var(--ink);- text-transform: uppercase;-}-.snippetHint {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 0.8px;- color: var(--mute);- text-transform: uppercase;-}-.code {- margin: 0;- padding: 20px 24px;- font-family: var(--font-mono);- font-size: 13px;- line-height: 1.6;- color: var(--body);- white-space: pre;- overflow-x: auto;-}-.copyRow {- padding: 12px 16px;- background: var(--canvas-soft);- border-top: 1px solid var(--hairline);- display: flex;- justify-content: flex-end;-}--.copyBtn {- padding: 8px 18px;- font-size: 12px;- font-weight: 500;- letter-spacing: 0.4px;- color: var(--canvas);- background: var(--ink);- border: none;- border-radius: var(--radius-pill);- cursor: pointer;- transition:- background 200ms ease,- color 200ms ease;-}-.copyBtn:hover {- background: var(--ink-hover);-}-.copyBtnSmall {- padding: 6px 12px;- font-size: 11px;-}-.copyBtnOk {- background: var(--ok) !important;- color: var(--canvas) !important;-}--.moreToggle {- align-self: start;- padding: 9px 18px;- font-size: 12px;- font-weight: 500;- color: var(--body);- background: transparent;- border: 1px solid var(--border-ghost);- border-radius: var(--radius-pill);- cursor: pointer;- transition:- color 180ms ease,- background 180ms ease;-}-.moreToggle:hover {- color: var(--ink);- background: rgba(255, 255, 255, 0.06);-}--.moreGrid {- display: grid;- gap: 14px;-}--@media (max-width: 900px) {- .split {- grid-template-columns: minmax(0, 1fr);- }-}--@media (max-width: 640px) {- .chips {- grid-template-columns: minmax(0, 1fr);- }- .code {- font-size: 12px;- padding: 16px;- }- .snippetHead {- padding: 10px 14px;- }- .snippetHint {- font-size: 9px;- letter-spacing: 0.6px;- }- .copyRow {- padding: 10px 12px;- }-}diff --git a/website/components/AgentInstall.tsx b/website/components/AgentInstall.tsxdeleted file mode 100644index da187b3f..00000000--- a/website/components/AgentInstall.tsx+++ /dev/null@@ -1,333 +0,0 @@-"use client";--import { useMemo, useState } from "react";-import styles from "./AgentInstall.module.css";--const UNIVERSAL_JSON = `{- "mcpServers": {- "agentmemory": {- "command": "npx",- "args": ["-y", "@agentmemory/mcp"],- "env": {- "AGENTMEMORY_URL": "http://localhost:3111"- }- }- }-}`;--const CODEX_TOML = `[mcp_servers.agentmemory]-command = "npx"-args = ["-y", "@agentmemory/mcp"]--[mcp_servers.agentmemory.env]-AGENTMEMORY_URL = "http://localhost:3111"`;--const OPENCODE_JSON = `{- "mcp": {- "agentmemory": {- "type": "local",- "command": ["npx", "-y", "@agentmemory/mcp"],- "enabled": true,- "environment": {- "AGENTMEMORY_URL": "http://localhost:3111"- }- }- }-}`;--const VSCODE_MCP_JSON = `{- "servers": {- "agentmemory": {- "type": "stdio",- "command": "npx",- "args": ["-y", "@agentmemory/mcp"],- "env": {- "AGENTMEMORY_URL": "http://localhost:3111"- }- }- }-}`;--const CLAUDE_CODE_CMD = `claude mcp add agentmemory -- npx -y @agentmemory/mcp`;-const COPILOT_CLI_CMD = `agentmemory connect copilot-cli`;-const WARP_CMD = `agentmemory connect warp`;--const HERMES_YAML = `plugins:- - name: agentmemory- path: agentmemory/integrations/hermes- config:- base_url: http://localhost:3111`;--const OPENCLAW_YAML = `plugins:- - id: agentmemory- module: agentmemory/integrations/openclaw/plugin.mjs- config:- enabled: true- base_url: http://localhost:3111`;--function cursorDeeplink(): string {- const cfg = {- command: "npx",- args: ["-y", "@agentmemory/mcp"],- env: { AGENTMEMORY_URL: "http://localhost:3111" },- };- const base64 =- typeof window !== "undefined"- ? btoa(JSON.stringify(cfg))- : Buffer.from(JSON.stringify(cfg)).toString("base64");- return `cursor://anysphere.cursor-deeplink/mcp/install?name=agentmemory&config=${encodeURIComponent(base64)}`;-}--function vscodeDeeplink(): string {- const cfg = {- name: "agentmemory",- command: "npx",- args: ["-y", "@agentmemory/mcp"],- env: { AGENTMEMORY_URL: "http://localhost:3111" },- };- const payload =- typeof window !== "undefined"- ? encodeURIComponent(JSON.stringify(cfg))- : encodeURIComponent(JSON.stringify(cfg));- return `vscode:mcp/install?${payload}`;-}--type ChipKind = "deeplink" | "copy";-interface Chip {- id: string;- label: string;- kind: ChipKind;- href?: string;- copyText?: string;- sub: string;-}--function CopyButton({- text,- label = "COPY",- small,-}: {- text: string;- label?: string;- small?: boolean;-}) {- const [copied, setCopied] = useState(false);- const onClick = async () => {- try {- await navigator.clipboard.writeText(text);- setCopied(true);- setTimeout(() => setCopied(false), 1600);- } catch {- /* ignore */- }- };- return (- <button- className={`${styles.copyBtn} ${small ? styles.copyBtnSmall : ""} ${- copied ? styles.copyBtnOk : ""- }`}- onClick={onClick}- >- {copied ? "COPIED ✓" : label}- </button>- );-}--function Chip({ chip }: { chip: Chip }) {- const [copied, setCopied] = useState(false);- const inner = (- <>- <span className={styles.chipLabel}>{chip.label}</span>- <span className={styles.chipSub}>- {chip.kind === "deeplink" ? "OPEN" : copied ? "COPIED ✓" : chip.sub}- </span>- </>- );-- if (chip.kind === "deeplink" && chip.href) {- return (- <a className={styles.chip} href={chip.href}>- {inner}- </a>- );- }-- const onClick = async () => {- if (!chip.copyText) return;- try {- await navigator.clipboard.writeText(chip.copyText);- setCopied(true);- setTimeout(() => setCopied(false), 1600);- } catch {- /* ignore */- }- };- return (- <button- className={`${styles.chip} ${copied ? styles.chipOk : ""}`}- onClick={onClick}- >- {inner}- </button>- );-}--function Snippet({- title,- body,- hint,-}: {- title: string;- body: string;- hint: string;-}) {- return (- <div className={styles.snippet}>- <div className={styles.snippetHead}>- <span className={styles.snippetTitle}>{title}</span>- <span className={styles.snippetHint}>{hint}</span>- </div>- <pre className={styles.code}>- <code>{body}</code>- </pre>- <div className={styles.copyRow}>- <CopyButton text={body} />- </div>- </div>- );-}--export function AgentInstall() {- const cursor = useMemo(cursorDeeplink, []);- const vscode = useMemo(vscodeDeeplink, []);- const [showMore, setShowMore] = useState(false);-- const chips: Chip[] = [- {- id: "cursor",- label: "Cursor",- kind: "deeplink",- href: cursor,- sub: "DEEPLINK",- },- {- id: "vscode",- label: "VS Code",- kind: "deeplink",- href: vscode,- sub: "DEEPLINK",- },- {- id: "claude-code",- label: "Claude Code",- kind: "copy",- copyText: CLAUDE_CODE_CMD,- sub: "COPY CMD",- },- {- id: "copilot-cli",- label: "Copilot CLI",- kind: "copy",- copyText: COPILOT_CLI_CMD,- sub: "COPY CMD",- },- {- id: "codex",- label: "Codex CLI",- kind: "copy",- copyText: CODEX_TOML,- sub: "COPY TOML",- },- {- id: "warp",- label: "Warp",- kind: "copy",- copyText: WARP_CMD,- sub: "COPY CMD",- },- {- id: "claude-desktop",- label: "Claude Desktop",- kind: "copy",- copyText: UNIVERSAL_JSON,- sub: "COPY JSON",- },- {- id: "gemini",- label: "Gemini CLI",- kind: "copy",- copyText: UNIVERSAL_JSON,- sub: "COPY JSON",- },- ];-- return (- <div className={styles.wrap}>- <div className={styles.stepLabel}>4. WIRE UP ANY AGENT</div>- <p className={styles.helper}>- One MCP JSON fits almost everything. Pick your agent on the left, or- paste the universal config on the right.- </p>-- <div className={styles.split}>- <div className={styles.chipsCol}>- <div className={styles.colHead}>AGENTS</div>- <div className={styles.chips}>- {chips.map((c) => (- <Chip key={c.id} chip={c} />- ))}- </div>- <p className={styles.chipNote}>- Cursor / VS Code are one-click via deeplink. Others copy the right- snippet directly to your clipboard.- </p>- </div>- <div className={styles.snippetCol}>- <Snippet- title="UNIVERSAL MCP JSON"- hint="WORKS FOR CLAUDE DESKTOP · CURSOR · CLINE · ROO · WINDSURF · GEMINI · WARP · DROID · KIRO · ANTIGRAVITY · QWEN · MERGE INTO EXISTING mcpServers"- body={UNIVERSAL_JSON}- />- </div>- </div>-- <button- className={styles.moreToggle}- aria-expanded={showMore}- onClick={() => setShowMore((v) => !v)}- >- {showMore ? "− Hide other shapes" : "+ OpenCode · Cline · Continue · Zed · Droid · Qwen · Antigravity · Kiro · Hermes · OpenClaw · VS Code"}- </button>-- {showMore && (- <div className={styles.moreGrid}>- <Snippet- title="OPENCODE"- hint="opencode.json · different shape (mcp key, command as array)"- body={OPENCODE_JSON}- />- <Snippet- title="VS CODE (mcp.json)"- hint=".vscode/mcp.json · uses servers key, not mcpServers"- body={VSCODE_MCP_JSON}- />- <Snippet- title="CODEX CLI (TOML)"- hint="~/.codex/config.toml"- body={CODEX_TOML}- />- <Snippet- title="HERMES"- hint="integrations/hermes · plugin.yaml"- body={HERMES_YAML}- />- <Snippet- title="OPENCLAW"- hint="integrations/openclaw · plugin.yaml"- body={OPENCLAW_YAML}- />- </div>- )}- </div>- );-}diff --git a/website/components/Agents.module.css b/website/components/Agents.module.cssdeleted file mode 100644index 9aa4a516..00000000--- a/website/components/Agents.module.css+++ /dev/null@@ -1,216 +0,0 @@-.wrap {- padding: 112px 0 96px;-}--/* Featured row: first-party plugin cards */-.featuredRow {- max-width: 1440px;- margin: 0 auto 56px;- padding: 0 40px;- display: grid;- grid-template-columns: repeat(4, 1fr);- gap: 16px;-}--.featured {- position: relative;- background: var(--canvas-card);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- padding: 24px;- color: var(--ink);- text-decoration: none;- display: flex;- flex-direction: column;- gap: 18px;- min-height: 200px;- transition:- background 200ms ease,- border-color 200ms ease;- overflow: hidden;-}-.featured:hover {- background: var(--canvas-soft);- border-color: var(--border-ghost);-}--.featuredHead {- display: flex;- gap: 14px;- align-items: center;-}-.featuredLogo {- width: 52px;- height: 52px;- display: flex;- align-items: center;- justify-content: center;- border-radius: var(--radius-card);- overflow: hidden;- background: var(--canvas);- border: 1px solid var(--hairline);- flex-shrink: 0;-}-.featuredLogo img {- width: 100%;- height: 100%;- object-fit: cover;-}-.featuredMeta {- display: flex;- flex-direction: column;- gap: 2px;- min-width: 0;-}-.featuredSub {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 1.2px;- color: var(--mute);- text-transform: uppercase;-}-.featuredName {- font-size: 18px;- font-weight: 500;- letter-spacing: -0.01em;- color: var(--ink);-}-.featuredFrom {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 1.2px;- color: var(--mute);- text-transform: uppercase;-}-.featuredPitch {- margin: 0;- font-size: 13px;- color: var(--body);- line-height: 1.55;-}-.featuredArrow {- position: absolute;- top: 16px;- right: 20px;- font-size: 16px;- color: var(--mute);- transition: color 180ms ease, transform 180ms ease;-}-.featured:hover .featuredArrow {- color: var(--ink);- transform: translate(2px, -2px);-}--/* Marquee */-.marqueeWrap {- position: relative;- overflow: hidden;- padding: 4px 0;- max-width: 100vw;- margin: 0 auto;-}-.fadeLeft,-.fadeRight {- position: absolute;- top: 0;- bottom: 0;- width: 120px;- pointer-events: none;- z-index: 2;-}-.fadeLeft {- left: 0;- background: linear-gradient(90deg, var(--canvas) 0%, rgba(10, 10, 10, 0) 100%);-}-.fadeRight {- right: 0;- background: linear-gradient(270deg, var(--canvas) 0%, rgba(10, 10, 10, 0) 100%);-}-.marquee {- display: flex;- gap: 16px;- width: max-content;- animation: scroll 48s linear infinite;- padding: 0 20px;-}-.marqueeWrap:hover .marquee {- animation-play-state: paused;-}-@keyframes scroll {- 0% {- transform: translateX(0);- }- 100% {- transform: translateX(-50%);- }-}--.tile {- display: inline-flex;- align-items: center;- gap: 12px;- padding: 12px 20px;- background: var(--canvas-card);- border: 1px solid var(--hairline);- border-radius: var(--radius-pill);- color: var(--ink);- text-decoration: none;- flex-shrink: 0;- transition:- border-color 180ms ease,- background 180ms ease;-}-.tile:hover {- border-color: var(--border-ghost);- background: var(--canvas-soft);-}-.tileLogo {- width: 36px;- height: 36px;- border-radius: 50%;- overflow: hidden;- background: var(--canvas);- flex-shrink: 0;- object-fit: cover;-}-.tileMeta {- display: flex;- flex-direction: column;- gap: 2px;-}-.tileName {- font-size: 13.5px;- font-weight: 500;- letter-spacing: -0.01em;- color: var(--ink);-}-.tileFrom {- font-family: var(--font-mono);- font-size: 9.5px;- letter-spacing: 1px;- color: var(--mute);- text-transform: uppercase;-}--@media (max-width: 1024px) {- .featuredRow {- grid-template-columns: repeat(2, 1fr);- }-}--@media (max-width: 640px) {- .featuredRow {- padding: 0 20px;- grid-template-columns: 1fr;- }- .fadeLeft,- .fadeRight {- width: 60px;- }-}--@media (prefers-reduced-motion: reduce) {- .marquee {- animation: none;- }-}diff --git a/website/components/Agents.tsx b/website/components/Agents.tsxdeleted file mode 100644index d8f4fa3c..00000000--- a/website/components/Agents.tsx+++ /dev/null@@ -1,328 +0,0 @@-import Image from "next/image";-import styles from "./Agents.module.css";--interface Agent {- id: string;- name: string;- from: string;- logo: string;- accent: string;- href: string;- featured?: boolean;- pitch?: string;- sub?: string;-}--const FEATURED: Agent[] = [- {- id: "claude-code",- name: "Claude Code",- from: "Anthropic",- logo: "https://github.com/anthropics.png",- accent: "#CC785C",- href: "https://claude.com/product/claude-code",- pitch: "12 hooks + MCP + skills",- sub: "FIRST-CLASS PLUGIN",- },- {- id: "copilot-cli",- name: "Copilot CLI",- from: "GitHub",- logo: "https://svgl.app/library/github_dark.svg",- accent: "#24292E",- href: "https://docs.github.com/copilot/github-copilot-in-the-cli",- pitch: "MCP + plugin hooks and skills",- sub: "NATIVE PLUGIN",- },- {- id: "codex",- name: "Codex CLI",- from: "OpenAI",- logo: "https://github.com/openai.png",- accent: "#10A37F",- href: "https://github.com/openai/codex",- pitch: "6 hooks + MCP · native plugin",- sub: "NATIVE PLUGIN",- },- {- id: "openclaw",- name: "OpenClaw",- from: "openclaw",- logo: "https://github.com/openclaw.png",- accent: "#FFA000",- href: "https://github.com/openclaw/openclaw",- pitch: "onSessionStart · onPreLlmCall · onPostToolUse · onSessionEnd",- sub: "GATEWAY PLUGIN",- },- {- id: "hermes",- name: "Hermes",- from: "Nous Research",- logo: "https://github.com/NousResearch.png",- accent: "#7A5BFF",- href: "https://github.com/NousResearch",- pitch: "Python plugin · yaml config",- sub: "FIRST-PARTY INTEGRATION",- },- {- id: "pi",- name: "pi",- from: "pi",- logo: "https://raw.githubusercontent.com/rohitg00/agentmemory/main/assets/agents/pi.svg",- accent: "#FF6B35",- href: "https://github.com/rohitg00/agentmemory/tree/main/integrations/pi",- pitch: "Native plugin + MCP",- sub: "NATIVE PLUGIN",- },- {- id: "cursor",- name: "Cursor",- from: "Anysphere",- logo: "https://svgl.app/library/cursor_dark.svg",- accent: "#4F8BF7",- href: "https://github.com/rohitg00/agentmemory/tree/main/.cursor-plugin",- pitch: "7 hooks + 17 skills + MCP · IDE and CLI",- sub: "NATIVE PLUGIN",- },- {- id: "opencode",- name: "OpenCode",- from: "SST",- logo: "/opencode.png",- accent: "#F5A623",- href: "https://github.com/rohitg00/agentmemory/tree/main/plugin/opencode",- pitch: "Capture plugin with per-session project attribution",- sub: "NATIVE PLUGIN",- },-];--const MARQUEE: Agent[] = [- {- id: "claude-desktop",- name: "Claude Desktop",- from: "Anthropic",- logo: "https://github.com/anthropics.png",- accent: "#CC785C",- href: "https://claude.ai/download",- },- {- id: "openhuman",- name: "OpenHuman",- from: "tinyhumansai",- logo: "https://raw.githubusercontent.com/tinyhumansai/openhuman/main/app/src-tauri/icons/128x128.png",- accent: "#9b5cf6",- href: "https://github.com/tinyhumansai/openhuman",- },- {- id: "warp",- name: "Warp",- from: "Warp",- logo: "https://svgl.app/library/warp.svg",- accent: "#9B59FF",- href: "https://www.warp.dev",- },- {- id: "continue",- name: "Continue",- from: "Continue.dev",- logo: "https://github.com/continuedev.png",- accent: "#000000",- href: "https://continue.dev",- },- {- id: "cline",- name: "Cline",- from: "cline",- logo: "https://github.com/cline.png",- accent: "#F59E0B",- href: "https://github.com/cline/cline",- },- {- id: "zed",- name: "Zed",- from: "Zed Industries",- logo: "https://svgl.app/library/zed-logo_dark.svg",- accent: "#FF4500",- href: "https://zed.dev",- },- {- id: "droid",- name: "Droid",- from: "Factory.ai",- logo: "https://www.factory.ai/favicon.svg",- accent: "#FF6B35",- href: "https://docs.factory.ai/cli",- },- {- id: "gemini-cli",- name: "Gemini CLI",- from: "Google",- logo: "https://github.com/google-gemini.png",- accent: "#4285F4",- href: "https://github.com/google-gemini/gemini-cli",- },- {- id: "antigravity",- name: "Antigravity",- from: "Google",- logo: "https://svgl.app/library/antigravity.svg",- accent: "#4285F4",- href: "https://antigravity.google",- },- {- id: "qwen",- name: "Qwen Code",- from: "Alibaba",- logo: "https://svgl.app/library/qwen_dark.svg",- accent: "#615CED",- href: "https://github.com/QwenLM/qwen-code",- },- {- id: "dsh",- name: "DeepSeek Harness",- from: "DeepSeek",- logo: "https://svgl.app/library/deepseek.svg",- accent: "#4D6BFE",- href: "https://github.com/deepseek-ai/deepseek-harness",- },- {- id: "kiro",- name: "Kiro",- from: "AWS",- logo: "https://kiro.dev/favicon.ico",- accent: "#FF9900",- href: "https://kiro.dev",- },- {- id: "roo",- name: "Roo Code",- from: "RooCode",- logo: "https://github.com/RooCodeInc.png",- accent: "#EC4899",- href: "https://github.com/RooCodeInc/Roo-Code",- },- {- id: "kilo",- name: "Kilo Code",- from: "Kilo-Org",- logo: "https://github.com/Kilo-Org.png",- accent: "#06B6D4",- href: "https://github.com/Kilo-Org/kilocode",- },- {- id: "goose",- name: "Goose",- from: "Block",- logo: "https://github.com/block.png",- accent: "#00D54B",- href: "https://github.com/block/goose",- },- {- id: "aider",- name: "Aider",- from: "Aider-AI",- logo: "https://github.com/Aider-AI.png",- accent: "#E11D48",- href: "https://github.com/Aider-AI/aider",- },- {- id: "devin",- name: "Devin",- from: "Cognition",- logo: "/devin.png",- accent: "#317CFF",- href: "https://devin.ai",- },-];--function FeaturedCard({ a }: { a: Agent }) {- return (- <a- className={styles.featured}- href={a.href}- target="_blank"- rel="noopener"- >- <div className={styles.featuredHead}>- <div className={styles.featuredLogo}>- <Image- src={a.logo}- width={56}- height={56}- alt={`${a.name} logo`}- unoptimized- />- </div>- <div className={styles.featuredMeta}>- <span className={styles.featuredSub}>{a.sub}</span>- <span className={styles.featuredName}>{a.name}</span>- <span className={styles.featuredFrom}>FROM {a.from}</span>- </div>- </div>- <p className={styles.featuredPitch}>{a.pitch}</p>- <span className={styles.featuredArrow} aria-hidden>- ↗- </span>- </a>- );-}--function MarqueeTile({ a }: { a: Agent }) {- return (- <a- className={styles.tile}- href={a.href}- target="_blank"- rel="noopener"- >- <Image- src={a.logo}- width={48}- height={48}- alt={`${a.name} logo`}- unoptimized- className={styles.tileLogo}- />- <div className={styles.tileMeta}>- <span className={styles.tileName}>{a.name}</span>- <span className={styles.tileFrom}>FROM {a.from}</span>- </div>- </a>- );-}--export function Agents() {- const loop = [...MARQUEE, ...MARQUEE];- return (- <section className={styles.wrap} id="agents" aria-labelledby="agents-title">- <header className="section-head">- <span className="section-eyebrow">Works with</span>- <h2 id="agents-title" className="section-title">- Seven native plugins.<br />Rest MCP-native.- </h2>- <p className="section-lede">- Native plugins for Claude Code, Copilot CLI, Codex CLI, OpenClaw,- Hermes, pi, and Cursor. OpenCode gets a plugin that attributes- each session to its own project. Every other MCP client gets it for- free. `agentmemory connect <agent>` auto-wires them all.- </p>- </header>-- <div className={styles.featuredRow}>- {FEATURED.map((a) => (- <FeaturedCard key={a.id} a={a} />- ))}- </div>-- <div className={styles.marqueeWrap} aria-label="Other compatible agents">- <div className={styles.fadeLeft} aria-hidden />- <div className={styles.fadeRight} aria-hidden />- <div className={styles.marquee}>- {loop.map((a, i) => (- <MarqueeTile key={`${a.id}-${i}`} a={a} />- ))}- </div>- </div>- </section>- );-}diff --git a/website/components/CommandCenter.module.css b/website/components/CommandCenter.module.cssdeleted file mode 100644index ef9b6fc2..00000000--- a/website/components/CommandCenter.module.css+++ /dev/null@@ -1,207 +0,0 @@-.wrap {- padding: 96px 0;- border-top: 1px solid var(--hairline);- border-bottom: 1px solid var(--hairline);-}-.tabs {- max-width: 1200px;- margin: 0 auto 32px;- padding: 0 40px;- display: grid;- grid-template-columns: repeat(4, 1fr);- gap: 0;-}-.tabs > * {- border: 1px solid var(--hairline);- border-right: none;-}-.tabs > *:first-child {- border-radius: var(--radius-card) 0 0 var(--radius-card);-}-.tabs > *:last-child {- border-right: 1px solid var(--hairline);- border-radius: 0 var(--radius-card) var(--radius-card) 0;-}-.tab {- padding: 16px 18px;- text-align: left;- display: flex;- flex-direction: column;- gap: 6px;- background: var(--canvas-card);- transition:- background 200ms ease,- color 200ms ease;- cursor: pointer;-}-.tab:hover {- background: var(--canvas-soft);-}-.tabActive {- background: var(--ink) !important;- color: var(--canvas) !important;-}-.tabActive .tabSub {- color: rgba(10, 10, 10, 0.65) !important;-}-.tabLabel {- font-size: 15px;- font-weight: 500;- letter-spacing: -0.01em;-}-.tabSub {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 1.2px;- color: var(--mute);- text-transform: uppercase;-}-.panel {- max-width: 1200px;- margin: 0 auto;- padding: 0 40px;- display: grid;- grid-template-columns: minmax(320px, 1fr) minmax(0, 1.3fr);- gap: 40px;- align-items: start;-}-.panelText {- padding-top: 8px;-}-.panelTitle {- font-size: clamp(24px, 2.4vw, 30px);- font-weight: 400;- letter-spacing: -0.02em;- margin: 0 0 16px;- color: var(--ink);-}-.panelBlurb {- font-size: 14.5px;- color: var(--body);- line-height: 1.65;- margin: 0 0 24px;-}-.panelBullets {- list-style: none;- padding: 0;- margin: 0 0 28px;- display: grid;- gap: 10px;-}-.panelBullets li {- display: flex;- gap: 12px;- align-items: flex-start;- font-family: var(--font-mono);- font-size: 11.5px;- letter-spacing: 0.6px;- color: var(--mute);- text-transform: uppercase;- line-height: 1.55;-}-.panelBullets span {- color: var(--ink);- margin-top: 1px;-}-.launch {- margin: 0;- padding: 15px 18px;- background: var(--canvas-soft);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- font-family: var(--font-mono);- font-size: 13px;- color: var(--ink);- overflow-x: auto;- white-space: nowrap;-}-.launchPrompt {- color: var(--sunset);- margin-right: 8px;-}-.panelFrame {- background: var(--canvas-card);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- overflow: hidden;-}-.frameChrome {- display: flex;- align-items: center;- gap: 8px;- padding: 10px 14px;- background: var(--canvas-soft);- border-bottom: 1px solid var(--hairline);-}-.dot {- width: 9px;- height: 9px;- border-radius: 50%;- display: inline-block;- background: var(--canvas-mid);-}-.red,-.yellow,-.green {- background: var(--canvas-mid);-}-.frameTitle {- margin-left: 8px;- font-family: var(--font-mono);- font-size: 11px;- color: var(--mute);- letter-spacing: 0.6px;-}-.frameShot {- background: var(--canvas);- min-height: 300px;-}--@media (max-width: 960px) {- .panel {- grid-template-columns: minmax(0, 1fr);- }- .tabs {- grid-template-columns: 1fr 1fr;- }- .tabs > * {- border: 1px solid var(--hairline);- border-radius: 0;- }- .tabs > *:first-child {- border-radius: var(--radius-card) 0 0 0;- }- .tabs > *:nth-child(2) {- border-left: none;- border-radius: 0 var(--radius-card) 0 0;- }- .tabs > *:nth-child(3) {- border-top: none;- border-radius: 0 0 0 var(--radius-card);- }- .tabs > *:last-child {- border-top: none;- border-left: none;- border-radius: 0 0 var(--radius-card) 0;- }-}-@media (max-width: 640px) {- .tabs,- .panel {- padding: 0 20px;- }- .tab {- padding: 14px 12px;- }- .tabLabel {- font-size: 13px;- }- .tabSub {- font-size: 9px;- letter-spacing: 0.6px;- }- .launch {- padding: 12px 14px;- font-size: 11px;- }-}diff --git a/website/components/CommandCenter.tsx b/website/components/CommandCenter.tsxdeleted file mode 100644index 2c52c481..00000000--- a/website/components/CommandCenter.tsx+++ /dev/null@@ -1,164 +0,0 @@-"use client";--import { useState } from "react";-import Image from "next/image";-import styles from "./CommandCenter.module.css";--type Tab = "viewer" | "console" | "state" | "traces";--const TABS: Array<{ id: Tab; label: string; sub: string }> = [- { id: "viewer", label: "Viewer", sub: ":3113 · LIVE OBSERVATION STREAM" },- { id: "console", label: "iii Console", sub: ":3114 · ENGINE DASHBOARD" },- { id: "state", label: "State", sub: "RAW KV BROWSER + JSON EDITOR" },- { id: "traces", label: "Traces", sub: "OTEL WATERFALL + FLAME" },-];--function buildPanels(restEndpoints: number): Record<- Tab,- {- title: string;- blurb: string;- bullets: string[];- img: string;- alt: string;- launch: string;- }-> {- return {- viewer: {- title: "Ship-with viewer · port 3113",- blurb:- "The agentmemory server auto-starts a real-time viewer on port 3113. No install, no config. Tabs refresh live as hooks fire, and any past session replays in place.",- bullets: [- "LIVE OBSERVATION STREAM · EVERY HOOK AS IT FIRES",- "SESSION EXPLORER · REPLAY ANY PAST SESSION",- "MEMORY BROWSER · FILTER BY PROJECT / TYPE / CONFIDENCE",- "KNOWLEDGE GRAPH VISUALIZATION · FORCE-DIRECTED",- "HEALTH DASHBOARD · HEAP / RSS / EVENT LOOP LAG",- ],- img: "/demo.gif",- alt: "agentmemory viewer live demo",- launch: "open http://localhost:3113",- },- console: {- title: "iii console · first-class",- blurb:- "agentmemory runs on the iii engine, so the official iii console gives engine-level visibility: every function call, every worker, every queue, every trace. From v0.9.16 the agentmemory CLI prompts to install iii console alongside the engine. Launch on :3114 so the viewer keeps :3113.",- bullets: [- "REGISTERED FUNCTIONS · INVOKE ANY DIRECTLY WITH JSON",- `${restEndpoints} HTTP ENDPOINTS · REPLAY ANY REST CALL`,- "WEBSOCKET STREAM MONITOR · WATCH FRAMES LIVE",- "OTEL EXPORTER = MEMORY (DEFAULT) · TRACES STAY LOCAL",- "NO AUTH · BIND TO 127.0.0.1 ONLY",- ],- img: "/dashboard.png",- alt: "iii console dashboard",- launch: "iii-console --port 3114 --engine-port 3111",- },- state: {- title: "Raw KV browser",- blurb:- "Three-panel view of the key/value store behind every memory, session, retention score, audit row, and access log. Edit JSON in place.",- bullets: [- "SCOPED NAMESPACES · mem:memories / mem:sessions / mem:retention",- "JSON-NATIVE EDIT · NO MIGRATIONS",- "AUDIT ROW PER CHANGE · FORENSIC TRAIL",- "BACKED BY iii STATE ADAPTERS · IN-MEMORY OR FILE-BASED",- ],- img: "/states.png",- alt: "iii console state browser",- launch: "open http://localhost:3114/states",- },- traces: {- title: "OpenTelemetry out of the box",- blurb:- "iii-observability ships with exporter: memory, sampling_ratio: 1.0. Every memory operation emits a trace span + structured log. Swap to OTLP for any external tracing backend.",- bullets: [- "WATERFALL · FLAME · SERVICE BREAKDOWN · TRACE MAP",- "FILTER BY TRACE ID · SERVICE · DURATION",- "MEMORY SEARCH SPAN TREE · BM25 → VECTOR → GRAPH → RERANK",- "SWAP EXPORTER TO OTLP FOR PROD TELEMETRY",- ],- img: "/traces-waterfall.png",- alt: "iii console traces waterfall",- launch: "open http://localhost:3114/traces",- },- };-}--export function CommandCenter({ restEndpoints }: { restEndpoints: number }) {- const [tab, setTab] = useState<Tab>("viewer");- const panel = buildPanels(restEndpoints)[tab];-- return (- <section- className={styles.wrap}- id="command-center"- aria-labelledby="cc-title"- >- <header className="section-head">- <span className="section-eyebrow">Command center</span>- <h2 id="cc-title" className="section-title">- Two UIs.<br />One memory runtime.- </h2>- <p className="section-lede">- agentmemory ships a real-time viewer for your memories and an- engine-level console for every function, trigger, and OTel span.- Both are first-class, installed inline by the CLI on first run.- </p>- </header>- <div className={styles.tabs} role="tablist" aria-label="Command center">- {TABS.map((t) => (- <button- key={t.id}- role="tab"- aria-selected={tab === t.id}- className={`${styles.tab} ${tab === t.id ? styles.tabActive : ""}`}- onClick={() => setTab(t.id)}- >- <span className={styles.tabLabel}>{t.label}</span>- <span className={styles.tabSub}>{t.sub}</span>- </button>- ))}- </div>- <div className={styles.panel}>- <div className={styles.panelText}>- <h3 className={styles.panelTitle}>{panel.title}</h3>- <p className={styles.panelBlurb}>{panel.blurb}</p>- <ul className={styles.panelBullets}>- {panel.bullets.map((b) => (- <li key={b}>- <span aria-hidden>›</span>- {b}- </li>- ))}- </ul>- <pre className={styles.launch}>- <code>- <span className={styles.launchPrompt}>$</span> {panel.launch}- </code>- </pre>- </div>- <div className={styles.panelFrame}>- <div className={styles.frameChrome}>- <span className={`${styles.dot} ${styles.red}`} />- <span className={`${styles.dot} ${styles.yellow}`} />- <span className={`${styles.dot} ${styles.green}`} />- <span className={styles.frameTitle}>{panel.title}</span>- </div>- <div className={styles.frameShot}>- <Image- src={panel.img}- alt={panel.alt}- width={1600}- height={1000}- unoptimized={panel.img.endsWith(".gif")}- priority={false}- style={{ width: "100%", height: "auto", display: "block" }}- />- </div>- </div>- </div>- </section>- );-}diff --git a/website/components/Compare.module.css b/website/components/Compare.module.cssdeleted file mode 100644index f2a2fd05..00000000--- a/website/components/Compare.module.css+++ /dev/null@@ -1,79 +0,0 @@-.compare {- padding: 96px 0;- border-top: 1px solid var(--hairline);- border-bottom: 1px solid var(--hairline);-}-.table {- max-width: 1100px;- margin: 0 auto;- padding: 0 40px;-}-.table:focus-visible {- outline: 2px solid var(--border-ghost);- outline-offset: 2px;-}-.table > .row:first-child {- border-radius: var(--radius-card) var(--radius-card) 0 0;-}-.table > .row:last-child {- border-radius: 0 0 var(--radius-card) var(--radius-card);- border-bottom: 1px solid var(--hairline);-}-.row {- display: grid;- grid-template-columns: 1.4fr 1.3fr 1fr 1fr 1fr;- gap: 16px;- padding: 16px 24px;- border: 1px solid var(--hairline);- border-bottom: none;- align-items: center;- font-size: 14px;- overflow-wrap: anywhere;-}-.row > span {- color: var(--body);-}-.row > span:first-child {- font-family: var(--font-mono);- font-size: 11.5px;- letter-spacing: 1.2px;- text-transform: uppercase;- color: var(--mute);-}-.head {- background: var(--canvas-soft);-}-.head span {- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 1.2px;- text-transform: uppercase;- color: var(--mute) !important;- font-weight: 400 !important;-}-.head .mine {- color: var(--ink) !important;-}-.mine {- color: var(--ink) !important;- font-weight: 500 !important;-}-@media (max-width: 1024px) {- .table {- overflow-x: auto;- -webkit-overflow-scrolling: touch;- }- .row {- min-width: 720px;- gap: 12px;- }-}-@media (max-width: 640px) {- .table {- padding: 0 20px;- }- .row {- padding: 14px 16px;- font-size: 13px;- }-}diff --git a/website/components/Compare.tsx b/website/components/Compare.tsxdeleted file mode 100644index 63153cf7..00000000--- a/website/components/Compare.tsx+++ /dev/null@@ -1,51 +0,0 @@-import styles from "./Compare.module.css";-import meta from "../lib/generated-meta.json";--const ROWS = [- ["RETRIEVAL", "95.2% (LongMemEval-S)", "68.5% (LoCoMo)", "83.2% (LoCoMo)", "63.8% (LongMemEval)"],- ["EXTERNAL DEPS", "0", "Qdrant / pgvector", "Postgres + vector", "Neo4j"],- ["REST ENDPOINTS", String(meta.restEndpoints), "—", "—", "—"],- ["MCP TOOLS", String(meta.mcpTools), "—", "—", "—"],- ["AUTO-CAPTURE HOOKS", String(meta.hooks), "Manual add()", "Agent self-edits", "—"],- ["NATIVE AGENT PLUGINS", "6", "—", "—", "—"],- ["OPEN SOURCE", "Yes (Apache-2.0)", "Yes", "Yes", "Yes"],-];--export function Compare() {- return (- <section className={styles.compare} id="compare" aria-labelledby="cmp-title">- <header className="section-head">- <span className="section-eyebrow">VS.</span>- <h2 id="cmp-title" className="section-title">- Vs. the field.- </h2>- <p className="section-lede">- Only the agentmemory number is ours, measured on LongMemEval-S and- reproducible from the repo. Competitor figures are their own published- claims on their own benchmarks — different datasets, shown for- ballpark. Ship what you want; we just picked the one with receipts.- </p>- </header>- <div className={styles.table} role="table" aria-label="Comparison" tabIndex={0}>- <div className={`${styles.row} ${styles.head}`} role="row">- <span role="columnheader" />- <span role="columnheader" className={styles.mine}>- AGENTMEMORY- </span>- <span role="columnheader">MEM0</span>- <span role="columnheader">LETTA</span>- <span role="columnheader">ZEP / GRAPHITI</span>- </div>- {ROWS.map((r) => (- <div key={r[0]} className={styles.row} role="row">- <span role="rowheader">{r[0]}</span>- <span className={styles.mine}>{r[1]}</span>- <span>{r[2]}</span>- <span>{r[3]}</span>- <span>{r[4]}</span>- </div>- ))}- </div>- </section>- );-}diff --git a/website/components/FeaturedIn.module.css b/website/components/FeaturedIn.module.cssdeleted file mode 100644index 07a3bbcb..00000000--- a/website/components/FeaturedIn.module.css+++ /dev/null@@ -1,149 +0,0 @@-.wrap {- padding: 48px 0 56px;- background: var(--canvas);- border-top: 1px solid var(--hairline);- border-bottom: 1px solid var(--hairline);-}-.wrapCompact {- padding: 36px 0 0;- background: transparent;- border: 0;- margin-top: 40px;-}-.wrapCompact .eyebrow {- margin-bottom: 4px;-}-.inner {- max-width: 1100px;- margin: 0 auto;- padding: 0 40px;- display: flex;- flex-direction: column;- gap: 22px;- align-items: center;-}-.eyebrow {- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 2.4px;- color: var(--mute);- text-transform: uppercase;- display: flex;- align-items: center;- gap: 12px;- width: 100%;- justify-content: center;-}-.eyebrow::before,-.eyebrow::after {- content: "";- flex: 0 0 80px;- height: 1px;- background: var(--hairline);-}-.row {- display: grid;- grid-template-columns: repeat(4, 1fr);- gap: 16px;- width: 100%;- max-width: 1100px;- align-items: stretch;-}-.cell {- position: relative;- display: grid;- grid-template-columns: 56px 1fr auto;- gap: 14px;- align-items: center;- padding: 18px 22px;- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- background: var(--canvas-card);- text-decoration: none;- color: var(--ink);- transition: border-color 0.15s ease, background 0.15s ease;- min-height: 96px;-}-.cell:hover,-.cell:focus-visible {- border-color: var(--border-ghost);- background: var(--canvas-soft);-}-.cell:focus-visible {- outline: 2px solid rgba(255, 255, 255, 0.55);- outline-offset: 2px;-}-.cellBadge {- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- gap: 10px;- padding: 16px 16px;-}-.logo {- width: 56px;- height: 56px;- border-radius: var(--radius-card);- object-fit: cover;- background: var(--canvas);-}-.badgeImg {- width: 100%;- height: auto;- max-width: 260px;- max-height: 60px;- object-fit: contain;- display: block;-}-.invertLogo {- filter: invert(1) brightness(1.05);- max-height: 64px;- max-width: 280px;-}-.meta {- display: flex;- flex-direction: column;- gap: 4px;- min-width: 0;-}-.name {- font-size: 14px;- font-weight: 500;- color: var(--ink);- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}-.sub {- font-family: var(--font-mono);- font-size: 10.5px;- letter-spacing: 0.8px;- color: var(--mute);- text-transform: uppercase;-}-.arrow {- font-family: var(--font-mono);- color: var(--mute);- font-size: 14px;- transition: color 0.15s ease, transform 0.15s ease;-}-.cell:hover .arrow {- color: var(--ink);- transform: translate(2px, -2px);-}-@media (max-width: 980px) {- .row {- grid-template-columns: repeat(2, 1fr);- max-width: 720px;- }-}-@media (max-width: 540px) {- .row {- grid-template-columns: 1fr;- max-width: 380px;- }- .wrap {- padding: 32px 0 40px;- }-}diff --git a/website/components/FeaturedIn.tsx b/website/components/FeaturedIn.tsxdeleted file mode 100644index eade9ffa..00000000--- a/website/components/FeaturedIn.tsx+++ /dev/null@@ -1,123 +0,0 @@-import Image from "next/image";-import styles from "./FeaturedIn.module.css";--interface Feature {- name: string;- sub: string;- href: string;- logo: string;- logoAlt: string;- // When the source has its own brand-mark image (e.g. Trendshift's- // badge endpoint that bakes the repo's star count into the image),- // render it full-width instead of the logo-left text-right layout.- badge?: boolean;-}--const ITEMS: Feature[] = [- {- name: "AlphaSignal",- sub: "180K technical subscribers",- href: "https://alphasignalai.substack.com/p/how-agentmemory-works-and-how-to",- logo: "https://avatars.githubusercontent.com/u/64016073?s=200&v=4",- logoAlt: "AlphaSignal logo",- },- {- name: "Agentic AI Foundation",- sub: "Linux Foundation backed",- href: "https://aaif.io/",- logo: "/featured/aaif-logo.png",- logoAlt: "Agentic AI Foundation logo",- badge: true,- },- {- name: "Trendshift",- sub: "Position #19 · NEW 2026",- href: "https://trendshift.io/repositories/25123",- logo: "https://trendshift.io/api/badge/repositories/25123",- logoAlt: "Trendshift badge for agentmemory",- badge: true,- },- {- name: "Product Hunt",- sub: "Live upvote count",- href: "https://www.producthunt.com/products/agent-memory-dev?embed=true&utm_source=badge-featured&utm_medium=badge&utm_campaign=badge-agentmemory",- logo: "https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1144164&theme=neutral",- logoAlt: "Featured on Product Hunt — live upvote count",- badge: true,- },-];--interface FeaturedInProps {- // When true, render the bar without the outer `<section>` chrome- // (no border, no own padding) so it can be inlined inside the- // hero below the CTA stack.- compact?: boolean;-}--export function FeaturedIn({ compact = false }: FeaturedInProps = {}) {- const wrapClass = compact ? `${styles.wrap} ${styles.wrapCompact}` : styles.wrap;- return (- <section- className={wrapClass}- aria-labelledby="featured-in-title"- >- <div className={styles.inner}>- <div id="featured-in-title" className={styles.eyebrow}>- AS FEATURED IN- </div>- <div className={styles.row}>- {ITEMS.map((it) =>- it.badge ? (- <a- key={it.name}- className={`${styles.cell} ${styles.cellBadge}`}- href={it.href}- target="_blank"- rel="noopener"- aria-label={`${it.name} — ${it.sub}`}- >- <Image- src={it.logo}- alt={it.logoAlt}- width={250}- height={55}- unoptimized- className={- it.logo.startsWith("/featured/aaif")- ? `${styles.badgeImg} ${styles.invertLogo}`- : styles.badgeImg- }- />- <span className={styles.sub}>{it.sub}</span>- </a>- ) : (- <a- key={it.name}- className={styles.cell}- href={it.href}- target="_blank"- rel="noopener"- >- <Image- src={it.logo}- alt={it.logoAlt}- width={56}- height={56}- unoptimized- className={styles.logo}- />- <div className={styles.meta}>- <span className={styles.name}>{it.name}</span>- <span className={styles.sub}>{it.sub}</span>- </div>- <span className={styles.arrow} aria-hidden>- ↗- </span>- </a>- ),- )}- </div>- </div>- </section>- );-}diff --git a/website/components/Features.module.css b/website/components/Features.module.cssdeleted file mode 100644index 79bbe30d..00000000--- a/website/components/Features.module.css+++ /dev/null@@ -1,63 +0,0 @@-.wrap {- padding: 96px 0;-}-.grid {- max-width: 1440px;- margin: 0 auto;- padding: 0 40px;- list-style: none;- display: grid;- grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));- gap: 16px;-}-.tile {- background: var(--canvas-card);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- padding: 28px;- transition: background 200ms ease;- min-height: 240px;-}-.tile:hover {- background: var(--canvas-soft);-}-.kPill {- display: inline-flex;- align-items: baseline;- gap: 8px;- padding: 5px 12px;- border: 1px solid var(--hairline);- border-radius: var(--radius-pill);- margin-bottom: 20px;-}-.k {- font-family: var(--font-mono);- font-size: 13px;- font-weight: 500;- color: var(--ink);-}-.unit {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 1.2px;- color: var(--mute);- text-transform: uppercase;-}-.tileTitle {- margin: 0 0 12px;- font-size: 19px;- font-weight: 500;- letter-spacing: -0.01em;- color: var(--ink);-}-.tileText {- margin: 0;- font-size: 13.5px;- color: var(--body);- line-height: 1.65;-}-@media (max-width: 640px) {- .grid {- padding: 0 20px;- }-}diff --git a/website/components/Features.tsx b/website/components/Features.tsxdeleted file mode 100644index 55f259d5..00000000--- a/website/components/Features.tsx+++ /dev/null@@ -1,123 +0,0 @@-import styles from "./Features.module.css";--interface Props {- hooks: number;- mcpTools: number;- restEndpoints: number;-}--export function Features({ hooks, mcpTools, restEndpoints }: Props) {- const FEATURES = [- {- k: `${hooks}`,- unit: "AUTO-HOOKS",- title: "Capture everything",- text:- "Every session start, prompt, tool call, and stop fires into the memory pipeline with no glue code. Install the plugin and capture begins.",- },- {- k: `${mcpTools}`,- unit: "MCP TOOLS",- title: "Native MCP surface",- text:- "memory_save, memory_recall, memory_smart_search, memory_sessions, governance, audit, export: the full surface behind a single MCP server. Saving a near-duplicate returns a similarTo hint instead of a second copy.",- },- {- k: `${restEndpoints}`,- unit: "REST ENDPOINTS",- title: "HTTP first",- text:- "Every MCP tool has a REST twin under /agentmemory/*. Curl it, fetch it from the browser, or proxy it from your own agent.",- },- {- k: "BM25",- unit: "+ VECTOR + GRAPH",- title: "Hybrid recall",- text:- "The primary recall path ranks lexical, semantic, and graph scores together, reranked on device. Superseded versions stay out of results while their history stays queryable.",- },- {- k: "5",- unit: "ORIGIN CHANNELS",- title: "Provenance built in",- text:- "Every record carries write-time provenance: user, agent, tool, import, or shared. Pass agentId through save and recall to scope memory per agent.",- },- {- k: "AUTO",- unit: "CONSOLIDATION",- title: "Raw to semantic",- text:- "Activates with an LLM provider key. Consolidation runs on session stop: observations compress into semantic memories, duplicates merge, stale rows decay with retention scoring, and audit rows record the sweep.",- },- {- k: "∞",- unit: "REPLAY",- title: "JSONL session import",- text:- "Point agentmemory at a Claude Code JSONL transcript and it rehydrates the session, indexes it for search, and derives crystals and lessons from what it finds.",- },- {- k: "GRAPH",- unit: "EXTRACTION",- title: "Knowledge graph",- text:- "Entities and relations extract from observations when an LLM provider key is set and graph extraction is enabled. Query with /agentmemory/graph. Visualize in the viewer. Temporal edges supported.",- },- {- k: "IDX",- unit: "LESSON RECALL",- title: "Lessons that resurface",- text:- "Save a lesson once, recall it by relevance later. Lessons live in a dedicated BM25 index with confidence and recency reranking, with save, recall, and delete over MCP and REST.",- },- {- k: "MESH",- unit: "FEDERATION",- title: "Peer-to-peer sync",- text:- "Register another agentmemory node and push or pull memories over authenticated HTTPS. A bearer token is required; no silent syncs.",- },- {- k: "MD",- unit: "OBSIDIAN EXPORT",- title: "Your notes, hydrated",- text:- "Mirror memories to a sandboxed vault directory as frontmatter-tagged markdown, ready for Obsidian's graph view.",- },- {- k: "0",- unit: "EXTERNAL DBs",- title: "One process",- text:- "Runs as a single Node process with zero external services. State lives on disk as JSON. agentmemory stop flushes indexes before exit, in Docker mode too.",- },- ];-- return (- <section className={styles.wrap} id="features" aria-labelledby="feat-title">- <header className="section-head">- <span className="section-eyebrow">What's inside</span>- <h2 id="feat-title" className="section-title">- Twelve things you did not want to build.- </h2>- <p className="section-lede">- agentmemory is not a library or a vector store. It is a complete- memory runtime: capture, recall, consolidate, observe, federate.- </p>- </header>- <ul className={styles.grid}>- {FEATURES.map((f) => (- <li key={f.title} className={styles.tile}>- <div className={styles.kPill}>- <span className={styles.k}>{f.k}</span>- <span className={styles.unit}>{f.unit}</span>- </div>- <h3 className={styles.tileTitle}>{f.title}</h3>- <p className={styles.tileText}>{f.text}</p>- </li>- ))}- </ul>- </section>- );-}diff --git a/website/components/Footer.module.css b/website/components/Footer.module.cssdeleted file mode 100644index 913a119d..00000000--- a/website/components/Footer.module.css+++ /dev/null@@ -1,49 +0,0 @@-.foot {- padding: 48px 40px 32px;- background: var(--canvas);- border-top: 1px solid var(--hairline);-}-.row {- max-width: 1440px;- margin: 0 auto;- display: flex;- align-items: center;- justify-content: space-between;- gap: 24px;- flex-wrap: wrap;-}-.mark {- font-size: 18px;- font-weight: 500;- letter-spacing: -0.02em;- color: var(--ink);-}-.links {- display: flex;- gap: 28px;- flex-wrap: wrap;-}-.links a {- font-size: 14px;- color: var(--body);-}-.links a:hover {- color: var(--ink);-}-.fine {- max-width: 1440px;- margin: 32px auto 0;- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 0.8px;- color: var(--mute);-}-@media (max-width: 640px) {- .foot {- padding: 32px 20px 24px;- }- .row {- flex-direction: column;- align-items: flex-start;- }-}diff --git a/website/components/Footer.tsx b/website/components/Footer.tsxdeleted file mode 100644index e0280962..00000000--- a/website/components/Footer.tsx+++ /dev/null@@ -1,40 +0,0 @@-import styles from "./Footer.module.css";--export function Footer() {- return (- <footer className={styles.foot}>- <div className={styles.row}>- <a href="#top" className={styles.mark}>- agentmemory- </a>- <nav className={styles.links} aria-label="Footer">- <a- href="https://github.com/rohitg00/agentmemory"- target="_blank"- rel="noopener"- >- Source- </a>- <a- href="https://github.com/rohitg00/agentmemory/blob/main/CHANGELOG.md"- target="_blank"- rel="noopener"- >- Changelog- </a>- <a href="https://iii.dev" target="_blank" rel="noopener">- Runs on iii- </a>- <a- href="https://github.com/rohitg00/agentmemory/blob/main/LICENSE"- target="_blank"- rel="noopener"- >- Apache-2.0- </a>- </nav>- </div>- <div className={styles.fine}>© 2026 agentmemory · Built in the open</div>- </footer>- );-}diff --git a/website/components/GitHubStarButton.module.css b/website/components/GitHubStarButton.module.cssdeleted file mode 100644index 50f7b63f..00000000--- a/website/components/GitHubStarButton.module.css+++ /dev/null@@ -1,31 +0,0 @@-.starBtn {- display: inline-flex;- align-items: center;- gap: 8px;-}--.icon {- display: inline-block;- flex: 0 0 auto;- margin-top: -2px;-}--.label {- letter-spacing: 0;-}--.count {- display: inline-flex;- align-items: center;- justify-content: center;- min-width: 2.5ch;- padding: 1px 8px;- margin-left: 4px;- border-radius: var(--radius-pill);- background: rgba(255, 255, 255, 0.08);- color: var(--body);- font-family: var(--font-mono);- font-variant-numeric: tabular-nums;- font-size: 0.8em;- letter-spacing: 0.04em;-}diff --git a/website/components/GitHubStarButton.tsx b/website/components/GitHubStarButton.tsxdeleted file mode 100644index 4656af31..00000000--- a/website/components/GitHubStarButton.tsx+++ /dev/null@@ -1,93 +0,0 @@-"use client";--import { useEffect, useState } from "react";-import styles from "./GitHubStarButton.module.css";--interface Props {- repo: string;- // SSR-fed initial count from Nav's server-side fetch. When present- // the badge renders the number on first paint; the client-side- // refetch below is a best-effort refresh that only fires if it- // succeeds (unauthenticated github.com api is rate-limited to- // ~60/hr/IP, which is why the count was invisible before).- initialStars?: number;-}--function formatStars(n: number): string {- if (n >= 1000) {- const k = n / 1000;- return k >= 10 ? `${Math.round(k)}k` : `${k.toFixed(1).replace(/\.0$/, "")}k`;- }- return String(n);-}--export function GitHubStarButton({ repo, initialStars }: Props) {- const [stars, setStars] = useState<number | null>(- typeof initialStars === "number" ? initialStars : null,- );-- useEffect(() => {- let cancelled = false;- const cacheKey = `gh-stars:${repo}`;- const cached = typeof window !== "undefined" ? window.localStorage.getItem(cacheKey) : null;- if (cached) {- try {- const parsed = JSON.parse(cached) as { value: number; at: number };- if (Date.now() - parsed.at < 30 * 60 * 1000) {- setStars(parsed.value);- }- } catch {- /* ignore */- }- }- (async () => {- try {- const res = await fetch(`https://api.github.com/repos/${repo}`, {- headers: { Accept: "application/vnd.github+json" },- });- if (!res.ok) return;- const data = (await res.json()) as { stargazers_count?: number };- if (cancelled) return;- if (typeof data.stargazers_count === "number") {- setStars(data.stargazers_count);- try {- window.localStorage.setItem(- cacheKey,- JSON.stringify({ value: data.stargazers_count, at: Date.now() }),- );- } catch {- /* ignore */- }- }- } catch {- /* offline / blocked — keep SSR / cached / null */- }- })();- return () => {- cancelled = true;- };- }, [repo]);-- return (- <a- href={`https://github.com/${repo}`}- target="_blank"- rel="noopener noreferrer"- className={`btn btn--ghost ${styles.starBtn}`}- aria-label={`Star ${repo} on GitHub${stars !== null ? `, ${stars.toLocaleString()} stars` : ""}`}- >- <svg- aria-hidden- viewBox="0 0 16 16"- width="18"- height="18"- className={styles.icon}- fill="currentColor"- >- <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z" />- </svg>- <span className={styles.label}>Star</span>- {stars !== null && <span className={styles.count}>{formatStars(stars)}</span>}- </a>- );-}diff --git a/website/components/Hero.module.css b/website/components/Hero.module.cssdeleted file mode 100644index 5cea3ee7..00000000--- a/website/components/Hero.module.css+++ /dev/null@@ -1,115 +0,0 @@-.hero {- position: relative;- min-height: 100vh;- display: flex;- align-items: center;- justify-content: center;- overflow: hidden;- padding: 120px 24px 80px;- background: var(--canvas);-}-.vignette {- position: absolute;- inset: 0;- background: radial-gradient(- ellipse at center,- rgba(10, 10, 10, 0) 0%,- rgba(10, 10, 10, 0.5) 78%,- rgba(10, 10, 10, 0.9) 100%- );-}--.content {- position: relative;- z-index: 2;- text-align: center;- max-width: 1200px;- margin: 0 auto;- width: 100%;-}--.chip {- display: inline-block;- padding: 7px 16px;- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 1.4px;- color: var(--mute);- border: 1px solid var(--hairline);- border-radius: var(--radius-pill);- text-transform: uppercase;- margin-bottom: 28px;-}--.title {- font-size: clamp(52px, 9vw, 118px);- font-weight: 400;- line-height: 0.96;- letter-spacing: -0.035em;- color: var(--ink);- margin: 0;- display: flex;- justify-content: center;- gap: 0;- flex-wrap: wrap;-}--.word {- display: inline-block;- opacity: 0;- transform: translateY(40px);- animation: slideIn 900ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;-}-.word:nth-child(2) {- animation-delay: 120ms;-}-.accent {- color: var(--body);-}--@keyframes slideIn {- to {- opacity: 1;- transform: translateY(0);- }-}--.lede {- max-width: 620px;- margin: 28px auto 36px;- font-size: clamp(15px, 1.3vw, 18px);- color: var(--body);- line-height: 1.6;-}--.cta {- display: flex;- flex-direction: column;- align-items: center;- gap: 14px;- width: 100%;-}-.ctaSecondary {- display: inline-flex;- gap: 12px;- flex-wrap: wrap;- justify-content: center;-}--@media (max-width: 760px) {- .hero {- padding: 96px 18px 56px;- min-height: 0;- }- .title {- font-size: clamp(44px, 14vw, 72px);- }- .lede {- margin: 20px auto 24px;- }- .chip {- font-size: 10px;- padding: 6px 12px;- margin-bottom: 20px;- }-}diff --git a/website/components/Hero.tsx b/website/components/Hero.tsxdeleted file mode 100644index 69b3fe94..00000000--- a/website/components/Hero.tsx+++ /dev/null@@ -1,45 +0,0 @@-import { MemoryGraph } from "./MemoryGraph";-import { FeaturedIn } from "./FeaturedIn";-import { GitHubStarButton } from "./GitHubStarButton";-import { HeroNpxCommand } from "./HeroNpxCommand";-import { getProjectMeta } from "@/lib/meta";-import { fetchRepoStats } from "@/lib/github";-import styles from "./Hero.module.css";--export async function Hero() {- const meta = getProjectMeta();- const stats = await fetchRepoStats();- return (- <section className={styles.hero} aria-labelledby="hero-title">- <MemoryGraph />- <div className={styles.vignette} aria-hidden />- <div className={styles.content}>- <div className={styles.chip}>- ZERO EXTERNAL DATABASES · v{meta.version}- </div>- <h1 className={styles.title} id="hero-title">- <span className={styles.word}>agent</span>- <span className={`${styles.word} ${styles.accent}`}>memory</span>- </h1>- <p className={styles.lede}>- Give your coding agent a memory that survives the session. 95.2%- retrieval recall on LongMemEval-S with about 92% fewer input tokens- than full-context replay, all on your own machine.- </p>- <div className={styles.cta}>- <HeroNpxCommand />- <div className={styles.ctaSecondary}>- <a href="#live" className="btn btn--ghost">- See it move- </a>- <GitHubStarButton- repo="rohitg00/agentmemory"- initialStars={stats.stars > 0 ? stats.stars : undefined}- />- </div>- </div>- <FeaturedIn compact />- </div>- </section>- );-}diff --git a/website/components/HeroNpxCommand.module.css b/website/components/HeroNpxCommand.module.cssdeleted file mode 100644index 3449b664..00000000--- a/website/components/HeroNpxCommand.module.css+++ /dev/null@@ -1,64 +0,0 @@-.cmd {- display: inline-grid;- grid-template-columns: auto 1fr auto;- align-items: center;- gap: 14px;- padding: 15px 24px;- min-width: 460px;- max-width: 100%;- background: var(--canvas-soft);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- color: var(--ink);- font-family: var(--font-mono);- font-size: 15px;- letter-spacing: 0.02em;- cursor: pointer;- transition: background 0.15s ease, border-color 0.15s ease;- text-align: left;-}-.cmd:hover {- background: var(--canvas-card);- border-color: var(--border-ghost);-}-.cmd:focus-visible {- outline: 2px solid rgba(255, 255, 255, 0.55);- outline-offset: 3px;-}-.copied {- border-color: var(--ok);-}-.copied .hint {- color: var(--ok);-}-.prompt {- color: var(--sunset);-}-.copied .prompt {- color: var(--ok);-}-.text {- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}-.hint {- font-size: 10px;- letter-spacing: 1.4px;- color: var(--mute);- text-transform: uppercase;- padding-left: 12px;- border-left: 1px solid var(--hairline);-}-@media (max-width: 640px) {- .cmd {- min-width: 0;- width: 100%;- font-size: 13px;- padding: 14px 16px;- gap: 10px;- }- .hint {- display: none;- }-}diff --git a/website/components/HeroNpxCommand.tsx b/website/components/HeroNpxCommand.tsxdeleted file mode 100644index ff57ba87..00000000--- a/website/components/HeroNpxCommand.tsx+++ /dev/null@@ -1,33 +0,0 @@-"use client";--import { useState } from "react";-import styles from "./HeroNpxCommand.module.css";--const CMD = "npx @agentmemory/agentmemory";--export function HeroNpxCommand() {- const [copied, setCopied] = useState(false);-- const onCopy = async () => {- try {- await navigator.clipboard.writeText(CMD);- setCopied(true);- window.setTimeout(() => setCopied(false), 1600);- } catch {- /* clipboard blocked — keep button visible */- }- };-- return (- <button- type="button"- onClick={onCopy}- className={`${styles.cmd} ${copied ? styles.copied : ""}`}- aria-label="Copy install command"- >- <span className={styles.prompt}>$</span>- <span className={styles.text}>{CMD}</span>- <span className={styles.hint}>{copied ? "COPIED" : "CLICK TO COPY"}</span>- </button>- );-}diff --git a/website/components/Install.module.css b/website/components/Install.module.cssdeleted file mode 100644index e7e8d12f..00000000--- a/website/components/Install.module.css+++ /dev/null@@ -1,95 +0,0 @@-.install {- padding: 112px 0;- border-top: 1px solid var(--hairline);-}-.cards {- max-width: 1000px;- margin: 0 auto 56px;- padding: 0 40px;- display: grid;- grid-template-columns: minmax(0, 1fr);- gap: 28px;-}-.step {- display: grid;- gap: 10px;-}-.stepLabel {- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 1.4px;- color: var(--mute);- text-transform: uppercase;-}-.box {- display: grid;- grid-template-columns: auto minmax(0, 1fr) auto;- gap: 16px;- align-items: center;- padding: 20px 26px;- background: var(--canvas-soft);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- color: var(--body);- font-family: var(--font-mono);- font-size: 14px;- text-align: left;- width: 100%;- min-width: 0;- transition:- border-color 200ms ease,- background 200ms ease;- cursor: pointer;-}-.box:hover {- border-color: var(--border-ghost);- background: var(--canvas-card);-}-.boxCopied {- border-color: var(--ok) !important;-}-.boxCopied .hint {- color: var(--ok);-}-.prompt {- color: var(--sunset);-}-.cmd {- color: var(--ink);- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;- min-width: 0;-}-.hint {- color: var(--mute);- font-size: 10.5px;- letter-spacing: 1.2px;- text-transform: uppercase;- white-space: nowrap;-}-.cta {- display: flex;- justify-content: center;- gap: 16px;- flex-wrap: wrap;- padding: 0 40px;-}-@media (max-width: 640px) {- .cards,- .cta {- padding: 0 20px;- }- .box {- grid-template-columns: auto minmax(0, 1fr);- padding: 18px 16px;- gap: 10px;- font-size: 13px;- }- .hint {- grid-column: 1 / -1;- font-size: 10px;- letter-spacing: 0.6px;- white-space: normal;- }-}diff --git a/website/components/Install.tsx b/website/components/Install.tsxdeleted file mode 100644index af25eee2..00000000--- a/website/components/Install.tsx+++ /dev/null@@ -1,120 +0,0 @@-"use client";--import { useState } from "react";-import styles from "./Install.module.css";-import { AgentInstall } from "./AgentInstall";--interface Cmd {- label: string;- cmd: string;- hint: string;-}--const SIMPLE: Cmd[] = [- {- label: "1. INSTALL ONCE",- cmd: "npm install -g @agentmemory/agentmemory",- hint: "PUTS `agentmemory` ON YOUR PATH · STEPS 2/3 NEED THIS",- },- {- label: "2. START THE MEMORY SERVER",- cmd: "agentmemory",- hint: "RUNS ON :3111 · VIEWER ON :3113",- },- {- label: "3. RUN THE DEMO",- cmd: "agentmemory demo",- hint: "SEEDS 3 SESSIONS · SHOWS HYBRID RECALL ON REAL DATA",- },-];--const NPX_FALLBACK: Cmd = {- label: "ZERO-INSTALL PATH: NPX",- cmd: "npx @agentmemory/agentmemory",- hint: "REPLACES STEPS 1+2 · USES NPX CACHE · SEE README FOR CAVEAT",-};--function CopyBox({ label, cmd, hint }: Cmd) {- const [copied, setCopied] = useState(false);- const [text, setText] = useState(hint);-- const onClick = async () => {- try {- await navigator.clipboard.writeText(cmd);- setCopied(true);- setText("COPIED");- setTimeout(() => {- setCopied(false);- setText(hint);- }, 1600);- } catch {- setText("CLIPBOARD BLOCKED");- }- };-- return (- <div className={styles.step}>- <div className={styles.stepLabel}>{label}</div>- <button- className={`${styles.box} ${copied ? styles.boxCopied : ""}`}- onClick={onClick}- >- <span className={styles.prompt}>$</span>- <span className={styles.cmd}>{cmd}</span>- <span className={styles.hint}>{text}</span>- </button>- </div>- );-}--export function Install() {- return (- <section className={styles.install} id="install" aria-labelledby="install-title">- <header className="section-head">- <span className="section-eyebrow">Ship it</span>- <h2 id="install-title" className="section-title">- One install.<br />Any agent.- </h2>- <p className="section-lede">- Runs on your machine. Data stays local. Capture and recall need no- LLM key; add one for Anthropic, OpenAI, Gemini, MiniMax, or- OpenRouter to activate consolidation, graph extraction, and LLM- compression.- </p>- </header>- <div className={styles.cards}>- {SIMPLE.map((c) => (- <CopyBox key={c.cmd} {...c} />- ))}- <CopyBox {...NPX_FALLBACK} />- <AgentInstall />- </div>- <div className={styles.cta}>- <a- className="btn btn--sunset"- href="https://github.com/rohitg00/agentmemory#quick-start"- target="_blank"- rel="noopener"- >- Read the quickstart- </a>- <a- className="btn btn--ghost"- href="https://www.npmjs.com/package/@agentmemory/agentmemory"- target="_blank"- rel="noopener"- >- npm package- </a>- <a- className="btn btn--ghost"- href="https://github.com/rohitg00/agentmemory/tree/main/integrations"- target="_blank"- rel="noopener"- >- Integrations- </a>- </div>- </section>- );-}diff --git a/website/components/LiveTerminal.module.css b/website/components/LiveTerminal.module.cssdeleted file mode 100644index a4c4a3eb..00000000--- a/website/components/LiveTerminal.module.css+++ /dev/null@@ -1,101 +0,0 @@-.live {- padding: 96px 0;-}-.terminal {- max-width: 1100px;- margin: 0 auto;- padding: 0 40px;-}-.chrome {- display: flex;- align-items: center;- gap: 8px;- background: var(--canvas-soft);- padding: 12px 16px;- border: 1px solid var(--hairline);- border-bottom: none;- border-radius: var(--radius-card) var(--radius-card) 0 0;-}-.dot {- width: 9px;- height: 9px;- border-radius: 50%;- display: inline-block;- background: var(--canvas-mid);-}-.red,-.yellow,-.green {- background: var(--canvas-mid);-}-.title {- margin-left: 12px;- font-family: var(--font-mono);- font-size: 12px;- color: var(--mute);-}-.body {- margin: 0;- padding: 24px 24px 16px;- background: var(--canvas-card);- border: 1px solid var(--hairline);- border-top: none;- font-family: var(--font-mono);- font-size: 13.5px;- line-height: 1.7;- color: var(--body);- white-space: pre-wrap;- min-height: 360px;- overflow: hidden;-}-.prompt {- color: var(--sunset);-}-.comment {- color: var(--mute);-}-.ok {- color: var(--ok);-}-.val {- color: var(--breeze);-}-.caret {- display: inline-block;- width: 8px;- height: 1em;- vertical-align: text-bottom;- background: var(--sunset);- margin-left: 2px;- animation: blink 1s steps(1) infinite;-}-@keyframes blink {- 50% {- opacity: 0;- }-}-.foot {- display: flex;- justify-content: space-between;- align-items: center;- background: var(--canvas-soft);- padding: 12px 16px;- border: 1px solid var(--hairline);- border-top: none;- border-radius: 0 0 var(--radius-card) var(--radius-card);-}-.status {- font-family: var(--font-mono);- font-size: 11px;- color: var(--mute);- letter-spacing: 1.2px;- text-transform: uppercase;-}-@media (max-width: 640px) {- .terminal {- padding: 0 20px;- }- .body {- font-size: 12px;- }-}diff --git a/website/components/LiveTerminal.tsx b/website/components/LiveTerminal.tsxdeleted file mode 100644index 3fae5a3d..00000000--- a/website/components/LiveTerminal.tsx+++ /dev/null@@ -1,159 +0,0 @@-"use client";--import { useCallback, useEffect, useRef, useState } from "react";-import styles from "./LiveTerminal.module.css";--type SegType = "prompt" | "typed" | "plain" | "comment" | "ok" | "val";-interface Seg {- t: SegType;- text: string;-}--function buildScript(mcpTools: number, hooks: number): Seg[] {- return [- { t: "prompt", text: "$ " },- { t: "typed", text: "npx @agentmemory/agentmemory\n" },- { t: "plain", text: "[agentmemory] iii-engine ready on :3111\n" },- { t: "plain", text: `[agentmemory] ${mcpTools} MCP tools registered\n` },- { t: "plain", text: `[agentmemory] ${hooks} autohooks armed\n\n` },- { t: "prompt", text: "$ " },- {- t: "typed",- text: 'memory.recall({ query: "where did we land the retry logic?" })\n',- },- { t: "comment", text: "// hybrid retrieval: BM25 + vector + graph\n" },- { t: "ok", text: "✓ 3 memories · reranked on device\n\n" },- { t: "plain", text: "→ " },- { t: "val", text: "src/retry.ts:47 · exponentialBackoff(max=5, jitter=true)\n" },- { t: "plain", text: "→ " },- {- t: "val",- text: 'commit 8f2e14c · "resolve conflict + honor x-amz headers"\n',- },- { t: "plain", text: "→ " },- {- t: "val",- text: 'session 2026-04-16 · "bug: race when Retry-After is empty"\n\n',- },- { t: "prompt", text: "$ " },- { t: "typed", text: "memory.consolidate({ project: 'pay-api' })\n" },- { t: "ok", text: "✓ raw observations → semantic memories · audit rows written\n" },- ];-}--function classFor(type: SegType) {- switch (type) {- case "prompt":- return styles.prompt;- case "comment":- return styles.comment;- case "ok":- return styles.ok;- case "val":- return styles.val;- default:- return "";- }-}--export function LiveTerminal({- mcpTools,- hooks,-}: {- mcpTools: number;- hooks: number;-}) {- const termRef = useRef<HTMLElement>(null);- const [status, setStatus] = useState("IDLE");- const runningRef = useRef(false);- const played = useRef(false);-- const play = useCallback(async () => {- const term = termRef.current;- if (!term || runningRef.current) return;- runningRef.current = true;- setStatus("RUNNING");- term.innerHTML = "";- const caret = document.createElement("span");- caret.className = styles.caret;- term.appendChild(caret);- const reduce = matchMedia("(prefers-reduced-motion: reduce)").matches;- const script = buildScript(mcpTools, hooks);-- for (const seg of script) {- const span = document.createElement("span");- const c = classFor(seg.t);- if (c) span.className = c;- term.insertBefore(span, caret);- if (seg.t === "typed") {- for (const ch of seg.text) {- span.textContent += ch;- await new Promise((r) =>- setTimeout(r, reduce ? 0 : 16 + Math.random() * 34),- );- }- await new Promise((r) => setTimeout(r, reduce ? 0 : 260));- } else {- span.textContent = seg.text;- await new Promise((r) => setTimeout(r, reduce ? 0 : 160));- }- }- setStatus("DONE");- runningRef.current = false;- }, [mcpTools, hooks]);-- useEffect(() => {- const term = termRef.current;- if (!term) return;- const host = term.closest("[data-terminal]");- if (!host) return;- const io = new IntersectionObserver(- (entries) => {- for (const entry of entries) {- if (entry.isIntersecting && !played.current) {- played.current = true;- play();- io.unobserve(entry.target);- }- }- },- { threshold: 0.4 },- );- io.observe(host);- return () => io.disconnect();- }, [play]);-- return (- <section className={styles.live} id="live" aria-labelledby="live-title">- <header className="section-head">- <span className="section-eyebrow">Live</span>- <h2 id="live-title" className="section-title">- Memory that types back.- </h2>- </header>- <div className={styles.terminal} data-terminal>- <div className={styles.chrome}>- <span className={`${styles.dot} ${styles.red}`} />- <span className={`${styles.dot} ${styles.yellow}`} />- <span className={`${styles.dot} ${styles.green}`} />- <span className={styles.title}>agentmemory@localhost:3111</span>- </div>- <pre className={styles.body}>- <code ref={termRef} />- </pre>- <div className={styles.foot}>- <button- className="btn btn--ghost btn--small"- onClick={() => {- played.current = true;- play();- }}- >- Replay- </button>- <span className={styles.status}>{status}</span>- </div>- </div>- </section>- );-}diff --git a/website/components/MemoryGraph.module.css b/website/components/MemoryGraph.module.cssdeleted file mode 100644index 71b3110b..00000000--- a/website/components/MemoryGraph.module.css+++ /dev/null@@ -1,46 +0,0 @@-.canvas {- position: absolute;- inset: 0;- width: 100%;- height: 100%;-}--.pause {- position: absolute;- right: 40px;- bottom: 56px;- z-index: 3;- border-radius: var(--radius-pill);- transition: opacity 200ms ease;- opacity: 0.7;-}-.pause:hover {- opacity: 1;-}--.rail {- position: absolute;- left: 40px;- right: 40px;- bottom: 24px;- height: 1px;- background: rgba(255, 255, 255, 0.14);-}-.rail span {- display: block;- height: 100%;- width: 0;- background: rgba(255, 255, 255, 0.55);- transition: width 60ms linear;-}--@media (max-width: 640px) {- .pause {- right: 20px;- bottom: 36px;- }- .rail {- left: 20px;- right: 20px;- }-}diff --git a/website/components/MemoryGraph.tsx b/website/components/MemoryGraph.tsxdeleted file mode 100644index 730e48a5..00000000--- a/website/components/MemoryGraph.tsx+++ /dev/null@@ -1,104 +0,0 @@-"use client";--import { useEffect, useRef, useState } from "react";-import styles from "./MemoryGraph.module.css";--// Ambient hero backdrop: a quiet dither field of drifting dots.-// Every dot stays under 0.13 alpha; prefers-reduced-motion renders a-// single static frame instead of animating.-export function MemoryGraph() {- const canvasRef = useRef<HTMLCanvasElement>(null);- const [running, setRunning] = useState(true);- const railRef = useRef<HTMLSpanElement>(null);-- useEffect(() => {- const canvas = canvasRef.current;- if (!canvas) return;- const ctx = canvas.getContext("2d");- if (!ctx) return;-- const reduceMotion = matchMedia("(prefers-reduced-motion: reduce)").matches;- let localRunning = running && !reduceMotion;- let rafId = 0;- let t = 0;-- const size = () => {- const dpr = Math.max(1, window.devicePixelRatio || 1);- const w = canvas.clientWidth;- const h = canvas.clientHeight;- canvas.width = w * dpr;- canvas.height = h * dpr;- ctx.setTransform(dpr, 0, 0, dpr, 0, 0);- };-- const draw = () => {- const w = canvas.clientWidth;- const h = canvas.clientHeight;- ctx.clearRect(0, 0, w, h);-- const spacing = 26;- const cols = Math.ceil(w / spacing) + 2;- const rows = Math.ceil(h / spacing) + 2;-- for (let gy = 0; gy < rows; gy++) {- for (let gx = 0; gx < cols; gx++) {- const x = gx * spacing;- const y = gy * spacing;- const wave =- Math.sin(x * 0.011 + t * 0.5) +- Math.sin(y * 0.014 - t * 0.32) +- Math.sin((x + y) * 0.006 + t * 0.21);- const a = Math.max(0, wave / 3) * 0.12;- if (a < 0.012) continue;- const dx = Math.sin(t * 0.12 + y * 0.02) * 5;- const dy = Math.cos(t * 0.09 + x * 0.015) * 3;- ctx.fillStyle = `rgba(255, 255, 255, ${a.toFixed(3)})`;- ctx.fillRect(x + dx, y + dy, 1.5, 1.5);- }- }-- t += 0.016;- };-- const tick = () => {- if (!localRunning) return;- draw();- rafId = requestAnimationFrame(tick);- };-- const onResize = () => {- size();- draw();- };-- size();- draw();- if (localRunning) rafId = requestAnimationFrame(tick);- window.addEventListener("resize", onResize);-- const updateRail = () => {- const h = document.documentElement;- const max = h.scrollHeight - h.clientHeight;- const pct = max <= 0 ? 0 : Math.min(1, h.scrollTop / max);- if (railRef.current) railRef.current.style.width = `${pct * 100}%`;- };- updateRail();- window.addEventListener("scroll", updateRail, { passive: true });-- return () => {- cancelAnimationFrame(rafId);- window.removeEventListener("resize", onResize);- window.removeEventListener("scroll", updateRail);- localRunning = false;- };- }, [running]);-- return (- <>- <canvas ref={canvasRef} className={styles.canvas} aria-hidden />- <div className={styles.rail} aria-hidden>- <span ref={railRef} />- </div>- </>- );-}diff --git a/website/components/MobileNavToggle.module.css b/website/components/MobileNavToggle.module.cssdeleted file mode 100644index 000d5542..00000000--- a/website/components/MobileNavToggle.module.css+++ /dev/null@@ -1,103 +0,0 @@-.hamburger {- display: none;- width: 40px;- height: 40px;- border: 1px solid var(--border-ghost);- border-radius: var(--radius-pill);- align-items: center;- justify-content: center;- flex-direction: column;- gap: 4px;-}-.bar {- display: block;- width: 16px;- height: 1.5px;- background: var(--ink);- transition:- transform 220ms ease,- opacity 220ms ease;- transform-origin: center;-}-.bar1 {- transform: translateY(5.5px) rotate(45deg) !important;-}-.bar2 {- opacity: 0;-}-.bar3 {- transform: translateY(-5.5px) rotate(-45deg) !important;-}--.sheet {- position: fixed;- inset: 0;- /* Portaled to <body>, so this sits in the root stacking context. Kept- below the nav (z-index: 100) so the brand + close button stay on top.- Fully opaque so hero content can't bleed through. */- background: var(--canvas);- z-index: 95;- opacity: 0;- pointer-events: none;- transition: opacity 200ms ease;- display: flex;- align-items: flex-start;- justify-content: center;- padding: 88px 20px 40px;-}-.sheetOpen {- opacity: 1;- pointer-events: auto;-}-.panel {- width: 100%;- max-width: 520px;- padding-top: 24px;-}-.list {- list-style: none;- padding: 0;- margin: 0;-}-.list li {- border-bottom: 1px solid var(--hairline);-}-.list a {- display: block;- padding: 18px 0;- font-size: 26px;- font-weight: 400;- letter-spacing: -0.02em;- color: var(--ink);- transition: color 180ms ease, padding-left 180ms ease;-}-.list a:hover {- color: var(--body);- padding-left: 8px;-}-.foot {- margin-top: 24px;- display: flex;- flex-wrap: wrap;- gap: 14px 20px;- padding-top: 20px;- border-top: 1px solid var(--hairline);-}-.foot a {- font-family: var(--font-mono);- font-size: 12px;- letter-spacing: 1.2px;- color: var(--mute);- text-transform: uppercase;-}-.foot a:hover {- color: var(--ink);-}--/* Must match the breakpoint that hides .links in Nav.module.css, or the- 721-860px range has no navigation at all. */-@media (max-width: 860px) {- .hamburger {- display: inline-flex;- }-}diff --git a/website/components/MobileNavToggle.tsx b/website/components/MobileNavToggle.tsxdeleted file mode 100644index 572c1c6c..00000000--- a/website/components/MobileNavToggle.tsx+++ /dev/null@@ -1,111 +0,0 @@-"use client";--import { useEffect, useRef, useState } from "react";-import { createPortal } from "react-dom";-import { formatCompact } from "@/lib/format";-import styles from "./MobileNavToggle.module.css";--interface Section {- href: string;- label: string;-}--export function MobileNavToggle({- sections,- stars,-}: {- sections: Section[];- stars: number;-}) {- const [open, setOpen] = useState(false);- const [mounted, setMounted] = useState(false);- const toggleRef = useRef<HTMLButtonElement>(null);-- useEffect(() => {- setMounted(true);- }, []);-- useEffect(() => {- if (!open) return;- const onKey = (e: KeyboardEvent) => {- if (e.key === "Escape") setOpen(false);- };- document.addEventListener("keydown", onKey);- document.body.style.overflow = "hidden";- return () => {- document.removeEventListener("keydown", onKey);- document.body.style.overflow = "";- toggleRef.current?.focus();- };- }, [open]);-- // The parent <header> uses `backdrop-filter`, which establishes a containing- // block for fixed descendants — that would clip the sheet to the header- // strip. Portal it to <body> so `position: fixed; inset: 0` covers the- // viewport instead.- const sheet = (- <div- className={`${styles.sheet} ${open ? styles.sheetOpen : ""}`}- aria-hidden={!open}- inert={!open}- onClick={(e) => {- if (e.target === e.currentTarget) setOpen(false);- }}- >- <nav className={styles.panel} aria-label="Site navigation">- <ul className={styles.list}>- {sections.map((s) => (- <li key={s.href}>- <a href={s.href} onClick={() => setOpen(false)}>- {s.label}- </a>- </li>- ))}- </ul>- <div className={styles.foot}>- <a- href="https://github.com/rohitg00/agentmemory"- target="_blank"- rel="noopener noreferrer"- onClick={() => setOpen(false)}- >- GITHUB · {formatCompact(stars)}★- </a>- <a- href="https://www.npmjs.com/package/@agentmemory/agentmemory"- target="_blank"- rel="noopener noreferrer"- onClick={() => setOpen(false)}- >- NPM- </a>- <a- href="https://github.com/rohitg00/agentmemory/blob/main/CHANGELOG.md"- target="_blank"- rel="noopener noreferrer"- onClick={() => setOpen(false)}- >- CHANGELOG- </a>- </div>- </nav>- </div>- );-- return (- <>- <button- className={styles.hamburger}- aria-label={open ? "Close menu" : "Open menu"}- aria-expanded={open}- onClick={() => setOpen((v) => !v)}- >- <span className={`${styles.bar} ${open ? styles.bar1 : ""}`} />- <span className={`${styles.bar} ${open ? styles.bar2 : ""}`} />- <span className={`${styles.bar} ${open ? styles.bar3 : ""}`} />- </button>-- {mounted ? createPortal(sheet, document.body) : null}- </>- );-}diff --git a/website/components/Nav.module.css b/website/components/Nav.module.cssdeleted file mode 100644index 14b00de4..00000000--- a/website/components/Nav.module.css+++ /dev/null@@ -1,125 +0,0 @@-.nav {- position: fixed;- inset: 0 0 auto 0;- display: grid;- grid-template-columns: auto 1fr auto;- align-items: center;- gap: 32px;- padding: 12px 32px;- z-index: 100;- background: rgba(10, 10, 10, 0.82);- backdrop-filter: blur(10px);- border-bottom: 1px solid var(--hairline);-}--.brand {- display: inline-flex;- align-items: center;- gap: 10px;- color: var(--ink);-}-.brandIcon {- width: 32px;- height: 32px;- display: block;-}-.brandWord {- font-size: 16px;- font-weight: 500;- letter-spacing: -0.02em;-}--.links {- display: flex;- justify-content: center;- gap: 28px;-}-.link {- font-size: 14px;- font-weight: 400;- color: var(--body);- padding: 6px 2px;- transition: color 180ms ease;-}-.link:hover {- color: var(--ink);-}--.right {- display: flex;- align-items: center;- gap: 10px;- justify-self: end;-}--.gh {- display: inline-flex;- align-items: center;- gap: 8px;- padding: 8px 16px;- border: 1px solid var(--border-ghost);- border-radius: var(--radius-pill);- background: transparent;- color: var(--ink);- font-size: 13px;- transition:- border-color 180ms ease,- background 180ms ease,- color 180ms ease;-}-.gh:hover {- background: rgba(255, 255, 255, 0.06);- color: var(--ink);-}-.ghLabel {- font-weight: 500;- font-size: 13px;-}-.ghDivider {- width: 1px;- height: 14px;- background: var(--hairline);-}-.ghCount {- font-family: var(--font-mono);- font-size: 12px;- color: var(--ink);-}--.cta {- padding: 9px 18px !important;- font-size: 13px !important;-}--@media (max-width: 1024px) {- .links {- gap: 20px;- }- .link {- font-size: 13px;- }- .ghLabel {- display: none;- }-}--@media (max-width: 860px) {- .links {- display: none;- }- .nav {- grid-template-columns: 1fr auto;- }-}--@media (max-width: 720px) {- .nav {- padding: 10px 20px;- gap: 16px;- grid-template-columns: 1fr auto;- }- .cta,- .gh {- display: none;- }-}diff --git a/website/components/Nav.tsx b/website/components/Nav.tsxdeleted file mode 100644index 45158854..00000000--- a/website/components/Nav.tsx+++ /dev/null@@ -1,72 +0,0 @@-import Image from "next/image";-import { fetchRepoStats } from "@/lib/github";-import { formatCompact } from "@/lib/format";-import { MobileNavToggle } from "./MobileNavToggle";-import styles from "./Nav.module.css";--const SECTIONS = [- { href: "#stack", label: "Stack" },- { href: "#features", label: "Features" },- { href: "#command-center", label: "Control" },- { href: "#live", label: "Demo" },- { href: "#agents", label: "Agents" },- { href: "#install", label: "Install" },- { href: "/docs", label: "Docs" },-];--export async function Nav() {- const stats = await fetchRepoStats();- return (- <header className={styles.nav}>- <a href="#top" className={styles.brand} aria-label="agentmemory home">- <Image- src="/icon.svg"- width={36}- height={36}- alt=""- aria-hidden- className={styles.brandIcon}- />- <span className={styles.brandWord}>agentmemory</span>- </a>-- <nav className={styles.links} aria-label="Sections">- {SECTIONS.map((s) => (- <a key={s.href} href={s.href} className={styles.link}>- {s.label}- </a>- ))}- </nav>-- <div className={styles.right}>- <a- className={styles.gh}- href="https://github.com/rohitg00/agentmemory"- target="_blank"- rel="noopener"- aria-label={`agentmemory on GitHub, ${stats.stars} stars`}- >- <svg viewBox="0 0 24 24" width="18" height="18" aria-hidden>- <path- fill="currentColor"- d="M12 .5C5.648.5.5 5.648.5 12c0 5.087 3.292 9.397 7.862 10.921.575.108.782-.25.782-.555v-1.96c-3.197.695-3.873-1.544-3.873-1.544-.523-1.327-1.277-1.68-1.277-1.68-1.044-.713.08-.699.08-.699 1.154.08 1.76 1.184 1.76 1.184 1.025 1.757 2.688 1.25 3.344.956.104-.742.4-1.25.728-1.537-2.552-.29-5.235-1.276-5.235-5.675 0-1.254.448-2.279 1.182-3.083-.118-.291-.513-1.461.112-3.046 0 0 .965-.31 3.162 1.178a10.964 10.964 0 0 1 2.878-.387c.977.004 1.96.131 2.878.387 2.195-1.487 3.16-1.178 3.16-1.178.626 1.585.231 2.755.113 3.046.736.804 1.18 1.829 1.18 3.083 0 4.41-2.686 5.381-5.246 5.665.411.354.778 1.053.778 2.122v3.146c0 .307.205.668.787.555C20.213 21.394 23.5 17.086 23.5 12 23.5 5.648 18.352.5 12 .5Z"- />- </svg>- <span className={styles.ghLabel}>GitHub</span>- <span className={styles.ghDivider} aria-hidden />- <svg viewBox="0 0 24 24" width="14" height="14" aria-hidden>- <path- d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279L12 19.245l-7.416 4.168 1.48-8.279L0 9.306l8.332-1.151z"- fill="var(--sunset)"- />- </svg>- <span className={styles.ghCount}>{formatCompact(stats.stars)}</span>- </a>- <a href="#install" className={`${styles.cta} btn btn--accent`}>- Install- </a>- <MobileNavToggle sections={SECTIONS} stars={stats.stars} />- </div>- </header>- );-}diff --git a/website/components/Primitives.module.css b/website/components/Primitives.module.cssdeleted file mode 100644index 958baad1..00000000--- a/website/components/Primitives.module.css+++ /dev/null@@ -1,53 +0,0 @@-.wrap {- padding: 112px 0 96px;-}-.grid {- display: grid;- grid-template-columns: repeat(3, 1fr);- gap: 16px;- max-width: 1440px;- margin: 0 auto;- padding: 0 40px;-}-.card {- background: var(--canvas-card);- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- padding: 40px 32px;- transition: background 200ms ease;- min-height: 260px;-}-.card:hover {- background: var(--canvas-soft);-}-.glyph {- font-family: var(--font-mono);- font-size: 13px;- letter-spacing: 1.2px;- color: var(--mute);- margin-bottom: 32px;-}-.title {- font-size: 30px;- font-weight: 400;- line-height: 1.05;- letter-spacing: -0.02em;- color: var(--ink);- margin: 0 0 18px;-}-.text {- font-size: 14px;- color: var(--body);- margin: 0;- line-height: 1.65;-}-@media (max-width: 1024px) {- .grid {- grid-template-columns: 1fr;- }-}-@media (max-width: 640px) {- .grid {- padding: 0 20px;- }-}diff --git a/website/components/Primitives.tsx b/website/components/Primitives.tsxdeleted file mode 100644index d423841c..00000000--- a/website/components/Primitives.tsx+++ /dev/null@@ -1,51 +0,0 @@-import styles from "./Primitives.module.css";--const CARDS = [- {- glyph: "01",- title: "Hooks",- text:- "12 auto-capture hooks piped into every coding agent. Every tool call, every prompt, every stop becomes a compressed observation, stamped with its origin and agent.",- },- {- glyph: "02",- title: "Recall",- text:- "Hybrid retrieval on the primary recall path: BM25, vector, and knowledge graph scores ranked together, reranked on device. Superseded versions stay out of results.",- },- {- glyph: "03",- title: "Consolidate",- text:- "With an LLM provider key, consolidation runs on session stop: raw observations compress into semantic memories, duplicates merge, stale rows decay, audit rows record it all.",- },-];--export function Primitives() {- return (- <section className={styles.wrap} id="stack" aria-labelledby="prim-title">- <header className="section-head">- <span className="section-eyebrow">The stack</span>- <h2 id="prim-title" className="section-title">- Three layers.- <br />- No framework tax.- </h2>- <p className="section-lede">- Built on the iii engine: every memory operation is a worker, a- function, or a trigger. No external databases, queues, or vector- stores. The entire runtime is one process.- </p>- </header>- <div className={styles.grid}>- {CARDS.map((c) => (- <article key={c.glyph} className={styles.card}>- <div className={styles.glyph}>{c.glyph}</div>- <h3 className={styles.title}>{c.title}</h3>- <p className={styles.text}>{c.text}</p>- </article>- ))}- </div>- </section>- );-}diff --git a/website/components/ScrollProgress.tsx b/website/components/ScrollProgress.tsxdeleted file mode 100644index 7ad05951..00000000--- a/website/components/ScrollProgress.tsx+++ /dev/null@@ -1,49 +0,0 @@-"use client";--import { useEffect, useRef } from "react";--export function ScrollProgress() {- const barRef = useRef<HTMLSpanElement>(null);-- useEffect(() => {- const update = () => {- const h = document.documentElement;- const max = h.scrollHeight - h.clientHeight;- const pct = max <= 0 ? 0 : Math.min(1, h.scrollTop / max);- if (barRef.current) barRef.current.style.width = `${pct * 100}%`;- };- update();- window.addEventListener("scroll", update, { passive: true });- window.addEventListener("resize", update);- return () => {- window.removeEventListener("scroll", update);- window.removeEventListener("resize", update);- };- }, []);-- return (- <div- aria-hidden- style={{- position: "fixed",- top: 0,- left: 0,- width: "100%",- height: 2,- background: "transparent",- zIndex: 200,- }}- >- <span- ref={barRef}- style={{- display: "block",- height: "100%",- width: 0,- background: "rgba(255, 255, 255, 0.35)",- transition: "width 80ms linear",- }}- />- </div>- );-}diff --git a/website/components/Stats.module.css b/website/components/Stats.module.cssdeleted file mode 100644index 64a858d0..00000000--- a/website/components/Stats.module.css+++ /dev/null@@ -1,72 +0,0 @@-.stats {- border-top: 1px solid var(--hairline);- border-bottom: 1px solid var(--hairline);- background: var(--canvas);-}-.row {- display: grid;- grid-template-columns: repeat(6, 1fr);- max-width: 1440px;- margin: 0 auto;-}-.stat {- padding: 48px 24px;- text-align: center;- border-right: 1px solid var(--hairline);- transition: background 250ms ease;-}-.stat:last-child {- border-right: none;-}-.stat:hover {- background: var(--canvas-card);-}-.num {- font-size: clamp(38px, 4.6vw, 56px);- font-weight: 400;- line-height: 1;- color: var(--ink);- letter-spacing: -0.03em;- font-variant-numeric: tabular-nums;-}-.label {- margin-top: 14px;- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 1.2px;- color: var(--mute);- text-transform: uppercase;-}--@media (max-width: 1024px) {- .row {- grid-template-columns: repeat(3, 1fr);- }- .stat {- border-bottom: 1px solid var(--hairline);- }- .stat:nth-child(3n) {- border-right: none;- }-}-@media (max-width: 640px) {- .row {- grid-template-columns: 1fr 1fr;- }- .stat {- padding: 32px 12px;- }- .num {- font-size: 34px;- }- .label {- font-size: 10px;- letter-spacing: 0.8px;- }- .stat:nth-child(3n) {- border-right: 1px solid var(--hairline);- }- .stat:nth-child(2n) {- border-right: none;- }-}diff --git a/website/components/Stats.tsx b/website/components/Stats.tsxdeleted file mode 100644index b09cccce..00000000--- a/website/components/Stats.tsx+++ /dev/null@@ -1,111 +0,0 @@-"use client";--import { useEffect, useRef } from "react";-import styles from "./Stats.module.css";--interface StatItem {- target: number;- suffix?: string;- label: string;- float?: boolean;-}--export function Stats({- mcpTools,- hooks,- restEndpoints,- testsPassing,-}: {- mcpTools: number;- hooks: number;- restEndpoints: number;- testsPassing: number;-}) {- const rootRef = useRef<HTMLDivElement>(null);-- const STATS: StatItem[] = [- { target: 95.2, suffix: "%", label: "RETRIEVAL R@5 · LONGMEMEVAL-S", float: true },- { target: 92, suffix: "%", label: "FEWER INPUT TOKENS PER SESSION" },- { target: mcpTools, label: "MCP TOOLS" },- { target: restEndpoints, label: "REST ENDPOINTS" },- { target: 0, label: "EXTERNAL DATABASES" },- { target: testsPassing, label: "TESTS PASSING" },- ];-- useEffect(() => {- if (!rootRef.current) return;- const root = rootRef.current;-- // Reset per-element done flag so deps changing (e.g. a new meta snapshot- // at build) replays the count animation against the new target.- root- .querySelectorAll<HTMLDivElement>("[data-num]")- .forEach((el) => delete el.dataset.done);-- const count = (el: HTMLDivElement) => {- const target = Number(el.dataset.target);- const suffix = el.dataset.suffix || "";- const isFloat = el.dataset.float === "1";- const startAt = performance.now();- const duration = 1400;- const tick = (now: number) => {- const t = Math.min(1, (now - startAt) / duration);- const eased = 1 - Math.pow(1 - t, 3);- const v = target * eased;- el.textContent = isFloat- ? `${v.toFixed(1)}${suffix}`- : `${Math.round(v)}${suffix}`;- if (t < 1) requestAnimationFrame(tick);- else- el.textContent = isFloat- ? `${target.toFixed(1)}${suffix}`- : `${target}${suffix}`;- };- requestAnimationFrame(tick);- };-- const io = new IntersectionObserver(- (entries) => {- for (const entry of entries) {- if (!entry.isIntersecting) continue;- const el = entry.target as HTMLDivElement;- const num = el.querySelector<HTMLDivElement>("[data-num]");- if (num && !num.dataset.done) {- num.dataset.done = "1";- count(num);- }- io.unobserve(el);- }- },- { threshold: 0.5 },- );-- root- .querySelectorAll<HTMLDivElement>("[data-stat]")- .forEach((el) => io.observe(el));-- return () => io.disconnect();- }, [mcpTools, hooks, restEndpoints, testsPassing]);-- return (- <section className={styles.stats} aria-label="By the numbers">- <div className={styles.row} ref={rootRef}>- {STATS.map((s) => (- <article key={s.label} className={styles.stat} data-stat>- <div- className={styles.num}- data-num- data-target={s.target}- data-suffix={s.suffix || ""}- data-float={s.float ? "1" : "0"}- >- {s.float ? s.target.toFixed(1) : s.target}- {s.suffix || ""}- </div>- <div className={styles.label}>{s.label}</div>- </article>- ))}- </div>- </section>- );-}diff --git a/website/components/Testimonials.module.css b/website/components/Testimonials.module.cssdeleted file mode 100644index 97fabfa6..00000000--- a/website/components/Testimonials.module.css+++ /dev/null@@ -1,206 +0,0 @@-.wrap {- padding: 96px 0 96px;- background: var(--canvas);- border-top: 1px solid var(--hairline);-}-.inner {- max-width: 1100px;- margin: 0 auto;- padding: 0 40px;- display: flex;- flex-direction: column;- gap: 20px;- align-items: center;-}-.eyebrow {- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 2.4px;- color: var(--mute);- text-transform: uppercase;- display: flex;- align-items: center;- gap: 12px;- margin-top: 8px;-}-.eyebrow::before,-.eyebrow::after {- content: "";- flex: 0 0 60px;- height: 1px;- background: var(--hairline);-}-.title {- font-size: clamp(38px, 5.4vw, 56px);- letter-spacing: -0.03em;- line-height: 1.02;- color: var(--ink);- text-align: center;- font-weight: 400;- margin: 0;-}-.accent {- color: var(--body);-}-.lede {- font-size: 15px;- color: var(--body);- text-align: center;- margin: 0 0 8px;- max-width: 560px;- line-height: 1.6;-}-.sectionLabel {- align-self: flex-start;- font-family: var(--font-mono);- font-size: 11px;- letter-spacing: 2.4px;- color: var(--mute);- text-transform: uppercase;- margin-top: 32px;- padding-bottom: 8px;- border-bottom: 1px solid var(--hairline);- width: 100%;-}--/* Featured use-case cards — 2-column, larger, includes a tag chip. */-.useCases {- display: grid;- grid-template-columns: repeat(2, 1fr);- gap: 16px;- width: 100%;-}-.useCaseCard {- position: relative;- display: flex;- flex-direction: column;- gap: 20px;- padding: 32px 30px 24px;- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- background: var(--canvas-card);- text-decoration: none;- color: var(--ink);- transition: border-color 0.15s ease, background 0.15s ease;- min-height: 240px;-}-.useCaseCard:hover,-.useCaseCard:focus-visible {- border-color: var(--border-ghost);- background: var(--canvas-soft);-}-.useCaseCard:focus-visible {- outline: 2px solid rgba(255, 255, 255, 0.55);- outline-offset: 2px;-}-.useCaseTag {- display: inline-block;- align-self: flex-start;- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 1.4px;- color: var(--body);- text-transform: uppercase;- border: 1px solid var(--hairline);- border-radius: var(--radius-pill);- padding: 5px 12px;-}-.useCaseQuote {- font-size: 17px;- line-height: 1.55;- color: var(--ink);- margin: 0;- flex: 1;-}--/* Endorsement cards — 4 columns, smaller. */-.grid {- display: grid;- grid-template-columns: repeat(4, 1fr);- gap: 16px;- width: 100%;-}-.card {- position: relative;- display: flex;- flex-direction: column;- gap: 16px;- padding: 24px 22px 20px;- border: 1px solid var(--hairline);- border-radius: var(--radius-card);- background: var(--canvas-card);- text-decoration: none;- color: var(--ink);- transition: border-color 0.15s ease, background 0.15s ease;- min-height: 200px;-}-.card:hover,-.card:focus-visible {- border-color: var(--border-ghost);- background: var(--canvas-soft);-}-.card:focus-visible {- outline: 2px solid rgba(255, 255, 255, 0.55);- outline-offset: 2px;-}-.quoteMark {- font-size: 32px;- line-height: 0;- color: var(--mute);- display: inline;- margin-right: 4px;- vertical-align: -4px;-}-.useCaseCard .quoteMark {- font-size: 40px;- vertical-align: -6px;-}-.quote {- font-size: 14px;- line-height: 1.55;- color: var(--body);- margin: 0;- flex: 1;-}-.author {- display: flex;- align-items: baseline;- justify-content: space-between;- gap: 12px;- padding-top: 12px;- border-top: 1px solid var(--hairline);-}-.name {- font-size: 13px;- font-weight: 500;- color: var(--ink);-}-.source {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 0.8px;- color: var(--mute);- text-transform: uppercase;- transition: color 0.15s ease;-}-.card:hover .source,-.useCaseCard:hover .source {- color: var(--ink);-}--@media (max-width: 980px) {- .useCases {- grid-template-columns: 1fr;- }- .grid {- grid-template-columns: repeat(2, 1fr);- }-}-@media (max-width: 640px) {- .grid {- grid-template-columns: 1fr;- }- .wrap {- padding: 64px 0 64px;- }-}diff --git a/website/components/Testimonials.tsx b/website/components/Testimonials.tsxdeleted file mode 100644index 2b472822..00000000--- a/website/components/Testimonials.tsx+++ /dev/null@@ -1,142 +0,0 @@-import styles from "./Testimonials.module.css";--// PH launch discussion thread for agentmemory — every testimonial in-// this section is a verbatim quote from that thread. The live-// upvote badge lives in <FeaturedIn /> at the top of the page.-const PH_DISCUSSION_URL =- "https://www.producthunt.com/p/agent-memory-dev/how-do-you-found-agentmemory-so-far-happy-to-help";--// "Use cases" — quotes that describe how a builder is using-// agentmemory in production. Each one carries an explicit-// `useCase` line so the framing is concrete (not just "I like it").-interface UseCase {- name: string;- useCase: string;- quote: string;- href: string;-}--const USE_CASES: UseCase[] = [- {- name: "Peter Neyra",- useCase: "Backfilled a month of Cursor transcripts",- quote:- "I backfilled agent memory on my past month's Cursor agent transcripts. It was surprisingly accurate. Picked up on things that I moved away from.",- href: "https://www.producthunt.com/p/agent-memory-dev/how-do-you-found-agentmemory-so-far-happy-to-help?comment=5379518",- },- {- name: "Pranav Prakash",- useCase: "Two weeks of production use",- quote:- "Been using it for 2 weeks, and I definitely see improvements.",- href: PH_DISCUSSION_URL,- },-];--// "Endorsements" — shorter quotes that position the product, more-// social-proof than use-case. Kept tight so the grid balances.-interface Endorsement {- name: string;- quote: string;- href: string;-}--const ENDORSEMENTS: Endorsement[] = [- {- name: "Alper Tayfur",- quote:- "Tackles one of the biggest pain points with coding agents: losing useful project context across sessions without bloating the context window.",- href: PH_DISCUSSION_URL,- },- {- name: "Mia Taylor",- quote:- "The focus on making memory actually useful for agents instead of just storing context endlessly.",- href: PH_DISCUSSION_URL,- },- {- name: "Thomas Hall",- quote:- "Memory often becomes just more noise over time. Agentmemory feels more intentional compared to a lot of tools in this space.",- href: PH_DISCUSSION_URL,- },- {- name: "Zoe Alexandra",- quote:- "Tried it briefly — feels clean and easy to get started with.",- href: PH_DISCUSSION_URL,- },-];--export function Testimonials() {- return (- <section- className={styles.wrap}- aria-labelledby="testimonials-title"- >- <div className={styles.inner}>- <div id="testimonials-title" className={styles.eyebrow}>- BUILDERS USING AGENTMEMORY- </div>- <h2 className={styles.title}>- In the <span className={styles.accent}>wild.</span>- </h2>- <p className={styles.lede}>- Verbatim from the Product Hunt launch thread. Each card- links back to the source comment.- </p>-- <div className={styles.sectionLabel}>HOW THEY USE IT</div>- <div className={styles.useCases}>- {USE_CASES.map((u) => (- <a- key={u.name}- className={styles.useCaseCard}- href={u.href}- target="_blank"- rel="noopener"- aria-label={`${u.name}'s comment on Product Hunt`}- >- <div className={styles.useCaseTag}>{u.useCase}</div>- <p className={styles.useCaseQuote}>- <span className={styles.quoteMark} aria-hidden>- “- </span>- {u.quote}- </p>- <div className={styles.author}>- <span className={styles.name}>{u.name}</span>- <span className={styles.source}>Product Hunt ↗</span>- </div>- </a>- ))}- </div>-- <div className={styles.sectionLabel}>WHAT THEY SAY</div>- <div className={styles.grid}>- {ENDORSEMENTS.map((t) => (- <a- key={t.name}- className={styles.card}- href={t.href}- target="_blank"- rel="noopener"- aria-label={`${t.name}'s comment on Product Hunt`}- >- <p className={styles.quote}>- <span className={styles.quoteMark} aria-hidden>- “- </span>- {t.quote}- </p>- <div className={styles.author}>- <span className={styles.name}>{t.name}</span>- <span className={styles.source}>Product Hunt ↗</span>- </div>- </a>- ))}- </div>- </div>- </section>- );-}diff --git a/website/components/site/Agents.module.css b/website/components/site/Agents.module.cssnew file mode 100644index 00000000..30d52c3e--- /dev/null+++ b/website/components/site/Agents.module.css@@ -0,0 +1,223 @@+.group + .group {+ margin-top: var(--s-7);+}++.groupHead {+ display: flex;+ flex-wrap: wrap;+ align-items: baseline;+ justify-content: space-between;+ gap: var(--s-2) var(--s-5);+ margin-bottom: var(--s-4);+}++.groupHead h3 {+ font-size: var(--t-20);+ display: inline-flex;+ align-items: baseline;+ gap: 10px;+}++.groupHead h3 :global(.mono) {+ font-size: var(--t-12);+ color: var(--muted);+ font-weight: 400;+}++.groupHead p {+ font-size: var(--t-14);+ color: var(--muted);+ max-width: 46ch;+}++.grid {+ list-style: none;+ margin: 0;+ padding: 1px;+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));+ gap: 1px;+ background: var(--line);+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ overflow: hidden;+}++.cell {+ background: var(--surface);+ min-width: 0;+}++.card {+ position: relative;+ height: 100%;+ min-height: 124px;+ padding: var(--s-4);+ display: grid;+ grid-template-rows: auto 1fr;+ gap: var(--s-3);+ outline: none;+ transition: background-color var(--dur-1) ease;+}++.card:focus-visible {+ box-shadow: inset 0 0 0 2px var(--ink);+}++.top {+ display: flex;+ align-items: center;+ gap: var(--s-3);+ min-width: 0;+}++.tile {+ width: 36px;+ height: 36px;+ flex: none;+ display: grid;+ place-items: center;+ border-radius: 8px;+ background: #ffffff;+ border: 1px solid var(--line);+ overflow: hidden;+}++.logo {+ width: 24px;+ height: 24px;+ border-radius: 4px;+ object-fit: contain;+ filter: grayscale(1) contrast(1.05);+ opacity: 0.9;+ transition: opacity var(--dur-2) var(--ease-out), filter var(--dur-2) var(--ease-out);+}++.name {+ display: grid;+ min-width: 0;+}++.name a {+ color: var(--ink);+ font-weight: 540;+ font-size: var(--t-16);+ line-height: 1.3;+ overflow-wrap: anywhere;+}++.name a:hover {+ text-decoration: underline;+ text-underline-offset: 3px;+}++.name :global(.mono) {+ font-size: var(--t-12);+ color: var(--muted);+}++.more {+ display: flex;+ flex-direction: column;+ justify-content: space-between;+ gap: var(--s-3);+ min-width: 0;+}++.detail {+ font-size: var(--t-14);+ color: var(--muted);+ line-height: 1.4;+}++.cmd,+.cmdNone {+ font-size: var(--t-12);+}++.cmd {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--s-2);+ width: 100%;+ min-width: 0;+ padding: 6px 8px;+ border: 1px solid var(--line);+ border-radius: 4px;+ background: var(--sunk);+ color: var(--ink);+ text-align: left;+ transition: transform var(--dur-1) var(--ease-out), border-color var(--dur-1) ease;+}++.cmd code {+ min-width: 0;+ overflow-wrap: anywhere;+}++.slug {+ white-space: nowrap;+}++.cmd :global(.copy-state) {+ flex: none;+ color: var(--muted);+}++.cmd:hover {+ border-color: var(--ink);+}++.cmd:active {+ transform: scale(0.97);+}++.cmdNone {+ color: var(--faint);+}++@media (hover: hover) and (pointer: fine) {+ .card:hover {+ background: var(--sunk);+ }+ .card:hover .logo,+ .card:focus-within .logo {+ opacity: 1;+ }+}+++@media (max-width: 520px) {+ .grid {+ grid-template-columns: repeat(2, minmax(0, 1fr));+ }+ .card {+ min-height: 0;+ padding: var(--s-3);+ grid-template-rows: auto;+ }+ .more {+ display: none;+ }+ .tile {+ width: 28px;+ height: 28px;+ border-radius: 6px;+ }+ .logo {+ width: 18px;+ height: 18px;+ }+ .name a {+ font-size: var(--t-14);+ }+}++@media (prefers-reduced-motion: reduce) {+ .cmd,+ .cmdNone,+ .logo {+ transition: none;+ }+}diff --git a/website/components/site/Agents.tsx b/website/components/site/Agents.tsxnew file mode 100644index 00000000..0866ceba--- /dev/null+++ b/website/components/site/Agents.tsx@@ -0,0 +1,83 @@+import { AGENTS, type Agent } from "@/lib/site";+import { LOGO_OVERRIDES } from "@/lib/rest";+import { CopyButton, Reveal } from "./client";+import s from "./Agents.module.css";++const LABEL: Record<Agent["support"], string> = {+ plugin: "native plugin",+ mcp: "MCP server",+ rest: "REST API",+};++function Card({ agent, index }: { agent: Agent; index: number }) {+ const cmd = agent.connect ? `agentmemory connect ${agent.connect}` : null;+ return (+ <Reveal as="li" delay={Math.min(index, 12) * 40} className={s.cell}>+ <div className={s.card} tabIndex={0} aria-label={`${agent.name}: ${agent.detail}`}>+ <div className={s.top}>+ <span className={s.tile}>+ <img className={s.logo} src={LOGO_OVERRIDES[agent.name] ?? agent.logo} alt="" width={28} height={28} loading="lazy" decoding="async" />+ </span>+ <div className={s.name}>+ <a href={agent.href} target="_blank" rel="noreferrer">+ {agent.name}+ </a>+ <span className="mono">{LABEL[agent.support]}</span>+ </div>+ </div>+ <div className={s.more}>+ {agent.detail !== LABEL[agent.support] ? <span className={s.detail}>{agent.detail}</span> : <span />}+ {cmd ? (+ <CopyButton text={cmd} label={`Copy ${cmd}`} className={s.cmd}>+ <code>+ agentmemory connect <span className={s.slug}>{agent.connect}</span>+ </code>+ </CopyButton>+ ) : (+ <span className={`mono ${s.cmdNone}`}>add the MCP block below</span>+ )}+ </div>+ </div>+ </Reveal>+ );+}++export function Agents() {+ const plugins = AGENTS.filter((a) => a.support === "plugin");+ const rest = AGENTS.filter((a) => a.support !== "plugin");+ const groups = [+ { title: "Native plugins", note: "Hooks capture automatically. Nothing to remember to call.", items: plugins, offset: 0 },+ { title: "MCP and REST", note: "Any MCP client gets the memory tools. Anything that speaks HTTP can use the REST API.", items: rest, offset: plugins.length },+ ];+ return (+ <section id="agents" className="section" aria-labelledby="agents-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">Works with</span>+ <h2 id="agents-title">+ {AGENTS.length} agents. One memory.+ </h2>+ <p>+ Switch agents mid-project and the memory comes with you. Every agent below reads and writes the same store on+ your machine.+ </p>+ </div>+ {groups.map((g) => (+ <div key={g.title} className={s.group}>+ <div className={s.groupHead}>+ <h3>+ {g.title} <span className="mono">{g.items.length}</span>+ </h3>+ <p>{g.note}</p>+ </div>+ <ul className={s.grid}>+ {g.items.map((a, i) => (+ <Card key={a.name} agent={a} index={g.offset + i} />+ ))}+ </ul>+ </div>+ ))}+ </div>+ </section>+ );+}diff --git a/website/components/site/BenchFigures.tsx b/website/components/site/BenchFigures.tsxnew file mode 100644index 00000000..f1c0930a--- /dev/null+++ b/website/components/site/BenchFigures.tsx@@ -0,0 +1,150 @@+"use client";++import { useEffect, useRef, useState, type CSSProperties } from "react";+import { LONGMEMEVAL } from "@/lib/site";+import { TYPE_HITS, totalHits, type K } from "@/lib/bench";+import s from "./Benchmarks.module.css";++function useInView<T extends HTMLElement>() {+ const ref = useRef<T | null>(null);+ const [inView, setInView] = useState(false);+ useEffect(() => {+ const el = ref.current;+ if (!el) return;+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {+ setInView(true);+ return;+ }+ const io = new IntersectionObserver(+ ([e]) => {+ if (e.isIntersecting) {+ setInView(true);+ io.disconnect();+ }+ },+ { rootMargin: "0px 0px -15% 0px" },+ );+ io.observe(el);+ return () => io.disconnect();+ }, []);+ return [ref, inView] as const;+}++const LEDGER: { key: keyof typeof LONGMEMEVAL.hybrid; label: string; k?: K }[] = [+ { key: "r5", label: "R@5", k: 5 },+ { key: "r10", label: "R@10", k: 10 },+ { key: "r20", label: "R@20" },+ { key: "ndcg10", label: "NDCG@10" },+ { key: "mrr", label: "MRR" },+];++function dotDelay(i: number, lit: boolean, before: number, firstReveal: boolean): number {+ if (firstReveal) return Math.min(i * 4, 420);+ if (lit && i >= before) return Math.min((i - before) * 45, 400);+ return 0;+}++export function QuestionDots() {+ const [ref, inView] = useInView<HTMLDivElement>();+ const [k, setK] = useState<K>(5);+ const [prevK, setPrevK] = useState<K | null>(null);+ const hits = totalHits(k);++ const choose = (next: K) => {+ if (next === k) return;+ setPrevK(k);+ setK(next);+ };++ return (+ <div ref={ref} className={s.dotsFigure}>+ <div className={s.figHead}>+ <span className="mono">LongMemEval-S · 500 questions · one dot each</span>+ <div className={s.toggle} role="group" aria-label="Retrieved sessions per question">+ {([5, 10] as K[]).map((v) => (+ <button key={v} type="button" aria-pressed={k === v} onClick={() => choose(v)}>+ top {v}+ </button>+ ))}+ </div>+ </div>++ <p className={s.verdict}>+ <strong>+ {hits} of {LONGMEMEVAL.questions}+ </strong>{" "}+ questions found a gold session in the top {k} results.+ </p>++ <div className={s.groups}>+ {TYPE_HITS.map((t) => {+ const on = t.hits[k];+ const before = prevK ? t.hits[prevK] : 0;+ return (+ <div key={t.type} className={s.group}>+ <div className={s.groupHead}>+ <span className="mono">{t.type}</span>+ <span className="mono">+ {on} / {t.count}+ </span>+ </div>+ <div className={s.dots} aria-hidden="true">+ {Array.from({ length: t.count }, (_, i) => {+ const lit = inView && i < on;+ const delay = dotDelay(i, lit, before, prevK === null);+ return (+ <span key={i} className={s.dot} data-on={lit || undefined}>+ <span className={s.fill} style={{ "--d": `${delay}ms` } as CSSProperties} />+ </span>+ );+ })}+ </div>+ </div>+ );+ })}+ </div>++ <div className={s.legend}>+ <span className="mono">+ <span className={`${s.key} ${s.keyOn}`} /> gold session retrieved+ </span>+ <span className="mono">+ <span className={s.key} /> missed+ </span>+ </div>++ <div className={s.ledgerWrap}>+ <table className={s.ledger}>+ <thead>+ <tr>+ <th scope="col">recall mode</th>+ {LEDGER.map((c) => (+ <th key={c.key} scope="col" data-active={c.k === k || undefined}>+ {c.label}+ </th>+ ))}+ </tr>+ </thead>+ <tbody>+ <tr>+ <th scope="row">BM25 + vectors</th>+ {LEDGER.map((c) => (+ <td key={c.key} data-active={c.k === k || undefined}>+ {LONGMEMEVAL.hybrid[c.key].toFixed(1)}%+ </td>+ ))}+ </tr>+ <tr>+ <th scope="row">BM25 only, keyless</th>+ {LEDGER.map((c) => (+ <td key={c.key} data-active={c.k === k || undefined}>+ {LONGMEMEVAL.bm25[c.key].toFixed(1)}%+ </td>+ ))}+ </tr>+ </tbody>+ </table>+ </div>+ </div>+ );+}diff --git a/website/components/site/Benchmarks.module.css b/website/components/site/Benchmarks.module.cssnew file mode 100644index 00000000..c600627a--- /dev/null+++ b/website/components/site/Benchmarks.module.css@@ -0,0 +1,467 @@+.dotsFigure {+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ box-shadow: var(--shadow);+ padding: var(--s-5);+ display: grid;+ gap: var(--s-5);+}++.figHead {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ justify-content: space-between;+ gap: var(--s-3);+ font-size: var(--t-12);+ color: var(--muted);+ letter-spacing: 0.02em;+}++.toggle {+ display: inline-flex;+ padding: 3px;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--sunk);+}++.toggle button {+ height: 30px;+ padding: 0 12px;+ border-radius: 4px;+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ color: var(--muted);+ transition: background-color var(--dur-1) ease, color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.toggle button:active {+ transform: scale(0.97);+}++.toggle button[aria-pressed="true"] {+ background: var(--ink);+ color: var(--bg);+}++.verdict {+ font-size: var(--t-25);+ line-height: 1.3;+ color: var(--muted);+ letter-spacing: var(--track-head);+}++.verdict strong {+ color: var(--ink);+ font-weight: 600;+ font-variant-numeric: tabular-nums;+}++.groups {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: var(--s-5) var(--s-6);+}++.group {+ display: grid;+ gap: 10px;+ align-content: start;+}++.groupHead {+ display: flex;+ justify-content: space-between;+ gap: var(--s-2);+ font-size: var(--t-12);+ color: var(--ink-2);+ padding-bottom: 6px;+ border-bottom: 1px solid var(--line);+}++.groupHead span:last-child {+ color: var(--ink);+ font-variant-numeric: tabular-nums;+}++.dots {+ display: grid;+ grid-template-columns: repeat(auto-fill, 10px);+ gap: 5px;+}++.dot {+ position: relative;+ width: 10px;+ height: 10px;+ border-radius: 50%;+ box-shadow: inset 0 0 0 1px var(--line-2);+}++.fill {+ position: absolute;+ inset: 0;+ border-radius: 50%;+ background: var(--accent);+ opacity: 0;+ transform: scale(0.35);+ transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);+}++.dot[data-on] .fill {+ opacity: 1;+ transform: none;+ transition-delay: var(--d, 0ms);+}++.legend {+ display: flex;+ flex-wrap: wrap;+ gap: var(--s-5);+ font-size: var(--t-12);+ color: var(--muted);+}++.legend > span {+ display: inline-flex;+ align-items: center;+ gap: 8px;+}++.key {+ width: 10px;+ height: 10px;+ border-radius: 50%;+ box-shadow: inset 0 0 0 1px var(--line-2);+}++.keyOn {+ background: var(--accent);+ box-shadow: none;+}++.ledgerWrap {+ overflow-x: auto;+ border-top: 1px solid var(--line);+ padding-top: var(--s-3);+}++.ledger {+ width: 100%;+ border-collapse: collapse;+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ font-variant-numeric: tabular-nums;+}++.ledger th,+.ledger td {+ text-align: right;+ padding: 8px 10px;+ white-space: nowrap;+ border-bottom: 1px solid var(--line);+ transition: color var(--dur-1) ease, background-color var(--dur-1) ease;+}++.ledger tr:last-child th,+.ledger tr:last-child td {+ border-bottom: 0;+}++.ledger th:first-child {+ text-align: left;+ padding-left: 0;+}++.ledger thead th {+ font-weight: 500;+ color: var(--muted);+ text-transform: uppercase;+ letter-spacing: var(--track-mono);+}++.ledger tbody th {+ font-weight: 500;+ color: var(--ink-2);+}++.ledger td {+ color: var(--ink-2);+}++.ledger tbody tr:first-child td {+ color: var(--ink);+ font-weight: 600;+}++.ledger [data-active] {+ background: var(--sunk);+ color: var(--ink);+}++.cite {+ display: flex;+ flex-wrap: wrap;+ gap: 6px 14px;+ margin-top: var(--s-3);+ font-size: var(--t-14);+ color: var(--muted);+}++.split {+ display: grid;+ grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);+ gap: clamp(24px, 5vw, 64px);+ align-items: center;+ margin-top: var(--s-9);+}++.splitCopy {+ display: grid;+ gap: var(--s-4);+}++.splitCopy h3 {+ font-size: var(--t-39);+ letter-spacing: var(--track-display);+ line-height: 1.1;+}++.splitCopy p {+ font-size: var(--t-16);+ line-height: 1.6;+ color: var(--muted);+ max-width: 34em;+}++.splitCopy .setup {+ font-size: var(--t-14);+}++.windows {+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ gap: var(--s-3);+}++.window {+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ box-shadow: var(--shadow);+ display: flex;+ flex-direction: column;+ min-width: 0;+}++.winHead {+ display: grid;+ gap: 2px;+ padding: 10px 12px;+ border-bottom: 1px solid var(--line);+ font-size: var(--t-12);+ color: var(--muted);+}++.winHead span:last-child {+ color: var(--ink);+ font-weight: 600;+ font-variant-numeric: tabular-nums;+}++.winBody {+ position: relative;+ display: flex;+ gap: 8px;+ padding: 12px;+ height: clamp(300px, 34vw, 380px);+}++.scale {+ position: relative;+ list-style: none;+ margin: 0;+ padding: 0;+ width: 18px;+ flex: none;+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ color: var(--muted);+}++.scale li {+ position: absolute;+ left: 0;+ top: calc(var(--y) * (100% - 14px));+ line-height: 14px;+}++.fill100 {+ position: relative;+ flex: 1;+ min-width: 0;+ display: flex;+ flex-direction: column;+ gap: 2px;+ border-radius: 4px;+ outline: 1px dashed var(--line-2);+ outline-offset: 4px;+}++.row {+ flex: 1;+ min-height: 0;+ border-radius: 2px;+ background: linear-gradient(90deg, var(--line-2) var(--w), transparent var(--w));+ opacity: 0;+ transform: translateX(-6px);+ transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);+}++.windows[data-in] .row {+ opacity: 1;+ transform: none;+ transition-delay: var(--d, 0ms);+}++.memBlock {+ flex: none;+ height: max(var(--h), 26px);+ display: flex;+ align-items: center;+ padding: 0 10px;+ border-radius: 4px;+ background: var(--ink);+ color: var(--bg);+ font-size: var(--t-12);+ opacity: 0;+ transform: scaleY(0.6);+ transform-origin: top;+ transition: opacity 360ms var(--ease-out) 200ms, transform 360ms var(--ease-out) 200ms;+}++.windows[data-in] .memBlock {+ opacity: 1;+ transform: none;+}++.free {+ flex: 1;+ display: grid;+ place-items: center;+ font-size: var(--t-12);+ color: var(--muted);+ text-align: center;+ padding: 8px;+}++.winFoot {+ padding: 10px 12px;+ border-top: 1px solid var(--line);+ font-size: var(--t-12);+ color: var(--muted);+}++.reproduce {+ display: grid;+ grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);+ gap: var(--s-6);+ margin-top: var(--s-9);+ padding-top: var(--s-7);+ border-top: 1px solid var(--line);+ align-items: start;+}++.reproText {+ margin-top: var(--s-3);+ font-size: var(--t-16);+ color: var(--muted);+ line-height: 1.6;+}++.cmds {+ display: grid;+ gap: var(--s-2);+ justify-items: start;+}++.cmd {+ display: flex;+ align-items: center;+ gap: var(--s-3);+ width: 100%;+ min-height: 48px;+ padding: 10px var(--s-4);+ border: 1px solid var(--line-2);+ border-radius: var(--radius);+ background: var(--surface);+ text-align: left;+ font-size: var(--t-14);+ color: var(--ink);+ transition: border-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.cmd:hover {+ border-color: var(--ink);+}++.cmd:active {+ transform: scale(0.99);+}++.cmd code {+ flex: 1;+ min-width: 0;+ overflow-wrap: anywhere;+}++.cmd :global(.copy-state) {+ font-size: var(--t-12);+ color: var(--muted);+}++.prompt {+ color: var(--faint);+ font-family: var(--font-mono), monospace;+}++@media (max-width: 1000px) {+ .groups {+ grid-template-columns: repeat(2, minmax(0, 1fr));+ }+ .split,+ .reproduce {+ grid-template-columns: minmax(0, 1fr);+ }+}++@media (max-width: 560px) {+ .dotsFigure {+ padding: var(--s-4);+ }+ .groups {+ grid-template-columns: minmax(0, 1fr);+ }+ .verdict {+ font-size: var(--t-20);+ }+ .winBody {+ padding: 10px;+ }+ .scale {+ display: none;+ }+ .cmd {+ font-size: var(--t-12);+ }+}++@media (prefers-reduced-motion: reduce) {+ .fill,+ .row,+ .memBlock {+ transition: none;+ }+}diff --git a/website/components/site/Benchmarks.tsx b/website/components/site/Benchmarks.tsxnew file mode 100644index 00000000..ba1a5bd1--- /dev/null+++ b/website/components/site/Benchmarks.tsx@@ -0,0 +1,70 @@+import Link from "next/link";+import { LONGMEMEVAL, src } from "@/lib/site";+import { REPRODUCE } from "@/lib/bench";+import { CopyButton, Reveal } from "./client";+import { QuestionDots } from "./BenchFigures";+import s from "./Benchmarks.module.css";++export function Benchmarks() {+ return (+ <section id="benchmarks" className="section" aria-labelledby="benchmarks-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">Benchmarks</span>+ <h2 id="benchmarks-title">It finds the right session, and sends less.</h2>+ <p>+ Retrieval measured on LongMemEval-S, an academic benchmark for long-term memory, with a local embedding+ model and no API key. Every number below links to the file it came from.+ </p>+ </div>++ <Reveal>+ <QuestionDots />+ </Reveal>+ <p className={s.cite}>+ <a className="src" href={src.longmemeval} target="_blank" rel="noreferrer">+ benchmark/LONGMEMEVAL.md+ </a>+ <span>+ {LONGMEMEVAL.questions} questions, about 48 sessions each. Retrieval recall, not end-to-end answer accuracy.+ </span>+ </p>++ <div className={s.reproduce}>+ <div>+ <span className="eyebrow">Reproduce it</span>+ <p className={s.reproText}>+ Download the dataset from{" "}+ <a className="src" href={src.dataset} target="_blank" rel="noreferrer">+ Hugging Face+ </a>+ , then run the same script we did. Embeddings use {LONGMEMEVAL.embedding}. The benchmark is described in+ the{" "}+ <a className="src" href={src.paper} target="_blank" rel="noreferrer">+ LongMemEval paper+ </a>+ .+ </p>+ </div>+ <div className={s.cmds}>+ <CopyButton text={REPRODUCE.hybrid} label="Copy the hybrid benchmark command" className={s.cmd}>+ <span className={s.prompt} aria-hidden="true">+ $+ </span>+ <code>{REPRODUCE.hybrid}</code>+ </CopyButton>+ <CopyButton text={REPRODUCE.bm25} label="Copy the BM25-only benchmark command" className={s.cmd}>+ <span className={s.prompt} aria-hidden="true">+ $+ </span>+ <code>{REPRODUCE.bm25}</code>+ </CopyButton>+ <Link className="btn btn-ghost" href="/benchmarks">+ Full methodology and cost budgets+ </Link>+ </div>+ </div>+ </div>+ </section>+ );+}diff --git a/website/components/site/ContextFunnel.module.css b/website/components/site/ContextFunnel.module.cssnew file mode 100644index 00000000..376d3d95--- /dev/null+++ b/website/components/site/ContextFunnel.module.css@@ -0,0 +1,376 @@+.figure {+ display: grid;+ grid-template-columns: minmax(0, 1.25fr) 48px minmax(0, 0.8fr) 48px minmax(0, 1fr);+ align-items: stretch;+ border: 1px solid var(--line);+ background:+ radial-gradient(var(--line) 1px, transparent 1.2px) 10px 10px / 22px 22px,+ var(--surface);+ padding: clamp(16px, 3vw, 32px);+}++.col {+ display: grid;+ align-content: start;+ gap: 12px;+ min-width: 0;+}++.colHead {+ display: flex;+ flex-wrap: wrap;+ justify-content: space-between;+ gap: 4px 12px;+ font-size: var(--t-12);+ color: var(--muted);+ text-transform: uppercase;+ letter-spacing: var(--track-mono);+}++.count {+ color: var(--ink);+}++.grid {+ display: grid;+ grid-template-columns: repeat(15, minmax(0, 1fr));+ gap: 3px;+}++.sq {+ aspect-ratio: 1;+ border-radius: 2px;+ transition: opacity 520ms var(--ease-out), background-color 320ms ease, transform 320ms var(--ease-out);+}++.a {+ background: color-mix(in srgb, var(--ink) 52%, var(--surface));+}++.b {+ background: color-mix(in srgb, var(--ink) 32%, var(--surface));+}++.c {+ background: color-mix(in srgb, var(--ink) 16%, var(--surface));+}++.legend {+ list-style: none;+ margin: 0;+ padding: 0;+ display: flex;+ flex-wrap: wrap;+ gap: 6px 16px;+ font-size: var(--t-12);+ color: var(--muted);+}++.legend li {+ display: inline-flex;+ align-items: center;+ gap: 6px;+}++.swatch {+ width: 10px;+ height: 10px;+ border-radius: 2px;+}++.legendNote {+ margin-left: auto;+}++.flow {+ display: grid;+ place-items: center;+}++.arrow {+ position: relative;+ width: 100%;+ height: 1px;+ background: repeating-linear-gradient(90deg, var(--ink-2) 0 4px, transparent 4px 8px);+}++.arrow::after {+ content: "";+ position: absolute;+ right: 0;+ top: -4px;+ border: 4px solid transparent;+ border-left: 6px solid var(--ink-2);+ border-right: 0;+}++.engine {+ align-content: center;+}++.engineCard {+ display: grid;+ gap: 6px;+ padding: 18px;+ border-radius: var(--radius);+ background: var(--ink);+ color: var(--bg);+}++.engineHead {+ font-size: var(--t-14);+ font-weight: 600;+}++.engineSub {+ font-size: var(--t-12);+ color: color-mix(in srgb, var(--bg) 62%, transparent);+}++.steps {+ list-style: none;+ margin: 10px 0 0;+ padding: 10px 0 0;+ border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);+ display: grid;+ gap: 8px;+ font-size: var(--t-12);+}++.steps li {+ display: flex;+ align-items: center;+ gap: 10px;+ color: color-mix(in srgb, var(--bg) 50%, transparent);+ transition: color 240ms ease;+ transition-delay: calc(700ms + var(--i) * 200ms);+}++.tick {+ width: 10px;+ height: 10px;+ border-radius: 2px;+ border: 1px solid color-mix(in srgb, var(--bg) 50%, transparent);+ transition: background-color 240ms ease, border-color 240ms ease;+ transition-delay: calc(700ms + var(--i) * 200ms);+}++.ctx {+ display: grid;+ gap: 10px;+ min-height: 260px;+ grid-template-rows: auto 1fr;+ padding: 12px;+ border: 1px solid var(--ink-2);+ border-radius: var(--radius);+ background: var(--surface);+}++.injected {+ display: grid;+ gap: 8px;+}++.injHead {+ font-size: var(--t-12);+ color: var(--accent-ink);+}++.slots {+ display: grid;+ grid-template-columns: repeat(8, minmax(0, 1fr));+ gap: 3px;+}++.slot {+ aspect-ratio: 1;+ border-radius: 2px;+ border: 1px dashed var(--line-2);+ transition: background-color 260ms ease, border-color 260ms ease, transform 260ms var(--ease-out);+ transition-delay: calc(500ms + var(--i) * 45ms);+}++.free {+ display: grid;+ align-content: space-between;+ padding: 10px;+ border: 1px dashed var(--line-2);+ border-radius: 4px;+ min-height: 120px;+}++.prompt {+ font-size: var(--t-12);+ color: var(--ink-2);+}++.freeLabel {+ font-size: var(--t-12);+ color: var(--muted);+ justify-self: end;+}++.outcomes {+ list-style: none;+ margin: var(--s-5) 0 0;+ padding: 0;+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ border-top: 1px solid var(--line);+}++.outcomes li {+ display: grid;+ gap: 6px;+ align-content: start;+ padding: var(--s-5) var(--s-5) 0 0;+}++.outcomes li + li {+ padding-left: var(--s-5);+ border-left: 1px dashed var(--line-2);+}++.big {+ font-size: var(--t-39);+ font-weight: 560;+ letter-spacing: var(--track-display);+ color: var(--ink);+ line-height: 1;+}++.what {+ font-size: var(--t-14);+ color: var(--muted);+ max-width: 28ch;+}++.outcomes :global(.src) {+ justify-self: start;+}++.figure:not(.play) .sq {+ opacity: 0;+ transform: translateY(4px);+}++.play .sq {+ transition-delay: calc(var(--r) * 40ms);+}++.focus .sq {+ transition-delay: 0ms;+}++.focus .sq:not(.sel) {+ opacity: 0.22;+}++.focus .sel {+ background: var(--accent);+ transform: scale(1.08);+}++.play .steps li {+ color: var(--bg);+}++.play .tick {+ background: var(--accent);+ border-color: var(--accent);+}++.focus .slot {+ background: var(--accent);+ border-color: var(--accent);+}++@media (max-width: 1000px) {+ .figure {+ grid-template-columns: minmax(0, 1fr);+ gap: 0;+ }+ .flow {+ height: 40px;+ }+ .arrow {+ width: 1px;+ height: 100%;+ background: repeating-linear-gradient(180deg, var(--ink-2) 0 4px, transparent 4px 8px);+ }+ .arrow::after {+ right: -4px;+ top: auto;+ bottom: 0;+ border: 4px solid transparent;+ border-top: 6px solid var(--ink-2);+ border-bottom: 0;+ }+ .engineCard {+ grid-template-columns: 1fr;+ }+ .steps {+ grid-template-columns: repeat(4, auto);+ justify-content: start;+ gap: 8px 16px;+ }+ .ctx {+ min-height: 0;+ }+ .free {+ min-height: 72px;+ }+}++@media (max-width: 720px) {+ .outcomes {+ grid-template-columns: minmax(0, 1fr);+ }+ .outcomes li,+ .outcomes li + li {+ padding: var(--s-4) 0;+ border-left: 0;+ }+ .outcomes li + li {+ border-top: 1px dashed var(--line-2);+ }+ .legendNote {+ margin-left: 0;+ }+}++@media (max-width: 420px) {+ .steps {+ grid-template-columns: repeat(2, auto);+ }+}++@media (prefers-reduced-motion: reduce) {+ .figure:not(.play) .sq,+ .play .sq,+ .focus .sel {+ opacity: 1;+ transform: none;+ }+ .figure .sq:not(.sel) {+ opacity: 0.22;+ }+ .figure .sel,+ .figure .slot {+ background: var(--accent);+ border-color: var(--accent);+ }+ .figure .steps li {+ color: var(--bg);+ }+ .figure .tick {+ background: var(--accent);+ border-color: var(--accent);+ }+ .sq,+ .slot,+ .steps li,+ .tick {+ transition: none;+ }+}diff --git a/website/components/site/ContextFunnel.tsx b/website/components/site/ContextFunnel.tsxnew file mode 100644index 00000000..f6da1c94--- /dev/null+++ b/website/components/site/ContextFunnel.tsx@@ -0,0 +1,169 @@+"use client";++import { useEffect, useRef, type CSSProperties } from "react";+import { LONGMEMEVAL, TOKENS, src } from "@/lib/site";+import s from "./ContextFunnel.module.css";++const COLS = 15;+const AGENTS = [+ { name: "claude-code", rows: 5, tone: "a" },+ { name: "cursor", rows: 4, tone: "b" },+ { name: "codex", rows: 4, tone: "c" },+];+const TOTAL = COLS * AGENTS.reduce((n, a) => n + a.rows, 0);+const SELECTED = new Set([3, 17, 29, 41, 52, 66, 79, 88, 101, 114, 126, 139, 151, 163, 176, 188]);+const STEPS = ["capture", "dedupe", "rank", "compress"];++function tone(index: number) {+ const row = Math.floor(index / COLS);+ let acc = 0;+ for (const a of AGENTS) {+ acc += a.rows;+ if (row < acc) return a.tone;+ }+ return "c";+}++function v(name: string, value: number | string): CSSProperties {+ return { [name]: value } as CSSProperties;+}++export function ContextFunnel() {+ const ref = useRef<HTMLDivElement | null>(null);+ useEffect(() => {+ const el = ref.current;+ if (!el) return;+ let timer: ReturnType<typeof setTimeout> | undefined;+ const io = new IntersectionObserver(+ ([e]) => {+ if (e.isIntersecting) {+ el.classList.add(s.play);+ timer = setTimeout(() => el.classList.add(s.focus), 1400);+ io.disconnect();+ }+ },+ { threshold: 0.3 },+ );+ io.observe(el);+ return () => {+ io.disconnect();+ if (timer) clearTimeout(timer);+ };+ }, []);++ const saved = Math.round((1 - TOKENS.agentmemory / TOKENS.fullContext) * 100);++ return (+ <section id="value" className="section" aria-labelledby="value-h">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">What your agent gets</span>+ <h2 id="value-h">The {100 - saved}% of your history that matters, every session.</h2>+ <p>+ A month of work across agents is {TOKENS.fullContext.toLocaleString("en-US")} tokens. Pasting all of it buries+ the task. agentmemory hands the next session the {TOKENS.agentmemory.toLocaleString("en-US")} tokens that+ answer it, and leaves the rest of the window for the work.+ </p>+ </div>++ <div ref={ref} className={s.figure}>+ <div className={`${s.col} ${s.history}`}>+ <div className={s.colHead}>+ <span className="mono">your history</span>+ <span className={`mono ${s.count}`}>{TOKENS.fullContext.toLocaleString("en-US")} tokens</span>+ </div>+ <div className={s.grid} role="img" aria-label={`${TOTAL} squares, about 100 tokens each, from three agents. ${SELECTED.size} of them are selected as relevant.`}>+ {Array.from({ length: TOTAL }, (_, i) => (+ <span+ key={i}+ className={`${s.sq} ${s[tone(i)]} ${SELECTED.has(i) ? s.sel : ""}`}+ style={v("--r", Math.floor(i / COLS))}+ />+ ))}+ </div>+ <ul className={s.legend}>+ {AGENTS.map((a) => (+ <li key={a.name}>+ <span className={`${s.swatch} ${s[a.tone]}`} />+ <span className="mono">{a.name}</span>+ </li>+ ))}+ <li className={s.legendNote}>+ <span className="mono">1 square ≈ 100 tokens</span>+ </li>+ </ul>+ </div>++ <div className={s.flow} aria-hidden="true">+ <span className={s.arrow} />+ </div>++ <div className={`${s.col} ${s.engine}`}>+ <div className={s.engineCard}>+ <span className={`mono ${s.engineHead}`}>agentmemory</span>+ <span className={`mono ${s.engineSub}`}>127.0.0.1 · on your machine</span>+ <ol className={s.steps}>+ {STEPS.map((step, i) => (+ <li key={step} style={v("--i", i)}>+ <span className={s.tick} />+ <span className="mono">{step}</span>+ </li>+ ))}+ </ol>+ </div>+ </div>++ <div className={s.flow} aria-hidden="true">+ <span className={s.arrow} />+ </div>++ <div className={`${s.col} ${s.window}`}>+ <div className={s.colHead}>+ <span className="mono">next session · context window</span>+ </div>+ <div className={s.ctx}>+ <div className={s.injected}>+ <span className={`mono ${s.injHead}`}>+ SessionStart · {TOKENS.agentmemory.toLocaleString("en-US")} tokens+ </span>+ <div className={s.slots}>+ {Array.from({ length: SELECTED.size }, (_, i) => (+ <span key={i} className={s.slot} style={v("--i", i)} />+ ))}+ </div>+ </div>+ <div className={s.free}>+ <span className={`mono ${s.prompt}`}>› your prompt</span>+ <span className={`mono ${s.freeLabel}`}>free for your task</span>+ </div>+ </div>+ </div>+ </div>++ <ul className={s.outcomes}>+ <li>+ <span className={s.big}>{LONGMEMEVAL.hybrid.r5}%</span>+ <span className={s.what}>of questions find the right past session in the top 5</span>+ <a className="src" href={src.longmemeval} target="_blank" rel="noreferrer">+ LongMemEval-S+ </a>+ </li>+ <li>+ <span className={s.big}>{TOKENS.savedPct}%</span>+ <span className={s.what}>fewer input tokens than pasting your whole history</span>+ <a className="src" href={src.tokens} target="_blank" rel="noreferrer">+ 240 observations, 30 sessions, v0.6.0+ </a>+ </li>+ <li>+ <span className={s.big}>14 ms</span>+ <span className={s.what}>median recall, with nothing sent over the network</span>+ <a className="src" href={src.agentLife} target="_blank" rel="noreferrer">+ coding-agent-life-v1 on v0.9.26+ </a>+ </li>+ </ul>+ </div>+ </section>+ );+}diff --git a/website/components/site/Doc.module.css b/website/components/site/Doc.module.cssnew file mode 100644index 00000000..3b5e7dc9--- /dev/null+++ b/website/components/site/Doc.module.css@@ -0,0 +1,135 @@+.main {+ padding-bottom: var(--s-10);+}++.head {+ display: grid;+ gap: var(--s-4);+ padding-top: clamp(48px, 7vw, 96px);+ padding-bottom: var(--s-7);+ max-width: 820px;+}++.head h1 {+ font-size: var(--t-49);+ letter-spacing: var(--track-display);+ line-height: 1.06;+ font-weight: 600;+}++.lede {+ font-size: var(--t-20);+ line-height: 1.5;+ color: var(--muted);+}++.updated {+ font-size: var(--t-12);+ color: var(--muted);+}++.body {+ border-top: 1px solid var(--line);+ padding-top: var(--s-7);+}++.prose {+ max-width: 720px;+ min-width: 0;+ overflow-wrap: anywhere;+ display: grid;+ gap: var(--s-4);+ font-size: var(--t-16);+ line-height: 1.7;+ color: var(--ink-2);+}++.prose h2 {+ font-size: var(--t-25);+ margin-top: var(--s-6);+ letter-spacing: var(--track-head);+}++.prose h3 {+ font-size: var(--t-20);+ margin-top: var(--s-4);+}++.prose a {+ color: var(--ink);+ text-decoration: underline;+ text-decoration-color: var(--line-2);+ text-underline-offset: 3px;+ transition: text-decoration-color var(--dur-1) ease;+}++.prose a:hover {+ text-decoration-color: var(--ink);+}++.prose strong {+ color: var(--ink);+ font-weight: 600;+}++.prose code {+ font-size: 0.9em;+ padding: 1px 5px;+ border: 1px solid var(--line);+ border-radius: 4px;+ background: var(--sunk);+ color: var(--ink);+ overflow-wrap: anywhere;+}++.prose pre {+ margin: 0;+ padding: var(--s-4);+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+ overflow-x: auto;+ font-size: var(--t-14);+ line-height: 1.6;+}++.prose pre code {+ padding: 0;+ border: 0;+ background: none;+}++.prose ul,+.prose ol {+ margin: 0;+ padding-left: 1.25em;+ display: grid;+ gap: var(--s-2);+}++.prose table {+ width: 100%;+ border-collapse: collapse;+ font-size: var(--t-14);+}++.prose th,+.prose td {+ text-align: left;+ padding: 10px 12px;+ border-bottom: 1px solid var(--line);+ vertical-align: top;+}++.prose th {+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+ font-weight: 500;+}++.prose td {+ color: var(--ink-2);+}diff --git a/website/components/site/Doc.tsx b/website/components/site/Doc.tsxnew file mode 100644index 00000000..87da3da8--- /dev/null+++ b/website/components/site/Doc.tsx@@ -0,0 +1,42 @@+import type { ReactNode } from "react";+import { Nav } from "./Nav";+import { Footer } from "./Footer";+import s from "./Doc.module.css";++export function DocPage({+ eyebrow,+ title,+ lede,+ updated,+ children,+}: {+ eyebrow: string;+ title: string;+ lede?: ReactNode;+ updated?: string;+ children: ReactNode;+}) {+ return (+ <>+ <Nav />+ <main className={s.main}>+ <header className="wrap">+ <div className={s.head}>+ <span className="eyebrow">{eyebrow}</span>+ <h1>{title}</h1>+ {lede && <p className={s.lede}>{lede}</p>}+ {updated && <p className={`mono ${s.updated}`}>{updated}</p>}+ </div>+ </header>+ <div className="wrap">+ <div className={s.body}>{children}</div>+ </div>+ </main>+ <Footer />+ </>+ );+}++export function Prose({ children }: { children: ReactNode }) {+ return <div className={s.prose}>{children}</div>;+}diff --git a/website/components/site/Durability.module.css b/website/components/site/Durability.module.cssnew file mode 100644index 00000000..f6a24251--- /dev/null+++ b/website/components/site/Durability.module.css@@ -0,0 +1,147 @@+.log {+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ box-shadow: var(--shadow);+ overflow: hidden;+}++.head {+ display: flex;+ justify-content: space-between;+ gap: var(--s-3);+ padding: 10px 16px;+ border-bottom: 1px solid var(--line);+ font-size: var(--t-12);+ color: var(--muted);+}++.head span:last-child {+ color: var(--ink);+ font-variant-numeric: tabular-nums;+}++.rows {+ list-style: none;+ margin: 0;+ padding: 6px 0;+}++.row {+ display: grid;+ grid-template-columns: 52px 96px minmax(0, 1fr);+ gap: var(--s-3);+ align-items: baseline;+ padding: 9px 16px;+ font-size: var(--t-14);+ line-height: 1.5;+ transition: opacity var(--dur-2) var(--ease-out);+}++.row[data-state="wait"] {+ opacity: 0.4;+}++.status {+ justify-self: start;+ font-size: var(--t-12);+ padding: 0 7px;+ border-radius: 3px;+ border: 1px solid var(--line-2);+ color: var(--muted);+ line-height: 20px;+ transition: background-color var(--dur-2) ease, color var(--dur-2) ease, border-color var(--dur-2) ease;+}++.row[data-state="run"] .status {+ border-color: var(--ink);+ color: var(--ink);+ animation: pulse 760ms var(--ease-in-out) infinite alternate;+}++.row[data-state="pass"] .status {+ background: var(--ink);+ border-color: var(--ink);+ color: var(--bg);+}++@keyframes pulse {+ from {+ opacity: 1;+ }+ to {+ opacity: 0.45;+ }+}++.id {+ font-size: var(--t-12);+ color: var(--ink);+}++.what {+ color: var(--ink-2);+ display: grid;+ gap: 2px;+}++.note {+ font-size: var(--t-12);+ color: var(--muted);+}++.verdict {+ display: flex;+ flex-wrap: wrap;+ justify-content: space-between;+ gap: var(--s-3);+ padding: 12px 16px;+ border-top: 1px solid var(--line);+ font-size: var(--t-12);+ color: var(--ink);+ opacity: 0;+ transform: translateY(4px);+ transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);+}++.verdict[data-on] {+ opacity: 1;+ transform: none;+}++.links {+ display: flex;+ gap: var(--s-4);+}++@media (max-width: 640px) {+ .row {+ grid-template-columns: 48px minmax(0, 1fr);+ row-gap: 2px;+ padding: 8px 12px;+ }+ .what {+ grid-column: 2;+ font-size: var(--t-14);+ }+ .head,+ .verdict {+ padding-left: 12px;+ padding-right: 12px;+ }+}++@media (prefers-reduced-motion: reduce) {+ .row,+ .status,+ .verdict {+ transition: none;+ }+ .row[data-state="run"] .status {+ animation: none;+ }+}++.nw {+ white-space: nowrap;+}diff --git a/website/components/site/Durability.tsx b/website/components/site/Durability.tsxnew file mode 100644index 00000000..08f04dbd--- /dev/null+++ b/website/components/site/Durability.tsx@@ -0,0 +1,108 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { GATE_SCENARIOS } from "@/lib/site";+import { GATE_NOTES, GATE_SOURCE, GATE_WORKFLOW } from "@/lib/trust";+import s from "./Durability.module.css";++const STEP_MS = 380;++type RowState = "pass" | "run" | "wait";++const STATUS_LABEL: Record<RowState, string> = { pass: "passed", run: "running", wait: "pending" };++function rowState(i: number, done: number, finished: boolean): RowState {+ if (finished || i < done) return "pass";+ if (i === done) return "run";+ return "wait";+}++export function Durability() {+ const ref = useRef<HTMLDivElement | null>(null);+ const total = GATE_SCENARIOS.length;+ const [done, setDone] = useState(-1);++ useEffect(() => {+ const el = ref.current;+ if (!el) return;+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {+ setDone(total);+ return;+ }+ let timer: ReturnType<typeof setTimeout> | null = null;+ const io = new IntersectionObserver(+ ([e]) => {+ if (!e.isIntersecting) return;+ io.disconnect();+ let n = 0;+ const tick = () => {+ setDone(n);+ n += 1;+ if (n <= total) timer = setTimeout(tick, STEP_MS);+ };+ tick();+ },+ { rootMargin: "0px 0px -20% 0px" },+ );+ io.observe(el);+ return () => {+ io.disconnect();+ if (timer) clearTimeout(timer);+ };+ }, [total]);++ const finished = done >= total;++ return (+ <section id="durability" className="section" aria-labelledby="durability-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">Durability</span>+ <h2 id="durability-title">Every change ships through a crash test.</h2>+ <p>+ Before code reaches main, CI packs the npm tarball, installs it into an empty directory and runs ten+ scenarios against it on Ubuntu and macOS. Three of them kill the server with SIGKILL mid-flight.+ </p>+ </div>++ <div ref={ref} className={s.log}>+ <div className={s.head}>+ <span className="mono">npm run release:gate</span>+ <span className="mono">{`${Math.max(0, done)}/${total}`}</span>+ </div>+ <ol className={s.rows}>+ {GATE_SCENARIOS.map((g, i) => {+ const state = rowState(i, done, finished);+ const note = GATE_NOTES[g.id];+ return (+ <li key={g.id} className={s.row} data-state={state}>+ <span className={`mono ${s.status}`} aria-label={STATUS_LABEL[state]}>+ {state}+ </span>+ <span className={`mono ${s.id}`}>{g.id}</span>+ <span className={s.what}>+ {g.what}+ {note && <span className={`mono ${s.note}`}>{note}</span>}+ </span>+ </li>+ );+ })}+ </ol>+ <div className={s.verdict} data-on={finished || undefined}>+ <span className="mono">+ {total} of {total} passed on <span className={s.nw}>ubuntu-latest</span> and <span className={s.nw}>macos-latest</span>+ </span>+ <span className={s.links}>+ <a className="src" href={GATE_SOURCE} target="_blank" rel="noreferrer">+ gate source+ </a>+ <a className="src" href={GATE_WORKFLOW} target="_blank" rel="noreferrer">+ workflow+ </a>+ </span>+ </div>+ </div>+ </div>+ </section>+ );+}diff --git a/website/components/site/Faq.module.css b/website/components/site/Faq.module.cssnew file mode 100644index 00000000..0abfd8dd--- /dev/null+++ b/website/components/site/Faq.module.css@@ -0,0 +1,107 @@+.grid {+ display: grid;+ grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);+ gap: clamp(24px, 4vw, 64px);+ align-items: start;+}++.list {+ border-top: 1px solid var(--line);+}++.item {+ border-bottom: 1px solid var(--line);+}++.item summary {+ list-style: none;+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--s-4);+ padding: var(--s-5) 0;+ cursor: pointer;+ color: var(--ink);+ font-size: var(--t-20);+ font-weight: 520;+ letter-spacing: -0.01em;+}++.item summary::-webkit-details-marker {+ display: none;+}++.mark {+ position: relative;+ width: 14px;+ height: 14px;+ flex: none;+}++.mark::before,+.mark::after {+ content: "";+ position: absolute;+ left: 0;+ top: 6.5px;+ width: 14px;+ height: 1px;+ background: var(--ink);+ transition: transform var(--dur-2) var(--ease-out);+}++.mark::after {+ transform: rotate(90deg);+}++.item[open] .mark::after {+ transform: rotate(0deg);+}++.item p {+ padding: 0 var(--s-6) var(--s-5) 0;+ color: var(--muted);+ font-size: var(--t-16);+ line-height: 1.65;+ max-width: 62ch;+ animation: open var(--dur-3) var(--ease-out);+}++.item summary:focus-visible {+ outline: 2px solid var(--ink);+ outline-offset: 4px;+}++@keyframes open {+ from {+ opacity: 0;+ transform: translateY(-4px);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@media (max-width: 900px) {+ .grid {+ grid-template-columns: minmax(0, 1fr);+ gap: 0;+ }+ .item summary {+ font-size: var(--t-16);+ }+ .item p {+ padding-right: 0;+ }+}++@media (prefers-reduced-motion: reduce) {+ .item p {+ animation: none;+ }+ .mark::before,+ .mark::after {+ transition: none;+ }+}diff --git a/website/components/site/Faq.tsx b/website/components/site/Faq.tsxnew file mode 100644index 00000000..05ccb549--- /dev/null+++ b/website/components/site/Faq.tsx@@ -0,0 +1,36 @@+import { FAQ } from "@/lib/site";+import s from "./Faq.module.css";++export function Faq() {+ const ld = {+ "@context": "https://schema.org",+ "@type": "FAQPage",+ mainEntity: FAQ.map((f) => ({+ "@type": "Question",+ name: f.q,+ acceptedAnswer: { "@type": "Answer", text: f.a },+ })),+ };+ return (+ <section id="faq" className="section" aria-labelledby="faq-title">+ <div className={`wrap ${s.grid}`}>+ <div className="section-head">+ <span className="eyebrow">FAQ</span>+ <h2 id="faq-title">Questions people ask first.</h2>+ </div>+ <div className={s.list}>+ {FAQ.map((f, i) => (+ <details key={f.q} className={s.item} open={i === 0}>+ <summary>+ <span>{f.q}</span>+ <span className={s.mark} aria-hidden="true" />+ </summary>+ <p>{f.a}</p>+ </details>+ ))}+ </div>+ </div>+ <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(ld).replace(/</g, "\\u003c") }} />+ </section>+ );+}diff --git a/website/components/site/Footer.module.css b/website/components/site/Footer.module.cssnew file mode 100644index 00000000..f7057adf--- /dev/null+++ b/website/components/site/Footer.module.css@@ -0,0 +1,98 @@+.footer {+ border-top: 1px solid var(--line);+ background: var(--surface);+ padding-bottom: var(--s-8);+}++.ask {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ justify-content: space-between;+ gap: var(--s-5);+ padding-top: var(--s-7);+ padding-bottom: var(--s-7);+ background: linear-gradient(var(--line), var(--line)) center bottom / calc(100% - 2 * var(--gutter)) 1px no-repeat;+}++.askText {+ margin-top: var(--s-2);+ color: var(--ink);+ font-size: var(--t-20);+}++.askLinks {+ display: flex;+ flex-wrap: wrap;+ gap: var(--s-2);+}++.grid {+ display: grid;+ grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)) minmax(max-content, 1fr);+ gap: var(--s-6);+ padding-top: var(--s-7);+}++.brand {+ display: grid;+ gap: var(--s-3);+ align-content: start;+ color: var(--muted);+ font-size: var(--t-14);+}++.brand .mono {+ font-size: var(--t-12);+}++.logo {+ display: inline-flex;+ align-items: center;+ gap: 10px;+ color: var(--ink);+ font-weight: 600;+}++.col {+ display: grid;+ gap: 10px;+ align-content: start;+ font-size: var(--t-14);+}++.col > span {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+ margin-bottom: 4px;+}++.col a {+ color: var(--ink-2);+ transition: color var(--dur-1) ease;+ overflow-wrap: anywhere;+}++.col a:hover {+ color: var(--ink);+}++@media (max-width: 1100px) {+ .grid {+ grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(max-content, 1fr);+ }+ .brand {+ grid-column: 1 / -1;+ }+}++@media (max-width: 900px) {+ .grid {+ grid-template-columns: repeat(2, minmax(0, 1fr));+ }+ .brand {+ grid-column: 1 / -1;+ }+}diff --git a/website/components/site/Footer.tsx b/website/components/site/Footer.tsxnew file mode 100644index 00000000..b64fa17b--- /dev/null+++ b/website/components/site/Footer.tsx@@ -0,0 +1,111 @@+import Link from "next/link";+import { DOCS_URL, NPM_URL, REPO_URL, SITE_URL } from "@/lib/site";+import { getProjectMeta } from "@/lib/meta";+import { COMPETITORS } from "@/lib/compare";+import { Logo } from "./Logo";+import s from "./Footer.module.css";++const ASK = `Read ${SITE_URL}/llms-full.txt and explain what agentmemory does, how it stores memory locally, and how to install it for my coding agent.`;++const ASK_LINKS = [+ { name: "ChatGPT", href: `https://chatgpt.com/?q=${encodeURIComponent(ASK)}` },+ { name: "Claude", href: `https://claude.ai/new?q=${encodeURIComponent(ASK)}` },+ { name: "Perplexity", href: `https://www.perplexity.ai/search?q=${encodeURIComponent(ASK)}` },+];++const COLUMNS = [+ {+ head: "Product",+ links: [+ { label: "Use cases", href: "/#use-cases" },+ { label: "How it works", href: "/#how" },+ { label: "Benchmarks", href: "/benchmarks" },+ { label: "Install", href: "/#install" },+ { label: "Changelog", href: "/changelog" },+ ],+ },+ {+ head: "Trust",+ links: [+ { label: "Security", href: "/security" },+ { label: "Privacy", href: "/privacy" },+ { label: "License, Apache-2.0", href: `${REPO_URL}/blob/main/LICENSE` },+ { label: "Report a vulnerability", href: `${REPO_URL}/security/advisories/new` },+ ],+ },+ {+ head: "Developers",+ links: [+ { label: "Docs", href: DOCS_URL },+ { label: "GitHub", href: REPO_URL },+ { label: "npm", href: NPM_URL },+ { label: "Issues", href: `${REPO_URL}/issues` },+ ],+ },+ {+ head: "Compare",+ links: [+ ...COMPETITORS.map((c) => ({ label: `vs ${c.name}`, href: `/vs/${c.slug}` })),+ { label: "All comparisons", href: "/vs" },+ ],+ },+ {+ head: "For agents",+ links: [+ { label: "llms.txt", href: "/llms.txt" },+ { label: "llms-full.txt", href: "/llms-full.txt" },+ { label: "INSTALL_FOR_AGENTS.md", href: `${REPO_URL}/blob/main/INSTALL_FOR_AGENTS.md` },+ ],+ },+];++function isExternal(href: string) {+ return href.startsWith("http");+}++export function Footer() {+ const meta = getProjectMeta();+ return (+ <footer className={s.footer}>+ <div className={`wrap ${s.ask}`}>+ <div>+ <span className="eyebrow">Ask an AI about agentmemory</span>+ <p className={s.askText}>Open your assistant with our full docs already in the prompt.</p>+ </div>+ <div className={s.askLinks}>+ {ASK_LINKS.map((a) => (+ <a key={a.name} className="btn btn-ghost" href={a.href} target="_blank" rel="noreferrer">+ {a.name}+ </a>+ ))}+ </div>+ </div>+ <div className={`wrap ${s.grid}`}>+ <div className={s.brand}>+ <Link href="/" className={s.logo}>+ <Logo />+ <span>agentmemory</span>+ </Link>+ <p>Persistent memory for AI coding agents. Runs on your machine.</p>+ <p className="mono">v{meta.version} · Apache-2.0</p>+ </div>+ {COLUMNS.map((c) => (+ <nav key={c.head} className={s.col} aria-label={c.head}>+ <span className="mono">{c.head}</span>+ {c.links.map((l) =>+ isExternal(l.href) ? (+ <a key={l.label} href={l.href} target="_blank" rel="noreferrer">+ {l.label}+ </a>+ ) : (+ <Link key={l.label} href={l.href}>+ {l.label}+ </Link>+ ),+ )}+ </nav>+ ))}+ </div>+ </footer>+ );+}diff --git a/website/components/site/Hero.module.css b/website/components/site/Hero.module.cssnew file mode 100644index 00000000..492f1d4b--- /dev/null+++ b/website/components/site/Hero.module.css@@ -0,0 +1,330 @@+.hero {+ padding: clamp(48px, 8vw, 112px) 0 var(--s-9);+ position: relative;+}++.grid {+ display: grid;+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);+ gap: clamp(32px, 5vw, 72px);+ align-items: center;+}++.copy {+ display: grid;+ gap: var(--s-5);+ align-content: start;+}++.chip {+ justify-self: start;+ display: inline-flex;+ align-items: center;+ gap: 10px;+ height: 30px;+ padding: 0 12px;+ border: 1px solid var(--line);+ border-radius: 999px;+ font-size: var(--t-12);+ color: var(--muted);+ background: var(--surface);+ transition: border-color var(--dur-1) ease, color var(--dur-1) ease;+}++.chip:hover {+ border-color: var(--line-2);+ color: var(--ink);+}++.chip .mono {+ color: var(--ink);+}++.sep {+ width: 1px;+ height: 12px;+ background: var(--line-2);+}++.title {+ font-size: var(--t-76);+ line-height: var(--lh-tight);+ letter-spacing: var(--track-display);+ font-weight: 600;+ animation: rise 900ms var(--ease-out) both;+}++.lede {+ font-size: var(--t-20);+ line-height: 1.5;+ color: var(--muted);+ max-width: 34em;+ animation: rise 900ms var(--ease-out) 80ms both;+}++.install {+ display: grid;+ gap: var(--s-3);+ animation: rise 900ms var(--ease-out) 160ms both;+}++.cmd {+ display: flex;+ align-items: center;+ gap: var(--s-3);+ width: 100%;+ max-width: 520px;+ height: 52px;+ padding: 0 var(--s-4);+ border: 1px solid var(--line-2);+ border-radius: var(--radius);+ background: var(--surface);+ text-align: left;+ font-size: var(--t-14);+ color: var(--ink);+ transition: border-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.cmd:hover {+ border-color: var(--ink);+}++.cmd:active {+ transform: scale(0.99);+}++.cmd code {+ flex: 1;+ min-width: 0;+ overflow: hidden;+ text-overflow: clip;+ white-space: nowrap;+}++.prompt {+ color: var(--faint);+ font-family: var(--font-mono), monospace;+}++.cmd :global(.copy-state),+.row :global(.copy-state) {+ font-size: var(--t-12);+ color: var(--muted);+}++.promptBtn {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ gap: 10px;+ min-height: 44px;+ padding: 10px 20px 10px 16px;+ border: 1px solid var(--ink);+ border-radius: 999px;+ background: var(--ink);+ color: var(--bg);+ font-family: var(--font-mono), ui-monospace, monospace;+ font-size: 0.8125rem;+ font-weight: 500;+ letter-spacing: 0.01em;+ transition: transform 200ms var(--ease-out), background-color 150ms ease, border-color 150ms ease,+ color 150ms ease;+}++.promptBtn:active {+ transform: scale(0.97);+}++.promptBtn[data-copied] {+ background: var(--accent-strong);+ border-color: var(--accent-strong);+ color: #fff;+}++.glyphs {+ display: inline-flex;+ align-items: center;+ gap: 7px;+}++.glyph {+ width: 15px;+ height: 15px;+ fill: currentColor;+ opacity: 0.92;+ transition: transform 200ms var(--ease-out);+}++.row :global(.btn) {+ border-radius: 999px;+}++@media (hover: hover) and (pointer: fine) {+ .promptBtn:hover {+ transform: translateY(-2px);+ }+ .promptBtn:hover:active {+ transform: translateY(-2px) scale(0.97);+ }+ .promptBtn:hover .glyph {+ transform: translateY(-1.5px) scale(1.12);+ }+ .promptBtn:hover .glyph:nth-child(2) {+ transition-delay: 40ms;+ }+ .promptBtn:hover .glyph:nth-child(3) {+ transition-delay: 80ms;+ }+}++.docs {+ justify-self: start;+ display: inline-flex;+ align-items: center;+ gap: 6px;+ min-height: 44px;+ font-size: var(--t-14);+ color: var(--ink-2);+ text-decoration: underline;+ text-decoration-color: var(--line-2);+ text-underline-offset: 4px;+ transition: color var(--dur-1) ease, text-decoration-color var(--dur-1) ease;+}++.docs:hover {+ color: var(--ink);+ text-decoration-color: var(--accent);+}++.star svg {+ flex: none;+}++.starCount {+ padding-left: 10px;+ margin-left: 2px;+ border-left: 1px solid var(--line-2);+ font-size: var(--t-12);+ color: var(--muted);+ font-variant-numeric: tabular-nums;+}++.row {+ display: flex;+ flex-wrap: wrap;+ gap: var(--s-2);+}++.facts {+ display: flex;+ flex-wrap: wrap;+ gap: var(--s-6);+ margin: var(--s-2) 0 0;+ padding-top: var(--s-5);+ border-top: 1px solid var(--line);+ animation: rise 900ms var(--ease-out) 240ms both;+}++.facts dt {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+}++.facts dd {+ margin: 4px 0 0;+ font-size: var(--t-20);+ color: var(--ink);+ font-weight: 540;+ display: flex;+ align-items: baseline;+ gap: 10px;+}++.visual {+ animation: fade 1100ms var(--ease-out) 120ms both;+}++@keyframes rise {+ from {+ opacity: 0;+ transform: translateY(14px);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@keyframes fade {+ from {+ opacity: 0;+ transform: scale(0.985);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@media (max-width: 1000px) {+ .grid {+ grid-template-columns: minmax(0, 1fr);+ }+}++@media (max-width: 520px) {+ .cmd {+ font-size: var(--t-12);+ gap: var(--s-2);+ height: auto;+ min-height: 52px;+ padding-top: 10px;+ padding-bottom: 10px;+ }+ .cmd code {+ white-space: normal;+ overflow-wrap: anywhere;+ overflow: visible;+ }+ .promptBtn {+ flex: 1 1 100%;+ }+ .row :global(.btn) {+ flex: 1 1 100%;+ min-width: 0;+ height: auto;+ min-height: 44px;+ padding-top: 10px;+ padding-bottom: 10px;+ justify-content: center;+ white-space: normal;+ text-align: center;+ }+ .facts {+ gap: var(--s-4);+ }+ .lede {+ font-size: 1.0625rem;+ line-height: 1.55;+ }+}++@media (prefers-reduced-motion: reduce) {+ .title,+ .lede,+ .install,+ .facts,+ .visual {+ animation: none;+ }+ .promptBtn,+ .glyph {+ transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;+ }+ .promptBtn:hover,+ .promptBtn:hover .glyph {+ transform: none;+ }+}diff --git a/website/components/site/Hero.tsx b/website/components/site/Hero.tsxnew file mode 100644index 00000000..206b7a6e--- /dev/null+++ b/website/components/site/Hero.tsx@@ -0,0 +1,96 @@+import { AGENT_INSTALL_PROMPT, INSTALL_CMD, LONGMEMEVAL, REPO_URL, src } from "@/lib/site";+import { compact, getProjectMeta } from "@/lib/meta";+import { CopyButton } from "./client";+import { MemoryField } from "./MemoryField";+import { HeroTitle } from "./HeroTitle";+import s from "./Hero.module.css";++const AGENT_GLYPHS = [+ { name: "Claude", d: "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z" },+ { name: "Codex", d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z" },+ { name: "Cursor", d: "M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23" },+];++export function Hero() {+ const meta = getProjectMeta();+ return (+ <section className={s.hero}>+ <div className={`wrap ${s.grid}`}>+ <div className={s.copy}>+ <a className={s.chip} href={src.releases} target="_blank" rel="noreferrer">+ <span className="mono">v{meta.version}</span>+ <span className={s.sep} />+ <span>Open source, Apache-2.0</span>+ </a>+ <HeroTitle rankHref="https://trendshift.io/repositories/25123" />+ <p className={s.lede}>+ Your coding agent starts every session from zero. agentmemory captures what it did, keeps it on your machine,+ and hands the right context back next time. No account, no API key, no cloud.+ </p>++ <div className={s.install}>+ <CopyButton text={INSTALL_CMD} label="Copy install command" className={s.cmd}>+ <span className={s.prompt} aria-hidden="true">+ $+ </span>+ <code>{INSTALL_CMD}</code>+ </CopyButton>+ <div className={s.row}>+ <CopyButton+ text={AGENT_INSTALL_PROMPT}+ label="Copy a setup prompt for your coding agent"+ className={s.promptBtn}+ labels={{ idle: "Copy setup prompt", done: "Copied, paste it into your agent" }}+ >+ <span className={s.glyphs} aria-hidden="true">+ {AGENT_GLYPHS.map((g) => (+ <svg key={g.name} className={s.glyph} viewBox="0 0 24 24">+ <path d={g.d} />+ </svg>+ ))}+ </span>+ </CopyButton>+ <a className={`btn btn-ghost ${s.star}`} href={REPO_URL} target="_blank" rel="noreferrer">+ <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">+ <path+ fill="currentColor"+ d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z"+ />+ </svg>+ <span>Star on GitHub</span>+ <span className={`mono ${s.starCount}`}>{compact(meta.stars)}</span>+ </a>+ </div>+ <a className={s.docs} href="/docs">+ Read the docs <span aria-hidden="true">→</span>+ </a>+ </div>++ <dl className={s.facts}>+ <div>+ <dt className="mono">LongMemEval-S recall@5</dt>+ <dd>+ {LONGMEMEVAL.hybrid.r5}%{" "}+ <a className="src" href={src.longmemeval} target="_blank" rel="noreferrer">+ source+ </a>+ </dd>+ </div>+ <div>+ <dt className="mono">Leaves your machine</dt>+ <dd>+ Nothing, by default{" "}+ <a className="src" href="/security">+ how+ </a>+ </dd>+ </div>+ </dl>+ </div>+ <div className={s.visual}>+ <MemoryField />+ </div>+ </div>+ </section>+ );+}diff --git a/website/components/site/HeroTitle.module.css b/website/components/site/HeroTitle.module.cssnew file mode 100644index 00000000..85b32086--- /dev/null+++ b/website/components/site/HeroTitle.module.css@@ -0,0 +1,87 @@+.title {+ font-size: clamp(2.375rem, 1.35rem + 4.6vw, 4.25rem);+ line-height: 1.04;+ letter-spacing: var(--track-display);+ font-weight: 600;+ display: grid;+ animation: rise 900ms var(--ease-out) both;+}++.line {+ display: block;+ white-space: nowrap;+}++.rank {+ color: var(--accent-ink);+ text-decoration: none;+}++.slot {+ display: inline-grid;+ vertical-align: bottom;+ overflow: hidden;+ padding-bottom: 0.08em;+}++.item {+ grid-area: 1 / 1;+ display: inline-flex;+ align-items: center;+ gap: 0.22em;+ opacity: 0;+ transform: translateY(110%);+ filter: blur(4px);+ transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out), filter 420ms var(--ease-out);+}++.item[data-on] {+ opacity: 1;+ transform: none;+ filter: none;+}++.item:not([data-on]) {+ transform: translateY(-110%);+}++.item[data-on] ~ .item:not([data-on]) {+ transform: translateY(110%);+}++.logo {+ width: 0.78em;+ height: 0.78em;+ border-radius: 0.16em;+ background: #fff;+ padding: 0.06em;+ filter: none;+ flex: none;+}++@keyframes rise {+ from {+ opacity: 0;+ transform: translateY(14px);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@media (max-width: 360px) {+ .title {+ font-size: 2.2rem;+ }+}++@media (prefers-reduced-motion: reduce) {+ .title {+ animation: none;+ }+ .item {+ transition: none;+ filter: none;+ }+}diff --git a/website/components/site/HeroTitle.tsx b/website/components/site/HeroTitle.tsxnew file mode 100644index 00000000..ae873563--- /dev/null+++ b/website/components/site/HeroTitle.tsx@@ -0,0 +1,73 @@+"use client";++import { useEffect, useState } from "react";+import s from "./HeroTitle.module.css";++const MODES = ["persistent", "cross-agent", "infinite", "shared", "local", "long-term"];++const AGENTS = [+ { name: "Claude Code", logo: "https://svgl.app/library/claude-ai-icon.svg" },+ { name: "Cursor", logo: "https://svgl.app/library/cursor_light.svg" },+ { name: "Codex", logo: "https://svgl.app/library/openai.svg" },+ { name: "OpenClaw", logo: "https://github.com/openclaw.png" },+ { name: "OpenCode", logo: "/opencode.png" },+ { name: "Hermes", logo: "https://github.com/NousResearch.png" },+];++const STEP = 2400;++export function HeroTitle({ rankHref }: { rankHref: string }) {+ const [mode, setMode] = useState(0);+ const [agent, setAgent] = useState(0);++ useEffect(() => {+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;+ let tick = 0;+ let visible = !document.hidden;+ const onVis = () => {+ visible = !document.hidden;+ };+ document.addEventListener("visibilitychange", onVis);+ const id = setInterval(() => {+ if (!visible) return;+ tick += 1;+ if (tick % 2 === 1) setAgent((a) => (a + 1) % AGENTS.length);+ else setMode((m) => (m + 1) % MODES.length);+ }, STEP / 2);+ return () => {+ clearInterval(id);+ document.removeEventListener("visibilitychange", onVis);+ };+ }, []);++ return (+ <h1 className={s.title}>+ <span className="sr-only">The number one persistent memory for coding agents.</span>+ <span aria-hidden="true" className={s.line}>+ <a className={s.rank} href={rankHref} target="_blank" rel="noreferrer" tabIndex={-1}>+ #1+ </a>{" "}+ <span className={s.slot}>+ {MODES.map((m, i) => (+ <span key={m} className={s.item} data-on={i === mode || undefined}>+ {m}+ </span>+ ))}+ </span>+ </span>+ <span aria-hidden="true" className={s.line}>+ memory for+ </span>+ <span aria-hidden="true" className={s.line}>+ <span className={s.slot}>+ {AGENTS.map((a, i) => (+ <span key={a.name} className={`${s.item} ${s.agent}`} data-on={i === agent || undefined}>+ <img src={a.logo} alt="" width={64} height={64} className={s.logo} />+ {a.name}+ </span>+ ))}+ </span>+ </span>+ </h1>+ );+}diff --git a/website/components/site/InTheWild.module.css b/website/components/site/InTheWild.module.cssnew file mode 100644index 00000000..0707b9f8--- /dev/null+++ b/website/components/site/InTheWild.module.css@@ -0,0 +1,203 @@+.quotes {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ border-top: 1px solid var(--line);+}++.quote {+ border-bottom: 1px solid var(--line);+ padding: var(--s-6) var(--s-6) var(--s-6) 0;+}++.quote:nth-child(2n) {+ padding-left: var(--s-6);+ padding-right: 0;+ border-left: 1px solid var(--line);+}++.quote figure {+ margin: 0;+ display: grid;+ gap: var(--s-4);+ height: 100%;+ align-content: space-between;+}++.quote blockquote {+ margin: 0;+}++.quote blockquote p {+ font-size: var(--t-20);+ line-height: 1.45;+ color: var(--ink);+ letter-spacing: -0.01em;+ text-indent: -0.42em;+}++.quote blockquote p::before {+ content: "\201C";+}++.quote blockquote p::after {+ content: "\201D";+}++.quote figcaption {+ display: flex;+ flex-wrap: wrap;+ align-items: baseline;+ gap: 6px 12px;+ font-size: var(--t-14);+}++.who {+ color: var(--ink);+ font-weight: 540;+}++.quote figcaption :global(.mono) {+ font-size: var(--t-12);+ color: var(--muted);+}++.badgeOutlet {+ justify-content: flex-start;+ padding-top: 8px;+ padding-bottom: 8px;+}++.badgeOutlet img {+ width: 100%;+ max-width: 250px;+ height: auto;+ filter: grayscale(1);+}++.featuredStrip {+ padding: var(--s-6) 0;+ border-bottom: 1px solid var(--line);+}++.featured {+ display: grid;+ grid-template-columns: minmax(0, 1fr);+ gap: var(--s-3);+}++.featuredHead {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+}++.outlets {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ grid-template-columns: repeat(4, minmax(0, 1fr));+ gap: var(--s-2);+}++.outlet {+ display: flex;+ align-items: center;+ gap: var(--s-3);+ height: 100%;+ padding: 12px 14px;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+ transition: border-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.outlet:hover {+ border-color: var(--ink);+}++.outlet:active {+ transform: scale(0.98);+}++.mark,+.markWide {+ flex: none;+ object-fit: contain;+ filter: grayscale(1);+ opacity: 0.85;+}++.mark {+ width: 24px;+ height: 24px;+ border-radius: 5px;+}++.markWide {+ width: 84px;+ height: 20px;+}++:root[data-theme="dark"] .markWide {+ filter: grayscale(1) invert(1);+}++@media (prefers-color-scheme: dark) {+ :root:not([data-theme="light"]) .markWide {+ filter: grayscale(1) invert(1);+ }+}++.outletText {+ display: grid;+ min-width: 0;+}++.outletName {+ color: var(--ink);+ font-size: var(--t-14);+ font-weight: 540;+}++.outletText :global(.mono) {+ font-size: var(--t-12);+ color: var(--muted);+}++@media (max-width: 1000px) {+ .outlets {+ grid-template-columns: repeat(2, minmax(0, 1fr));+ }+ .featured {+ grid-template-columns: minmax(0, 1fr);+ gap: var(--s-3);+ }+ .featuredHead {+ padding-top: 0;+ }+}++@media (max-width: 760px) {+ .quotes {+ grid-template-columns: minmax(0, 1fr);+ }+ .quote,+ .quote:nth-child(2n) {+ padding: var(--s-5) 0;+ border-left: 0;+ }+ .quote blockquote p {+ font-size: var(--t-16);+ }+}++@media (max-width: 480px) {+ .outlets {+ grid-template-columns: minmax(0, 1fr);+ }+}diff --git a/website/components/site/InTheWild.tsx b/website/components/site/InTheWild.tsxnew file mode 100644index 00000000..0c8826bf--- /dev/null+++ b/website/components/site/InTheWild.tsx@@ -0,0 +1,84 @@+import { FEATURED, QUOTES } from "@/lib/site";+import { FEATURED_LOGOS } from "@/lib/rest";+import { Reveal } from "./client";+import s from "./InTheWild.module.css";++export function InTheWild() {+ return (+ <section id="wild" className="section" aria-labelledby="wild-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">In the wild</span>+ <h2 id="wild-title">Said by people who use it.</h2>+ <p>Every quote links to where it was said.</p>+ </div>++ <ul className={s.quotes}>+ {QUOTES.map((q, i) => (+ <Reveal as="li" key={q.name} delay={i * 80} className={s.quote}>+ <figure>+ <blockquote>+ <p>{q.quote}</p>+ </blockquote>+ <figcaption>+ <span className={s.who}>{q.name}</span>+ <span className="mono">{q.context}</span>+ <a className="src" href={q.href} target="_blank" rel="noreferrer">+ source+ </a>+ </figcaption>+ </figure>+ </Reveal>+ ))}+ </ul>+ </div>+ </section>+ );+}++export function Featured() {+ return (+ <section className={s.featuredStrip} aria-label="Featured in">+ <div className={`wrap ${s.featured}`}>+ <span className={`mono ${s.featuredHead}`}>Featured in</span>+ <ul className={s.outlets}>+ {FEATURED.map((f, i) => {+ const logo = FEATURED_LOGOS[f.name];+ const badge = "badge" in f ? f.badge : undefined;+ if (badge) {+ return (+ <Reveal as="li" key={f.name} delay={i * 60}>+ <a className={`${s.outlet} ${s.badgeOutlet}`} href={f.href} target="_blank" rel="noopener noreferrer">+ <img src={badge.light} alt={badge.alt} width={250} height={54} className="theme-light-only" loading="lazy" decoding="async" />+ <img src={badge.dark} alt="" aria-hidden="true" width={250} height={54} className="theme-dark-only" loading="lazy" decoding="async" />+ </a>+ </Reveal>+ );+ }+ return (+ <Reveal as="li" key={f.name} delay={i * 60}>+ <a className={s.outlet} href={f.href} target="_blank" rel="noreferrer">+ {logo && (+ <img+ src={logo.src}+ alt=""+ width={logo.wide ? 84 : 24}+ height={logo.wide ? 20 : 24}+ className={logo.wide ? s.markWide : s.mark}+ loading="lazy"+ decoding="async"+ />+ )}+ <span className={s.outletText}>+ <span className={logo?.wide ? "sr-only" : s.outletName}>{f.name}</span>+ <span className="mono">{f.sub}</span>+ </span>+ </a>+ </Reveal>+ );+ })}+ </ul>+ </div>+ </section>+ );+}diff --git a/website/components/site/InfraTiles.module.css b/website/components/site/InfraTiles.module.cssnew file mode 100644index 00000000..4bbe5a43--- /dev/null+++ b/website/components/site/InfraTiles.module.css@@ -0,0 +1,359 @@+.section {+ border-top: 1px solid var(--line);+}++.row {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+}++.tile {+ display: grid;+ grid-template-rows: auto auto 1fr auto auto;+ gap: var(--s-3);+ padding: var(--s-7) var(--s-5);+ border-left: 1px dashed var(--line-2);+ min-width: 0;+}++.tile:first-child {+ border-left: 0;+ padding-left: 0;+}++.tile:last-child {+ padding-right: 0;+}++.tile h3 {+ font-size: var(--t-16);+ font-weight: 500;+ letter-spacing: 0;+ color: var(--ink);+}++.tile p {+ font-size: var(--t-14);+ color: var(--muted);+ line-height: 1.55;+ max-width: 34ch;+}++.tile :global(.src) {+ justify-self: start;+}++.art {+ display: grid;+ place-items: center;+ min-height: 230px;+ padding: var(--s-4) 0;+}++.gauge {+ width: 100%;+ max-width: 300px;+}++.track {+ fill: none;+ stroke: var(--line-2);+ stroke-width: 2;+}++.tick {+ stroke: var(--line-2);+ stroke-width: 1.2;+}++.fill {+ fill: none;+ stroke: var(--accent);+ stroke-width: 4;+ stroke-linecap: round;+ stroke-dasharray: 1;+ stroke-dashoffset: 1;+}++.readout {+ font-family: var(--font-mono), monospace;+ font-size: 30px;+ fill: var(--ink);+ letter-spacing: -0.02em;+}++.scale {+ font-family: var(--font-mono), monospace;+ font-size: 14px;+ fill: var(--muted);+}++.call {+ justify-self: start;+ display: inline-flex;+ align-items: center;+ max-width: 100%;+ padding: 8px 12px;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+ font-size: var(--t-12);+ color: var(--ink);+ white-space: nowrap;+ overflow: hidden;+}++.caret {+ display: inline-block;+ width: 7px;+ height: 14px;+ margin-left: 4px;+ background: var(--ink);+ animation: blink 1s steps(1) 3;+}++.iso {+ width: 100%;+ max-width: 300px;+}++.ghost {+ fill: none;+ stroke: var(--line-2);+ stroke-width: 1;+ stroke-dasharray: 4 4;+}++.drop {+ stroke: var(--line-2);+ stroke-dasharray: 2 4;+}++.faceT {+ fill: var(--accent);+ stroke: var(--ink);+ stroke-width: 1.2;+}++.faceL {+ fill: var(--ink);+ stroke: var(--ink);+}++.faceR {+ fill: var(--ink-2);+ stroke: var(--ink);+}++.float {+ transform: translateY(-6px);+}++:global(.is-in) .float {+ animation: float 900ms var(--ease-out) 300ms both;+}++.isoLabel {+ font-family: var(--font-mono), monospace;+ font-size: 14px;+ fill: var(--muted);+}++.ctx {+ width: 100%;+ max-width: 300px;+ border: 1px solid var(--ink-2);+ border-radius: var(--radius);+ background: var(--surface);+ padding: 10px;+ display: grid;+ gap: 8px;+}++.ctxHead {+ display: flex;+ justify-content: space-between;+ font-size: var(--t-12);+ color: var(--muted);+}++.ctxFull {+ color: var(--ink);+ opacity: 0;+}++.ctxMem {+ display: grid;+ gap: 2px;+ padding: 8px 10px;+ border-radius: 4px;+ background: var(--ink);+ color: var(--bg);+ font-size: var(--t-12);+}++.ctxTag {+ opacity: 0;+ color: var(--accent);+}++.ctxRows {+ position: relative;+ display: grid;+ gap: 6px;+ min-height: 132px;+ align-content: start;+}++.ctxRow {+ height: 10px;+ border-radius: 2px;+ background: var(--line-2);+ transform-origin: top left;+ opacity: 0;+}++.ctxSummary {+ position: absolute;+ left: 0;+ top: 0;+ padding: 4px 8px;+ border: 1px dashed var(--ink-2);+ border-radius: 4px;+ font-size: var(--t-12);+ color: var(--ink);+ opacity: 0;+}++:global(.is-in) .fill {+ animation: sweep 1200ms var(--ease-out) 300ms both;+}++:global(.is-in) .ctxRow {+ animation: rowIn 300ms var(--ease-out) var(--rd, 0ms) both, squash 520ms var(--ease-in-out) 1700ms forwards;+}++:global(.is-in) .ctxFull {+ animation: show 300ms var(--ease-out) 1150ms both, hide 300ms var(--ease-out) 1700ms forwards;+}++:global(.is-in) .ctxSummary {+ animation: show 400ms var(--ease-out) 1900ms both;+}++:global(.is-in) .ctxTag {+ animation: show 400ms var(--ease-out) 2200ms both;+}++:global(.is-in) .ctxMem {+ animation: nudge 520ms var(--ease-out) 2100ms both;+}++@keyframes sweep {+ to {+ stroke-dashoffset: 0;+ }+}++@keyframes rowIn {+ from {+ opacity: 0;+ transform: scaleX(0.4);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@keyframes squash {+ to {+ opacity: 0;+ transform: scaleY(0.2);+ }+}++@keyframes hide {+ to {+ opacity: 0;+ }+}++@keyframes nudge {+ 0% {+ transform: none;+ }+ 40% {+ transform: translateY(-3px);+ }+ 100% {+ transform: none;+ }+}++@keyframes show {+ from {+ opacity: 0;+ transform: translateY(-4px);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@keyframes blink {+ 50% {+ opacity: 0;+ }+}++@keyframes float {+ from {+ transform: translateY(22px);+ opacity: 0;+ }+ to {+ transform: translateY(-6px);+ opacity: 1;+ }+}++@media (max-width: 900px) {+ .row {+ grid-template-columns: minmax(0, 1fr);+ }+ .tile,+ .tile:first-child,+ .tile:last-child {+ padding: var(--s-6) 0;+ border-left: 0;+ border-top: 1px dashed var(--line-2);+ }+ .tile:first-child {+ border-top: 0;+ }+}++@media (prefers-reduced-motion: reduce) {+ .fill {+ stroke-dashoffset: 0;+ }+ .ctxRow {+ opacity: 0;+ }+ .ctxSummary,+ .ctxTag {+ opacity: 1;+ }+ :global(.is-in) .fill,+ :global(.is-in) .ctxRow,+ :global(.is-in) .ctxFull,+ :global(.is-in) .ctxSummary,+ :global(.is-in) .ctxTag,+ :global(.is-in) .ctxMem,+ .caret,+ .float {+ animation: none;+ }+}diff --git a/website/components/site/InfraTiles.tsx b/website/components/site/InfraTiles.tsxnew file mode 100644index 00000000..ec75949b--- /dev/null+++ b/website/components/site/InfraTiles.tsx@@ -0,0 +1,149 @@+import type { CSSProperties } from "react";+import { src } from "@/lib/site";+import { Reveal } from "./client";+import s from "./InfraTiles.module.css";++function Gauge() {+ const r = 120;+ const cx = 150;+ const cy = 150;+ const arc = (from: number, to: number) => {+ const a0 = Math.PI * (1 - from);+ const a1 = Math.PI * (1 - to);+ const x0 = cx + r * Math.cos(a0);+ const y0 = cy - r * Math.sin(a0);+ const x1 = cx + r * Math.cos(a1);+ const y1 = cy - r * Math.sin(a1);+ return `M${x0.toFixed(1)} ${y0.toFixed(1)} A${r} ${r} 0 0 1 ${x1.toFixed(1)} ${y1.toFixed(1)}`;+ };+ const ticks = Array.from({ length: 11 }, (_, i) => i / 10);+ return (+ <svg viewBox="0 0 300 170" className={s.gauge} aria-hidden="true">+ <path d={arc(0, 1)} className={s.track} />+ {ticks.map((t) => {+ const a = Math.PI * (1 - t);+ const x0 = cx + (r - 8) * Math.cos(a);+ const y0 = cy - (r - 8) * Math.sin(a);+ const x1 = cx + (r - 16) * Math.cos(a);+ const y1 = cy - (r - 16) * Math.sin(a);+ return <line key={t} x1={x0} y1={y0} x2={x1} y2={y1} className={s.tick} />;+ })}+ <path d={arc(0, 0.28)} className={s.fill} pathLength={1} />+ <text x="150" y="128" textAnchor="middle" className={s.readout}>+ 14 ms+ </text>+ <text x="30" y="166" className={s.scale}>+ 0+ </text>+ <text x="270" y="166" className={s.scale} textAnchor="end">+ 50 ms+ </text>+ </svg>+ );+}++function Isometric() {+ const iso = (x: number, y: number, z: number) => {+ const px = 150 + (x - y) * 0.866;+ const py = 120 + (x + y) * 0.5 - z;+ return `${px.toFixed(1)},${py.toFixed(1)}`;+ };+ const cube = (x: number, y: number, z: number, w: number, d: number, h: number) => ({+ top: [iso(x, y, z + h), iso(x + w, y, z + h), iso(x + w, y + d, z + h), iso(x, y + d, z + h)].join(" "),+ left: [iso(x, y + d, z), iso(x + w, y + d, z), iso(x + w, y + d, z + h), iso(x, y + d, z + h)].join(" "),+ right: [iso(x + w, y, z), iso(x + w, y + d, z), iso(x + w, y + d, z + h), iso(x + w, y, z + h)].join(" "),+ });+ const outer = cube(-70, -70, -40, 140, 140, 120);+ const inner = cube(-28, -28, 0, 56, 56, 46);+ const drops = [+ [-28, -28],+ [28, -28],+ [-28, 28],+ [28, 28],+ ];+ return (+ <svg viewBox="0 0 300 250" className={s.iso} aria-hidden="true">+ <polygon points={outer.left} className={s.ghost} />+ <polygon points={outer.right} className={s.ghost} />+ <polygon points={outer.top} className={s.ghost} />+ {drops.map(([x, y]) => {+ const [x1, y1] = iso(x, y, 0).split(",");+ const [x2, y2] = iso(x, y, -40).split(",");+ return <line key={`${x}${y}`} x1={x1} y1={y1} x2={x2} y2={y2} className={s.drop} />;+ })}+ <g className={s.float}>+ <polygon points={inner.left} className={s.faceL} />+ <polygon points={inner.right} className={s.faceR} />+ <polygon points={inner.top} className={s.faceT} />+ </g>+ <text x="150" y="238" textAnchor="middle" className={s.isoLabel}>+ 127.0.0.1 · your machine+ </text>+ </svg>+ );+}++const ROWS = [0.92, 0.7, 0.84, 0.6, 0.88, 0.74, 0.66, 0.8];++function Compaction() {+ return (+ <div className={s.ctx} aria-hidden="true">+ <div className={s.ctxHead}>+ <span className="mono">context window</span>+ <span className={`mono ${s.ctxFull}`}>full</span>+ </div>+ <div className={s.ctxMem}>+ <span className="mono">agentmemory</span>+ <span className={`mono ${s.ctxTag}`}>PreCompact · re-injected</span>+ </div>+ <div className={s.ctxRows}>+ {ROWS.map((w, i) => (+ <span key={i} className={s.ctxRow} style={{ width: `${w * 100}%`, "--rd": `${200 + i * 110}ms` } as CSSProperties} />+ ))}+ <span className={`mono ${s.ctxSummary}`}>compacted summary</span>+ </div>+ </div>+ );+}++export function InfraTiles() {+ return (+ <section className={s.section} aria-label="How agentmemory runs">+ <div className={`wrap ${s.row}`}>+ <Reveal className={s.tile}>+ <h3 className="mono">Recall in 14 ms</h3>+ <p>Median hybrid search over BM25, local vectors and the graph. No network round trip.</p>+ <div className={s.art}>+ <Gauge />+ </div>+ <code className={s.call}>+ memory_smart_search("auth refresh")<span className={s.caret} />+ </code>+ <a className="src" href={src.agentLife} target="_blank" rel="noreferrer">+ p50, coding-agent-life-v1 on v0.9.26+ </a>+ </Reveal>+ <Reveal className={s.tile} delay={80}>+ <h3 className="mono">Isolated on your machine</h3>+ <p>Binds to 127.0.0.1 with auth on by default. Nothing leaves unless you add a provider.</p>+ <div className={s.art}>+ <Isometric />+ </div>+ <a className="src" href="/security">+ security model+ </a>+ </Reveal>+ <Reveal className={s.tile} delay={160}>+ <h3 className="mono">Survives compaction</h3>+ <p>When your agent compacts its context, the PreCompact hook puts memory back before the next turn.</p>+ <div className={s.art}>+ <Compaction />+ </div>+ <a className="src" href="/#value">+ what your agent gets+ </a>+ </Reveal>+ </div>+ </section>+ );+}diff --git a/website/components/site/Install.module.css b/website/components/site/Install.module.cssnew file mode 100644index 00000000..d36fd297--- /dev/null+++ b/website/components/site/Install.module.css@@ -0,0 +1,244 @@+.steps {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ grid-template-areas: "one two" "three two";+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ overflow: hidden;+}++.step {+ display: grid;+ grid-template-columns: 28px minmax(0, 1fr);+ gap: var(--s-2);+ padding: var(--s-5);+ border-left: 1px solid var(--line);+ min-width: 0;+}++.step:nth-child(1) {+ grid-area: one;+ border-left: 0;+}++.step:nth-child(2) {+ grid-area: two;+}++.step:nth-child(3) {+ grid-area: three;+ border-left: 0;+ border-top: 1px solid var(--line);+}++.n {+ font-size: var(--t-12);+ color: var(--muted);+ padding-top: 4px;+}++.stepBody {+ display: grid;+ gap: var(--s-3);+ align-content: start;+ min-width: 0;+}++.stepBody h3 {+ font-size: var(--t-20);+}++.stepBody p {+ font-size: var(--t-14);+ color: var(--muted);+}++.stepBody p code {+ font-size: 0.92em;+ color: var(--ink);+}++.cmd {+ display: flex;+ align-items: flex-start;+ gap: var(--s-2);+ width: 100%;+ min-width: 0;+ padding: 10px 12px;+ border: 1px solid var(--line-2);+ border-radius: var(--radius);+ background: var(--bg);+ text-align: left;+ font-size: var(--t-12);+ line-height: 1.6;+ color: var(--ink);+ transition: border-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.cmd:hover {+ border-color: var(--ink);+}++.cmd:active {+ transform: scale(0.98);+}++.cmd code {+ flex: 1;+ min-width: 0;+ white-space: normal;+ overflow-wrap: break-word;+}++.prompt code {+ white-space: normal;+ overflow-wrap: break-word;+}++.cmd :global(.copy-state) {+ flex: none;+ font-size: var(--t-12);+ color: var(--muted);+}++.dollar {+ color: var(--faint);+ font-family: var(--font-mono), monospace;+}++.prompt code {+ color: var(--ink-2);+}++.swap {+ animation: swap var(--dur-2) var(--ease-out);+}++.picker {+ display: flex;+ flex-wrap: wrap;+ gap: 6px;+}++.chip {+ height: 28px;+ padding: 0 10px;+ border: 1px solid var(--line);+ border-radius: 999px;+ font-size: var(--t-12);+ color: var(--muted);+ transition: border-color var(--dur-1) ease, color var(--dur-1) ease, background-color var(--dur-1) ease,+ transform var(--dur-1) var(--ease-out);+}++.chip:hover {+ color: var(--ink);+ border-color: var(--line-2);+}++.chip:active {+ transform: scale(0.96);+}++.chip[aria-checked="true"] {+ background: var(--ink);+ border-color: var(--ink);+ color: var(--bg);+}++.mcp {+ margin-top: var(--s-6);+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ overflow: hidden;+ background: var(--surface);+}++.mcpHead {+ display: flex;+ flex-wrap: wrap;+ justify-content: space-between;+ align-items: center;+ gap: var(--s-4);+ padding: var(--s-5);+ border-bottom: 1px solid var(--line);+}++.mcpHead h3 {+ font-size: var(--t-20);+}++.mcpHead p {+ margin-top: 6px;+ font-size: var(--t-14);+ color: var(--muted);+ max-width: 60ch;+}++.mcpHead p code {+ font-size: 0.92em;+ color: var(--ink);+}++.mcpHead :global(.copy-state) {+ font-size: var(--t-12);+ color: var(--muted);+}++.json {+ margin: 0;+ padding: var(--s-5);+ overflow-x: auto;+ font-size: var(--t-14);+ line-height: 1.6;+ color: var(--ink);+ background: var(--bg);+}++@keyframes swap {+ from {+ opacity: 0;+ transform: translateY(3px);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@media (max-width: 960px) {+ .steps {+ grid-template-columns: minmax(0, 1fr);+ grid-template-areas: "one" "two" "three";+ }+ .step,+ .step:nth-child(3) {+ border-left: 0;+ border-top: 1px solid var(--line);+ }+ .step:nth-child(1) {+ border-top: 0;+ }+}++@media (max-width: 520px) {+ .step {+ padding: var(--s-4);+ }+ .json {+ font-size: var(--t-12);+ padding: var(--s-4);+ white-space: pre-wrap;+ overflow-wrap: anywhere;+ }+}++@media (prefers-reduced-motion: reduce) {+ .swap {+ animation: none;+ }+}diff --git a/website/components/site/Install.tsx b/website/components/site/Install.tsxnew file mode 100644index 00000000..4e0fdba5--- /dev/null+++ b/website/components/site/Install.tsx@@ -0,0 +1,110 @@+"use client";++import { useState } from "react";+import { AGENTS, AGENT_INSTALL_PROMPT, INSTALL_CMD } from "@/lib/site";+import { MCP_JSON } from "@/lib/rest";+import { CopyButton } from "./client";+import s from "./Install.module.css";++const CONNECTABLE = AGENTS.filter((a) => a.connect);++function breakable(text: string) {+ return text.split("/").flatMap((part, i, all) => (i < all.length - 1 ? [part, "/", <wbr key={i} />] : [part]));+}++export function Install() {+ const [pick, setPick] = useState(CONNECTABLE[0]?.connect ?? "claude-code");+ const connect = `agentmemory connect ${pick}`;+ return (+ <section id="install" className="section" aria-labelledby="install-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">Install</span>+ <h2 id="install-title">One command. Then pick your agent.</h2>+ <p>+ Node.js 20 or newer. The first run walks you through which agents to wire and whether to add a model provider.+ Skip it and you stay keyless.+ </p>+ </div>++ <ol className={s.steps}>+ <li className={s.step}>+ <span className={`mono ${s.n}`}>01</span>+ <div className={s.stepBody}>+ <h3>Start the memory server</h3>+ <p>Installs the pinned engine, starts the server on :3111 and the viewer on :3113.</p>+ <CopyButton text={INSTALL_CMD} label="Copy install command" className={s.cmd}>+ <span className={s.dollar} aria-hidden="true">+ $+ </span>+ <code>{breakable(INSTALL_CMD)}</code>+ </CopyButton>+ </div>+ </li>++ <li className={s.step}>+ <span className={`mono ${s.n}`}>02</span>+ <div className={s.stepBody}>+ <h3>Wire an agent</h3>+ <p>+ Writes the MCP entry for the agent you pick. Add <code>--with-hooks</code> for automatic capture where the+ agent supports it.+ </p>+ <div className={s.picker} role="radiogroup" aria-label="Agent">+ {CONNECTABLE.map((a) => (+ <button+ key={a.connect}+ type="button"+ role="radio"+ aria-checked={a.connect === pick}+ className={s.chip}+ onClick={() => setPick(a.connect as string)}+ >+ {a.name}+ </button>+ ))}+ </div>+ <CopyButton text={connect} label={`Copy ${connect}`} className={s.cmd}>+ <span className={s.dollar} aria-hidden="true">+ $+ </span>+ <code key={pick} className={s.swap}>+ {connect}+ </code>+ </CopyButton>+ </div>+ </li>++ <li className={s.step}>+ <span className={`mono ${s.n}`}>03</span>+ <div className={s.stepBody}>+ <h3>Or let your agent do it</h3>+ <p>Paste this into any coding agent. It reads the install guide and runs the steps for you.</p>+ <CopyButton text={AGENT_INSTALL_PROMPT} label="Copy agent setup prompt" className={`${s.cmd} ${s.prompt}`}>+ <code>{breakable(AGENT_INSTALL_PROMPT)}</code>+ </CopyButton>+ </div>+ </li>+ </ol>++ <div className={s.mcp}>+ <div className={s.mcpHead}>+ <div>+ <h3>Any other MCP client</h3>+ <p>+ Merge this entry into the client's <code>mcpServers</code> object. With no variables set, it talks to+ http://localhost:3111.+ </p>+ </div>+ <CopyButton text={MCP_JSON} label="Copy MCP configuration" className="btn btn-ghost">+ <span>Copy JSON</span>+ </CopyButton>+ </div>+ <pre className={s.json}>+ <code>{MCP_JSON}</code>+ </pre>+ </div>+ </div>+ </section>+ );+}diff --git a/website/components/site/Interfaces.module.css b/website/components/site/Interfaces.module.cssnew file mode 100644index 00000000..f08859b7--- /dev/null+++ b/website/components/site/Interfaces.module.css@@ -0,0 +1,195 @@+.tabs {+ display: flex;+ gap: 0;+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ padding: 4px;+ background: var(--surface);+ width: fit-content;+ max-width: 100%;+ overflow-x: auto;+ scrollbar-width: none;+ margin-bottom: var(--s-6);+}++.tabs::-webkit-scrollbar {+ display: none;+}++.tab {+ display: grid;+ gap: 2px;+ text-align: left;+ padding: 8px 16px;+ border-radius: var(--radius);+ font-size: var(--t-14);+ color: var(--muted);+ white-space: nowrap;+ transition: background-color var(--dur-1) ease, color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.tab :global(.mono) {+ font-size: var(--t-12);+ color: var(--faint);+}++.tab:hover {+ color: var(--ink);+}++.tab:active {+ transform: scale(0.97);+}++.tab[aria-selected="true"] {+ background: var(--ink);+ color: var(--bg);+}++.tab[aria-selected="true"] :global(.mono) {+ color: color-mix(in srgb, var(--bg) 65%, transparent);+}++.body {+ display: grid;+ grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);+ gap: clamp(24px, 4vw, 56px);+ align-items: start;+}++.text {+ display: grid;+ gap: var(--s-4);+ animation: in var(--dur-3) var(--ease-out) both;+}++.text h3 {+ font-size: var(--t-25);+}++.text p {+ color: var(--muted);+ font-size: var(--t-16);+}++.text ul {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ gap: 8px;+ font-size: var(--t-14);+ color: var(--ink-2);+}++.text li {+ display: flex;+ gap: 10px;+ align-items: baseline;+}++.text li::before {+ content: "";+ width: 6px;+ height: 1px;+ background: var(--ink);+ flex: none;+ transform: translateY(-4px);+}++.launch {+ justify-self: start;+ max-width: 100%;+ padding: 8px 12px;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ background: var(--surface);+ font-size: var(--t-12);+ color: var(--ink);+ overflow-wrap: anywhere;+}++.launch span {+ color: var(--faint);+}++.frame {+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ overflow: hidden;+ box-shadow: var(--shadow);+}++.chrome {+ display: flex;+ align-items: center;+ gap: 6px;+ padding: 10px 14px;+ border-bottom: 1px solid var(--line);+}++.chrome span:not(:global(.mono)) {+ width: 9px;+ height: 9px;+ border-radius: 50%;+ border: 1px solid var(--line-2);+}++.chrome :global(.mono) {+ margin-left: 10px;+ font-size: var(--t-12);+ color: var(--muted);+}++.shots {+ position: relative;+ background: var(--sunk);+}++.shot {+ position: absolute;+ inset: 0;+ width: 100%;+ height: 100%;+ object-fit: cover;+ object-position: top left;+ opacity: 0;+ transform: scale(1.01);+ filter: grayscale(1);+ transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out), filter 600ms ease;+}++.shot[data-on] {+ opacity: 1;+ transform: none;+}++@keyframes in {+ from {+ opacity: 0;+ transform: translateY(6px);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++@media (max-width: 900px) {+ .body {+ grid-template-columns: minmax(0, 1fr);+ }+ .frame {+ order: -1;+ }+}++@media (prefers-reduced-motion: reduce) {+ .text {+ animation: none;+ }+ .shot {+ transition: none;+ }+}diff --git a/website/components/site/Interfaces.tsx b/website/components/site/Interfaces.tsxnew file mode 100644index 00000000..1b69eec9--- /dev/null+++ b/website/components/site/Interfaces.tsx@@ -0,0 +1,103 @@+"use client";++import { useRef, useState, type KeyboardEvent } from "react";+import { INTERFACES } from "@/lib/rest";+import s from "./Interfaces.module.css";++export function Interfaces() {+ const [active, setActive] = useState(0);+ const [seen, setSeen] = useState<Set<number>>(() => new Set([0]));+ const tabs = useRef<Array<HTMLButtonElement | null>>([]);+ const panel = INTERFACES[active];++ const select = (i: number, focus = false) => {+ setActive(i);+ setSeen((prev) => (prev.has(i) ? prev : new Set(prev).add(i)));+ if (focus) tabs.current[i]?.focus();+ };++ const onKey = (e: KeyboardEvent<HTMLDivElement>) => {+ const n = INTERFACES.length;+ if (e.key === "ArrowRight") select((active + 1) % n, true);+ else if (e.key === "ArrowLeft") select((active - 1 + n) % n, true);+ else if (e.key === "Home") select(0, true);+ else if (e.key === "End") select(n - 1, true);+ else return;+ e.preventDefault();+ };++ return (+ <section id="interfaces" className="section" aria-labelledby="interfaces-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">Interfaces</span>+ <h2 id="interfaces-title">See your agent's memory.</h2>+ <p>Nothing is a black box. Every observation, memory and function call is visible from your browser, served from your machine.</p>+ </div>++ <div className={s.tabs} role="tablist" aria-label="agentmemory interfaces" onKeyDown={onKey}>+ {INTERFACES.map((it, i) => (+ <button+ key={it.id}+ ref={(el) => {+ tabs.current[i] = el;+ }}+ type="button"+ role="tab"+ id={`tab-${it.id}`}+ aria-selected={i === active}+ aria-controls={`panel-${it.id}`}+ tabIndex={i === active ? 0 : -1}+ className={s.tab}+ onClick={() => select(i)}+ >+ <span>{it.label}</span>+ <span className="mono">{it.port}</span>+ </button>+ ))}+ </div>++ <div className={s.body}>+ <div className={s.text} role="tabpanel" id={`panel-${panel.id}`} aria-labelledby={`tab-${panel.id}`} key={panel.id}>+ <h3>{panel.title}</h3>+ <p>{panel.body}</p>+ <ul>+ {panel.points.map((p) => (+ <li key={p}>{p}</li>+ ))}+ </ul>+ <code className={s.launch}>+ <span aria-hidden="true">$ </span>+ {panel.launch}+ </code>+ </div>+ <div className={s.frame}>+ <div className={s.chrome} aria-hidden="true">+ <span />+ <span />+ <span />+ <span className="mono">localhost{panel.port}</span>+ </div>+ <div className={s.shots} style={{ aspectRatio: "16 / 9.1" }}>+ {INTERFACES.map((it, i) =>+ seen.has(i) ? (+ <img+ key={it.id}+ src={it.img}+ alt={it.alt}+ width={it.width}+ height={it.height}+ className={s.shot}+ data-on={i === active || undefined}+ loading={i === 0 ? "lazy" : "eager"}+ decoding="async"+ />+ ) : null,+ )}+ </div>+ </div>+ </div>+ </div>+ </section>+ );+}diff --git a/website/components/site/LocalFirst.module.css b/website/components/site/LocalFirst.module.cssnew file mode 100644index 00000000..0a92749c--- /dev/null+++ b/website/components/site/LocalFirst.module.css@@ -0,0 +1,420 @@+.figure {+ display: grid;+ grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);+ gap: var(--s-5);+ align-items: stretch;+}++.boundary {+ position: relative;+ border: 1px solid var(--ink);+ border-radius: var(--radius-lg);+ background: var(--surface);+ padding: var(--s-5);+ display: flex;+ flex-direction: column;+ gap: var(--s-5);+ box-shadow: var(--shadow);+}++.boundaryHead {+ display: flex;+ justify-content: space-between;+ font-size: var(--t-12);+ color: var(--muted);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+}++.boundaryHead span:last-child {+ color: var(--ink);+ text-transform: none;+ letter-spacing: 0;+}++.flow {+ position: relative;+ padding-top: 4px;+}++.rail {+ position: absolute;+ top: 10px;+ left: 10%;+ right: 10%;+ height: 0;+}++.railLine {+ position: absolute;+ inset: 0;+ height: 1px;+ background: var(--ink);+ transform-origin: left;+ transform: scaleX(0);+}++:global(.is-in) .railLine {+ transform: scaleX(1);+ transition: transform 900ms var(--ease-out) 100ms;+}++.carrier {+ position: absolute;+ top: -4px;+ left: 0;+ width: 100%;+ height: 9px;+ transform: translateX(-100%);+ opacity: 0;+}++.packet {+ position: absolute;+ right: calc(var(--i) * 12px + 14px);+ top: 0;+ width: 9px;+ height: 9px;+ border-radius: 2px;+ background: var(--ink);+}++:global(.is-in) .carrier {+ animation: travel 1700ms var(--ease-in-out) calc(900ms + var(--i) * 520ms) both;+}++@keyframes travel {+ 0% {+ transform: translateX(-100%);+ opacity: 0;+ }+ 8% {+ opacity: 1;+ }+ 100% {+ transform: translateX(0);+ opacity: 1;+ }+}++.nodes {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ grid-template-columns: repeat(5, minmax(0, 1fr));+ gap: var(--s-3);+}++.node {+ display: grid;+ justify-items: center;+ align-content: start;+ text-align: center;+ gap: 6px;+ opacity: 0;+ transform: translateY(8px);+}++:global(.is-in) .node {+ opacity: 1;+ transform: none;+ transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);+ transition-delay: calc(var(--i) * 90ms);+}++.port {+ width: 13px;+ height: 13px;+ border-radius: 50%;+ border: 1px solid var(--ink);+ background: var(--surface);+ position: relative;+ z-index: 1;+ margin-bottom: 6px;+}++.nodeName {+ color: var(--ink);+ font-weight: 560;+ font-size: var(--t-14);+}++.nodeSub {+ font-size: var(--t-12);+ line-height: 1.45;+ color: var(--muted);+ overflow-wrap: anywhere;+}++.extras {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ margin-top: auto;+ gap: var(--s-2);+ padding-top: var(--s-4);+ border-top: 1px solid var(--line);+}++.extra {+ display: inline-flex;+ gap: 8px;+ padding: 4px 10px;+ border: 1px solid var(--line);+ border-radius: 999px;+ font-size: var(--t-12);+ color: var(--muted);+}++.extraName {+ color: var(--ink);+}++.stored {+ margin-left: auto;+ align-self: center;+ font-size: var(--t-12);+ color: var(--ink);+ opacity: 0;+}++:global(.is-in) .stored {+ opacity: 1;+ transition: opacity 500ms var(--ease-out) 3400ms;+}++.outside {+ display: grid;+ gap: var(--s-3);+ align-content: start;+ padding: var(--s-5);+ border: 1px dashed var(--line-2);+ border-radius: var(--radius-lg);+}++.outsideHead {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+}++.provider {+ display: grid;+ gap: 6px;+ padding: var(--s-3) var(--s-4);+ border: 1px dashed var(--line-2);+ border-radius: var(--radius);+ font-size: var(--t-14);+ color: var(--muted);+}++.provider p {+ line-height: 1.5;+}++.providerHead {+ display: flex;+ align-items: center;+ justify-content: space-between;+ color: var(--ink);+ font-weight: 540;+}++.off {+ font-size: var(--t-12);+ font-weight: 400;+ padding: 1px 8px;+ border: 1px solid var(--line-2);+ border-radius: 999px;+ color: var(--muted);+}++.telemetry {+ font-size: var(--t-12);+ line-height: 1.55;+ color: var(--ink);+ padding-top: var(--s-2);+}++.facts {+ list-style: none;+ margin: var(--s-6) 0 0;+ padding: 0;+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: var(--s-5);+}++.facts li {+ display: grid;+ align-content: start;+ gap: 6px;+ font-size: var(--t-14);+ line-height: 1.55;+ color: var(--ink-2);+ padding-top: var(--s-3);+ border-top: 1px solid var(--line);+}++.facts :global(.mono) {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+}++.more {+ margin-top: var(--s-5);+}++@media (max-width: 960px) {+ .figure {+ grid-template-columns: minmax(0, 1fr);+ }+}++@media (max-width: 760px) {+ .rail {+ top: 10px;+ bottom: 36px;+ left: 6px;+ right: auto;+ width: 0;+ height: auto;+ }+ .railLine {+ width: 1px;+ height: 100%;+ transform-origin: top;+ transform: scaleY(0);+ }+ :global(.is-in) .railLine {+ transform: scaleY(1);+ }+ .carrier {+ top: 0;+ left: -4px;+ width: 9px;+ height: 100%;+ transform: translateY(-100%);+ }+ .packet {+ right: auto;+ top: auto;+ bottom: calc(var(--i) * 12px + 14px);+ left: 0;+ }+ @keyframes travel {+ 0% {+ transform: translateY(-100%);+ opacity: 0;+ }+ 8% {+ opacity: 1;+ }+ 100% {+ transform: translateY(0);+ opacity: 1;+ }+ }+ .nodes {+ grid-template-columns: minmax(0, 1fr);+ gap: var(--s-4);+ padding-left: 28px;+ }+ .node {+ justify-items: start;+ text-align: left;+ gap: 2px;+ position: relative;+ }+ .port {+ position: absolute;+ left: -28px;+ top: 4px;+ margin: 0;+ }+ .facts {+ grid-template-columns: minmax(0, 1fr);+ gap: var(--s-3);+ }+ .stored {+ margin-left: 0;+ }+}++@media (prefers-reduced-motion: reduce) {+ .railLine,+ :global(.is-in) .railLine {+ transform: none;+ transition: none;+ }+ .carrier,+ :global(.is-in) .carrier {+ animation: none;+ transform: none;+ opacity: 1;+ }+ .node,+ :global(.is-in) .node,+ .stored,+ :global(.is-in) .stored,+ .write,+ :global(.is-in) .write {+ opacity: 1;+ transform: none;+ transition: none;+ }+}++.writes {+ list-style: none;+ margin: 0;+ padding: var(--s-4) 0 0;+ border-top: 1px solid var(--line);+ display: grid;+ gap: 6px;+ font-size: var(--t-12);+}++.writesHead {+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+ margin-bottom: 2px;+}++.write {+ display: grid;+ grid-template-columns: 56px minmax(0, 1fr) auto;+ gap: var(--s-3);+ color: var(--ink-2);+ opacity: 0;+ transform: translateY(4px);+}++:global(.is-in) .write {+ opacity: 1;+ transform: none;+ transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);+ transition-delay: calc(2500ms + var(--i) * 520ms);+}++.writeId {+ color: var(--muted);+}++.writeOk {+ color: var(--ink);+}++@media (max-width: 520px) {+ .write {+ grid-template-columns: 52px minmax(0, 1fr);+ }+ .writeOk {+ display: none;+ }+}diff --git a/website/components/site/LocalFirst.tsx b/website/components/site/LocalFirst.tsxnew file mode 100644index 00000000..a7cdc458--- /dev/null+++ b/website/components/site/LocalFirst.tsx@@ -0,0 +1,104 @@+import { DISK_WRITES, MACHINE_EXTRAS, MACHINE_NODES, PROVIDERS, TELEMETRY_LINE } from "@/lib/trust";+import { Reveal } from "./client";+import s from "./LocalFirst.module.css";++export function LocalFirst() {+ return (+ <section id="local" className="section" aria-labelledby="local-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">Local-first</span>+ <h2 id="local-title">Everything runs inside your machine.</h2>+ <p>+ Capture, storage, search and the viewer all bind to 127.0.0.1. Nothing crosses the boundary unless you add a+ provider yourself.+ </p>+ </div>++ <Reveal className={s.figure}>+ <div className={s.boundary}>+ <div className={s.boundaryHead}>+ <span className="mono">your machine</span>+ <span className="mono">127.0.0.1</span>+ </div>++ <div className={s.flow}>+ <div className={s.rail} aria-hidden="true">+ <span className={s.railLine} />+ {[0, 1, 2].map((i) => (+ <span key={i} className={s.carrier} style={{ ["--i" as string]: i }}>+ <span className={s.packet} />+ </span>+ ))}+ </div>+ <ol className={s.nodes}>+ {MACHINE_NODES.map((n, i) => (+ <li key={n.name} className={s.node} style={{ ["--i" as string]: i }}>+ <span className={s.port} aria-hidden="true" />+ <span className={s.nodeName}>{n.name}</span>+ <span className={`mono ${s.nodeSub}`}>{n.sub}</span>+ </li>+ ))}+ </ol>+ </div>++ <ol className={s.writes} aria-label="Writes to disk">+ <li className={`mono ${s.writesHead}`}>writes · mem:obs</li>+ {DISK_WRITES.map((w, i) => (+ <li key={w.id} className={`mono ${s.write}`} style={{ ["--i" as string]: i }}>+ <span className={s.writeId}>{w.id}</span>+ <span>{w.what}</span>+ <span className={s.writeOk}>written</span>+ </li>+ ))}+ </ol>++ <div className={s.extras}>+ {MACHINE_EXTRAS.map((x) => (+ <span key={x.name} className={`mono ${s.extra}`}>+ <span className={s.extraName}>{x.name}</span>+ {x.sub}+ </span>+ ))}+ <span className={`mono ${s.stored}`}>3 observations stored, 0 bytes sent</span>+ </div>+ </div>++ <div className={s.outside}>+ <span className={`mono ${s.outsideHead}`}>outside, optional, off by default</span>+ {PROVIDERS.map((p) => (+ <div key={p.name} className={s.provider}>+ <div className={s.providerHead}>+ <span>{p.name}</span>+ <span className={`mono ${s.off}`}>off</span>+ </div>+ <p>{p.sends}</p>+ </div>+ ))}+ <p className={`mono ${s.telemetry}`}>{TELEMETRY_LINE}</p>+ </div>+ </Reveal>++ <ul className={s.facts}>+ <li>+ <span className="mono">bind</span>+ REST, streams and viewer listen on 127.0.0.1 unless you change it.+ </li>+ <li>+ <span className="mono">auth</span>+ A random secret is generated on first start. Every bundled client reads it.+ </li>+ <li>+ <span className="mono">account</span>+ None. No sign-up, no hosted service, no analytics.+ </li>+ </ul>+ <p className={s.more}>+ <a className="src" href="/security">+ Read the security model+ </a>+ </p>+ </div>+ </section>+ );+}diff --git a/website/components/site/Logo.module.css b/website/components/site/Logo.module.cssnew file mode 100644index 00000000..d0ee16e6--- /dev/null+++ b/website/components/site/Logo.module.css@@ -0,0 +1,73 @@+.logo {+ flex: none;+ color: var(--ink);+}++.lines line {+ stroke-dasharray: 1;+ stroke-dashoffset: 0;+}++.point,+.ring {+ transform-box: fill-box;+ transform-origin: center;+}++@media (hover: hover) and (pointer: fine) {+ a:hover > .logo .lines line {+ animation: draw 420ms var(--ease-out) both;+ }+ a:hover > .logo .lines line:nth-child(2) {+ animation-delay: 60ms;+ }+ a:hover > .logo .lines line:nth-child(3) {+ animation-delay: 120ms;+ }+ a:hover > .logo .point {+ animation: pop 420ms var(--ease-out) 260ms both;+ }+ a:hover > .logo .ring {+ animation: ring 700ms var(--ease-out) 300ms both;+ }+}++@keyframes draw {+ from {+ stroke-dashoffset: 1;+ }+ to {+ stroke-dashoffset: 0;+ }+}++@keyframes pop {+ 0% {+ transform: scale(0.6);+ }+ 60% {+ transform: scale(1.15);+ }+ 100% {+ transform: scale(1);+ }+}++@keyframes ring {+ from {+ transform: scale(0.7);+ opacity: 0.8;+ }+ to {+ transform: scale(1.5);+ opacity: 0;+ }+}++@media (prefers-reduced-motion: reduce) {+ a:hover > .logo .lines line,+ a:hover > .logo .point,+ a:hover > .logo .ring {+ animation: none;+ }+}diff --git a/website/components/site/Logo.tsx b/website/components/site/Logo.tsxnew file mode 100644index 00000000..fdd415ac--- /dev/null+++ b/website/components/site/Logo.tsx@@ -0,0 +1,32 @@+import s from "./Logo.module.css";++export function Logo({ size = 24 }: { size?: number }) {+ return (+ <svg width={size} height={size} viewBox="0 0 64 64" aria-hidden="true" className={s.logo}>+ <defs>+ <linearGradient id="am-hot" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0%" stopColor="#ff7a17" />+ <stop offset="100%" stopColor="#ff8f5e" />+ </linearGradient>+ </defs>+ <rect width="64" height="64" rx="14" fill="currentColor" />+ <rect x="14" y="40" width="36" height="5" rx="2.5" fill="var(--bg)" opacity="0.22" />+ <rect x="14" y="33" width="36" height="5" rx="2.5" fill="var(--bg)" opacity="0.36" />+ <rect x="14" y="26" width="36" height="5" rx="2.5" fill="var(--bg)" opacity="0.52" />+ <rect x="14" y="19" width="36" height="5" rx="2.5" fill="url(#am-hot)" />+ <circle cx="22" cy="21.5" r="1.8" fill="#fff" />+ <circle cx="32" cy="21.5" r="1.8" fill="#fff" />+ <circle cx="42" cy="21.5" r="1.8" fill="#fff" />+ <g className={s.lines} stroke="#ff7a17" strokeWidth="1.4" strokeLinecap="round">+ <line x1="22" y1="19" x2="32" y2="12" pathLength="1" />+ <line x1="32" y1="19" x2="32" y2="12" pathLength="1" />+ <line x1="42" y1="19" x2="32" y2="12" pathLength="1" />+ </g>+ <circle className={s.point} cx="32" cy="11" r="3" fill="url(#am-hot)" />+ <circle className={s.ring} cx="32" cy="11" r="5" fill="none" stroke="#ff7a17" strokeWidth="0.9" opacity="0.5" />+ <circle cx="25" cy="28.5" r="1" fill="currentColor" opacity="0.5" />+ <circle cx="39" cy="28.5" r="1" fill="currentColor" opacity="0.5" />+ <circle cx="32" cy="35.5" r="0.8" fill="currentColor" opacity="0.4" />+ </svg>+ );+}diff --git a/website/components/site/MemoryField.module.css b/website/components/site/MemoryField.module.cssnew file mode 100644index 00000000..60668460--- /dev/null+++ b/website/components/site/MemoryField.module.css@@ -0,0 +1,79 @@+.panel {+ position: relative;+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ overflow: hidden;+ box-shadow: var(--shadow);+}++.panel::before,+.panel::after {+ content: "";+ position: absolute;+ width: 10px;+ height: 10px;+ border-color: var(--ink);+ border-style: solid;+ pointer-events: none;+ z-index: 2;+}++.panel::before {+ top: 6px;+ left: 6px;+ border-width: 1px 0 0 1px;+}++.panel::after {+ bottom: 6px;+ right: 6px;+ border-width: 0 1px 1px 0;+}++.head,+.foot {+ display: flex;+ justify-content: space-between;+ gap: var(--s-3);+ padding: 10px 16px;+ font-size: var(--t-12);+ color: var(--muted);+}++.head {+ border-bottom: 1px solid var(--line);+}++.foot {+ border-top: 1px solid var(--line);+}++.field {+ position: relative;+ height: clamp(320px, 42vw, 470px);+ background-image: radial-gradient(var(--line) 1px, transparent 1px);+ background-size: 24px 24px;+ background-position: 12px 12px;+}++.field canvas {+ position: absolute;+ inset: 0;+ cursor: crosshair;+}++@media (hover: none), (pointer: coarse) {+ .hint {+ display: none;+ }+ .field canvas {+ cursor: default;+ }+}++@media (max-width: 520px) {+ .head span:last-child {+ display: none;+ }+}diff --git a/website/components/site/MemoryField.tsx b/website/components/site/MemoryField.tsxnew file mode 100644index 00000000..696d5df0--- /dev/null+++ b/website/components/site/MemoryField.tsx@@ -0,0 +1,349 @@+"use client";++import { useEffect, useRef } from "react";+import s from "./MemoryField.module.css";++interface Dot {+ x: number;+ y: number;+ c: number;+ born: number;+ phase: number;+}++const TOPICS = [+ { name: "auth", x: 0.27, y: 0.3 },+ { name: "database", x: 0.73, y: 0.27 },+ { name: "api", x: 0.52, y: 0.55 },+ { name: "tests", x: 0.24, y: 0.76 },+ { name: "deploy", x: 0.76, y: 0.75 },+];++const QUERIES = [+ { text: "why does login fail after 15 min?", topic: 0 },+ { text: "which migration touched users?", topic: 1 },+ { text: "how do we run the e2e suite?", topic: 3 },+ { text: "what changed in the deploy script?", topic: 4 },+ { text: "where is rate limiting enforced?", topic: 2 },+];++const PER_TOPIC = 46;+const K = 5;++function rng(seed: number) {+ let a = seed;+ return () => {+ a |= 0;+ a = (a + 0x6d2b79f5) | 0;+ let t = Math.imul(a ^ (a >>> 15), 1 | a);+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;+ };+}++function gauss(r: () => number) {+ const u = Math.max(r(), 1e-6);+ return Math.sqrt(-2 * Math.log(u)) * Math.cos(2 * Math.PI * r());+}++function build(): Dot[] {+ const r = rng(20260930);+ const dots: Dot[] = [];+ for (let c = 0; c < TOPICS.length; c++) {+ for (let i = 0; i < PER_TOPIC; i++) {+ dots.push({+ x: TOPICS[c].x + gauss(r) * 0.065,+ y: TOPICS[c].y + gauss(r) * 0.06,+ c,+ born: 0,+ phase: r() * Math.PI * 2,+ });+ }+ }+ const order = dots.map((_, i) => i).sort(() => r() - 0.5);+ order.forEach((idx, n) => {+ dots[idx].born = n * 7;+ });+ return dots;+}++const easeOut = (t: number) => 1 - Math.pow(1 - Math.min(1, Math.max(0, t)), 3);++const FADE_IN_MS = 260;+const FADE_OUT_MS = 420;++function queryFade(elapsed: number, total: number): number {+ if (elapsed < FADE_IN_MS) return easeOut(elapsed / FADE_IN_MS);+ if (elapsed > total - FADE_OUT_MS) return 1 - easeOut((elapsed - (total - FADE_OUT_MS)) / FADE_OUT_MS);+ return 1;+}++export function MemoryField() {+ const wrap = useRef<HTMLDivElement | null>(null);+ const canvas = useRef<HTMLCanvasElement | null>(null);++ useEffect(() => {+ const host = wrap.current;+ const cv = canvas.current;+ if (!host || !cv) return;+ const context = cv.getContext("2d");+ if (!context) return;+ const ctx: CanvasRenderingContext2D = context;++ const dots = build();+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;+ const colors = { accent: "#ff7a17", ink: "#0a0a0a", muted: "#6b6b6b", dot: "rgba(10,10,10,.16)", bg: "#fafafa", line: "#e6e6e6" };+ const readColors = () => {+ const cs = getComputedStyle(document.documentElement);+ colors.ink = cs.getPropertyValue("--ink").trim() || colors.ink;+ colors.accent = cs.getPropertyValue("--accent").trim() || colors.accent;+ colors.muted = cs.getPropertyValue("--muted").trim() || colors.muted;+ colors.dot = cs.getPropertyValue("--dot").trim() || colors.dot;+ colors.bg = cs.getPropertyValue("--surface").trim() || colors.bg;+ colors.line = cs.getPropertyValue("--line-2").trim() || colors.line;+ };+ readColors();++ let w = 0;+ let h = 0;+ let dpr = 1;+ const resize = () => {+ const rect = host.getBoundingClientRect();+ dpr = Math.min(window.devicePixelRatio || 1, 2);+ w = rect.width;+ h = rect.height;+ cv.width = Math.round(w * dpr);+ cv.height = Math.round(h * dpr);+ cv.style.width = `${w}px`;+ cv.style.height = `${h}px`;+ if (reduce || !running) draw(performance.now());+ };++ const mono = getComputedStyle(document.body).getPropertyValue("--font-mono").trim() || "ui-monospace";+ const font = (px: number, weight = 400) => `${weight} ${px}px ${mono}, ui-monospace, monospace`;++ const start = performance.now();+ let pointer: { x: number; y: number } | null = null;+ let queryIndex = 0;+ let queryStart = start + 2100;+ const QUERY_MS = 4200;+ let running = false;+ let raf = 0;++ const px = (d: Dot) => d.x * w;+ const py = (d: Dot) => d.y * h;++ const nearest = (qx: number, qy: number, topic: number | null) => {+ const pool = topic === null ? dots : dots.filter((d) => d.c === topic);+ return pool+ .map((d) => ({ d, dist: (px(d) - qx) ** 2 + (py(d) - qy) ** 2 }))+ .sort((a, b) => a.dist - b.dist)+ .slice(0, K)+ .map((e) => e.d);+ };++ const roundRect = (x: number, y: number, rw: number, rh: number, r: number) => {+ ctx.beginPath();+ ctx.moveTo(x + r, y);+ ctx.arcTo(x + rw, y, x + rw, y + rh, r);+ ctx.arcTo(x + rw, y + rh, x, y + rh, r);+ ctx.arcTo(x, y + rh, x, y, r);+ ctx.arcTo(x, y, x + rw, y, r);+ ctx.closePath();+ };++ const label = (lines: string[], x: number, y: number, alpha: number) => {+ ctx.save();+ ctx.globalAlpha = alpha;+ ctx.font = font(12);+ const widths = lines.map((l) => ctx.measureText(l).width);+ const bw = Math.max(...widths) + 20;+ const bh = lines.length * 17 + 12;+ const bx = Math.min(Math.max(8, x - bw / 2), w - bw - 8);+ const by = Math.min(Math.max(8, y), h - bh - 8);+ roundRect(bx, by, bw, bh, 5);+ ctx.fillStyle = colors.bg;+ ctx.fill();+ ctx.strokeStyle = colors.line;+ ctx.lineWidth = 1;+ ctx.stroke();+ lines.forEach((l, i) => {+ ctx.fillStyle = i === 0 ? colors.ink : colors.muted;+ ctx.fillText(l, bx + 10, by + 20 + i * 17);+ });+ ctx.restore();+ };++ function draw(now: number) {+ const t = reduce ? 1e9 : now - start;+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);+ ctx.clearRect(0, 0, w, h);++ let hits: Dot[] = [];+ let qx = 0;+ let qy = 0;+ let qAlpha = 0;+ let qText = "";+ if (pointer) {+ qx = pointer.x;+ qy = pointer.y;+ hits = nearest(qx, qy, null);+ qAlpha = 1;+ qText = "recall: nearest memories";+ } else {+ const q = QUERIES[queryIndex % QUERIES.length];+ const elapsed = reduce ? 1200 : now - queryStart;+ if (elapsed >= 0 && elapsed < QUERY_MS) {+ const topic = TOPICS[q.topic];+ qx = (topic.x + (topic.x < 0.5 ? 0.17 : -0.17)) * w;+ qy = (topic.y + (topic.y < 0.5 ? 0.12 : -0.13)) * h;+ hits = nearest(topic.x * w, topic.y * h, q.topic);+ qAlpha = queryFade(elapsed, QUERY_MS);+ qText = `recall: "${q.text}"`;+ } else if (!reduce && elapsed >= QUERY_MS) {+ queryIndex += 1;+ queryStart = now + 900;+ }+ }+ const hitSet = new Set(hits);++ for (let i = 0; i < TOPICS.length; i++) {+ const tp = TOPICS[i];+ const shown = easeOut((t - 300 - i * 120) / 600);+ if (shown <= 0) continue;+ ctx.save();+ ctx.globalAlpha = shown;+ ctx.font = font(12, 500);+ ctx.fillStyle = colors.muted;+ const text = `${tp.name} · ${PER_TOPIC}`;+ const tw = ctx.measureText(text).width;+ const lx = Math.min(Math.max(8, tp.x * w - tw / 2), w - tw - 8);+ const ly = tp.y < 0.5 ? tp.y * h - 0.16 * h : tp.y * h + 0.17 * h;+ ctx.fillText(text, lx, Math.min(Math.max(16, ly), h - 8));+ ctx.restore();+ }++ if (qAlpha > 0) {+ ctx.save();+ ctx.strokeStyle = colors.accent;+ ctx.lineWidth = 1;+ for (const d of hits) {+ ctx.globalAlpha = 0.55 * qAlpha;+ ctx.beginPath();+ ctx.moveTo(qx, qy);+ ctx.lineTo(px(d), py(d));+ ctx.stroke();+ }+ ctx.globalAlpha = qAlpha;+ ctx.fillStyle = colors.accent;+ ctx.beginPath();+ ctx.arc(qx, qy, 4, 0, Math.PI * 2);+ ctx.fill();+ ctx.beginPath();+ ctx.arc(qx, qy, 9, 0, Math.PI * 2);+ ctx.globalAlpha = 0.25 * qAlpha;+ ctx.stroke();+ ctx.restore();+ }++ for (const d of dots) {+ const life = easeOut((t - d.born) / 520);+ if (life <= 0) continue;+ const jitter = reduce ? 0 : Math.sin(now / 1400 + d.phase) * 0.7;+ const x = px(d) + jitter - (1 - life) * 14;+ const y = py(d) + Math.cos(now / 1700 + d.phase) * (reduce ? 0 : 0.7);+ const hit = hitSet.has(d);+ ctx.globalAlpha = life * (hit ? 1 : 0.42 * (1 - 0.4 * qAlpha));+ ctx.fillStyle = hit ? colors.accent : colors.muted;+ ctx.beginPath();+ ctx.arc(x, y, hit ? 3.6 : 2.3, 0, Math.PI * 2);+ ctx.fill();+ }+ ctx.globalAlpha = 1;++ if (qAlpha > 0) {+ const below = qy < h * 0.5;+ label([qText, `${hits.length} memories → next session`], qx, below ? qy + 16 : qy - 62, qAlpha);+ }+ }++ const loop = (now: number) => {+ draw(now);+ raf = requestAnimationFrame(loop);+ };++ const play = () => {+ if (running || reduce) return;+ running = true;+ raf = requestAnimationFrame(loop);+ };+ const pause = () => {+ running = false;+ cancelAnimationFrame(raf);+ };++ const ro = new ResizeObserver(resize);+ ro.observe(host);+ resize();++ const io = new IntersectionObserver(([e]) => (e.isIntersecting ? play() : pause()));+ io.observe(host);++ const fine = window.matchMedia("(hover: hover) and (pointer: fine)").matches;+ const onMove = (e: PointerEvent) => {+ const rect = cv.getBoundingClientRect();+ pointer = { x: e.clientX - rect.left, y: e.clientY - rect.top };+ if (reduce) draw(performance.now());+ };+ const onLeave = () => {+ pointer = null;+ queryStart = performance.now() + 600;+ if (reduce) draw(performance.now());+ };+ if (fine) {+ cv.addEventListener("pointermove", onMove);+ cv.addEventListener("pointerleave", onLeave);+ }++ const onTheme = () => {+ requestAnimationFrame(() => {+ readColors();+ draw(performance.now());+ });+ };+ const mq = window.matchMedia("(prefers-color-scheme: dark)");+ mq.addEventListener("change", onTheme);+ window.addEventListener("am-theme", onTheme);+ const onVis = () => (document.hidden ? pause() : play());+ document.addEventListener("visibilitychange", onVis);++ if (reduce) draw(performance.now());++ return () => {+ pause();+ ro.disconnect();+ io.disconnect();+ cv.removeEventListener("pointermove", onMove);+ cv.removeEventListener("pointerleave", onLeave);+ mq.removeEventListener("change", onTheme);+ window.removeEventListener("am-theme", onTheme);+ document.removeEventListener("visibilitychange", onVis);+ };+ }, []);++ return (+ <div className={s.panel}>+ <div className={s.head}>+ <span className="mono">local store · your machine</span>+ <span className="mono">{TOPICS.length * PER_TOPIC} observations · {TOPICS.length} topics</span>+ </div>+ <div ref={wrap} className={s.field}>+ <canvas ref={canvas} role="img" aria-label="Observations from past sessions cluster into topics; a recall query connects to the five most relevant memories and sends them to the next session." />+ </div>+ <div className={s.foot}>+ <span className="mono">each dot is one captured tool call</span>+ <span className={`mono ${s.hint}`}>move your pointer to recall</span>+ </div>+ </div>+ );+}diff --git a/website/components/site/MemoryScroll.module.css b/website/components/site/MemoryScroll.module.cssnew file mode 100644index 00000000..01747f6c--- /dev/null+++ b/website/components/site/MemoryScroll.module.css@@ -0,0 +1,500 @@+.section {+ padding-bottom: 0;+}++.track {+ position: relative;+ height: 520vh;+}++.sticky {+ position: sticky;+ top: 60px;+ height: calc(100vh - 60px);+ height: calc(100svh - 60px);+ display: flex;+ align-items: center;+ overflow: hidden;+}++.stage {+ display: grid;+ grid-template-columns: minmax(0, 0.78fr) minmax(0, 2fr);+ gap: clamp(24px, 4vw, 56px);+ align-items: center;+}++.k {+ opacity: 0;+ will-change: opacity, transform;+}++.side {+ display: grid;+ gap: var(--s-5);+ align-content: center;+}++.steps {+ list-style: none;+ margin: 0;+ padding: 0 0 0 20px;+ display: grid;+ gap: var(--s-3);+ position: relative;+}++.step {+ display: grid;+ grid-template-columns: 28px 1fr;+ gap: var(--s-2);+ align-items: baseline;+ opacity: 0.32;+ transition: opacity var(--dur-3) var(--ease-out);+}++.step h3 {+ font-size: var(--t-20);+ letter-spacing: -0.01em;+}++.details {+ display: grid;+ padding-left: 56px;+}++.detail {+ grid-area: 1 / 1;+ font-size: var(--t-14);+ line-height: 1.55;+ color: var(--muted);+ opacity: 0;+ visibility: hidden;+ transition: opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2);+}++.detailTitle {+ display: none;+ color: var(--ink);+}++.num {+ font-size: var(--t-12);+ color: var(--muted);+}++.track[data-step="0"] .step[data-i="0"],+.track[data-step="1"] .step[data-i="1"],+.track[data-step="2"] .step[data-i="2"],+.track[data-step="3"] .step[data-i="3"],+.track[data-step="4"] .step[data-i="4"] {+ opacity: 1;+}++.track[data-step="0"] .detail[data-i="0"],+.track[data-step="1"] .detail[data-i="1"],+.track[data-step="2"] .detail[data-i="2"],+.track[data-step="3"] .detail[data-i="3"],+.track[data-step="4"] .detail[data-i="4"] {+ opacity: 1;+ visibility: visible;+ transition: opacity var(--dur-2) var(--ease-out), visibility 0s linear 0s;+}++.rail {+ position: absolute;+ left: 0;+ top: 4px;+ bottom: 4px;+ width: 1px;+ background: var(--line);+}++.rail span {+ position: absolute;+ inset: 0;+ background: var(--accent);+ transform-origin: top;+ transform: scaleY(0);+}++.figure {+ display: grid;+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);+ gap: var(--s-4);+ align-items: start;+}++.pane {+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background: var(--surface);+ box-shadow: var(--shadow);+ display: flex;+ flex-direction: column;+ min-width: 0;+}++.paneHead {+ display: flex;+ justify-content: space-between;+ gap: var(--s-3);+ padding: 10px 14px;+ border-bottom: 1px solid var(--line);+ font-size: var(--t-12);+ color: var(--muted);+ white-space: nowrap;+}++.day {+ display: grid;+}++.day > span {+ grid-area: 1 / 1;+ text-align: right;+ color: var(--ink);+}++.hookTag {+ color: var(--ink);+ overflow: hidden;+ text-overflow: clip;+}++.sessionBody {+ display: grid;+ padding: 14px;+ flex: 1;+}++.mon,+.tue {+ grid-area: 1 / 1;+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ gap: 10px;+ align-content: start;+}++.line {+ display: grid;+ grid-template-columns: 44px minmax(0, 1fr);+ column-gap: 8px;+ row-gap: 2px;+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ line-height: 1.5;+}++.user {+ color: var(--ink);+ font-weight: 600;+}++.tool {+ color: var(--ink);+ font-weight: 500;+}++.arg {+ color: var(--ink-2);+ overflow-wrap: anywhere;+}++.out {+ grid-column: 2;+ color: var(--muted);+}++.inject {+ display: grid;+ gap: 6px;+ padding: 10px 12px;+ border: 1px solid var(--accent);+ border-radius: var(--radius);+ background: var(--sunk);+ font-size: var(--t-12);+ line-height: 1.55;+ color: var(--ink);+ font-family: var(--font-mono), monospace;+}++.injectHead {+ color: var(--muted);+ font-size: var(--t-12);+}++.store {+ padding: 14px;+ display: grid;+ gap: 12px;+ align-content: start;+}++.group {+ display: grid;+ gap: 8px;+}++.groupHead {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+}++.obsList {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ gap: 6px;+}++.obs {+ display: grid;+ grid-template-columns: 52px 50px minmax(0, 1fr);+ column-gap: 8px;+ row-gap: 4px;+ align-items: baseline;+ padding: 7px 10px;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ line-height: 1.45;+}++.obsId {+ color: var(--muted);+}++.obsKind {+ color: var(--ink);+}++.obsText {+ color: var(--ink-2);+ overflow-wrap: anywhere;+}++.terms {+ grid-column: 3;+ display: flex;+ flex-wrap: wrap;+ gap: 4px;+}++.terms span {+ padding: 0 6px;+ border-radius: 3px;+ background: var(--sunk);+ border: 1px solid var(--line);+ color: var(--ink-2);+ line-height: 18px;+}++.terms .vec {+ background: var(--ink);+ border-color: var(--ink);+ color: var(--bg);+}++.indexLine {+ display: flex;+ flex-wrap: wrap;+ gap: 6px 14px;+ font-size: var(--t-12);+ color: var(--muted);+ padding: 0 2px;+}++.indexLine span:last-child {+ color: var(--ink);+}++.memory {+ display: grid;+ gap: 8px;+ padding: 12px 14px;+ border-radius: var(--radius);+ background: var(--invert-bg);+ color: var(--invert-ink);+}++.memory .groupHead {+ color: var(--accent);+}++.memory p {+ font-size: var(--t-14);+ line-height: 1.5;+}++.prov {+ font-size: var(--t-12);+ color: color-mix(in srgb, var(--invert-ink) 62%, transparent);+}++.recallLine {+ font-size: var(--t-12);+ color: var(--ink);+ display: flex;+ align-items: center;+ gap: 8px;+}++.recallLine::before {+ content: "";+ width: 18px;+ height: 1px;+ background: var(--ink);+}++@media (max-height: 820px) and (min-width: 1061px) {+ .sessionBody,+ .store {+ padding: 10px;+ }+ .store {+ gap: 8px;+ }+ .obsList {+ gap: 4px;+ }+ .obs {+ padding: 4px 8px;+ }+ .memory {+ padding: 8px 12px;+ gap: 6px;+ }+ .mon,+ .tue {+ gap: 6px;+ }+}++@media (max-width: 1060px) {+ .stage {+ grid-template-columns: minmax(0, 1fr);+ gap: var(--s-4);+ }+ .side {+ gap: var(--s-2);+ }+ .steps {+ padding-left: 14px;+ gap: 0;+ }+ .details {+ padding-left: 50px;+ }+ .step {+ grid-area: 1 / 1;+ opacity: 0;+ visibility: hidden;+ transition: opacity var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2);+ }+ .track[data-step="0"] .step[data-i="0"],+ .track[data-step="1"] .step[data-i="1"],+ .track[data-step="2"] .step[data-i="2"],+ .track[data-step="3"] .step[data-i="3"],+ .track[data-step="4"] .step[data-i="4"] {+ visibility: visible;+ transition: opacity var(--dur-2) var(--ease-out), visibility 0s linear 0s;+ }+}++@media (max-width: 760px) {+ .figure {+ grid-template-columns: minmax(0, 1fr);+ gap: 0;+ }+ .figure > .pane {+ grid-area: 1 / 1;+ transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out),+ visibility 0s linear 0s;+ }+ .track[data-step="1"] .sessionPane,+ .track[data-step="2"] .sessionPane,+ .track[data-step="3"] .sessionPane,+ .track[data-step="0"] .storePane,+ .track[data-step="4"] .storePane {+ opacity: 0;+ visibility: hidden;+ transform: translateY(10px);+ transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out),+ visibility 0s linear var(--dur-2);+ }+ .sticky {+ align-items: flex-start;+ padding-top: var(--s-3);+ }+ .sessionBody,+ .store {+ padding: 10px;+ }+ .mon,+ .tue {+ gap: 6px;+ }+ .obs {+ grid-template-columns: 48px minmax(0, 1fr);+ padding: 5px 8px;+ }+ .obsKind {+ display: none;+ }+ .terms {+ grid-column: 2;+ }+ .hookTag {+ display: none;+ }+ .detail {+ font-size: var(--t-12);+ }+}++@media (prefers-reduced-motion: reduce) {+ .track {+ height: auto;+ }+ .sticky {+ position: relative;+ top: 0;+ height: auto;+ padding: var(--s-6) 0 var(--s-9);+ }+ .steps {+ display: none;+ }+ .details {+ gap: var(--s-3);+ padding-left: 0;+ }+ .detail {+ grid-area: auto;+ opacity: 1;+ visibility: visible;+ }+ .detailTitle {+ display: inline;+ }+ .k,+ .obs,+ .memory {+ transition: none;+ will-change: auto;+ }+ .figure > .pane {+ grid-area: auto;+ opacity: 1;+ visibility: visible;+ transform: none;+ }+}diff --git a/website/components/site/MemoryScroll.tsx b/website/components/site/MemoryScroll.tsxnew file mode 100644index 00000000..b6172ced--- /dev/null+++ b/website/components/site/MemoryScroll.tsx@@ -0,0 +1,191 @@+"use client";++import { useScrollProgress } from "./client";+import s from "./MemoryScroll.module.css";++const STEPS = [+ {+ n: "01",+ title: "Capture",+ body: "Hooks fire on every prompt and tool call. Each event is posted to the local server on :3111 with a restart-safe id, or spooled to disk if the server is down.",+ },+ {+ n: "02",+ title: "Store",+ body: "Each event becomes an observation in the local store on your machine: the tool, the file, a bounded copy of the output, and the session it came from.",+ },+ {+ n: "03",+ title: "Index",+ body: "Observations are indexed twice: BM25 terms for exact words, and vectors for meaning. Local embeddings work with no API key.",+ },+ {+ n: "04",+ title: "Consolidate",+ body: "When the session ends, related observations collapse into one memory. It keeps links back to every observation it came from.",+ },+ {+ n: "05",+ title: "Recall",+ body: "The next session opens with the right memory already in context. Your agent starts in the right file instead of from zero.",+ },+];++const MON = [+ { tool: "user", arg: "login randomly fails after ~15 minutes", out: "" },+ { tool: "Read", arg: "src/auth/session.ts", out: "" },+ { tool: "Bash", arg: "npm test -- auth", out: "2 failed" },+ { tool: "Edit", arg: "src/auth/refresh.ts", out: "+18 −4" },+ { tool: "Bash", arg: "npm test -- auth", out: "41 passed" },+];++const OBS = [+ { id: "obs_01", kind: "prompt", text: "login randomly fails after ~15 minutes", terms: ["login", "fail", "15m"] },+ { id: "obs_02", kind: "Read", text: "src/auth/session.ts", terms: ["session", "token", "expiry"] },+ { id: "obs_03", kind: "Bash", text: "npm test -- auth · 2 failed", terms: ["auth", "test", "fail"] },+ { id: "obs_04", kind: "Edit", text: "src/auth/refresh.ts", terms: ["refresh", "token"] },+ { id: "obs_05", kind: "Bash", text: "npm test -- auth · 41 passed", terms: ["auth", "test", "pass"] },+];++const MEMORY = "Session tokens expire after 15 minutes. Refresh runs in src/auth/refresh.ts. Verify with npm test -- auth.";++function win(a: number, b: number, a2?: number, b2?: number, opts: { dim?: number; lift?: boolean } = {}) {+ const attrs: Record<string, string> = { "data-a": String(a), "data-b": String(b) };+ if (a2 !== undefined && b2 !== undefined) {+ attrs["data-a2"] = String(a2);+ attrs["data-b2"] = String(b2);+ }+ if (opts.dim !== undefined) attrs["data-dim"] = String(opts.dim);+ if (opts.lift) attrs["data-lift"] = "1";+ return attrs;+}++export function MemoryScroll() {+ const ref = useScrollProgress<HTMLDivElement>(STEPS.length);++ return (+ <section id="how" className={`section ${s.section}`} aria-labelledby="how-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">How it works</span>+ <h2 id="how-title">From one tool call to the next session.</h2>+ <p>Scroll through one real bug fix. Monday's session gets captured, indexed and consolidated. Tuesday's session starts already knowing it.</p>+ </div>+ </div>++ <div ref={ref} className={s.track} data-step="0">+ <div className={s.sticky}>+ <div className={`wrap ${s.stage}`}>+ <div className={s.side}>+ <ol className={s.steps}>+ {STEPS.map((st, i) => (+ <li key={st.n} className={s.step} data-i={i}>+ <span className={`mono ${s.num}`}>{st.n}</span>+ <h3>{st.title}</h3>+ </li>+ ))}+ <li className={s.rail} aria-hidden="true">+ <span data-rail="" />+ </li>+ </ol>+ <div className={s.details}>+ {STEPS.map((st, i) => (+ <p key={st.n} className={s.detail} data-i={i}>+ <span className={s.detailTitle}>+ {st.n} {st.title}.{" "}+ </span>+ {st.body}+ </p>+ ))}+ </div>+ </div>++ <div className={s.figure} aria-hidden="true">+ <div className={`${s.pane} ${s.sessionPane}`}>+ <div className={s.paneHead}>+ <span className="mono">agent session</span>+ <span className={`mono ${s.day}`}>+ <span className={`${s.k} ${s.monLabel}`} {...win(-1, 0, 0.8, 0.84)}>+ monday 14:02+ </span>+ <span className={`${s.k} ${s.tueLabel}`} {...win(0.82, 0.86)}>+ tuesday 09:41+ </span>+ </span>+ </div>+ <div className={s.sessionBody}>+ <ul className={`${s.k} ${s.mon}`} {...win(-1, 0, 0.8, 0.84)}>+ {MON.map((m, i) => (+ <li key={i} className={`${s.k} ${s.line}`} {...win(0.015 + i * 0.03, 0.04 + i * 0.03)}>+ <span className={m.tool === "user" ? s.user : s.tool}>{m.tool === "user" ? "›" : m.tool}</span>+ <span className={s.arg}>{m.arg}</span>+ {m.out && <span className={s.out}>{m.out}</span>}+ </li>+ ))}+ </ul>+ <ul className={`${s.k} ${s.tue}`} {...win(0.83, 0.87)}>+ <li className={`${s.k} ${s.line}`} {...win(0.85, 0.88)}>+ <span className={s.user}>›</span>+ <span className={s.arg}>add a "remember me" option to login</span>+ </li>+ <li className={`${s.k} ${s.inject}`} {...win(0.88, 0.92)}>+ <span className={`mono ${s.injectHead}`}>SessionStart · agentmemory context · 1 memory</span>+ <span>{MEMORY}</span>+ </li>+ <li className={`${s.k} ${s.line}`} {...win(0.93, 0.96)}>+ <span className={s.tool}>Read</span>+ <span className={s.arg}>src/auth/refresh.ts</span>+ <span className={s.out}>right file, first try</span>+ </li>+ </ul>+ </div>+ </div>++ <div className={`${s.pane} ${s.storePane}`}>+ <div className={s.paneHead}>+ <span className="mono">local store</span>+ <span className={`mono ${s.k} ${s.hookTag}`} {...win(0.02, 0.05)}>+ POST :3111/agentmemory/observe+ </span>+ </div>+ <div className={s.store}>+ <div className={s.group}>+ <span className={`mono ${s.groupHead}`}>observations · mem:obs</span>+ <ul className={s.obsList}>+ {OBS.map((o, i) => (+ <li key={o.id} className={`${s.k} ${s.obs}`} {...win(0.2 + i * 0.03, 0.23 + i * 0.03, 0.66, 0.74, { dim: 0.62 })}>+ <span className={s.obsId}>{o.id}</span>+ <span className={s.obsKind}>{o.kind}</span>+ <span className={s.obsText}>{o.text}</span>+ <span className={`${s.k} ${s.terms}`} {...win(0.42 + i * 0.025, 0.45 + i * 0.025)}>+ {o.terms.map((t) => (+ <span key={t}>{t}</span>+ ))}+ <span className={s.vec}>vec</span>+ </span>+ </li>+ ))}+ </ul>+ </div>+ <div className={`${s.k} ${s.indexLine}`} {...win(0.54, 0.58)}>+ <span className="mono">bm25 · 10 terms</span>+ <span className="mono">vectors · 5 × 384d</span>+ <span className="mono">searchable</span>+ </div>+ <div className={`${s.k} ${s.memory}`} {...win(0.66, 0.74, undefined, undefined, { lift: true })}>+ <span className={`mono ${s.groupHead}`}>memory · auth</span>+ <p>{MEMORY}</p>+ <span className={`mono ${s.prov}`}>from obs_02 · obs_03 · obs_04 · obs_05</span>+ </div>+ <div className={`${s.k} ${s.recallLine}`} {...win(0.86, 0.9)}>+ <span className="mono">recalled into tuesday's session</span>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ </section>+ );+}diff --git a/website/components/site/Nav.module.css b/website/components/site/Nav.module.cssnew file mode 100644index 00000000..cfe3e824--- /dev/null+++ b/website/components/site/Nav.module.css@@ -0,0 +1,116 @@+.bar {+ position: sticky;+ top: 0;+ z-index: 50;+ background: var(--bg);+ backdrop-filter: saturate(1.4) blur(12px);+ -webkit-backdrop-filter: saturate(1.4) blur(12px);+ border-bottom: 1px solid var(--line);+}++.inner {+ height: 60px;+ display: flex;+ align-items: center;+ gap: var(--s-6);+}++.brand {+ display: inline-flex;+ align-items: center;+ gap: 10px;+ color: var(--ink);+ font-weight: 600;+ font-size: var(--t-16);+ letter-spacing: -0.01em;+}++.links {+ display: flex;+ gap: var(--s-5);+ font-size: var(--t-14);+ color: var(--muted);+}++.links a {+ transition: color var(--dur-1) ease;+}++.links a:hover {+ color: var(--ink);+}++.actions {+ margin-left: auto;+ display: flex;+ align-items: center;+ gap: var(--s-2);+}++.star {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ height: 36px;+ padding: 0 12px;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ color: var(--ink);+ font-size: var(--t-14);+ transition: border-color var(--dur-1) ease;+}++.star:hover {+ border-color: var(--line-2);+}++.icon {+ width: 36px;+ height: 36px;+ display: grid;+ place-items: center;+ border: 1px solid var(--line);+ border-radius: var(--radius);+ color: var(--ink);+ transition: border-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.icon:hover {+ border-color: var(--line-2);+}++.icon:active {+ transform: scale(0.94);+}++.cta {+ height: 36px;+ padding: 0 14px;+}++@media (max-width: 860px) {+ .links {+ display: none;+ }+}++@media (max-width: 420px) {+ .inner {+ gap: var(--s-3);+ }+ .brand span {+ font-size: var(--t-14);+ }+ .star {+ padding: 0 8px;+ }+ .cta {+ padding: 0 12px;+ }+}++@media (max-width: 350px) {+ .brand span {+ display: none;+ }+}diff --git a/website/components/site/Nav.tsx b/website/components/site/Nav.tsxnew file mode 100644index 00000000..8edd1569--- /dev/null+++ b/website/components/site/Nav.tsx@@ -0,0 +1,42 @@+import Link from "next/link";+import { NAV, REPO_URL } from "@/lib/site";+import { compact, getProjectMeta } from "@/lib/meta";+import { ThemeToggle } from "./client";+import { Logo } from "./Logo";+import s from "./Nav.module.css";++export function Nav() {+ const meta = getProjectMeta();+ return (+ <header className={s.bar}>+ <div className={`wrap ${s.inner}`}>+ <Link href="/" className={s.brand} aria-label="agentmemory home">+ <Logo />+ <span>agentmemory</span>+ </Link>+ <nav className={s.links} aria-label="Primary">+ {NAV.map((n) => (+ <Link key={n.href} href={n.href}>+ {n.label}+ </Link>+ ))}+ </nav>+ <div className={s.actions}>+ <a className={s.star} href={REPO_URL} target="_blank" rel="noreferrer">+ <svg width="14" height="14" viewBox="0 0 16 16" aria-hidden="true">+ <path+ fill="currentColor"+ d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"+ />+ </svg>+ <span className="mono">{compact(meta.stars)}</span>+ </a>+ <ThemeToggle className={s.icon} />+ <Link href="/#install" className={`btn btn-solid ${s.cta}`}>+ Install+ </Link>+ </div>+ </div>+ </header>+ );+}diff --git a/website/components/site/Proof.module.css b/website/components/site/Proof.module.cssnew file mode 100644index 00000000..bb2fa150--- /dev/null+++ b/website/components/site/Proof.module.css@@ -0,0 +1,71 @@+.strip {+ border-top: 1px solid var(--line);+ border-bottom: 1px solid var(--line);+ background: var(--surface);+}++.list {+ list-style: none;+ margin: 0 auto;+ display: grid;+ grid-template-columns: repeat(4, minmax(0, 1fr));+}++.item {+ border-left: 1px solid var(--line);+}++.item:first-child {+ border-left: 0;+}++.item a {+ display: grid;+ gap: 4px;+ padding: var(--s-6) var(--s-5);+ transition: background-color var(--dur-1) ease;+}++@media (min-width: 901px) {+ .item:first-child a {+ padding-left: 0;+ }+}++.item a:hover {+ background: var(--sunk);+}++.value {+ font-size: var(--t-31);+ font-weight: 560;+ letter-spacing: var(--track-head);+ color: var(--ink);+ font-variant-numeric: tabular-nums;+}++.label {+ font-size: var(--t-12);+ color: var(--muted);+ letter-spacing: 0.02em;+}++@media (max-width: 900px) {+ .list {+ grid-template-columns: repeat(2, minmax(0, 1fr));+ padding: 0;+ }+ .item {+ border-left: 0;+ border-top: 1px solid var(--line);+ }+ .item:nth-child(2n) {+ border-left: 1px solid var(--line);+ }+ .item:nth-child(-n + 2) {+ border-top: 0;+ }+ .item a {+ padding: var(--s-5) var(--gutter);+ }+}diff --git a/website/components/site/Proof.tsx b/website/components/site/Proof.tsxnew file mode 100644index 00000000..a4cdedd1--- /dev/null+++ b/website/components/site/Proof.tsx@@ -0,0 +1,28 @@+import { AGENTS, src } from "@/lib/site";+import { compact, getProjectMeta } from "@/lib/meta";+import { Reveal } from "./client";+import s from "./Proof.module.css";++export function Proof() {+ const m = getProjectMeta();+ const items = [+ { value: compact(m.stars), label: "GitHub stars", href: src.stars },+ { value: compact(m.npmAllTime), label: "npm installs, all time", href: src.npm },+ { value: String(m.contributors), label: "contributors", href: src.contributors },+ { value: String(AGENTS.length), label: "coding agents supported", href: "/#agents" },+ ];+ return (+ <section className={s.strip} aria-label="Project numbers">+ <ul className={`wrap ${s.list}`}>+ {items.map((it, i) => (+ <Reveal as="li" key={it.label} delay={i * 60} className={s.item}>+ <a href={it.href} {...(it.href.startsWith("http") ? { target: "_blank", rel: "noreferrer" } : {})}>+ <span className={s.value}>{it.value}</span>+ <span className={`mono ${s.label}`}>{it.label}</span>+ </a>+ </Reveal>+ ))}+ </ul>+ </section>+ );+}diff --git a/website/components/site/UseCases.module.css b/website/components/site/UseCases.module.cssnew file mode 100644index 00000000..2572ab44--- /dev/null+++ b/website/components/site/UseCases.module.css@@ -0,0 +1,747 @@+.tabs {+ display: flex;+ flex-wrap: wrap;+ gap: var(--s-2);+ margin-bottom: var(--s-5);+}++.tab {+ display: inline-flex;+ align-items: center;+ gap: 10px;+ height: 40px;+ padding: 0 16px;+ border: 1px solid var(--line);+ border-radius: 999px;+ font-size: var(--t-14);+ color: var(--muted);+ background: var(--surface);+ transition: color var(--dur-1) ease, border-color var(--dur-1) ease, background-color var(--dur-1) ease,+ transform var(--dur-1) var(--ease-out);+}++.tab:active {+ transform: scale(0.97);+}++.num {+ font-size: var(--t-12);+ color: var(--faint);+}++.tab[aria-selected="true"] {+ background: var(--ink);+ border-color: var(--ink);+ color: var(--bg);+}++.tab[aria-selected="true"] .num {+ color: color-mix(in srgb, var(--bg) 60%, transparent);+}++@media (hover: hover) and (pointer: fine) {+ .tab:hover {+ color: var(--ink);+ border-color: var(--line-2);+ }+ .tab[aria-selected="true"]:hover {+ color: var(--bg);+ }+}++.panels {+ display: grid;+}++.panels > * {+ grid-area: 1 / 1;+}++.sizer {+ visibility: hidden;+}++.panel {+ display: flex;+ flex-direction: column;+ border: 1px solid var(--line);+ border-radius: var(--radius-lg);+ background:+ radial-gradient(var(--line) 1px, transparent 1px) 12px 12px / 24px 24px,+ var(--sunk);+ overflow: hidden;+}++.why {+ padding: var(--s-5) var(--s-5) 0;+ font-size: var(--t-20);+ color: var(--ink);+ font-weight: 520;+ max-width: 46em;+ animation: up 420ms var(--ease-out) both;+}++.stage {+ padding: var(--s-5);+ flex: 1;+ min-height: 380px;+ display: grid;+ align-content: center;+}++.without {+ display: flex;+ flex-wrap: wrap;+ gap: 6px 14px;+ align-items: baseline;+ padding: var(--s-4) var(--s-5);+ border-top: 1px solid var(--line);+ background: var(--surface);+ font-size: var(--t-14);+ color: var(--muted);+}++.without .mono {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--faint);+}++.note {+ margin-top: var(--s-4);+ font-size: var(--t-12);+ color: var(--muted);+}++.step {+ animation: up 320ms var(--ease-out) both;+ animation-delay: calc(100ms + var(--i, 0) * 130ms);+}++@keyframes up {+ from {+ opacity: 0;+ transform: translateY(8px);+ }+ to {+ opacity: 1;+ transform: none;+ }+}++.win {+ border: 1px solid var(--line-2);+ border-radius: var(--radius-lg);+ background: var(--surface);+ box-shadow: var(--shadow);+ overflow: hidden;+ min-width: 0;+ display: flex;+ flex-direction: column;+}++.term {+ --invert-bg: #0a0a0a;+ --invert-ink: #f2f2f2;+ background: var(--invert-bg);+ border-color: var(--invert-bg);+ color: var(--invert-ink);+}++:global(:root[data-theme="dark"]) .term {+ --invert-bg: #161616;+ border-color: var(--line-2);+}++@media (prefers-color-scheme: dark) {+ :global(:root:not([data-theme="light"])) .term {+ --invert-bg: #161616;+ border-color: var(--line-2);+ }+}++.dim {+ opacity: 0.62;+}++.bar {+ display: flex;+ align-items: center;+ gap: 8px;+ min-height: 34px;+ padding-top: 6px;+ padding-bottom: 6px;+ padding: 0 12px;+ border-bottom: 1px solid var(--line);+}++.term .bar {+ border-bottom-color: color-mix(in srgb, var(--invert-ink) 14%, transparent);+}++.lights {+ display: inline-flex;+ gap: 5px;+ margin-right: 4px;+}++.lights i {+ width: 9px;+ height: 9px;+ border-radius: 50%;+ border: 1px solid currentColor;+ opacity: 0.35;+}++.barLogo {+ width: 14px;+ height: 14px;+ border-radius: 3px;+}++.barTitle {+ font-size: var(--t-12);+ opacity: 0.7;+ min-width: 0;+ overflow-wrap: anywhere;+ line-height: 1.3;+}++.winBody {+ padding: 14px;+ display: grid;+ gap: 9px;+ align-content: start;+ flex: 1;+}++.tl {+ font-family: var(--font-mono), monospace;+ font-size: var(--t-12);+ line-height: 1.6;+ overflow-wrap: anywhere;+}++.term .tl {+ font-size: 13px;+}++.ccPrompt {+ font-weight: 700;+ margin-right: 6px;+}++.ccDot {+ margin-right: 6px;+}++.ccOut {+ padding-left: 18px;+ opacity: 0.68;+}++.muted {+ opacity: 0.6;+}++.hookLine {+ margin-top: 4px;+ padding-top: 9px;+ border-top: 1px dashed color-mix(in srgb, var(--invert-ink) 26%, transparent);+ opacity: 0.8;+}++.mem {+ display: grid;+ gap: 6px;+ padding: 10px 12px;+ border-radius: var(--radius);+ font-size: var(--t-14);+ line-height: 1.5;+ background: var(--surface);+ color: var(--ink);+ border: 1px solid var(--line-2);+}++.term .mem {+ background: color-mix(in srgb, var(--invert-ink) 9%, transparent);+ color: var(--invert-ink);+ border-color: color-mix(in srgb, var(--invert-ink) 30%, transparent);+}++.memTag {+ font-size: var(--t-12);+ color: var(--accent);+}++.welcome {+ display: grid;+ gap: 2px;+ padding: 10px 12px;+ border: 1px solid color-mix(in srgb, var(--invert-ink) 30%, transparent);+ border-radius: var(--radius);+ font-family: var(--font-mono), monospace;+ font-size: 13px;+}++.single {+ max-width: 760px;+ margin: 0 auto;+}++.agents {+ display: grid;+ grid-template-columns: minmax(0, 1fr) minmax(170px, 0.62fr) minmax(0, 1.15fr);+ gap: var(--s-4);+ align-items: center;+}++.hub {+ position: relative;+ display: grid;+ align-items: center;+ min-height: 160px;+}++.hub::before {+ content: "";+ position: absolute;+ left: -16px;+ right: -16px;+ top: 50%;+ border-top: 1px dashed var(--line-2);+}++.hubCard {+ position: relative;+ z-index: 1;+ display: grid;+ gap: 6px;+ padding: 12px;+ border-radius: var(--radius);+ background: var(--invert-bg);+ color: var(--invert-ink);+ font-size: var(--t-14);+ line-height: 1.45;+}++.hubHead {+ font-size: var(--t-12);+ color: var(--accent);+}++.hubFrom {+ font-size: var(--t-12);+ opacity: 0.66;+}++.packet {+ position: absolute;+ top: 50%;+ width: 8px;+ height: 8px;+ margin-top: -4px;+ border-radius: 50%;+ background: var(--accent);+ z-index: 2;+ opacity: 0;+}++.packetIn {+ left: -16px;+ animation: packetIn 700ms var(--ease-in-out) 560ms both;+}++.packetOut {+ right: -16px;+ animation: packetOut 700ms var(--ease-in-out) 860ms both;+}++@keyframes packetIn {+ 0% {+ opacity: 1;+ transform: translateX(0);+ }+ 100% {+ opacity: 0;+ transform: translateX(40px);+ }+}++@keyframes packetOut {+ 0% {+ opacity: 1;+ transform: translateX(-40px);+ }+ 100% {+ opacity: 0;+ transform: translateX(0);+ }+}++.otherCol {+ display: grid;+ gap: var(--s-2);+ min-width: 0;+}++.switch {+ justify-self: end;+ display: inline-flex;+ padding: 3px;+ border: 1px solid var(--line);+ border-radius: 999px;+ background: var(--surface);+}++.switch button {+ height: 28px;+ padding: 0 12px;+ border-radius: 999px;+ font-size: var(--t-12);+ color: var(--muted);+ transition: background-color var(--dur-1) ease, color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);+}++.switch button:active {+ transform: scale(0.96);+}++.switch button[aria-pressed="true"] {+ background: var(--ink);+ color: var(--bg);+}++.cursor {+ display: grid;+ grid-template-columns: 112px minmax(0, 1fr);+ gap: 12px;+}++.files {+ display: grid;+ gap: 4px;+ align-content: start;+ padding-right: 10px;+ border-right: 1px solid var(--line);+ font-size: var(--t-12);+ color: var(--muted);+ white-space: pre;+}++.fileOn {+ color: var(--ink);+ font-weight: 600;+}++.chat {+ display: grid;+ gap: 8px;+ align-content: start;+}++.bubble {+ justify-self: end;+ padding: 8px 11px;+ border-radius: 10px;+ background: var(--sunk);+ border: 1px solid var(--line);+ font-family: var(--font-sans), sans-serif;+ font-size: var(--t-14);+ color: var(--ink);+}++.toolChip {+ justify-self: start;+ padding: 2px 8px;+ border-radius: 4px;+ border: 1px solid var(--accent);+ color: var(--accent-ink);+}++.reply {+ font-family: var(--font-sans), sans-serif;+ font-size: var(--t-14);+ color: var(--ink-2);+}++.handoff {+ display: grid;+ grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.2fr);+ gap: var(--s-4);+ align-items: center;+}++.night {+ display: grid;+ justify-items: center;+ gap: 6px;+ font-size: var(--t-12);+ color: var(--muted);+}++.night::before {+ content: "";+ width: 56px;+ border-top: 1px dashed var(--line-2);+}++.lesson {+ display: grid;+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);+ gap: var(--s-6);+ align-items: center;+}++.timeline {+ list-style: none;+ margin: 0;+ padding: 0 0 0 18px;+ display: grid;+ gap: var(--s-5);+ border-left: 1px solid var(--line-2);+}++.node {+ position: relative;+ display: grid;+ gap: 4px;+}++.node::before {+ content: "";+ position: absolute;+ left: -23px;+ top: 4px;+ width: 9px;+ height: 9px;+ border-radius: 50%;+ background: var(--ink);+}++.when {+ font-size: var(--t-12);+ letter-spacing: var(--track-mono);+ text-transform: uppercase;+ color: var(--muted);+}++.say {+ font-size: var(--t-16);+ color: var(--ink);+ font-weight: 520;+}++.conf {+ display: flex;+ align-items: center;+ gap: 10px;+ font-size: var(--t-12);+ color: var(--muted);+}++.meter {+ width: 120px;+ height: 6px;+ border-radius: 3px;+ background: var(--line);+ overflow: hidden;+}++.meter span {+ display: block;+ height: 100%;+ width: 90%;+ background: var(--ink);+ transform-origin: left;+ animation: grow 900ms var(--ease-out) 700ms both;+}++@keyframes grow {+ from {+ transform: scaleX(0.2);+ }+ to {+ transform: scaleX(1);+ }+}++.editor {+ position: relative;+ display: grid;+ gap: 2px;+ padding-bottom: 150px;+}++.codeLine {+ display: grid;+ grid-template-columns: 30px minmax(0, 1fr) auto;+ gap: 10px;+ align-items: baseline;+ padding: 1px 6px;+ border-radius: 4px;+}++.codeOn {+ background: var(--sunk);+ outline: 1px solid var(--line-2);+}++.ln {+ font-size: var(--t-12);+ color: var(--faint);+ text-align: right;+}++.code {+ font-size: 13px;+ color: var(--ink-2);+ white-space: pre;+ overflow: hidden;+}++.blame {+ font-size: var(--t-12);+ color: var(--muted);+}++.pop {+ position: absolute;+ left: 46px;+ right: 8px;+ bottom: 0;+ display: grid;+ gap: 6px;+ padding: 12px 14px;+ border-radius: var(--radius);+ background: var(--invert-bg);+ color: var(--invert-ink);+ font-size: var(--t-14);+ line-height: 1.5;+ box-shadow: var(--shadow);+}++.popCmd {+ font-size: var(--t-12);+ font-weight: 600;+}++.importGrid {+ display: grid;+ grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);+ gap: var(--s-6);+ align-items: center;+}++.quote {+ margin: 0;+ display: grid;+ gap: var(--s-3);+}++.quote blockquote {+ margin: 0;+ font-size: var(--t-20);+ line-height: 1.45;+ color: var(--ink);+ font-weight: 500;+ letter-spacing: -0.01em;+}++.quote figcaption {+ font-size: var(--t-12);+ color: var(--muted);+}++@media (max-width: 980px) {+ .agents,+ .handoff,+ .lesson,+ .importGrid {+ grid-template-columns: minmax(0, 1fr);+ }+ .hub {+ min-height: 0;+ padding: 18px 0;+ }+ .hub::before {+ left: 50%;+ right: auto;+ top: 0;+ bottom: 0;+ border-top: 0;+ border-left: 1px dashed var(--line-2);+ }+ .packet {+ display: none;+ }+ .night::before {+ width: 0;+ height: 28px;+ border-top: 0;+ border-left: 1px dashed var(--line-2);+ }+}++@media (max-width: 640px) {+ .sizer {+ display: none;+ }+ .stage {+ padding: var(--s-4);+ min-height: 0;+ }+ .why {+ padding: var(--s-4) var(--s-4) 0;+ font-size: var(--t-16);+ }+ .without {+ padding: var(--s-4);+ }+ .tabs {+ flex-wrap: nowrap;+ overflow-x: auto;+ scroll-snap-type: x mandatory;+ scrollbar-width: none;+ margin-left: calc(-1 * var(--gutter));+ margin-right: calc(-1 * var(--gutter));+ padding: 0 var(--gutter) 4px;+ }+ .tabs::-webkit-scrollbar {+ display: none;+ }+ .tab {+ flex: 0 0 auto;+ scroll-snap-align: start;+ white-space: nowrap;+ }+ .cursor {+ grid-template-columns: minmax(0, 1fr);+ }+ .files {+ display: none;+ }+ .code {+ font-size: var(--t-12);+ }+ .editor {+ padding-bottom: 0;+ }+ .pop {+ position: relative;+ left: 0;+ right: 0;+ margin-top: 10px;+ }+}++@media (prefers-reduced-motion: reduce) {+ .step,+ .why,+ .meter span,+ .packetIn,+ .packetOut {+ animation: none;+ }+}diff --git a/website/components/site/UseCases.tsx b/website/components/site/UseCases.tsxnew file mode 100644index 00000000..80d3644a--- /dev/null+++ b/website/components/site/UseCases.tsx@@ -0,0 +1,440 @@+"use client";++import { useRef, useState, type CSSProperties, type KeyboardEvent, type ReactNode } from "react";+import s from "./UseCases.module.css";++const LOGO = {+ claude: "https://github.com/anthropics.png",+ cursor: "https://svgl.app/library/cursor_light.svg",+ codex: "https://github.com/openai.png",+};++function st(i: number): CSSProperties {+ return { "--i": i } as CSSProperties;+}++function Win({+ title,+ logo,+ kind = "term",+ dim,+ className,+ children,+}: {+ title: string;+ logo?: string;+ kind?: "term" | "app";+ dim?: boolean;+ className?: string;+ children: ReactNode;+}) {+ return (+ <div className={`${s.win} ${kind === "app" ? s.app : s.term} ${dim ? s.dim : ""} ${className ?? ""}`}>+ <div className={s.bar}>+ <span className={s.lights} aria-hidden="true">+ <i />+ <i />+ <i />+ </span>+ {logo && <img src={logo} alt="" width={14} height={14} className={s.barLogo} />}+ <span className={`mono ${s.barTitle}`}>{title}</span>+ </div>+ <div className={s.winBody}>{children}</div>+ </div>+ );+}++function Mem({ tag, children, i }: { tag: string; children: ReactNode; i: number }) {+ return (+ <div className={`${s.step} ${s.mem}`} style={st(i)}>+ <span className={`mono ${s.memTag}`}>{tag}</span>+ <span>{children}</span>+ </div>+ );+}++function L({ i, children, className }: { i: number; children: ReactNode; className?: string }) {+ return (+ <div className={`${s.step} ${s.tl} ${className ?? ""}`} style={st(i)}>+ {children}+ </div>+ );+}++function AgentsScene() {+ const [other, setOther] = useState<"cursor" | "codex">("cursor");+ return (+ <div className={s.agents}>+ <Win title="claude-code · monday 14:02" logo={LOGO.claude}>+ <L i={0}>+ <span className={s.ccPrompt}>></span> fix login failing after ~15 minutes+ </L>+ <L i={1}>+ <span className={s.ccDot}>⏺</span> Edit(src/auth/refresh.ts)+ </L>+ <L i={2}>+ <span className={s.ccDot}>⏺</span> Bash(npm test -- auth)+ </L>+ <L i={3} className={s.ccOut}>+ ⎿ 41 passed+ </L>+ <L i={4} className={s.hookLine}>+ PostToolUse → agentmemory+ </L>+ </Win>++ <div className={s.hub} aria-hidden="true">+ <span className={`${s.packet} ${s.packetIn}`} />+ <div className={`${s.step} ${s.hubCard}`} style={st(5)}>+ <span className={`mono ${s.hubHead}`}>agentmemory · 127.0.0.1:3111</span>+ <span>Session tokens expire after 15 minutes. Refresh runs in src/auth/refresh.ts.</span>+ <span className={`mono ${s.hubFrom}`}>captured from claude-code</span>+ </div>+ <span className={`${s.packet} ${s.packetOut}`} />+ </div>++ <div className={s.otherCol}>+ <div className={s.switch} role="group" aria-label="Second agent">+ <button type="button" aria-pressed={other === "cursor"} onClick={() => setOther("cursor")}>+ Cursor+ </button>+ <button type="button" aria-pressed={other === "codex"} onClick={() => setOther("codex")}>+ Codex+ </button>+ </div>+ {other === "cursor" ? (+ <Win title="cursor · tuesday 10:15" logo={LOGO.cursor} kind="app" key="cursor">+ <div className={s.cursor}>+ <div className={s.files} aria-hidden="true">+ <span className="mono">src</span>+ <span className="mono"> auth</span>+ <span className={`mono ${s.fileOn}`}> refresh.ts</span>+ <span className="mono"> session.ts</span>+ </div>+ <div className={s.chat}>+ <L i={6} className={s.bubble}>+ why does login fail after 15 minutes?+ </L>+ <L i={7} className={s.toolChip}>+ memory_recall · 1 result+ </L>+ <L i={8} className={s.reply}>+ Fixed Monday in refresh.ts, from a Claude Code session. This route skips that middleware.+ </L>+ </div>+ </div>+ </Win>+ ) : (+ <Win title="codex · tuesday 10:15" logo={LOGO.codex} key="codex">+ <L i={6}>+ <span className={s.ccPrompt}>›</span> why does login fail after 15 minutes?+ </L>+ <L i={7} className={s.ccOut}>+ • Called agentmemory.memory_recall+ </L>+ <L i={8}>+ Fixed Monday in refresh.ts, from a Claude Code session. This route skips that middleware.+ </L>+ </Win>+ )}+ </div>+ </div>+ );+}++function ContextScene() {+ return (+ <div className={s.single}>+ <Win title="claude-code · ~/acme-api" logo={LOGO.claude}>+ <div className={`${s.step} ${s.welcome}`} style={st(0)}>+ <span>✻ Welcome to Claude Code</span>+ <span className={s.muted}>cwd: ~/acme-api</span>+ </div>+ <Mem tag="SessionStart · agentmemory · 3 memories" i={1}>+ pnpm workspace. Tests run with pnpm vitest run. Never edit src/generated/, it is built from the schema.+ </Mem>+ <L i={2}>+ <span className={s.ccPrompt}>></span> run the tests+ </L>+ <L i={3}>+ <span className={s.ccDot}>⏺</span> Bash(pnpm vitest run)+ </L>+ <L i={4} className={s.ccOut}>+ ⎿ 212 passed+ </L>+ </Win>+ </div>+ );+}++function HandoffScene() {+ return (+ <div className={s.handoff}>+ <Win title="monday 18:40" logo={LOGO.claude} dim>+ <L i={0}>+ <span className={s.ccDot}>⏺</span> Edit(routes/orders.ts)+ </L>+ <L i={1} className={s.ccOut}>+ ⎿ 3 of 5 routes moved to refresh tokens+ </L>+ <L i={2} className={s.muted}>+ laptop closed. session ended.+ </L>+ </Win>+ <div className={`${s.step} ${s.night}`} style={st(3)}>+ <span className="mono">overnight</span>+ </div>+ <Win title="tuesday 09:12" logo={LOGO.claude}>+ <L i={4}>+ <span className={s.ccPrompt}>></span> /handoff+ </L>+ <Mem tag="last session · monday 18:40" i={5}>+ Moving auth to refresh tokens. 3 of 5 routes done. Open question: cookie or header for the refresh token?+ </Mem>+ <L i={6}>+ Next up is routes/billing.ts. Before I start: cookie or header?+ </L>+ </Win>+ </div>+ );+}++function LessonScene() {+ return (+ <div className={s.lesson}>+ <ol className={s.timeline}>+ <li className={`${s.step} ${s.node}`} style={st(0)}>+ <span className={`mono ${s.when}`}>week 1</span>+ <span className={s.say}>"Never mock the database in integration tests."</span>+ <span className={s.muted}>you correct the agent once</span>+ </li>+ <li className={`${s.step} ${s.node}`} style={st(1)}>+ <span className={`mono ${s.when}`}>saved</span>+ <span className={s.say}>/lesson</span>+ <span className={s.conf}>+ <span className="mono">confidence</span>+ <span className={s.meter}>+ <span />+ </span>+ </span>+ </li>+ <li className={`${s.step} ${s.node}`} style={st(2)}>+ <span className={`mono ${s.when}`}>week 3</span>+ <span className={s.say}>"write an integration test for checkout"</span>+ <span className={s.muted}>similar work starts</span>+ </li>+ </ol>+ <Win title="claude-code · week 3" logo={LOGO.claude}>+ <Mem tag="lesson · resurfaced before similar work" i={3}>+ Never mock the database in integration tests. Use the test container.+ </Mem>+ <L i={4}>+ <span className={s.ccDot}>⏺</span> Write(test/checkout.test.ts)+ </L>+ <L i={5} className={s.ccOut}>+ ⎿ uses the test container, no database mock+ </L>+ </Win>+ </div>+ );+}++const CODE = [+ "export async function refresh(req, res, next) {",+ " const token = readSession(req);",+ " if (!token) return next();",+ " if (expiresWithin(token, 60)) {",+ " await rotate(token);",+ " }",+ " return next();",+ "}",+];++function WhyScene() {+ return (+ <div className={s.single}>+ <Win title="src/auth/refresh.ts" kind="app">+ <div className={s.editor}>+ {CODE.map((line, n) => (+ <div key={n} className={`${s.codeLine} ${n === 3 ? s.codeOn : ""}`}>+ <span className={`mono ${s.ln}`}>{40 + n - 1}</span>+ <span className={`mono ${s.code}`}>{line}</span>+ {n === 3 && <span className={`mono ${s.blame} ${s.step}`} style={st(0)}>a41c9e2 · fix</span>}+ </div>+ ))}+ <div className={`${s.step} ${s.pop}`} style={st(1)}>+ <span className={`mono ${s.popCmd}`}>/commit-context src/auth/refresh.ts:42</span>+ <span className={`mono ${s.memTag}`}>session · monday 14:02 · claude-code</span>+ <span>Tokens expired at 15 minutes under load. Refresh moved into middleware so every route rotates early.</span>+ <span className={`mono ${s.memTag}`}>2 failing auth tests, then 41 passing</span>+ </div>+ </div>+ </Win>+ </div>+ );+}++const FILES = ["-acme-api/3f1c….jsonl", "-acme-api/9b07….jsonl", "-acme-web/41de….jsonl", "-infra/c2a8….jsonl", "-acme-api/e6f3….jsonl"];++function ImportScene() {+ return (+ <div className={s.importGrid}>+ <Win title="terminal">+ <L i={0}>+ <span className={s.ccPrompt}>$</span> npx -y @agentmemory/agentmemory@latest import-jsonl+ </L>+ <L i={1} className={s.muted}>+ reading ~/.claude/projects+ </L>+ {FILES.map((f, n) => (+ <L key={f} i={2 + n} className={s.ccOut}>+ ✓ {f}+ </L>+ ))}+ <L i={7}>past sessions are searchable and show up in the viewer's Replay tab</L>+ </Win>+ <figure className={`${s.step} ${s.quote}`} style={st(8)}>+ <blockquote>"I backfilled agent memory on my past month's Cursor agent transcripts. It was surprisingly accurate. Picked up on things that I moved away from."</blockquote>+ <figcaption className="mono">+ Peter Neyra ·{" "}+ <a className="src" href="https://www.producthunt.com/p/agent-memory-dev/how-do-you-found-agentmemory-so-far-happy-to-help?comment=5379518" target="_blank" rel="noreferrer">+ source+ </a>+ </figcaption>+ </figure>+ </div>+ );+}++interface UseCase {+ id: string;+ title: string;+ why: string;+ without: string;+ scene: () => ReactNode;+}++const CASES: UseCase[] = [+ {+ id: "agents",+ title: "One memory for every agent",+ why: "Claude Code, Cursor, Codex and the rest share one local memory server.",+ without: "Each tool starts blind. You retell Cursor what Claude Code already found.",+ scene: () => <AgentsScene />,+ },+ {+ id: "context",+ title: "Stop re-explaining your project",+ why: "Your stack, commands and rules load before your first message.",+ without: "npm test, missing script, and you explain pnpm and vitest again.",+ scene: () => <ContextScene />,+ },+ {+ id: "handoff",+ title: "Pick up where you left off",+ why: "Close the laptop mid-task. Tomorrow's session knows what was half done.",+ without: "\"I don't have context from previous sessions.\"",+ scene: () => <HandoffScene />,+ },+ {+ id: "lesson",+ title: "Correct it once",+ why: "When you correct your agent, the rule is kept and comes back before similar work.",+ without: "Week 3, the same database mock, the same correction.",+ scene: () => <LessonScene />,+ },+ {+ id: "why",+ title: "Ask why the code looks like this",+ why: "Every commit links back to the session that produced it.",+ without: "git blame says \"fix\". Fix what?",+ scene: () => <WhyScene />,+ },+ {+ id: "import",+ title: "Start with months of history",+ why: "Import the transcripts you already have. Day one is not empty.",+ without: "Memory starts empty, and every past session is lost.",+ scene: () => <ImportScene />,+ },+];++function PanelBody({ c }: { c: (typeof CASES)[number] }) {+ return (+ <>+ <p className={s.why}>{c.why}</p>+ <div className={s.stage}>{c.scene()}</div>+ <div className={s.without}>+ <span className="mono">without memory</span>+ <span>{c.without}</span>+ </div>+ </>+ );+}++export function UseCases() {+ const [active, setActive] = useState(0);+ const tabs = useRef<(HTMLButtonElement | null)[]>([]);++ const onKey = (e: KeyboardEvent<HTMLButtonElement>, i: number) => {+ const last = CASES.length - 1;+ let next = -1;+ if (e.key === "ArrowDown" || e.key === "ArrowRight") next = i === last ? 0 : i + 1;+ if (e.key === "ArrowUp" || e.key === "ArrowLeft") next = i === 0 ? last : i - 1;+ if (e.key === "Home") next = 0;+ if (e.key === "End") next = last;+ if (next < 0) return;+ e.preventDefault();+ setActive(next);+ tabs.current[next]?.focus();+ };++ return (+ <section id="use-cases" className="section" aria-labelledby="uc-title">+ <div className="wrap">+ <div className="section-head">+ <span className="eyebrow">Use cases</span>+ <h2 id="uc-title">What changes when your agent remembers.</h2>+ <p>Six things that happen every week with a coding agent, and what they look like with agentmemory running.</p>+ </div>++ <div className={s.tabs} role="tablist" aria-label="Use cases">+ {CASES.map((u, i) => (+ <button+ key={u.id}+ ref={(el) => {+ tabs.current[i] = el;+ }}+ role="tab"+ id={`uc-tab-${u.id}`}+ aria-selected={i === active}+ aria-controls="uc-panel"+ tabIndex={i === active ? 0 : -1}+ className={s.tab}+ onClick={() => setActive(i)}+ onKeyDown={(e) => onKey(e, i)}+ >+ <span className={`mono ${s.num}`}>{String(i + 1).padStart(2, "0")}</span>+ <span>{u.title}</span>+ </button>+ ))}+ </div>++ <div className={s.panels}>+ {CASES.map((u, i) =>+ i === active ? (+ <div key={u.id} id="uc-panel" role="tabpanel" aria-labelledby={`uc-tab-${u.id}`} className={s.panel}>+ <PanelBody c={u} />+ </div>+ ) : (+ <div key={`size-${u.id}`} className={`${s.panel} ${s.sizer}`} aria-hidden="true" inert>+ <PanelBody c={u} />+ </div>+ ),+ )}+ </div>+ <p className={`mono ${s.note}`}>Example sessions. The commands, skills and hooks shown are real.</p>+ </div>+ </section>+ );+}diff --git a/website/components/site/client.tsx b/website/components/site/client.tsxnew file mode 100644index 00000000..f08d8f59--- /dev/null+++ b/website/components/site/client.tsx@@ -0,0 +1,194 @@+"use client";++import { useEffect, useRef, useState, type CSSProperties, type ReactNode } from "react";++export function CopyButton({+ text,+ label,+ className,+ children,+ labels,+}: {+ text: string;+ label: string;+ className?: string;+ children?: ReactNode;+ labels?: { idle: string; done: string };+}) {+ const [copied, setCopied] = useState(false);+ const timer = useRef<ReturnType<typeof setTimeout> | null>(null);+ useEffect(() => () => {+ if (timer.current) clearTimeout(timer.current);+ }, []);+ return (+ <button+ type="button"+ className={className}+ aria-label={label}+ data-copied={copied || undefined}+ onClick={async () => {+ try {+ await navigator.clipboard.writeText(text);+ setCopied(true);+ if (timer.current) clearTimeout(timer.current);+ timer.current = setTimeout(() => setCopied(false), 1600);+ } catch {+ setCopied(false);+ }+ }}+ >+ {children}+ {labels ? (+ <span className="copy-label" aria-live="polite">+ {copied ? labels.done : labels.idle}+ </span>+ ) : (+ <span className="copy-state mono" aria-live="polite">+ {copied ? "copied" : "copy"}+ </span>+ )}+ </button>+ );+}++export function Reveal({+ children,+ delay = 0,+ as: Tag = "div",+ className,+}: {+ children: ReactNode;+ delay?: number;+ as?: "div" | "li" | "section" | "article";+ className?: string;+}) {+ const ref = useRef<HTMLElement | null>(null);+ useEffect(() => {+ const el = ref.current;+ if (!el) return;+ const io = new IntersectionObserver(+ (entries) => {+ for (const e of entries) {+ if (e.isIntersecting) {+ el.classList.add("is-in");+ io.disconnect();+ }+ }+ },+ { rootMargin: "0px 0px -12% 0px" },+ );+ io.observe(el);+ return () => io.disconnect();+ }, []);+ const style = { "--d": `${delay}ms` } as CSSProperties;+ return (+ <Tag ref={ref as never} className={`reveal${className ? ` ${className}` : ""}`} style={style}>+ {children}+ </Tag>+ );+}++export function ThemeToggle({ className }: { className?: string }) {+ const [theme, setTheme] = useState<"light" | "dark" | null>(null);+ useEffect(() => {+ const explicit = document.documentElement.dataset.theme as "light" | "dark" | undefined;+ const system = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";+ setTheme(explicit ?? system);+ }, []);+ const next = theme === "dark" ? "light" : "dark";+ return (+ <button+ type="button"+ className={className}+ aria-label={`Switch to ${next} theme`}+ onClick={() => {+ document.documentElement.dataset.theme = next;+ try {+ localStorage.setItem("am-theme", next);+ } catch {}+ setTheme(next);+ window.dispatchEvent(new Event("am-theme"));+ }}+ >+ <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">+ <circle cx="8" cy="8" r="6.25" fill="none" stroke="currentColor" strokeWidth="1.5" />+ <path d="M8 1.75a6.25 6.25 0 0 1 0 12.5Z" fill="currentColor" />+ </svg>+ </button>+ );+}++export function useScrollProgress<T extends HTMLElement>(steps = 0) {+ const ref = useRef<T | null>(null);+ useEffect(() => {+ const el = ref.current;+ if (!el) return;+ const clamp = (v: number) => Math.min(1, Math.max(0, v));+ const items = Array.from(el.querySelectorAll<HTMLElement>("[data-a]")).map((node) => {+ const ds = node.dataset;+ return {+ node,+ a: Number(ds.a),+ b: Number(ds.b),+ a2: ds.a2 === undefined ? null : Number(ds.a2),+ b2: ds.b2 === undefined ? null : Number(ds.b2),+ dim: ds.dim === undefined ? 1 : Number(ds.dim),+ lift: ds.lift !== undefined,+ last: "",+ };+ });+ const rail = el.querySelector<HTMLElement>("[data-rail]");+ const paint = (p: number) => {+ for (const it of items) {+ const t = clamp((p - it.a) / (it.b - it.a));+ const u = it.a2 === null || it.b2 === null ? 0 : clamp((p - it.a2) / (it.b2 - it.a2));+ const opacity = t * (1 - it.dim * u);+ const transform = it.lift+ ? `translateY(${((1 - t) * 14).toFixed(2)}px) scale(${(0.97 + 0.03 * t).toFixed(4)})`+ : `translateY(${((1 - t) * 8).toFixed(2)}px)`;+ const key = `${opacity.toFixed(3)}|${transform}`;+ if (key === it.last) continue;+ it.last = key;+ it.node.style.opacity = opacity.toFixed(3);+ it.node.style.transform = transform;+ }+ if (rail) rail.style.transform = `scaleY(${p.toFixed(4)})`;+ };+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {+ el.dataset.step = "all";+ paint(1);+ return;+ }+ let frame = 0;+ let visible = false;+ const update = () => {+ frame = 0;+ const rect = el.getBoundingClientRect();+ const span = rect.height - window.innerHeight;+ const p = span > 0 ? clamp(-rect.top / span) : 1;+ paint(p);+ if (steps > 0) {+ const step = String(Math.min(steps - 1, Math.floor(p * steps)));+ if (el.dataset.step !== step) el.dataset.step = step;+ }+ };+ const onScroll = () => {+ if (visible && !frame) frame = requestAnimationFrame(update);+ };+ const io = new IntersectionObserver(([e]) => {+ visible = e.isIntersecting;+ if (visible) onScroll();+ });+ io.observe(el);+ window.addEventListener("scroll", onScroll, { passive: true });+ window.addEventListener("resize", onScroll);+ update();+ return () => {+ io.disconnect();+ window.removeEventListener("scroll", onScroll);+ window.removeEventListener("resize", onScroll);+ if (frame) cancelAnimationFrame(frame);+ };+ }, [steps]);+ return ref;+}diff --git a/website/lib/bench.ts b/website/lib/bench.tsnew file mode 100644index 00000000..1438179a--- /dev/null+++ b/website/lib/bench.ts@@ -0,0 +1,67 @@+import { LONGMEMEVAL, REPO_URL } from "./site";++export type K = 5 | 10;++export interface TypeHits {+ type: string;+ count: number;+ hits: Record<K, number>;+}++export const TYPE_HITS: TypeHits[] = LONGMEMEVAL.byType.map((t) => ({+ type: t.type,+ count: t.count,+ hits: { 5: t.h5, 10: t.h10 },+}));++export function totalHits(k: K): number {+ return TYPE_HITS.reduce((sum, t) => sum + t.hits[k], 0);+}++export const benchSrc = {+ readme: `${REPO_URL}/blob/main/benchmark/README.md`,+ budgets: `${REPO_URL}/blob/main/benchmark/capture-costs-budgets.json`,+ costsFigure: `${REPO_URL}/blob/main/docs/benchmarks/capture-costs.svg`,+ longmemevalScript: `${REPO_URL}/blob/main/benchmark/longmemeval-bench.ts`,+ realEmbeddingsScript: `${REPO_URL}/blob/main/benchmark/real-embeddings-eval.ts`,+};++export const REPRODUCE = {+ download: `pip install huggingface_hub+python3 -c "+from huggingface_hub import hf_hub_download+hf_hub_download(repo_id='xiaowu0162/longmemeval-cleaned', filename='longmemeval_s_cleaned.json', repo_type='dataset', local_dir='benchmark/data')+"`,+ bm25: "npx tsx benchmark/longmemeval-bench.ts bm25",+ hybrid: "npx tsx benchmark/longmemeval-bench.ts hybrid",+ costs: "npm run build && npm run bench:capture-costs",+};++export const TOKEN_SETUP = {+ observations: 240,+ sessions: 30,+ queries: 20,+ model: "Xenova/all-MiniLM-L6-v2 (384d, local)",+};++export interface BudgetRow {+ profile: string;+ n: number;+ hookP95Ms: number;+ recoveryIndexReadyMs: number;+ diskPerObsBytes: number;+ idleRssKiB: number;+ searchTokensP50: number;+}++export const BUDGETS: BudgetRow[] = [+ { profile: "keyless", n: 1000, hookP95Ms: 268, recoveryIndexReadyMs: 3126, diskPerObsBytes: 4510, idleRssKiB: 340760, searchTokensP50: 681 },+ { profile: "keyless", n: 10000, hookP95Ms: 257, recoveryIndexReadyMs: 5742, diskPerObsBytes: 4036, idleRssKiB: 644300, searchTokensP50: 690 },+ { profile: "embed", n: 1000, hookP95Ms: 466, recoveryIndexReadyMs: 5914, diskPerObsBytes: 9552, idleRssKiB: 381080, searchTokensP50: 663 },+ { profile: "embed", n: 10000, hookP95Ms: 406, recoveryIndexReadyMs: 6346, diskPerObsBytes: 9062, idleRssKiB: 863880, searchTokensP50: 678 },+];++export const RECOVERY_FACTS = [+ { value: "10,000 of 10,000", label: "memories and vectors back after SIGKILL, with 0 embedding calls" },+ { value: "1,000 of 1,000", label: "tool calls kept while the service was down" },+];diff --git a/website/lib/compare.ts b/website/lib/compare.tsnew file mode 100644index 00000000..74a7182b--- /dev/null+++ b/website/lib/compare.ts@@ -0,0 +1,348 @@+import { LONGMEMEVAL, REPO_URL } from "@/lib/site";++export const CHECKED_ON = "2026-10-05";++export type RowKey =+ | "what"+ | "license"+ | "deployment"+ | "storage"+ | "capture"+ | "integrations"+ | "retrieval"+ | "benchmarks"+ | "pricing";++export const ROWS: { key: RowKey; label: string }[] = [+ { key: "what", label: "What it is" },+ { key: "license", label: "License" },+ { key: "deployment", label: "Where it runs" },+ { key: "storage", label: "What it needs" },+ { key: "capture", label: "How memory is captured" },+ { key: "integrations", label: "Agent integrations" },+ { key: "retrieval", label: "Retrieval" },+ { key: "benchmarks", label: "Published benchmarks" },+ { key: "pricing", label: "Pricing" },+];++export interface Fact {+ value: string;+ src?: string;+}++export interface Competitor {+ slug: string;+ name: string;+ tagline: string;+ links: { home: string; docs: string; github?: string };+ rows: Record<RowKey, Fact>;+ summary: string;+ differ: string[];+ chooseThem: string[];+ chooseUs: string[];+ moving?: string[];+}++const README = `${REPO_URL}#readme`;++export const AGENTMEMORY: Record<RowKey, Fact> = {+ what: {+ value: "Local memory server for coding agents. Hooks capture each session, and memory comes back through hooks and MCP in the next one.",+ src: README,+ },+ license: { value: "Apache-2.0", src: `${REPO_URL}/blob/main/LICENSE` },+ deployment: {+ value: "On your machine, as one process bound to 127.0.0.1. There is no hosted tier.",+ src: README,+ },+ storage: {+ value: "Nothing to install. State lives in a local data folder. Redis is optional.",+ src: README,+ },+ capture: {+ value: "Automatic. Lifecycle hooks record prompts, tool calls and session ends, so there are no add() calls to write.",+ src: README,+ },+ integrations: {+ value: "25 agents, with native plugins for Claude Code, Codex CLI, Copilot CLI, Cursor and others, 54 MCP tools and a REST API.",+ src: `${REPO_URL}#works-with-every-agent`,+ },+ retrieval: {+ value: "BM25, local vectors and a knowledge graph, fused into one ranking. Works keyless on BM25 alone.",+ src: README,+ },+ benchmarks: {+ value: `LongMemEval-S retrieval recall at 5: ${LONGMEMEVAL.hybrid.r5}%. This measures retrieval only, not answer accuracy.`,+ src: `${REPO_URL}/blob/main/benchmark/LONGMEMEVAL.md`,+ },+ pricing: {+ value: "Free. If you add an LLM or embedding provider, that usage is billed by the provider.",+ src: README,+ },+};++const MEM0_GH = "https://github.com/mem0ai/mem0";+const SM_GH = "https://github.com/supermemoryai/supermemory";+const SM_SELF = "https://supermemory.ai/docs/self-hosting/overview";+const GRAPHITI_GH = "https://github.com/getzep/graphiti";+const CM_GH = "https://github.com/thedotmack/claude-mem";+const LETTA_DOCS = "https://docs.letta.com/";+const COGNEE_GH = "https://github.com/topoteretes/cognee";++export const COMPETITORS: Competitor[] = [+ {+ slug: "mem0",+ name: "Mem0",+ tagline: "A memory layer you call from your own agent or app, as a library or a managed platform.",+ links: { home: "https://mem0.ai", docs: "https://docs.mem0.ai", github: MEM0_GH },+ rows: {+ what: { value: "Memory layer for AI agents and apps, offered as an open source library and a managed platform.", src: MEM0_GH },+ license: { value: "Apache-2.0", src: MEM0_GH },+ deployment: { value: "Managed cloud platform, a self-hosted server, or a library inside your app.", src: MEM0_GH },+ storage: { value: "An LLM (OpenAI gpt-5-mini by default) and a vector store. The platform hosts both for you.", src: MEM0_GH },+ capture: { value: "Explicit. Your code calls memory.add() with messages, and an LLM extracts memories from them.", src: MEM0_GH },+ integrations: { value: "Python and TypeScript SDKs, an MCP integration, OpenMemory, and an agent skill for Claude Code.", src: "https://mem0.ai" },+ retrieval: { value: "Multi-signal retrieval over extracted memories. Graph memory is on the Pro and Enterprise plans.", src: "https://mem0.ai/pricing" },+ benchmarks: {+ value: "Their published scores: LoCoMo 92.5, LongMemEval 94.4, BEAM (1M) 64.1. Measured with their own harness and metric, so not comparable to retrieval recall.",+ src: MEM0_GH,+ },+ pricing: { value: "Hobby free (10,000 adds and 1,000 retrievals a month), Starter $19, Pro $249, Enterprise custom.", src: "https://mem0.ai/pricing" },+ },+ summary:+ "Mem0 is a memory API you build into your own application. agentmemory is a memory server for coding agents that captures sessions on its own and runs entirely on your machine.",+ differ: [+ "Mem0 is called by your code: you decide what to send with memory.add(), and an LLM turns it into memories. That suits products where you own the agent loop. agentmemory sits beside agents you already use, like Claude Code or Cursor, and captures their sessions through hooks without code changes.",+ "Mem0 needs an LLM to extract memories and a vector store to hold them, or its managed platform. agentmemory runs as one local process with no external database, and works without any API key on BM25 search.",+ "Some Mem0 capabilities, such as graph memory, on-prem deployment and audit logs, sit on paid plans. agentmemory has no paid tier, so every feature ships in the open source build.",+ ],+ chooseThem: [+ "You are building your own agent or app and want a memory API with Python and TypeScript SDKs.",+ "You want a managed platform with a dashboard and compliance paperwork.",+ "You are happy to choose what gets remembered with explicit add() calls.",+ ],+ chooseUs: [+ "You use existing coding agents and want memory captured without writing code.",+ "You want everything on your machine, with no account and no external database.",+ "You switch between agents and want one memory shared by all of them.",+ ],+ },+ {+ slug: "supermemory",+ name: "supermemory",+ tagline: "A hosted memory and context API with plugins, MCP and framework wrappers.",+ links: { home: "https://supermemory.ai", docs: "https://supermemory.ai/docs", github: SM_GH },+ rows: {+ what: { value: "Memory and context engine for AI, served through a hosted API, plugins and MCP.", src: SM_GH },+ license: {+ value: "MIT for the public repository. Their docs state the self-hosted server binary is built from a separate, non-public codebase.",+ src: SM_SELF,+ },+ deployment: { value: "Hosted API by default. A self-hosted server binary is also available.", src: SM_SELF },+ storage: { value: "Managed by the hosted service. Self-hosting requirements are listed in their docs.", src: SM_SELF },+ capture: { value: "Server-side. Content sent through the API, plugins or MCP is extracted into memories.", src: SM_GH },+ integrations: {+ value: "MCP, a Claude Code plugin, TypeScript and Python SDKs, and wrappers for Vercel AI SDK, LangChain, LangGraph, OpenAI Agents SDK, Mastra and more.",+ src: SM_GH,+ },+ retrieval: { value: "Search over extracted memories and documents through the hosted API.", src: SM_GH },+ benchmarks: {+ value: "They report #1 on LongMemEval (95% recall at 15), LoCoMo and ConvoMem. Recall at 15 is a looser cutoff than recall at 5.",+ src: SM_GH,+ },+ pricing: { value: "Free with $5 of monthly credits, Pro $19, Max $100, Scale $399, Enterprise custom.", src: "https://supermemory.ai/pricing" },+ },+ summary:+ "supermemory is a hosted memory API with broad framework support. agentmemory is an open source server that runs on your machine and captures coding agent sessions directly.",+ differ: [+ "supermemory runs as a hosted service you send content to, and it extracts memories on its side. agentmemory runs locally, and hooks in your coding agent write to it on your machine.",+ "According to their self-hosting docs, the downloadable server is built from a non-public codebase, collects telemetry unless SUPERMEMORY_DISABLE_TELEMETRY=1 is set, and still calls a hosted reader for URL ingestion. agentmemory is open source end to end and sends nothing anywhere unless you add a provider.",+ "supermemory has wrappers for many app frameworks, which suits product teams. agentmemory focuses on coding agents, with native plugins and hooks for the tools developers already run.",+ ],+ chooseThem: [+ "You want a managed API and do not want to run anything yourself.",+ "You build on Vercel AI SDK, LangChain, Mastra or similar and want a drop-in wrapper.",+ "You need memory and document retrieval for an end-user product.",+ ],+ chooseUs: [+ "You want the whole engine open source and auditable.",+ "You want zero network calls by default, with no telemetry to switch off.",+ "Your main use is coding agents like Claude Code, Codex or Cursor.",+ ],+ },+ {+ slug: "zep",+ name: "Zep",+ tagline: "An enterprise context layer built on Graphiti, an open source temporal knowledge graph.",+ links: { home: "https://www.getzep.com", docs: "https://help.getzep.com", github: GRAPHITI_GH },+ rows: {+ what: {+ value: "Context layer for enterprise agents that unifies business data, documents and conversations. Built on Graphiti, its open source temporal knowledge graph.",+ src: "https://www.getzep.com",+ },+ license: { value: "Zep is a commercial service. Graphiti is Apache-2.0.", src: GRAPHITI_GH },+ deployment: { value: "Zep Cloud, with bring-your-own-keys and bring-your-own-cloud options. Graphiti runs wherever you host it.", src: "https://www.getzep.com" },+ storage: { value: "Graphiti needs a graph database (Neo4j, FalkorDB or Amazon Neptune) and an LLM that supports structured output.", src: GRAPHITI_GH },+ capture: { value: "Explicit. Your application sends conversations and data to Zep, or adds them to Graphiti through its API.", src: GRAPHITI_GH },+ integrations: { value: "A memory MCP server for Zep. Graphiti ships its own MCP server.", src: "https://www.getzep.com" },+ retrieval: { value: "Hybrid semantic, BM25 keyword and graph traversal over a temporal knowledge graph.", src: GRAPHITI_GH },+ benchmarks: {+ value: "Their published scores: LoCoMo 94.7% and LongMemEval 90.2% accuracy, with 155 to 162 ms retrieval latency. Answer accuracy, not retrieval recall.",+ src: "https://www.getzep.com",+ },+ pricing: { value: "10,000 free credits a month, Flex $125 a month, Flex Plus $375 a month, Enterprise custom.", src: "https://www.getzep.com/pricing/" },+ },+ summary:+ "Zep is a managed context platform for enterprise agents, built on the Graphiti graph engine. agentmemory is a local memory server for individual developers and their coding agents.",+ differ: [+ "Zep centers on a temporal knowledge graph that combines business data, documents and conversations for many users. agentmemory centers on one developer's coding sessions, captured automatically on their machine.",+ "Running Graphiti yourself means operating a graph database and an LLM for ingestion. agentmemory needs neither: it runs as one process, and its own graph is built locally and optionally.",+ "Zep's platform adds enterprise controls such as SOC 2 Type II and bring-your-own-cloud. agentmemory avoids that surface by not hosting anything, since data never leaves the machine.",+ ],+ chooseThem: [+ "You need governed, shared context across many users and business systems.",+ "You want a managed graph platform with enterprise compliance.",+ "You are already invested in Neo4j or Neptune and want Graphiti on top.",+ ],+ chooseUs: [+ "You want memory for your own coding agents without running a graph database.",+ "You want capture to happen through hooks, with no integration code.",+ "You want it free and local, with nothing to provision.",+ ],+ },+ {+ slug: "claude-mem",+ name: "claude-mem",+ tagline: "A memory plugin that compresses coding agent sessions with Claude and injects them back.",+ links: { home: CM_GH, docs: "https://docs.claude-mem.ai/", github: CM_GH },+ rows: {+ what: {+ value: "Memory plugin that captures coding agent sessions, compresses them with AI and injects relevant context into future sessions.",+ src: CM_GH,+ },+ license: { value: "Apache-2.0", src: CM_GH },+ deployment: { value: "Runs locally next to your agent, with a background worker and a web viewer.", src: CM_GH },+ storage: { value: "SQLite with FTS5 and a Chroma vector database. Compression goes through the Claude Agent SDK, so it needs Claude access.", src: CM_GH },+ capture: { value: "Automatic, through 5 lifecycle hooks: SessionStart, UserPromptSubmit, PostToolUse, Stop and SessionEnd.", src: CM_GH },+ integrations: {+ value: "Built for Claude Code. The README also lists OpenClaw, Codex, Gemini, Hermes, Copilot and OpenCode, and it exposes MCP search tools.",+ src: CM_GH,+ },+ retrieval: { value: "Hybrid semantic and keyword search (Chroma plus SQLite FTS5) through a search, timeline and get_observations flow.", src: CM_GH },+ benchmarks: { value: "not documented", src: CM_GH },+ pricing: { value: "Free and open source. Compression uses your Claude usage.", src: CM_GH },+ },+ summary:+ "claude-mem and agentmemory solve the same problem the same way: hooks capture coding sessions and context comes back next time. They differ in what runs the compression, what storage they need, and how much of memory they model.",+ differ: [+ "claude-mem compresses observations with Claude through the Claude Agent SDK, so every compression is a model call. agentmemory stores observations as captured and works with no model at all; an LLM is optional and only used for consolidation if you add one.",+ "claude-mem uses SQLite plus a Chroma vector database. agentmemory runs as one process with its own storage and local embeddings, and adds a knowledge graph and four memory tiers with decay.",+ "Both capture through hooks. agentmemory also ships native plugins for Codex CLI, Cursor, Copilot CLI and others, 54 MCP tools, a REST API, and a release gate that checks crash recovery on every publish.",+ ],+ chooseThem: [+ "You live in Claude Code and want AI-written summaries of every session.",+ "You are fine spending Claude usage on compression.",+ "You prefer its search, timeline and observation flow.",+ ],+ chooseUs: [+ "You want memory that works with no model calls and no API key.",+ "You use several agents and want one shared memory across them.",+ "You want tiered memory with decay, a knowledge graph and crash-safe capture.",+ ],+ moving: [+ "Install agentmemory with npx -y @agentmemory/agentmemory@latest and connect Claude Code during setup.",+ "Bring in past sessions from your Claude Code transcripts with npx -y @agentmemory/agentmemory@latest import-jsonl. Claude Code keeps transcripts for 30 days by default.",+ "Disable the claude-mem plugin so only one tool captures each session.",+ ],+ },+ {+ slug: "letta",+ name: "Letta",+ tagline: "A platform for stateful agents, where the agent edits its own memory.",+ links: { home: "https://www.letta.com", docs: LETTA_DOCS, github: "https://github.com/letta-ai/letta" },+ rows: {+ what: {+ value: "Platform for building stateful agents. An agent runtime with memory, rather than memory for an agent you already use.",+ src: LETTA_DOCS,+ },+ license: { value: "Apache-2.0", src: "https://github.com/letta-ai/letta" },+ deployment: { value: "Letta Cloud, or the Letta server run yourself.", src: LETTA_DOCS },+ storage: { value: "Handled by Letta Cloud or the self-hosted Letta server.", src: LETTA_DOCS },+ capture: {+ value: "Agent-managed. The agent reads and updates its own memory blocks with built-in memory tools.",+ src: "https://docs.letta.com/v1-sdk/memory/memory-blocks",+ },+ integrations: {+ value: "Python and TypeScript SDKs. Letta Code is its open source coding agent harness.",+ src: "https://docs.letta.com/v1-sdk/memory/memory-blocks",+ },+ retrieval: {+ value: "Core memory blocks are injected into the context window, and the agent changes them through tools.",+ src: "https://docs.letta.com/v1-sdk/concepts/stateful-agents",+ },+ benchmarks: { value: "not documented", src: LETTA_DOCS },+ pricing: { value: "not documented", src: LETTA_DOCS },+ },+ summary:+ "Letta is a runtime you build agents in, and its agents manage their own memory. agentmemory adds memory to agents you already use, without changing how they run.",+ differ: [+ "With Letta you create agents on its platform, and each agent edits its memory blocks through tools. With agentmemory you keep your current coding agent, and memory is captured around it by hooks.",+ "Letta memory belongs to Letta agents. agentmemory memory is shared by every connected agent, so Claude Code, Cursor and Codex all read from one store.",+ "Letta runs as Letta Cloud or a Letta server. agentmemory runs as one local process with nothing else to deploy.",+ ],+ chooseThem: [+ "You are building your own long-running agents and want a full runtime.",+ "You want agents that decide for themselves what to remember.",+ "You want shared memory blocks across agents you design.",+ ],+ chooseUs: [+ "You want memory for the coding agents you already use.",+ "You want capture to be automatic instead of agent-decided.",+ "You want a single local process with no platform to run.",+ ],+ },+ {+ slug: "cognee",+ name: "Cognee",+ tagline: "An open source memory platform that turns your data into a knowledge graph.",+ links: { home: "https://www.cognee.ai", docs: "https://docs.cognee.ai/", github: COGNEE_GH },+ rows: {+ what: { value: "Open source AI memory platform for agents that builds a knowledge graph from the data you give it.", src: COGNEE_GH },+ license: { value: "Apache-2.0", src: COGNEE_GH },+ deployment: { value: "Python library, Docker image, or Cognee Cloud.", src: COGNEE_GH },+ storage: { value: "Graph, vector and relational stores. It can run the whole memory layer on a single Postgres instance.", src: COGNEE_GH },+ capture: {+ value: "Explicit. Your code calls cognee.remember (or add), and a pipeline turns the data into a graph. An LLM is optional with a local extraction model.",+ src: COGNEE_GH,+ },+ integrations: { value: "MCP server, a Claude Code memory plugin, Cursor and Cline, plus Python, TypeScript and Rust clients and REST.", src: COGNEE_GH },+ retrieval: { value: "cognee.recall routes between graph, vector and code retrieval, or combines them.", src: COGNEE_GH },+ benchmarks: {+ value: "Their published scores: 0.79 at 100K tokens and 0.67 at 10M tokens of context on their own evaluation.",+ src: COGNEE_GH,+ },+ pricing: { value: "The library is free. Cognee Cloud pricing: not documented.", src: COGNEE_GH },+ },+ summary:+ "Cognee builds knowledge graphs from data you feed it, for agents and apps. agentmemory captures coding agent sessions automatically and keeps them on your machine.",+ differ: [+ "Cognee is a pipeline you run over documents and data: add them, then turn them into a graph. agentmemory captures what your coding agent does as it works, through hooks.",+ "Cognee relies on graph, vector and relational stores, which can share one Postgres. agentmemory needs no database at all and runs as one process.",+ "Both offer MCP and a Claude Code integration. agentmemory adds native plugins for many coding agents, a live viewer, and four memory tiers with decay.",+ ],+ chooseThem: [+ "You want to build a knowledge graph from documents, code and data sources.",+ "You need Python, TypeScript and Rust clients in your own app.",+ "You already run Postgres and want memory inside it.",+ ],+ chooseUs: [+ "You want your coding sessions remembered without feeding data in by hand.",+ "You want no database to run.",+ "You want one memory shared across many coding agents.",+ ],+ },+];++export function getCompetitor(slug: string) {+ return COMPETITORS.find((c) => c.slug === slug);+}diff --git a/website/lib/generated-changelog.json b/website/lib/generated-changelog.jsonnew file mode 100644index 00000000..2c3a61d8--- /dev/null+++ b/website/lib/generated-changelog.json@@ -0,0 +1,62 @@+[+ {+ "version": "0.9.30",+ "date": "2026-10-06",+ "body": "Scale, durability and safety release. The iii engine moves from 0.11.2 to 0.22.1. The stores that grew without bound on shared daemons (graph provenance, the audit log, the vector index, the viewer stream backlog) are bounded and heal themselves at boot. Capture is durable end to end: the server accepts each observation into a persistent inbox with a restart-safe event id, and hooks keep an offline spool while the server is down. Vectors survive a force-kill through a pending log. The REST API requires auth by default. Redis becomes an opt-in state backend, and the viewer is rebuilt around one snapshot plus live stream events with a Health page backed by `GET /agentmemory/status`. Every publish now goes through a release gate that installs the packed tarballs and runs capture and recovery against them. Contributions from david-waltermire, a652, cbsincool, dmazhukov and Tyxiel, with earlier work by DaveCole, Srinath279, joyjit and cristianbdev carried into merged PRs.\n\n### Breaking changes\n\n- **Auth is on by default** (#1462). When `AGENTMEMORY_SECRET` is not set, the server generates a secret into `~/.agentmemory/secret` (mode 0600) on first start. The CLI, viewer, hooks, MCP server and shim, `agentmemory connect` configs and the bundled integrations read it for loopback URLs, so they keep working with no change. Hand-written requests to `:3111` now need `Authorization: Bearer $(cat ~/.agentmemory/secret)`. An explicit `AGENTMEMORY_SECRET` still wins, and mesh sync still requires an explicit one.\n- **File import and export paths are confined** (#1462). `/compress-file`, `/replay/import-jsonl`, `/graph/import-graphify`, the Obsidian export and `/migrate` resolve symlinks and only accept paths inside the data dir, `~/.agentmemory` or a directory listed in `AGENTMEMORY_IMPORT_ROOT`. `/replay/import-jsonl` also keeps its default `~/.claude/projects`.\n- **Browser writes need JSON and an allowed origin** (#1462). `POST`, `PUT`, `PATCH` and `DELETE` requests with a body must send `Content-Type: application/json`, and a present `Origin` header must be a loopback origin for the configured ports, the viewer's own origin, or listed in `VIEWER_ALLOWED_ORIGINS`. Clients that send no `Origin` (CLI, hooks, MCP, curl) are unaffected.\n- **`AGENTMEMORY_VECTOR_BACKFILL_MAX` is now a batch size** (#1467). Recovery re-embeds missing vectors in batches of this size until the backlog is empty, across restarts, instead of stopping at the cap once per boot.\n- **iii engine 0.22.1** (#1396, #1397). Keep the `iii-` prefixed builtin worker names (`iii-http`, `iii-state`, `iii-queue`, `iii-pubsub`, `iii-cron`) in any custom config: on 0.22.1 the bare names resolve to standalone registry workers.\n- **Hooks skip agentmemory's own tools** (#1452). PostToolUse no longer captures `memory_*` MCP calls or `toolsearch`, `listmcpresources` and `fetchmcpresource`.\n- **Changed response shapes.**\n - `mem::forget`, `mem::governance-delete` and `mem::governance-bulk` count only records that were really deleted. Absent ids come back in `notFound` and failed deletes in `failed` and `failures`, with `success: false` when anything failed. `governance-bulk` refuses an empty filter and unsupported keys on both the dry run and the live call (#1449).\n - `GET /agentmemory/audit` and the `memory_audit` MCP tool return `{ entries, legacyFrozen, legacyFrozenBytes }`; the MCP tool used to return a bare list (#1419).\n - `GET /agentmemory/memories` returns newest first and adds `nextCursor` (plus `search` and `facets` when requested) (#1433).\n - `GET /agentmemory/export` returns 413 with the refusal body (`oversized`, `bytes`, `limitBytes`, `stoppedAt`) instead of 200 when the export is too large (#1422, #1449).\n - `POST /agentmemory/session/end` for an unknown, malformed or already completed session returns 200 with `ended: false` and writes nothing (#1252).\n - `memory_patterns` / `mem::patterns` reads the 50 most recent sessions by default (`limit`, max 500) and stops after 5,000 observations (#1424).\n - Consolidation decay applies at most once per decay period, and `results.decay` reports `{ scanned, written }` per tier (#1417).\n\n### Upgrade notes\n\n- Scripts or tools that call the REST API by hand on `:3111`: add `Authorization: Bearer $(cat ~/.agentmemory/secret)`, or set your own `AGENTMEMORY_SECRET` and send that.\n- Imports or exports from folders outside `~/.agentmemory` and the data dir: list those folders in `AGENTMEMORY_IMPORT_ROOT` (separate several with `:`, or `;` on Windows).\n- A web page on another origin that writes through the viewer: add its origin to `VIEWER_ALLOWED_ORIGINS`.\n- Nothing else is required. Stores load unchanged, and the one-time migrations below run by themselves.\n\n### What happens on the first start\n\n- **Graph provenance is compacted once in the background.** Every node, edge, superseded edge and the cached snapshot is trimmed to 32 observation ids in slices, without blocking boot, search or the viewer. Progress is saved and resumes after a restart. `AGENTMEMORY_GRAPH_COMPACT_ON_BOOT=false` skips it; `POST /agentmemory/graph/compact` runs it by hand (#1455).\n- **The audit log moves to monthly scopes** (`mem:audit:YYYY-MM`) with a one-time background migration. A legacy scope larger than `AGENTMEMORY_AUDIT_MIGRATE_MAX_BYTES` (default 32 MiB) or unreadable is left frozen and reported as `legacyFrozen` (#1419).\n- **The vector index migrates to buckets** (`AGENTMEMORY_VECTOR_BUCKET_SIZE`, default 500) by copying vectors, with no embedding calls. BM25 is no longer persisted and is rebuilt at every boot (#1416).\n- **State is saved every 2 s** instead of 5 s, and `agentmemory stop` waits for the engine flush, so it takes a few seconds longer (#1457, #1449).\n- **Stale sessions are marked abandoned** after `AGENTMEMORY_SESSION_SWEEP_STALE_HOURS` (default 24) by an hourly sweep that deletes nothing (#1453).\n- **Viewer stream groups.** Observations stop writing to per-session `mem-live` groups and the shared `viewer` group is capped at `AGENTMEMORY_VIEWER_STREAM_MAX` (default 500). Existing per-session groups are left in place (#1420).\n\n### Added\n\n- **Durable capture** (#1460). Hooks send a stable event id with every observation (the host tool use id when present, otherwise a hash of the event). The server writes each event to a capture inbox before storing it, keeps completed ids for `AGENTMEMORY_CAPTURE_DEDUP_HOURS`, and answers a replay with the existing observation. Failed writes retry with backoff, also after a restart, and end as dead letters shown on `/status`, the viewer Health page and `GET /agentmemory/capture`, with `POST /agentmemory/capture/retry` to retry them.\n- **Offline hook spool** (#1460, #1468). When the server is down, times out or returns a 5xx, hooks keep a copy of the observation in a bounded private spool under the data dir until the engine has saved it. The spool drains at boot and from the next hook that reaches the server. New: `agentmemory capture [--drain]` and `POST /agentmemory/capture/drain`.\n- **Vector pending log** (#1467). Every vector added to or removed from the live index is also written to a small pending log. Boot replays it after the snapshot with 0 embedding calls, and whatever is still missing is re-embedded as a durable backlog that resumes after a restart instead of stopping at a 500 cap. `/status` and the viewer show the log size and a paused backfill.\n- **Release gate** (#1463). `npm run release:gate` packs `@agentmemory/agentmemory` and `@agentmemory/mcp`, installs both tarballs into a clean home and runs named scenarios against the installed CLI: capture through the bundled hooks, offline capture recovered from the spool, replay dedup after a force kill, dead letters that survive a restart, vectors surviving a crash, stop and start, export and import, the MCP shim, the viewer and `/status`. A Release gate workflow runs it on Ubuntu and macOS.\n- **Capture cost bench** (#1464). `npm run bench:capture-costs` measures disk bytes per state scope, engine and worker memory and CPU, hook latency, provider requests, agent-visible context bytes and force-kill recovery, with separate capture and recovery budgets in `benchmark/capture-costs-budgets.json` and a figure in `docs/benchmarks/capture-costs.svg`. Optional Ollama, Redis and crash-offline variants.\n- **Codex plugin package** (#1459). The Codex plugin bundles a small stdio bridge that forwards tools, resources and prompts to the configured agentmemory daemon and reports connection errors instead of falling back to a separate store. Authenticated non-loopback connections require HTTPS. `npm run plugin:pack:codex` builds a local package with the six Codex hooks and a review package without lifecycle hooks, and `npm run plugin:verify:published` refuses a release whose runtime, MCP shim and iii versions do not match.\n- **Rebuilt viewer that streams every page** (#1433, #1407). One snapshot on connect (`GET /agentmemory/viewer/snapshot`, `GET /agentmemory/counts`), then live `<entity>.created/updated/deleted` events with no polling. 12 tabs in four groups with live counts, deep links, keyboard shortcuts and a mobile menu, a memories detail panel with version chain, diff and provenance, sessions with an inline timeline, and a searchable graph. Cursor pagination and facets on memories, sessions and observations, `GET /graph/node` and `GET /observations/locate` back it.\n- **`GET /agentmemory/status` and a Health tab in the viewer** (#1408). One report of what is wrong and how to fix it: providers and circuit breaker, failing functions, observations missing from the search index, index save state per leg (#1415), the state backend, graph compaction progress, capture inbox and spool, ports, the pinned engine version and every feature flag. HTML for browsers, JSON otherwise.\n- **`GET /agentmemory/consolidation/status`** and a \"Memory layers\" panel (#1407).\n- **Opt-in Redis backend for state and streams**: `AGENTMEMORY_STATE_BACKEND=file|redis` and `AGENTMEMORY_REDIS_URL` (#1425). Use one Redis server per instance, and move data with `agentmemory export` and `import` when switching.\n- **`POST /agentmemory/graph/compact`** trims oversized node, edge, edge history and snapshot provenance in slices (#1454, carries #1445 by david-waltermire), and **`AGENTMEMORY_GRAPH_COMPACT_ON_BOOT`** runs it once after upgrade (#1455).\n- **Stale session sweep**: `AGENTMEMORY_SESSION_SWEEP_ENABLED` and `AGENTMEMORY_SESSION_SWEEP_STALE_HOURS` (#1453, carries #1411 by cristianbdev).\n- **Capture filters for hooks**: `AGENTMEMORY_CAPTURE_ALLOW`, `AGENTMEMORY_CAPTURE_DENY`, `AGENTMEMORY_CAPTURE_OUTPUT_MAX` (default 8000) and `AGENTMEMORY_PRE_COMPACT_BUDGET` (default 1500, 0 disables) (#1452, carries #994 by joyjit).\n- **`AGENTMEMORY_AUDIT_INDEX_PERSIST`** (off by default) re-enables index persistence audit rows for debugging (#1182 by dmazhukov).\n- **`AGENTMEMORY_AUDIT_RETENTION_MONTHS`** and **`AGENTMEMORY_AUDIT_MIGRATE_MAX_BYTES`** for the monthly audit log (#1419).\n- **`AGENTMEMORY_STATE_SAVE_INTERVAL_MS`**, **`AGENTMEMORY_INDEX_SAVE_INTERVAL_MS`**, **`AGENTMEMORY_VECTOR_BUCKET_SIZE`**, **`AGENTMEMORY_VECTOR_BACKFILL`** and **`AGENTMEMORY_VIEWER_STREAM_MAX`** (#1457, #1415, #1416, #1420).\n- **`agentmemory console`** launches the iii web console through the pinned engine; the \"install iii console?\" prompt and the `skipConsoleInstall` preference are gone (#1397).\n- **Multi-instance installs**: `--instance N` gets its own port quartet, data directory and lifecycle state, and `--port` derives the other ports (#892).\n- Procedures are extracted from finished sessions when consolidation is on and an LLM provider is configured (#1407).\n- `memory_patterns` takes an optional `limit` (#1424). `POST /lessons` accepts `sourceIds`, and `mem::evolve` returns 409, 400 and 404 errors (#1433).\n- **OpenCode 2 support in the OpenCode plugin** (#1476, building on #1451 by Tyxiel). One `agentmemory-capture.ts` serves both plugin APIs: OpenCode 2 loads its `setup()` entry and OpenCode 1.x keeps the existing hooks. On OpenCode 2 it captures prompts, tool calls with their output, the assistant's answer, step and compaction events, injects memory on every model call, and requests a summary when a run finishes. Checked in live sessions on OpenCode 2.0.24, 1.18.34 and 1.17.10.\n\n### Fixed\n\n- **Repeated identical prompts are kept** (#1468). Hooks whose host sends no event id or time now include the hook timestamp in the id, so typing the same prompt twice stores it twice; retries still reuse the stored id.\n- **Cursor prompts are stored once** (#1470). A per-session prompt ledger matches the session-end transcript back-fill against live captures, so a back-filled prompt is answered as a duplicate instead of stored a second time. Live prompts are never deduped by content.\n- **Concurrent spool writers cannot overwrite each other** (#1468), and printed recovery commands (dead letter retry, spool drain, graph compact, the status page example) send the bearer token.\n- **Graph provenance is bounded.** Each node and edge records only its own observation ids, capped at 32, which stops huge graph rows from crash-looping the worker during search (#1454, carries #1445 by david-waltermire).\n- **Search skips graph retrieval when `AGENTMEMORY_GRAPH_WEIGHT=0`** (#1446 by david-waltermire).\n- **A failed graph snapshot read no longer zeroes the snapshot**; the delta is aborted instead (#1384 by cbsincool).\n- **The graph snapshot total can no longer be lower than the nodes it returns** (#1385 by cbsincool).\n- **Ending an unknown session no longer creates a partial row** that hung the sessions listing (#1252 by a652).\n- **Memories and vectors written just before `agentmemory stop` survive the restart** (#1449).\n- **Forget and governance deletes count and audit only real deletions** (#1449).\n- **Export refuses an oversized payload before assembling it** and the REST endpoint returns 413; the MCP shim surfaces the refusal (#1449, #1422).\n- **Session and graph read-modify-write paths take locks**, closing lost updates when several agents share one daemon (#1421).\n- **Hooks no longer exit before their observe request is sent** on a slow start (#1456).\n- **A fresh vector index is checkpointed within 5 s** and observations keep a bounded, sanitized copy of their source for replay and export (#1448).\n- **Runtime config is re-seeded on every start**, so `--port`, `--instance` and data-dir changes take effect after the first run (#1396, #1397).\n- **The \"Memory elevated\" alert no longer fires on a healthy process** (#1409).\n- **The viewer stops blinking and keeps data on a failed refresh**, and dashboard numbers match the API (#1407).\n- Consolidation and provider detection use the same check, and functions that need an LLM show as off instead of failed (#1433).\n- Worker shutdown no longer hangs when the engine is already gone (#1396).\n- Fresh installs are portable and persistent, and native and Docker removal stops the worker before the engine (#892).\n- **`OPENAI_EMBEDDING_API_KEY` is honored** when the embedding provider is auto-detected or chosen, and wins over `OPENAI_API_KEY`; blank keys count as unset (#1472).\n- **SessionStart context reaches hosts that expect structured hook output.** When the hook input names the `SessionStart` event, context is returned as `hookSpecificOutput.additionalContext`; hosts that send no event name still get plain text (#1472).\n\n### Security\n\n- **Request hardening** (#1462, supersedes #878 by DaveCole and #922 by Srinath279). Auth on by default, origin and content type checks on writes, and confined file paths, as described under Breaking changes. Confined files are replaced only after the new content is fully written, and a destination that is a symlink is refused.\n- **Scrubbing on every write** (#1462). Write functions run the secret scrubber on their input, and compression, summary, crystal, graph, replay, team share, session title, commit message and image description text is scrubbed before storage. New patterns cover PEM private key blocks and credentials in URLs. Stored text is escaped before it goes into the injected context block.\n- **Clients resolve the API secret the same way as the server** (#1462): environment first, then `~/.agentmemory/.env`, then the generated secret file, and the stored secret is only sent to loopback URLs.\n- **Supply chain** (#1461). The automatic engine installer verifies the downloaded archive against a SHA-256 pinned in the CLI for each platform before extracting it, and refuses an unpinned version or platform. `npm run engine:hashes` refreshes the pins. Installer paths reach the shell as arguments, so a home directory containing shell syntax is never evaluated. The CI workflow runs with read-only permissions, and the deploy Dockerfiles check that the copied iii binary matches `III_VERSION`.\n- `GET /agentmemory/status` serves HTML with no scripts under a strict CSP and the same bearer auth as the rest of the API (#1408).\n- The Redis URL stays out of files and output (#1425).\n- `mem::governance-bulk` cannot widen a dry run to the whole store (#1449).\n- The pinned engine starts with `--no-update-check` and iii's anonymous usage telemetry off (#1396).\n- A profile read no longer writes a `share` audit entry (#1433).\n\n### Performance\n\n- **Vectors are stored per key in fill-and-roll buckets**, so a save rewrites a few buckets instead of the whole index and the store no longer hits V8's string limit at about 49,000 vectors (#1416).\n- **Index saves are throttled and each leg reports its own state**, so one failing leg no longer skips the others (#1415).\n- **The audit log lives in monthly scopes** read newest first (#1419).\n- **Session start context and observation lookups use small secondary indexes** instead of listing every session (#1418).\n- **`mem::remember` calls the embedding provider outside the global save lock** (#1423).\n- **`mem::patterns` is bounded** to recent sessions and an observation budget (#1424).\n- **Consolidation decay writes only rows that changed** (#1417).\n- **The viewer stream backlog is bounded** (#1420).\n- **Faster state saves**, `MALLOC_ARENA_MAX=2` for the engine on Linux, and a higher open-file limit in Docker and deploy entrypoints (#1457).\n\n### Docs and internal\n\n- **agent-memory.dev is rebuilt** around use cases and sourced proof: agent sessions showing what memory changes, a view of the 1,571 tokens the next session gets out of a month of history, live GitHub and all-time npm numbers, and new /benchmarks, /security, /privacy, /changelog and /vs comparison pages. It ships robots.txt, a sitemap, llms.txt and llms-full.txt, and link previews now point at agent-memory.dev instead of a parked domain.\n- `npm run docs:sync` and `npm run docs:check` keep the documented counts and versions in README, the translated READMEs and AGENTS.md in step with the code.\n- The README documents auth by default, request rules, file path roots, the capture inbox and spool, and the pending vector log (#1460, #1462, #1467).\n- The README, the config skill reference and `agentmemory --help` document `AGENTMEMORY_III_CONFIG` and the engine bind address, including the Docker engine config (#1472).\n- Code and tests no longer cite issue or PR numbers (#1469).\n- The `index_persist` audit gating suite is restored against bucketed persistence and monthly audit scopes (#1477), originally written by dmazhukov in #1182.\n- Unit tests grew from about 1,700 to more than 2,400.\n- Dependabot no longer proposes `iii-sdk` bumps; the engine pin and the SDK move together by hand (#1396). `dotenv` 18.0.3 (#1430) and `@types/node` 26.6.2 (#1401, #1400).\n- The deploy Dockerfiles refuse to build when `III_VERSION` and `III_SDK_VERSION` differ (#1396).\n- Thanks to MarvinFS (discussion #1358), inix-x, sbynode-ux, ErikBPF and cmondragon023, whose measurements and earlier PRs shaped the scaling work."+ },+ {+ "version": "0.9.29",+ "date": "2026-08-16",+ "body": "Release wave in two parts. Recall quality: hybrid ranking reaches the primary recall path, lessons get a real index, every record learns where it came from, the knowledge graph populates keyless, and agent scoping threads through all save paths — plus connector parity for pi and Codex, a new DeepSeek Harness connector, current provider model defaults, and a viewer clarity pass. Foundation: the `.env` file now applies everywhere, imports become searchable, consolidation runs on session stop, twelve MCP-only agents get activated on connect, and every capture surface agrees on what \"project\" means. No breaking changes; read the upgrade notes for behavior changes you will notice.\n\n### Upgrade notes\n\n- `~/.agentmemory/.env` values that were silently ignored by most modules now take effect on boot. If that file has stale entries from past experiments, review it before upgrading.\n- `agentmemory connect <agent>` now writes a short memory-usage guideline into the agent's native rules file (Cursor, Cline, Continue, Zed, Warp, Kiro, Gemini CLI, Qwen, OpenCode, Droid, Copilot CLI, Antigravity) so MCP-only agents actually call the memory tools. Pass `--no-guidelines` to opt out.\n- Installs with an LLM key now run consolidation and crystallization on session stop (previously they never fired), debounced to once per 5 minutes (`AGENTMEMORY_CONSOLIDATION_COOLDOWN_MS`).\n- Local embeddings re-download once after the `@huggingface/transformers` migration (different model cache directory). Model IDs are unchanged.\n\n### Added\n\n- **Two new skills (15 → 17).** `memory-discipline` (reference) codifies the session loop the memory model expects: recall before nontrivial work, save decisions with their reasons at the moment they settle, route corrections into lessons. `/lesson` (invocable) distills a correction into a confidence-weighted rule via `memory_lesson_save`, echoing the saved rule back for veto.\n\n- **Devin support.** New `agentmemory connect devin` adapter wires the MCP entry into Devin CLI's user config, and `--with-hooks` installs six native auto-capture hooks (`SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `Stop`, `SessionEnd`) using Devin's lowercase tool matchers — the capitalized Claude Code matchers Devin also loads never match its tool names, so capture looked wired but never fired. A Devin plugin manifest at `plugin/.devin-plugin/plugin.json` registers all 17 skills as `/agentmemory:<skill>` slash commands plus the MCP server. Hook payloads now resolve the project from `DEVIN_PROJECT_DIR`, and session-start context injection answers each host in its own shape (Devin's `hookSpecificOutput.additionalContext`, Cursor's `additional_context`, Claude Code's raw stdout). Verified against Devin CLI 3000.1.23.\n\n- **Cursor plugin.** Full Cursor Marketplace plugin (`.cursor-plugin/`): 7 native auto-capture hooks (`sessionStart`, `beforeSubmitPrompt`, `preToolUse`, `postToolUse`, `postToolUseFailure`, `stop`, `sessionEnd`), all 17 skills, and the MCP server, with `AGENTMEMORY_URL` / `AGENTMEMORY_SECRET` declared as dashboard-managed plugin variables. Hook scripts accept Cursor's payload dialect (`conversation_id` session fallback, `workspace_roots` project attribution) without changing Claude Code behavior, and context injection answers each host in its own output shape. Cursor's CLI print mode never dispatches `beforeSubmitPrompt`, so session end backfills user prompts from the session transcript; server-side dedup absorbs the re-post where a live hook already captured the prompt. Verified end to end against Cursor 3.13.25, GUI and `cursor-agent` CLI.\n\n- **Write-time provenance on every record.** Each observation and memory carries an immutable origin block (channel `user` / `agent` / `tool` / `import` / `shared`, detail, capturedAt) stamped at capture, save, and import, and inherited through both compression paths. The base for trust-aware retrieval and ingest screening.\n- **`similarTo` advisory hint on save.** `mem::remember` reports a near-miss similarity match (0.4 to 0.7) back to the caller so agents can spot near-duplicates without the write being blocked.\n- **`AGENTMEMORY_LLM_NOTHINK=1`** (opt-in): asks local reasoning models to skip their hidden thinking pass during graph extraction. Extraction runs faster; relation quality can drop slightly. Default behavior unchanged; documented in `.env.example`.\n- **Keyless graph extraction.** `mem::graph-extract` always runs a deterministic structural pass first: files and concepts on compressed observations become nodes, and co-occurrence within an observation becomes a `related_to` edge. The graph now populates without any LLM key; `GRAPH_EXTRACTION_ENABLED` plus a provider key gates only the LLM pass that layers typed relations (fixes, depends_on, causes) on top. Session end fires extraction unconditionally.\n- **pi extension: capture parity with the Claude Code plugin.** Session registration on start (after the health check populates reachability, so it fires on the first session of a fresh process), prompt capture on submit (deduped in a 5-minute client window against auto-retry re-submissions; stored with user-channel provenance), per-tool observations from `tool_result` (server `inferType` classifies command_run / file_edit / file_read; `AGENTMEMORY_TOOL_OBSERVE=0` opts out), turn capture slices raised 500/4000 → 8000/8000, `memory_save` scoped to the current project instead of the global bucket, session end + one cross-session consolidate run on real quit only (`/new`, `/resume`, `/fork`, reloads excluded; no client-side summarize call — `session/end` already fans out the summary, avoiding the double-summarize the Stop hook had), status checks accept `status: \"ok\"`, and the status refresh no longer throws a stale-context error when the session is replaced mid-health-check. Live-verified on pi v0.84.2: prompt + turn observations landed and the session closed as `completed` on quit. Codex executes only hooks with a recorded `trusted_hash` and shows its \"Hooks need review\" approval prompt exclusively in the interactive TUI, so a `codex exec`-only workflow left the freshly installed hooks silently inert. `connect codex --with-hooks` now warns to launch `codex` once and choose \"Trust all and continue\" (and to re-approve after upgrades, since refreshed paths change the hash). Found by live-testing the documented flow end to end.\n- **`connect pi` actually installs.** The pi adapter was a stub that printed manual copy instructions because `integrations/` never shipped in the npm package. The extension source now ships, and `connect pi` copies it into `~/.pi/agent/extensions/agentmemory/`, which pi auto-discovers — no settings.json edit, `/reload` picks it up live. Idempotent by content compare; `--force` and stale copies refresh with a backup. `integrations/pi` is also a proper pi package now (`pi-package` keyword, `pi.extensions` manifest, peer deps on `@earendil-works/pi-coding-agent` + `typebox`; private, local installs only — `pi install ./integrations/pi` from a checkout), and the extension's type import moved off the renamed upstream package name.\n- **DeepSeek Harness connector.** `agentmemory connect dsh` appends an `@deepseek-ai/dsh-mcp-client` row to the home-level `$DSH_HOME/cordis.patch.yml`, the machine-local patch layer every Harness profile loads. `--with-hooks` adds full auto-capture: the bundled Claude Code hook scripts run through Harness's first-party `@deepseek-ai/dsh-hooks-claude-code` bridge (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop) via a manifest written to `$DSH_HOME/agentmemory.hooks.json` with absolute script paths. Idempotent, `--force` replaces the rows, honors `DSH_HOME`.\n- **Viewer clarity pass.** Two-pane session explorer (list beside a sticky detail panel on wide screens), dashboard stat cards that navigate to their tabs, memory and lesson rows that expand to the full stored record with raw JSON and origin provenance, type-clustered graph layout with label collision avoidance when relations are sparse, health notes translated from machine slugs into sentences, honest zero states for consolidation and graph, and the official icon as the favicon.\n- `--data-dir` flag and `AGENTMEMORY_DATA_DIR` so iii-engine state lives outside repositories, with gated legacy `./data` adoption and Docker-volume preservation (#314)\n- Native hooks adapter for Droid via `~/.factory/hooks.json`, reusing the bundled hook scripts (#1130)\n- Native hooks adapter for Antigravity CLI (agy) via a stdin bridge that normalizes agy's hook payloads onto the bundled hook scripts, with an explicit PreToolUse allow decision (#1146, thanks @berthojoris)\n- `mem::graph::import-graphify` and `POST /agentmemory/graph/import-graphify`: merge graphify's `graph.json` into the knowledge graph with confidence tags carried over as edge weights (#1136)\n- Connector guideline activation for twelve hook-less agents, with every rules-file path verified against the agent's official documentation (#1136)\n- Honest `memory_forget` reporting plus a real lesson delete path (`mem::lesson-delete`, `DELETE`-style REST route, MCP tool) (#1132)\n- `AGENTMEMORY_PROJECT_NAME` override in the OpenCode plugin (#1125)\n- Provider fetches retry 429/503 honoring `Retry-After` under a total-elapsed budget capped below the iii invocation timeout (#1136)\n\n### Changed\n\n- **Provider default models bumped to current generations.** OpenAI `gpt-4o-mini` → `gpt-5.6-luna`, Anthropic `claude-sonnet-4-20250514` (deprecated upstream, retires 2026-06-15) → `claude-sonnet-5`, Gemini `gemini-2.5-flash` → `gemini-3.7-flash` (current stable Flash), MiniMax `MiniMax-M2.7` → `MiniMax-M3`, OpenRouter `anthropic/claude-sonnet-4-20250514` → `anthropic/claude-sonnet-5`. The premium-model cost warning now also matches OpenAI's Sol flagship tier, and its cheap-alternative hint leads with `deepseek/deepseek-v4-flash-0731`. Explicit `*_MODEL` env overrides are unaffected. Embedding defaults are unchanged (`text-embedding-3-small`, `gemini-embedding-001`, local MiniLM are all current). README local-model picks refreshed to the Qwen 3 / gpt-oss / DeepSeek R1 generation.\n- Local embeddings migrate from `@xenova/transformers` to `@huggingface/transformers` v4 with Node 22+ support; CI now tests Node 20, 22, 24, and 26 (#479, #1096)\n\n### Fixed\n\n- **MCP protocol version negotiation.** The standalone MCP server hardcoded `protocolVersion: \"2024-11-05\"` and ignored the client's requested version, so hosts that drop that revision disconnected with `-32000` ([#908](https://github.com/rohitg00/agentmemory/issues/908)). `initialize` now echoes any supported revision (`2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05`) and answers with the latest supported otherwise.\n\n- **Hybrid ranking on the primary recall path.** `mem::search` (behind `memory_recall`) now ranks through the full BM25 + vector + graph fusion when the vector index is populated; it was keyword-only while only smart-search got hybrid ranking. Fusion weights normalize per item over the streams that actually ranked it, with an explicit cross-stream agreement bonus, replacing the every-enabled-stream denominator that permanently penalized single-stream hits. Result order is deterministic (score, best rank, id).\n- **Indexed lesson recall.** Lessons get a dedicated in-memory BM25 index built lazily from one KV list and maintained incrementally on save, delete, and decay; recall previously listed and substring-scanned the whole corpus per query. A record cache beside the index takes recall to zero KV round-trips.\n- **Superseded versions leave recall.** Superseded memory versions are removed from the BM25 and vector indexes; the version chain stays in KV for history, but recall no longer returns an outdated fact as if current. `mem::remember` also finds supersession candidates through the search index (top 50) instead of walking every memory per save, with a full-scan fallback while the index is cold.\n- **`agentId` threads through every save path** ([#1159](https://github.com/rohitg00/agentmemory/issues/1159), [#1160](https://github.com/rohitg00/agentmemory/issues/1160), [#1197](https://github.com/rohitg00/agentmemory/issues/1197)). REST `/agentmemory/remember` forwards `agentId` instead of dropping it; `memoryToObservation()` carries the memory's `agentId` into the search-index shape so saved memories are visible to agent-scoped search; the MCP `memory_save` schema exposes `agentId` and the standalone stdio package forwards both `agentId` and `project`.\n- **Per-session project attribution in the OpenCode plugin** ([#1188](https://github.com/rohitg00/agentmemory/issues/1188)). Project and cwd resolve from each session's own directory at `session.created` (pruned on session end) instead of module-level state that filed every session in a multi-directory OpenCode process under whichever repo loaded the plugin first.\n- **Prompt dedup no longer swallows prompts** ([#1173](https://github.com/rohitg00/agentmemory/issues/1173)). Hooks hash the payload when `tool_input` is absent, so prompt_submit, notification, and lifecycle events dedup on content instead of collapsing onto one shared key that silently dropped every prompt after the first in a TTL window.\n- **Stop hook no longer summarizes twice** ([#1203](https://github.com/rohitg00/agentmemory/issues/1203)). The direct `/agentmemory/summarize` POST is gone; `/session/end` already fans out `event::session::stopped`, which runs `mem::summarize`.\n- **Safe Docker-mode stop** ([#1151](https://github.com/rohitg00/agentmemory/issues/1151)). The CLI refuses to adopt or signal Docker/VM port holders (com.docker.backend, vpnkit, colima) as the native engine unless `--force`; Docker-mode teardown is scoped to agentmemory's own compose services instead of an unscoped `down`; the native worker is reaped before Docker teardown instead of deleting `worker.pid` with the process still running.\n- **Viewer live stream and freshness.** The stream WebSocket target resolves from `/agentmemory/livez` (new `streamsPort` field) instead of viewerPort-1 arithmetic, which pointed at the wrong server whenever the viewer bound a fallback port and silently degraded live updates to polling. Tab data refetches on entry (with a freshness gate), so a memory saved by the agent appears without a hard reload.\n- **Hermetic tests** ([#1178](https://github.com/rohitg00/agentmemory/issues/1178)). HOME/USERPROFILE are isolated for the whole vitest run so suites stop reading the developer's real `~/.agentmemory/.env`.\n- Boot hydrates `~/.agentmemory/.env` into `process.env`, closing the class of \"env var in .env is ignored\" bugs (#1136)\n- Imported and replayed observations are indexed into BM25 and the vector index, so imports are searchable (#1072, via #1136)\n- Snapshot timer actually runs, non-positive intervals clamp to the default, and snapshot creation is serialized across timer, REST, and MCP (#1006, via #1136)\n- CJK-aware dedup with NFC normalization and an exact-match fallback for short memories (#1021, via #1136)\n- OpenRouter embeddings no longer hardcode 1536 dimensions (#1002, via #1136)\n- Viewer decodes multibyte request bodies correctly (#930, via #1136)\n- Session-stop consolidation is debounced and no longer double-fires from the client hook; eviction recovery is bounded to one consolidation pass (#1087, #1131 class, via #1136)\n- `/agentmemory/sessions` no longer deadlocks on large session counts (#1100, via #1136)\n- Filesystem watcher validates roots before `fs.watch`, fixing Node 24/26 on Linux (#1136)\n- `GET /agentmemory/export` and `/agentmemory/mesh/export` refuse an over-frame response instead of shipping it: a payload past the engine 16 MiB transport frame used to drop the worker and 404 every endpoint for ~1s. They now fail that one request (413 for mesh, an `oversized` error for export) with a hint to narrow the range, keeping the daemon up (#1142, #890). Full pagination of the non-session collections is a follow-up.\n- Claude bridge writes `MEMORY.md` under the `memory/` subdirectory Claude Code actually reads (#1134)\n- Hook project-resolution tests no longer depend on the checkout directory name (#1137, #1138)\n- Project-scope parity: the OpenCode plugin, Hermes plugin, Pi extension, and JSONL replay now resolve `project` the same way the hooks do (env override, git toplevel basename, cwd basename) instead of sending raw filesystem paths, so the same repository shares one memory bucket across agents (#903, #1135); the filesystem watcher accepts `AGENTMEMORY_PROJECT_NAME` with the old `AGENTMEMORY_PROJECT` kept as a deprecated alias; replay handles Windows-recorded paths\n- OpenCode file enrichment matches the agent's lowercase tool names, which the previous capitalized set never did\n- Viewer surfaces health status from non-2xx health responses (#1046)\n- Documented REST endpoint count matches the registered routes again (130)"+ },+ {+ "version": "0.9.28",+ "date": "2026-07-19",+ "body": "Patch release: hardens the hook runner against malformed payloads and closes a cross-agent context leak. No breaking changes; drop-in upgrade.\n\n### Security\n\n- **Cross-agent memory leak via `POST /agentmemory/context`** ([#1057](https://github.com/rohitg00/agentmemory/issues/1057)). `mem::context` and its `api::context` handler filtered candidate sessions by `project` only, so under `AGENTMEMORY_AGENT_SCOPE=isolated` one profile could receive another profile's session observations and summaries whenever they shared a project path — while `/search` and `/smart-search` already filtered correctly. `mem::context` now applies the same agent-scope filter as `mem::search` ([#817](https://github.com/rohitg00/agentmemory/issues/817)): explicit `agentId` pins, wildcard `agentId: \"*\"` bypasses, isolated mode falls back to env `AGENT_ID`, and the call fails closed if isolated mode is on with no resolvable agent id. All three callers (`api::context`, `api::session::start`, `event::session::started`) now forward `agentId`.\n\n### Fixed\n\n- **Hooks crashed with exit code 1 on a `null` JSON payload** ([#1047](https://github.com/rohitg00/agentmemory/issues/1047)). `JSON.parse(\"null\")` returns `null` without throwing, so the existing parse guard passed it through and the first `data.session_id` access threw a `TypeError`. Because each hook called `main()` bare, that became an unhandled rejection and the host CLI (Codex CLI, Claude Code) reported \"hook exited with code 1\" on every affected tool call. All 13 hook entrypoints now guard `if (!data || typeof data !== \"object\")` before dereferencing, and wrap the top-level `main()` in `.catch()` so any hook error fails closed (silent exit 0) instead of surfacing to the host tool loop.\n\n### Docs\n\n- Refreshed stale stats in README and AGENTS.md (AGENTS test count 950+ → 1,428+, iii-function count 50+ → 260+) plus the README source-file, LOC, function, and KV-scope counts, and regenerated the website meta snapshot for 0.9.28. Removed the rate-limited star-history chart from the README and all 11 translations."+ },+ {+ "version": "0.9.27",+ "date": "2026-06-07",+ "body": "Wave release closing several breaking regressions reported against v0.9.26, plus an agent-scope isolation security fix, an iii version-pin audit fix, and a benchmark scorecard correction. No breaking changes; drop-in upgrade.\n\n### Security\n\n- **`AGENTMEMORY_AGENT_SCOPE=isolated` not enforced on `mem::search` / `POST /agentmemory/search` / `memory_recall` / `recall_context`** ([#817](https://github.com/rohitg00/agentmemory/issues/817)). PR #654's isolation work covered smart-search, `/memories`, `/observations`, and `/sessions` but missed the BM25-only recall path. An isolated worker booted with `AGENT_ID=B` could read agent A's memories via the standard MCP `memory_recall` tool. `mem::search` now applies the same filter as smart-search (wildcard `agentId: \"*\"` bypasses, explicit `agentId` pins, isolated mode falls back to env `AGENT_ID`). `recall_context` prompt also filters its kv.list memory feed by active agent. Fail-closed: if isolated mode is on and no agent id resolves from any source, the call throws rather than dropping the filter.\n\n### Fixed\n\n- **`/graph/query` and `/graph/stats` timed out with `\"Invocation stopped\"` on large existing corpora** ([#814](https://github.com/rohitg00/agentmemory/issues/814), [PR #816](https://github.com/rohitg00/agentmemory/pull/816)). The v0.9.25 fix from #753 paginated the response but the unbounded `kv.list<GraphNode>` + `kv.list<GraphEdge>` pair still ran on every call. At 75K+ nodes the response payload exceeded the iii heartbeat budget and the worker was declared dead before the new wall-clock timer could fire. Refactored `mem::graph-extract` to maintain three side-indexes (`graphNameIndex`, `graphEdgeKey`, `graphNodeDegree`) so every extract path is O(1), never O(n). The hot path now reads exclusively from a precomputed top-degree snapshot updated inline on every extract. Same `kv.list` bottleneck was also blocking `mem::graph-extract` on every observation capture, so the fix immediately speeds up the observation pipeline too.\n- **All data lost on `agentmemory stop` followed by restart** ([#843](https://github.com/rohitg00/agentmemory/issues/843)). `runStop()` killed the iii engine first, then the worker. The worker's shutdown handler flushes BM25/vector snapshots and audit rows via `indexPersistence.save() -> kv.set() -> state::set`, which all routed through an iii engine that was already dead. Stop order inverted: worker first with a bumped 5s SIGTERM grace (gives a large index a real chance to commit), engine second. The \"Memories persisted to disk\" message now reflects actual disk state.\n- **`mem::graph-snapshot-rebuild` and `mem::graph-reset` heartbeat-crashed on legacy >25K-node corpora** ([#825](https://github.com/rohitg00/agentmemory/issues/825)). Both endpoints called `kv.list` up front. At 75K nodes the response payload blocks the event loop in `JSON.parse` and the iii heartbeat starves before any wall-clock budget timer can fire. `mem::graph-snapshot-rebuild` now refuses pre-flight when no prior snapshot exists, returning `{ legacyCorpus: true }` with operator guidance unless an explicit `force: true` flag is set. `mem::graph-reset` no longer enumerates anything: it writes an empty snapshot stamped with `resetAt` and returns. Legacy rows stay as on-disk orphans but post-reset `mem::graph-extract` calls compare each name-index hit's `createdAt` against `resetAt`, so older rows are treated as not-found and a fresh node is written instead of silently reconnecting to a pre-reset orphan.\n- **Multi-instance port collisions on one host** ([#750](https://github.com/rohitg00/agentmemory/issues/750), [PR #815](https://github.com/rohitg00/agentmemory/pull/815)). `--port N` only relocated REST + viewer; streams (3112) and iii engine (49134) stayed hardcoded so a second daemon collided on those WS ports regardless of `--port`. `loadConfig()` now derives streams = REST+1 and engine = REST+46023 (so the canonical 3111 → 3112/49134 default is unchanged, and `--port 3211` → 3212/49234). New `--instance N` shortcut picks a 100-port block: `--instance 1` → 3211/3212/3213/49234. Per-port env overrides (`III_STREAM_PORT`, `III_ENGINE_PORT`, `III_ENGINE_URL`) still win.\n- **iii console install pulled latest engine instead of the pinned v0.11.2** (audit). `III_CONSOLE_INSTALL_CMD` ran `curl -fsSL https://install.iii.dev/iii/main/install.sh | sh` with no version pin. A fresh first-run prompt could install a console build that talks a different protocol than the engine agentmemory pins. The install script reads a `VERSION` env var (`engine_version=\"${VERSION:-}\"` in install.sh), so the command now passes `VERSION=${IIPINNED_VERSION}`. Render path is platform-aware too: Windows users get a PowerShell-friendly hint instead of a POSIX command they can't run. Mismatch error text updated from \"reinstall the latest binary\" to reference the pinned version explicitly.\n\n### Docs\n\n- **Corrected coding-agent-life-v1 P@5 numbers in the published scorecard** ([#796](https://github.com/rohitg00/agentmemory/issues/796), [PR #805](https://github.com/rohitg00/agentmemory/pull/805)). The original scorecard reported P@5 = 0.578 / 0.267, generated before [PR #562](https://github.com/rohitg00/agentmemory/pull/562) changed the P@K denominator from `topK.length` to `k`. On the current formula those numbers are mathematically impossible (math ceiling at K=5 on this corpus is 0.240). Re-scored on v0.9.26: hybrid 0.240 / R@5 1.000, grep 0.227 / R@5 0.967. Reframed lift as recall + temporal not aggregate precision; aggregate P@5 saturates on a small / single-gold corpus and can't differentiate top-tier adapters.\n- **README refresh** ([PR #807](https://github.com/rohitg00/agentmemory/pull/807)). Stats line bumped to 174 files / 1,390+ tests / 258 functions. Corrected hero P@5 numbers. \"New in vX.Y.Z\" callout block removed since that pattern went stale every release; latest release notes link points at CHANGELOG.md.\n- **`import-jsonl` users warned about Claude Code's `cleanupPeriodDays`.** Default 30-day auto-deletion of `~/.claude/projects/*.jsonl` doesn't affect hook-wired installs (each turn lands in iii state while the session is live), but fresh installs on months-old Claude Code histories silently lost anything older than 30 days. README now flags this with three workarounds: cron the import, raise `cleanupPeriodDays`, or wire hooks.\n\n### Added\n\n- **`POST /agentmemory/graph/snapshot-rebuild`** — pays the full enumeration cost once on corpora ≤ 25K nodes, persists a top-degree subgraph + aggregate counts, refuses with `{ success: false, tooLarge: true, totalNodes, ceiling }` above the safe ceiling instead of killing the worker. Strict `force: true` boolean check bypasses the legacy-corpus pre-flight refusal.\n- **`POST /agentmemory/graph/reset`** — clean-restart escape hatch for legacy corpora. Enumeration-free: writes empty snapshot with `resetAt` epoch marker. Future extracts treat any pre-`resetAt` row as orphan via `createdAt` comparison.\n- **`--instance N` CLI flag** — multi-daemon convenience. Picks a 100-port block off the 3111 base. Max N=50.\n- **`GraphSnapshot.topDegrees`** — synchronous degree lookup keyed by nodeId so re-ranking after edge writes runs sync over numbers instead of async kv.get inside the sort comparator.\n- **`GraphSnapshot.resetAt`** — ISO timestamp set by `mem::graph-reset`. Drives post-reset orphan detection in extract.\n- **`GraphQueryResult.fromSnapshot`** + **`GraphQueryResult.warning`** — response fields the viewer can use to surface \"served from cache\" or \"rebuild needed\" banners instead of opaque 500s.\n\n### Changed\n\n- **REST endpoint count: 126 → 128**. `POST /agentmemory/graph/snapshot-rebuild` and `POST /agentmemory/graph/reset` added.\n- **`mem::graph-stats`** now reads exclusively from the snapshot. Returns `{ ..., fromSnapshot, warning }` envelope when snapshot is absent; never returns a 500.\n- **`mem::graph-query` empty-body / nodeType-only path** reads exclusively from the snapshot. `startNodeId` / `query` paths keep the live enumeration behind a 6s budget with snapshot-backed fallback on rejection.\n- **`mem::search` over-fetch** triggers when agentId filtering is active (not just project/cwd). Without it, isolated-mode pages were silently underfilled when same-agent matches ranked below cross-agent ones.\n\n### Known limitations\n\n- `mem::graph-query` BFS (`startNodeId`) and text-search (`query`) paths still call `kv.list` and degrade past ~25K nodes on fresh corpora ([#828](https://github.com/rohitg00/agentmemory/issues/828)). The hot path stays safe (snapshot-only). A per-node adjacency index is the right next fix; deferred to the structured graph migration milestone ([#309](https://github.com/rohitg00/agentmemory/issues/309)).\n- `/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.\n- `crypto.randomUUID()` global-only on Node <19 ([#715](https://github.com/rohitg00/agentmemory/issues/715)). Drop-in import fix tracked."+ },+ {+ "version": "0.9.26",+ "date": "2026-06-03",+ "body": "Hotfix on top of v0.9.25. The first-run boot crashed for users without a persisted index because the load path didn't handle `undefined` returns from iii-state adapters.\n\n### Fixed\n\n- **First boot crash: `TypeError: Cannot read properties of undefined (reading 'v')`** ([#797](https://github.com/rohitg00/agentmemory/issues/797)). The sharded index load path (`loadShardedData`) checked `manifest.value !== null` before forwarding to `loadManifestData`. Some iii-state adapters return `undefined` (not `null`) for a missing key, so `undefined !== null` was true and `loadManifestData(undefined, ...)` immediately threw on `manifest.v`. Now treats both `null` and `undefined` (plus non-object values) as \"no manifest\" and falls through to the legacy load path. Self-healing: the next debounced save rebuilds a fresh manifest, so the crash was already cosmetic for ongoing operation — but it scared every fresh upgrader. Tests cover both undefined and wrong-shape manifest rows."+ },+ {+ "version": "0.9.25",+ "date": "2026-06-03",+ "body": "Bug-fix wave closing every breaking regression reported against 0.9.24, plus a feature lane (graph pagination + smart-search followup diagnostic + obsidian-export hardening + sharded index persistence). Eleven issues closed. No breaking changes; drop-in upgrade.\n\n### Fixed\n\n- **Cross-provider fallback always 404'd and tripped the circuit breaker** ([#778](https://github.com/rohitg00/agentmemory/issues/778), [PR #791](https://github.com/rohitg00/agentmemory/pull/791)). `createFallbackProvider` copied the primary provider's `model` into every fallback config. With OpenAI primary + Gemini fallback, Gemini was called with `gpt-4o-mini` and 404'd on every call, tripping the circuit breaker and blocking downstream LLM ops. Each fallback now resolves its own env-driven default (`OPENAI_MODEL` / `GEMINI_MODEL` / `ANTHROPIC_MODEL` / `MINIMAX_MODEL` / `OPENROUTER_MODEL`).\n- **`import-jsonl` aborted entire batch on legacy session row missing `id`** ([#775](https://github.com/rohitg00/agentmemory/issues/775), [PR #791](https://github.com/rohitg00/agentmemory/pull/791)). Existing-session branch re-keyed on `existing.id` which could be undefined for older rows. `JSON.stringify` dropped the key from the `state::set` payload, the engine returned `missing field \\`key\\``, and the rejection aborted the whole handler. Now re-keys on `parsed.sessionId` and backfills `existing.id`.\n- **`parseSummaryXml` silently dropped summaries wrapped in markdown fences** ([#783](https://github.com/rohitg00/agentmemory/issues/783), [PR #791](https://github.com/rohitg00/agentmemory/pull/791)). DeepSeek / GPT / occasionally Anthropic responses wrap structured XML in ` ```xml ... ``` ` fences with optional conversational text. The raw payload went straight to the tag regex and returned `parse_failed`. New `stripXmlWrappers()` peels markdown fences + pre/postamble; final-merge parse path retries once on failure (matching chunk-level behavior).\n- **`sdk.triggerVoid is not a function` on iii-sdk 0.11.2** ([#758](https://github.com/rohitg00/agentmemory/issues/758), [#726](https://github.com/rohitg00/agentmemory/issues/726), [PR #773](https://github.com/rohitg00/agentmemory/pull/773)). iii-sdk 0.11.2 removed `triggerVoid` in favor of `trigger({ action: TriggerAction.Void() })`. Nine call sites still used the removed API; six ran without try/catch and threw `TypeError`, breaking image lifecycle, disk-quota cleanup, vision embeddings, and observation write paths.\n- **pi integration recorded every observation as \"No content provided\"** ([#759](https://github.com/rohitg00/agentmemory/issues/759), [PR #772](https://github.com/rohitg00/agentmemory/pull/772)). pi sent `data.input` / `data.output` but `observe.ts` reads `data.tool_input` / `data.tool_output`. Field-name mismatch left `raw.toolInput` / `raw.toolOutput` undefined; the compress pipeline produced empty observations.\n- **Fresh global install refused to boot when PATH iii didn't match the runtime pin** ([#752](https://github.com/rohitg00/agentmemory/issues/752), [PR #774](https://github.com/rohitg00/agentmemory/pull/774)). The hard-pin enforcer told users to overwrite their global iii with v0.11.2, but the v0.11.2 release ships only `iii` (not `iii-init` / `iii-worker`) on some platforms. agentmemory now installs to `~/.agentmemory/bin/` and auto-falls-back to it when PATH iii mismatches the pin. User's existing iii install stays untouched.\n- **`mem::obsidian-export` HTTP 500 `[object Object]` on any record missing `id`** ([#729](https://github.com/rohitg00/agentmemory/issues/729), [PR #780](https://github.com/rohitg00/agentmemory/pull/780)). `sanitize(undefined.id)` threw outside the per-record try and escaped the whole handler. Four-layer hardening: id filter, safe-array / safe-string / safe-timestamp normalizers, outer try/catch, fail-safe session sort.\n- **Concurrent agent-sdk summarize chunks failed with `too_many_chunks_skipped`** ([#781](https://github.com/rohitg00/agentmemory/issues/781), [PR #782](https://github.com/rohitg00/agentmemory/pull/782)). `AGENTMEMORY_SDK_CHILD` recursion guard mutated `process.env` globally; concurrent chunks under `Promise.all` saw the marker and returned empty. Recursion guard now scoped to `AsyncLocalStorage`; the `process.env` marker stays for cross-process hook inheritance, reference-counted so overlapping calls don't race.\n- **Viewer #graph tab blank on large graphs** ([#753](https://github.com/rohitg00/agentmemory/issues/753), [PR #789](https://github.com/rohitg00/agentmemory/pull/789)). `POST /agentmemory/graph/query` with `{}` on an 11k+ node corpus returned HTTP 500 `Invocation stopped`. `graph/query` now accepts `limit` / `offset`, applies a default cap (500) ranked by node degree, restricts page edges to in-page endpoints, and returns `totalNodes` / `totalEdges` / `truncated`. The viewer issues a bounded initial query, distinguishes server-error from empty-corpus, renders an actionable error banner with Retry.\n\n### Added\n\n- **Sharded BM25/vector index persistence with manifest commit/rollback** ([#762](https://github.com/rohitg00/agentmemory/issues/762), [PR #764](https://github.com/rohitg00/agentmemory/pull/764), contributed by [@Rokurolize](https://github.com/Rokurolize)). Large BM25/vector snapshots used to save as monolithic strings and failed past the iii state size ceiling. Each snapshot now writes as bounded shards under a generation-scoped prefix, with a manifest published only after all shards commit. Rollback on shard-write failure, fail-closed on length mismatch, legacy snapshot load preserved for downgrade compat. 957 LOC + 25 tests covering rollback / partial-commit / fail-closed paths.\n- **Smart-search followup-rate diagnostic** ([#771](https://github.com/rohitg00/agentmemory/issues/771), [PR #786](https://github.com/rohitg00/agentmemory/pull/786)). Disambiguates retrieval bugs from reader bugs. When an agent issues a second `smart-search` within `AGENTMEMORY_FOLLOWUP_WINDOW_SECONDS` (default 30s) and the new result set has zero overlap with the prior one, counts as a directional \"first results didn't satisfy\" signal. OTEL counter `agentmemory.smart_search.followup_within_window_total`, `GET /agentmemory/diagnostics/followup` REST endpoint, `agentmemory status` surface, viewer-source exclusion via `X-Agentmemory-Source: viewer` header.\n\n### Changed\n\n- **Dependency bumps + zero `npm audit` vulnerabilities** ([PR #779](https://github.com/rohitg00/agentmemory/pull/779)). `@anthropic-ai/sdk` 0.93 → 0.100.1, `tsdown` 0.20.3 → 0.21.10 (stays on Node 20 floor), `@types/node` 25.7 → 25.9, website `next` 16.2.6 → 16.2.7 + React 19.2.7. `iii-sdk` stays pinned at 0.11.2. Transitive vulns closed via overrides: `qs ^6.15.2`, `ws ^8.21.0`, `protobufjs ^7.5.8`. `npm audit` root + website: 8 → **0**.\n- **REST endpoint count: 125 → 126** (new `/agentmemory/diagnostics/followup`).\n\n### Infrastructure\n\n- 1379 tests passing (up from 1314 in v0.9.24). 13 new test files covering the regressions + features above.\n- Removed `website/package-lock.json` from git tracking; root `.gitignore` already forbade lockfiles."+ },+ {+ "version": "0.9.24",+ "date": "2026-05-29",+ "body": "Hotfix on top of v0.9.23. Two bugs surfaced in the first hour after v0.9.23 hit npm:\n\n### Fixed\n\n- **`agentmemory --version` silently launched the server instead of printing the version string**. `-v` flag was reserved by `--verbose`, and no `--version` literal was handled — falling through to the default `start` command. Now `--version` (and `-V` capital, per POSIX convention) prints `VERSION` and exits 0 before any side effects (engine boot, dir mkdir, env loading).\n- **iii-engine version pin was warn-only, not enforced**. When the engine on `PATH` didn't match agentmemory's pinned version (currently `v0.11.2`), the worker still booted against the mismatched engine and crashed at runtime with cryptic `state::list not found` (v0.13.0) or sandbox-everything traps (v0.11.6). `warnIfEngineVersionMismatch` renamed to `enforceEngineVersionPin` — now `p.log.error`s with the downgrade command and `process.exit(1)`. Override escape hatch via `AGENTMEMORY_III_VERSION=<version>` env unchanged (already redefines `IIPINNED_VERSION` upstream so the comparison passes for users who knowingly run against a different engine)."+ },+ {+ "version": "0.9.23",+ "date": "2026-05-28",+ "body": "Bug-fix + integration wave. GitHub Copilot CLI joins the supported agent matrix with plugin + hooks + MCP coverage. Three silent DX bugs fixed end-to-end: graph extraction never fired on session end, `agentmemory status` reported zero memories, consolidation defaulted off even with an LLM provider configured. Five additional adapters and a clearer local-LLM story for Ollama / LM Studio users. `agentmemory connect` now points users at `npx skills add` for the native-skills install path (50+ agents).\n\n### Added\n\n- **GitHub Copilot CLI** ([PR #534](https://github.com/rohitg00/agentmemory/pull/534)). Full first-class support: `plugin/plugin.json` manifest, `hooks.copilot.json` lifecycle hooks for all 11 Copilot events with camelCase payload normalization, `agentmemory connect copilot-cli` MCP path, first-run onboarding default-select via `COPILOT_CLI` / `COPILOT_AGENT_SESSION_ID` env detection, Windows-safe `cmd.exe /d /s /c npx` wrapper. Standalone MCP transport now speaks LSP-style `Content-Length` framed JSON-RPC alongside the existing newline-delimited form so Copilot's stdio init handshake works.\n- **Five new MCP adapters** ([PR #677](https://github.com/rohitg00/agentmemory/pull/677)). Warp, Cline, Continue, Zed, and Droid. `createJsonMcpAdapter` extended with `wrapperKey` (Zed uses `context_servers` instead of `mcpServers`) and `extraEntryFields` (Droid requires `type: \"stdio\"`). `ADAPTERS` count: 11 → 17.\n- **`/agentmemory/graph/build` endpoint** ([PR #698](https://github.com/rohitg00/agentmemory/pull/698)). Backfills the knowledge graph from existing compressed observations across every session in configurable batches. Wires up the viewer's \"Build Graph\" button that previously returned 404.\n- **11 README translations + language picker** ([PR #675](https://github.com/rohitg00/agentmemory/pull/675)). zh-CN, zh-TW, ja-JP, ko-KR, es-ES, pt-BR, fr-FR, de-DE, ru-RU, tr-TR, hi-IN.\n- **`npx skills add` hint in connect output** ([PR #709](https://github.com/rohitg00/agentmemory/pull/709)). After a successful `agentmemory connect <agent>`, the CLI now prints the matching `npx skills add rohitg00/agentmemory -y` command so users get the native-skills install alongside MCP wiring. The [`skills`](https://npmjs.com/package/skills) CLI covers 50+ agents including the 5 added in PR #677. README \"Other agents\" section gains a dedicated subsection explaining the two-step pattern (`connect` writes MCP config, `skills add` installs the 8 SKILL.md files into the agent's native skill directory).\n\n### Changed\n\n- **Consolidation auto-enables when an LLM provider is configured** ([PR #696](https://github.com/rohitg00/agentmemory/pull/696), closes [#612](https://github.com/rohitg00/agentmemory/discussions/612)). `CONSOLIDATION_ENABLED` defaulted to `false`, so users with a working provider got compression + summarization but zero graph nodes / crystals / lessons. Now defaults `true` whenever any of `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OPENROUTER_API_KEY` / `GEMINI_API_KEY` / `GOOGLE_API_KEY` / `MINIMAX_API_KEY` / `OPENAI_BASE_URL` is set, or `AGENTMEMORY_PROVIDER=agent-sdk`. Explicit `=false` / `AGENTMEMORY_PROVIDER=noop` still opt out. `OPENAI_API_KEY_FOR_LLM=false` honored (key scoped to embeddings).\n- **Fire-and-forget telemetry hooks** ([PR #688](https://github.com/rohitg00/agentmemory/pull/688), closes [#573](https://github.com/rohitg00/agentmemory/issues/573)). Nine telemetry-only hooks (notification, post-tool-failure, post-tool-use, prompt-submit, stop, session-end, subagent-start, subagent-stop, task-completed) switched to unawaited `fetch(...).catch(() => {})` paired with `setTimeout(() => process.exit(0), 500).unref()` (1500ms for the multi-fetch `stop` + `session-end` hooks). No longer blocks Claude Code's next-prompt boundary on every assistant turn.\n- **Observability defaults tamed** ([PR #686](https://github.com/rohitg00/agentmemory/pull/686), closes [#519](https://github.com/rohitg00/agentmemory/issues/519)). `iii-config.yaml` defaults: `sampling_ratio: 0.1`, `logs_console_output: false`. `findIiiConfig()` precedence reversed so `AGENTMEMORY_III_CONFIG` env > cwd > `~/.agentmemory/iii-config.yaml` > bundled.\n\n### Fixed\n\n- **Graph extraction never fires automatically** ([PR #698](https://github.com/rohitg00/agentmemory/pull/698), closes [#666](https://github.com/rohitg00/agentmemory/issues/666)). `event::session::stopped` listens on `agentmemory.session.stopped` but nothing in the codebase ever published that topic. `api::session::end` now directly calls `sdk.triggerVoid(\"event::session::stopped\", { sessionId })` (try/catch guarded so a fan-out error doesn't fail the HTTP response). Knowledge graphs now materialize automatically when sessions end.\n- **`agentmemory status` shows Memories/Observations = 0** ([PR #698](https://github.com/rohitg00/agentmemory/pull/698), closes [#666](https://github.com/rohitg00/agentmemory/issues/666)). CLI fetched `/agentmemory/export` for counts but that endpoint times out (>5s) on iii-engine's file-based KV under concurrent `kv.list()`. Switched to `/memories?count=true` (count-only, constant-time) + sum of `sessions[].observationCount`.\n- **Hooks send full filesystem path as `project` instead of repo basename** ([PR #687](https://github.com/rohitg00/agentmemory/pull/687), closes [#474](https://github.com/rohitg00/agentmemory/issues/474)). Native sessions, replay-import, and `memory_lesson_save` all use repo basename — the path/basename mismatch silently filtered out the bulk of relevant lessons from auto-injected context. New `resolveProject(cwd?)` helper: `AGENTMEMORY_PROJECT_NAME` env > `git rev-parse --show-toplevel` basename > `basename(cwd)`. Applied to 9 hooks.\n- **Cross-project memory leakage** ([PR #662](https://github.com/rohitg00/agentmemory/pull/662)). Memories created in one project leaking into recall on another. Wildcard guard pattern `(!project || !m.project || m.project === project)` preserves backward-compat for legacy unscoped memories while scoping new ones strictly.\n- **Graph parser tolerates reordered XML attributes** ([PR #685](https://github.com/rohitg00/agentmemory/pull/685), closes [#635](https://github.com/rohitg00/agentmemory/issues/635)). Order-dependent regex replaced with order-independent `parseAttrs` helper. Self-closing trailing-`/` handling preserved.\n- **Defensive null guards on `Memory.sessionIds`** ([PR #684](https://github.com/rohitg00/agentmemory/pull/684)). Older exports + hand-edited dumps can omit this field; now treated as empty array on read.\n- **Vector index Buffer slice metadata round-trip** ([PR #683](https://github.com/rohitg00/agentmemory/pull/683), closes [#587](https://github.com/rohitg00/agentmemory/issues/587), [#584](https://github.com/rohitg00/agentmemory/issues/584)). `byteOffset` + `byteLength` preserved on `Buffer.from` and `Float32Array` construction so base64 round-trips don't corrupt vectors stored as slices.\n- **Slots HTTP triggers return 503 not 500** ([PR #682](https://github.com/rohitg00/agentmemory/pull/682), closes [#678](https://github.com/rohitg00/agentmemory/issues/678)). Feature-flag-disabled responses now use the documented 503 shape with `enableHow` + `docsHref`. `.env` propagation fixed (now reads via `getEnvVar()` not raw `process.env`).\n- **`agentmemory doctor` points to correct iii install URL** ([PR #681](https://github.com/rohitg00/agentmemory/pull/681)).\n- **Separate `OPENAI_EMBEDDING_BASE_URL` + `OPENAI_EMBEDDING_API_KEY`** ([PR #503](https://github.com/rohitg00/agentmemory/pull/503)). Lets users route embeddings and LLM calls to different OpenAI-compatible endpoints (e.g. cloud OpenAI for embeddings + local LM Studio for LLM, or vice versa).\n- **Viewer Memories tab sorts newest first** ([PR #701](https://github.com/rohitg00/agentmemory/pull/701), closes [#674](https://github.com/rohitg00/agentmemory/issues/674)). Memories list rendered in KV-insertion order, hiding just-saved entries at the bottom of long lists. `loadMemories()` now sorts on `createdAt` desc (fallback `updatedAt`) before items reach state — matches the `localeCompare` pattern Sessions / Metrics tabs already use.\n\n### Docs\n\n- **Local-LLM section in README** ([PR #697](https://github.com/rohitg00/agentmemory/pull/697), closes [#671](https://github.com/rohitg00/agentmemory/discussions/671)). Dedicated \"Local models (Ollama / LM Studio / vLLM)\" subsection with copy-paste configs, model-pick table (qwen2.5-coder:7b, llama3.2:3b, mistral:7b-instruct, deepseek-r1:7b), and reasoning-model empty-content callout. Existing OpenAI-compatible support was buried in a one-line env comment.\n- **Three pipeline layers, not three primitives** ([PR #690](https://github.com/rohitg00/agentmemory/pull/690)). Website + README copy: the three primitives are worker / function / trigger (iii). HOOKS / RECALL / CONSOLIDATE are pipeline layers. Section anchor renamed `#primitives` → `#stack` to match the nav label.\n\n### Infrastructure\n\n- Hook scripts now bundle per-entry instead of sharing chunks, so `plugin/scripts/_project-*.mjs` hashed artifacts no longer churn the diff on every build.\n- `AGENTS.md` \"Hook Scripts\" section documents the two patterns (context-injecting vs telemetry-only) and the 500ms / 1500ms exit-delay rule for single vs multi-fetch hooks.\n- Test suite: 1271 → 1291 (+20 new tests covering project basename resolver, fire-and-forget wiring, consolidation default behavior, session-end → graph extraction, the graph-build endpoint, and the viewer memories sort)."+ },+ {+ "version": "0.9.22",+ "date": "2026-05-26",+ "body": "Stability + ecosystem wave. Three install-broken bugs (`npm install` ERESOLVE, non-OpenAI base URLs, broken Claude bridge path) closed. Six runtime bugs from active users fixed end-to-end. Three new agent integrations (Qwen Code, Antigravity, Kiro). New `AGENT_ID` scope for multi-agent setups. Port mapping documented.\n\n### Fixed\n\n- **`npm install` ERESOLVE on fresh install** ([PR #649](https://github.com/rohitg00/agentmemory/pull/649), closes [#631](https://github.com/rohitg00/agentmemory/issues/631)). `@anthropic-ai/sdk` bumped from `^0.39.0` to `^0.93.0` so `claude-agent-sdk`'s peer is satisfied. Verified clean install with only the published `dependencies` block.\n\n- **Non-OpenAI base URLs silent-404** ([PR #649](https://github.com/rohitg00/agentmemory/pull/649), closes [#646](https://github.com/rohitg00/agentmemory/issues/646), [#628](https://github.com/rohitg00/agentmemory/issues/628)). `buildChatUrl` + `buildEmbeddingUrl` no longer blindly prepend `/v1/`. DeepSeek, SiliconFlow, Zhipu (`/api/paas/v4`), vLLM, LM Studio, Ollama all resolve correctly.\n\n- **`CLAUDE_MEMORY_BRIDGE` writes to a path Claude Code reads** ([PR #649](https://github.com/rohitg00/agentmemory/pull/649), closes [#625](https://github.com/rohitg00/agentmemory/issues/625)). Slug now preserves the leading `-` on POSIX absolute paths and drops the spurious `/memory/` subdir, matching `~/.claude/projects/<slug>/MEMORY.md`.\n\n- **OpenAI provider reads `reasoning_content` for thinking models** ([PR #648](https://github.com/rohitg00/agentmemory/pull/648), closes [#627](https://github.com/rohitg00/agentmemory/issues/627)). DeepSeek V4 / Qwen3 / GLM / Kimi return `message.reasoning_content`. Previously only `message.reasoning` was checked — compress silently failed every call and tripped the circuit breaker.\n\n- **`agentmemory stop` reaps the worker process** ([PR #648](https://github.com/rohitg00/agentmemory/pull/648), closes [#640](https://github.com/rohitg00/agentmemory/issues/640), [#474](https://github.com/rohitg00/agentmemory/issues/474)). Worker pid is written to `~/.agentmemory/worker.pid` on boot; `stop` signals both engine + worker.\n\n- **OpenCode plugin implicit-creates the session on first observation** ([PR #648](https://github.com/rohitg00/agentmemory/pull/648), closes [#638](https://github.com/rohitg00/agentmemory/issues/638)). `mem::observe` creates the session row when one doesn't exist. No more orphan observations or `Session not found for summarize`.\n\n- **OpenCode plugin zero-config auto-context injection** ([PR #648](https://github.com/rohitg00/agentmemory/pull/648), closes [#431](https://github.com/rohitg00/agentmemory/issues/431)). `POST /session/start` context is cached per-session; the existing `experimental.chat.system.transform` hook reads from the cache.\n\n- **Viewer graph settles on 1000+ node graphs** ([PR #648](https://github.com/rohitg00/agentmemory/pull/648), closes [#563](https://github.com/rohitg00/agentmemory/issues/563)). Tick-decayed damping, per-node velocity cap, raf park on quiescence. Mousedown / wheel / zoom / recenter re-wake the parked loop.\n\n- **`/memories` + `/export` paginate** ([PR #648](https://github.com/rohitg00/agentmemory/pull/648), closes [#544](https://github.com/rohitg00/agentmemory/issues/544)). New `?count=true` and `?limit=N&offset=M` on `/memories`. `/export` forwards `?maxSessions` + `?offset`. Stops large corpora (8K+ memories) from timing out at the iii-engine invocation boundary.\n\n- **Claude Code drops the MCP server silently** ([PR #650](https://github.com/rohitg00/agentmemory/pull/650), closes [#510](https://github.com/rohitg00/agentmemory/issues/510)). `plugin/.mcp.json` env block uses `${VAR:-default}` form. Unset required vars no longer fail config parse.\n\n- **Full 51-tool MCP surface by default** ([PR #650](https://github.com/rohitg00/agentmemory/pull/650), closes [#553](https://github.com/rohitg00/agentmemory/issues/553)). `getVisibleTools()` default flipped from `core` (8) to `all` (51) to match what every plugin manifest advertises. `AGENTMEMORY_TOOLS=core` still gives the lean set.\n\n- **Connect adapters write `${VAR:-default}` env block** ([PR #650](https://github.com/rohitg00/agentmemory/pull/650)). `agentmemory connect` for Claude Code / Cursor / Gemini CLI / Windsurf writes the same default form.\n\n- **Hermes `memory status` no longer reports the plugin as Missing** ([PR #643](https://github.com/rohitg00/agentmemory/pull/643), closes [#520](https://github.com/rohitg00/agentmemory/issues/520)). Hermes plugin seeds `AGENTMEMORY_URL` to `http://localhost:3111` at import. Works for systemd-managed agentmemory where the env file is loaded via `EnvironmentFile=` and never reaches the interactive shell.\n\n- **Deleted memories cleared from BM25 + vector indices** ([PR #636](https://github.com/rohitg00/agentmemory/pull/636) by [@abhinav-m22](https://github.com/abhinav-m22), closes [#632](https://github.com/rohitg00/agentmemory/issues/632)). `SearchIndex.remove()` added and called from every delete path. Snapshot flushed synchronously so a SIGKILL between mutation + debounce can't resurrect deleted entries.\n\n- **PostToolUse hook reads `tool_response`, falls back to `tool_output`** ([PR #561](https://github.com/rohitg00/agentmemory/pull/561) by [@faraz152](https://github.com/faraz152), closes [#539](https://github.com/rohitg00/agentmemory/issues/539)). Claude Code's PostToolUse payload uses `tool_response`. Now reads `tool_response ?? tool_output` so legacy integrations keep working.\n\n- **iii-sdk pinned to exact `0.11.2`** ([PR #567](https://github.com/rohitg00/agentmemory/pull/567), closes [#555](https://github.com/rohitg00/agentmemory/issues/555)). `[email protected]` introduced a routing regression where every `/agentmemory/*` route returned 404. Pin removes the caret.\n\n- **OpenAI provider sends explicit `stream: false`** ([PR #526](https://github.com/rohitg00/agentmemory/pull/526) by [@Ptah-CT](https://github.com/Ptah-CT)). Some OpenAI-compatible proxies default to `text/event-stream` when `stream` is absent.\n\n- **Viewer search uses NFKC normalisation for CJK / fullwidth input** ([PR #542](https://github.com/rohitg00/agentmemory/pull/542) by [@kaushalrog](https://github.com/kaushalrog)).\n\n- **Viewer splash shows actual bound viewer port** ([PR #560](https://github.com/rohitg00/agentmemory/pull/560) by [@Tanmay-008](https://github.com/Tanmay-008), closes [#521](https://github.com/rohitg00/agentmemory/issues/521)). `/agentmemory/livez` now returns `viewerPort` + `viewerSkipped`.\n\n- **Viewer tab bar height stable across tab switches** ([PR #325](https://github.com/rohitg00/agentmemory/pull/325) by [@hungtd119](https://github.com/hungtd119), closes [#324](https://github.com/rohitg00/agentmemory/issues/324)).\n\n- **Graph parser accepts self-closing `<entity .../>` tags** ([PR #494](https://github.com/rohitg00/agentmemory/pull/494) by [@Rex57](https://github.com/Rex57), closes [#492](https://github.com/rohitg00/agentmemory/issues/492)).\n\n- **Plugin MCP server inherits remote/auth env** ([PR #386](https://github.com/rohitg00/agentmemory/pull/386) by [@LaplaceYoung](https://github.com/LaplaceYoung), closes [#375](https://github.com/rohitg00/agentmemory/issues/375)).\n\n- **`@agentmemory/mcp` rejects literal `${VAR}` placeholders**. Any `AGENTMEMORY_URL` / `AGENTMEMORY_SECRET` value of the form `${...}` is treated as unset and falls back to `http://localhost:3111`.\n\n- **Codex `stop` hook closes session** ([PR #579](https://github.com/rohitg00/agentmemory/pull/579), closes [#493](https://github.com/rohitg00/agentmemory/issues/493)). `Stop` was missing from the Codex bundle; session never got marked completed.\n\n- **Claude Code `--with-hooks` works for MCP-standalone users** ([PR #581](https://github.com/rohitg00/agentmemory/pull/581), closes [#508](https://github.com/rohitg00/agentmemory/issues/508)).\n\n### Added\n\n- **`AGENT_ID` multi-agent memory isolation** ([PR #654](https://github.com/rohitg00/agentmemory/pull/654), closes [#554](https://github.com/rohitg00/agentmemory/issues/554)). Optional `AGENT_ID` env tags every Session / RawObservation / CompressedObservation / Memory. `AGENTMEMORY_AGENT_SCOPE=isolated` (opt-in; `shared` default) also filters every recall path (`mem::smart-search`, `/memories`, `/observations`, `/sessions`). Per-call overrides via request body + `?agentId=<role>` / `?agentId=*` query params. `?includeOrphans=true` surfaces pre-tag rows.\n\n- **Qwen Code connect adapter** ([PR #651](https://github.com/rohitg00/agentmemory/pull/651), closes [#647](https://github.com/rohitg00/agentmemory/issues/647)). `agentmemory connect qwen` writes the standard `mcpServers` block to `~/.qwen/settings.json`.\n\n- **Antigravity connect adapter** ([PR #651](https://github.com/rohitg00/agentmemory/pull/651), closes [#614](https://github.com/rohitg00/agentmemory/issues/614)). Replacement for Gemini CLI (sunset 2026-06-18). Writes `mcp_config.json` to the platform-specific User dir.\n\n- **Kiro connect adapter** ([PR #651](https://github.com/rohitg00/agentmemory/pull/651), closes [#618](https://github.com/rohitg00/agentmemory/issues/618)). Writes user-level `~/.kiro/settings/mcp.json`.\n\n- **Cost-aware model selection** ([PR #654](https://github.com/rohitg00/agentmemory/pull/654), closes [#613](https://github.com/rohitg00/agentmemory/issues/613)). Runtime warning when `OPENROUTER_MODEL` matches the premium pattern. README cost-tier table with measured workload data. Suppress via `AGENTMEMORY_SUPPRESS_COST_WARNING=1`.\n\n- **Pluggable benchmark harness** ([PR #562](https://github.com/rohitg00/agentmemory/pull/562)). New `eval/` directory with the `coding-agent-life-v1` corpus (15 sessions + 15 graded queries) and three adapters (grep, OpenAI embeddings + cosine, agentmemory hybrid). LongMemEval support. Sandboxed agentmemory + iii-engine on alt ports via `eval/scripts/sandbox.sh`. Dev-only — no runtime impact.\n\n- **`agentmemory connect codex --with-hooks` opt-in flag** ([PR #564](https://github.com/rohitg00/agentmemory/pull/564), closes [#509](https://github.com/rohitg00/agentmemory/issues/509)). Workaround for [openai/codex#16430](https://github.com/openai/codex/issues/16430).\n\n- **Cross-platform CI matrix** ([PR #556](https://github.com/rohitg00/agentmemory/pull/556)). Ubuntu + macOS × Node 20 + 22, `paths-ignore`, per-branch concurrency cancellation.\n\n### Docs\n\n- **Port mapping table** ([PR #651](https://github.com/rohitg00/agentmemory/pull/651), closes [#629](https://github.com/rohitg00/agentmemory/issues/629)). `3111` REST / `3112` streams / `3113` viewer / `49134` engine WS + env overrides + stale-process cleanup recipe.\n\n- **Pairings recipe** ([PR #641](https://github.com/rohitg00/agentmemory/pull/641)). `docs/recipes/pairings.md` covers stacking agentmemory with codegraph, Understand Anything, and Graphify.\n\n- **Multi-agent README section** ([PR #654](https://github.com/rohitg00/agentmemory/pull/654)). `AGENT_ID` + `AGENTMEMORY_AGENT_SCOPE` semantics, per-endpoint behavior table.\n\n- **Supply-chain policy in SECURITY.md** ([PR #654](https://github.com/rohitg00/agentmemory/pull/654), closes [#540](https://github.com/rohitg00/agentmemory/issues/540)). Explains why no lockfile is committed (`dist/` ships pre-built) and what monitoring exists.\n\n- **README \"Config File\" section + Windows path** ([PR #321](https://github.com/rohitg00/agentmemory/pull/321) by [@aqilaziz](https://github.com/aqilaziz), closes [#293](https://github.com/rohitg00/agentmemory/issues/293)).\n\n- **README sudo install hint for `EACCES`** ([PR #454](https://github.com/rohitg00/agentmemory/pull/454) by [@kedar-1](https://github.com/kedar-1)).\n\n### Infrastructure\n\n- 108 test files, **1171 tests pass**.\n- Agent count: 8 → 11 (claude-code, codex, cursor, gemini-cli, qwen, antigravity, kiro, openclaw, hermes, pi, openhuman)."+ },+ {+ "version": "0.9.21",+ "date": "2026-05-19",+ "body": "Quality + integration wave. Headline: native OpenCode plugin with full Claude Code hook parity ([#237](https://github.com/rohitg00/agentmemory/pull/237) by [@cl0ckt0wer](https://github.com/cl0ckt0wer)). Ten more PRs alongside: `memory_recall` returning the wrong shape, env-file `AGENTMEMORY_DROP_STALE_INDEX` silently ignored, hook scripts crashing on Windows usernames with spaces, viewer search inputs interrupting CJK IME composition, large sessions silently failing at the LLM context limit, lessons invisible to smart-search, Hermes plugin manifest missing hooks, cli onboarding crashing in non-TTY contexts, rebuildIndex blocking boot on large corpora, 25h embed-loop bottleneck during rebuild, and the v0.9.19 iii-console installer workaround can come out now that upstream is fixed.\n\n### Added\n\n- **OpenCode plugin with 22 auto-capture hooks** ([PR #237](https://github.com/rohitg00/agentmemory/pull/237) by [@cl0ckt0wer](https://github.com/cl0ckt0wer), closes [#236](https://github.com/rohitg00/agentmemory/issues/236) + [#244](https://github.com/rohitg00/agentmemory/issues/244)). Complete OpenCode plugin in `plugin/opencode/` matching Claude Code hook parity. Covers session lifecycle (8 hooks), messages (3), tool lifecycle (2), part tracking, permissions, task tracking, plus a two-layer enrichment pipeline (memory context on first turn, file enrichment on subsequent turns) and two slash commands (`/recall`, `/remember`). Full gap analysis in `plugin/opencode/README.md`.\n\n### Fixed\n\n- **`memory_recall` endpoint + format/token_budget forwarding** ([PR #516](https://github.com/rohitg00/agentmemory/pull/516) by [@serhiizghama](https://github.com/serhiizghama), closes [#507](https://github.com/rohitg00/agentmemory/issues/507) + [#440](https://github.com/rohitg00/agentmemory/issues/440)). MCP `memory_recall` always returned compact mode and dropped `format` + `token_budget` params. Two root causes fixed: standalone shim routed through `/agentmemory/smart-search` instead of `/agentmemory/search`, and the local-fallback path didn't read either param. Now routes correctly, forwards both params end-to-end, defaults `format` to `\"full\"` matching the MCP schema.\n\n- **env-file `AGENTMEMORY_DROP_STALE_INDEX` flag now honored** ([PR #461](https://github.com/rohitg00/agentmemory/pull/461) by [@honor2030](https://github.com/honor2030), closes [#456](https://github.com/rohitg00/agentmemory/issues/456)). Setting the flag in `~/.agentmemory/.env` was silently ignored because the boot path read `process.env` directly. New `isDropStaleIndexEnabled()` helper reads merged env. Combined with [#455](https://github.com/rohitg00/agentmemory/issues/455) + [#469](https://github.com/rohitg00/agentmemory/issues/469) reports, this is the unblock path for the stale-index server-crash recovery loop.\n\n- **Windows hook scripts quote plugin paths correctly** ([PR #487](https://github.com/rohitg00/agentmemory/pull/487) by [@honor2030](https://github.com/honor2030), closes [#477](https://github.com/rohitg00/agentmemory/issues/477)). Hook command strings referenced `${CLAUDE_PLUGIN_ROOT}/scripts/*.mjs` without quotes — Windows users with spaces in their username had every hook crash. Quotes added + regression test.\n\n- **Viewer search inputs honor IME composition** ([PR #517](https://github.com/rohitg00/agentmemory/pull/517) by [@jonathanzhan1975](https://github.com/jonathanzhan1975)). CJK users typing in the viewer's search inputs hit mid-character interruption — every keystroke fired the `oninput=` re-render handler, breaking IME composition mid-syllable. New `bindImeSafeSearch` helper defers re-render until `compositionend`.\n\n- **Chunk large sessions to fit LLM context window** ([PR #472](https://github.com/rohitg00/agentmemory/pull/472) by [@efenex](https://github.com/efenex)). Sessions with >7000 observations silently failed at the LLM provider's context limit — the consolidation pipeline silently skipped the session. New chunking splits oversized sessions across multiple compress calls + restitches the narrative via a `REDUCE_SYSTEM` prompt. Legacy single-call path preserved when obs count is under the chunk size. Backfill script under `scripts/` for users hitting the pre-fix bug.\n\n- **Surface lessons in smart-search + diagnose tally** ([PR #473](https://github.com/rohitg00/agentmemory/pull/473) by [@efenex](https://github.com/efenex)). Closes the lesson round-trip with [#458](https://github.com/rohitg00/agentmemory/pull/458) (lessons auto-injected into `mem::context`): lessons are now also returned alongside hybrid search results in a separate `lessons` field on `smart-search`, and the `diagnose` health surface tallies per-store counts so the trust-shock pattern (save succeeds, recall empty, diagnose says 0) goes away.\n\n- **Declare all Hermes plugin hooks** ([PR #486](https://github.com/rohitg00/agentmemory/pull/486) by [@honor2030](https://github.com/honor2030)). The Hermes `plugin.yaml` manifest only declared 3 of the 6 implemented hooks. All 6 now declared (`prefetch`, `sync_turn`, `on_session_end`, `on_pre_compress`, `on_memory_write`, `system_prompt_block`).\n\n- **`rebuildIndex` non-blocking on boot** ([PR #500](https://github.com/rohitg00/agentmemory/pull/500) by [@efenex](https://github.com/efenex)). Boot path previously `await`-ed `rebuildIndex(kv)`, so the viewer + later boot steps stalled — on large corpora this was 25h+ of blocked startup. Replaced with `void rebuildIndex(kv).then(...).catch(...)` so the rebuild runs in the background.\n\n- **Batched embed calls in `rebuildIndex` (25h → 3h on large corpora)** ([PR #504](https://github.com/rohitg00/agentmemory/pull/504) by [@efenex](https://github.com/efenex)). The rebuild loop made one embed call per observation, paying full HTTP RTT per item. New `vectorIndexAddBatchGuarded` helper batches embeds (default 32, configurable via `REBUILD_EMBED_BATCH_SIZE`) and try/catches per-item failures. Measured 25h → 3h on a 250k-observation corpus.\n\n- **CLI skips onboarding prompts without a tty** ([PR #491](https://github.com/rohitg00/agentmemory/pull/491) by [@honor2030](https://github.com/honor2030)). Onboarding prompts crashed in non-interactive contexts (CI, `docker run -d`, piped input). New guard short-circuits with sensible defaults when stdin/stdout aren't TTYs or `CI=1`.\n\n### Changed\n\n- **Drop iii-console installer `--next` workaround** ([PR #546](https://github.com/rohitg00/agentmemory/pull/546)). v0.9.19 routed first-run iii-console install through `bash -s -- --next` to dodge an upstream tag-prefix bug at [iii-hq/iii#1652](https://github.com/iii-hq/iii/issues/1652). Upstream [iii-hq/iii#1660](https://github.com/iii-hq/iii/pull/1660) shipped 2026-05-19; `install.iii.dev/console/main/install.sh` is a CDN proxy serving upstream main HEAD so the fix is live without an iii release tag. Reverted to canonical bare `curl ... | sh`.\n\n### Infrastructure\n\n- 95 test files (was 92), **1067 tests pass** (was 1038) on `chore(release): v0.9.21`.\n- Bundles 11 PRs: 1 contributor feature + 9 bug fixes across MCP / hooks / viewer / summarize / lessons / Hermes / rebuildIndex / CLI + 1 upstream-installer revert.\n- New contributors landing first PRs this release: [@cl0ckt0wer](https://github.com/cl0ckt0wer), [@serhiizghama](https://github.com/serhiizghama), [@jonathanzhan1975](https://github.com/jonathanzhan1975)."+ },+ {+ "version": "0.9.20",+ "date": "2026-05-18",+ "body": "Hotfix: revert the Codex Stop → session-end chain shipped in v0.9.19.\n\n### Fixed\n\n- **Revert Codex Stop hook session-end chain** ([PR #501](https://github.com/rohitg00/agentmemory/pull/501) by [@Rex57](https://github.com/Rex57), reverts v0.9.19's [#495](https://github.com/rohitg00/agentmemory/pull/495), re-opens [#493](https://github.com/rohitg00/agentmemory/issues/493)). Post-merge field-testing surfaced the underlying issue: Codex `Stop` fires before the overall conversation is truly finished — multiple Stops bracket each assistant turn within one session. Chaining `session-end.mjs` from Stop marked sessions completed too early, with later observations still arriving against an `endedAt`-stamped record. Restored to summarize-only Stop; the SessionEnd-shaped solution stays open as [#493](https://github.com/rohitg00/agentmemory/issues/493)."+ },+ {+ "version": "0.9.19",+ "date": "2026-05-18",+ "body": "Feature + hardening wave. Sessions now link to the git commits they shipped (forward + reverse lookup, REST + MCP surfaces). OpenAI provider transport collapses into one shared module with auto-detected Azure URL style (legacy `/openai/deployments/<dep>` and v1 `/openai/v1` both supported). Graph retrieval switches from BFS to Dijkstra over the weighted edge graph. Codex Stop hook chains session-end. Plugin MCP server inherits `AGENTMEMORY_URL` / `AGENTMEMORY_SECRET` from the shell. Point fix routes the bundled iii-console installer around an upstream tag-prefix bug. 1007+ tests pass.\n\n### Added\n\n- **Session-to-commit linking** ([PR #498](https://github.com/rohitg00/agentmemory/pull/498)). New `KV.commits` namespace keyed by full SHA holds `CommitLink` records (sha, shortSha, branch, repo, message, author, authoredAt, files, sessionIds). `Session.commitShas[]` provides the forward back-reference. REST: `POST /agentmemory/session/commit` upserts links (merges `sessionIds` on re-link, preserves `linkedAt`); `GET /agentmemory/commits/:sha` and `GET /agentmemory/commits` round-trip. MCP: `memory_commit_lookup` and `memory_commits` tools. Post-commit hook auto-captures the link on every commit in the working directory. Closes the loop on \"what session wrote this code\" / \"what commits did this session ship\" without leaving agentmemory.\n\n- **Azure OpenAI v1 URL pattern auto-detection** ([PR #462](https://github.com/rohitg00/agentmemory/pull/462), closes [#371](https://github.com/rohitg00/agentmemory/issues/371)). Both the LLM and embedding providers now route through `_openai-shared.ts` and auto-detect Azure URL style:\n - `OPENAI_BASE_URL=https://r.openai.azure.com/openai/deployments/<dep>` → legacy URL pattern, `api-version` query param via `OPENAI_API_VERSION` (default `2024-08-01-preview`).\n - `OPENAI_BASE_URL=https://r.openai.azure.com` (bare host, or `/openai`, or `/openai/v1`) → v1 GA pattern, `/openai/v1/<route>`, deployment name carried in the request body as `model`.\n - Net effect: Azure embeddings work for the first time (LLM-side Azure shipped in v0.9.17; embedding was still hardcoded to `/v1/embeddings` + Bearer). Closes [#199](https://github.com/rohitg00/agentmemory/issues/199) (consolidation) as superseded.\n\n### Changed\n\n- **Graph retrieval: BFS → Dijkstra over weighted edges** ([PR #463](https://github.com/rohitg00/agentmemory/pull/463), closes [#328](https://github.com/rohitg00/agentmemory/issues/328) filed by [@Tanmay-008](https://github.com/Tanmay-008) with benchmark numbers showing the BFS edge-count semantics + O(n) `Array.shift()` profile). Memory graph edges carry weights 0.1–1.0; BFS visited by edge-count regardless, so a one-hop weak edge ranked the same as a two-hop strong chain. Dijkstra over `cost = 1/max(weight, 0.01)` selects weight-optimal paths instead. Adjacency map built once in O(V+E) and min-heap dequeue at O(log V) replace the prior O(V·E) + O(n) `Array.shift()` profile. `maxDepth` semantics preserved (still edge-count bound). The `startNode` path is excluded from returned paths so the dedicated `score=1.0` fallback loop in `searchByEntities` fires as designed (regression catch from the inline review).\n\n- **Codex Stop hook chains session-end** ([PR #495](https://github.com/rohitg00/agentmemory/pull/495) by [@Rex57](https://github.com/Rex57), fixes [#493](https://github.com/rohitg00/agentmemory/issues/493) also filed by [@Rex57](https://github.com/Rex57)). `hooks.codex.json` Stop now runs `stop.mjs` followed by `session-end.mjs`. Codex doesn't ship a separate `SessionEnd` lifecycle event, so the session would otherwise stay open after the user terminated the Codex session. Tests assert both commands appear in the Stop chain.\n\n- **Plugin MCP entry inherits shell env via passthrough** ([PR #460](https://github.com/rohitg00/agentmemory/pull/460), closes [#375](https://github.com/rohitg00/agentmemory/issues/375) filed by [@anthony-spruyt](https://github.com/anthony-spruyt)). `plugin/.mcp.json` and `AGENTMEMORY_MCP_BLOCK` (the template `agentmemory connect <agent>` writes into `~/.claude.json`, `~/.cursor/mcp.json`, etc.) now declare `env: { AGENTMEMORY_URL: \"${AGENTMEMORY_URL}\", AGENTMEMORY_SECRET: \"${AGENTMEMORY_SECRET}\" }`. The MCP host substitutes shell values at server launch. When the vars are unset, the host passes empty strings; the standalone shim's `process.env[\"AGENTMEMORY_URL\"] || \"http://localhost:3111\"` falls back to localhost. One wired entry now covers both local and remote (k8s / reverse-proxied) deployments without `/doctor` \"duplicate server\" warnings.\n\n### Fixed\n\n- **`ensureIiiConsole()` install path** (`src/cli.ts`). The upstream `install.iii.dev/console/main/install.sh` script's jq predicate filters releases with `startswith(\"v\")` while `iii-hq/iii` tags as `iii/v0.12.0`. The script bails with `no stable iii release found` on every fresh install. Switched the install command to `curl ... | bash -s -- --next` until upstream patches the script — the `--next` codepath uses a regex on `-next.` without the buggy `startswith` constraint, so it succeeds against the same tag set. Inline comment documents the upstream bug + revert condition.\n\n### Infrastructure\n\n- 91 test files, 1007 tests pass on `chore(release): v0.9.19`.\n- Bundles five PRs ([#460](https://github.com/rohitg00/agentmemory/pull/460), [#462](https://github.com/rohitg00/agentmemory/pull/462), [#463](https://github.com/rohitg00/agentmemory/pull/463), [#495](https://github.com/rohitg00/agentmemory/pull/495), [#498](https://github.com/rohitg00/agentmemory/pull/498)) plus the inline iii-console installer workaround into one patch release."+ }+]diff --git a/website/lib/generated-meta.json b/website/lib/generated-meta.jsonindex 5d045ca6..9d2e39d9 100644--- a/website/lib/generated-meta.json+++ b/website/lib/generated-meta.json@@ -1,8 +1,15 @@{- "version": "0.9.29",+ "version": "0.9.30","mcpTools": 54,"hooks": 12,- "restEndpoints": 130,- "testsPassing": 1654,- "generatedAt": "2026-08-15T21:50:19.597Z"+ "restEndpoints": 138,+ "testsPassing": 2520,+ "stars": 29164,+ "forks": 2554,+ "contributors": 48,+ "releases": 51,+ "npmWeekly": 6106,+ "npmMonthly": 24228,+ "npmAllTime": 461269,+ "generatedAt": "2026-10-06T07:03:04.638Z"}diff --git a/website/lib/github.ts b/website/lib/github.tsdeleted file mode 100644index 02def56e..00000000--- a/website/lib/github.ts+++ /dev/null@@ -1,39 +0,0 @@-import "server-only";--export interface RepoStats {- stars: number;- forks: number;- issues: number;-}--const REPO = "rohitg00/agentmemory";--export async function fetchRepoStats(): Promise<RepoStats> {- const fallback: RepoStats = { stars: 0, forks: 0, issues: 0 };- try {- const headers: Record<string, string> = {- accept: "application/vnd.github+json",- "user-agent": "agentmemory-website",- };- if (process.env.GITHUB_TOKEN) {- headers.authorization = `Bearer ${process.env.GITHUB_TOKEN}`;- }- const res = await fetch(`https://api.github.com/repos/${REPO}`, {- headers,- next: { revalidate: 3600 },- });- if (!res.ok) return fallback;- const data = (await res.json()) as {- stargazers_count?: number;- forks_count?: number;- open_issues_count?: number;- };- return {- stars: data.stargazers_count ?? 0,- forks: data.forks_count ?? 0,- issues: data.open_issues_count ?? 0,- };- } catch {- return fallback;- }-}diff --git a/website/lib/llms.ts b/website/lib/llms.tsnew file mode 100644index 00000000..8c4dfe0b--- /dev/null+++ b/website/lib/llms.ts@@ -0,0 +1,138 @@+import "server-only";+import { COMPETITORS } from "./compare";+import {+ AGENTS,+ AGENT_INSTALL_PROMPT,+ FAQ,+ GATE_SCENARIOS,+ INSTALL_CMD,+ LONGMEMEVAL,+ REPO_URL,+ SITE_URL,+ TOKENS,+ src,+} from "./site";+import { MCP_JSON } from "./rest";+import { getProjectMeta } from "./meta";++const SUMMARY =+ "agentmemory is open-source persistent memory for AI coding agents. Hooks capture what an agent does during a session, the local server stores and indexes it on the user's machine, and the next session starts with the relevant memories already in context. It runs locally with no account and no API key, and is licensed Apache-2.0.";++export function llmsTxt(): string {+ const m = getProjectMeta();+ return [+ "# agentmemory",+ "",+ `> ${SUMMARY}`,+ "",+ `Current version: ${m.version}. Install: \`${INSTALL_CMD}\`.`,+ "",+ "## Pages",+ "",+ `- [Home](${SITE_URL}/): what agentmemory does and how it works`,+ `- [Benchmarks](${SITE_URL}/benchmarks): retrieval recall and token cost, with methodology`,+ `- [Security](${SITE_URL}/security): what runs where, auth, and how to report a vulnerability`,+ `- [Privacy](${SITE_URL}/privacy): what is stored and what leaves the machine`,+ `- [Changelog](${SITE_URL}/changelog): every release`,+ `- [Compare](${SITE_URL}/vs): agentmemory side by side with other memory tools, with sources`,+ ...COMPETITORS.map((c) => `- [agentmemory vs ${c.name}](${SITE_URL}/vs/${c.slug})`),+ "",+ "## Docs",+ "",+ `- [Documentation](${SITE_URL}/docs)`,+ `- [README](${REPO_URL}/blob/main/README.md): full reference, configuration and API`,+ `- [INSTALL_FOR_AGENTS.md](${REPO_URL}/blob/main/INSTALL_FOR_AGENTS.md): step-by-step install instructions written for coding agents`,+ "",+ "## Optional",+ "",+ `- [llms-full.txt](${SITE_URL}/llms-full.txt): the whole site as plain text`,+ `- [Source code](${REPO_URL})`,+ `- [npm package](${src.npm})`,+ "",+ ].join("\n");+}++export function llmsFullTxt(): string {+ const m = getProjectMeta();+ const plugins = AGENTS.filter((a) => a.support === "plugin");+ const others = AGENTS.filter((a) => a.support !== "plugin");+ const agentLine = (a: (typeof AGENTS)[number]) =>+ `- ${a.name}: ${a.detail}${a.connect ? `. Wire it with \`agentmemory connect ${a.connect}\`` : ""}`;+ const h = LONGMEMEVAL.hybrid;+ const b = LONGMEMEVAL.bm25;+ return [+ "# agentmemory",+ "",+ SUMMARY,+ "",+ `Version ${m.version}. ${m.mcpTools} MCP tools, ${m.hooks} capture hooks, ${m.restEndpoints} REST endpoints, ${m.testsPassing.toLocaleString("en-US")} tests. Website: ${SITE_URL}. Source: ${REPO_URL}.`,+ "",+ "## Install",+ "",+ "Requires Node.js 20 or newer.",+ "",+ `1. Start the memory server: \`${INSTALL_CMD}\`. The first run installs the pinned engine, starts the server on port 3111 and the viewer on port 3113, and asks which agents to wire.`,+ "2. Wire another agent at any time: `agentmemory connect <agent>`. Add `--with-hooks` for automatic capture where the agent supports it.",+ `3. Or hand a coding agent this instruction: "${AGENT_INSTALL_PROMPT}"`,+ "",+ "Any other MCP client: merge this entry into its mcpServers object. With no variables set it talks to http://localhost:3111.",+ "",+ "```json",+ MCP_JSON,+ "```",+ "",+ "## How it works",+ "",+ "1. Capture. Hooks fire on every prompt and tool call. Each event is posted to the local server on port 3111 with a restart-safe id, or spooled to disk if the server is down.",+ "2. Store. Each event becomes an observation in the local data directory: the tool, the file, a bounded copy of the output, and the session it came from. The data directory is ~/Library/Application Support/agentmemory on macOS, $XDG_DATA_HOME/agentmemory or ~/.local/share/agentmemory on Linux, and %APPDATA%\\agentmemory on Windows; AGENTMEMORY_DATA_DIR overrides it.",+ "3. Index. Observations are indexed twice: BM25 terms for exact words and vectors for meaning. Local embeddings work with no API key.",+ "4. Consolidate. When the session ends, related observations collapse into memories that keep links back to every observation they came from.",+ "5. Recall. The next session opens with the relevant memories already in context.",+ "",+ "## Agents",+ "",+ `Native plugins (${plugins.length}), where hooks capture automatically:`,+ "",+ ...plugins.map(agentLine),+ "",+ `MCP and REST (${others.length}):`,+ "",+ ...others.map(agentLine),+ "",+ "## Benchmarks",+ "",+ `LongMemEval-S, ${LONGMEMEVAL.questions} questions, retrieval recall (does a gold session appear in the top K results). Embedding model: ${LONGMEMEVAL.embedding}. No LLM in the loop. This measures retrieval, not end-to-end question answering accuracy.`,+ "",+ `- BM25 plus vectors: recall@5 ${h.r5}%, recall@10 ${h.r10}%, recall@20 ${h.r20}%, NDCG@10 ${h.ndcg10}%, MRR ${h.mrr}%`,+ `- BM25 only (keyless): recall@5 ${b.r5}%, recall@10 ${b.r10}%, recall@20 ${b.r20}%, NDCG@10 ${b.ndcg10}%, MRR ${b.mrr}%`,+ `- Source and reproduction steps: ${src.longmemeval}`,+ "",+ `Token cost: recalling from agentmemory used ${TOKENS.agentmemory.toLocaleString("en-US")} tokens where loading the full history used ${TOKENS.fullContext.toLocaleString("en-US")}, about ${TOKENS.savedPct}% fewer, measured on v0.6.0. Source: ${src.tokens}`,+ "",+ "Release gate: every publish installs the packed package and runs these scenarios against it:",+ "",+ ...GATE_SCENARIOS.map((g) => `- ${g.id}: ${g.what}`),+ "",+ "## Privacy and security",+ "",+ "- Memories and captured activity are stored in the local data directory on the user's machine (~/Library/Application Support/agentmemory on macOS, $XDG_DATA_HOME/agentmemory or ~/.local/share/agentmemory on Linux, %APPDATA%\\agentmemory on Windows). ~/.agentmemory holds configuration and the generated secret. There is no account, no hosted service and no telemetry.",+ "- Nothing leaves the machine unless the user configures an LLM or embedding provider; then that provider receives the text it needs. Local embeddings send nothing.",+ "- The REST API requires a bearer token by default. A secret is generated into ~/.agentmemory/secret on first start when AGENTMEMORY_SECRET is unset.",+ "- The bundled engine config binds to 127.0.0.1.",+ `- Report vulnerabilities privately through GitHub Security Advisories, as described in ${REPO_URL}/blob/main/SECURITY.md`,+ "",+ "## FAQ",+ "",+ ...FAQ.flatMap((f) => [`### ${f.q}`, "", f.a, ""]),+ "## Links",+ "",+ `- Benchmarks: ${SITE_URL}/benchmarks`,+ `- Security: ${SITE_URL}/security`,+ `- Privacy: ${SITE_URL}/privacy`,+ `- Changelog: ${SITE_URL}/changelog`,+ `- Compare: ${SITE_URL}/vs`,+ `- Docs: ${SITE_URL}/docs`,+ `- npm: ${src.npm}`,+ "",+ ].join("\n");+}diff --git a/website/lib/markdown.tsx b/website/lib/markdown.tsxnew file mode 100644index 00000000..cbe4e4e0--- /dev/null+++ b/website/lib/markdown.tsx@@ -0,0 +1,146 @@+import type { ReactNode } from "react";++type Block =+ | { kind: "h"; level: number; text: string }+ | { kind: "p"; text: string }+ | { kind: "code"; text: string }+ | { kind: "list"; items: { text: string; children: string[] }[] };++function safeHref(href: string): string | null {+ if (/^https?:\/\//i.test(href)) return href;+ if (href.startsWith("#") || href.startsWith("/")) return href;+ return null;+}++const INLINE = /(`[^`]+`)|(\*\*[^*]+\*\*)|(\[([^\]]+)\]\(([^)\s]+)\))/g;++export function inline(text: string, key = "i"): ReactNode[] {+ const out: ReactNode[] = [];+ let last = 0;+ let n = 0;+ for (const m of text.matchAll(INLINE)) {+ const at = m.index ?? 0;+ if (at > last) out.push(text.slice(last, at));+ const k = `${key}-${n++}`;+ if (m[1]) out.push(<code key={k}>{m[1].slice(1, -1)}</code>);+ else if (m[2]) out.push(<strong key={k}>{inline(m[2].slice(2, -2), k)}</strong>);+ else if (m[3]) {+ const href = safeHref(m[5]);+ const label = inline(m[4], k);+ out.push(+ href ? (+ <a key={k} href={href} target={href.startsWith("http") ? "_blank" : undefined} rel="noreferrer">+ {label}+ </a>+ ) : (+ <span key={k}>{label}</span>+ ),+ );+ }+ last = at + m[0].length;+ }+ if (last < text.length) out.push(text.slice(last));+ return out;+}++function parse(md: string): Block[] {+ const lines = md.replace(/\r\n/g, "\n").split("\n");+ const blocks: Block[] = [];+ let para: string[] = [];+ let list: { text: string; children: string[] }[] | null = null;++ const flushPara = () => {+ if (para.length) blocks.push({ kind: "p", text: para.join(" ") });+ para = [];+ };+ const flushList = () => {+ if (list) blocks.push({ kind: "list", items: list });+ list = null;+ };++ for (let i = 0; i < lines.length; i++) {+ const line = lines[i];+ if (line.trim().startsWith("```")) {+ flushPara();+ flushList();+ const body: string[] = [];+ i++;+ while (i < lines.length && !lines[i].trim().startsWith("```")) body.push(lines[i++]);+ blocks.push({ kind: "code", text: body.join("\n") });+ continue;+ }+ const h = line.match(/^(#{2,4})\s+(.*)$/);+ if (h) {+ flushPara();+ flushList();+ blocks.push({ kind: "h", level: h[1].length, text: h[2].trim() });+ continue;+ }+ const nested = line.match(/^\s{2,}[-*]\s+(.*)$/);+ if (nested && list && list.length) {+ list[list.length - 1].children.push(nested[1]);+ continue;+ }+ const li = line.match(/^[-*]\s+(.*)$/);+ if (li) {+ flushPara();+ if (!list) list = [];+ list.push({ text: li[1], children: [] });+ continue;+ }+ if (!line.trim()) {+ flushPara();+ flushList();+ continue;+ }+ if (list && list.length && /^\s+\S/.test(line)) {+ list[list.length - 1].text += ` ${line.trim()}`;+ continue;+ }+ flushList();+ para.push(line.trim());+ }+ flushPara();+ flushList();+ return blocks;+}++export function Markdown({ source, idPrefix = "md" }: { source: string; idPrefix?: string }) {+ return (+ <>+ {parse(source).map((b, i) => {+ const k = `${idPrefix}-${i}`;+ if (b.kind === "h") {+ const content = inline(b.text, k);+ return b.level <= 3 ? <h3 key={k}>{content}</h3> : <h4 key={k}>{content}</h4>;+ }+ if (b.kind === "code") {+ return (+ <pre key={k}>+ <code>{b.text}</code>+ </pre>+ );+ }+ if (b.kind === "list") {+ return (+ <ul key={k}>+ {b.items.map((it, j) => (+ <li key={`${k}-${j}`}>+ {inline(it.text, `${k}-${j}`)}+ {it.children.length > 0 && (+ <ul>+ {it.children.map((c, m) => (+ <li key={`${k}-${j}-${m}`}>{inline(c, `${k}-${j}-${m}`)}</li>+ ))}+ </ul>+ )}+ </li>+ ))}+ </ul>+ );+ }+ return <p key={k}>{inline(b.text, k)}</p>;+ })}+ </>+ );+}diff --git a/website/lib/meta.ts b/website/lib/meta.tsindex e56e047e..b7c6e4e9 100644--- a/website/lib/meta.ts+++ b/website/lib/meta.ts@@ -7,19 +7,24 @@ export interface ProjectMeta {hooks: number;restEndpoints: number;testsPassing: number;+ stars: number;+ forks: number;+ contributors: number;+ releases: number;+ npmWeekly: number;+ npmMonthly: number;+ npmAllTime: number;+ generatedAt: string;}-// Values are baked at build time by scripts/gen-meta.mjs (see package.json-// prebuild). Runtime file lookups via import.meta.url break after Next.js-// moves server components into .next/server/ — `../..` from there stays-// inside the build cache, not at the repo root, and version silently falls-// back to "0.0.0". Static JSON import sidesteps that entirely.export function getProjectMeta(): ProjectMeta {- return {- version: generated.version,- mcpTools: generated.mcpTools,- hooks: generated.hooks,- restEndpoints: generated.restEndpoints,- testsPassing: generated.testsPassing,- };+ return generated as ProjectMeta;+}++export function compact(n: number): string {+ if (n >= 1000) {+ const k = n / 1000;+ return `${k >= 100 ? Math.round(k) : k.toFixed(1).replace(/\.0$/, "")}K`;+ }+ return String(n);}diff --git a/website/lib/rest.ts b/website/lib/rest.tsnew file mode 100644index 00000000..ada69683--- /dev/null+++ b/website/lib/rest.ts@@ -0,0 +1,82 @@+export const MCP_JSON = `{+ "mcpServers": {+ "agentmemory": {+ "command": "npx",+ "args": ["-y", "@agentmemory/mcp"],+ "env": {+ "AGENTMEMORY_URL": "\${AGENTMEMORY_URL}",+ "AGENTMEMORY_SECRET": "\${AGENTMEMORY_SECRET}"+ }+ }+ }+}`;++export const LOGO_OVERRIDES: Record<string, string> = {+ "Copilot CLI": "https://svgl.app/library/github_light.svg",+ Cursor: "https://svgl.app/library/cursor_light.svg",+ Zed: "https://svgl.app/library/zed-logo.svg",+ "Qwen Code": "https://svgl.app/library/qwen_light.svg",+ OpenHuman: "https://github.com/tinyhumansai.png",+};++export const FEATURED_LOGOS: Record<string, { src: string; wide?: boolean }> = {+ AlphaSignal: { src: "https://avatars.githubusercontent.com/u/64016073?s=96&v=4" },+ "Agentic AI Foundation": { src: "/featured/aaif-logo.png", wide: true },+ Trendshift: { src: "https://trendshift.io/favicon.ico" },+ "Product Hunt": { src: "https://cdn.simpleicons.org/producthunt" },+};++export const INTERFACES = [+ {+ id: "viewer",+ label: "Viewer",+ port: ":3113",+ title: "The viewer ships with the server",+ body: "agentmemory starts a real-time viewer on port 3113 with no extra install. Watch observations arrive as hooks fire, replay any past session, browse memories and the knowledge graph, and check health on one page.",+ points: ["Live observation stream", "Session replay", "Memory and graph browser", "Health and status page"],+ img: "/demo.gif",+ width: 720,+ height: 405,+ alt: "agentmemory viewer showing a live stream of captured observations",+ launch: "open http://localhost:3113",+ },+ {+ id: "console",+ label: "Engine console",+ port: ":3114",+ title: "Every function, worker and queue",+ body: "agentmemory runs on the iii engine, and its console shows what the engine is doing: registered functions you can invoke with JSON, HTTP endpoints you can replay, and live stream frames.",+ points: ["Invoke any function directly", "Replay REST calls", "Watch WebSocket frames", "Bound to 127.0.0.1"],+ img: "/dashboard.png",+ width: 2972,+ height: 1688,+ alt: "iii console dashboard for the agentmemory engine",+ launch: "agentmemory console",+ },+ {+ id: "state",+ label: "State",+ port: ":3114/states",+ title: "Browse the raw store",+ body: "Every key agentmemory writes is visible and editable in the state browser, so you can see exactly what is stored about your sessions.",+ points: ["Raw KV browser", "JSON editor", "Scopes such as mem:obs and mem:memories"],+ img: "/states.png",+ width: 2503,+ height: 1344,+ alt: "iii console state browser listing agentmemory keys",+ launch: "open http://localhost:3114/states",+ },+ {+ id: "traces",+ label: "Traces",+ port: ":3114/traces",+ title: "OpenTelemetry out of the box",+ body: "Every memory operation emits a trace span and a structured log. Traces stay in memory on your machine by default, and you can point the exporter at any OTLP backend.",+ points: ["Waterfall and flame views", "Span per memory operation", "Local by default"],+ img: "/traces-waterfall.png",+ width: 2984,+ height: 1708,+ alt: "trace waterfall for an agentmemory recall",+ launch: "open http://localhost:3114/traces",+ },+];diff --git a/website/lib/site.ts b/website/lib/site.tsnew file mode 100644index 00000000..eb933c9e--- /dev/null+++ b/website/lib/site.ts@@ -0,0 +1,162 @@+export const SITE_URL = "https://agent-memory.dev";+export const REPO = "rohitg00/agentmemory";+export const REPO_URL = `https://github.com/${REPO}`;+export const NPM_URL = "https://www.npmjs.com/package/@agentmemory/agentmemory";+export const DOCS_URL = "/docs";+export const INSTALL_CMD = "npx -y @agentmemory/agentmemory@latest";+export const AGENT_INSTALL_PROMPT =+ "Retrieve and follow the instructions at: https://raw.githubusercontent.com/rohitg00/agentmemory/main/INSTALL_FOR_AGENTS.md";++export const src = {+ longmemeval: `${REPO_URL}/blob/main/benchmark/LONGMEMEVAL.md`,+ tokens: `${REPO_URL}/blob/main/benchmark/REAL-EMBEDDINGS.md`,+ agentLife: `${REPO_URL}/blob/main/docs/benchmarks/2026-05-20-coding-agent-life-v1.md`,+ gate: `${REPO_URL}/tree/main/scripts/release-gate`,+ costs: `${REPO_URL}/blob/main/docs/benchmarks/capture-costs.svg`,+ stars: `${REPO_URL}/stargazers`,+ contributors: `${REPO_URL}/graphs/contributors`,+ releases: `${REPO_URL}/releases`,+ npm: NPM_URL,+ license: `${REPO_URL}/blob/main/LICENSE`,+ changelog: `${REPO_URL}/blob/main/CHANGELOG.md`,+ paper: "https://arxiv.org/abs/2410.10813",+ dataset: "https://huggingface.co/datasets/xiaowu0162/longmemeval-cleaned",+};++export const NAV = [+ { label: "Use cases", href: "/#use-cases" },+ { label: "How it works", href: "/#how" },+ { label: "Benchmarks", href: "/benchmarks" },+ { label: "Security", href: "/security" },+ { label: "Docs", href: DOCS_URL },+];++export type Support = "plugin" | "mcp" | "rest";++export interface Agent {+ name: string;+ logo: string;+ href: string;+ support: Support;+ detail: string;+ connect?: string;+}++export const AGENTS: Agent[] = [+ { name: "Claude Code", logo: "https://github.com/anthropics.png", href: "https://claude.com/product/claude-code", support: "plugin", detail: "12 hooks, MCP, skills", connect: "claude-code" },+ { name: "Codex CLI", logo: "https://github.com/openai.png", href: "https://github.com/openai/codex", support: "plugin", detail: "6 hooks, MCP", connect: "codex" },+ { name: "Copilot CLI", logo: "https://svgl.app/library/github_dark.svg", href: "https://docs.github.com/copilot/github-copilot-in-the-cli", support: "plugin", detail: "plugin hooks, skills, MCP", connect: "copilot-cli" },+ { name: "Cursor", logo: "https://svgl.app/library/cursor_dark.svg", href: `${REPO_URL}/tree/main/.cursor-plugin`, support: "plugin", detail: "7 hooks, 17 skills, MCP", connect: "cursor" },+ { name: "OpenCode", logo: "/opencode.png", href: `${REPO_URL}/tree/main/plugin/opencode`, support: "plugin", detail: "capture plugin, MCP", connect: "opencode" },+ { name: "Devin", logo: "/devin.png", href: "https://devin.ai", support: "plugin", detail: "6 hooks, skills, MCP", connect: "devin" },+ { name: "OpenClaw", logo: "https://github.com/openclaw.png", href: "https://github.com/openclaw/openclaw", support: "plugin", detail: "gateway plugin, MCP", connect: "openclaw" },+ { name: "Hermes", logo: "https://github.com/NousResearch.png", href: "https://github.com/NousResearch", support: "plugin", detail: "Python plugin, MCP", connect: "hermes" },+ { name: "pi", logo: "https://raw.githubusercontent.com/rohitg00/agentmemory/main/assets/agents/pi.svg", href: `${REPO_URL}/tree/main/integrations/pi`, support: "plugin", detail: "native plugin, MCP", connect: "pi" },+ { name: "OpenHuman", logo: "https://raw.githubusercontent.com/tinyhumansai/openhuman/main/app/src-tauri/icons/128x128.png", href: "https://github.com/tinyhumansai/openhuman", support: "plugin", detail: "native Memory backend", connect: "openhuman" },+ { name: "Gemini CLI", logo: "https://github.com/google-gemini.png", href: "https://github.com/google-gemini/gemini-cli", support: "mcp", detail: "MCP server", connect: "gemini-cli" },+ { name: "Antigravity", logo: "https://svgl.app/library/antigravity.svg", href: "https://antigravity.google", support: "mcp", detail: "MCP, hooks", connect: "antigravity" },+ { name: "Claude Desktop", logo: "https://github.com/anthropics.png", href: "https://claude.ai/download", support: "mcp", detail: "MCP server" },+ { name: "Warp", logo: "https://svgl.app/library/warp.svg", href: "https://www.warp.dev", support: "mcp", detail: "MCP server", connect: "warp" },+ { name: "Zed", logo: "https://svgl.app/library/zed-logo_dark.svg", href: "https://zed.dev", support: "mcp", detail: "MCP server", connect: "zed" },+ { name: "Cline", logo: "https://github.com/cline.png", href: "https://github.com/cline/cline", support: "mcp", detail: "MCP server", connect: "cline" },+ { name: "Continue", logo: "https://github.com/continuedev.png", href: "https://continue.dev", support: "mcp", detail: "MCP server", connect: "continue" },+ { name: "Droid", logo: "https://www.factory.ai/favicon.svg", href: "https://docs.factory.ai/cli", support: "mcp", detail: "MCP server", connect: "droid" },+ { name: "Kiro", logo: "https://kiro.dev/favicon.ico", href: "https://kiro.dev", support: "mcp", detail: "MCP server", connect: "kiro" },+ { name: "Qwen Code", logo: "https://svgl.app/library/qwen_dark.svg", href: "https://github.com/QwenLM/qwen-code", support: "mcp", detail: "MCP server", connect: "qwen" },+ { name: "DeepSeek Harness", logo: "https://svgl.app/library/deepseek.svg", href: "https://github.com/deepseek-ai/deepseek-harness", support: "mcp", detail: "MCP server", connect: "dsh" },+ { name: "Roo Code", logo: "https://github.com/RooCodeInc.png", href: "https://github.com/RooCodeInc/Roo-Code", support: "mcp", detail: "MCP server" },+ { name: "Kilo Code", logo: "https://github.com/Kilo-Org.png", href: "https://github.com/Kilo-Org/kilocode", support: "mcp", detail: "MCP server" },+ { name: "Goose", logo: "https://github.com/block.png", href: "https://github.com/block/goose", support: "mcp", detail: "MCP server" },+ { name: "Aider", logo: "https://github.com/Aider-AI.png", href: "https://github.com/Aider-AI/aider", support: "rest", detail: "REST API" },+];++export const LONGMEMEVAL = {+ questions: 500,+ hybrid: { r5: 95.2, r10: 98.6, r20: 99.4, ndcg10: 87.9, mrr: 88.2 },+ bm25: { r5: 86.2, r10: 94.6, r20: 98.6, ndcg10: 73.0, mrr: 71.5 },+ byType: [+ { type: "knowledge-update", count: 78, r5: 98.7, r10: 100.0, h5: 77, h10: 78 },+ { type: "multi-session", count: 133, r5: 97.7, r10: 100.0, h5: 130, h10: 133 },+ { type: "single-session-assistant", count: 56, r5: 96.4, r10: 98.2, h5: 54, h10: 55 },+ { type: "temporal-reasoning", count: 133, r5: 95.5, r10: 97.7, h5: 127, h10: 130 },+ { type: "single-session-user", count: 70, r5: 90.0, r10: 97.1, h5: 63, h10: 68 },+ { type: "single-session-preference", count: 30, r5: 83.3, r10: 96.7, h5: 25, h10: 29 },+ ],+ embedding: "all-MiniLM-L6-v2, 384 dimensions, local",+};++export const TOKENS = { fullContext: 19462, agentmemory: 1571, savedPct: 92 };++export const GATE_SCENARIOS = [+ { id: "install", what: "The packed artifact installs and reports its identity" },+ { id: "capture", what: "Bundled hooks capture, and search finds every marker" },+ { id: "mcp", what: "Installed MCP entrypoints list tools and save and search through the server" },+ { id: "offline", what: "Hooks run while the service is down, and the spool is recovered on restart" },+ { id: "dedup", what: "A replayed host event after a force kill stays one observation" },+ { id: "deadletter", what: "A capture that fails processing survives a restart as a dead letter" },+ { id: "vectors", what: "Vectors made before the first checkpoint survive a crash" },+ { id: "stopflush", what: "agentmemory stop, then start, loses nothing" },+ { id: "status", what: "The viewer serves and /agentmemory/status explains every problem" },+ { id: "roundtrip", what: "Export, then import into a fresh home, round-trips" },+];++export const FEATURED = [+ { name: "AlphaSignal", sub: "Technical deep-dive, 180K subscribers", href: "https://alphasignalai.substack.com/p/how-agentmemory-works-and-how-to" },+ { name: "Agentic AI Foundation", sub: "Linux Foundation backed", href: "https://aaif.io/" },+ {+ name: "Trendshift",+ sub: "Trending repository",+ href: "https://trendshift.io/repositories/25123?utm_source=repository-badge&utm_medium=badge&utm_campaign=badge-repository-25123",+ badge: {+ light: "https://trendshift.io/api/badge/repositories/25123",+ dark: "https://trendshift.io/api/badge/repositories/25123",+ alt: "rohitg00/agentmemory on Trendshift",+ },+ },+ {+ name: "Product Hunt",+ sub: "#2 Product of the Day",+ href: "https://www.producthunt.com/products/agent-memory-dev/launches/agentmemory?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-agentmemory",+ badge: {+ light: "https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1144164&theme=light&period=daily",+ dark: "https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1144164&theme=dark&period=daily",+ alt: "agentmemory, #2 Product of the Day on Product Hunt",+ },+ },+];++const PH = "https://www.producthunt.com/p/agent-memory-dev/how-do-you-found-agentmemory-so-far-happy-to-help";++export const QUOTES = [+ { name: "Peter Neyra", context: "Backfilled a month of Cursor transcripts", quote: "I backfilled agent memory on my past month's Cursor agent transcripts. It was surprisingly accurate. Picked up on things that I moved away from.", href: `${PH}?comment=5379518` },+ { name: "Alper Tayfur", context: "Product Hunt launch thread", quote: "Tackles one of the biggest pain points with coding agents: losing useful project context across sessions without bloating the context window.", href: PH },+ { name: "Thomas Hall", context: "Product Hunt launch thread", quote: "Memory often becomes just more noise over time. Agentmemory feels more intentional compared to a lot of tools in this space.", href: PH },+ { name: "Pranav Prakash", context: "Two weeks of daily use", quote: "Been using it for 2 weeks, and I definitely see improvements.", href: PH },+];++export const FAQ = [+ {+ q: "What does agentmemory actually store?",+ a: "Observations from your agent's sessions: the prompts you typed, the tools it called and a bounded copy of their output, and the session summaries built from them. Consolidation turns related observations into memories, lessons and graph facts. Everything lives in a data folder on your machine, for example ~/Library/Application Support/agentmemory on macOS.",+ },+ {+ q: "Does anything leave my machine?",+ a: "Not by default. With no provider configured, recall runs on BM25 keyword search and nothing is sent anywhere. If you add an LLM or an embedding provider, agentmemory sends that provider the text it needs. Local embeddings send nothing. There is no telemetry.",+ },+ {+ q: "Do I need an API key?",+ a: "No. Keyless mode works out of the box with BM25 recall. Set EMBEDDING_PROVIDER=local for free on-device semantic recall, or add a provider key for LLM consolidation.",+ },+ {+ q: "Which agents does it work with?",+ a: "Any MCP client. Claude Code, Codex CLI, Copilot CLI, Cursor, OpenCode, Devin and others get native plugins with hooks that capture automatically. Run agentmemory connect <agent> to wire one.",+ },+ {+ q: "What happens if the server crashes mid-session?",+ a: "Hooks write to an offline spool while the server is down and drain it when it comes back. Each event has a restart-safe id, so replays are stored once. Vectors survive a crash through a pending log. Every publish runs a release gate that force-kills the installed package and checks nothing was lost.",+ },+ {+ q: "How is it licensed?",+ a: "Apache-2.0. The whole runtime is open source, including the parts that run on your machine. There is no hosted tier and no feature held back.",+ },+];diff --git a/website/lib/trust.ts b/website/lib/trust.tsnew file mode 100644index 00000000..c873ff36--- /dev/null+++ b/website/lib/trust.ts@@ -0,0 +1,43 @@+export const MACHINE_NODES = [+ { name: "coding agent", sub: "Claude Code, Codex, Cursor and others" },+ { name: "hooks + MCP", sub: "PostToolUse, SessionStart, 54 tools" },+ { name: "agentmemory", sub: "127.0.0.1:3111, REST and MCP, auth on" },+ { name: "iii engine", sub: "streams :3112, workers :49134" },+ { name: "on disk", sub: "~/.agentmemory and the data dir" },+];++export const DISK_WRITES = [+ { id: "obs_01", what: "PostToolUse · Read src/auth/session.ts" },+ { id: "obs_02", what: "PostToolUse · Bash npm test -- auth" },+ { id: "obs_03", what: "PostToolUse · Edit src/auth/refresh.ts" },+];++export const MACHINE_EXTRAS = [+ { name: "viewer", sub: "127.0.0.1:3113" },+ { name: "secret", sub: "~/.agentmemory/secret, mode 0600" },+];++export const PROVIDERS = [+ {+ name: "LLM provider",+ sends: "Observation text it needs to write summaries and consolidate memories, once you add a key.",+ },+ {+ name: "Embedding provider",+ sends: "Text to embed for semantic recall. EMBEDDING_PROVIDER=local embeds on your machine and sends nothing.",+ },+];++export const TELEMETRY_LINE =+ "Telemetry: none. The iii engine's anonymous usage telemetry is off; agentmemory starts it with III_TELEMETRY_ENABLED=false.";++export const GATE_NOTES: Record<string, string> = {+ install: "npm pack, then install the tarball into an empty prefix and record its sha256",+ dedup: "SIGKILL the engine and CLI, restart, replay the event twice: stored once",+ vectors: "SIGKILL before the first checkpoint, restart: 0 inputs re-embedded",+ offline: "stop the server, run hooks into capture-spool, restart: spool drained to 0",+ deadletter: "SIGKILL, restart: the failed capture is still a dead letter, then retries through POST /capture/retry",+};++export const GATE_SOURCE = "https://github.com/rohitg00/agentmemory/blob/main/scripts/release-gate/run.mjs";+export const GATE_WORKFLOW = "https://github.com/rohitg00/agentmemory/blob/main/.github/workflows/release-gate.yml";diff --git a/website/scripts/gen-meta.mjs b/website/scripts/gen-meta.mjsindex 4107663b..f99c2b0d 100644--- a/website/scripts/gen-meta.mjs+++ b/website/scripts/gen-meta.mjs@@ -1,18 +1,4 @@#!/usr/bin/env node-/**- * Build-time meta generator.- *- * Runs before `next build` (see package.json prebuild). Walks the real repo- * (one level up from website/) and writes website/lib/generated-meta.json with- * the version, MCP tool count, hook count, REST endpoint count, and test count.- *- * Reason this exists: meta.ts used to read package.json at runtime via- * import.meta.url, but after Next.js compiles server components the URL- * resolves into .next/server/ — ../.. stays inside the build cache, not at the- * repo root, and the version silently falls back to "0.0.0". By resolving- * files at build time from a known working directory (where this script- * actually runs), we avoid the runtime path-guessing entirely.- */import { readFileSync, readdirSync, writeFileSync, mkdirSync } from "node:fs";import { join, dirname } from "node:path";import { fileURLToPath } from "node:url";@@ -86,7 +72,7 @@ const version = pkg?.version;if (!version) {throw new Error(`gen-meta: could not read version from ${join(repoRoot, "package.json")}. ` +- `Check Vercel Root Directory — the full repo must be checked out, not just website/.`,+ `Check Vercel Root Directory: the full repo must be checked out, not just website/.`,);}@@ -101,20 +87,131 @@ const mcpTools = safeCountMatches(const hooks = countHookTypes(join(repoRoot, "src", "types.ts"));const testsPassing = countTestCases(join(repoRoot, "test"));+const REPO = "rohitg00/agentmemory";+const NPM_PKG = "@agentmemory/agentmemory";++const outDir = join(websiteDir, "lib");+mkdirSync(outDir, { recursive: true });+const outPath = join(outDir, "generated-meta.json");+const previous = safeReadJson(outPath) ?? {};++async function getJson(url, headers = {}) {+ const res = await fetch(url, {+ headers: { "user-agent": "agentmemory-website", ...headers },+ signal: AbortSignal.timeout(6000),+ });+ if (!res.ok) throw new Error(`${url} ${res.status}`);+ return { res, data: await res.json() };+}++function lastPage(linkHeader, fallback) {+ const m = linkHeader?.match(/[?&]page=(\d+)>;\s*rel="last"/);+ return m ? Number(m[1]) : fallback;+}++const NPM_ALL_TIME_PKGS = [NPM_PKG, "@agentmemory/mcp"];+const NPM_FIRST_DAY = "2026-04-01";+const NPM_WINDOW_DAYS = 540;++function day(d) {+ return d.toISOString().slice(0, 10);+}++async function npmAllTime() {+ const end = new Date();+ let total = 0;+ for (const pkg of NPM_ALL_TIME_PKGS) {+ let from = new Date(`${NPM_FIRST_DAY}T00:00:00Z`);+ while (from <= end) {+ const to = new Date(Math.min(end.getTime(), from.getTime() + (NPM_WINDOW_DAYS - 1) * 86400000));+ const { data } = await getJson(`https://api.npmjs.org/downloads/point/${day(from)}:${day(to)}/${pkg}`);+ total += data.downloads ?? 0;+ from = new Date(to.getTime() + 86400000);+ }+ }+ return total;+}++async function liveStats() {+ const gh = { accept: "application/vnd.github+json" };+ if (process.env.GITHUB_TOKEN) gh.authorization = `Bearer ${process.env.GITHUB_TOKEN}`;+ const out = {};+ const tasks = [+ getJson(`https://api.github.com/repos/${REPO}`, gh).then(({ data }) => {+ out.stars = data.stargazers_count;+ out.forks = data.forks_count;+ }),+ getJson(`https://api.github.com/repos/${REPO}/contributors?per_page=1&anon=false`, gh).then(({ res, data }) => {+ out.contributors = lastPage(res.headers.get("link"), data.length);+ }),+ getJson(`https://api.github.com/repos/${REPO}/releases?per_page=1`, gh).then(({ res, data }) => {+ out.releases = lastPage(res.headers.get("link"), data.length);+ }),+ getJson(`https://api.npmjs.org/downloads/point/last-week/${NPM_PKG}`).then(({ data }) => {+ out.npmWeekly = data.downloads;+ }),+ getJson(`https://api.npmjs.org/downloads/point/last-month/${NPM_PKG}`).then(({ data }) => {+ out.npmMonthly = data.downloads;+ }),+ npmAllTime().then((total) => {+ out.npmAllTime = total;+ }),+ ];+ const results = await Promise.allSettled(tasks);+ for (const r of results) {+ if (r.status === "rejected") console.warn(`[gen-meta] live stat skipped: ${r.reason?.message ?? r.reason}`);+ }+ return out;+}++const STAT_FALLBACK = {+ stars: 29137,+ forks: 2552,+ contributors: 48,+ releases: 51,+ npmWeekly: 6152,+ npmMonthly: 24699,+ npmAllTime: 452004,+};++const live = await liveStats();+const stats = {};+for (const key of Object.keys(STAT_FALLBACK)) {+ const value = live[key];+ stats[key] = Number.isFinite(value) && value > 0 ? value : previous[key] ?? STAT_FALLBACK[key];+}+const meta = {version,mcpTools: mcpTools || 45,hooks: hooks || 12,restEndpoints: restEndpoints || 107,testsPassing: testsPassing || 794,+ ...stats,generatedAt: new Date().toISOString(),};-const outDir = join(websiteDir, "lib");-mkdirSync(outDir, { recursive: true });-const outPath = join(outDir, "generated-meta.json");writeFileSync(outPath, JSON.stringify(meta, null, 2) + "\n", "utf-8");+function parseChangelog(text) {+ const releases = [];+ const re = /^## \[(\d+\.\d+\.\d+)\][^\n]*?(\d{4}-\d{2}-\d{2})?\s*$/gm;+ const heads = [...text.matchAll(re)];+ heads.forEach((m, i) => {+ const start = m.index + m[0].length;+ const end = i + 1 < heads.length ? heads[i + 1].index : text.length;+ const body = text+ .slice(start, end)+ .replace(/^\[[^\]]+\]:\s*https?:\/\/\S+\s*$/gm, "")+ .trim();+ releases.push({ version: m[1], date: m[2] ?? "", body });+ });+ return releases;+}++const changelog = parseChangelog(readFileSafe(join(repoRoot, "CHANGELOG.md"))).slice(0, 12);+writeFileSync(join(outDir, "generated-changelog.json"), JSON.stringify(changelog, null, 2) + "\n", "utf-8");+console.log(- `[gen-meta] wrote ${outPath}: v${meta.version}, ${meta.mcpTools} tools, ${meta.hooks} hooks, ${meta.restEndpoints} endpoints, ${meta.testsPassing} tests`,+ `[gen-meta] wrote ${outPath}: v${meta.version}, ${meta.mcpTools} tools, ${meta.hooks} hooks, ${meta.restEndpoints} endpoints, ${meta.testsPassing} tests, ${meta.stars} stars, ${meta.npmMonthly} npm/month, ${changelog.length} changelog entries`,);