iai-mcp-opencode/deploy
Apunkt 7559bac57f
fix(opencode): fix memory-inject race condition, empty-memory ban, add turn limit
Three critical fixes to the iai-mcp-memory-inject.js plugin:

- Race condition: inflight is now a Map<sessionID, Promise> so concurrent
  callers (warm-on-create event + first transform hook) await the same
  fetch instead of getting empty string. First turn now gets memory.
- Empty-memory ban: fetchMemory returns {ok, text} tuple. HTTP 200 with
  empty body is memoized as valid (new user, minimal mode). Only actual
  network errors count against the retry budget.
- Turn-limited injection: new INJECT_MAX_TURNS (default 3) stops injecting
  after N turns. Memory was already in system prompt; the model has seen
  it. Controls per-turn token cost that was 50x the old approach.

Also: README now documents memory-inject.js (not session-init), and
session-init.js is marked @deprecated.
2026-06-03 16:47:55 +02:00
..
hooks Initial release: iai-mcp v0.1.0 2026-05-06 01:04:47 -07:00
launchd Initial release: iai-mcp v0.1.0 2026-05-06 01:04:47 -07:00
opencode fix(opencode): fix memory-inject race condition, empty-memory ban, add turn limit 2026-06-03 16:47:55 +02:00
systemd fix(systemd): Restart=always so daemon restarts after HIBERNATION clean exit 2026-05-19 10:32:06 +02:00