Skip to content

feat(proxy): add proxy daemon with Claude Desktop telemetry integration#265

Merged
codemie-ai merged 2 commits into
mainfrom
feat/proxy-daemon-desktop-telemetry
Apr 30, 2026
Merged

feat(proxy): add proxy daemon with Claude Desktop telemetry integration#265
codemie-ai merged 2 commits into
mainfrom
feat/proxy-daemon-desktop-telemetry

Conversation

@vadimvlasenko
Copy link
Copy Markdown
Collaborator

Summary

Adds a background proxy daemon that integrates with Claude Desktop to collect telemetry (session metrics and conversation history). Includes CLI commands to manage the daemon lifecycle and a gateway key plugin for SSO proxy authentication.

Changes

  • Proxy daemon (src/bin/proxy-daemon.ts, bin/proxy-daemon.js) — standalone background process with PID-based lifecycle, graceful SIGTERM shutdown, and atomic state file writes
  • CLI commands (src/cli/commands/proxy/) — start, stop, status, inspect-desktop subcommands; DaemonManager with process polling for safe stop
  • Claude Desktop telemetry (src/telemetry/clients/claude-desktop/) — adapter, session discovery/parsing, metrics collection, and platform-aware path resolution (macOS/Windows; explicit error on unsupported platforms)
  • DesktopTelemetryRuntime (src/telemetry/runtime/) — checkpoint-based session tracking with bounded sinceMs on finalization scans
  • GatewayKeyPlugin (src/providers/plugins/sso/proxy/plugins/gateway-key.plugin.ts) — static bearer key validation with Authorization header stripping before upstream forwarding
  • spawnDetached() added to src/utils/processes.ts — reusable daemon spawn utility
  • Session store/processors — external session ID support and turn-continuation fix (emit only Assistant entry, not User again)
  • Tests for daemon-manager, desktop connector, gateway-key plugin, and proxy endpoint script

Impact

New codemie proxy CLI commands are available. Existing proxy and session flows are unchanged.

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)

vadimvlasenko and others added 2 commits April 29, 2026 16:09
- Add proxy daemon process with PID-based lifecycle management and graceful shutdown
- Add CLI commands for daemon start/stop/status and Desktop inspection
- Add Claude Desktop telemetry adapter with session discovery, parsing, and metrics
- Add DesktopTelemetryRuntime with checkpoint-based session tracking
- Add GatewayKeyPlugin for SSO proxy authentication
- Add spawnDetached() utility to processes.ts for daemon spawning
- Update session store and processors with external session ID support
- Fix turn continuation to emit only Assistant entry (not User again)
- Add tests for daemon-manager, desktop connector, and gateway-key plugin

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
…nError

On Linux the function correctly throws ConfigurationError (unsupported
platform). The test was written for macOS/Windows only and needs to
handle the Linux CI environment.

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
@codemie-ai codemie-ai merged commit 823479c into main Apr 30, 2026
5 checks passed
@codemie-ai codemie-ai deleted the feat/proxy-daemon-desktop-telemetry branch April 30, 2026 07:14
mykolanehrych pushed a commit to mykolanehrych/codemie-code that referenced this pull request May 5, 2026
…on (codemie-ai#265)

Co-authored-by: codemie-ai <codemie.ai@gmail.com>
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