mirror of
https://github.com/rohitg00/agentmemory.git
synced 2026-09-14 20:16:33 +08:00
82d1b06df5
* fix(mcp): probe diagnostics + sandbox escape hatch (#234, #278) Three small follow-ups to v0.9.6 reported live on #234 and #278: 1. @agentmemory/mcp shim silently degraded to 7-tool local fallback for sandboxed MCP clients (Flatpak VS Codeium / Roo Code) because the 500ms livez probe failed inside the sandbox network namespace and the catch swallowed the error. Probe now logs the URL, status, and reason to stderr; default timeout raised to 2000ms; AGENTMEMORY_PROBE_TIMEOUT_MS overrides the timeout; AGENTMEMORY_FORCE_PROXY=1 skips the probe and trusts AGENTMEMORY_URL outright for sandboxed clients that can reach the server through a known route but not the host loopback. Closes the #234 follow-up reported by @jcalfee. 2. Docker compose stack persisted state to an ephemeral container path. iii-config.docker.yaml used file_path: ./data/state_store.db, which the engine resolved against its container WORKDIR=/home/nonroot -- not the /data mount where iii-data is bound. State and stream stores were silently written to the container layer and lost on every docker compose down. Paths are now absolute (/data/state_store.db and /data/stream_store). Existing users need a one-time docker compose down -v before upgrade. 3. CLI banner leaked "which: no iii in ..." when iii wasn't on PATH. execFileSync default stdio inherits stderr; GNU which writes the miss line to stderr (exit 1). Switched to explicit stdio: ["ignore", "pipe", "pipe"] in whichBinary(). 4. docker-compose.yml now caps engine container log size at 30MB total (json-file driver, max-size=10m, max-file=3) so the iiidev/iii crash/restart spam reported by @satabd in #278 can no longer fill the host disk. The upstream engine spam itself needs filing against iii-hq/iii -- this is the compose-side guardrail. Version 0.9.6 -> 0.9.7 across package.json, packages/mcp/package.json, plugin/.claude-plugin/plugin.json, src/version.ts, src/types.ts ExportData literal, src/functions/export-import.ts supportedVersions, and the export round-trip test expectation. * fix(mcp): AGENTMEMORY_DEBUG flag + loud unexpected-shape warning @jcalfee on #234 confirmed the v0.9.6 fix (and PR #280's escape hatch) still surfaces 7 tools in Roo Code even though: - Flatpak share=network is on (probe succeeds via curl in-sandbox) - server's /agentmemory/mcp/tools returns 51 tools via curl - AGENTMEMORY_FORCE_PROXY=1 is set Roo Code shows 7 tools even when docker is down -- strong signal of client-side caching at the Roo Code layer, not a shim regression. But the shim has zero visibility into what it actually returns to the MCP client right now: success path is silent, only failure paths log. Add AGENTMEMORY_DEBUG=1 (or =true) so the shim writes to stderr: - which mode handle.mode resolved to (proxy vs local) and baseUrl - shape of the /agentmemory/mcp/tools response (keys + tools type) - count of tools returned to the MCP client - tool names in the local-fallback list if we hit it Also: previously, when the server returned a JSON shape that wasn't {tools: Array}, the shim silently fell back to the 7-tool local list with no log line. Now that path warns to stderr unconditionally, pointing at AGENTMEMORY_DEBUG=1 for inspection. This is diagnosis enablement -- not a fix for whatever is making Roo Code show 7 tools. Once @jcalfee can run the shim with AGENTMEMORY_DEBUG=1 and share the stderr output, we'll know whether the shim returns 51 (Roo Code bug) or 7 (deeper shim bug).
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
workers:
|
|
- name: iii-http
|
|
config:
|
|
port: 3111
|
|
host: 0.0.0.0
|
|
default_timeout: 180000
|
|
cors:
|
|
allowed_origins: ["http://localhost:3111", "http://localhost:3113", "http://127.0.0.1:3111", "http://127.0.0.1:3113"]
|
|
allowed_methods: [GET, POST, PUT, DELETE, OPTIONS]
|
|
- name: iii-state
|
|
config:
|
|
adapter:
|
|
name: kv
|
|
config:
|
|
store_method: file_based
|
|
file_path: /data/state_store.db
|
|
- name: iii-queue
|
|
config:
|
|
adapter:
|
|
name: builtin
|
|
- name: iii-pubsub
|
|
config:
|
|
adapter:
|
|
name: local
|
|
- name: iii-cron
|
|
config:
|
|
adapter:
|
|
name: kv
|
|
- name: iii-stream
|
|
config:
|
|
port: 3112
|
|
host: 0.0.0.0
|
|
adapter:
|
|
name: kv
|
|
config:
|
|
store_method: file_based
|
|
file_path: /data/stream_store
|
|
- name: iii-observability
|
|
config:
|
|
enabled: true
|
|
service_name: agentmemory
|
|
exporter: memory
|
|
sampling_ratio: 1.0
|
|
metrics_enabled: true
|
|
logs_enabled: true
|
|
logs_console_output: true
|
|
- name: iii-exec
|
|
config:
|
|
watch:
|
|
- src/**/*.ts
|
|
exec:
|
|
- node dist/index.mjs
|