diff --git a/AGENTS.md b/AGENTS.md index bb0c01fd..b5d156b2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -104,16 +104,16 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import). ## Testing -- All tests must pass before PR: `npm test` (699+ tests) +- All tests must pass before PR: `npm test` (950+ tests) - 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.8.9) +## Current Stats (v0.9.16) -- 44 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all) -- 104 REST endpoints +- 51 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all) +- 121 REST endpoints - 6 MCP resources, 3 MCP prompts - 12 hooks, 4 skills - 50+ iii functions -- 699 tests +- 950+ tests diff --git a/README.md b/README.md index 4fbbea9b..1b606aa1 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ 51 MCP tools 12 auto hooks 0 external DBs - 827 tests passing + 950+ tests passing

@@ -777,7 +777,7 @@ npm install @xenova/transformers > **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 51-tool surface **only when it can reach a running agentmemory server** via `AGENTMEMORY_URL` (proxy mode). With no server reachable, the shim falls back to a 7-tool local set (`memory_save`, `memory_recall`, `memory_smart_search`, `memory_sessions`, `memory_export`, `memory_audit`, `memory_governance_delete`). The `AGENTMEMORY_TOOLS=core|all` env var is a *server-side* flag — setting it in the shim's `env` block has no effect. If you see only 7 tools in Cursor / OpenCode / Gemini CLI, start `npx @agentmemory/agentmemory` (or the Docker stack) and set `AGENTMEMORY_URL=http://localhost:3111`. -### 50 Tools +### 51 Tools

Core tools (always available) @@ -799,7 +799,7 @@ npm install @xenova/transformers
-Extended tools (50 total — set AGENTMEMORY_TOOLS=all) +Extended tools (51 total — set AGENTMEMORY_TOOLS=all) | Tool | Description | |------|-------------| @@ -1017,7 +1017,7 @@ Full registry: [workers.iii.dev](https://workers.iii.dev). Every worker there co | Prometheus / Grafana | iii OTEL + health monitor | | Custom plugin systems | `iii worker add ` | -**118 source files · ~21,800 LOC · 800 tests · 123 functions · 34 KV scopes** — all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself. +**118 source files · ~21,800 LOC · 950+ tests · 123 functions · 34 KV scopes** — all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself. --- @@ -1128,7 +1128,7 @@ Create `~/.agentmemory/.env`:

API

-107 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default. Protected endpoints require `Authorization: Bearer ` when `AGENTMEMORY_SECRET` is set, and mesh sync endpoints require `AGENTMEMORY_SECRET` on both peers. +121 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default. Protected endpoints require `Authorization: Bearer ` when `AGENTMEMORY_SECRET` is set, and mesh sync endpoints require `AGENTMEMORY_SECRET` on both peers.
Key endpoints @@ -1162,7 +1162,7 @@ Full endpoint list: [`src/triggers/api.ts`](src/triggers/api.ts) ```bash npm run dev # Hot reload npm run build # Production build -npm test # 800 tests (~1.7s) +npm test # 950+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/assets/tags/light/stat-tests.svg b/assets/tags/light/stat-tests.svg index 35d94081..384e60af 100644 --- a/assets/tags/light/stat-tests.svg +++ b/assets/tags/light/stat-tests.svg @@ -1,5 +1,5 @@ - + - 827 + 950+ TESTS PASSING \ No newline at end of file diff --git a/assets/tags/stat-tests.svg b/assets/tags/stat-tests.svg index 2a2bc020..62b2e2c8 100644 --- a/assets/tags/stat-tests.svg +++ b/assets/tags/stat-tests.svg @@ -1,5 +1,5 @@ - + - 827 + 950+ TESTS PASSING \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index c662643f..29490488 100644 --- a/src/index.ts +++ b/src/index.ts @@ -461,7 +461,7 @@ async function main() { `Ready. ${embeddingProvider ? "Triple-stream (BM25+Vector+Graph)" : "BM25+Graph"} search active.`, ); bootLog( - `REST API: 107 endpoints at http://localhost:${config.restPort}/agentmemory/*`, + `REST API: 121 endpoints at http://localhost:${config.restPort}/agentmemory/*`, ); bootLog( `MCP surface (opt-in via \`npx @agentmemory/mcp\`): ${getAllTools().length} tools · 6 resources · 3 prompts`, diff --git a/test/consistency.test.ts b/test/consistency.test.ts index 172ca228..e0871cbf 100644 --- a/test/consistency.test.ts +++ b/test/consistency.test.ts @@ -15,8 +15,14 @@ function readText(relativePath: string): string { return readFileSync(join(ROOT, relativePath), "utf-8"); } +function countRestApiEndpoints(): number { + const src = readText("src/triggers/api.ts"); + return Array.from(src.matchAll(/api_path:\s*["`]/g)).length; +} + describe("Consistency checks", () => { const toolCount = getAllTools().length; + const restEndpointCount = countRestApiEndpoints(); it("version.ts matches package.json", () => { const pkg = JSON.parse(readText("package.json")); @@ -42,6 +48,17 @@ describe("Consistency checks", () => { expect(readme).toMatch(toolResourcePattern); }); + it("documented REST endpoint counts match registered API paths", () => { + const readme = readText("README.md"); + const agents = readText("AGENTS.md"); + const index = readText("src/index.ts"); + + expect(restEndpointCount).toBeGreaterThan(0); + expect(readme).toContain(`${restEndpointCount} endpoints on port`); + expect(agents).toContain(`${restEndpointCount} REST endpoints`); + expect(index).toContain(`REST API: ${restEndpointCount} endpoints`); + }); + it("all tool names are unique", () => { const tools = getAllTools(); const names = new Set(tools.map((t) => t.name));