@atomic-ai/msco-pi-lot
v0.1.1
Published
Microsoft Copilot provider extension for pi coding agent.
Maintainers
Readme
msco-pi-lot
Microsoft Copilot provider extension for pi.
Install
Install directly from GitHub:
pi install https://github.com/atomic-reactor/msco-pi-lotYou can also pin a ref:
pi install https://github.com/atomic-reactor/msco-pi-lot@mainAfter install, restart pi and select the microsoft-copilot/copilot model.
For interactive use, log in once from inside pi:
/login microsoft-copilotPaste your Microsoft Copilot access token when prompted. pi stores the credential in ~/.pi/agent/auth.json. You can remove it later with:
/logout microsoft-copilotConfiguration
Interactive login only supports pasting an access token. For headless or non-interactive use, you can still set Copilot credentials in your shell or in a local .env file next to the installed package:
MICROSOFT_COPILOT_ACCESS_TOKEN=
MICROSOFT_COPILOT_COOKIE=
MICROSOFT_COPILOT_CONVERSATION_ID=
MICROSOFT_COPILOT_CLIENT_SESSION_ID=
MICROSOFT_COPILOT_MODE=reasoning
MICROSOFT_COPILOT_TRACE=0
MICROSOFT_COPILOT_TRACE_FILE=logs/copilot-session.ndjsonLegacy COPILOT_* variable names are still accepted.
Only MICROSOFT_COPILOT_ACCESS_TOKEN is required. Cookie-based settings remain optional transport tweaks, not a login method.
Behavior
- Registers one
pimodel:microsoft-copilot/copilot - Maps
pithinking levels to Copilot modes:off,minimal,low->smartmedium,high,xhigh->reasoning
- Bootstraps a Copilot conversation over HTTP when needed
- Persists conversation state per
pisession - Supports local tool use through a prompt-mediated tool loop
- Uses Copilot server config to size prompts conservatively against the live
maxTextMessageLength
Known Issues
- This is still a basic integration. It gets Microsoft Copilot working inside
pi, but it is not yet on par with a full agentic coding agent. - Microsoft Copilot will sometimes fail to respond at all. In those cases the request may stall or end without a useful answer, and retrying is often the only workaround.
- Microsoft Copilot will sometimes behave as if it is running in a browser context. When that happens it may try to inspect browser tabs or page state that do not exist in
pi, which can cause the response to stall or go off track.
Development
Install dependencies:
npm installRun tests:
npm testFor local extension loading during development:
pi -e ./src/index.tsTracing
Enable websocket and bootstrap tracing with:
MICROSOFT_COPILOT_TRACE=1
MICROSOFT_COPILOT_TRACE_FILE=logs/copilot-session.ndjsonTrace output is masked, but you should still treat it as sensitive and keep it out of git.
