From 9bf13e5e89fd6a50a2c107a6301f8614cdb2816e Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 24 Sep 2026 09:29:53 +0530 Subject: [PATCH 1/6] chore(engine): pin iii-sdk and engine at 0.19.7 Move the iii-sdk dependency and the pinned iii-engine from 0.11.2 to 0.19.7, the last engine before the 0.20 SDK reorganization. It carries the upstream route-ownership fix, so /agentmemory/* no longer answers 404 after the engine reconnects (#1013). Engines from 0.19.4 persist each builtin worker's config block into data/configuration on first boot and ignore the config file afterwards, which made --port, --instance and data-dir changes silently ineffective. The CLI now clears those persisted entries before every engine spawn so the runtime config rendered from the environment is the seed each time. Also: agentmemory upgrade pins the SDK to the same constant instead of a hardcoded version, Dependabot ignores iii-sdk, and every pin mention in docs, translations, deploy templates, the eval harness and .env.example is updated. --- .env.example | 10 ++--- .github/dependabot.yml | 2 + CHANGELOG.md | 8 ++++ INSTALL_FOR_AGENTS.md | 16 ++++---- README.md | 32 ++++++++-------- READMEs/README.de-DE.md | 24 ++++++------ READMEs/README.es-ES.md | 24 ++++++------ READMEs/README.fr-FR.md | 24 ++++++------ READMEs/README.hi-IN.md | 24 ++++++------ READMEs/README.ja-JP.md | 24 ++++++------ READMEs/README.ko-KR.md | 24 ++++++------ READMEs/README.pt-BR.md | 24 ++++++------ READMEs/README.ru-RU.md | 24 ++++++------ READMEs/README.tr-TR.md | 24 ++++++------ READMEs/README.zh-CN.md | 24 ++++++------ READMEs/README.zh-TW.md | 24 ++++++------ deploy/coolify/Dockerfile | 6 +-- deploy/coolify/docker-compose.yml | 4 +- deploy/fly/Dockerfile | 14 +++---- deploy/railway/Dockerfile | 14 +++---- deploy/render/Dockerfile | 14 +++---- deploy/render/render.yaml | 4 +- docker-compose.yml | 15 ++++---- eval/README.md | 4 +- eval/scripts/sandbox.sh | 6 +-- package.json | 2 +- src/cli.ts | 51 +++++++++++++++----------- src/cli/doctor-diagnostics.ts | 2 +- src/cli/engine-config.ts | 29 +++++++++++++++ test/cli-second-instance-guard.test.ts | 2 +- test/engine-config.test.ts | 45 ++++++++++++++++++++++- 31 files changed, 312 insertions(+), 232 deletions(-) diff --git a/.env.example b/.env.example index 2143098484..153aef4d9a 100644 --- a/.env.example +++ b/.env.example @@ -180,12 +180,12 @@ # 8. iii engine pin # ----------------------------------------------------------------------------- # -# agentmemory currently pins iii-engine to v0.11.2 — v0.11.6 introduces a -# new sandbox-everything-via-`iii worker add` model that agentmemory -# hasn't been refactored for yet. Override with AGENTMEMORY_III_VERSION -# only after migrating to the sandbox model manually. +# agentmemory pins iii-engine to the same release as its iii-sdk dependency +# (v0.19.7). The worker speaks the wire protocol of that engine, so the two move +# together in agentmemory releases. Override with AGENTMEMORY_III_VERSION only +# if you run your own engine and know it matches. -# AGENTMEMORY_III_VERSION=0.11.2 +# AGENTMEMORY_III_VERSION=0.19.7 # ----------------------------------------------------------------------------- # 9. Claude Code bridge (opt-in) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e0a74e99e9..067c45313d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,6 +14,8 @@ updates: commit-message: prefix: deps include: scope + ignore: + - dependency-name: iii-sdk groups: minor-and-patch: update-types: diff --git a/CHANGELOG.md b/CHANGELOG.md index 85df068d7a..60e084dd8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to agentmemory will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- **iii engine and `iii-sdk` move from 0.11.2 to 0.19.7.** Same release on both sides, as before; the CLI downloads the pinned engine into `~/.agentmemory/bin`, the bundled `docker-compose.yml` and the deploy templates pull `iiidev/iii:0.19.7`, and `agentmemory upgrade` pins the SDK to the same constant. 0.19.7 is the last engine before the 0.20 SDK reorganization and carries the upstream fix that keeps HTTP routes owned by the reconnecting worker, so `/agentmemory/*` no longer answers 404 after the engine reconnects (#1013). 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 into `data/configuration/.yaml` on first boot 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 builtin entries right before it spawns the engine, so the runtime config it renders from your environment is the seed every time. +- Dependabot no longer proposes `iii-sdk` bumps; the engine pin and the SDK version are updated together by hand. + ## [0.9.29] — 2026-08-16 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. diff --git a/INSTALL_FOR_AGENTS.md b/INSTALL_FOR_AGENTS.md index fd140d21cd..b10e993425 100644 --- a/INSTALL_FOR_AGENTS.md +++ b/INSTALL_FOR_AGENTS.md @@ -4,7 +4,7 @@ You are a coding agent. Follow this runbook top to bottom to install agentmemory ## What you are installing -agentmemory is a local memory server for coding agents. It exposes a REST API and MCP HTTP routes on port 3111, streams on 3112, a viewer on 3113, and connects its worker to iii-engine on 49134. It is built on the iii engine, which agentmemory manages as a pinned v0.11.2 binary under `~/.agentmemory/bin` on macOS/Linux or `%USERPROFILE%\.agentmemory\bin` on Windows. +agentmemory is a local memory server for coding agents. It exposes a REST API and MCP HTTP routes on port 3111, streams on 3112, a viewer on 3113, and connects its worker to iii-engine on 49134. It is built on the iii engine, which agentmemory manages as a pinned v0.19.7 binary under `~/.agentmemory/bin` on macOS/Linux or `%USERPROFILE%\.agentmemory\bin` on Windows. Configuration and the managed iii binary live under `~/.agentmemory`. Persistent iii state uses the platform data directory: `~/Library/Application Support/agentmemory` on macOS, `$XDG_DATA_HOME/agentmemory` or `~/.local/share/agentmemory` on Linux, and `%APPDATA%\agentmemory` on Windows. Override it with `--data-dir ` or `AGENTMEMORY_DATA_DIR`; use the same override on every restart. For instance 0, an existing `./data/state_store.db` or `./data/iii-config.yaml` takes precedence over the platform default, while an explicit flag or environment override still wins. Native and Docker starts use the same resolved host data directory. @@ -14,7 +14,7 @@ Default keyless mode needs no API key or cloud account and disables vector embed - Node.js >= 20 with npm and npx. Check with `node -v`, `npm -v`, and `npx -v`. - macOS/Linux automatic iii installation also requires `curl`, a POSIX `sh`, and `tar`. Check with `command -v curl sh tar`. Minimal images such as `node:20-slim` may not include them. -- Windows: WSL2 follows the Linux path above. Native Windows requires a manually downloaded, pinned iii-engine v0.11.2 `iii.exe`, or Docker Desktop; the CLI does not auto-extract the Windows ZIP. Native automated `connect` supports only `copilot-cli`. Other Windows agents need manual MCP configuration; WSL `connect` applies only to agents installed in that same WSL environment. +- Windows: WSL2 follows the Linux path above. Native Windows requires a manually downloaded, pinned iii-engine v0.19.7 `iii.exe`, or Docker Desktop; the CLI does not auto-extract the Windows ZIP. Native automated `connect` supports only `copilot-cli`. Other Windows agents need manual MCP configuration; WSL `connect` applies only to agents installed in that same WSL environment. - Ports 3111 (REST), 3112 (streams), 3113 (viewer), and 49134 (engine) free. If any are taken, stop whatever is using them before starting (see Troubleshooting). ## Running non-interactively @@ -38,12 +38,12 @@ For native Windows, install the engine before continuing: ```powershell # Download the archive that matches your CPU from the pinned release: -# https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 +# https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 # Extract iii.exe to $HOME\.agentmemory\bin\iii.exe, then verify the pin: & "$HOME\.agentmemory\bin\iii.exe" --version ``` -Expect: exactly `0.11.2`. Do not install the latest unpinned iii release. Alternatively, use WSL2 or start Docker Desktop and choose the Docker path when agentmemory starts. +Expect: exactly `0.19.7`. Do not install the latest unpinned iii release. Alternatively, use WSL2 or start Docker Desktop and choose the Docker path when agentmemory starts. ## 2. Start the server @@ -61,7 +61,7 @@ npx -y @agentmemory/agentmemory@latest --data-dir /absolute/path/to/agentmemory- Docker bind-mounts that same resolved host directory at `/data`. For a second isolated daemon, add `--instance 1`; it stores data and lifecycle metadata under `instance-1` and defaults to ports 3211, 3212, 3213, and 49234. Do not use `--port` alone for concurrent daemons: it changes the ports but keeps instance 0's canonical lifecycle ownership. Use `--instance` for isolation. -Expect: iii-engine v0.11.2 starts, the agentmemory worker registers with iii, and the ready panel lists REST, viewer, streams, and engine addresses. First boot can take longer while the engine binary is downloaded. +Expect: iii-engine v0.19.7 starts, the agentmemory worker registers with iii, and the ready panel lists REST, viewer, streams, and engine addresses. First boot can take longer while the engine binary is downloaded. ## 3. Validate the server and all four ports @@ -202,9 +202,9 @@ The MCP server exposes 54 tools by default (`--tools all`). Use `--tools core` ( - Server starts but `livez` never returns 200: re-run with `npx -y @agentmemory/agentmemory@latest --verbose` to see engine stderr. - `The engine process started but the REST API never responded.`: inspect all four derived ports, confirm the pinned iii process stayed alive, and use `--verbose` for captured engine stderr. - Engine version warning on start: harmless. agentmemory uses its own pinned engine in `~/.agentmemory/bin` regardless of any `iii` on `PATH`. Set `AGENTMEMORY_III_VERSION` only to override deliberately. -- "engine conflict" / another iii engine already running: if a different iii version is already serving the port, agentmemory will not adopt it. Stop that engine (`npx -y @agentmemory/agentmemory@latest stop --force`, or however you started it), then rerun the canonical command. Its private v0.11.2 binary does not replace a user-managed `iii` on `PATH`. +- "engine conflict" / another iii engine already running: if a different iii version is already serving the port, agentmemory will not adopt it. Stop that engine (`npx -y @agentmemory/agentmemory@latest stop --force`, or however you started it), then rerun the canonical command. Its private v0.19.7 binary does not replace a user-managed `iii` on `PATH`. - Only 7 tools visible in the agent: the MCP shim is in local fallback because it could not reach a server. Start `npx -y @agentmemory/agentmemory@latest`, ensure `AGENTMEMORY_URL` points at it (default `http://localhost:3111`), then reload MCP. -- Native Windows: the CLI does not auto-extract the ZIP. Install the pinned v0.11.2 `iii.exe` manually, use WSL2, or run with Docker Desktop and `AGENTMEMORY_USE_DOCKER=1`. Automated `connect` supports only `copilot-cli`; configure other native agents manually. +- Native Windows: the CLI does not auto-extract the ZIP. Install the pinned v0.19.7 `iii.exe` manually, use WSL2, or run with Docker Desktop and `AGENTMEMORY_USE_DOCKER=1`. Automated `connect` supports only `copilot-cli`; configure other native agents manually. - Semantic demo query returns zero hits: this is expected with vectors disabled in default keyless mode. Set `EMBEDDING_PROVIDER=local`, restart, allow the first model download to complete, and rerun the demo. ## Report success @@ -212,7 +212,7 @@ The MCP server exposes 54 tools by default (`--tools all`). Use `--tools core` ( Report back to the user: - agentmemory installed, version, and the server running on port 3111 -- iii-engine v0.11.2 running, the selected platform data directory, and all four ports accounted for +- iii-engine v0.19.7 running, the selected platform data directory, and all four ports accounted for - which agent was wired via `agentmemory connect`, and the tool count the agent now sees - the save and recall round-trip returned the probe memory after a full stop/start - the viewer is available at `http://localhost:3113` diff --git a/README.md b/README.md index 959d68c7e4..730342b24b 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Requirements: - Node.js 20 or newer with npm and npx (`node -v`, `npm -v`, and `npx -v`). - macOS/Linux automatic iii-engine installation also needs `curl`, a POSIX `sh`, and `tar`. Minimal images such as `node:20-slim` may not include them. -- Native Windows requires the pinned iii-engine v0.11.2 `iii.exe` to be installed manually. WSL2 or Docker Desktop are the other supported paths. +- Native Windows requires the pinned iii-engine v0.19.7 `iii.exe` to be installed manually. WSL2 or Docker Desktop are the other supported paths. Canonical fresh-install command: @@ -111,7 +111,7 @@ Wire more agents any time with `agentmemory connect ` — 20 adapters lis
Windows -The fast path is WSL2. Native Windows engine setup requires the pinned v0.11.2 ZIP to be downloaded and `iii.exe` extracted manually; the CLI does not auto-extract it. Docker Desktop is also supported. See the [Windows notes](#windows) for the step-by-step. +The fast path is WSL2. Native Windows engine setup requires the pinned v0.19.7 ZIP to be downloaded and `iii.exe` extracted manually; the CLI does not auto-extract it. Docker Desktop is also supported. See the [Windows notes](#windows) for the step-by-step.
@@ -136,7 +136,7 @@ npx caches per version. Force the latest with `npx -y @agentmemory/agentmemory@l
Already running your own iii engine -agentmemory pins iii-engine v0.11.2 and won't attach to a different version (the worker can't speak another engine's protocol). Stop the other engine, then run `npx -y @agentmemory/agentmemory@latest`. It installs and runs the pinned v0.11.2 in `~/.agentmemory/bin`, leaving your own `iii` untouched. +agentmemory pins iii-engine v0.19.7 and won't attach to a different version (the worker can't speak another engine's protocol). Stop the other engine, then run `npx -y @agentmemory/agentmemory@latest`. It installs and runs the pinned v0.19.7 in `~/.agentmemory/bin`, leaving your own `iii` untouched.
@@ -496,7 +496,7 @@ None of these auto-capture from coding-agent hooks, ship a local-first viewer, o

Quick Start

-Compatibility: this release targets `iii-sdk` 0.11.2 and pins iii-engine v0.11.2. +Compatibility: this release targets `iii-sdk` 0.19.7 and pins iii-engine v0.19.7. ### Try it in 30 seconds @@ -575,7 +575,7 @@ Use the maintenance command when you intentionally want to update your local run npx -y @agentmemory/agentmemory@latest upgrade ``` -Warning: this command mutates the current workspace/runtime. It can update JavaScript dependencies and pull the pinned `iiidev/iii:0.11.2` Docker image. It never installs an unpinned or newer iii engine. +Warning: this command mutates the current workspace/runtime. It can update JavaScript dependencies and pull the pinned `iiidev/iii:0.19.7` Docker image. It never installs an unpinned or newer iii engine. Implementation details live in `src/cli.ts` (see `runUpgrade` around the `src/cli.ts:544-595` region). @@ -793,28 +793,28 @@ npm install && npm run build && npm start This starts agentmemory with a local `iii-engine` if the pinned binary is already installed, or uses Docker Compose when selected. REST, streams, and the viewer bind to `127.0.0.1` by default. The automatic macOS/Linux binary path requires `curl`, a POSIX `sh`, and `tar`. -Install `iii-engine` manually. **agentmemory currently pins `iii-engine` to `v0.11.2`**. `v0.11.6` introduces a new sandbox-everything-via-`iii worker add` model that agentmemory hasn't been refactored for yet. Pin lifts once the refactor lands. Override with `AGENTMEMORY_III_VERSION=` if you've migrated to the sandbox model manually. +Install `iii-engine` manually. **agentmemory currently pins `iii-engine` to `v0.19.7`**, the same release as its `iii-sdk` dependency; the worker speaks that engine's wire protocol, and 0.20.0 reorganized the SDK surface, so the two move together in agentmemory releases. Override with `AGENTMEMORY_III_VERSION=` if you run your own engine and know it matches. -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** swap `aarch64-apple-darwin` for `x86_64-apple-darwin` - **Linux x64:** swap for `x86_64-unknown-linux-gnu` - **Linux arm64:** swap for `aarch64-unknown-linux-gnu` -- **Windows:** download `iii-x86_64-pc-windows-msvc.zip` from [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2) and extract `iii.exe` to `%USERPROFILE%\.agentmemory\bin\iii.exe` +- **Windows:** download `iii-x86_64-pc-windows-msvc.zip` from [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7) and extract `iii.exe` to `%USERPROFILE%\.agentmemory\bin\iii.exe` -Or use Docker (the bundled `docker-compose.yml` pulls `iiidev/iii:0.11.2`). Full docs: [iii.dev/docs](https://iii.dev/docs). +Or use Docker (the bundled `docker-compose.yml` pulls `iiidev/iii:0.19.7`). Full docs: [iii.dev/docs](https://iii.dev/docs). ### Windows -agentmemory runs on Windows 10/11, but the Node.js package alone isn't enough; you also need the pinned iii-engine v0.11.2 runtime as a background process. The CLI does not auto-extract the Windows ZIP, so native Windows users must install `iii.exe` manually, use WSL2, or choose Docker Desktop. +agentmemory runs on Windows 10/11, but the Node.js package alone isn't enough; you also need the pinned iii-engine v0.19.7 runtime as a background process. The CLI does not auto-extract the Windows ZIP, so native Windows users must install `iii.exe` manually, use WSL2, or choose Docker Desktop. Native Windows automated MCP wiring supports only `agentmemory connect copilot-cli`. For Claude Code, Codex, Cursor, and every other native Windows agent, copy the manual MCP block from [Other agents](#other-agents) into that agent's Windows config. Running `connect` in WSL is appropriate only when the target agent is also installed in the same WSL environment; it does not edit a Windows-host agent's configuration. **Option A: prebuilt Windows binary (recommended)** ```powershell -# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser -# (we pin to v0.11.2 until agentmemory refactors for the new sandbox -# model that engine v0.11.6+ requires) +# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 in your browser +# (agentmemory pins the engine to the same release as its iii-sdk; +# v0.19.7 is the current pair) # 2. Download iii-x86_64-pc-windows-msvc.zip # (or iii-aarch64-pc-windows-msvc.zip if you're on an ARM machine) # 3. Extract iii.exe to agentmemory's private engine directory: @@ -822,7 +822,7 @@ New-Item -ItemType Directory -Force "$HOME\.agentmemory\bin" # Copy iii.exe to $HOME\.agentmemory\bin\iii.exe # 4. Verify: & "$HOME\.agentmemory\bin\iii.exe" --version -# Should print: 0.11.2 +# Should print: 0.19.7 # 5. Then run agentmemory as usual: npx -y @agentmemory/agentmemory@latest @@ -855,7 +855,7 @@ npx -y @agentmemory/mcp | Port conflict | `netstat -ano \| findstr :3111` to see what's bound, then kill it or use `--port ` | | Docker fallback skipped even though Docker is installed | Make sure Docker Desktop is actually running (system tray icon) | -> Note: the iii **engine** is a prebuilt binary, not a cargo crate, so don't try to `cargo install` it. (The iii **SDKs** are published on crates.io, npm, and PyPI, but agentmemory doesn't need them.) Supported engine install methods are all pinned to v0.11.2: the prebuilt binary above, agentmemory's macOS/Linux auto-install path (`curl`, POSIX `sh`, and `tar` required), and the Docker image `iiidev/iii:0.11.2`. A bare upstream `install.sh | sh` installs the latest engine, which agentmemory does not support. Use `npx -y @agentmemory/agentmemory@latest`; on macOS/Linux it fetches the pinned engine into `~/.agentmemory/bin`. +> Note: the iii **engine** is a prebuilt binary, not a cargo crate, so don't try to `cargo install` it. (The iii **SDKs** are published on crates.io, npm, and PyPI, but agentmemory doesn't need them.) Supported engine install methods are all pinned to v0.19.7: the prebuilt binary above, agentmemory's macOS/Linux auto-install path (`curl`, POSIX `sh`, and `tar` required), and the Docker image `iiidev/iii:0.19.7`. A bare upstream `install.sh | sh` installs the latest engine, which agentmemory does not support. Use `npx -y @agentmemory/agentmemory@latest`; on macOS/Linux it fetches the pinned engine into `~/.agentmemory/bin`. --- @@ -1647,7 +1647,7 @@ npm test # 1,674 tests npm run test:integration # API tests (requires running services) ``` -**Prerequisites:** Node.js >= 20 with npm/npx; [iii-engine](https://iii.dev/docs) v0.11.2 or Docker. The macOS/Linux automatic engine install also requires `curl`, a POSIX `sh`, and `tar`; native Windows uses the manual pinned `iii.exe`, WSL2, or Docker Desktop. +**Prerequisites:** Node.js >= 20 with npm/npx; [iii-engine](https://iii.dev/docs) v0.19.7 or Docker. The macOS/Linux automatic engine install also requires `curl`, a POSIX `sh`, and `tar`; native Windows uses the manual pinned `iii.exe`, WSL2, or Docker Desktop.

License

diff --git a/READMEs/README.de-DE.md b/READMEs/README.de-DE.md index 2f95ce63f7..3ea4fc9a1c 100644 --- a/READMEs/README.de-DE.md +++ b/READMEs/README.de-DE.md @@ -124,7 +124,7 @@ npx cached pro Version. Erzwingen Sie die neueste mit `npx -y @agentmemory/agent
Sie betreiben bereits eine eigene iii-Engine -agentmemory pinnt iii-engine v0.11.2 und verbindet sich nicht mit einer anderen Version (der Worker kann das Protokoll einer anderen Engine nicht sprechen). Stoppen Sie die andere Engine und führen Sie dann `npx -y @agentmemory/agentmemory@latest` aus. Es installiert und startet das gepinnte v0.11.2 in `~/.agentmemory/bin` und lässt Ihre eigene `iii` unangetastet. +agentmemory pinnt iii-engine v0.19.7 und verbindet sich nicht mit einer anderen Version (der Worker kann das Protokoll einer anderen Engine nicht sprechen). Stoppen Sie die andere Engine und führen Sie dann `npx -y @agentmemory/agentmemory@latest` aus. Es installiert und startet das gepinnte v0.19.7 in `~/.agentmemory/bin` und lässt Ihre eigene `iii` unangetastet.
@@ -463,7 +463,7 @@ Keines davon erfasst automatisch aus Coding-Agent-Hooks, liefert einen local-fir

Schnellstart

-Kompatibilität: Diese Version zielt auf stabiles `iii-sdk` `^0.11.0` und iii-engine v0.11.x ab. +Kompatibilität: Diese Version zielt auf `iii-sdk` 0.19.7 und pinnt iii-engine v0.19.7. ### In 30 Sekunden ausprobieren @@ -517,7 +517,7 @@ Verwenden Sie den Wartungsbefehl, wenn Sie Ihr lokales Runtime bewusst aktualisi npx @agentmemory/agentmemory upgrade ``` -Achtung: Dieser Befehl verändert den aktuellen Workspace/Runtime. Er kann JavaScript-Abhängigkeiten aktualisieren und das gepinnte Docker-Image `iiidev/iii:0.11.2` ziehen. Er installiert niemals eine ungepinnte oder neuere iii-Engine. +Achtung: Dieser Befehl verändert den aktuellen Workspace/Runtime. Er kann JavaScript-Abhängigkeiten aktualisieren und das gepinnte Docker-Image `iiidev/iii:0.19.7` ziehen. Er installiert niemals eine ungepinnte oder neuere iii-Engine. Implementierungsdetails in `src/cli.ts` (siehe `runUpgrade` rund um den Bereich `src/cli.ts:544-595`). @@ -721,15 +721,15 @@ npm install && npm run build && npm start Das startet agentmemory mit einer lokalen `iii-engine`, falls `iii` bereits installiert ist, oder fällt auf Docker Compose zurück, falls Docker vorhanden ist. REST, Streams und der Viewer binden sich standardmäßig an `127.0.0.1`. -`iii-engine` manuell installieren. **agentmemory pinnt `iii-engine` derzeit auf `v0.11.2`**. `v0.11.6` führt ein neues Modell ein, alles per `iii worker add` zu sandboxen, für das agentmemory noch nicht refaktoriert wurde. Der Pin wird aufgehoben, sobald die Refaktorierung erfolgt ist. Überschreiben Sie mit `AGENTMEMORY_III_VERSION=`, wenn Sie manuell auf das Sandbox-Modell migriert sind. +`iii-engine` manuell installieren. **agentmemory pinnt `iii-engine` derzeit auf `v0.19.7`**, dieselbe Version wie seine `iii-sdk`-Abhängigkeit; der Worker spricht das Wire-Protokoll genau dieser Engine, und 0.20.0 hat die SDK-Oberfläche neu organisiert, daher werden beide in agentmemory-Releases gemeinsam angehoben. Mit `AGENTMEMORY_III_VERSION=` überschreiben, wenn du eine eigene Engine betreibst und weißt, dass sie passt. -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** `aarch64-apple-darwin` durch `x86_64-apple-darwin` ersetzen - **Linux x64:** durch `x86_64-unknown-linux-gnu` ersetzen - **Linux arm64:** durch `aarch64-unknown-linux-gnu` ersetzen -- **Windows:** `iii-x86_64-pc-windows-msvc.zip` von [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2) herunterladen, `iii.exe` extrahieren, zum PATH hinzufügen +- **Windows:** `iii-x86_64-pc-windows-msvc.zip` von [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7) herunterladen, `iii.exe` extrahieren, zum PATH hinzufügen -Oder Docker verwenden (die mitgelieferte `docker-compose.yml` zieht `iiidev/iii:0.11.2`). Vollständige Doku: [iii.dev/docs](https://iii.dev/docs). +Oder Docker verwenden (die mitgelieferte `docker-compose.yml` zieht `iiidev/iii:0.19.7`). Vollständige Doku: [iii.dev/docs](https://iii.dev/docs). ### Windows @@ -738,9 +738,9 @@ agentmemory läuft auf Windows 10/11, aber das Node.js-Paket allein genügt nich **Option A: vorgebautes Windows-Binary (empfohlen)** ```powershell -# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser -# (we pin to v0.11.2 until agentmemory refactors for the new sandbox -# model that engine v0.11.6+ requires) +# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 in your browser +# (agentmemory pins the engine to the same release as its iii-sdk; +# v0.19.7 is the current pair) # 2. Download iii-x86_64-pc-windows-msvc.zip # (or iii-aarch64-pc-windows-msvc.zip if you're on an ARM machine) # 3. Extract iii.exe somewhere on PATH, or place it at: @@ -748,7 +748,7 @@ agentmemory läuft auf Windows 10/11, aber das Node.js-Paket allein genügt nich # (agentmemory checks that location automatically) # 4. Verify: iii --version -# Should print: 0.11.2 +# Should print: 0.19.7 # 5. Then run agentmemory as usual: npx -y @agentmemory/agentmemory @@ -780,7 +780,7 @@ npx -y @agentmemory/mcp | Port-Konflikt | `netstat -ano \| findstr :3111`, um zu sehen, was gebunden ist, dann beenden oder `--port ` verwenden | | Docker-Fallback wird übersprungen, obwohl Docker installiert ist | Stellen Sie sicher, dass Docker Desktop tatsächlich läuft (Taskleisten-Icon) | -> Hinweis: Die iii-**Engine** ist ein vorgebautes Binary, kein Cargo-Crate, versuche also nicht, sie per `cargo install` zu installieren. (Die iii-**SDKs** sind auf crates.io, npm und PyPI veröffentlicht, aber agentmemory benötigt sie nicht.) Unterstützte Engine-Installationsmethoden, alle auf v0.11.2 gepinnt: das vorgebaute v0.11.2-Binary oben, das Upstream-`sh`-Installationsskript **mit dem Versions-Pin** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux) und das Docker-Image `iiidev/iii:0.11.2`. Ein bloßes `install.sh | sh` installiert die **neueste** Engine, die agentmemory nicht unterstützt; übergib immer `VERSION=0.11.2`. Am einfachsten von allen: Führe einfach `npx @agentmemory/agentmemory` aus, das die gepinnte Engine für dich nach `~/.agentmemory/bin` holt. +> Hinweis: Die iii-**Engine** ist ein vorgebautes Binary, kein Cargo-Crate, versuche also nicht, sie per `cargo install` zu installieren. (Die iii-**SDKs** sind auf crates.io, npm und PyPI veröffentlicht, aber agentmemory benötigt sie nicht.) Unterstützte Engine-Installationsmethoden, alle auf v0.19.7 gepinnt: das vorgebaute v0.19.7-Binary oben, das Upstream-`sh`-Installationsskript **mit dem Versions-Pin** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux) und das Docker-Image `iiidev/iii:0.19.7`. Ein bloßes `install.sh | sh` installiert die **neueste** Engine, die agentmemory nicht unterstützt; übergib immer `VERSION=0.19.7`. Am einfachsten von allen: Führe einfach `npx @agentmemory/agentmemory` aus, das die gepinnte Engine für dich nach `~/.agentmemory/bin` holt. --- diff --git a/READMEs/README.es-ES.md b/READMEs/README.es-ES.md index 88438e4403..dfb7030946 100644 --- a/READMEs/README.es-ES.md +++ b/READMEs/README.es-ES.md @@ -124,7 +124,7 @@ npx cachea por versión. Fuerza la última con `npx -y @agentmemory/agentmemory@
Ya ejecutas tu propio engine iii -agentmemory fija iii-engine a v0.11.2 y no se conectará a una versión distinta (el worker no puede hablar el protocolo de otro engine). Detén el otro engine y ejecuta `npx -y @agentmemory/agentmemory@latest`. Instala y ejecuta la v0.11.2 fijada en `~/.agentmemory/bin`, dejando tu propio `iii` intacto. +agentmemory fija iii-engine a v0.19.7 y no se conectará a una versión distinta (el worker no puede hablar el protocolo de otro engine). Detén el otro engine y ejecuta `npx -y @agentmemory/agentmemory@latest`. Instala y ejecuta la v0.19.7 fijada en `~/.agentmemory/bin`, dejando tu propio `iii` intacto.
@@ -463,7 +463,7 @@ Ninguno de estos captura automáticamente desde hooks de agentes de codificació

Inicio rápido

-Compatibilidad: esta release apunta a `iii-sdk` estable `^0.11.0` e iii-engine v0.11.x. +Compatibilidad: esta release apunta a `iii-sdk` 0.19.7 y fija iii-engine v0.19.7. ### Pruébalo en 30 segundos @@ -517,7 +517,7 @@ Usa el comando de mantenimiento cuando intencionadamente quieras actualizar tu r npx @agentmemory/agentmemory upgrade ``` -Aviso: este comando muta el workspace/runtime actual. Puede actualizar dependencias de JavaScript y traer la imagen Docker fijada `iiidev/iii:0.11.2`. Nunca instala un motor iii sin fijar ni más nuevo. +Aviso: este comando muta el workspace/runtime actual. Puede actualizar dependencias de JavaScript y traer la imagen Docker fijada `iiidev/iii:0.19.7`. Nunca instala un motor iii sin fijar ni más nuevo. Los detalles de implementación están en `src/cli.ts` (ver `runUpgrade` en torno a la región `src/cli.ts:544-595`). @@ -721,15 +721,15 @@ npm install && npm run build && npm start Esto arranca agentmemory con un `iii-engine` local si `iii` ya está instalado, o cae a Docker Compose si hay Docker disponible. REST, streams y el visor se enlazan a `127.0.0.1` por defecto. -Instala `iii-engine` manualmente. **agentmemory actualmente fija `iii-engine` a `v0.11.2`**. `v0.11.6` introduce un nuevo modelo que sandboxea todo vía `iii worker add`, y agentmemory aún no se ha refactorizado para él. La fijación se levantará cuando aterrice el refactor. Sobrescribe con `AGENTMEMORY_III_VERSION=` si has migrado al modelo sandbox manualmente. +Instala `iii-engine` manualmente. **agentmemory actualmente fija `iii-engine` a `v0.19.7`**, la misma release que su dependencia `iii-sdk`; el worker habla el protocolo de ese engine, y 0.20.0 reorganizó la superficie del SDK, así que ambos avanzan juntos en cada release de agentmemory. Sobrescribe con `AGENTMEMORY_III_VERSION=` si ejecutas tu propio engine y sabes que coincide. -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** cambia `aarch64-apple-darwin` por `x86_64-apple-darwin` - **Linux x64:** cambia por `x86_64-unknown-linux-gnu` - **Linux arm64:** cambia por `aarch64-unknown-linux-gnu` -- **Windows:** descarga `iii-x86_64-pc-windows-msvc.zip` desde [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2), extrae `iii.exe`, añádelo al PATH +- **Windows:** descarga `iii-x86_64-pc-windows-msvc.zip` desde [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7), extrae `iii.exe`, añádelo al PATH -O usa Docker (el `docker-compose.yml` empaquetado descarga `iiidev/iii:0.11.2`). Documentación completa: [iii.dev/docs](https://iii.dev/docs). +O usa Docker (el `docker-compose.yml` empaquetado descarga `iiidev/iii:0.19.7`). Documentación completa: [iii.dev/docs](https://iii.dev/docs). ### Windows @@ -738,9 +738,9 @@ agentmemory funciona en Windows 10/11, pero el paquete de Node.js por sí solo n **Opción A: binario Windows preconstruido (recomendado)** ```powershell -# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser -# (we pin to v0.11.2 until agentmemory refactors for the new sandbox -# model that engine v0.11.6+ requires) +# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 in your browser +# (agentmemory pins the engine to the same release as its iii-sdk; +# v0.19.7 is the current pair) # 2. Download iii-x86_64-pc-windows-msvc.zip # (or iii-aarch64-pc-windows-msvc.zip if you're on an ARM machine) # 3. Extract iii.exe somewhere on PATH, or place it at: @@ -748,7 +748,7 @@ agentmemory funciona en Windows 10/11, pero el paquete de Node.js por sí solo n # (agentmemory checks that location automatically) # 4. Verify: iii --version -# Should print: 0.11.2 +# Should print: 0.19.7 # 5. Then run agentmemory as usual: npx -y @agentmemory/agentmemory @@ -780,7 +780,7 @@ npx -y @agentmemory/mcp | Conflicto de puerto | `netstat -ano \| findstr :3111` para ver qué está vinculado, mátalo o usa `--port ` | | Se omite el fallback a Docker aunque Docker esté instalado | Asegúrate de que Docker Desktop esté efectivamente en ejecución (icono en la bandeja del sistema) | -> Nota: el **motor** iii es un binario preconstruido, no un crate de cargo, así que no intentes instalarlo con `cargo install`. (Los **SDK** de iii sí están publicados en crates.io, npm y PyPI, pero agentmemory no los necesita.) Métodos de instalación del motor soportados, todos fijados a v0.11.2: el binario preconstruido v0.11.2 de arriba, el script de instalación `sh` upstream **con el pin de versión** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux) y la imagen Docker `iiidev/iii:0.11.2`. Un simple `install.sh | sh` instala el motor **más reciente**, que agentmemory no soporta; pasa siempre `VERSION=0.11.2`. Lo más fácil de todo: simplemente ejecuta `npx @agentmemory/agentmemory`, que obtiene el motor fijado en `~/.agentmemory/bin` por ti. +> Nota: el **motor** iii es un binario preconstruido, no un crate de cargo, así que no intentes instalarlo con `cargo install`. (Los **SDK** de iii sí están publicados en crates.io, npm y PyPI, pero agentmemory no los necesita.) Métodos de instalación del motor soportados, todos fijados a v0.19.7: el binario preconstruido v0.19.7 de arriba, el script de instalación `sh` upstream **con el pin de versión** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux) y la imagen Docker `iiidev/iii:0.19.7`. Un simple `install.sh | sh` instala el motor **más reciente**, que agentmemory no soporta; pasa siempre `VERSION=0.19.7`. Lo más fácil de todo: simplemente ejecuta `npx @agentmemory/agentmemory`, que obtiene el motor fijado en `~/.agentmemory/bin` por ti. --- diff --git a/READMEs/README.fr-FR.md b/READMEs/README.fr-FR.md index 3b1cd8bdc4..175d4e2259 100644 --- a/READMEs/README.fr-FR.md +++ b/READMEs/README.fr-FR.md @@ -124,7 +124,7 @@ npx met en cache par version. Forcez la dernière avec `npx -y @agentmemory/agen
Vous faites déjà tourner votre propre moteur iii -agentmemory épingle iii-engine v0.11.2 et ne s'attachera pas à une autre version (le worker ne peut pas parler le protocole d'un autre moteur). Arrêtez l'autre moteur, puis lancez `npx -y @agentmemory/agentmemory@latest`. Il installe et exécute le v0.11.2 épinglé dans `~/.agentmemory/bin`, sans toucher à votre propre `iii`. +agentmemory épingle iii-engine v0.19.7 et ne s'attachera pas à une autre version (le worker ne peut pas parler le protocole d'un autre moteur). Arrêtez l'autre moteur, puis lancez `npx -y @agentmemory/agentmemory@latest`. Il installe et exécute le v0.19.7 épinglé dans `~/.agentmemory/bin`, sans toucher à votre propre `iii`.
@@ -463,7 +463,7 @@ Aucun d'eux ne capture automatiquement depuis les hooks d'agents de codage, ne l

Démarrage rapide

-Compatibilité : cette version cible `iii-sdk` stable `^0.11.0` et iii-engine v0.11.x. +Compatibilité : cette version cible `iii-sdk` 0.19.7 et épingle iii-engine v0.19.7. ### Essayez en 30 secondes @@ -517,7 +517,7 @@ Utilisez la commande de maintenance lorsque vous voulez intentionnellement mettr npx @agentmemory/agentmemory upgrade ``` -Avertissement : cette commande modifie l'espace de travail / runtime courant. Elle peut mettre à jour les dépendances JavaScript et tirer l'image Docker épinglée `iiidev/iii:0.11.2`. Elle n'installe jamais un moteur iii non épinglé ou plus récent. +Avertissement : cette commande modifie l'espace de travail / runtime courant. Elle peut mettre à jour les dépendances JavaScript et tirer l'image Docker épinglée `iiidev/iii:0.19.7`. Elle n'installe jamais un moteur iii non épinglé ou plus récent. Détails d'implémentation dans `src/cli.ts` (voir `runUpgrade` autour de la zone `src/cli.ts:544-595`). @@ -721,15 +721,15 @@ npm install && npm run build && npm start Cela démarre agentmemory avec un `iii-engine` local si `iii` est déjà installé, ou retombe sur Docker Compose si Docker est disponible. REST, streams et visualiseur se lient à `127.0.0.1` par défaut. -Installer `iii-engine` manuellement. **agentmemory épingle actuellement `iii-engine` à `v0.11.2`**. `v0.11.6` introduit un nouveau modèle de sandboxing systématique via `iii worker add` pour lequel agentmemory n'a pas encore été refactorisé. L'épinglage sera levé une fois la refonte effectuée. Surchargez avec `AGENTMEMORY_III_VERSION=` si vous avez migré au modèle sandbox manuellement. +Installer `iii-engine` manuellement. **agentmemory épingle actuellement `iii-engine` à `v0.19.7`**, la même version que sa dépendance `iii-sdk` ; le worker parle le protocole de ce moteur précis, et 0.20.0 a réorganisé la surface du SDK, donc les deux évoluent ensemble dans les versions d'agentmemory. Remplacez avec `AGENTMEMORY_III_VERSION=` si vous exécutez votre propre moteur et savez qu'il correspond. -- **macOS arm64 :** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64 :** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64 :** remplacez `aarch64-apple-darwin` par `x86_64-apple-darwin` - **Linux x64 :** remplacez par `x86_64-unknown-linux-gnu` - **Linux arm64 :** remplacez par `aarch64-unknown-linux-gnu` -- **Windows :** téléchargez `iii-x86_64-pc-windows-msvc.zip` depuis [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2), extrayez `iii.exe`, ajoutez-le au PATH +- **Windows :** téléchargez `iii-x86_64-pc-windows-msvc.zip` depuis [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7), extrayez `iii.exe`, ajoutez-le au PATH -Ou utilisez Docker (le `docker-compose.yml` fourni tire `iiidev/iii:0.11.2`). Documentation complète : [iii.dev/docs](https://iii.dev/docs). +Ou utilisez Docker (le `docker-compose.yml` fourni tire `iiidev/iii:0.19.7`). Documentation complète : [iii.dev/docs](https://iii.dev/docs). ### Windows @@ -738,9 +738,9 @@ agentmemory tourne sur Windows 10/11, mais le paquet Node.js seul ne suffit pas **Option A : binaire Windows précompilé (recommandé)** ```powershell -# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser -# (we pin to v0.11.2 until agentmemory refactors for the new sandbox -# model that engine v0.11.6+ requires) +# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 in your browser +# (agentmemory pins the engine to the same release as its iii-sdk; +# v0.19.7 is the current pair) # 2. Download iii-x86_64-pc-windows-msvc.zip # (or iii-aarch64-pc-windows-msvc.zip if you're on an ARM machine) # 3. Extract iii.exe somewhere on PATH, or place it at: @@ -748,7 +748,7 @@ agentmemory tourne sur Windows 10/11, mais le paquet Node.js seul ne suffit pas # (agentmemory checks that location automatically) # 4. Verify: iii --version -# Should print: 0.11.2 +# Should print: 0.19.7 # 5. Then run agentmemory as usual: npx -y @agentmemory/agentmemory @@ -780,7 +780,7 @@ npx -y @agentmemory/mcp | Conflit de port | `netstat -ano \| findstr :3111` pour voir ce qui est lié, puis tuez-le ou utilisez `--port ` | | Fallback Docker ignoré bien que Docker soit installé | Assurez-vous que Docker Desktop tourne effectivement (icône de la barre d'état système) | -> Note : le **moteur** iii est un binaire précompilé, pas un crate cargo, donc n'essayez pas de l'installer avec `cargo install`. (Les **SDK** iii sont bien publiés sur crates.io, npm et PyPI, mais agentmemory n'en a pas besoin.) Méthodes d'installation du moteur supportées, toutes épinglées à v0.11.2 : le binaire précompilé v0.11.2 ci-dessus, le script d'installation `sh` amont **avec l'épingle de version** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux) et l'image Docker `iiidev/iii:0.11.2`. Un simple `install.sh | sh` installe le moteur **le plus récent**, que agentmemory ne supporte pas ; passez toujours `VERSION=0.11.2`. Le plus simple de tout : exécutez simplement `npx @agentmemory/agentmemory`, qui récupère le moteur épinglé dans `~/.agentmemory/bin` pour vous. +> Note : le **moteur** iii est un binaire précompilé, pas un crate cargo, donc n'essayez pas de l'installer avec `cargo install`. (Les **SDK** iii sont bien publiés sur crates.io, npm et PyPI, mais agentmemory n'en a pas besoin.) Méthodes d'installation du moteur supportées, toutes épinglées à v0.19.7 : le binaire précompilé v0.19.7 ci-dessus, le script d'installation `sh` amont **avec l'épingle de version** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux) et l'image Docker `iiidev/iii:0.19.7`. Un simple `install.sh | sh` installe le moteur **le plus récent**, que agentmemory ne supporte pas ; passez toujours `VERSION=0.19.7`. Le plus simple de tout : exécutez simplement `npx @agentmemory/agentmemory`, qui récupère le moteur épinglé dans `~/.agentmemory/bin` pour vous. --- diff --git a/READMEs/README.hi-IN.md b/READMEs/README.hi-IN.md index 47ee3b54f0..20395845e7 100644 --- a/READMEs/README.hi-IN.md +++ b/READMEs/README.hi-IN.md @@ -124,7 +124,7 @@ npx प्रति-वर्ज़न कैश करता है। नव
पहले से अपना iii engine चला रहे हैं -agentmemory iii-engine v0.11.2 को pin करता है और किसी भिन्न version से attach नहीं होगा (worker किसी दूसरे engine का protocol नहीं बोल सकता)। दूसरे engine को रोकें, फिर `npx -y @agentmemory/agentmemory@latest` चलाएँ। यह pinned v0.11.2 को `~/.agentmemory/bin` में install और run करता है, आपके अपने `iii` को अछूता छोड़ते हुए। +agentmemory iii-engine v0.19.7 को pin करता है और किसी भिन्न version से attach नहीं होगा (worker किसी दूसरे engine का protocol नहीं बोल सकता)। दूसरे engine को रोकें, फिर `npx -y @agentmemory/agentmemory@latest` चलाएँ। यह pinned v0.19.7 को `~/.agentmemory/bin` में install और run करता है, आपके अपने `iii` को अछूता छोड़ते हुए।
@@ -463,7 +463,7 @@ npx @agentmemory/agentmemory

Quick Start

-संगतता: यह रिलीज़ stable `iii-sdk` `^0.11.0` और iii-engine v0.11.x को टार्गेट करता है। +संगतता: यह रिलीज़ `iii-sdk` 0.19.7 को टार्गेट करता है और iii-engine को v0.19.7 पर pin करता है। ### 30 सेकंड में आज़माएँ @@ -515,7 +515,7 @@ Imported सेशंस native ones के साथ Replay picker में npx @agentmemory/agentmemory upgrade ``` -चेतावनी: यह कमांड वर्तमान workspace/runtime को mutate करता है। यह JavaScript निर्भरताएँ update कर सकता है और pinned Docker image `iiidev/iii:0.11.2` खींच सकता है। यह कभी भी unpinned या नया iii engine install नहीं करता। +चेतावनी: यह कमांड वर्तमान workspace/runtime को mutate करता है। यह JavaScript निर्भरताएँ update कर सकता है और pinned Docker image `iiidev/iii:0.19.7` खींच सकता है। यह कभी भी unpinned या नया iii engine install नहीं करता। Implementation विवरण `src/cli.ts` में हैं (`src/cli.ts:544-595` क्षेत्र के आसपास `runUpgrade` देखें)। @@ -700,15 +700,15 @@ npm install && npm run build && npm start यह agentmemory को local `iii-engine` के साथ शुरू करता है अगर `iii` पहले से installed है, या Docker उपलब्ध होने पर Docker Compose पर fallback करता है। REST, streams, और व्यूअर default रूप से `127.0.0.1` से bind करते हैं। -`iii-engine` मैनुअली इंस्टॉल करें। **agentmemory वर्तमान में `iii-engine` को `v0.11.2` पर pin करता है**। `v0.11.6` एक नया sandbox-everything-via-`iii worker add` model introduce करता है जिसके लिए agentmemory को अभी refactor नहीं किया गया है। Refactor land होने के बाद pin हटा दी जाती है। अगर आपने sandbox model पर मैनुअली migrate किया है तो `AGENTMEMORY_III_VERSION=` से override करें। +`iii-engine` मैनुअली इंस्टॉल करें। **agentmemory वर्तमान में `iii-engine` को `v0.19.7` पर pin करता है**, जो इसकी `iii-sdk` dependency वाला ही release है; worker उसी engine का wire protocol बोलता है, और 0.20.0 ने SDK surface को reorganize किया, इसलिए दोनों agentmemory releases में साथ बढ़ते हैं। यदि आप अपना engine चलाते हैं और जानते हैं कि वह मेल खाता है तो `AGENTMEMORY_III_VERSION=` से override करें। -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** `aarch64-apple-darwin` को `x86_64-apple-darwin` के साथ बदलें - **Linux x64:** `x86_64-unknown-linux-gnu` के साथ बदलें - **Linux arm64:** `aarch64-unknown-linux-gnu` के साथ बदलें -- **Windows:** [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2) से `iii-x86_64-pc-windows-msvc.zip` download करें, `iii.exe` extract करें, PATH में जोड़ें +- **Windows:** [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7) से `iii-x86_64-pc-windows-msvc.zip` download करें, `iii.exe` extract करें, PATH में जोड़ें -या Docker का उपयोग करें (bundled `docker-compose.yml` `iiidev/iii:0.11.2` खींचता है)। पूर्ण docs: [iii.dev/docs](https://iii.dev/docs)। +या Docker का उपयोग करें (bundled `docker-compose.yml` `iiidev/iii:0.19.7` खींचता है)। पूर्ण docs: [iii.dev/docs](https://iii.dev/docs)। ### Windows @@ -717,9 +717,9 @@ agentmemory Windows 10/11 पर चलता है, लेकिन केव **विकल्प A: prebuilt Windows binary (अनुशंसित)** ```powershell -# 1. अपने browser में https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 खोलें -# (हम v0.11.2 पर pin करते हैं जब तक agentmemory नए sandbox -# model के लिए refactor नहीं हो जाता जो engine v0.11.6+ की आवश्यकता है) +# 1. अपने browser में https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 खोलें +# (agentmemory engine को अपनी iii-sdk वाले ही release पर pin करता है; +# वर्तमान pair v0.19.7 है) # 2. iii-x86_64-pc-windows-msvc.zip download करें # (या ARM machine पर हैं तो iii-aarch64-pc-windows-msvc.zip) # 3. PATH पर कहीं iii.exe extract करें, या यहाँ रखें: @@ -727,7 +727,7 @@ agentmemory Windows 10/11 पर चलता है, लेकिन केव # (agentmemory उस location को automatically check करता है) # 4. Verify करें: iii --version -# Print होना चाहिए: 0.11.2 +# Print होना चाहिए: 0.19.7 # 5. फिर agentmemory को सामान्य की तरह चलाएँ: npx -y @agentmemory/agentmemory @@ -759,7 +759,7 @@ npx -y @agentmemory/mcp | Port conflict | `netstat -ano \| findstr :3111` से देखें कि क्या bind है, फिर उसे kill करें या `--port ` का उपयोग करें | | Docker installed होने पर भी Docker fallback skip हो रहा है | सुनिश्चित करें कि Docker Desktop वास्तव में चल रहा है (system tray icon) | -> नोट: iii **engine** एक prebuilt binary है, cargo crate नहीं, इसलिए इसे `cargo install` से install करने की कोशिश न करें। (iii **SDKs** crates.io, npm, और PyPI पर publish हैं, लेकिन agentmemory को उनकी ज़रूरत नहीं है।) समर्थित engine install methods, सभी v0.11.2 पर pinned: ऊपर वाला prebuilt v0.11.2 binary, version pin **के साथ** upstream `sh` install script `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux), और Docker image `iiidev/iii:0.11.2`। केवल `install.sh | sh` **latest** engine install करता है, जिसे agentmemory support नहीं करता; हमेशा `VERSION=0.11.2` पास करें। सबसे आसान: बस `npx @agentmemory/agentmemory` चलाएँ, जो pinned engine को आपके लिए `~/.agentmemory/bin` में ले आता है। +> नोट: iii **engine** एक prebuilt binary है, cargo crate नहीं, इसलिए इसे `cargo install` से install करने की कोशिश न करें। (iii **SDKs** crates.io, npm, और PyPI पर publish हैं, लेकिन agentmemory को उनकी ज़रूरत नहीं है।) समर्थित engine install methods, सभी v0.19.7 पर pinned: ऊपर वाला prebuilt v0.19.7 binary, version pin **के साथ** upstream `sh` install script `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux), और Docker image `iiidev/iii:0.19.7`। केवल `install.sh | sh` **latest** engine install करता है, जिसे agentmemory support नहीं करता; हमेशा `VERSION=0.19.7` पास करें। सबसे आसान: बस `npx @agentmemory/agentmemory` चलाएँ, जो pinned engine को आपके लिए `~/.agentmemory/bin` में ले आता है। --- diff --git a/READMEs/README.ja-JP.md b/READMEs/README.ja-JP.md index 04bb829ea1..624cc33c3a 100644 --- a/READMEs/README.ja-JP.md +++ b/READMEs/README.ja-JP.md @@ -124,7 +124,7 @@ npx はバージョン単位でキャッシュします。`npx -y @agentmemory/a
自前の iii エンジンを既に動かしている -agentmemory は iii-engine v0.11.2 にピン留めしており、異なるバージョンにはアタッチしません(worker は別のエンジンのプロトコルを話せません)。他のエンジンを停止してから `npx -y @agentmemory/agentmemory@latest` を実行してください。ピン留めされた v0.11.2 を `~/.agentmemory/bin` にインストールして実行し、あなた自身の `iii` には触れません。 +agentmemory は iii-engine v0.19.7 にピン留めしており、異なるバージョンにはアタッチしません(worker は別のエンジンのプロトコルを話せません)。他のエンジンを停止してから `npx -y @agentmemory/agentmemory@latest` を実行してください。ピン留めされた v0.19.7 を `~/.agentmemory/bin` にインストールして実行し、あなた自身の `iii` には触れません。
@@ -463,7 +463,7 @@ npx @agentmemory/agentmemory

Quick Start

-互換性:このリリースは安定版の `iii-sdk` `^0.11.0` と iii-engine v0.11.x を対象とします。 +互換性:このリリースは `iii-sdk` 0.19.7 を対象とし、iii-engine v0.19.7 にピン留めします。 ### 30 秒で試す @@ -517,7 +517,7 @@ npx @agentmemory/agentmemory import-jsonl ~/.claude/projects/-my-project/abc123. npx @agentmemory/agentmemory upgrade ``` -警告: このコマンドは現在のワークスペース/ランタイムを変更します。JavaScript 依存を更新したり、ピン留めされた Docker イメージ `iiidev/iii:0.11.2` を pull したりすることがあります。ピン留めされていない、あるいは新しい iii エンジンをインストールすることは決してありません。 +警告: このコマンドは現在のワークスペース/ランタイムを変更します。JavaScript 依存を更新したり、ピン留めされた Docker イメージ `iiidev/iii:0.19.7` を pull したりすることがあります。ピン留めされていない、あるいは新しい iii エンジンをインストールすることは決してありません。 実装の詳細は `src/cli.ts` を参照(`src/cli.ts:544-595` 付近の `runUpgrade`)。 @@ -722,15 +722,15 @@ npm install && npm run build && npm start `iii` が既にインストールされていれば、これでローカルの `iii-engine` で agentmemory が起動します。Docker が使える場合は Docker Compose にフォールバックします。REST、ストリーム、ビューワーはデフォルトで `127.0.0.1` にバインドします。 -`iii-engine` を手動でインストールしてください。**agentmemory は現在 `iii-engine` を `v0.11.2` にピン留めしています** — `v0.11.6` では `iii worker add` で何でもサンドボックス化する新モデルが導入されましたが、agentmemory はまだそれ向けにリファクタリングされていません。リファクタが完了次第ピンは解除されます。サンドボックスモデルへ手動移行済みなら `AGENTMEMORY_III_VERSION=` でオーバーライドできます。 +`iii-engine` を手動でインストールしてください。**agentmemory は現在 `iii-engine` を `v0.19.7` にピン留めしています** — `iii-sdk` 依存関係と同じリリースです。worker はそのエンジンの wire プロトコルを話し、0.20.0 で SDK の API 面が再編されたため、両者は agentmemory のリリースで一緒に更新されます。自前のエンジンを運用していて一致していると分かっている場合は `AGENTMEMORY_III_VERSION=` で上書きできます。 -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** `aarch64-apple-darwin` を `x86_64-apple-darwin` に置換 - **Linux x64:** `x86_64-unknown-linux-gnu` に置換 - **Linux arm64:** `aarch64-unknown-linux-gnu` に置換 -- **Windows:** [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2) から `iii-x86_64-pc-windows-msvc.zip` をダウンロード、`iii.exe` を展開し PATH に追加 +- **Windows:** [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7) から `iii-x86_64-pc-windows-msvc.zip` をダウンロード、`iii.exe` を展開し PATH に追加 -または Docker を使用(同梱の `docker-compose.yml` が `iiidev/iii:0.11.2` を pull します)。詳細ドキュメント:[iii.dev/docs](https://iii.dev/docs)。 +または Docker を使用(同梱の `docker-compose.yml` が `iiidev/iii:0.19.7` を pull します)。詳細ドキュメント:[iii.dev/docs](https://iii.dev/docs)。 ### Windows @@ -739,9 +739,9 @@ agentmemory は Windows 10/11 で動作しますが、Node.js パッケージだ **選択肢 A: ビルド済み Windows バイナリ(推奨)** ```powershell -# 1. ブラウザで https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 を開く -# (engine v0.11.6+ が要求する新しいサンドボックスモデルへ -# agentmemory がリファクタリングされるまで v0.11.2 にピン留め) +# 1. ブラウザで https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 を開く +# (agentmemory はエンジンを iii-sdk と同じリリースにピン留めしています。 +# 現在のペアは v0.19.7) # 2. iii-x86_64-pc-windows-msvc.zip をダウンロード # (ARM マシンの場合は iii-aarch64-pc-windows-msvc.zip) # 3. iii.exe を PATH 上のどこかに展開、または以下に配置: @@ -749,7 +749,7 @@ agentmemory は Windows 10/11 で動作しますが、Node.js パッケージだ # (agentmemory はこの場所を自動でチェックします) # 4. 確認: iii --version -# 出力: 0.11.2 +# 出力: 0.19.7 # 5. その後 agentmemory を通常通り起動: npx -y @agentmemory/agentmemory @@ -781,7 +781,7 @@ npx -y @agentmemory/mcp | ポート競合 | `netstat -ano \| findstr :3111` でバインドを確認、kill するか `--port ` を使用 | | Docker をインストール済みなのにフォールバックがスキップされる | Docker Desktop が実際に動作している(システムトレイアイコン)ことを確認 | -> 注意: iii **エンジン** はビルド済みバイナリであり、cargo クレートではありません — `cargo install` でインストールしようとしないでください。(iii **SDK** は crates.io、npm、PyPI に公開されていますが、agentmemory には不要です。)サポートされるエンジンのインストール方法はすべて v0.11.2 にピン留めされています: 上記のビルド済み v0.11.2 バイナリ、バージョンピン**付き**の上流 `sh` インストールスクリプト `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh`(macOS/Linux)、および Docker イメージ `iiidev/iii:0.11.2`。単なる `install.sh | sh` は **最新** のエンジンをインストールしますが、agentmemory はそれをサポートしていません — 必ず `VERSION=0.11.2` を渡してください。最も簡単なのは、`npx @agentmemory/agentmemory` を実行するだけです。これがピン留めされたエンジンを `~/.agentmemory/bin` に取得してくれます。 +> 注意: iii **エンジン** はビルド済みバイナリであり、cargo クレートではありません — `cargo install` でインストールしようとしないでください。(iii **SDK** は crates.io、npm、PyPI に公開されていますが、agentmemory には不要です。)サポートされるエンジンのインストール方法はすべて v0.19.7 にピン留めされています: 上記のビルド済み v0.19.7 バイナリ、バージョンピン**付き**の上流 `sh` インストールスクリプト `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh`(macOS/Linux)、および Docker イメージ `iiidev/iii:0.19.7`。単なる `install.sh | sh` は **最新** のエンジンをインストールしますが、agentmemory はそれをサポートしていません — 必ず `VERSION=0.19.7` を渡してください。最も簡単なのは、`npx @agentmemory/agentmemory` を実行するだけです。これがピン留めされたエンジンを `~/.agentmemory/bin` に取得してくれます。 --- diff --git a/READMEs/README.ko-KR.md b/READMEs/README.ko-KR.md index b73fa49e10..3c6843ac8a 100644 --- a/READMEs/README.ko-KR.md +++ b/READMEs/README.ko-KR.md @@ -124,7 +124,7 @@ npx는 버전별로 캐싱합니다. `npx -y @agentmemory/agentmemory@latest`로
이미 자체 iii 엔진을 실행 중인 경우 -agentmemory는 iii-engine v0.11.2를 고정하며 다른 버전에는 연결되지 않습니다(워커가 다른 엔진의 프로토콜을 말할 수 없습니다). 다른 엔진을 중지한 후 `npx -y @agentmemory/agentmemory@latest`를 실행하십시오. 고정된 v0.11.2를 `~/.agentmemory/bin`에 설치·실행하며, 기존 `iii`는 건드리지 않습니다. +agentmemory는 iii-engine v0.19.7를 고정하며 다른 버전에는 연결되지 않습니다(워커가 다른 엔진의 프로토콜을 말할 수 없습니다). 다른 엔진을 중지한 후 `npx -y @agentmemory/agentmemory@latest`를 실행하십시오. 고정된 v0.19.7를 `~/.agentmemory/bin`에 설치·실행하며, 기존 `iii`는 건드리지 않습니다.
@@ -463,7 +463,7 @@ npx @agentmemory/agentmemory

빠른 시작

-호환성: 이 릴리스는 안정 버전 `iii-sdk` `^0.11.0`과 iii-engine v0.11.x를 대상으로 합니다. +호환성: 이 릴리스는 `iii-sdk` 0.19.7을 대상으로 하며 iii-engine을 v0.19.7로 고정합니다. ### 30초 만에 사용해 보기 @@ -515,7 +515,7 @@ npx @agentmemory/agentmemory import-jsonl ~/.claude/projects/-my-project/abc123. npx @agentmemory/agentmemory upgrade ``` -경고: 이 명령은 현재 workspace/런타임을 변경합니다. JavaScript 의존성을 업데이트할 수 있으며, 고정된 Docker 이미지 `iiidev/iii:0.11.2`를 pull할 수 있습니다. 고정되지 않았거나 더 새로운 iii 엔진을 설치하는 일은 절대 없습니다. +경고: 이 명령은 현재 workspace/런타임을 변경합니다. JavaScript 의존성을 업데이트할 수 있으며, 고정된 Docker 이미지 `iiidev/iii:0.19.7`를 pull할 수 있습니다. 고정되지 않았거나 더 새로운 iii 엔진을 설치하는 일은 절대 없습니다. 구현 세부 사항은 `src/cli.ts`에 있습니다 (`runUpgrade`는 `src/cli.ts:544-595` 부근 참고). @@ -719,15 +719,15 @@ npm install && npm run build && npm start `iii`가 이미 설치되어 있으면 로컬 `iii-engine`으로 agentmemory를 시작하고, Docker가 사용 가능하면 Docker Compose로 폴백합니다. REST, 스트림, 뷰어는 기본적으로 `127.0.0.1`에 바인딩됩니다. -`iii-engine`을 수동으로 설치하십시오. **agentmemory는 현재 `iii-engine`을 `v0.11.2`로 고정합니다**. `v0.11.6`은 모든 것을 `iii worker add`를 통해 샌드박스화하는 새 모델을 도입했는데 agentmemory는 아직 이를 위해 리팩터링되지 않았기 때문입니다. 리팩터링이 완료되면 고정이 풀립니다. 수동으로 sandbox 모델로 마이그레이션했다면 `AGENTMEMORY_III_VERSION=`으로 덮어쓰십시오. +`iii-engine`을 수동으로 설치하십시오. **agentmemory는 현재 `iii-engine`을 `v0.19.7`로 고정합니다**. `iii-sdk` 의존성과 같은 릴리스입니다. 워커는 해당 엔진의 wire 프로토콜을 사용하고 0.20.0에서 SDK 표면이 재구성되었으므로, 둘은 agentmemory 릴리스에서 함께 올라갑니다. 직접 운영하는 엔진이 일치한다고 확신한다면 `AGENTMEMORY_III_VERSION=`으로 재정의하세요. -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** `aarch64-apple-darwin`을 `x86_64-apple-darwin`으로 교체 - **Linux x64:** `x86_64-unknown-linux-gnu`로 교체 - **Linux arm64:** `aarch64-unknown-linux-gnu`로 교체 -- **Windows:** [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2)에서 `iii-x86_64-pc-windows-msvc.zip`을 다운로드하고 `iii.exe`를 추출한 후 PATH에 추가 +- **Windows:** [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7)에서 `iii-x86_64-pc-windows-msvc.zip`을 다운로드하고 `iii.exe`를 추출한 후 PATH에 추가 -또는 Docker 사용 (번들된 `docker-compose.yml`이 `iiidev/iii:0.11.2`를 pull). 전체 문서: [iii.dev/docs](https://iii.dev/docs). +또는 Docker 사용 (번들된 `docker-compose.yml`이 `iiidev/iii:0.19.7`를 pull). 전체 문서: [iii.dev/docs](https://iii.dev/docs). ### Windows @@ -736,9 +736,9 @@ agentmemory는 Windows 10/11에서 실행되지만, Node.js 패키지만으로 **옵션 A: 사전 빌드된 Windows 바이너리 (권장)** ```powershell -# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser -# (we pin to v0.11.2 until agentmemory refactors for the new sandbox -# model that engine v0.11.6+ requires) +# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 in your browser +# (agentmemory pins the engine to the same release as its iii-sdk; +# v0.19.7 is the current pair) # 2. Download iii-x86_64-pc-windows-msvc.zip # (or iii-aarch64-pc-windows-msvc.zip if you're on an ARM machine) # 3. Extract iii.exe somewhere on PATH, or place it at: @@ -746,7 +746,7 @@ agentmemory는 Windows 10/11에서 실행되지만, Node.js 패키지만으로 # (agentmemory checks that location automatically) # 4. Verify: iii --version -# Should print: 0.11.2 +# Should print: 0.19.7 # 5. Then run agentmemory as usual: npx -y @agentmemory/agentmemory @@ -778,7 +778,7 @@ npx -y @agentmemory/mcp | 포트 충돌 | `netstat -ano \| findstr :3111`로 무엇이 바인딩되어 있는지 확인하고 종료하거나 `--port ` 사용 | | Docker가 설치되어 있어도 Docker 폴백을 건너뜀 | Docker Desktop이 실제로 실행 중인지 확인 (시스템 트레이 아이콘) | -> 참고: iii **엔진**은 사전 빌드된 바이너리이며 cargo 크레이트가 아니므로, `cargo install`로 설치하려 하지 마세요. (iii **SDK**는 crates.io, npm, PyPI에 게시되어 있지만 agentmemory에는 필요하지 않습니다.) 지원되는 엔진 설치 방법은 모두 v0.11.2에 고정되어 있습니다: 위의 사전 빌드된 v0.11.2 바이너리, 버전 핀**을 포함한** 업스트림 `sh` 설치 스크립트 `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux), 그리고 Docker 이미지 `iiidev/iii:0.11.2`. 그냥 `install.sh | sh`를 실행하면 **최신** 엔진이 설치되는데, agentmemory는 이를 지원하지 않습니다; 항상 `VERSION=0.11.2`를 전달하세요. 가장 쉬운 방법은 그냥 `npx @agentmemory/agentmemory`를 실행하는 것입니다. 이 명령이 고정된 엔진을 `~/.agentmemory/bin`에 가져다 줍니다. +> 참고: iii **엔진**은 사전 빌드된 바이너리이며 cargo 크레이트가 아니므로, `cargo install`로 설치하려 하지 마세요. (iii **SDK**는 crates.io, npm, PyPI에 게시되어 있지만 agentmemory에는 필요하지 않습니다.) 지원되는 엔진 설치 방법은 모두 v0.19.7에 고정되어 있습니다: 위의 사전 빌드된 v0.19.7 바이너리, 버전 핀**을 포함한** 업스트림 `sh` 설치 스크립트 `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux), 그리고 Docker 이미지 `iiidev/iii:0.19.7`. 그냥 `install.sh | sh`를 실행하면 **최신** 엔진이 설치되는데, agentmemory는 이를 지원하지 않습니다; 항상 `VERSION=0.19.7`를 전달하세요. 가장 쉬운 방법은 그냥 `npx @agentmemory/agentmemory`를 실행하는 것입니다. 이 명령이 고정된 엔진을 `~/.agentmemory/bin`에 가져다 줍니다. --- diff --git a/READMEs/README.pt-BR.md b/READMEs/README.pt-BR.md index fb245e9370..30f5d8e2a5 100644 --- a/READMEs/README.pt-BR.md +++ b/READMEs/README.pt-BR.md @@ -124,7 +124,7 @@ O npx faz cache por versão. Force a mais recente com `npx -y @agentmemory/agent
Já roda seu próprio engine iii -agentmemory fixa o iii-engine em v0.11.2 e não se conecta a uma versão diferente (o worker não fala o protocolo de outro engine). Pare o outro engine e rode `npx -y @agentmemory/agentmemory@latest`. Ele instala e executa a v0.11.2 fixada em `~/.agentmemory/bin`, deixando o seu próprio `iii` intocado. +agentmemory fixa o iii-engine em v0.19.7 e não se conecta a uma versão diferente (o worker não fala o protocolo de outro engine). Pare o outro engine e rode `npx -y @agentmemory/agentmemory@latest`. Ele instala e executa a v0.19.7 fixada em `~/.agentmemory/bin`, deixando o seu próprio `iii` intocado.
@@ -463,7 +463,7 @@ Nenhum deles faz captura automática a partir de hooks de agentes de codificaç

Início rápido

-Compatibilidade: este release tem como alvo o `iii-sdk` estável `^0.11.0` e o iii-engine v0.11.x. +Compatibilidade: este release tem como alvo o `iii-sdk` 0.19.7 e fixa o iii-engine em v0.19.7. ### Experimente em 30 segundos @@ -517,7 +517,7 @@ Use o comando de manutenção quando você intencionalmente quiser atualizar seu npx @agentmemory/agentmemory upgrade ``` -Aviso: este comando muta o workspace/runtime atual. Pode atualizar dependências JavaScript e puxar a imagem Docker fixada `iiidev/iii:0.11.2`. Nunca instala um engine iii sem fixação ou mais recente. +Aviso: este comando muta o workspace/runtime atual. Pode atualizar dependências JavaScript e puxar a imagem Docker fixada `iiidev/iii:0.19.7`. Nunca instala um engine iii sem fixação ou mais recente. Detalhes de implementação estão em `src/cli.ts` (veja `runUpgrade` na região `src/cli.ts:544-595`). @@ -721,15 +721,15 @@ npm install && npm run build && npm start Isso inicia o agentmemory com um `iii-engine` local se `iii` já estiver instalado, ou cai para Docker Compose se o Docker estiver disponível. REST, streams e o viewer fazem bind em `127.0.0.1` por padrão. -Instale o `iii-engine` manualmente. **O agentmemory atualmente fixa o `iii-engine` em `v0.11.2`**. A `v0.11.6` introduz um novo modelo que faz sandbox de tudo via `iii worker add` que o agentmemory ainda não foi refatorado para usar. O pin sai assim que o refactor cair. Sobrescreva com `AGENTMEMORY_III_VERSION=` se você migrou manualmente para o modelo de sandbox. +Instale o `iii-engine` manualmente. **O agentmemory atualmente fixa o `iii-engine` em `v0.19.7`**, o mesmo release da sua dependência `iii-sdk`; o worker fala o protocolo desse engine, e a 0.20.0 reorganizou a superfície do SDK, então os dois avançam juntos a cada release do agentmemory. Sobrescreva com `AGENTMEMORY_III_VERSION=` se você roda seu próprio engine e sabe que ele corresponde. -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** troque `aarch64-apple-darwin` por `x86_64-apple-darwin` - **Linux x64:** troque por `x86_64-unknown-linux-gnu` - **Linux arm64:** troque por `aarch64-unknown-linux-gnu` -- **Windows:** baixe `iii-x86_64-pc-windows-msvc.zip` de [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2), extraia `iii.exe`, adicione ao PATH +- **Windows:** baixe `iii-x86_64-pc-windows-msvc.zip` de [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7), extraia `iii.exe`, adicione ao PATH -Ou use Docker (o `docker-compose.yml` empacotado puxa `iiidev/iii:0.11.2`). Docs completas: [iii.dev/docs](https://iii.dev/docs). +Ou use Docker (o `docker-compose.yml` empacotado puxa `iiidev/iii:0.19.7`). Docs completas: [iii.dev/docs](https://iii.dev/docs). ### Windows @@ -738,9 +738,9 @@ agentmemory roda em Windows 10/11, mas só o pacote Node.js não é suficiente; **Opção A: binário Windows pré-compilado (recomendado)** ```powershell -# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser -# (we pin to v0.11.2 until agentmemory refactors for the new sandbox -# model that engine v0.11.6+ requires) +# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 in your browser +# (agentmemory pins the engine to the same release as its iii-sdk; +# v0.19.7 is the current pair) # 2. Download iii-x86_64-pc-windows-msvc.zip # (or iii-aarch64-pc-windows-msvc.zip if you're on an ARM machine) # 3. Extract iii.exe somewhere on PATH, or place it at: @@ -748,7 +748,7 @@ agentmemory roda em Windows 10/11, mas só o pacote Node.js não é suficiente; # (agentmemory checks that location automatically) # 4. Verify: iii --version -# Should print: 0.11.2 +# Should print: 0.19.7 # 5. Then run agentmemory as usual: npx -y @agentmemory/agentmemory @@ -780,7 +780,7 @@ npx -y @agentmemory/mcp | Conflito de porta | `netstat -ano \| findstr :3111` para ver o que está em bind, mate o processo ou use `--port ` | | Fallback do Docker é pulado mesmo com Docker instalado | Confira se o Docker Desktop está de fato rodando (ícone na bandeja do sistema) | -> Nota: o **engine** iii é um binário pré-compilado, não um crate do cargo, então não tente instalá-lo com `cargo install`. (Os **SDKs** do iii são publicados no crates.io, npm e PyPI, mas o agentmemory não precisa deles.) Métodos de instalação do engine suportados, todos fixados em v0.11.2: o binário pré-compilado v0.11.2 acima, o script de instalação `sh` upstream **com a fixação de versão** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux) e a imagem Docker `iiidev/iii:0.11.2`. Um simples `install.sh | sh` instala o engine **mais recente**, que o agentmemory não suporta; sempre passe `VERSION=0.11.2`. O mais fácil de tudo: basta rodar `npx @agentmemory/agentmemory`, que busca o engine fixado em `~/.agentmemory/bin` para você. +> Nota: o **engine** iii é um binário pré-compilado, não um crate do cargo, então não tente instalá-lo com `cargo install`. (Os **SDKs** do iii são publicados no crates.io, npm e PyPI, mas o agentmemory não precisa deles.) Métodos de instalação do engine suportados, todos fixados em v0.19.7: o binário pré-compilado v0.19.7 acima, o script de instalação `sh` upstream **com a fixação de versão** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux) e a imagem Docker `iiidev/iii:0.19.7`. Um simples `install.sh | sh` instala o engine **mais recente**, que o agentmemory não suporta; sempre passe `VERSION=0.19.7`. O mais fácil de tudo: basta rodar `npx @agentmemory/agentmemory`, que busca o engine fixado em `~/.agentmemory/bin` para você. --- diff --git a/READMEs/README.ru-RU.md b/READMEs/README.ru-RU.md index 0e6f43df53..1c349f591f 100644 --- a/READMEs/README.ru-RU.md +++ b/READMEs/README.ru-RU.md @@ -124,7 +124,7 @@ npx кеширует пакеты по версиям. Принудительн
Уже запущен собственный движок iii -agentmemory закреплён на iii-engine v0.11.2 и не подключится к другой версии (воркер не умеет говорить на протоколе другого движка). Остановите другой движок и запустите `npx -y @agentmemory/agentmemory@latest` — он установит и запустит закреплённый v0.11.2 в `~/.agentmemory/bin`, не трогая ваш собственный `iii`. +agentmemory закреплён на iii-engine v0.19.7 и не подключится к другой версии (воркер не умеет говорить на протоколе другого движка). Остановите другой движок и запустите `npx -y @agentmemory/agentmemory@latest` — он установит и запустит закреплённый v0.19.7 в `~/.agentmemory/bin`, не трогая ваш собственный `iii`.
@@ -463,7 +463,7 @@ npx @agentmemory/agentmemory

Быстрый старт

-Совместимость: этот релиз нацелен на стабильный `iii-sdk` `^0.11.0` и iii-engine v0.11.x. +Совместимость: этот релиз нацелен на `iii-sdk` 0.19.7 и закрепляет iii-engine v0.19.7. ### Попробуйте за 30 секунд @@ -517,7 +517,7 @@ npx @agentmemory/agentmemory import-jsonl ~/.claude/projects/-my-project/abc123. npx @agentmemory/agentmemory upgrade ``` -Внимание: команда меняет текущее рабочее окружение / runtime. Она может обновлять JavaScript-зависимости и стянуть закреплённый Docker-образ `iiidev/iii:0.11.2`. Она никогда не устанавливает незакреплённый или более новый движок iii. +Внимание: команда меняет текущее рабочее окружение / runtime. Она может обновлять JavaScript-зависимости и стянуть закреплённый Docker-образ `iiidev/iii:0.19.7`. Она никогда не устанавливает незакреплённый или более новый движок iii. Детали реализации — в `src/cli.ts` (см. `runUpgrade` в районе `src/cli.ts:544-595`). @@ -721,15 +721,15 @@ npm install && npm run build && npm start Это поднимает agentmemory с локальным `iii-engine`, если `iii` уже установлен, либо откатывается к Docker Compose, если есть Docker. REST, стримы и просмотрщик по умолчанию слушают на `127.0.0.1`. -Установите `iii-engine` вручную. **agentmemory сейчас зафиксирован на `iii-engine` `v0.11.2`** — `v0.11.6` вводит новую модель «всё через `iii worker add` в sandbox», под которую agentmemory ещё не отрефакторен. Закрепление снимется, как только рефакторинг будет завершён. Переопределите через `AGENTMEMORY_III_VERSION=`, если вы вручную перешли на sandbox-модель. +Установите `iii-engine` вручную. **agentmemory сейчас зафиксирован на `iii-engine` `v0.19.7`** — той же версии, что и его зависимость `iii-sdk`; воркер говорит на wire-протоколе именно этого движка, а 0.20.0 перестроил поверхность SDK, поэтому оба обновляются вместе в релизах agentmemory. Переопределите через `AGENTMEMORY_III_VERSION=`, если запускаете собственный движок и уверены, что версии совпадают. -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** замените `aarch64-apple-darwin` на `x86_64-apple-darwin` - **Linux x64:** замените на `x86_64-unknown-linux-gnu` - **Linux arm64:** замените на `aarch64-unknown-linux-gnu` -- **Windows:** скачайте `iii-x86_64-pc-windows-msvc.zip` из [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2), распакуйте `iii.exe`, добавьте в PATH +- **Windows:** скачайте `iii-x86_64-pc-windows-msvc.zip` из [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7), распакуйте `iii.exe`, добавьте в PATH -Либо используйте Docker (входящий в комплект `docker-compose.yml` тянет `iiidev/iii:0.11.2`). Полная документация: [iii.dev/docs](https://iii.dev/docs). +Либо используйте Docker (входящий в комплект `docker-compose.yml` тянет `iiidev/iii:0.19.7`). Полная документация: [iii.dev/docs](https://iii.dev/docs). ### Windows @@ -738,9 +738,9 @@ agentmemory работает на Windows 10/11, но одного Node.js-па **Вариант A: готовый Windows-бинарь (рекомендуется)** ```powershell -# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser -# (we pin to v0.11.2 until agentmemory refactors for the new sandbox -# model that engine v0.11.6+ requires) +# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 in your browser +# (agentmemory pins the engine to the same release as its iii-sdk; +# v0.19.7 is the current pair) # 2. Download iii-x86_64-pc-windows-msvc.zip # (or iii-aarch64-pc-windows-msvc.zip if you're on an ARM machine) # 3. Extract iii.exe somewhere on PATH, or place it at: @@ -748,7 +748,7 @@ agentmemory работает на Windows 10/11, но одного Node.js-па # (agentmemory checks that location automatically) # 4. Verify: iii --version -# Should print: 0.11.2 +# Should print: 0.19.7 # 5. Then run agentmemory as usual: npx -y @agentmemory/agentmemory @@ -780,7 +780,7 @@ npx -y @agentmemory/mcp | Конфликт порта | `netstat -ano \| findstr :3111`, чтобы понять, что занимает порт, затем убить процесс или использовать `--port ` | | Откат на Docker пропускается, хотя Docker установлен | Убедитесь, что Docker Desktop действительно запущен (иконка в трее) | -> Примечание: **движок** iii — это готовый бинарь, а не cargo-крейт, не пытайтесь установить его через `cargo install`. (**SDK** iii опубликованы на crates.io, npm и PyPI, но agentmemory они не нужны.) Поддерживаемые способы установки движка, все закреплены на v0.11.2: готовый бинарь v0.11.2 выше, upstream-`sh`-скрипт **с закреплением версии** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux) и Docker-образ `iiidev/iii:0.11.2`. Простой `install.sh | sh` устанавливает **последний** движок, который agentmemory не поддерживает, — всегда передавайте `VERSION=0.11.2`. Самый простой вариант: просто запустите `npx @agentmemory/agentmemory`, который сам загрузит закреплённый движок в `~/.agentmemory/bin`. +> Примечание: **движок** iii — это готовый бинарь, а не cargo-крейт, не пытайтесь установить его через `cargo install`. (**SDK** iii опубликованы на crates.io, npm и PyPI, но agentmemory они не нужны.) Поддерживаемые способы установки движка, все закреплены на v0.19.7: готовый бинарь v0.19.7 выше, upstream-`sh`-скрипт **с закреплением версии** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux) и Docker-образ `iiidev/iii:0.19.7`. Простой `install.sh | sh` устанавливает **последний** движок, который agentmemory не поддерживает, — всегда передавайте `VERSION=0.19.7`. Самый простой вариант: просто запустите `npx @agentmemory/agentmemory`, который сам загрузит закреплённый движок в `~/.agentmemory/bin`. --- diff --git a/READMEs/README.tr-TR.md b/READMEs/README.tr-TR.md index 90544a2668..1c122190db 100644 --- a/READMEs/README.tr-TR.md +++ b/READMEs/README.tr-TR.md @@ -124,7 +124,7 @@ npx sürüm bazında önbelleğe alır. En güncelini `npx -y @agentmemory/agent
Zaten kendi iii engine'inizi çalıştırıyorsanız -agentmemory iii-engine'i v0.11.2'ye sabitler ve farklı bir sürüme bağlanmaz (worker başka bir engine'in protokolünü konuşamaz). Diğer engine'i durdurun, ardından `npx -y @agentmemory/agentmemory@latest` çalıştırın. Sabitlenmiş v0.11.2'yi `~/.agentmemory/bin` içine kurup çalıştırır ve kendi `iii`'nizi olduğu gibi bırakır. +agentmemory iii-engine'i v0.19.7'ye sabitler ve farklı bir sürüme bağlanmaz (worker başka bir engine'in protokolünü konuşamaz). Diğer engine'i durdurun, ardından `npx -y @agentmemory/agentmemory@latest` çalıştırın. Sabitlenmiş v0.19.7'yi `~/.agentmemory/bin` içine kurup çalıştırır ve kendi `iii`'nizi olduğu gibi bırakır.
@@ -463,7 +463,7 @@ Bunların hiçbiri kodlama-ajanı hook'larından otomatik yakalama yapmaz, yerel

Quick Start

-Uyumluluk: bu sürüm kararlı `iii-sdk` `^0.11.0` ve iii-engine v0.11.x'i hedefler. +Uyumluluk: bu sürüm `iii-sdk` 0.19.7'yi hedefler ve iii-engine'i v0.19.7'ye sabitler. ### 30 saniyede deneyin @@ -515,7 +515,7 @@ Yerel runtime'ınızı bilinçli olarak güncellemek istediğinizde bakım komut npx @agentmemory/agentmemory upgrade ``` -Uyarı: bu komut mevcut çalışma alanını/runtime'ı değiştirir. JavaScript bağımlılıklarını güncelleyebilir ve sabitlenmiş `iiidev/iii:0.11.2` Docker imajını çekebilir. Asla sabitlenmemiş ya da daha yeni bir iii motoru kurmaz. +Uyarı: bu komut mevcut çalışma alanını/runtime'ı değiştirir. JavaScript bağımlılıklarını güncelleyebilir ve sabitlenmiş `iiidev/iii:0.19.7` Docker imajını çekebilir. Asla sabitlenmemiş ya da daha yeni bir iii motoru kurmaz. Uygulama detayları `src/cli.ts` içinde (`src/cli.ts:544-595` bölgesi civarında `runUpgrade`'a bakın). @@ -719,15 +719,15 @@ npm install && npm run build && npm start Bu, `iii` zaten kuruluysa yerel bir `iii-engine` ile agentmemory'yi başlatır veya Docker mevcutsa Docker Compose'a düşer. REST, stream'ler ve görüntüleyici varsayılan olarak `127.0.0.1`'e bağlanır. -`iii-engine`'i manuel olarak kurun. **agentmemory şu anda `iii-engine`'i `v0.11.2`'ye sabitliyor**. `v0.11.6`, agentmemory'nin henüz refactor edilmediği yeni bir sandbox-her-şey-üzerinden-`iii worker add` modelini tanıtıyor. Refactor geldiğinde sabitleme kaldırılır. Sandbox modeline manuel olarak geçtiyseniz `AGENTMEMORY_III_VERSION=` ile override edin. +`iii-engine`'i manuel olarak kurun. **agentmemory şu anda `iii-engine`'i `v0.19.7`'ye sabitliyor**; bu, `iii-sdk` bağımlılığıyla aynı sürümdür. Worker tam olarak o engine'in wire protokolünü konuşur ve 0.20.0 SDK yüzeyini yeniden düzenlediği için ikisi agentmemory sürümlerinde birlikte yükseltilir. Kendi engine'inizi çalıştırıyor ve eşleştiğinden eminseniz `AGENTMEMORY_III_VERSION=` ile geçersiz kılın. -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** `aarch64-apple-darwin`'i `x86_64-apple-darwin` ile değiştirin - **Linux x64:** `x86_64-unknown-linux-gnu` ile değiştirin - **Linux arm64:** `aarch64-unknown-linux-gnu` ile değiştirin -- **Windows:** [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2)'den `iii-x86_64-pc-windows-msvc.zip`'i indirin, `iii.exe`'yi çıkarın, PATH'e ekleyin +- **Windows:** [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7)'den `iii-x86_64-pc-windows-msvc.zip`'i indirin, `iii.exe`'yi çıkarın, PATH'e ekleyin -Veya Docker kullanın (paketli `docker-compose.yml` `iiidev/iii:0.11.2`'yi çeker). Tam dokümanlar: [iii.dev/docs](https://iii.dev/docs). +Veya Docker kullanın (paketli `docker-compose.yml` `iiidev/iii:0.19.7`'yi çeker). Tam dokümanlar: [iii.dev/docs](https://iii.dev/docs). ### Windows @@ -736,9 +736,9 @@ agentmemory Windows 10/11'de çalışır, ancak yalnızca Node.js paketi yeterli **Seçenek A: önceden derlenmiş Windows ikiliği (önerilen)** ```powershell -# 1. Tarayıcınızda https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 açın -# (engine v0.11.6+'nın gerektirdiği yeni sandbox modeli için -# agentmemory refactor edilene kadar v0.11.2'ye sabitliyoruz) +# 1. Tarayıcınızda https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 açın +# (agentmemory, engine'i iii-sdk ile aynı sürüme sabitler; +# mevcut çift v0.19.7) # 2. iii-x86_64-pc-windows-msvc.zip indirin # (veya ARM makinedeyseniz iii-aarch64-pc-windows-msvc.zip) # 3. iii.exe'yi PATH'te bir yere çıkarın veya şuraya yerleştirin: @@ -746,7 +746,7 @@ agentmemory Windows 10/11'de çalışır, ancak yalnızca Node.js paketi yeterli # (agentmemory bu konumu otomatik kontrol eder) # 4. Doğrulayın: iii --version -# Şunu yazmalı: 0.11.2 +# Şunu yazmalı: 0.19.7 # 5. Ardından agentmemory'yi her zamanki gibi çalıştırın: npx -y @agentmemory/agentmemory @@ -778,7 +778,7 @@ npx -y @agentmemory/mcp | Port çakışması | `netstat -ano \| findstr :3111` ile neyin bağlı olduğunu görün, ardından öldürün veya `--port ` kullanın | | Docker kurulu olsa bile Docker fallback atlanıyor | Docker Desktop'ın gerçekten çalıştığından emin olun (sistem tepsisi simgesi) | -> Not: iii **motoru** önceden derlenmiş bir ikiliktir, bir cargo crate'i değildir, bu yüzden onu `cargo install` ile kurmaya çalışmayın. (iii **SDK'ları** crates.io, npm ve PyPI'de yayımlanmıştır, ancak agentmemory bunlara ihtiyaç duymaz.) Desteklenen motor kurulum yöntemleri, hepsi v0.11.2'ye sabitlenmiştir: yukarıdaki önceden derlenmiş v0.11.2 ikiliği, sürüm sabitlemesi **ile** upstream `sh` kurulum scripti `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux) ve Docker imajı `iiidev/iii:0.11.2`. Yalın bir `install.sh | sh`, agentmemory'nin desteklemediği **en son** motoru kurar; her zaman `VERSION=0.11.2` geçirin. Hepsinden kolayı: sadece `npx @agentmemory/agentmemory` çalıştırın; bu, sabitlenmiş motoru sizin için `~/.agentmemory/bin` dizinine indirir. +> Not: iii **motoru** önceden derlenmiş bir ikiliktir, bir cargo crate'i değildir, bu yüzden onu `cargo install` ile kurmaya çalışmayın. (iii **SDK'ları** crates.io, npm ve PyPI'de yayımlanmıştır, ancak agentmemory bunlara ihtiyaç duymaz.) Desteklenen motor kurulum yöntemleri, hepsi v0.19.7'ye sabitlenmiştir: yukarıdaki önceden derlenmiş v0.19.7 ikiliği, sürüm sabitlemesi **ile** upstream `sh` kurulum scripti `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh` (macOS/Linux) ve Docker imajı `iiidev/iii:0.19.7`. Yalın bir `install.sh | sh`, agentmemory'nin desteklemediği **en son** motoru kurar; her zaman `VERSION=0.19.7` geçirin. Hepsinden kolayı: sadece `npx @agentmemory/agentmemory` çalıştırın; bu, sabitlenmiş motoru sizin için `~/.agentmemory/bin` dizinine indirir. --- diff --git a/READMEs/README.zh-CN.md b/READMEs/README.zh-CN.md index bac81588f2..1030e02d42 100644 --- a/READMEs/README.zh-CN.md +++ b/READMEs/README.zh-CN.md @@ -124,7 +124,7 @@ npx 会按版本缓存。用 `npx -y @agentmemory/agentmemory@latest` 强制拉
已在运行自己的 iii 引擎 -agentmemory 固定 iii-engine v0.11.2,不会挂接到其他版本(worker 无法使用其他引擎的协议)。停止另一个引擎,然后运行 `npx -y @agentmemory/agentmemory@latest`。它会在 `~/.agentmemory/bin` 安装并运行固定的 v0.11.2,不动你自己的 `iii`。 +agentmemory 固定 iii-engine v0.19.7,不会挂接到其他版本(worker 无法使用其他引擎的协议)。停止另一个引擎,然后运行 `npx -y @agentmemory/agentmemory@latest`。它会在 `~/.agentmemory/bin` 安装并运行固定的 v0.19.7,不动你自己的 `iii`。
@@ -463,7 +463,7 @@ npx @agentmemory/agentmemory

Quick Start

-兼容性:此版本面向稳定的 `iii-sdk` `^0.11.0` 和 iii-engine v0.11.x。 +兼容性:此版本面向 `iii-sdk` 0.19.7,并将 iii-engine 固定在 v0.19.7。 ### 30 秒体验 @@ -515,7 +515,7 @@ npx @agentmemory/agentmemory import-jsonl ~/.claude/projects/-my-project/abc123. npx @agentmemory/agentmemory upgrade ``` -警告:此命令会变更当前工作空间/运行时。它可能更新 JavaScript 依赖,并拉取固定版本的 Docker 镜像 `iiidev/iii:0.11.2`。它绝不会安装未固定版本或更新的 iii 引擎。 +警告:此命令会变更当前工作空间/运行时。它可能更新 JavaScript 依赖,并拉取固定版本的 Docker 镜像 `iiidev/iii:0.19.7`。它绝不会安装未固定版本或更新的 iii 引擎。 实现细节见 `src/cli.ts`(参考 `src/cli.ts:544-595` 附近的 `runUpgrade`)。 @@ -720,15 +720,15 @@ npm install && npm run build && npm start 如果已经安装 `iii`,这会以本地 `iii-engine` 启动 agentmemory;如果 Docker 可用,则回退到 Docker Compose。REST、流和查看器默认绑定到 `127.0.0.1`。 -手动安装 `iii-engine`。**agentmemory 当前将 `iii-engine` 固定在 `v0.11.2`**。`v0.11.6` 引入了新的「通过 `iii worker add` 沙盒化一切」模型,agentmemory 尚未为此重构。重构落地后即解除固定。如果你已经手动迁移到沙盒模型,可用 `AGENTMEMORY_III_VERSION=` 覆盖。 +手动安装 `iii-engine`。**agentmemory 当前将 `iii-engine` 固定在 `v0.19.7`**,与其 `iii-sdk` 依赖是同一个版本;worker 使用的是该引擎的 wire 协议,而 0.20.0 重组了 SDK 接口,因此两者在 agentmemory 的每个版本中一起升级。如果你运行自己的引擎并确定版本匹配,可用 `AGENTMEMORY_III_VERSION=` 覆盖。 -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** 把 `aarch64-apple-darwin` 换成 `x86_64-apple-darwin` - **Linux x64:** 换成 `x86_64-unknown-linux-gnu` - **Linux arm64:** 换成 `aarch64-unknown-linux-gnu` -- **Windows:** 从 [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2) 下载 `iii-x86_64-pc-windows-msvc.zip`,提取 `iii.exe`,加入 PATH +- **Windows:** 从 [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7) 下载 `iii-x86_64-pc-windows-msvc.zip`,提取 `iii.exe`,加入 PATH -或使用 Docker(捆绑的 `docker-compose.yml` 会拉取 `iiidev/iii:0.11.2`)。完整文档:[iii.dev/docs](https://iii.dev/docs)。 +或使用 Docker(捆绑的 `docker-compose.yml` 会拉取 `iiidev/iii:0.19.7`)。完整文档:[iii.dev/docs](https://iii.dev/docs)。 ### Windows @@ -737,9 +737,9 @@ agentmemory 可在 Windows 10/11 运行,但仅 Node.js 包不够;你还需要 `i **选项 A:预构建 Windows 二进制(推荐)** ```powershell -# 1. 在浏览器打开 https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 -# (我们固定在 v0.11.2,直到 agentmemory 为 v0.11.6+ 引擎要求的 -# 新沙盒模型完成重构) +# 1. 在浏览器打开 https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 +# (agentmemory 将引擎固定在与其 iii-sdk 相同的版本; +# 当前配对为 v0.19.7) # 2. 下载 iii-x86_64-pc-windows-msvc.zip # (如果是 ARM 机器则下载 iii-aarch64-pc-windows-msvc.zip) # 3. 把 iii.exe 解压到 PATH 上的某处,或放在: @@ -747,7 +747,7 @@ agentmemory 可在 Windows 10/11 运行,但仅 Node.js 包不够;你还需要 `i # (agentmemory 会自动检查该位置) # 4. 验证: iii --version -# 应输出:0.11.2 +# 应输出:0.19.7 # 5. 然后照常运行 agentmemory: npx -y @agentmemory/agentmemory @@ -779,7 +779,7 @@ npx -y @agentmemory/mcp | 端口冲突 | `netstat -ano \| findstr :3111` 查看占用,然后 kill 或用 `--port ` | | Docker 已安装但仍跳过回退 | 确保 Docker Desktop 确实在运行(系统托盘图标) | -> 注意:iii **引擎** 是预构建的二进制文件,而非 cargo crate,所以不要尝试用 `cargo install` 安装它。(iii 的 **SDK** 确实已发布到 crates.io、npm 和 PyPI,但 agentmemory 并不需要它们。)受支持的引擎安装方式均固定为 v0.11.2:上面的预构建 v0.11.2 二进制、**带版本固定** 的上游 `sh` 安装脚本 `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh`(macOS/Linux),以及 Docker 镜像 `iiidev/iii:0.11.2`。直接运行 `install.sh | sh` 会安装 **最新** 引擎,而 agentmemory 不支持该版本;请务必传入 `VERSION=0.11.2`。最简单的方式:直接运行 `npx @agentmemory/agentmemory`,它会为你把固定版本的引擎获取到 `~/.agentmemory/bin`。 +> 注意:iii **引擎** 是预构建的二进制文件,而非 cargo crate,所以不要尝试用 `cargo install` 安装它。(iii 的 **SDK** 确实已发布到 crates.io、npm 和 PyPI,但 agentmemory 并不需要它们。)受支持的引擎安装方式均固定为 v0.19.7:上面的预构建 v0.19.7 二进制、**带版本固定** 的上游 `sh` 安装脚本 `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh`(macOS/Linux),以及 Docker 镜像 `iiidev/iii:0.19.7`。直接运行 `install.sh | sh` 会安装 **最新** 引擎,而 agentmemory 不支持该版本;请务必传入 `VERSION=0.19.7`。最简单的方式:直接运行 `npx @agentmemory/agentmemory`,它会为你把固定版本的引擎获取到 `~/.agentmemory/bin`。 --- diff --git a/READMEs/README.zh-TW.md b/READMEs/README.zh-TW.md index 9d89496377..80ea3af89f 100644 --- a/READMEs/README.zh-TW.md +++ b/READMEs/README.zh-TW.md @@ -124,7 +124,7 @@ npx 會依版本快取。用 `npx -y @agentmemory/agentmemory@latest` 強制使
已在執行你自己的 iii 引擎 -agentmemory 把 iii-engine 釘在 v0.11.2,不會附掛到其他版本(worker 無法使用另一個引擎的協定)。停止另一個引擎,然後執行 `npx -y @agentmemory/agentmemory@latest`。它會在 `~/.agentmemory/bin` 安裝並執行釘住的 v0.11.2,不動你自己的 `iii`。 +agentmemory 把 iii-engine 釘在 v0.19.7,不會附掛到其他版本(worker 無法使用另一個引擎的協定)。停止另一個引擎,然後執行 `npx -y @agentmemory/agentmemory@latest`。它會在 `~/.agentmemory/bin` 安裝並執行釘住的 v0.19.7,不動你自己的 `iii`。
@@ -463,7 +463,7 @@ npx @agentmemory/agentmemory

Quick Start

-相容性:此版本面向穩定的 `iii-sdk` `^0.11.0` 和 iii-engine v0.11.x。 +相容性:此版本面向 `iii-sdk` 0.19.7,並將 iii-engine 釘在 v0.19.7。 ### 30 秒體驗 @@ -515,7 +515,7 @@ npx @agentmemory/agentmemory import-jsonl ~/.claude/projects/-my-project/abc123. npx @agentmemory/agentmemory upgrade ``` -警告:此指令會變更目前工作區/執行階段。它可能更新 JavaScript 相依,並拉取固定版本的 Docker 鏡像 `iiidev/iii:0.11.2`。它絕不會安裝未固定版本或更新的 iii 引擎。 +警告:此指令會變更目前工作區/執行階段。它可能更新 JavaScript 相依,並拉取固定版本的 Docker 鏡像 `iiidev/iii:0.19.7`。它絕不會安裝未固定版本或更新的 iii 引擎。 實作細節見 `src/cli.ts`(參考 `src/cli.ts:544-595` 附近的 `runUpgrade`)。 @@ -720,15 +720,15 @@ npm install && npm run build && npm start 若 `iii` 已安裝,這會以本地 `iii-engine` 啟動 agentmemory;若 Docker 可用,則回退到 Docker Compose。REST、串流和檢視器預設繫結到 `127.0.0.1`。 -手動安裝 `iii-engine`。**agentmemory 目前把 `iii-engine` 釘在 `v0.11.2`**。`v0.11.6` 引入了新的「透過 `iii worker add` 沙盒化一切」模型,agentmemory 尚未為此重構。重構落地後即解除釘版。若你已手動遷移到沙盒模型,可用 `AGENTMEMORY_III_VERSION=` 覆寫。 +手動安裝 `iii-engine`。**agentmemory 目前把 `iii-engine` 釘在 `v0.19.7`**,與其 `iii-sdk` 相依是同一個版本;worker 使用該引擎的 wire 協定,而 0.20.0 重組了 SDK 介面,因此兩者在 agentmemory 的每個版本中一起升級。若你執行自己的引擎並確定版本相符,可用 `AGENTMEMORY_III_VERSION=` 覆寫。 -- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` +- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii` - **macOS x64:** 把 `aarch64-apple-darwin` 換成 `x86_64-apple-darwin` - **Linux x64:** 換成 `x86_64-unknown-linux-gnu` - **Linux arm64:** 換成 `aarch64-unknown-linux-gnu` -- **Windows:** 從 [iii-hq/iii releases v0.11.2](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2) 下載 `iii-x86_64-pc-windows-msvc.zip`,擷取 `iii.exe`,加入 PATH +- **Windows:** 從 [iii-hq/iii releases v0.19.7](https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7) 下載 `iii-x86_64-pc-windows-msvc.zip`,擷取 `iii.exe`,加入 PATH -或使用 Docker(捆綁的 `docker-compose.yml` 會拉取 `iiidev/iii:0.11.2`)。完整文件:[iii.dev/docs](https://iii.dev/docs)。 +或使用 Docker(捆綁的 `docker-compose.yml` 會拉取 `iiidev/iii:0.19.7`)。完整文件:[iii.dev/docs](https://iii.dev/docs)。 ### Windows @@ -737,9 +737,9 @@ agentmemory 可在 Windows 10/11 執行,但僅 Node.js 套件不夠;你還需要 **選項 A:預建 Windows 二進位(推薦)** ```powershell -# 1. 在瀏覽器打開 https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 -# (我們釘在 v0.11.2,直到 agentmemory 為 v0.11.6+ 引擎需求的 -# 新沙盒模型完成重構) +# 1. 在瀏覽器打開 https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.19.7 +# (agentmemory 將引擎釘在與其 iii-sdk 相同的版本; +# 目前配對為 v0.19.7) # 2. 下載 iii-x86_64-pc-windows-msvc.zip # (若是 ARM 機器則下載 iii-aarch64-pc-windows-msvc.zip) # 3. 把 iii.exe 解壓到 PATH 上的某處,或放在: @@ -747,7 +747,7 @@ agentmemory 可在 Windows 10/11 執行,但僅 Node.js 套件不夠;你還需要 # (agentmemory 會自動檢查該位置) # 4. 驗證: iii --version -# 應輸出:0.11.2 +# 應輸出:0.19.7 # 5. 然後照常執行 agentmemory: npx -y @agentmemory/agentmemory @@ -779,7 +779,7 @@ npx -y @agentmemory/mcp | 連接埠衝突 | `netstat -ano \| findstr :3111` 查看佔用,然後 kill 或用 `--port ` | | Docker 已安裝但仍跳過回退 | 確保 Docker Desktop 確實在執行(系統匣圖示) | -> 注意:iii **引擎** 是預建的二進位檔,而非 cargo crate,請勿嘗試以 `cargo install` 安裝它。(iii 的 **SDK** 確實已發布到 crates.io、npm 和 PyPI,但 agentmemory 並不需要它們。)受支援的引擎安裝方式皆固定為 v0.11.2:上述預建的 v0.11.2 二進位、**帶版本固定** 的上游 `sh` 安裝指令稿 `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh`(macOS/Linux),以及 Docker 鏡像 `iiidev/iii:0.11.2`。直接執行 `install.sh | sh` 會安裝 **最新** 引擎,而 agentmemory 並不支援該版本;請務必傳入 `VERSION=0.11.2`。最簡單的方式:直接執行 `npx @agentmemory/agentmemory`,它會為你把固定版本的引擎取得到 `~/.agentmemory/bin`。 +> 注意:iii **引擎** 是預建的二進位檔,而非 cargo crate,請勿嘗試以 `cargo install` 安裝它。(iii 的 **SDK** 確實已發布到 crates.io、npm 和 PyPI,但 agentmemory 並不需要它們。)受支援的引擎安裝方式皆固定為 v0.19.7:上述預建的 v0.19.7 二進位、**帶版本固定** 的上游 `sh` 安裝指令稿 `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.19.7 sh`(macOS/Linux),以及 Docker 鏡像 `iiidev/iii:0.19.7`。直接執行 `install.sh | sh` 會安裝 **最新** 引擎,而 agentmemory 並不支援該版本;請務必傳入 `VERSION=0.19.7`。最簡單的方式:直接執行 `npx @agentmemory/agentmemory`,它會為你把固定版本的引擎取得到 `~/.agentmemory/bin`。 --- diff --git a/deploy/coolify/Dockerfile b/deploy/coolify/Dockerfile index c0a6bb6c9c..0e7fbad9c2 100644 --- a/deploy/coolify/Dockerfile +++ b/deploy/coolify/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.11.2 +ARG III_VERSION=0.19.7 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.11.2 -ARG III_SDK_VERSION=0.11.2 +ARG III_VERSION=0.19.7 +ARG III_SDK_VERSION=0.19.7 RUN 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.yml index b34823dbc6..5df586962c 100644 --- a/deploy/coolify/docker-compose.yml +++ b/deploy/coolify/docker-compose.yml @@ -5,8 +5,8 @@ services: dockerfile: Dockerfile args: AGENTMEMORY_VERSION: "0.9.29" - III_VERSION: "0.11.2" - III_SDK_VERSION: "0.11.2" + III_VERSION: "0.19.7" + III_SDK_VERSION: "0.19.7" restart: unless-stopped environment: SERVICE_FQDN_AGENTMEMORY_3111: ${SERVICE_FQDN_AGENTMEMORY_3111} diff --git a/deploy/fly/Dockerfile b/deploy/fly/Dockerfile index e094699881..e40cf53c93 100644 --- a/deploy/fly/Dockerfile +++ b/deploy/fly/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.11.2 +ARG III_VERSION=0.19.7 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.11.2 -ARG III_SDK_VERSION=0.11.2 +ARG III_VERSION=0.19.7 +ARG III_SDK_VERSION=0.19.7 RUN apt-get update \ && apt-get install -y --no-install-recommends openssl ca-certificates tini gosu curl \ @@ -15,11 +15,9 @@ RUN apt-get update \ COPY --from=iii-image /app/iii /usr/local/bin/iii # Install agentmemory into a dedicated prefix so the local package.json's -# `overrides` field pins iii-sdk down to match the engine (agentmemory's -# caret range `^0.11.2` otherwise resolves to 0.11.6, the version that -# requires the new sandbox-everything worker model the agentmemory CLI -# is not refactored for yet). `npm install -g` ignores overrides, hence -# the local prefix. +# `overrides` field pins iii-sdk to the exact engine release in this image +# (the worker speaks that engine's wire protocol, so the two must match). +# `npm install -g` ignores overrides, hence the local prefix. WORKDIR /opt/agentmemory RUN printf '{"name":"agentmemory-deploy","version":"1.0.0","private":true,"overrides":{"iii-sdk":"%s"}}\n' "${III_SDK_VERSION}" > package.json \ && npm install "@agentmemory/agentmemory@${AGENTMEMORY_VERSION}" --omit=optional --no-fund --no-audit \ diff --git a/deploy/railway/Dockerfile b/deploy/railway/Dockerfile index e094699881..e40cf53c93 100644 --- a/deploy/railway/Dockerfile +++ b/deploy/railway/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.11.2 +ARG III_VERSION=0.19.7 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.11.2 -ARG III_SDK_VERSION=0.11.2 +ARG III_VERSION=0.19.7 +ARG III_SDK_VERSION=0.19.7 RUN apt-get update \ && apt-get install -y --no-install-recommends openssl ca-certificates tini gosu curl \ @@ -15,11 +15,9 @@ RUN apt-get update \ COPY --from=iii-image /app/iii /usr/local/bin/iii # Install agentmemory into a dedicated prefix so the local package.json's -# `overrides` field pins iii-sdk down to match the engine (agentmemory's -# caret range `^0.11.2` otherwise resolves to 0.11.6, the version that -# requires the new sandbox-everything worker model the agentmemory CLI -# is not refactored for yet). `npm install -g` ignores overrides, hence -# the local prefix. +# `overrides` field pins iii-sdk to the exact engine release in this image +# (the worker speaks that engine's wire protocol, so the two must match). +# `npm install -g` ignores overrides, hence the local prefix. WORKDIR /opt/agentmemory RUN printf '{"name":"agentmemory-deploy","version":"1.0.0","private":true,"overrides":{"iii-sdk":"%s"}}\n' "${III_SDK_VERSION}" > package.json \ && npm install "@agentmemory/agentmemory@${AGENTMEMORY_VERSION}" --omit=optional --no-fund --no-audit \ diff --git a/deploy/render/Dockerfile b/deploy/render/Dockerfile index e094699881..e40cf53c93 100644 --- a/deploy/render/Dockerfile +++ b/deploy/render/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.11.2 +ARG III_VERSION=0.19.7 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.11.2 -ARG III_SDK_VERSION=0.11.2 +ARG III_VERSION=0.19.7 +ARG III_SDK_VERSION=0.19.7 RUN apt-get update \ && apt-get install -y --no-install-recommends openssl ca-certificates tini gosu curl \ @@ -15,11 +15,9 @@ RUN apt-get update \ COPY --from=iii-image /app/iii /usr/local/bin/iii # Install agentmemory into a dedicated prefix so the local package.json's -# `overrides` field pins iii-sdk down to match the engine (agentmemory's -# caret range `^0.11.2` otherwise resolves to 0.11.6, the version that -# requires the new sandbox-everything worker model the agentmemory CLI -# is not refactored for yet). `npm install -g` ignores overrides, hence -# the local prefix. +# `overrides` field pins iii-sdk to the exact engine release in this image +# (the worker speaks that engine's wire protocol, so the two must match). +# `npm install -g` ignores overrides, hence the local prefix. WORKDIR /opt/agentmemory RUN printf '{"name":"agentmemory-deploy","version":"1.0.0","private":true,"overrides":{"iii-sdk":"%s"}}\n' "${III_SDK_VERSION}" > package.json \ && npm install "@agentmemory/agentmemory@${AGENTMEMORY_VERSION}" --omit=optional --no-fund --no-audit \ diff --git a/deploy/render/render.yaml b/deploy/render/render.yaml index d1871d5795..8d15dd3e4c 100644 --- a/deploy/render/render.yaml +++ b/deploy/render/render.yaml @@ -17,6 +17,6 @@ services: - key: AGENTMEMORY_VERSION value: "0.9.29" - key: III_VERSION - value: "0.11.2" + value: "0.19.7" - key: III_SDK_VERSION - value: "0.11.2" + value: "0.19.7" diff --git a/docker-compose.yml b/docker-compose.yml index 66abc86966..70152ee724 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,16 +18,15 @@ services: restart: "no" iii-engine: - # Pinned to v0.11.2 — the last engine that runs agentmemory's current - # direct-registration worker cleanly. v0.11.6 introduces a new sandbox-everything- - # via-`iii worker add` model that agentmemory hasn't been refactored - # for yet; the architectural mismatch surfaces as EPIPE reconnect - # loops and empty search after save. Bump only after agentmemory is - # refactored to register as a sandboxed worker. + # Pinned to the same release as agentmemory's iii-sdk dependency + # (package.json). The worker speaks this engine's wire protocol, so + # bump the image tag and the SDK together, never one of them alone. + # v0.19.7 is the last engine before the 0.20 SDK reorganization and + # keeps HTTP routes owned by the reconnecting worker. # # Override per-shell or via .env file: - # AGENTMEMORY_III_VERSION=0.11.7 docker compose up - image: iiidev/iii:${AGENTMEMORY_III_VERSION:-0.11.2} + # AGENTMEMORY_III_VERSION=0.19.7 docker compose up + image: iiidev/iii:${AGENTMEMORY_III_VERSION:-0.19.7} user: "${AGENTMEMORY_DOCKER_UID:-65532}:${AGENTMEMORY_DOCKER_GID:-65532}" depends_on: iii-init: diff --git a/eval/README.md b/eval/README.md index 7f29536705..0e274ad040 100644 --- a/eval/README.md +++ b/eval/README.md @@ -26,11 +26,11 @@ source eval/scripts/sandbox.sh npm run eval:coding-life -- --adapters grep,agentmemory ``` -Requires iii v0.11.2 on PATH (agentmemory pin). If you already have a different version installed, install the pinned build into `~/.local/bin` and make sure that directory comes first on `PATH`: +Requires iii v0.19.7 on PATH (agentmemory pin). If you already have a different version installed, install the pinned build into `~/.local/bin` and make sure that directory comes first on `PATH`: ```sh mkdir -p ~/.local/bin -curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin +curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin export PATH="$HOME/.local/bin:$PATH" # add to ~/.zshrc or ~/.bashrc for persistence ``` diff --git a/eval/scripts/sandbox.sh b/eval/scripts/sandbox.sh index 5d4023300f..f192393492 100755 --- a/eval/scripts/sandbox.sh +++ b/eval/scripts/sandbox.sh @@ -14,13 +14,13 @@ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" if ! command -v iii >/dev/null 2>&1; then echo "iii binary not on PATH. Install pinned version:" - echo " curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin" + echo " curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.19.7/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin" exit 1 fi iii_ver=$(iii --version 2>&1 | head -1) -if [[ "$iii_ver" != "0.11.2" ]]; then - echo "warning: iii version on PATH is $iii_ver; agentmemory pins 0.11.2" +if [[ "$iii_ver" != "0.19.7" ]]; then + echo "warning: iii version on PATH is $iii_ver; agentmemory pins 0.19.7" fi if [[ ! -f "$REPO_ROOT/dist/index.mjs" ]]; then diff --git a/package.json b/package.json index ed9b5325d5..7bca837e12 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@anthropic-ai/sdk": "^0.100.1", "@clack/prompts": "^1.2.0", "dotenv": "^17.4.2", - "iii-sdk": "0.11.2", + "iii-sdk": "0.19.7", "picocolors": "^1.1.1", "zod": "^4.0.0" }, diff --git a/src/cli.ts b/src/cli.ts index 1e5fb6b78c..5670e0fee3 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -66,7 +66,10 @@ import { } from "./cli/engine-launch.js"; import { runtimeMetadataPath } from "./runtime-paths.js"; import { createStartupStderrCapture } from "./cli/startup-stderr.js"; -import { renderEngineConfig } from "./cli/engine-config.js"; +import { + clearPersistedBuiltinConfig, + renderEngineConfig, +} from "./cli/engine-config.js"; import { processStatIsRunning } from "./cli/process-state.js"; import { renderSplash } from "./cli/splash.js"; import { isFirstRun, readPrefs, resetPrefs, writePrefs } from "./cli/preferences.js"; @@ -112,18 +115,16 @@ if (args.includes("--version") || args.includes("-V")) { process.exit(0); } -// Pinned iii-engine version. The unpinned `install.iii.dev/iii/main/install.sh` -// script tracks `latest`, which made every fresh agentmemory install pull -// engine 0.11.6 — and 0.11.6 introduces a new sandbox-everything-via- -// `iii worker add` worker model that agentmemory hasn't been refactored -// for yet (the CLI still registers its worker directly through the SDK). The -// architectural mismatch surfaces as EPIPE reconnect loops and empty -// search results after save. Pin to v0.11.2 — the last engine that runs -// agentmemory's current worker model cleanly — until the refactor lands. -// Override env var AGENTMEMORY_III_VERSION lets users on the sandbox -// model already point at a newer engine without us cutting a release. +// Pinned iii-engine version. The engine and the iii-sdk in package.json must +// stay on the same release: the worker speaks that engine's wire protocol and +// the unpinned installer tracks `latest`. 0.19.7 is the last release before +// the 0.20.0 SDK reorganization (ISdk -> IIIClient, helpers package) and the +// first line that keeps HTTP routes owned by the reconnecting worker, which +// stops the REST 404s after an engine reconnect. Bump this constant and the +// package.json dependency together. AGENTMEMORY_III_VERSION overrides the pin +// for anyone running a self-managed engine. const IIPINNED_VERSION = - process.env["AGENTMEMORY_III_VERSION"] || "0.11.2"; + process.env["AGENTMEMORY_III_VERSION"] || "0.19.7"; // Map Node platform/arch → the asset name iii-hq/iii ships under // https://github.com/iii-hq/iii/releases/download/iii/v/ @@ -150,7 +151,7 @@ function iiiReleaseAsset(): string | null { function iiiReleaseUrl(): string | null { const asset = iiiReleaseAsset(); if (!asset) return null; - // Tag name is monorepo-prefixed: `iii/v0.11.2`. Slash is URL-encoded + // Tag name is monorepo-prefixed: `iii/v0.19.7`. Slash is URL-encoded // by GitHub when serving the download path, hence `iii/v...` not `iii%2Fv...`. return `https://github.com/iii-hq/iii/releases/download/iii/v${IIPINNED_VERSION}/${asset}`; } @@ -525,7 +526,7 @@ function whichBinary(name: string): string | null { // isolated from a user-managed iii on PATH or in ~/.local/bin. A // fresh box with iii 0.16.1 already on PATH refused to boot because the // hard-pin enforcer told users to overwrite their global install with -// v0.11.2. Private install resolves the conflict without touching their +// the pinned version. Private install resolves the conflict without touching their // existing iii. function agentmemoryBinDir(): string { if (IS_WINDOWS) { @@ -578,8 +579,8 @@ function iiiBinVersion(binPath: string): string | null { // Resolve a compatible iii binary for the pinned engine version. // // Soft-warn lets the worker boot against a mismatched engine and crash at -// runtime (state::list-not-found on v0.13.0+, sandbox-everything trap on -// v0.11.6+). Hard-pin without a fallback leaves the user stuck — they +// runtime (the SDK and engine wire protocol move together; 0.20+ renamed the +// SDK surface entirely). Hard-pin without a fallback leaves the user stuck — they // either downgrade their global iii (breaking other consumers) or set // AGENTMEMORY_III_VERSION and hope it works. // @@ -1554,6 +1555,12 @@ function prepareEngineLaunch(configPath: string): { const runtimePath = runtimeConfigPath(dataDirResolution.dataDir); mkdirSync(dirname(runtimePath), { recursive: true }); writeFileSync(runtimePath, rewritten, "utf-8"); + const cleared = clearPersistedBuiltinConfig(cwd); + if (cleared.length > 0) { + vlog( + `cleared ${cleared.length} persisted builtin config entries so the rendered runtime config seeds the engine again`, + ); + } if (selectedInstance === 0 && dataDirResolution.source === "default") { for (const m of legacyDataMigrations( process.cwd(), @@ -1965,8 +1972,8 @@ function printReadyHint(consoleState: IiiConsoleState): void { async function main() { await assertRuntimePortOwnership(); // Booting a second instance next to a live daemon registers a duplicate - // worker on the running engine, and on iii 0.11.2 the second instance's - // shutdown tears down the daemon's HTTP trigger routing (every + // worker on the running engine, and before iii 0.19.2 the second instance's + // shutdown tore down the daemon's HTTP trigger routing (every // /agentmemory/* route 404s until a full engine restart). Refuse instead. // A different --instance resolves to a different port, so multi-instance // setups are unaffected. @@ -3177,8 +3184,8 @@ async function runUpgrade() { label: "Refreshing dependencies (pnpm install)", }); requireSuccess(installOk, "pnpm install"); - runCommand(pnpmBin, ["up", "iii-sdk@0.11.2"], { - label: "Pinning iii-sdk@0.11.2", + runCommand(pnpmBin, ["up", `iii-sdk@${IIPINNED_VERSION}`], { + label: `Pinning iii-sdk@${IIPINNED_VERSION}`, optional: true, }); } else if (npmBin) { @@ -3186,8 +3193,8 @@ async function runUpgrade() { label: "Refreshing dependencies (npm install)", }); requireSuccess(installOk, "npm install"); - runCommand(npmBin, ["install", "iii-sdk@0.11.2"], { - label: "Pinning iii-sdk@0.11.2", + runCommand(npmBin, ["install", `iii-sdk@${IIPINNED_VERSION}`], { + label: `Pinning iii-sdk@${IIPINNED_VERSION}`, optional: true, }); } else { diff --git a/src/cli/doctor-diagnostics.ts b/src/cli/doctor-diagnostics.ts index 10d95136d7..bab2fd2919 100644 --- a/src/cli/doctor-diagnostics.ts +++ b/src/cli/doctor-diagnostics.ts @@ -38,7 +38,7 @@ export type DoctorContext = { pidfilePath: string; /** Path to ~/.agentmemory/engine-state.json */ enginePath: string; - /** Pinned engine version (e.g. "0.11.2"). */ + /** Pinned engine version (e.g. "0.19.7"). */ pinnedVersion: string; }; diff --git a/src/cli/engine-config.ts b/src/cli/engine-config.ts index e20484a790..973bcf8fa5 100644 --- a/src/cli/engine-config.ts +++ b/src/cli/engine-config.ts @@ -1,5 +1,34 @@ +import { rmSync } from "node:fs"; import { join } from "node:path"; +const SEEDED_BUILTIN_WORKERS = [ + "iii-http", + "iii-state", + "iii-queue", + "iii-pubsub", + "iii-cron", + "iii-stream", + "iii-observability", + "iii-worker-manager", +]; + +export function persistedBuiltinConfigPaths(engineCwd: string): string[] { + return SEEDED_BUILTIN_WORKERS.map((id) => + join(engineCwd, "data", "configuration", `${id}.yaml`), + ); +} + +export function clearPersistedBuiltinConfig(engineCwd: string): string[] { + const cleared: string[] = []; + for (const path of persistedBuiltinConfigPaths(engineCwd)) { + try { + rmSync(path); + cleared.push(path); + } catch {} + } + return cleared; +} + export interface EngineConfigOptions { dataDir: string; ports?: EngineRuntimePorts; diff --git a/test/cli-second-instance-guard.test.ts b/test/cli-second-instance-guard.test.ts index 1767341570..3336b55912 100644 --- a/test/cli-second-instance-guard.test.ts +++ b/test/cli-second-instance-guard.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from "vitest"; import { readFileSync } from "node:fs"; // A second full instance next to a live daemon registers a duplicate worker -// on the running engine, and on iii 0.11.2 its shutdown tears down the +// on the running engine, and before iii 0.19.2 its shutdown tore down the // daemon's HTTP trigger routing (every /agentmemory/* route 404s until a full // engine restart). Two guards prevent that: unknown subcommands error instead // of falling through to the server boot, and the boot path probes livez and diff --git a/test/engine-config.test.ts b/test/engine-config.test.ts index e929d1fc30..bb227bdabb 100644 --- a/test/engine-config.test.ts +++ b/test/engine-config.test.ts @@ -1,7 +1,12 @@ -import { readFileSync } from "node:fs"; +import { existsSync, mkdirSync, mkdtempSync, readFileSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; import { join } from "node:path"; import { describe, expect, it } from "vitest"; -import { renderEngineConfig } from "../src/cli/engine-config.js"; +import { + clearPersistedBuiltinConfig, + persistedBuiltinConfigPaths, + renderEngineConfig, +} from "../src/cli/engine-config.js"; describe("renderEngineConfig", () => { it("stores engine state in the resolved data directory", () => { @@ -52,3 +57,39 @@ describe("renderEngineConfig", () => { ); }); }); + +describe("clearPersistedBuiltinConfig", () => { + it("lists one persisted entry per seeded builtin under data/configuration", () => { + const paths = persistedBuiltinConfigPaths("/srv/engine"); + + expect(paths).toContain( + join("/srv/engine", "data", "configuration", "iii-http.yaml"), + ); + expect(paths).toContain( + join("/srv/engine", "data", "configuration", "iii-worker-manager.yaml"), + ); + expect(paths.every((p) => p.endsWith(".yaml"))).toBe(true); + }); + + it("removes persisted builtin entries and leaves everything else in place", () => { + const cwd = mkdtempSync(join(tmpdir(), "agentmemory-engine-")); + const dir = join(cwd, "data", "configuration"); + mkdirSync(dir, { recursive: true }); + writeFileSync(join(dir, "iii-http.yaml"), "id: iii-http\nvalue:\n port: 3111\n"); + writeFileSync(join(dir, "iii-state.yaml"), "id: iii-state\nvalue: {}\n"); + writeFileSync(join(dir, "agentmemory.yaml"), "id: agentmemory\nvalue: {}\n"); + + const cleared = clearPersistedBuiltinConfig(cwd); + + expect(cleared).toHaveLength(2); + expect(existsSync(join(dir, "iii-http.yaml"))).toBe(false); + expect(existsSync(join(dir, "iii-state.yaml"))).toBe(false); + expect(existsSync(join(dir, "agentmemory.yaml"))).toBe(true); + }); + + it("is a no-op when the engine has never persisted anything", () => { + const cwd = mkdtempSync(join(tmpdir(), "agentmemory-engine-")); + + expect(clearPersistedBuiltinConfig(cwd)).toEqual([]); + }); +}); From 2bebc90a10800b88dadeeba7d5f9fe258aacc797 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 24 Sep 2026 10:08:19 +0530 Subject: [PATCH 2/6] fix(cli): harden the engine pin follow-ups from review agentmemory upgrade now pins iii-sdk to the version this package was built against instead of whatever AGENTMEMORY_III_VERSION overrides the engine to. A persisted builtin config entry that exists but cannot be removed is surfaced as a warning naming the directory, rather than silently leaving the engine on stale ports; a test covers it. The bundled docker-compose.yml keeps the engine's persisted builtin config on a tmpfs so every container start re-seeds from config.yaml and the III_* env vars, matching the native CLI path. The deploy templates go back to the engine pair of the published npm package; they move together with AGENTMEMORY_VERSION at release time. --- CHANGELOG.md | 2 +- deploy/coolify/Dockerfile | 6 +++--- deploy/coolify/docker-compose.yml | 4 ++-- deploy/fly/Dockerfile | 6 +++--- deploy/railway/Dockerfile | 6 +++--- deploy/render/Dockerfile | 6 +++--- deploy/render/render.yaml | 4 ++-- docker-compose.yml | 9 +++++++++ src/cli.ts | 25 ++++++++++++++++--------- src/cli/engine-config.ts | 7 ++++++- test/engine-config.test.ts | 7 +++++++ 11 files changed, 55 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60e084dd8b..439b2789af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Changed -- **iii engine and `iii-sdk` move from 0.11.2 to 0.19.7.** Same release on both sides, as before; the CLI downloads the pinned engine into `~/.agentmemory/bin`, the bundled `docker-compose.yml` and the deploy templates pull `iiidev/iii:0.19.7`, and `agentmemory upgrade` pins the SDK to the same constant. 0.19.7 is the last engine before the 0.20 SDK reorganization and carries the upstream fix that keeps HTTP routes owned by the reconnecting worker, so `/agentmemory/*` no longer answers 404 after the engine reconnects (#1013). Existing state stores load unchanged. +- **iii engine and `iii-sdk` move from 0.11.2 to 0.19.7.** 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.19.7`, and `agentmemory upgrade` pins the SDK 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.19.7 is the last engine before the 0.20 SDK reorganization and carries the upstream fix that keeps HTTP routes owned by the reconnecting worker, so `/agentmemory/*` no longer answers 404 after the engine reconnects (#1013). 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 into `data/configuration/.yaml` on first boot 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 builtin entries right before it spawns the engine, so the runtime config it renders from your environment is the seed every time. - Dependabot no longer proposes `iii-sdk` bumps; the engine pin and the SDK version are updated together by hand. diff --git a/deploy/coolify/Dockerfile b/deploy/coolify/Dockerfile index 0e7fbad9c2..c0a6bb6c9c 100644 --- a/deploy/coolify/Dockerfile +++ b/deploy/coolify/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.19.7 +ARG III_VERSION=0.11.2 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.19.7 -ARG III_SDK_VERSION=0.19.7 +ARG III_VERSION=0.11.2 +ARG III_SDK_VERSION=0.11.2 RUN 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.yml index 5df586962c..b34823dbc6 100644 --- a/deploy/coolify/docker-compose.yml +++ b/deploy/coolify/docker-compose.yml @@ -5,8 +5,8 @@ services: dockerfile: Dockerfile args: AGENTMEMORY_VERSION: "0.9.29" - III_VERSION: "0.19.7" - III_SDK_VERSION: "0.19.7" + III_VERSION: "0.11.2" + III_SDK_VERSION: "0.11.2" restart: unless-stopped environment: SERVICE_FQDN_AGENTMEMORY_3111: ${SERVICE_FQDN_AGENTMEMORY_3111} diff --git a/deploy/fly/Dockerfile b/deploy/fly/Dockerfile index e40cf53c93..3501100575 100644 --- a/deploy/fly/Dockerfile +++ b/deploy/fly/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.19.7 +ARG III_VERSION=0.11.2 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.19.7 -ARG III_SDK_VERSION=0.19.7 +ARG III_VERSION=0.11.2 +ARG III_SDK_VERSION=0.11.2 RUN 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/Dockerfile index e40cf53c93..3501100575 100644 --- a/deploy/railway/Dockerfile +++ b/deploy/railway/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.19.7 +ARG III_VERSION=0.11.2 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.19.7 -ARG III_SDK_VERSION=0.19.7 +ARG III_VERSION=0.11.2 +ARG III_SDK_VERSION=0.11.2 RUN 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/Dockerfile index e40cf53c93..3501100575 100644 --- a/deploy/render/Dockerfile +++ b/deploy/render/Dockerfile @@ -1,12 +1,12 @@ -ARG III_VERSION=0.19.7 +ARG III_VERSION=0.11.2 FROM iiidev/iii:${III_VERSION} AS iii-image FROM node:22-slim ARG AGENTMEMORY_VERSION=0.9.29 -ARG III_VERSION=0.19.7 -ARG III_SDK_VERSION=0.19.7 +ARG III_VERSION=0.11.2 +ARG III_SDK_VERSION=0.11.2 RUN 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.yaml index 8d15dd3e4c..d1871d5795 100644 --- a/deploy/render/render.yaml +++ b/deploy/render/render.yaml @@ -17,6 +17,6 @@ services: - key: AGENTMEMORY_VERSION value: "0.9.29" - key: III_VERSION - value: "0.19.7" + value: "0.11.2" - key: III_SDK_VERSION - value: "0.19.7" + value: "0.11.2" diff --git a/docker-compose.yml b/docker-compose.yml index 70152ee724..17c17bf0bd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,6 +44,15 @@ services: volumes: - "${AGENTMEMORY_DATA_DIR:-iii-data}:/data" - ./iii-config.docker.yaml:/app/config.yaml:ro + # The engine persists each builtin worker's seeded config block under + # ./data/configuration on first boot and treats that copy as the + # source of truth afterwards. Keeping it on a tmpfs means every + # container start re-seeds from config.yaml and the III_* env vars, + # the same behavior the native CLI path has. + - type: tmpfs + target: /app/data/configuration + tmpfs: + mode: 01777 restart: unless-stopped logging: driver: json-file diff --git a/src/cli.ts b/src/cli.ts index 5670e0fee3..425b520d6b 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -123,8 +123,9 @@ if (args.includes("--version") || args.includes("-V")) { // stops the REST 404s after an engine reconnect. Bump this constant and the // package.json dependency together. AGENTMEMORY_III_VERSION overrides the pin // for anyone running a self-managed engine. +const IIPINNED_DEFAULT_VERSION = "0.19.7"; const IIPINNED_VERSION = - process.env["AGENTMEMORY_III_VERSION"] || "0.19.7"; + process.env["AGENTMEMORY_III_VERSION"] || IIPINNED_DEFAULT_VERSION; // Map Node platform/arch → the asset name iii-hq/iii ships under // https://github.com/iii-hq/iii/releases/download/iii/v/ @@ -1555,10 +1556,16 @@ function prepareEngineLaunch(configPath: string): { const runtimePath = runtimeConfigPath(dataDirResolution.dataDir); mkdirSync(dirname(runtimePath), { recursive: true }); writeFileSync(runtimePath, rewritten, "utf-8"); - const cleared = clearPersistedBuiltinConfig(cwd); - if (cleared.length > 0) { - vlog( - `cleared ${cleared.length} persisted builtin config entries so the rendered runtime config seeds the engine again`, + try { + const cleared = clearPersistedBuiltinConfig(cwd); + if (cleared.length > 0) { + vlog( + `cleared ${cleared.length} persisted builtin config entries so the rendered runtime config seeds the engine again`, + ); + } + } catch (err) { + p.log.warn( + `${String(err instanceof Error ? err.message : err)}. The engine will keep its previously persisted ports and timeouts; fix the file permissions under ${join(cwd, "data", "configuration")} and restart.`, ); } if (selectedInstance === 0 && dataDirResolution.source === "default") { @@ -3184,8 +3191,8 @@ async function runUpgrade() { label: "Refreshing dependencies (pnpm install)", }); requireSuccess(installOk, "pnpm install"); - runCommand(pnpmBin, ["up", `iii-sdk@${IIPINNED_VERSION}`], { - label: `Pinning iii-sdk@${IIPINNED_VERSION}`, + runCommand(pnpmBin, ["up", `iii-sdk@${IIPINNED_DEFAULT_VERSION}`], { + label: `Pinning iii-sdk@${IIPINNED_DEFAULT_VERSION}`, optional: true, }); } else if (npmBin) { @@ -3193,8 +3200,8 @@ async function runUpgrade() { label: "Refreshing dependencies (npm install)", }); requireSuccess(installOk, "npm install"); - runCommand(npmBin, ["install", `iii-sdk@${IIPINNED_VERSION}`], { - label: `Pinning iii-sdk@${IIPINNED_VERSION}`, + runCommand(npmBin, ["install", `iii-sdk@${IIPINNED_DEFAULT_VERSION}`], { + label: `Pinning iii-sdk@${IIPINNED_DEFAULT_VERSION}`, optional: true, }); } else { diff --git a/src/cli/engine-config.ts b/src/cli/engine-config.ts index 973bcf8fa5..5c2e14237e 100644 --- a/src/cli/engine-config.ts +++ b/src/cli/engine-config.ts @@ -24,7 +24,12 @@ export function clearPersistedBuiltinConfig(engineCwd: string): string[] { try { rmSync(path); cleared.push(path); - } catch {} + } catch (err) { + if ((err as NodeJS.ErrnoException).code === "ENOENT") continue; + throw new Error( + `could not remove persisted engine config ${path}: ${String(err)}`, + ); + } } return cleared; } diff --git a/test/engine-config.test.ts b/test/engine-config.test.ts index bb227bdabb..10474e97fc 100644 --- a/test/engine-config.test.ts +++ b/test/engine-config.test.ts @@ -92,4 +92,11 @@ describe("clearPersistedBuiltinConfig", () => { expect(clearPersistedBuiltinConfig(cwd)).toEqual([]); }); + + it("fails loudly when a persisted entry exists but cannot be removed", () => { + const cwd = mkdtempSync(join(tmpdir(), "agentmemory-engine-")); + mkdirSync(join(cwd, "data", "configuration", "iii-http.yaml"), { recursive: true }); + + expect(() => clearPersistedBuiltinConfig(cwd)).toThrow(/iii-http\.yaml/); + }); }); From edbfbf70f2d7d7130c4cd93a183af185d281af7a Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 24 Sep 2026 11:58:45 +0530 Subject: [PATCH 3/6] fix(index): persist the search snapshot continuously and bound worker shutdown The BM25/vector snapshot was written only by a graceful shutdown, after a full rebuild, or by delete paths. Live observation, compression and memory writes added to the in-memory index without ever scheduling the debounced save, so a crash, SIGKILL or power loss booted the previous snapshot; the rebuild was skipped because that snapshot was not empty, and every observation captured since the last clean stop stayed invisible to search. Every live add now schedules the 5 s debounced save, bulk indexing does the same, and on boot the worker compares the loaded snapshot with each session's observation count and re-indexes what is missing. The SIGTERM handler awaited a state write that cannot land while the SDK is reconnecting, so a worker whose engine had already gone never exited and `agentmemory stop` fell through to SIGKILL. The final flush and the SDK shutdown are now time-boxed at 4 s each with a hard exit at 8 s, open viewer connections are closed instead of awaited, and the CLI's orphan reap grace matches that budget. Review follow-ups: the compose tmpfs now targets the engine image's real working directory (/home/nonroot/data/configuration; the previous path never received the persisted entries), a persisted builtin config entry that cannot be removed aborts `agentmemory start` instead of launching an engine that would ignore the requested ports, and the deploy Dockerfiles refuse to build when III_VERSION and III_SDK_VERSION differ. Verified against the containerized 0.19.7 engine: SIGKILL 1 s after an observation is healed by the boot reconcile, SIGKILL 8 s after is covered by the debounced save, SIGTERM with the engine stopped exits in about 5 s instead of hanging, no persisted config survives a container restart, and the Fly image builds with matching versions and fails with mismatched ones. --- CHANGELOG.md | 8 +- deploy/coolify/Dockerfile | 2 + deploy/fly/Dockerfile | 2 + deploy/railway/Dockerfile | 2 + deploy/render/Dockerfile | 2 + docker-compose.yml | 7 +- src/cli.ts | 8 +- src/functions/compress.ts | 3 +- src/functions/observe.ts | 3 +- src/functions/remember.ts | 3 +- src/functions/search.ts | 18 +++++ src/index.ts | 36 ++++++++- src/shutdown.ts | 17 +++++ src/state/search-index.ts | 9 +++ test/index-live-persist.test.ts | 110 ++++++++++++++++++++++++++++ test/index-reconcile.test.ts | 126 ++++++++++++++++++++++++++++++++ test/multimodal.test.ts | 1 + test/shutdown.test.ts | 32 ++++++++ 18 files changed, 375 insertions(+), 14 deletions(-) create mode 100644 src/shutdown.ts create mode 100644 test/index-live-persist.test.ts create mode 100644 test/index-reconcile.test.ts create mode 100644 test/shutdown.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 439b2789af..9996004c2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Changed - **iii engine and `iii-sdk` move from 0.11.2 to 0.19.7.** 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.19.7`, and `agentmemory upgrade` pins the SDK 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.19.7 is the last engine before the 0.20 SDK reorganization and carries the upstream fix that keeps HTTP routes owned by the reconnecting worker, so `/agentmemory/*` no longer answers 404 after the engine reconnects (#1013). 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 into `data/configuration/.yaml` on first boot 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 builtin entries right before it spawns the engine, so the runtime config it renders from your environment is the seed every time. +- **Runtime config is re-seeded on every start.** Engines from 0.19.4 on persist each builtin worker's `config:` block into `data/configuration/.yaml` on first boot 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 builtin entries 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. + +### Fixed + +- **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. +- **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. ## [0.9.29] — 2026-08-16 diff --git a/deploy/coolify/Dockerfile b/deploy/coolify/Dockerfile index c0a6bb6c9c..c6ac809d8b 100644 --- a/deploy/coolify/Dockerfile +++ b/deploy/coolify/Dockerfile @@ -15,6 +15,8 @@ RUN apt-get update \ COPY --from=iii-image /app/iii /usr/local/bin/iii WORKDIR /opt/agentmemory +RUN [ "${III_VERSION}" = "${III_SDK_VERSION}" ] \ + || { echo "III_VERSION=${III_VERSION} and III_SDK_VERSION=${III_SDK_VERSION} must be the same release: the agentmemory worker speaks the wire protocol of the engine it was built against, so override both together" >&2; exit 1; } RUN printf '{"name":"agentmemory-deploy","version":"1.0.0","private":true,"overrides":{"iii-sdk":"%s"}}\n' "${III_SDK_VERSION}" > package.json \ && npm install "@agentmemory/agentmemory@${AGENTMEMORY_VERSION}" --omit=optional --no-fund --no-audit \ && ln -s /opt/agentmemory/node_modules/.bin/agentmemory /usr/local/bin/agentmemory diff --git a/deploy/fly/Dockerfile b/deploy/fly/Dockerfile index 3501100575..4fa61c4874 100644 --- a/deploy/fly/Dockerfile +++ b/deploy/fly/Dockerfile @@ -19,6 +19,8 @@ COPY --from=iii-image /app/iii /usr/local/bin/iii # (the worker speaks that engine's wire protocol, so the two must match). # `npm install -g` ignores overrides, hence the local prefix. WORKDIR /opt/agentmemory +RUN [ "${III_VERSION}" = "${III_SDK_VERSION}" ] \ + || { echo "III_VERSION=${III_VERSION} and III_SDK_VERSION=${III_SDK_VERSION} must be the same release: the agentmemory worker speaks the wire protocol of the engine it was built against, so override both together" >&2; exit 1; } RUN printf '{"name":"agentmemory-deploy","version":"1.0.0","private":true,"overrides":{"iii-sdk":"%s"}}\n' "${III_SDK_VERSION}" > package.json \ && npm install "@agentmemory/agentmemory@${AGENTMEMORY_VERSION}" --omit=optional --no-fund --no-audit \ && ln -s /opt/agentmemory/node_modules/.bin/agentmemory /usr/local/bin/agentmemory diff --git a/deploy/railway/Dockerfile b/deploy/railway/Dockerfile index 3501100575..4fa61c4874 100644 --- a/deploy/railway/Dockerfile +++ b/deploy/railway/Dockerfile @@ -19,6 +19,8 @@ COPY --from=iii-image /app/iii /usr/local/bin/iii # (the worker speaks that engine's wire protocol, so the two must match). # `npm install -g` ignores overrides, hence the local prefix. WORKDIR /opt/agentmemory +RUN [ "${III_VERSION}" = "${III_SDK_VERSION}" ] \ + || { echo "III_VERSION=${III_VERSION} and III_SDK_VERSION=${III_SDK_VERSION} must be the same release: the agentmemory worker speaks the wire protocol of the engine it was built against, so override both together" >&2; exit 1; } RUN printf '{"name":"agentmemory-deploy","version":"1.0.0","private":true,"overrides":{"iii-sdk":"%s"}}\n' "${III_SDK_VERSION}" > package.json \ && npm install "@agentmemory/agentmemory@${AGENTMEMORY_VERSION}" --omit=optional --no-fund --no-audit \ && ln -s /opt/agentmemory/node_modules/.bin/agentmemory /usr/local/bin/agentmemory diff --git a/deploy/render/Dockerfile b/deploy/render/Dockerfile index 3501100575..4fa61c4874 100644 --- a/deploy/render/Dockerfile +++ b/deploy/render/Dockerfile @@ -19,6 +19,8 @@ COPY --from=iii-image /app/iii /usr/local/bin/iii # (the worker speaks that engine's wire protocol, so the two must match). # `npm install -g` ignores overrides, hence the local prefix. WORKDIR /opt/agentmemory +RUN [ "${III_VERSION}" = "${III_SDK_VERSION}" ] \ + || { echo "III_VERSION=${III_VERSION} and III_SDK_VERSION=${III_SDK_VERSION} must be the same release: the agentmemory worker speaks the wire protocol of the engine it was built against, so override both together" >&2; exit 1; } RUN printf '{"name":"agentmemory-deploy","version":"1.0.0","private":true,"overrides":{"iii-sdk":"%s"}}\n' "${III_SDK_VERSION}" > package.json \ && npm install "@agentmemory/agentmemory@${AGENTMEMORY_VERSION}" --omit=optional --no-fund --no-audit \ && ln -s /opt/agentmemory/node_modules/.bin/agentmemory /usr/local/bin/agentmemory diff --git a/docker-compose.yml b/docker-compose.yml index 17c17bf0bd..7eb37ae25a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,12 +45,13 @@ services: - "${AGENTMEMORY_DATA_DIR:-iii-data}:/data" - ./iii-config.docker.yaml:/app/config.yaml:ro # The engine persists each builtin worker's seeded config block under - # ./data/configuration on first boot and treats that copy as the - # source of truth afterwards. Keeping it on a tmpfs means every + # data/configuration of its working directory (/home/nonroot in the + # image) on first boot and treats that copy as the source of truth + # afterwards. Keeping it on a tmpfs means every # container start re-seeds from config.yaml and the III_* env vars, # the same behavior the native CLI path has. - type: tmpfs - target: /app/data/configuration + target: /home/nonroot/data/configuration tmpfs: mode: 01777 restart: unless-stopped diff --git a/src/cli.ts b/src/cli.ts index 425b520d6b..3f89dc2113 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -70,6 +70,7 @@ import { clearPersistedBuiltinConfig, renderEngineConfig, } from "./cli/engine-config.js"; +import { SHUTDOWN_HARD_EXIT_MS } from "./shutdown.js"; import { processStatIsRunning } from "./cli/process-state.js"; import { renderSplash } from "./cli/splash.js"; import { isFirstRun, readPrefs, resetPrefs, writePrefs } from "./cli/preferences.js"; @@ -1564,9 +1565,10 @@ function prepareEngineLaunch(configPath: string): { ); } } catch (err) { - p.log.warn( - `${String(err instanceof Error ? err.message : err)}. The engine will keep its previously persisted ports and timeouts; fix the file permissions under ${join(cwd, "data", "configuration")} and restart.`, + p.log.error( + `${String(err instanceof Error ? err.message : err)}. The engine would ignore the rendered runtime config and keep its previously persisted ports and timeouts. Fix the permissions under ${join(cwd, "data", "configuration")} and run agentmemory start again.`, ); + process.exit(1); } if (selectedInstance === 0 && dataDirResolution.source === "default") { for (const m of legacyDataMigrations( @@ -3550,7 +3552,7 @@ async function runStop(): Promise { // instead of preserving for manual cleanup. const s = p.spinner(); s.start(`Stopping orphaned agentmemory worker (pid ${workerPid})...`); - const ok = await signalAndWait(workerPid, "SIGTERM", 3000); + const ok = await signalAndWait(workerPid, "SIGTERM", SHUTDOWN_HARD_EXIT_MS + 1000); s.stop(ok ? `Stopped worker pid ${workerPid}` : `Failed to stop worker pid ${workerPid}`); clearEnginePidfile(); clearEngineState(); diff --git a/src/functions/compress.ts b/src/functions/compress.ts index c2019e7d68..c94d856e3a 100644 --- a/src/functions/compress.ts +++ b/src/functions/compress.ts @@ -15,7 +15,7 @@ import { } from "../prompts/compression.js"; import { VISION_DESCRIPTION_PROMPT } from "../prompts/vision.js"; import { getXmlTag, getXmlChildren } from "../prompts/xml.js"; -import { getSearchIndex, vectorIndexAddGuarded } from "./search.js"; +import { getSearchIndex, scheduleIndexSave, vectorIndexAddGuarded } from "./search.js"; import { CompressOutputSchema } from "../eval/schemas.js"; import { validateOutput } from "../eval/validator.js"; import { scoreCompression } from "../eval/quality.js"; @@ -177,6 +177,7 @@ export function registerCompressFunction( try { getSearchIndex().add(compressed); + scheduleIndexSave(); } catch (err) { logger.warn("Failed to index compressed observation into BM25", { obsId: compressed.id, diff --git a/src/functions/observe.ts b/src/functions/observe.ts index c1c9f499b7..e9b0f314e4 100644 --- a/src/functions/observe.ts +++ b/src/functions/observe.ts @@ -9,7 +9,7 @@ import { DedupMap } from "./dedup.js"; import { withKeyedLock } from "../state/keyed-mutex.js"; import { isAutoCompressEnabled } from "../config.js"; import { buildSyntheticCompression } from "./compress-synthetic.js"; -import { getSearchIndex, vectorIndexAddGuarded } from "./search.js"; +import { getSearchIndex, scheduleIndexSave, vectorIndexAddGuarded } from "./search.js"; import { getAgentId } from "../config.js"; import { logger } from "../logger.js"; import { saveImageToDisk } from "../utils/image-store.js"; @@ -321,6 +321,7 @@ export function registerObserveFunction( synthetic, ); getSearchIndex().add(synthetic); + scheduleIndexSave(); await vectorIndexAddGuarded( synthetic.id, synthetic.sessionId, diff --git a/src/functions/remember.ts b/src/functions/remember.ts index 9422269457..e7a1793cd4 100644 --- a/src/functions/remember.ts +++ b/src/functions/remember.ts @@ -6,7 +6,7 @@ import { withKeyedLock } from "../state/keyed-mutex.js"; import { memoryToObservation } from "../state/memory-utils.js"; import { deleteAccessLog } from "./access-tracker.js"; import { recordAudit } from "./audit.js"; -import { getSearchIndex, isMemoryIndexReady, vectorIndexAddGuarded, vectorIndexRemove, flushIndexSave } from "./search.js"; +import { getSearchIndex, isMemoryIndexReady, scheduleIndexSave, vectorIndexAddGuarded, vectorIndexRemove, flushIndexSave } from "./search.js"; import { getAgentId } from "../config.js"; import { logger } from "../logger.js"; @@ -197,6 +197,7 @@ export function registerRememberFunction(sdk: ISdk, kv: StateKV): void { // restart-time rebuild will pick the memory up either way. try { getSearchIndex().add(memoryToObservation(memory)); + scheduleIndexSave(); } catch (err) { logger.warn("Failed to index saved memory into BM25", { memId: memory.id, diff --git a/src/functions/search.ts b/src/functions/search.ts index 9508289531..b78825d920 100644 --- a/src/functions/search.ts +++ b/src/functions/search.ts @@ -305,9 +305,27 @@ export async function indexRecords( count++ } await flush() + if (count > 0) scheduleIndexSave() return count } +export async function reconcileIndex(kv: StateKV): Promise { + const idx = getSearchIndex() + const sessions = await kv.list(KV.sessions) + const indexed = idx.observationCountsBySession() + const missing: CompressedObservation[] = [] + for (const session of sessions) { + if ((session.observationCount ?? 0) <= (indexed.get(session.id) ?? 0)) continue + const observations = await kv.list(KV.observations(session.id)) + for (const obs of observations) { + if (!obs.title || !obs.narrative || idx.has(obs.id)) continue + missing.push(obs) + } + } + if (missing.length === 0) return 0 + return indexRecords(missing, []) +} + export async function rebuildIndex(kv: StateKV): Promise { const idx = getSearchIndex() idx.clear() diff --git a/src/index.ts b/src/index.ts index 717419f7df..4bd2b0ebea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,6 +25,7 @@ import { KV } from "./state/schema.js"; import { VectorIndex } from "./state/vector-index.js"; import { HybridSearch } from "./state/hybrid-search.js"; import { IndexPersistence } from "./state/index-persistence.js"; +import { SHUTDOWN_FLUSH_TIMEOUT_MS, SHUTDOWN_HARD_EXIT_MS, settleWithin } from "./shutdown.js"; import { registerPrivacyFunction } from "./functions/privacy.js"; import { registerObserveFunction } from "./functions/observe.js"; import { registerImageQuotaCleanup } from "./functions/image-quota-cleanup.js"; @@ -35,6 +36,7 @@ import { registerCompressFunction } from "./functions/compress.js"; import { registerSearchFunction, rebuildIndex, + reconcileIndex, getSearchIndex, setVectorIndex, setEmbeddingProvider, @@ -526,6 +528,17 @@ async function main() { err, ); } + void reconcileIndex(kv) + .then((count) => { + if (count > 0) { + bootLog( + `Search index reconciled: ${count} observations missing from the persisted snapshot were re-indexed`, + ); + } + }) + .catch((err) => { + console.warn(`[agentmemory] Failed to reconcile search index:`, err); + }); } // Ready / Endpoints lines are emitted via `bootLog` so they're @@ -608,14 +621,29 @@ async function main() { const shutdown = async () => { console.log(`\n[agentmemory] Shutting down...`); + const hardExit = setTimeout(() => { + console.warn( + `[agentmemory] Shutdown still blocked after ${SHUTDOWN_HARD_EXIT_MS}ms; exiting now.`, + ); + clearWorkerPidfile(); + process.exit(1); + }, SHUTDOWN_HARD_EXIT_MS); + hardExit.unref(); healthMonitor.stop(); dedupMap.stop(); indexPersistence.stop(); + viewerServer.closeAllConnections(); await new Promise((resolve) => viewerServer.close(() => resolve())); - await indexPersistence.save().catch((err) => { - console.warn(`[agentmemory] Failed to save index on shutdown:`, err); - }); - await sdk.shutdown(); + const flushed = await settleWithin( + indexPersistence.save(), + SHUTDOWN_FLUSH_TIMEOUT_MS, + ); + if (!flushed) { + console.warn( + `[agentmemory] Search index flush did not finish within ${SHUTDOWN_FLUSH_TIMEOUT_MS}ms; the engine is probably gone. Observations are already in the engine's state store and the index reconciles them on the next boot.`, + ); + } + await settleWithin(sdk.shutdown(), SHUTDOWN_FLUSH_TIMEOUT_MS); clearWorkerPidfile(); process.exit(0); }; diff --git a/src/shutdown.ts b/src/shutdown.ts new file mode 100644 index 0000000000..dfb0b17453 --- /dev/null +++ b/src/shutdown.ts @@ -0,0 +1,17 @@ +export const SHUTDOWN_FLUSH_TIMEOUT_MS = 4000; +export const SHUTDOWN_HARD_EXIT_MS = 8000; + +export async function settleWithin( + work: Promise, + ms: number, +): Promise { + let timer: ReturnType | undefined; + const expiry = new Promise((resolve) => { + timer = setTimeout(() => resolve(false), ms); + }); + try { + return await Promise.race([work.then(() => true, () => true), expiry]); + } finally { + clearTimeout(timer); + } +} diff --git a/src/state/search-index.ts b/src/state/search-index.ts index 67f3e2ef8f..eae4b55b36 100644 --- a/src/state/search-index.ts +++ b/src/state/search-index.ts @@ -51,6 +51,15 @@ export class SearchIndex { return this.entries.has(id); } + observationCountsBySession(): Map { + const counts = new Map(); + for (const entry of this.entries.values()) { + if (entry.obsId.startsWith("mem_")) continue; + counts.set(entry.sessionId, (counts.get(entry.sessionId) ?? 0) + 1); + } + return counts; + } + remove(id: string): void { const entry = this.entries.get(id); if (!entry) return; diff --git a/test/index-live-persist.test.ts b/test/index-live-persist.test.ts new file mode 100644 index 0000000000..82f7c21eae --- /dev/null +++ b/test/index-live-persist.test.ts @@ -0,0 +1,110 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; + +vi.mock("../src/logger.js", () => ({ + logger: { info: vi.fn(), warn: vi.fn(), error: vi.fn(), debug: vi.fn() }, +})); + +import { getSearchIndex, setIndexPersistence } from "../src/functions/search.js"; +import { registerObserveFunction } from "../src/functions/observe.js"; +import { registerRememberFunction } from "../src/functions/remember.js"; + +function mockKV() { + const store = new Map>(); + return { + store, + get: async (scope: string, key: string): Promise => + (store.get(scope)?.get(key) as T) ?? null, + set: async (scope: string, key: string, data: T): Promise => { + if (!store.has(scope)) store.set(scope, new Map()); + store.get(scope)!.set(key, data); + return data; + }, + update: async ( + scope: string, + key: string, + updates: Array<{ path: string; value: unknown }>, + ) => { + const m = store.get(scope); + if (!m) return; + const v = (m.get(key) as Record) ?? {}; + for (const u of updates) v[u.path] = u.value; + m.set(key, v); + }, + delete: async (scope: string, key: string) => { + store.get(scope)?.delete(key); + }, + list: async (scope: string): Promise => { + const m = store.get(scope); + return m ? (Array.from(m.values()) as T[]) : []; + }, + }; +} + +function mockSdk() { + const fns = new Map(); + return { + registerFunction: (idOrOpts: string | { id: string }, fn: Function) => { + fns.set(typeof idOrOpts === "string" ? idOrOpts : idOrOpts.id, fn); + }, + registerTrigger: () => {}, + trigger: async (input: { function_id: string; payload: unknown }) => { + const fn = fns.get(input.function_id); + return fn ? fn(input.payload) : null; + }, + }; +} + +describe("live index writes schedule the persisted snapshot", () => { + const persistence = { scheduleSave: vi.fn(), save: vi.fn(async () => {}) }; + + beforeEach(() => { + getSearchIndex().clear(); + persistence.scheduleSave.mockClear(); + setIndexPersistence(persistence); + }); + + afterEach(() => { + setIndexPersistence(null); + }); + + it("after a synthetic observation", async () => { + const sdk = mockSdk(); + const kv = mockKV(); + registerObserveFunction(sdk as never, kv as never); + + const result = (await sdk.trigger({ + function_id: "mem::observe", + payload: { + sessionId: "ses_live", + project: "agentmemory", + cwd: "/tmp/agentmemory", + hookType: "post_tool_use", + timestamp: new Date().toISOString(), + data: { + tool_name: "Bash", + tool_input: { command: "echo persist-probe" }, + tool_output: "persist-probe output", + }, + }, + })) as { observationId: string }; + + expect(result.observationId).toBeTruthy(); + expect(getSearchIndex().has(result.observationId)).toBe(true); + expect(persistence.scheduleSave).toHaveBeenCalled(); + }); + + it("after a memory save", async () => { + const sdk = mockSdk(); + const kv = mockKV(); + registerRememberFunction(sdk as never, kv as never); + + const result = (await sdk.trigger({ + function_id: "mem::remember", + payload: { content: "persisted snapshot follows every live add", type: "fact" }, + })) as { success: boolean; memory: { id: string } }; + + expect(result.success).toBe(true); + expect(getSearchIndex().has(result.memory.id)).toBe(true); + expect(persistence.scheduleSave).toHaveBeenCalled(); + }); +}); diff --git a/test/index-reconcile.test.ts b/test/index-reconcile.test.ts new file mode 100644 index 0000000000..9e1c8871e4 --- /dev/null +++ b/test/index-reconcile.test.ts @@ -0,0 +1,126 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; +import { + getSearchIndex, + reconcileIndex, + setIndexPersistence, +} from "../src/functions/search.js"; +import type { CompressedObservation, Session } from "../src/types.js"; + +function mockKV() { + const store = new Map>(); + const list = vi.fn(async (scope: string): Promise => { + const entries = store.get(scope); + return entries ? (Array.from(entries.values()) as T[]) : []; + }); + return { + list, + get: async (scope: string, key: string): Promise => + (store.get(scope)?.get(key) as T) ?? null, + set: async (scope: string, key: string, data: T): Promise => { + if (!store.has(scope)) store.set(scope, new Map()); + store.get(scope)!.set(key, data); + return data; + }, + delete: async (scope: string, key: string): Promise => { + store.get(scope)?.delete(key); + }, + }; +} + +function makeObs(id: string, sessionId: string): CompressedObservation { + return { + id, + sessionId, + timestamp: new Date().toISOString(), + type: "decision", + title: `observation ${id}`, + facts: [`fact about ${id}`], + narrative: `narrative for ${id}`, + concepts: ["reconcile"], + files: [], + importance: 5, + }; +} + +function makeSession(id: string, observationCount: number): Session { + return { + id, + project: "agentmemory", + cwd: "/tmp", + startedAt: new Date().toISOString(), + status: "active", + observationCount, + }; +} + +describe("reconcileIndex", () => { + const persistence = { scheduleSave: vi.fn(), save: vi.fn(async () => {}) }; + + beforeEach(() => { + getSearchIndex().clear(); + persistence.scheduleSave.mockClear(); + setIndexPersistence(persistence); + }); + + afterEach(() => { + setIndexPersistence(null); + }); + + it("re-indexes observations missing from the loaded snapshot and schedules a save", async () => { + const kv = mockKV(); + await kv.set("mem:sessions", "s1", makeSession("s1", 2)); + await kv.set("mem:obs:s1", "obs_a", makeObs("obs_a", "s1")); + await kv.set("mem:obs:s1", "obs_b", makeObs("obs_b", "s1")); + getSearchIndex().add(makeObs("obs_a", "s1")); + + const added = await reconcileIndex(kv as never); + + expect(added).toBe(1); + expect(getSearchIndex().has("obs_b")).toBe(true); + expect(getSearchIndex().size).toBe(2); + expect(persistence.scheduleSave).toHaveBeenCalled(); + }); + + it("does not list observations for sessions the snapshot already covers", async () => { + const kv = mockKV(); + await kv.set("mem:sessions", "s1", makeSession("s1", 2)); + await kv.set("mem:obs:s1", "obs_a", makeObs("obs_a", "s1")); + await kv.set("mem:obs:s1", "obs_b", makeObs("obs_b", "s1")); + getSearchIndex().add(makeObs("obs_a", "s1")); + getSearchIndex().add(makeObs("obs_b", "s1")); + + const added = await reconcileIndex(kv as never); + + expect(added).toBe(0); + expect(kv.list).toHaveBeenCalledTimes(1); + expect(kv.list).toHaveBeenCalledWith("mem:sessions"); + expect(persistence.scheduleSave).not.toHaveBeenCalled(); + }); + + it("does not let indexed memories mask a missing observation", async () => { + const kv = mockKV(); + await kv.set("mem:sessions", "s1", makeSession("s1", 1)); + await kv.set("mem:obs:s1", "obs_a", makeObs("obs_a", "s1")); + getSearchIndex().add(makeObs("mem_x", "s1")); + + const added = await reconcileIndex(kv as never); + + expect(added).toBe(1); + expect(getSearchIndex().has("obs_a")).toBe(true); + }); + + it("skips observations that are already indexed or not indexable", async () => { + const kv = mockKV(); + await kv.set("mem:sessions", "s1", makeSession("s1", 3)); + await kv.set("mem:obs:s1", "obs_a", makeObs("obs_a", "s1")); + await kv.set("mem:obs:s1", "obs_b", { ...makeObs("obs_b", "s1"), narrative: "" }); + await kv.set("mem:obs:s1", "obs_c", makeObs("obs_c", "s1")); + getSearchIndex().add(makeObs("obs_a", "s1")); + + const added = await reconcileIndex(kv as never); + + expect(added).toBe(1); + expect(getSearchIndex().has("obs_c")).toBe(true); + expect(getSearchIndex().has("obs_b")).toBe(false); + }); +}); diff --git a/test/multimodal.test.ts b/test/multimodal.test.ts index 8f61f88744..b2792db147 100644 --- a/test/multimodal.test.ts +++ b/test/multimodal.test.ts @@ -16,6 +16,7 @@ vi.mock("../src/functions/search.js", () => ({ add: vi.fn(), }), vectorIndexAddGuarded: vi.fn().mockResolvedValue(false), + scheduleIndexSave: vi.fn(), })); const mockTrigger = vi.fn().mockResolvedValue(undefined); diff --git a/test/shutdown.test.ts b/test/shutdown.test.ts new file mode 100644 index 0000000000..710bc7c248 --- /dev/null +++ b/test/shutdown.test.ts @@ -0,0 +1,32 @@ +import { describe, it, expect, vi } from "vitest"; +import { + SHUTDOWN_FLUSH_TIMEOUT_MS, + SHUTDOWN_HARD_EXIT_MS, + settleWithin, +} from "../src/shutdown.js"; + +describe("settleWithin", () => { + it("resolves true when the work settles in time", async () => { + expect(await settleWithin(Promise.resolve("ok"), 1000)).toBe(true); + }); + + it("treats a rejection as settled", async () => { + expect(await settleWithin(Promise.reject(new Error("boom")), 1000)).toBe(true); + }); + + it("resolves false when the work never settles", async () => { + vi.useFakeTimers(); + try { + const pending = settleWithin(new Promise(() => {}), 50); + await vi.advanceTimersByTimeAsync(50); + expect(await pending).toBe(false); + } finally { + vi.useRealTimers(); + } + }); + + it("keeps the flush budget under the CLI's 5s worker grace, with the hard exit after it", () => { + expect(SHUTDOWN_FLUSH_TIMEOUT_MS).toBeLessThan(5000); + expect(SHUTDOWN_HARD_EXIT_MS).toBeGreaterThan(SHUTDOWN_FLUSH_TIMEOUT_MS); + }); +}); From 83b32520ff21a66b1de8aa26b0331d6740793b1e Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 24 Sep 2026 12:13:42 +0530 Subject: [PATCH 4/6] fix(index): replace on re-add, widen the boot reconcile, surface SDK shutdown errors SearchIndex.add on an id that is already indexed now removes the old document first. Before, the entry was overwritten but the old postings and the old term count stayed behind, which skewed BM25 scoring every time compression replaced a synthetic observation under the same id, and would have done the same for a reconcile racing a live write. The boot reconcile also treats a session whose observationCount is 0 or missing as unknown and reads it instead of skipping it, and re-checks membership right before it indexes what it collected. settleWithin no longer turns a rejected promise into a successful settlement; the SDK shutdown call site logs the failure and still exits. --- CHANGELOG.md | 2 +- src/functions/search.ts | 8 +++--- src/index.ts | 4 ++- src/shutdown.ts | 2 +- src/state/search-index.ts | 1 + test/index-reconcile.test.ts | 49 ++++++++++++++++++++++++++++++++++++ test/shutdown.test.ts | 4 +-- 7 files changed, 62 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9996004c2f..340d46ddfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Fixed -- **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. +- **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. ## [0.9.29] — 2026-08-16 diff --git a/src/functions/search.ts b/src/functions/search.ts index b78825d920..2f44273c1e 100644 --- a/src/functions/search.ts +++ b/src/functions/search.ts @@ -315,15 +315,17 @@ export async function reconcileIndex(kv: StateKV): Promise { const indexed = idx.observationCountsBySession() const missing: CompressedObservation[] = [] for (const session of sessions) { - if ((session.observationCount ?? 0) <= (indexed.get(session.id) ?? 0)) continue + const known = session.observationCount ?? 0 + if (known > 0 && known <= (indexed.get(session.id) ?? 0)) continue const observations = await kv.list(KV.observations(session.id)) for (const obs of observations) { if (!obs.title || !obs.narrative || idx.has(obs.id)) continue missing.push(obs) } } - if (missing.length === 0) return 0 - return indexRecords(missing, []) + const stillMissing = missing.filter((obs) => !idx.has(obs.id)) + if (stillMissing.length === 0) return 0 + return indexRecords(stillMissing, []) } export async function rebuildIndex(kv: StateKV): Promise { diff --git a/src/index.ts b/src/index.ts index 4bd2b0ebea..5487788dc7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -643,7 +643,9 @@ async function main() { `[agentmemory] Search index flush did not finish within ${SHUTDOWN_FLUSH_TIMEOUT_MS}ms; the engine is probably gone. Observations are already in the engine's state store and the index reconciles them on the next boot.`, ); } - await settleWithin(sdk.shutdown(), SHUTDOWN_FLUSH_TIMEOUT_MS); + await settleWithin(sdk.shutdown(), SHUTDOWN_FLUSH_TIMEOUT_MS).catch((err) => { + console.warn(`[agentmemory] SDK shutdown failed:`, err); + }); clearWorkerPidfile(); process.exit(0); }; diff --git a/src/shutdown.ts b/src/shutdown.ts index dfb0b17453..512d5a588d 100644 --- a/src/shutdown.ts +++ b/src/shutdown.ts @@ -10,7 +10,7 @@ export async function settleWithin( timer = setTimeout(() => resolve(false), ms); }); try { - return await Promise.race([work.then(() => true, () => true), expiry]); + return await Promise.race([work.then(() => true), expiry]); } finally { clearTimeout(timer); } diff --git a/src/state/search-index.ts b/src/state/search-index.ts index eae4b55b36..a1ae6cf278 100644 --- a/src/state/search-index.ts +++ b/src/state/search-index.ts @@ -20,6 +20,7 @@ export class SearchIndex { private readonly b = 0.75; add(obs: CompressedObservation): void { + if (this.entries.has(obs.id)) this.remove(obs.id); const terms = this.extractTerms(obs); const termFreq = new Map(); let termCount = 0; diff --git a/test/index-reconcile.test.ts b/test/index-reconcile.test.ts index 9e1c8871e4..e96a7d4e89 100644 --- a/test/index-reconcile.test.ts +++ b/test/index-reconcile.test.ts @@ -4,6 +4,7 @@ import { reconcileIndex, setIndexPersistence, } from "../src/functions/search.js"; +import { SearchIndex } from "../src/state/search-index.js"; import type { CompressedObservation, Session } from "../src/types.js"; function mockKV() { @@ -123,4 +124,52 @@ describe("reconcileIndex", () => { expect(getSearchIndex().has("obs_c")).toBe(true); expect(getSearchIndex().has("obs_b")).toBe(false); }); + + it("treats a zero observation count as unknown and still checks the session", async () => { + const kv = mockKV(); + await kv.set("mem:sessions", "s1", makeSession("s1", 0)); + await kv.set("mem:obs:s1", "obs_a", makeObs("obs_a", "s1")); + + const added = await reconcileIndex(kv as never); + + expect(added).toBe(1); + expect(getSearchIndex().has("obs_a")).toBe(true); + }); + + it("does not re-add an observation a live write indexed while it was collecting", async () => { + const kv = mockKV(); + await kv.set("mem:sessions", "s1", makeSession("s1", 1)); + await kv.set("mem:sessions", "s2", makeSession("s2", 1)); + await kv.set("mem:obs:s1", "obs_a", makeObs("obs_a", "s1")); + await kv.set("mem:obs:s2", "obs_b", makeObs("obs_b", "s2")); + const realList = kv.list; + kv.list = vi.fn(async (scope: string) => { + if (scope === "mem:obs:s2") getSearchIndex().add(makeObs("obs_a", "s1")); + return realList(scope); + }) as typeof kv.list; + + const added = await reconcileIndex(kv as never); + + expect(added).toBe(1); + expect(getSearchIndex().size).toBe(2); + }); +}); + +describe("SearchIndex.add on an existing id", () => { + it("replaces the document instead of stacking postings and doc length", () => { + const first = { ...makeObs("obs_a", "s1"), title: "alpha token", narrative: "alpha token", facts: [] }; + const second = { ...makeObs("obs_a", "s1"), title: "bravo token", narrative: "bravo token", facts: [] }; + const idx = new SearchIndex(); + idx.add(first); + idx.add(second); + const fresh = new SearchIndex(); + fresh.add(second); + + expect(idx.size).toBe(1); + expect(idx.search("alpha").map((r) => r.obsId)).toEqual([]); + expect(idx.search("bravo").map((r) => r.obsId)).toEqual(["obs_a"]); + expect(JSON.parse(idx.serialize()).totalDocLength).toBe( + JSON.parse(fresh.serialize()).totalDocLength, + ); + }); }); diff --git a/test/shutdown.test.ts b/test/shutdown.test.ts index 710bc7c248..d2dafafafa 100644 --- a/test/shutdown.test.ts +++ b/test/shutdown.test.ts @@ -10,8 +10,8 @@ describe("settleWithin", () => { expect(await settleWithin(Promise.resolve("ok"), 1000)).toBe(true); }); - it("treats a rejection as settled", async () => { - expect(await settleWithin(Promise.reject(new Error("boom")), 1000)).toBe(true); + it("propagates a rejection instead of reporting success", async () => { + await expect(settleWithin(Promise.reject(new Error("boom")), 1000)).rejects.toThrow("boom"); }); it("resolves false when the work never settles", async () => { From f22e1cdc88844d4eeafe2ed999e866a9aca57b26 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 24 Sep 2026 16:53:55 +0530 Subject: [PATCH 5/6] fix(cli): clear persisted builtin config under a custom configuration directory The engine's configuration worker accepts an fs adapter directory; a custom engine config that sets it makes the engine persist the builtin entries there instead of data/configuration, so the CLI's cleanup missed them and the rendered ports were ignored on the next start. The cleanup now reads the configuration worker block of the rendered runtime config and clears that directory too, resolved against the engine working directory the way the engine resolves it. --- src/cli.ts | 2 +- src/cli/engine-config.ts | 39 ++++++++++++++++++++++++++++----- test/engine-config.test.ts | 45 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 7 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 3f89dc2113..b192172021 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1558,7 +1558,7 @@ function prepareEngineLaunch(configPath: string): { mkdirSync(dirname(runtimePath), { recursive: true }); writeFileSync(runtimePath, rewritten, "utf-8"); try { - const cleared = clearPersistedBuiltinConfig(cwd); + const cleared = clearPersistedBuiltinConfig(cwd, rewritten); if (cleared.length > 0) { vlog( `cleared ${cleared.length} persisted builtin config entries so the rendered runtime config seeds the engine again`, diff --git a/src/cli/engine-config.ts b/src/cli/engine-config.ts index 5c2e14237e..7e5121ed58 100644 --- a/src/cli/engine-config.ts +++ b/src/cli/engine-config.ts @@ -1,5 +1,5 @@ import { rmSync } from "node:fs"; -import { join } from "node:path"; +import { join, resolve } from "node:path"; const SEEDED_BUILTIN_WORKERS = [ "iii-http", @@ -12,15 +12,42 @@ const SEEDED_BUILTIN_WORKERS = [ "iii-worker-manager", ]; -export function persistedBuiltinConfigPaths(engineCwd: string): string[] { - return SEEDED_BUILTIN_WORKERS.map((id) => - join(engineCwd, "data", "configuration", `${id}.yaml`), +export function configuredPersistDir(renderedConfig: string): string | null { + const lines = renderedConfig.split("\n"); + const block = workerBlock(lines, "configuration"); + if (!block) return null; + for (let i = block.start + 1; i < block.end; i++) { + const match = lines[i]!.trim().match(/^directory:\s*(.+?)\s*$/); + if (match) return match[1]!.replace(/^(['"])(.*)\1$/, "$2"); + } + return null; +} + +export function persistedBuiltinConfigDirs( + engineCwd: string, + renderedConfig?: string, +): string[] { + const dirs = [join(engineCwd, "data", "configuration")]; + const custom = renderedConfig ? configuredPersistDir(renderedConfig) : null; + if (custom) dirs.unshift(resolve(engineCwd, custom)); + return [...new Set(dirs)]; +} + +export function persistedBuiltinConfigPaths( + engineCwd: string, + renderedConfig?: string, +): string[] { + return persistedBuiltinConfigDirs(engineCwd, renderedConfig).flatMap((dir) => + SEEDED_BUILTIN_WORKERS.map((id) => join(dir, `${id}.yaml`)), ); } -export function clearPersistedBuiltinConfig(engineCwd: string): string[] { +export function clearPersistedBuiltinConfig( + engineCwd: string, + renderedConfig?: string, +): string[] { const cleared: string[] = []; - for (const path of persistedBuiltinConfigPaths(engineCwd)) { + for (const path of persistedBuiltinConfigPaths(engineCwd, renderedConfig)) { try { rmSync(path); cleared.push(path); diff --git a/test/engine-config.test.ts b/test/engine-config.test.ts index 10474e97fc..43ab278373 100644 --- a/test/engine-config.test.ts +++ b/test/engine-config.test.ts @@ -4,10 +4,26 @@ import { join } from "node:path"; import { describe, expect, it } from "vitest"; import { clearPersistedBuiltinConfig, + persistedBuiltinConfigDirs, persistedBuiltinConfigPaths, renderEngineConfig, } from "../src/cli/engine-config.js"; +const customDirConfig = [ + "workers:", + " - name: iii-http", + " config:", + " port: 3111", + " - name: configuration", + " config:", + " adapter:", + " name: fs", + " config:", + " directory: ./custom-cfg", + " - name: iii-state", + " config: {}", +].join("\n"); + describe("renderEngineConfig", () => { it("stores engine state in the resolved data directory", () => { const source = readFileSync( @@ -71,6 +87,22 @@ describe("clearPersistedBuiltinConfig", () => { expect(paths.every((p) => p.endsWith(".yaml"))).toBe(true); }); + it("adds the directory a configuration worker entry names, resolved against the engine cwd", () => { + expect(persistedBuiltinConfigDirs("/srv/engine", customDirConfig)).toEqual([ + join("/srv", "engine", "custom-cfg"), + join("/srv", "engine", "data", "configuration"), + ]); + expect( + persistedBuiltinConfigDirs( + "/srv/engine", + customDirConfig.replace("./custom-cfg", "'/var/lib/iii-cfg'"), + )[0], + ).toBe(join("/var", "lib", "iii-cfg")); + expect( + persistedBuiltinConfigDirs("/srv/engine", "workers:\n - name: iii-http\n"), + ).toEqual([join("/srv", "engine", "data", "configuration")]); + }); + it("removes persisted builtin entries and leaves everything else in place", () => { const cwd = mkdtempSync(join(tmpdir(), "agentmemory-engine-")); const dir = join(cwd, "data", "configuration"); @@ -87,6 +119,19 @@ describe("clearPersistedBuiltinConfig", () => { expect(existsSync(join(dir, "agentmemory.yaml"))).toBe(true); }); + it("removes the entries the engine persisted under a custom configuration directory", () => { + const cwd = mkdtempSync(join(tmpdir(), "agentmemory-engine-")); + const dir = join(cwd, "custom-cfg"); + mkdirSync(dir, { recursive: true }); + writeFileSync(join(dir, "iii-http.yaml"), "id: iii-http\nvalue:\n port: 3111\n"); + writeFileSync(join(dir, "agentmemory.yaml"), "id: agentmemory\nvalue: {}\n"); + + const cleared = clearPersistedBuiltinConfig(cwd, customDirConfig); + + expect(cleared).toEqual([join(dir, "iii-http.yaml")]); + expect(existsSync(join(dir, "agentmemory.yaml"))).toBe(true); + }); + it("is a no-op when the engine has never persisted anything", () => { const cwd = mkdtempSync(join(tmpdir(), "agentmemory-engine-")); From 58c40a6f6ede7de72aadf15c062418da3fd958d8 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 24 Sep 2026 16:53:55 +0530 Subject: [PATCH 6/6] fix: stop the viewer listener before dropping its connections on shutdown closeAllConnections ran before close, so a request accepted in between kept the shutdown waiting on a connection nothing was going to drain. The listener now closes first and the open connections are dropped while it winds down. --- src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5487788dc7..2cef745163 100644 --- a/src/index.ts +++ b/src/index.ts @@ -632,8 +632,11 @@ async function main() { healthMonitor.stop(); dedupMap.stop(); indexPersistence.stop(); + const viewerClosed = new Promise((resolve) => + viewerServer.close(() => resolve()), + ); viewerServer.closeAllConnections(); - await new Promise((resolve) => viewerServer.close(() => resolve())); + await viewerClosed; const flushed = await settleWithin( indexPersistence.save(), SHUTDOWN_FLUSH_TIMEOUT_MS,