Skip to content

feat(collectors): add Local Agent Mode and Cursor cursorDiskKV collection#38

Merged
kazukinakai merged 2 commits into
mainfrom
feat/mindbase-collectors-claude-cursor
Jun 26, 2026
Merged

feat(collectors): add Local Agent Mode and Cursor cursorDiskKV collection#38
kazukinakai merged 2 commits into
mainfrom
feat/mindbase-collectors-claude-cursor

Conversation

@kazukinakai

Copy link
Copy Markdown
Member

Summary

  • claude_collector.py: adds Local Agent Mode support — scans ~/Library/Application Support/Claude/local-agent-mode-sessions/**/audit.jsonl, parses the JSONL event stream keeping only user/assistant text turns, reads sibling local_<uuid>.json for title/timestamps/model.
  • cursor_collector.py: adds _collect_from_cursordiskkv() — reads the modern Cursor globalStorage/state.vscdb cursorDiskKV table (composerData:* + bubbleId:* keys) to extract composer/agent chats that the legacy *cursor*/*ai* subdir scan misses. Opens DB read-only via sqlite3 uri=True mode=ro.
  • scripts/collect-conversations.py (new): host-native Python script that loads a collector by source name and POSTs conversations to the MindBase API. Supports --source, --since, --limit, --dry-run, --export-file, --api-url. Runs on the host (not in Docker) because collectors read host paths.

Files

  • libs/collectors/claude_collector.py (modified)
  • libs/collectors/cursor_collector.py (modified)
  • scripts/collect-conversations.py (new)

Dependency order

No upstream dependencies. Independent of the other PRs in this batch.

…tion

claude_collector.py:
- Adds Local Agent Mode support: scans
  ~/Library/Application Support/Claude/local-agent-mode-sessions/**/audit.jsonl
  (authoritative transcript per session).
- Parses audit.jsonl event stream, filtering to user/assistant text turns
  only (tool_use, tool_result, thinking, system events skipped).
- Reads sibling local_<uuid>.json for session title, timestamps, model.

cursor_collector.py:
- Adds _collect_from_cursordiskkv(): reads the modern Cursor globalStorage
  state.vscdb cursorDiskKV table (composerData:* + bubbleId:* keys) to
  extract composer/agent chats that the legacy scan misses entirely.
- Opens the DB read-only (sqlite3 uri=True mode=ro).

scripts/collect-conversations.py (new):
- Host-native Python script that loads a collector by source name and
  POSTs conversations to the MindBase API.
- Supports --source, --since, --limit, --dry-run, --export-file, --api-url.
- Sources: chatgpt | claude-desktop | claude-code | cursor | windsurf | gemini.
- Runs on the host (not in Docker) because collectors read host paths like
  ~/Library/Application Support.
@kazukinakai kazukinakai merged commit ed5e808 into main Jun 26, 2026
1 of 3 checks passed
@kazukinakai kazukinakai deleted the feat/mindbase-collectors-claude-cursor branch June 26, 2026 12:21
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