Skip to content

feat: add Devin local-agent session support - #74

Open
omeraltinova wants to merge 1 commit into
f:masterfrom
omeraltinova:feat/devin-cli-parser
Open

omeraltinova wants to merge 1 commit into
f:masterfrom
omeraltinova:feat/devin-cli-parser

Conversation

@omeraltinova

Copy link
Copy Markdown
Contributor

Summary

Devin's local agent (the devin CLI and the Devin IDE built-in agent via
ACP) stores sessions in ~/.local/share/devin/cli/sessions.db. Since the
IDE moved from Cascade to ACP these sessions were invisible. This reads
that store and merges the sessions into the existing Devin source.

Changes

  • editors/devin-cli.js: reads sessions and message_nodes, dedupes
    the message tree by message_id, skips system-prompt nodes, extracts
    per-message tokens (input/output/cache read/cache write), model and
    tool calls.
  • Maps Devin model ids to canonical ids (gpt-5-6-sol-medium →
    gpt-5-6-sol, claude-5-fable → claude-fable-5).
  • editors/windsurf.js: merges these chats under source devin and
    routes their messages via a persisted _type marker. No app needs to
    be running.

Verification

Local store with 11 sessions: 4 with conversation, 7 empty (skipped).
Message counts match distinct message_ids. Devin lists 37 sessions
(33 Cascade + 4 local agent), none counted twice.

Pricing for claude-fable-5 and gpt-5-6-sol depends on #73.

Devin's local agent (the `devin` CLI and the Devin IDE built-in agent via
ACP) stores sessions in ~/.local/share/devin/cli/sessions.db. Since the
IDE moved from Cascade to ACP these sessions were invisible to Agentlytics.

- New editors/devin-cli.js reads `sessions` and `message_nodes`, deduplicates
  the message forest by message_id (context compaction re-inserts earlier
  nodes under new roots) and skips system-prompt nodes
- Extracts per-message input/output/cache-read/cache-write tokens, the
  generation model and tool calls; tool calls are also rendered into the
  assistant content as "[tool-call: name(args)]" like the Claude and Codex
  adapters
- Maps Devin model ids to canonical ids: strips the reasoning-effort suffix
  and reorders "claude-5-fable" to "claude-fable-5"
- windsurf.js merges these chats into the existing 'devin' source next to the
  Cascade trajectories and routes their messages by the persisted
  _type = 'devin-cli' marker, so cached chats refetch without the app running;
  ~/.config/devin/mcp_config.json is registered under Devin
- bubbleCount counts user, assistant and tool messages so it matches the
  analyzed message count and stays stable across rescans

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant