Skip to content

feat(providers): opt-in Claude Desktop and Pi AI session sources (#36) - #39

Draft
ClaudiaFang wants to merge 3 commits into
mainfrom
feat/code-insights-claude-desktop-pi-providers
Draft

ClaudiaFang wants to merge 3 commits into
mainfrom
feat/code-insights-claude-desktop-pi-providers

Conversation

@ClaudiaFang

@ClaudiaFang ClaudiaFang commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Selectively port the requested Claude Desktop and Pi AI session parsers from b08x, adapted for Firstsun's multi-home sync and source isolation. Refs #31 and #36.

  • Claude Desktop: discover <home>/.../local-agent-mode-sessions/<account>/<project>/<session>/audit.jsonl, read adjacent metadata, parse audit files with explicit namespaced session IDs (the shared parser normally rejects non-UUID filename audit.jsonl).
  • Pi AI: discover <home>/.pi/agent/sessions/**/*.jsonl, ingest turns/tool calls/usage/compactions with namespaced IDs.
  • Preserve message parent linkage, avoid collisions between tools/homes using a stable source+absolute-path hash and source-qualified message IDs.
  • Use existing homeRoot source discovery. Explicit opt-in: code-insights sync --source claude-desktop or code-insights sync --source pi; plain sync won't automatically import them.
  • Add realistic filesystem-fixture tests and registry assertions.

Risks / review required

  • CI Build/Test on Node 24 + pnpm 12: https://github.com/firstsun-dev/code-insights/actions/runs/40624440466
  • Manual smoke with genuine Claude Desktop local-agent audit files; verify format compatibility, session count and metadata.
  • Manual smoke with genuine Pi AI sessions across model/usage/tool-result variants.
  • Multi-home repeated sync, pricing and deduplication checks.
  • UI source filters and badges verified.

No DB migration, no change to default sync sources, no production deploy. Draft PR only until manual fixture validation is complete.

Source:

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.

feat(providers): add opt-in Claude Desktop and Pi AI session parsers

1 participant