1. Fix header comment — document correct env var precedence
(apiKey → GITHUB_COPILOT_TOKEN → GITHUB_TOKEN → device flow)
2. Use application/x-www-form-urlencoded for device code endpoint
3. Use application/x-www-form-urlencoded for poll endpoint
4. Add mutex (promise-based) on #getSessionToken to prevent
concurrent token refreshes and duplicate device flow prompts
5. Add DeviceCodeCallback + CopilotAdapterOptions so callers can
control device flow output instead of hardcoded console.log
6. Extract shared OpenAI wire-format helpers into openai-common.ts,
imported by both openai.ts and copilot.ts (-142 lines net)
7. Update createAdapter JSDoc to mention copilot env vars