Files
rohitg00__agentmemory/ROADMAP.md
T
Trip 68fddd418e feat: OpenCode plugin with 22 auto-capture hooks (closes #236, #244) (#237)
* feat: OpenCode plugin with 22 auto-capture hooks (closes #156)

- 22 hook handlers across session lifecycle, messages, tool lifecycle, parts, files, permissions, tasks, commands, and config
- Two-layer enrichment pipeline: /context + /enrich via system.transform
- Two slash commands: /recall and /remember
- Full Claude Code hook parity documented with gap analysis

* fix(plugin): use prompt_submit hookType so sessions get firstPrompt

mem::observe checks hookType === "prompt_submit" to extract raw.userPrompt
and set session.firstPrompt. The plugin was using "user_prompt_submit" which
didn't match, so sessions were never named.

* fix: address CodeRabbit review feedback on OpenCode plugin

- Use ctx.worktree for projectPath instead of opaque project.id
- Add Array.isArray guards before output.system/.context.push()
- Only delete stashed files after successful enrich POST
- Defensive JSON.stringify for undefined tool inputs
- Per-session Map-based dedup sets to prevent unbounded growth
- Fix negative duration_ms when time.completed is unset
- Validate props.file and enforce MAX_STASHED_FILES in file.edited
- Deduplicate /summarize call on session idle
- Buffer early config events until session.created flushes them
- Move contextInjectedSessions.add after successful context fetch
- Add DEBUG-gated error logging to network helpers
- Guard config input.agent/mcp/provider against non-object types
- Fix MCP badge count 44→51 in plugin README

* fix: add language identifier to fenced code block in plugin README

* fix: store OpenCode session title as summary/firstPrompt on creation

* fix(plugin): add session instruction injection and consolidation pipeline (closes #233)

Three gaps from the Claude Code plugin port sweep:

- Inject agentmemory usage instructions (memory_save, memory_recall, etc.) into the system prompt on first turn via experimental.chat.system.transform, replacing the skills mechanism that OpenCode lacks
- Call /crystals/auto and /consolidate-pipeline on session.deleted, mirroring Claude's CONSOLIDATION_ENABLED behavior
- Document MEMORY.md vs AGENTS.md architecture comparison (two-hop file bridge vs one-hop direct injection)

Gap A (SubagentStop) is unfixable — OpenCode's SubtaskPart type has no completion/result fields.
Gap C (Claude MEMORY.md bridge) is intentionally skipped — OpenCode uses direct injection.

* fix(plugin): address adversarial code review — 7 critical/high fixes

- Guard instructions push with Array.isArray check + fix TOCTOU race
  by moving contextInjectedSessions.add() before the await
- Session-scope stashedFiles via stashFor() helper (was process-global,
  could cross-contaminate concurrent sessions)
- Fix tool prefix in instructions (agentmemory_memory_ not agentmemory_)
- Check typeof string before pushing .context into system arrays
- Change olderThanDays: 0 → 7 in consolidation fire-and-forget
- Increase fire-and-forget timeout from 5s to 30s (consolidation
  takes minutes, 5s was guaranteed to abort)

* fix(plugin): scope stashedFiles.delete(sid) not .clear() on session.deleted

* fix(plugin): address round 2 adversarial review — 3 critical fixes

- Fix session cross-contamination: file.edited and tool.execute.before
  now use props.sessionID/input.sessionID fallback instead of only
  activeSessionId, preventing subagent hijack of parent stash
- Fix contextInjectedSessions regression from round 1: move add(sid)
  to after instructions push (synchronous) but before context fetch
  (async), so failed /context calls don't permanently skip injection
- Fix Map memory leak: prune session entries (stashedFiles,
  seenSubtaskIds, seenToolCallIds) when session.status goes idle,
  preventing unbounded growth for crash-killed sessions

* fix(plugin): address round 2 remaining medium issues

- Enforce MAX_STASHED_FILES cap on chat.message (was missing, could
  grow unbounded from 50+ file-ref messages)
- Remove activeSessionId fallback from session.deleted; log warning
  when both info.id and sessionID are missing instead of guessing
- Add subtaskSetFor/toolCallSetFor lazy-init wrappers matching
  stashFor pattern; fixes dedup failures for subagents spawned
  without a preceding session.created event
- Guard chat.params against missing input.model (TypeError crash)

* fix(plugin): address round 3 adversarial review — 10 HIGH/MEDIUM fixes

- Add safeSlice() helper replacing all unsafe (v as string || "").slice()
  calls; handles objects/BigInt/circular refs via try/catch JSON.stringify
- Restore activeSessionId fallback on session.deleted (if both info.id
  and sessionID missing, fall back like every other handler)
- Fix message.updated to check info.id before info.sessionID (matches
  session.created/session.updated pattern)
- Add props.sessionID to message.part.updated fallback chain
- Guard undefined callID and subtask ID (prevent dedup silently
  dropping all subsequent undefined-ID events)
- Cap todo.updated at 100 entries (match session.diff's slice pattern)
- Fix duration_ms || → ?? (0ms genuine duration no longer falsifies)
- Fix extractErrorMessage || → ?? (0/false error values preserved)
- Replace extractErrorMessage.slice with safeSlice in retry handler

* fix(plugin): address round 4 adversarial review — 6 CRITICAL/HIGH fixes

CRITICAL:
- Revert message.updated session ID resolution: info.id is the message
  UUID, not session ID. In message.updated, info is the message object
  (has role/tokens/modelID), not session info like in session.created.
  Use props.sessionID || info.sessionID || activeSessionId instead.
- Fix post_tool_use_failure -> post_tool_failure: server types.ts
  defines "post_tool_failure" (no "use_"); compress-synthetic.ts
  classifies by that exact string. All error observations were
  misclassified as "other" instead of "error".
- Fix contextInjected ordering: move add(sid) after the context fetch
  completes, not before. If /context times out, session is no longer
  permanently marked injected, allowing retry on next transform.

HIGH:
- Add process.cwd() fallback for projectPath (was null, causing
  silent 400s on every REST call when no workspace)
- Guard session.start against null activeSessionId with early return
  (was sending sessionId: null to API)
- Fix duration_ms: use typeof number checks instead of || 0 defaults;
  missing timing data now correctly reports null instead of 0ms

* fix(plugin): address final adversarial blockers

---------

Co-authored-by: xuli500177 <62830942+xuli500177@users.noreply.github.com>
Co-authored-by: Trip <5579540+cl0ckt0wer@users.noreply.github.com>
Co-authored-by: Rohit Ghumare <ghumare64@gmail.com>
2026-05-19 00:22:42 +01:00

6.1 KiB
Raw Permalink Blame History

Roadmap

This is agentmemory's public 12-month roadmap. It covers Q2 2026 through Q1 2027. The roadmap is the source of truth for where the project is heading; anything significant that lands in main should trace back to an item here or a ratified issue.

Items shift as evidence changes. Each quarter we publish a short retrospective on what landed, what slipped, and why — attached to the release notes.

How to read this

  • Shipped — landed in main and tagged in a release.
  • Active — in-flight, has an open PR or issue owner.
  • Planned — accepted scope for the quarter, not started.
  • Candidate — under consideration, may defer.

Anything not on this list that a contributor wants to pursue is welcome — open an issue labeled roadmap and it gets triaged against the quarterly theme.

Themes

  • Q2 2026 — Depth. Multimodal memory, more connectors, close out backlog from the v0.9 cycle.
  • Q3 2026 — Breadth. Hook parity across more agents, community expansion, OpenSSF best-practices alignment.
  • Q4 2026 — Trust. Enterprise features — SSO, audit export, RBAC, long-running deployment story.
  • Q1 2027 — v1.0. Stability, LTS branch, semver freeze on the REST + MCP surface.

Q2 2026 — Depth (April – June)

Shipped so far in this quarter

  • iii console docs in README with vendored screenshots (#157)
  • Health severity gated on RSS floor (#158 / PR #160)
  • Standalone MCP proxies to the running server (#159 / PR #161)
  • Audit coverage for mem::forget + audit policy doc (#125 / PR #162)
  • @agentmemory/fs-watcher filesystem connector (#62 / PR #163)
  • Next.js website on Vercel (PR #164)
  • CI publishes all three npm packages on release (PR #166)

Active

  • Multimodal memory — content-addressed image store, vision-prompt compression, disk quota + refcount on eviction (#64, PR #111)
  • Governance baseline — this file, plus GOVERNANCE.md, CONTRIBUTING.md, MAINTAINERS.md, CODE_OF_CONDUCT.md, SECURITY.md

Planned

  • GitHub connector (@agentmemory/github-watcher) — sync issues, PRs, discussions as observations. Shares the POST /agentmemory/observe wire format with the filesystem connector.
  • OpenCode hook bus (#156) — wired 22 hooks covering all 12 Claude Code hook types: session lifecycle (create/idle/status/compacted/update/diff/delete/error), messages & prompts (chat.message, message.updated user+assistant, message.removed), tool capture (before + rich ToolPart lifecycle in message.part.updated), memory injection (context + enrich via system.transform), part tracking (subtask, step-finish, reasoning, file, patch, compaction, agent, retry), file enrichment pipeline (stash via tool.execute.before + file.edited + file parts), permissions (updated + replied), task tracking (todo.updated w/ priority), commands (command.executed), config & model tracking (config + chat.params). Plus 2 slash commands (recall/remember). See plugin/opencode/.
  • Session replay UI in the real-time viewer — scrub the timeline, inspect per-observation payloads.
  • Benchmark harness in CI — keep the 95.2% R@5 number honest across releases by re-running LongMemEval-S on every minor tag.

Q3 2026 — Breadth (July – September)

Planned

  • Additional maintainer onboarding — at least one Maintainer from a different organization added via the process in GOVERNANCE.md. This is a prerequisite for advancing past the foundation's Growth Stage.
  • Slack / Discord connector — third source in the connector family.
  • OpenSSF Scorecard — enroll, reach a Silver-equivalent score. Badged in the README.
  • Hermes integration hardening — reach parity with the OpenClaw plugin surface (session lifecycle + tool-use hooks).
  • Knowledge graph query language — small DSL on top of /agentmemory/graph for multi-hop questions.
  • First conference talk — submit to KubeCon / LlamaCon / similar.

Candidate

  • Cross-agent shared memory namespace. Currently each agent installs its own instance. This would let a Claude Code session and a Cursor session recall each other's observations via a shared mesh node.

Q4 2026 — Trust (October – December)

Planned

  • SSO gateway — accept OIDC in front of the REST surface for team deployments.
  • Audit log export — streamable tail to S3 / Loki / stdout for compliance pipelines.
  • RBAC on memory scope — project:read, project:write, governance:delete role set.
  • Long-running deployment guide — first-class Docker, systemd unit, and launchd plist.
  • Performance SLO — publish p50/p95 recall latency targets, enforce via the benchmark harness.
  • Security audit — external review of the REST surface + mesh-sync path. Fund through LF if foundation acceptance lands before end of quarter.

Candidate

  • Agent-to-agent memory handoff protocol — standardize what one agent can inherit from another's memory, complementing MCP.

Q1 2027 — v1.0 (January – March)

Planned

  • REST + MCP surface freeze. Any break requires a major-version tag per GOVERNANCE.md.
  • LTS branch v1.x — 12-month security-fix commitment.
  • v1.0 release — full documentation pass, all roadmap items from prior quarters either shipped or formally deferred.
  • Foundation membership — Growth → Impact stage application if adoption + maintainer diversity metrics justify.

Candidate

  • Hosted reference instance for the community to benchmark against.
  • Reference implementation in a second language (Rust or Go) for the MCP server — would expand the set of runtimes that can host agentmemory.

Out of scope

For transparency, these are deliberately not on the roadmap:

  • A cloud-hosted agentmemory SaaS.
  • Billing, subscription tiers, commercial licensing beyond Apache-2.0.
  • Agent frameworks themselves — agentmemory is a dependency, not a replacement for the agent runtime.

Feedback

Anything on this list you disagree with, or think should move up / down — open an issue tagged roadmap. Quarterly themes are revisited with every quarterly retrospective.