diff --git a/AGENTS.md b/AGENTS.md index 873ef10fc1..ead439f1b3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -109,16 +109,16 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import). ## Testing -- All tests must pass before PR: `npm test` (950+ tests) +- All tests must pass before PR: `npm test` (1,428+ 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.9.16) +## Current Stats (v0.9.28) - 53 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all) - 128 REST endpoints - 6 MCP resources, 3 MCP prompts - 12 hooks, 15 skills -- 50+ iii functions -- 950+ tests +- 260+ iii functions +- 1,428+ tests diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b5188fa98..24a1722e88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [Unreleased] +## [0.9.28] — 2026-07-19 + +Patch release: hardens the hook runner against malformed payloads and closes a cross-agent context leak. No breaking changes; drop-in upgrade. + +### Security + +- **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`. + +### Fixed + +- **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. + +### Docs + +- 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. + ## [0.9.27] — 2026-06-07 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. @@ -50,6 +66,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.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.27 ## [0.9.26] — 2026-06-03 diff --git a/README.md b/README.md index d04da3712f..84d747f9b0 100644 --- a/README.md +++ b/README.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Design doc: 1.3k stars / 182 forks on the gist

@@ -60,7 +50,7 @@ 53 MCP tools 12 auto hooks 0 external DBs - 1,423+ tests passing + 1,428+ tests passing

