Skip to content

Conversation

@paulinek13
Copy link
Contributor

@paulinek13 paulinek13 commented Dec 22, 2025

Description

Resolves #343

This PR introduces WebSocketCopilotTarget, enabling sending prompts to Microsoft Copilot via WebSocket.
Implementation reference: powerpwn/copilot/copilot_connector/copilot_connector.py

Authentication is handled automatically via CopilotAuthenticator (which is also a new addition), which uses Playwright to automate browser login and obtain the required access tokens.

Tests and Documentation

✅ both WebSocketCopilotTarget and CopilotAuthenticator are documented
✅ unit tests are added for both


The following related items I'd like to address in separate PRs:

  • add support for image_path data type (WebSocketCopilotTarget)
  • ensure accounts with MFA enabled will also work (CopilotAuthenticator)

@paulinek13 paulinek13 changed the title [✏️ DRAFT] FEAT: add WebSocket-based prompt target for Microsoft Copilot [DRAFT] FEAT: add WebSocket-based prompt target for Microsoft Copilot Dec 22, 2025
- Rename _parse_message() to _parse_raw_message()
- Split on record separator (\x1e) and processes all frames, not just first
- Add FINAL_DATA_FRAME (type 3) enum value for completion signals
- Extract bot message parsing logic into lambda for reusability
- Fixes stop condition to handle FINAL_DATA_FRAME and remove flawed
  "is_user_input and PING" logic
…way because of `enterprise-prod-first-party-app-policy`

This reverts commit 276290f.
@paulinek13 paulinek13 marked this pull request as ready for review December 30, 2025 14:09
@paulinek13 paulinek13 changed the title [DRAFT] FEAT: add WebSocket-based prompt target for Microsoft Copilot FEAT: add WebSocket-based prompt target for Microsoft Copilot Dec 30, 2025
@paulinek13
Copy link
Contributor Author

This PR is finally ready for review. However, I still need to add a notebook for this target, which I'll do in the meantime 😃

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 Add Copilot Target

1 participant