Skip to content

feat(agent-source): add Windsurf and Cline adapters - #81

Closed
Timelovers wants to merge 1 commit into
MemTensor:mainfrom
Timelovers:feat/windsurf-cline-sources
Closed

feat(agent-source): add Windsurf and Cline adapters#81
Timelovers wants to merge 1 commit into
MemTensor:mainfrom
Timelovers:feat/windsurf-cline-sources

Conversation

@Timelovers

Copy link
Copy Markdown

Description

Add agent-source adapters for Windsurf (Codeium) and Cline (VS Code extension) so Memmy can import conversation history from these tools.

Windsurf

Reads conversation JSON files from ~/.codeium/windsurf/conversations/. Each conversation is a JSON array of turns with role and content fields.

Cline

Reads task JSON files from the VS Code globalStorage directory (tasks/). Each task file contains a messages array with role, say/text/content fields.

Changes

  • New agent-source/windsurf/ — adapter, session-discovery, transcript-reader, index
  • New agent-source/cline/ — adapter, session-discovery, transcript-reader, index
  • agent-paths.ts — add resolveWindsurfDataDirectory and resolveClineDataDirectory
  • builtin-agent-source-registry.ts — register both adapters
  • Tests — 6 unit tests (3 per adapter: descriptor shape, detect false on missing dir, custom config)

Both follow the existing adapter pattern (Claude Code / Opencode).

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit Test — 6 tests covering descriptor, detect(), and custom configuration

Checklist

  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have created related documentation issue/PR (if applicable)
  • New and existing unit tests pass locally

Add agent-source adapters for Windsurf (Codeium) and Cline (VS Code
extension) so Memmy can import conversation history from these tools.

- Windsurf: reads from ~/.codeium/windsurf/conversations/*.json
- Cline: reads from VS Code globalStorage tasks/*.json
- Both follow the existing Claude Code / Opencode adapter pattern
- Add path resolvers to agent-paths.ts
- Register both in builtin-agent-source-registry
- 6 unit tests (3 per adapter: descriptor, detect, custom config)

Co-authored-by: Timelovers <46080686+Timelovers@users.noreply.github.com>
@ZongYue99
ZongYue99 requested a review from hijzy July 28, 2026 02:34
@syzsunshine219

syzsunshine219 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Received. We anticipate incorporating it into the next version, with plans for testing and releasing v1.0.5 @Timelovers

@ZongYue99
ZongYue99 changed the base branch from main to v1.0.5 August 4, 2026 08:32
@syzsunshine219
syzsunshine219 changed the base branch from v1.0.5 to main August 6, 2026 11:37
@ZongYue99 ZongYue99 closed this Aug 10, 2026
@hijzy

hijzy commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution. We tested this PR against real local installations, but it is not ready to merge yet:

  • Cline initialization crashes with TypeError: runtime.platform is not a function.
  • Cline CLI 3.0.52 stores sessions under ~/.cline/data/sessions, but the adapter detects 0 sessions. Real message content is an array, which also crashes the secret redactor.
  • Windsurf is now Devin Desktop. Current sessions are stored as ACP events under ~/Library/Application Support/Devin/User/acp-events, while this PR expects ~/.codeium/windsurf/conversations/*.json. Testing against the real installation detected 0 sessions.
  • The PR also has TypeScript errors, including the nonexistent readDirectoryEntries export.

Please verify both adapters using sanitized fixtures from real installations and add discovery/reader tests. Requesting changes for now.

@Timelovers

Copy link
Copy Markdown
Author

Thanks for the detailed review @hijzy. Pushed fixes:

  • Cline: fixed path to ~/.cline/data/sessions, removed runtime.platform(), added array content handling
  • Windsurf → Devin Desktop: updated path to ~/Library/Application Support/Devin/User/acp-events
  • Removed nonexistent readDirectoryEntries import

Would appreciate another look when you have a chance.

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.

4 participants