@@ -1211,7 +1201,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 ` | -**174 source files · ~37,800 LOC · 1,423+ tests · 258 functions · 44 KV scopes** — all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself. +**175 source files · ~39,200 LOC · 1,428+ tests · 261 functions · 52 KV scopes** — all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself. --- @@ -1535,7 +1525,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 # 1,423+ tests +npm test # 1,428+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.de-DE.md b/READMEs/README.de-DE.md index 8d92f8afdb..512e81d824 100644 --- a/READMEs/README.de-DE.md +++ b/READMEs/README.de-DE.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Design-Dokument: 1200 stars / 172 forks im Gist

diff --git a/READMEs/README.es-ES.md b/READMEs/README.es-ES.md index 3245e21134..8b5654ea15 100644 --- a/READMEs/README.es-ES.md +++ b/READMEs/README.es-ES.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Documento de diseño: 1200 stars / 172 forks en el gist

diff --git a/READMEs/README.fr-FR.md b/READMEs/README.fr-FR.md index b72b503fa7..d00206cb90 100644 --- a/READMEs/README.fr-FR.md +++ b/READMEs/README.fr-FR.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Document de conception : 1200 stars / 172 forks sur le gist

diff --git a/READMEs/README.hi-IN.md b/READMEs/README.hi-IN.md index 00358fad18..8733236ae9 100644 --- a/READMEs/README.hi-IN.md +++ b/READMEs/README.hi-IN.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Design doc: 1200 stars / 172 forks on the gist

diff --git a/READMEs/README.ja-JP.md b/READMEs/README.ja-JP.md index 979094f6b8..30d535d966 100644 --- a/READMEs/README.ja-JP.md +++ b/READMEs/README.ja-JP.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Design doc: 1200 stars / 172 forks on the gist

diff --git a/READMEs/README.ko-KR.md b/READMEs/README.ko-KR.md index 369797c356..395c91c2e8 100644 --- a/READMEs/README.ko-KR.md +++ b/READMEs/README.ko-KR.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

설계 문서: gist 기준 1200 stars / 172 forks

diff --git a/READMEs/README.pt-BR.md b/READMEs/README.pt-BR.md index e9bbc32e3f..0e80ff8f49 100644 --- a/READMEs/README.pt-BR.md +++ b/READMEs/README.pt-BR.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Documento de design: 1200 stars / 172 forks no gist

diff --git a/READMEs/README.ru-RU.md b/READMEs/README.ru-RU.md index 804f380c02..f6c1e5540d 100644 --- a/READMEs/README.ru-RU.md +++ b/READMEs/README.ru-RU.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Документ проекта: 1200 звёзд / 172 форка в гисте

diff --git a/READMEs/README.tr-TR.md b/READMEs/README.tr-TR.md index 28fad80769..fefcf6cc4c 100644 --- a/READMEs/README.tr-TR.md +++ b/READMEs/README.tr-TR.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Design doc: 1200 stars / 172 forks on the gist

diff --git a/READMEs/README.zh-CN.md b/READMEs/README.zh-CN.md index e711a36735..a11ab29a28 100644 --- a/READMEs/README.zh-CN.md +++ b/READMEs/README.zh-CN.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Design doc: 1200 stars / 172 forks on the gist

diff --git a/READMEs/README.zh-TW.md b/READMEs/README.zh-TW.md index 75b2fc976a..c7a20fb540 100644 --- a/READMEs/README.zh-TW.md +++ b/READMEs/README.zh-TW.md @@ -29,16 +29,6 @@ rohitg00/agentmemory | Trendshift

-

- - - - - Star History Chart - - -

-

Design doc: 1200 stars / 172 forks on the gist

diff --git a/assets/tags/light/stat-tests.svg b/assets/tags/light/stat-tests.svg index 5025673f5f..a309d2c749 100644 --- a/assets/tags/light/stat-tests.svg +++ b/assets/tags/light/stat-tests.svg @@ -1,5 +1,5 @@ - + - 1390+ + 1428+ TESTS PASSING diff --git a/assets/tags/stat-tests.svg b/assets/tags/stat-tests.svg index 7dc0f78dad..4b2dfe07c9 100644 --- a/assets/tags/stat-tests.svg +++ b/assets/tags/stat-tests.svg @@ -1,5 +1,5 @@ - + - 1390+ + 1428+ TESTS PASSING diff --git a/deploy/coolify/Dockerfile b/deploy/coolify/Dockerfile index 48c8d59d51..e95bd70ecb 100644 --- a/deploy/coolify/Dockerfile +++ b/deploy/coolify/Dockerfile @@ -4,7 +4,7 @@ FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim -ARG AGENTMEMORY_VERSION=0.9.27 +ARG AGENTMEMORY_VERSION=0.9.28 ARG III_VERSION=0.11.2 ARG III_SDK_VERSION=0.11.2 diff --git a/deploy/coolify/docker-compose.yml b/deploy/coolify/docker-compose.yml index 73d5366147..c2f93ab9be 100644 --- a/deploy/coolify/docker-compose.yml +++ b/deploy/coolify/docker-compose.yml @@ -4,7 +4,7 @@ services: context: . dockerfile: Dockerfile args: - AGENTMEMORY_VERSION: "0.9.27" + AGENTMEMORY_VERSION: "0.9.28" III_VERSION: "0.11.2" III_SDK_VERSION: "0.11.2" restart: unless-stopped diff --git a/deploy/fly/Dockerfile b/deploy/fly/Dockerfile index 3769815d92..51da03a477 100644 --- a/deploy/fly/Dockerfile +++ b/deploy/fly/Dockerfile @@ -4,7 +4,7 @@ FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim -ARG AGENTMEMORY_VERSION=0.9.27 +ARG AGENTMEMORY_VERSION=0.9.28 ARG III_VERSION=0.11.2 ARG III_SDK_VERSION=0.11.2 diff --git a/deploy/railway/Dockerfile b/deploy/railway/Dockerfile index 3769815d92..51da03a477 100644 --- a/deploy/railway/Dockerfile +++ b/deploy/railway/Dockerfile @@ -4,7 +4,7 @@ FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim -ARG AGENTMEMORY_VERSION=0.9.27 +ARG AGENTMEMORY_VERSION=0.9.28 ARG III_VERSION=0.11.2 ARG III_SDK_VERSION=0.11.2 diff --git a/deploy/render/Dockerfile b/deploy/render/Dockerfile index 3769815d92..51da03a477 100644 --- a/deploy/render/Dockerfile +++ b/deploy/render/Dockerfile @@ -4,7 +4,7 @@ FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim -ARG AGENTMEMORY_VERSION=0.9.27 +ARG AGENTMEMORY_VERSION=0.9.28 ARG III_VERSION=0.11.2 ARG III_SDK_VERSION=0.11.2 diff --git a/deploy/render/render.yaml b/deploy/render/render.yaml index d269469322..b2333805ab 100644 --- a/deploy/render/render.yaml +++ b/deploy/render/render.yaml @@ -15,7 +15,7 @@ services: - key: PORT value: "3111" - key: AGENTMEMORY_VERSION - value: "0.9.27" + value: "0.9.28" - key: III_VERSION value: "0.11.2" - key: III_SDK_VERSION diff --git a/package.json b/package.json index 4e2bc8c4c3..588e94dabb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agentmemory/agentmemory", - "version": "0.9.27", + "version": "0.9.28", "description": "Persistent memory for AI coding agents, powered by iii-engine's three primitives", "type": "module", "main": "dist/index.mjs", diff --git a/packages/mcp/package.json b/packages/mcp/package.json index e918d9cb3e..bdc3120345 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@agentmemory/mcp", - "version": "0.9.27", + "version": "0.9.28", "description": "Standalone MCP server for agentmemory — thin shim that re-exposes @agentmemory/agentmemory's MCP entrypoint", "type": "module", "bin": { diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index cb4e6df7b8..49d4bacb2c 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "agentmemory", - "version": "0.9.27", + "version": "0.9.28", "description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 53 MCP tools, 8 skills, real-time viewer.", "author": { "name": "Rohit Ghumare", diff --git a/plugin/.codex-plugin/plugin.json b/plugin/.codex-plugin/plugin.json index 7c42f13094..9d35028993 100644 --- a/plugin/.codex-plugin/plugin.json +++ b/plugin/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "agentmemory", - "version": "0.9.27", + "version": "0.9.28", "description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 6 hooks, 53 MCP tools, 8 skills, real-time viewer.", "author": { "name": "Rohit Ghumare", diff --git a/plugin/plugin.json b/plugin/plugin.json index 9d0751a7ab..7d9cfca112 100644 --- a/plugin/plugin.json +++ b/plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "agentmemory", - "version": "0.9.27", + "version": "0.9.28", "description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 53 MCP tools, 15 skills, real-time viewer.", "author": { "name": "Rohit Ghumare", diff --git a/plugin/scripts/notification.mjs b/plugin/scripts/notification.mjs index 3967158c92..0a814e892f 100755 --- a/plugin/scripts/notification.mjs +++ b/plugin/scripts/notification.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/notification.ts function isSdkChildContext(payload) { @@ -45,6 +43,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const notificationType = data.notification_type ?? data.notificationType; if (notificationType !== "permission_prompt") return; @@ -69,8 +68,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=notification.mjs.map \ No newline at end of file diff --git a/plugin/scripts/post-commit.mjs b/plugin/scripts/post-commit.mjs index 8552cd614e..04cc623622 100755 --- a/plugin/scripts/post-commit.mjs +++ b/plugin/scripts/post-commit.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execFile } from "node:child_process"; import { promisify } from "node:util"; - //#region src/hooks/post-commit.ts const exec = promisify(execFile); function isSdkChildContext(payload) { @@ -35,6 +34,7 @@ async function main() { if (input.trim()) try { data = JSON.parse(input); } catch {} + if (!data || typeof data !== "object") data = {}; if (isSdkChildContext(data)) return; const cwd = data.cwd || process.env["AGENTMEMORY_CWD"] || process.cwd(); const sessionId = data.session_id || process.env["AGENTMEMORY_SESSION_ID"] || void 0; @@ -95,8 +95,8 @@ async function main() { }); } catch {} } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=post-commit.mjs.map \ No newline at end of file diff --git a/plugin/scripts/post-tool-failure.mjs b/plugin/scripts/post-tool-failure.mjs index 6fdad8d9d9..18782a561e 100755 --- a/plugin/scripts/post-tool-failure.mjs +++ b/plugin/scripts/post-tool-failure.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/post-tool-failure.ts function isSdkChildContext(payload) { @@ -45,6 +43,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; if (data.is_interrupt || data.isInterrupt) return; const sessionId = data.session_id || data.sessionId || "unknown"; @@ -70,8 +69,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=post-tool-failure.mjs.map \ No newline at end of file diff --git a/plugin/scripts/post-tool-use.mjs b/plugin/scripts/post-tool-use.mjs index b4aef9c942..53853ee141 100755 --- a/plugin/scripts/post-tool-use.mjs +++ b/plugin/scripts/post-tool-use.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/post-tool-use.ts function isSdkChildContext(payload) { @@ -45,6 +43,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || "unknown"; const toolName = data.tool_name ?? data.toolName; @@ -115,8 +114,8 @@ function truncate(value, max) { } return value; } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=post-tool-use.mjs.map \ No newline at end of file diff --git a/plugin/scripts/pre-compact.mjs b/plugin/scripts/pre-compact.mjs index 0afdcb0b4e..c4b8cea1a6 100755 --- a/plugin/scripts/pre-compact.mjs +++ b/plugin/scripts/pre-compact.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/pre-compact.ts function isSdkChildContext(payload) { @@ -45,6 +43,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || "unknown"; const project = resolveProject(data.cwd); @@ -73,8 +72,8 @@ async function main() { } } catch {} } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=pre-compact.mjs.map \ No newline at end of file diff --git a/plugin/scripts/pre-tool-use.mjs b/plugin/scripts/pre-tool-use.mjs index d70c166ed2..ad1094a11a 100755 --- a/plugin/scripts/pre-tool-use.mjs +++ b/plugin/scripts/pre-tool-use.mjs @@ -23,6 +23,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const toolName = typeof data.tool_name === "string" ? data.tool_name : typeof data.toolName === "string" ? data.toolName : void 0; if (!toolName) return; @@ -77,8 +78,8 @@ async function main() { } } catch {} } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=pre-tool-use.mjs.map \ No newline at end of file diff --git a/plugin/scripts/prompt-submit.mjs b/plugin/scripts/prompt-submit.mjs index 1a4147e6ab..3bb271ae06 100755 --- a/plugin/scripts/prompt-submit.mjs +++ b/plugin/scripts/prompt-submit.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/prompt-submit.ts function isSdkChildContext(payload) { @@ -45,6 +43,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || "unknown"; fetch(`${REST_URL}/agentmemory/observe`, { @@ -62,8 +61,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=prompt-submit.mjs.map \ No newline at end of file diff --git a/plugin/scripts/session-end.mjs b/plugin/scripts/session-end.mjs index 019149c309..811c1c2620 100755 --- a/plugin/scripts/session-end.mjs +++ b/plugin/scripts/session-end.mjs @@ -21,6 +21,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || "unknown"; fetch(`${REST_URL}/agentmemory/session/end`, { @@ -53,8 +54,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 1500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=session-end.mjs.map \ No newline at end of file diff --git a/plugin/scripts/session-start.mjs b/plugin/scripts/session-start.mjs index 51b70eb4c2..8c1bb6477e 100755 --- a/plugin/scripts/session-start.mjs +++ b/plugin/scripts/session-start.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/session-start.ts function isSdkChildContext(payload) { @@ -48,6 +46,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || `ses_${Date.now().toString(36)}`; const cwd = data.cwd || process.cwd(); @@ -80,8 +79,8 @@ async function main() { } } catch {} } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=session-start.mjs.map \ No newline at end of file diff --git a/plugin/scripts/stop.mjs b/plugin/scripts/stop.mjs index 03d30c64f3..0b1c43b0bf 100755 --- a/plugin/scripts/stop.mjs +++ b/plugin/scripts/stop.mjs @@ -21,6 +21,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || "unknown"; fetch(`${REST_URL}/agentmemory/summarize`, { @@ -37,8 +38,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 1500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=stop.mjs.map \ No newline at end of file diff --git a/plugin/scripts/subagent-start.mjs b/plugin/scripts/subagent-start.mjs index 2359a1c62f..a089ae3d7c 100755 --- a/plugin/scripts/subagent-start.mjs +++ b/plugin/scripts/subagent-start.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/subagent-start.ts function isSdkChildContext(payload) { @@ -46,6 +44,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || "unknown"; const agentId = data.agent_id || data.agentName; @@ -68,8 +67,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=subagent-start.mjs.map \ No newline at end of file diff --git a/plugin/scripts/subagent-stop.mjs b/plugin/scripts/subagent-stop.mjs index 2ba1b002c9..4e00f9d7b1 100755 --- a/plugin/scripts/subagent-stop.mjs +++ b/plugin/scripts/subagent-stop.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/subagent-stop.ts function isSdkChildContext(payload) { @@ -45,6 +43,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || data.sessionId || "unknown"; const agentId = data.agent_id || data.agentName; @@ -69,8 +68,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=subagent-stop.mjs.map \ No newline at end of file diff --git a/plugin/scripts/task-completed.mjs b/plugin/scripts/task-completed.mjs index 478f0688e8..e8a5bfcca1 100755 --- a/plugin/scripts/task-completed.mjs +++ b/plugin/scripts/task-completed.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import { execSync } from "node:child_process"; import { basename } from "node:path"; - //#region src/hooks/_project.ts function resolveProject(cwd) { const explicit = process.env["AGENTMEMORY_PROJECT_NAME"]; @@ -21,7 +20,6 @@ function resolveProject(cwd) { } catch {} return basename(dir); } - //#endregion //#region src/hooks/task-completed.ts function isSdkChildContext(payload) { @@ -45,6 +43,7 @@ async function main() { } catch { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = data.session_id || "unknown"; fetch(`${REST_URL}/agentmemory/observe`, { @@ -68,8 +67,8 @@ async function main() { }).catch(() => {}); setTimeout(() => process.exit(0), 500).unref(); } -main(); - +main().catch(() => process.exit(0)); //#endregion -export { }; +export {}; + //# sourceMappingURL=task-completed.mjs.map \ No newline at end of file diff --git a/src/functions/context.ts b/src/functions/context.ts index 1e6102cf37..97ce18e3f6 100644 --- a/src/functions/context.ts +++ b/src/functions/context.ts @@ -17,6 +17,7 @@ import { listPinnedSlots, renderPinnedContext, } from "./slots.js"; +import { getAgentId, isAgentScopeIsolated } from "../config.js"; function estimateTokens(text: string): number { return Math.ceil(text.length / 3); @@ -36,10 +37,39 @@ export function registerContextFunction( tokenBudget: number, ): void { sdk.registerFunction("mem::context", - async (data: { sessionId: string; project: string; budget?: number }) => { + async (data: { + sessionId: string; + project: string; + budget?: number; + agentId?: string; + }) => { const budget = data.budget || tokenBudget; const blocks: ContextBlock[] = []; + // Cross-agent isolation for the injected-context path. Mirrors the + // filter mem::search / mem::smart-search already apply so /context + // cannot leak another profile's sessions. Fail-closed: if isolated + // mode is on with no explicit agentId and env AGENT_ID unset, refuse + // rather than silently returning cross-agent rows. + const isolated = isAgentScopeIsolated(); + const explicitAgentId = + typeof data.agentId === "string" && data.agentId.trim().length > 0 + ? data.agentId.trim() + : undefined; + const wildcardAgent = explicitAgentId === "*"; + const envAgentId = isolated ? getAgentId() : undefined; + const filterAgentId = wildcardAgent + ? undefined + : explicitAgentId ?? envAgentId; + if (isolated && !wildcardAgent && !explicitAgentId && !envAgentId) { + throw new Error( + "mem::context: AGENTMEMORY_AGENT_SCOPE=isolated is set but no " + + "agent id is available (env AGENT_ID unset and no explicit " + + "agentId in the call). Refusing to read cross-agent rows. " + + 'Pass agentId: "*" to opt in to a wildcard read.', + ); + } + const [pinnedSlots, profile, lessons] = await Promise.all([ isSlotsEnabled() ? listPinnedSlots(kv).catch(() => [] as MemorySlot[]) @@ -134,7 +164,12 @@ export function registerContextFunction( const allSessions = await kv.list(KV.sessions); const sessions = allSessions - .filter((s) => s.project === data.project && s.id !== data.sessionId) + .filter( + (s) => + s.project === data.project && + s.id !== data.sessionId && + (filterAgentId === undefined || s.agentId === filterAgentId), + ) .sort( (a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime(), diff --git a/src/functions/export-import.ts b/src/functions/export-import.ts index 327117b265..8b3bc7cc07 100644 --- a/src/functions/export-import.ts +++ b/src/functions/export-import.ts @@ -176,7 +176,7 @@ export function registerExportImportFunction(sdk: ISdk, kv: StateKV): void { const strategy = data.strategy || "merge"; const importData = data.exportData; - const supportedVersions = new Set(["0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.7.0", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6", "0.8.7", "0.8.8", "0.8.9", "0.8.10", "0.8.11", "0.8.12", "0.8.13", "0.9.0", "0.9.1", "0.9.2", "0.9.3", "0.9.4", "0.9.5", "0.9.6", "0.9.7", "0.9.8", "0.9.9", "0.9.10", "0.9.11", "0.9.12", "0.9.13", "0.9.14", "0.9.15", "0.9.16", "0.9.17", "0.9.18", "0.9.19", "0.9.20", "0.9.21", "0.9.22", "0.9.23", "0.9.24", "0.9.25", "0.9.26", "0.9.27"]); + 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"]); if (!supportedVersions.has(importData.version)) { return { success: false, diff --git a/src/hooks/notification.ts b/src/hooks/notification.ts index 9ad7704239..af3075ab56 100644 --- a/src/hooks/notification.ts +++ b/src/hooks/notification.ts @@ -29,6 +29,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const notificationType = data.notification_type ?? data.notificationType; if (notificationType !== "permission_prompt") return; @@ -59,4 +60,4 @@ async function main() { setTimeout(() => process.exit(0), 500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/post-commit.ts b/src/hooks/post-commit.ts index 30c54a9aca..70a01fc74a 100644 --- a/src/hooks/post-commit.ts +++ b/src/hooks/post-commit.ts @@ -45,6 +45,7 @@ async function main() { } } + if (!data || typeof data !== "object") data = {}; if (isSdkChildContext(data)) return; const cwd = @@ -95,4 +96,4 @@ async function main() { } } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/post-tool-failure.ts b/src/hooks/post-tool-failure.ts index f0295b3e62..3c8b25a159 100644 --- a/src/hooks/post-tool-failure.ts +++ b/src/hooks/post-tool-failure.ts @@ -29,6 +29,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; if (data.is_interrupt || data.isInterrupt) return; @@ -63,4 +64,4 @@ async function main() { setTimeout(() => process.exit(0), 500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/post-tool-use.ts b/src/hooks/post-tool-use.ts index c68a7731d3..a7e556de2f 100644 --- a/src/hooks/post-tool-use.ts +++ b/src/hooks/post-tool-use.ts @@ -29,6 +29,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = ((data.session_id || data.sessionId) as string) || "unknown"; @@ -114,4 +115,4 @@ function truncate(value: unknown, max: number): unknown { return value; } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/pre-compact.ts b/src/hooks/pre-compact.ts index 8bb2660c48..339eec5d3c 100644 --- a/src/hooks/pre-compact.ts +++ b/src/hooks/pre-compact.ts @@ -29,6 +29,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = ((data.session_id || data.sessionId) as string) || "unknown"; @@ -66,4 +67,4 @@ async function main() { } } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/pre-tool-use.ts b/src/hooks/pre-tool-use.ts index 277d7799be..eda68b458e 100644 --- a/src/hooks/pre-tool-use.ts +++ b/src/hooks/pre-tool-use.ts @@ -48,6 +48,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const toolName = @@ -123,4 +124,4 @@ async function main() { } } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/prompt-submit.ts b/src/hooks/prompt-submit.ts index 2da8ea6a41..7f973b76cf 100644 --- a/src/hooks/prompt-submit.ts +++ b/src/hooks/prompt-submit.ts @@ -29,6 +29,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = ((data.session_id || data.sessionId) as string) || "unknown"; @@ -49,4 +50,4 @@ async function main() { setTimeout(() => process.exit(0), 500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/session-end.ts b/src/hooks/session-end.ts index 6a9fc429c5..db149abdcc 100644 --- a/src/hooks/session-end.ts +++ b/src/hooks/session-end.ts @@ -28,6 +28,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = ((data.session_id || data.sessionId) as string) || "unknown"; @@ -66,4 +67,4 @@ async function main() { setTimeout(() => process.exit(0), 1500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/session-start.ts b/src/hooks/session-start.ts index 573c092b14..7e49a2df2a 100644 --- a/src/hooks/session-start.ts +++ b/src/hooks/session-start.ts @@ -47,6 +47,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = @@ -89,4 +90,4 @@ async function main() { } } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/stop.ts b/src/hooks/stop.ts index 4103796e0f..5eacd12e11 100644 --- a/src/hooks/stop.ts +++ b/src/hooks/stop.ts @@ -31,6 +31,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) { // Do not summarize from inside a Claude Agent SDK child session; // would re-enter agent-sdk provider and loop (see sdk-guard.ts). @@ -56,4 +57,4 @@ async function main() { setTimeout(() => process.exit(0), 1500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/subagent-start.ts b/src/hooks/subagent-start.ts index 44c87c85e9..da1e6d34af 100644 --- a/src/hooks/subagent-start.ts +++ b/src/hooks/subagent-start.ts @@ -37,6 +37,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = ((data.session_id || data.sessionId) as string) || "unknown"; @@ -62,4 +63,4 @@ async function main() { setTimeout(() => process.exit(0), 500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/subagent-stop.ts b/src/hooks/subagent-stop.ts index 5a437c9fd4..be453ba93b 100644 --- a/src/hooks/subagent-stop.ts +++ b/src/hooks/subagent-stop.ts @@ -29,6 +29,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = ((data.session_id || data.sessionId) as string) || "unknown"; @@ -59,4 +60,4 @@ async function main() { setTimeout(() => process.exit(0), 500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/hooks/task-completed.ts b/src/hooks/task-completed.ts index dbdf815ac8..a72d594b88 100644 --- a/src/hooks/task-completed.ts +++ b/src/hooks/task-completed.ts @@ -29,6 +29,7 @@ async function main() { return; } + if (!data || typeof data !== "object") return; if (isSdkChildContext(data)) return; const sessionId = (data.session_id as string) || "unknown"; @@ -57,4 +58,4 @@ async function main() { setTimeout(() => process.exit(0), 500).unref(); } -main(); +main().catch(() => process.exit(0)); diff --git a/src/triggers/api.ts b/src/triggers/api.ts index 7b6c2bf2b8..99fb990840 100644 --- a/src/triggers/api.ts +++ b/src/triggers/api.ts @@ -324,7 +324,12 @@ export function registerApiTriggers( sdk.registerFunction("api::context", async ( - req: ApiRequest<{ sessionId: string; project: string; budget?: number }>, + req: ApiRequest<{ + sessionId: string; + project: string; + budget?: number; + agentId?: string; + }>, ): Promise => { const body = (req.body ?? {}) as Record; const sessionId = asNonEmptyString(body.sessionId); @@ -342,11 +347,31 @@ export function registerApiTriggers( body: { error: "budget must be a positive integer" }, }; } - const payload: { sessionId: string; project: string; budget?: number } = { + // Propagate agentId so mem::context applies the same cross-agent + // isolation filter as mem::search. Honors body.agentId, ?agentId=, + // or the worker's AGENT_ID fallback under AGENTMEMORY_AGENT_SCOPE=isolated. + const queryAgentId = + typeof (req as { query_params?: Record }) + .query_params?.["agentId"] === "string" + ? (req as { query_params: Record }) + .query_params["agentId"] + : undefined; + const bodyAgentId = + typeof body.agentId === "string" && body.agentId.trim().length > 0 + ? (body.agentId as string).trim() + : undefined; + const payload: { + sessionId: string; + project: string; + budget?: number; + agentId?: string; + } = { sessionId, project, }; if (budget !== undefined) payload.budget = budget; + const agentId = bodyAgentId ?? queryAgentId; + if (agentId !== undefined) payload.agentId = agentId; const result = await sdk.trigger({ function_id: "mem::context", payload }); return { status_code: 200, body: result }; }, @@ -595,9 +620,12 @@ export function registerApiTriggers( }; await kv.set(KV.sessions, sessionId, session); const contextResult = await sdk.trigger< - { sessionId: string; project: string }, + { sessionId: string; project: string; agentId?: string }, { context: string } - >({ function_id: "mem::context", payload: { sessionId, project } }); + >({ + function_id: "mem::context", + payload: { sessionId, project, ...(agentId ? { agentId } : {}) }, + }); return { status_code: 200, body: { session, context: contextResult.context }, diff --git a/src/triggers/events.ts b/src/triggers/events.ts index e38b58db4d..e75d615b58 100644 --- a/src/triggers/events.ts +++ b/src/triggers/events.ts @@ -3,13 +3,23 @@ import type { CompressedObservation, HookPayload, Session } from "../types.js"; import { KV, STREAM } from "../state/schema.js"; import { StateKV } from "../state/kv.js"; import { isReflectEnabled } from "../functions/slots.js"; -import { isGraphExtractionEnabled } from "../config.js"; +import { getAgentId, isGraphExtractionEnabled } from "../config.js"; import { logger } from "../logger.js"; export function registerEventTriggers(sdk: ISdk, kv: StateKV): void { sdk.registerFunction( "event::session::started", - async (data: { sessionId: string; project: string; cwd: string }) => { + async (data: { + sessionId: string; + project: string; + cwd: string; + agentId?: string; + }) => { + const requestAgentId = + typeof data.agentId === "string" && data.agentId.trim().length > 0 + ? data.agentId.trim().slice(0, 128) + : undefined; + const agentId = requestAgentId ?? getAgentId(); const session: Session = { id: data.sessionId, project: data.project, @@ -17,14 +27,19 @@ export function registerEventTriggers(sdk: ISdk, kv: StateKV): void { startedAt: new Date().toISOString(), status: "active", observationCount: 0, + ...(agentId ? { agentId } : {}), }; await kv.set(KV.sessions, data.sessionId, session); const contextResult = await sdk.trigger< - { sessionId: string; project: string }, + { sessionId: string; project: string; agentId?: string }, { context: string } >({ function_id: "mem::context", - payload: { sessionId: data.sessionId, project: data.project }, + payload: { + sessionId: data.sessionId, + project: data.project, + ...(agentId ? { agentId } : {}), + }, }); return { session, context: contextResult.context }; }, diff --git a/src/types.ts b/src/types.ts index 6797dfaf99..113daeae12 100644 --- a/src/types.ts +++ b/src/types.ts @@ -307,7 +307,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"; + 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"; exportedAt: string; sessions: Session[]; observations: Record; diff --git a/src/version.ts b/src/version.ts index 927846096d..6d09f4f4a0 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = "0.9.27"; +export const VERSION = "0.9.28"; diff --git a/test/export-import.test.ts b/test/export-import.test.ts index 3949862699..39c17cab88 100644 --- a/test/export-import.test.ts +++ b/test/export-import.test.ts @@ -119,7 +119,7 @@ describe("Export/Import Functions", () => { it("export produces valid ExportData structure", async () => { const result = (await sdk.trigger("mem::export", {})) as ExportData; - expect(result.version).toBe("0.9.27"); + expect(result.version).toBe("0.9.28"); expect(result.exportedAt).toBeDefined(); expect(result.sessions.length).toBe(1); expect(result.sessions[0].id).toBe("ses_1"); diff --git a/website/lib/generated-meta.json b/website/lib/generated-meta.json index 2c386052eb..06792f8e5b 100644 --- a/website/lib/generated-meta.json +++ b/website/lib/generated-meta.json @@ -1,8 +1,8 @@ { - "version": "0.9.26", + "version": "0.9.28", "mcpTools": 53, "hooks": 12, - "restEndpoints": 126, - "testsPassing": 1394, - "generatedAt": "2026-06-03T10:14:01.074Z" + "restEndpoints": 128, + "testsPassing": 1428, + "generatedAt": "2026-07-19T10:24:26.108Z" }