← All needs

Support Devin CLI / Devin Desktop hooks (session summaries never get created)

## Before submitting - [x] I searched [existing issues](https://github.com/thedotmack/claude-mem/issues) and confirmed this is not a duplicate (no issues/PRs mention Devin) --- **Is your feature request related to a problem? Please describe.** Devin CLI (also used by Devin Desktop) has Claude Code–style lifecycle hooks (`SessionStart`, `UserPromptSubmit`, `PostToolUse`, `Stop`, `SessionEnd`), configured in `~/.config/devin/config.json`. claude-mem has no installer entry or adapter for Devin, so I wired it up manually as `claude-mem hook devin `. With that setup, context injection and observations work, and sessions are stored with `platform_source = devin`. However, **no session summary is ever created**: 11 Devin sessions → 0 summaries, while Claude Code and Codex sessions on the same machine summarize normally. As far as I can tell from the 15.0.1 bundle: - `devin` is not a known platform, so the hook falls back to the `raw` adapter. - Devin's `Stop` payload includes `last_assistant_message` but no `transcript_path`. - The `raw` adapter doesn't map `last_assistant_message`, so the summarize handler gets neither and returns at debug level (`No transcriptPath in Stop hook input … skipping summary`). Nothing appears in the INFO log. **Describe the solution you'd like** First-class `devin` platform support: 1. A `devin` adapter that maps Devin's hook payload — in particular `last_assistant_message` → `lastAssistantMessage` for `Stop`. 2. Optionally, `npx claude-mem install --ide devin` to write the hooks into `~/.config/devin/config.json`. Devin hook payload (from Devin's docs, `extensibility/hooks/lifecycle-hooks`): - All events: `session_id` (stable per session), `prompt_id` (per turn; absent before the first prompt) - `SessionStart`: `source` - `UserPromptSubmit`: `prompt` - `PostToolUse`: `tool_name`, `tool_input`, `tool_response` (`{ success, output, error }`) - `Stop`: `stop_hook_active`, `last_assistant_message` - `SessionEnd`: `reason` (Claude Code vocabulary) - No `transcript_path` is provided. - Tool names are lowercase and differ from Claude Code (e.g. `exec` for shell, `edit`, `read`). I haven't verified whether this affects claude-mem's tool-specific handling. **Describe alternatives you've considered** 1. **Minimal fix:** have the `raw` adapter also map `last_assistant_message` → `lastAssistantMessage`. That alone would make summaries work for Devin (and any other host sending that field). 2. **Current workaround:** a `Stop`-hook wrapper that writes `last_assistant_message` into a temporary one-line JSONL transcript (`{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"…"}]}}`), passes it as `transcript_path` to `claude-mem hook devin summarize`, and deletes it afterwards. Summaries are then created and stored under the Devin session. It works, but it's a hack. **Additional context** - claude-mem 15.0.1 (latest on npm); also checked `main` as of 2026-10-20 — `src/cli/adapters/raw.ts` still only maps `transcriptPath`. - macOS, Devin Desktop. - The bundle already recognizes Devin Desktop in environment detection (mapped to `windsurf`), but that doesn't affect hooks: the Windsurf integration uses `~/.codeium/windsurf/hooks.json` with Cascade's event format, which is different from Devin CLI's hooks.