Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).

## Testing

- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (4,000+ tests). Commit anything the generators changed. CI runs the same build, skills check and tests.
- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (4,100+ tests). Commit anything the generators changed. CI runs the same build, skills check and tests.
- Before any npm publish: `npm run release:gate` must pass. It installs the packed tarballs into a clean home and runs capture, recovery, restart, export/import, MCP and status checks against the installed CLI (see CONTRIBUTING.md, Release process)
- Mock pattern: `vi.mock("iii-sdk")` with mock `sdk.trigger`, `kv.get/set/list`
- Test files go in `test/` with `.test.ts` extension
Expand All @@ -114,4 +114,4 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).
- 6 MCP resources, 3 MCP prompts
- 12 hooks, 17 skills
- 322+ iii functions
- 4,000+ tests
- 4,100+ tests
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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="4,000+ 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="4,100+ tests passing" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1326,6 +1326,23 @@ Per-call override at the SDK / REST layer: every mutating endpoint (`/session/st

When `AGENT_ID` is unset, memory remains unscoped (legacy behavior, no tags, no filters).

### Repository-relative paths (`AGENTMEMORY_RELATIVE_PATHS`)

When several machines share one server, each clone records its files under its own absolute path (`/Users/me/dev/app/src/a.ts`, `/home/me/dev/app/src/a.ts`), and so does each worktree. File history then does not carry from one to the other. With `AGENTMEMORY_RELATIVE_PATHS=true`, the hooks send every path under the current repository, or under any of its worktrees, relative to that worktree's root (`src/a.ts`), and look up file history with those relative paths in the current project.

- Set it where the hooks run, on every machine. For Claude Code, that is the `env` block of `~/.claude/settings.json`. The hooks do not read it from `~/.agentmemory/.env`.
- The project is the repository's directory name. If the clones have different directory names, or two different repositories have the same name, set `AGENTMEMORY_PROJECT_NAME` on each machine as well.
- It applies to the Claude Code plugin hooks and to the integrations that run them. Anything that posts to `/agentmemory/observe` itself (OpenCode, Pi, OMP, Hermes, OpenClaw, the filesystem watcher, `agentmemory capture`) still sends absolute paths.
- A path a tool was given relative to a subdirectory (a Grep `path` of `src` run from `packages/x`) is stored as it was given.
- Paths already stored stay absolute. A relative lookup still finds one when it is that file under its session's repository root, the nearest directory at or above the session's `cwd` named after the project.
- `cwd` is still sent as it is.

Known limits:

- Windows is best effort and has no CI. A path field is converted in full, and free text up to the next space or list separator. A root written with mixed `\` and `/`, or relative paths that differ only in case, are not matched.
- An older absolute entry from a worktree in a sibling directory (`repo-feature/` next to `repo/`) is not found by a relative lookup, because its session's repository root cannot be worked out from its `cwd`. New captures are relative and are found.
- The project name comes from `git rev-parse` output, which cannot represent a newline in a repository path.

### Ports

The API and viewer bind to loopback by default.
Expand Down Expand Up @@ -1485,7 +1502,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.ar-SA.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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="4,000+ 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="4,100+ tests passing" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1451,7 +1451,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.bn-BD.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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 টুল" 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 অটো হুক" 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 এক্সটার্নাল ডিবি" 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="4,000+ টেস্ট পাস" 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="4,100+ টেস্ট পাস" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1464,7 +1464,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.cs-CZ.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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 nástrojů" 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 automatických 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 externích databází" 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="4,000+ testů úspěšně proběhlo" 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="4,100+ testů úspěšně proběhlo" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1450,7 +1450,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.da-DK.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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-værktøjer" 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 automatiske 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 eksterne databaser" 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="4,000+ beståede tests" 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="4,100+ beståede tests" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1458,7 +1458,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.de-DE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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 externe 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="4,000+ bestandene Tests" 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="4,100+ bestandene Tests" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1456,7 +1456,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.el-GR.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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" 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 αυτόματα 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 εξωτερικές βάσεις δεδομένων" 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="4,000+ επιτυχημένες δοκιμές" 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="4,100+ επιτυχημένες δοκιμές" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1450,7 +1450,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.es-ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<picture><source media="(prefers-color-scheme: dark)" srcset="../assets/tags/light/stat-tools.svg"><img src="../assets/tags/stat-tools.svg" alt="54 tools MCP" 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 hooks automáticos" 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 bases de datos externas" 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="4,000+ tests superados" 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="4,100+ tests superados" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1452,7 +1452,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.fi-FI.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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-työkalua" 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 automaattista hookia" 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 ulkoista tietokantaa" 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="4,000+ testiä läpäisty" 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="4,100+ testiä läpäisty" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1450,7 +1450,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.fr-FR.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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="4,000+ 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="4,100+ tests passing" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1459,7 +1459,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.he-IL.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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" 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 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 מסדי נתונים חיצוניים" 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="4,000+ בדיקות עוברות" 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="4,100+ בדיקות עוברות" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1451,7 +1451,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions READMEs/README.hi-IN.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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="4,000+ 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="4,100+ tests passing" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -1465,7 +1465,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 4,000+ tests
npm test # 4,100+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
Loading