feat: direct CLI integration for gateway-free connections by 0xNyk · Pull Request #61 · builderz-labs/mission-control · GitHub
Skip to content

feat: direct CLI integration for gateway-free connections - #61

Merged
0xNyk merged 1 commit into
mainfrom
feat/direct-cli
Mar 2, 2026
Merged

0xNyk merged 1 commit into
mainfrom
feat/direct-cli

Conversation

@0xNyk

@0xNyk 0xNyk commented Mar 2, 2026

Copy link
Copy Markdown
Member

Summary

  • CLI tools (Claude Code, Codex, custom agents) can now connect directly to Mission Control without a WebSocket gateway
  • POST /api/connect registers a tool, auto-creates agent, returns heartbeat/SSE/token URLs
  • Enhanced heartbeat endpoint accepts connection_id and inline token_usage for streamlined reporting
  • Gateway manager panel now shows direct CLI connections with status, disconnect controls
  • New direct_connections table (migration 016) tracks connection lifecycle
  • Fixes Phase 2 bug: openapi.json had an unclosed brace on the tokens 200 response line

Test plan

  • pnpm typecheck passes
  • 5 new E2E tests: connection creation, listing, heartbeat with tokens, disconnect, auth
  • Existing 149+ tests remain passing
  • Manual: curl POST /api/connect returns connection details
  • Manual: Gateway manager panel shows CLI connections section

Files changed

  • src/lib/migrations.ts — migration 016_direct_connections
  • src/lib/validation.ts — connectSchema
  • src/lib/event-bus.ts — connection event types
  • src/app/api/connect/route.ts — new connect endpoint
  • src/app/api/agents/[id]/heartbeat/route.ts — enhanced POST
  • src/components/panels/multi-gateway-panel.tsx — CLI connections UI
  • openapi.json — fixed brace bug + added /api/connect spec
  • tests/direct-cli.spec.ts — 5 E2E tests
  • docs/cli-integration.md — integration guide

- Add migration 016 for direct_connections table
- Add POST/GET/DELETE /api/connect for CLI tool registration
- Enhance heartbeat POST to accept connection_id and inline token_usage
- Add connectSchema to validation
- Add connection.created/disconnected event types to event bus
- Show direct CLI connections in gateway manager panel
- Add 5 E2E tests for connection lifecycle
- Add CLI integration documentation (docs/cli-integration.md)
- Fix openapi.json brace mismatch on line 642 (Phase 2 bug)
- Add /api/connect endpoints to OpenAPI spec
@0xNyk
0xNyk merged commit 5c65db7 into main Mar 2, 2026
1 check failed
@0xNyk
0xNyk deleted the feat/direct-cli branch March 2, 2026 04:45
1maxwellbot-netizen referenced this pull request in jonputnam12/mission-control Apr 1, 2026
feat: direct CLI integration for gateway-free connections
fgabelmannjr referenced this pull request in racecraft-lab/paddock-prototype May 5, 2026
feat: direct CLI integration for gateway-free connections
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