mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 05:11:49 +01:00
Add a complete copilot_local adapter that runs GitHub Copilot CLI as a subprocess, bringing full Copilot support to Paperclip with: - Streaming JSONL parser for Copilot CLI v1.0.24+ event format (message deltas, tool execution, session results) - GHE support via --hostname / GH_HOST - BYOK support via COPILOT_PROVIDER_BASE_URL / COPILOT_PROVIDER_API_KEY - Ephemeral skill sync via COPILOT_SKILLS_DIRS environment variable - Dynamic model discovery from Copilot API with fallback list - Model detection from ~/.copilot/config.json - Session codec for resume support (--resume=<sessionId>) - Instructions file field with ChoosePathButton in config UI - Login route (POST /api/companies/:companyId/agents/:id/copilot-login) - 58 parser tests (24 server + 34 UI) Security fixes (review feedback): - Prevent token exfiltration via user-controlled gheHost (env-var tokens restricted to github.com only) - Cache key includes token fingerprint to prevent cross-tenant poisoning - Use fetchWithRetry() instead of bare fetch() in auth.ts and models.ts - AbortSignal.any() in fetchWithRetry to respect caller cancellation Tested with Copilot CLI v1.0.25 on GHE (cancomictdev.ghe.com). E2E verified: streaming, tool events, skill injection, session resume.