Skip to content

Integrate copilot runtime#2

Merged
danielmeppiel merged 9 commits intomainfrom
integrate-copilot-runtime
Sep 25, 2025
Merged

Integrate copilot runtime#2
danielmeppiel merged 9 commits intomainfrom
integrate-copilot-runtime

Conversation

@danielmeppiel
Copy link
Collaborator

Documentation and User Guidance Updates:

  • Updated all setup instructions and examples in README.md, docs/getting-started.md, docs/cli-reference.md, docs/runtime-integration.md, and related files to recommend and default to apm runtime setup copilot instead of Codex CLI. This includes new explanations, usage examples, and troubleshooting steps for Copilot CLI. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Copilot CLI Runtime Integration:

  • Added a new script scripts/runtime/setup-copilot.sh to automate installation, configuration, and environment setup for the GitHub Copilot CLI, including token detection, MCP config directory creation, and prerequisite checks for Node.js and npm versions.

Token Management and CLI Logic:

  • Updated src/apm_cli/core/token_manager.py to clarify token precedence for Copilot CLI, remove unused npm token handling, and document the new recommended token environment variables. [1] [2] [3]
  • Adjusted the CLI (src/apm_cli/cli.py) to prioritize Copilot CLI when installing MCP dependencies, ensuring Copilot is checked and suggested before Codex or VSCode. [1] [2]

These changes make Copilot CLI the default and best-supported AI runtime for APM, streamline the onboarding experience, and ensure all documentation and automation scripts are consistent and up to date.

- Add src/apm_cli/adapters/client/copilot.py: MCP client adapter for Copilot CLI
- Add src/apm_cli/runtime/copilot_runtime.py: Runtime adapter for Copilot CLI execution
- Add scripts/runtime/setup-copilot.sh: Copilot CLI installation script

These are zero-risk additions as they are new files that don't modify existing code.
Ready for Phase 2: Runtime infrastructure integration.
- Update runtime factory to register CopilotRuntime as first priority
- Add copilot to supported runtimes in runtime manager
- Update runtime preference order: copilot → codex → llm
- Add npm-based removal logic for copilot runtime
- Export CopilotRuntime in __init__.py

Low risk changes that integrate core Copilot files into runtime system.
- Verified 'apm install --runtime' option includes copilot first
- Confirmed 'apm runtime setup copilot' command works
- Verified runtime status shows copilot as highest priority
- Runtime detection logic already prioritizes copilot correctly
- Error messages already mention copilot CLI installation

No additional changes needed - CLI integration already complete from clean-main branch.
- Verified existing tests already support copilot runtime
- Added comprehensive test_copilot_runtime.py with 12 test cases
- Tests cover runtime detection, initialization, execution, error handling
- All existing runtime factory and detection tests pass with copilot
- Integration tests already handle copilot in multi-runtime scenarios

Low risk additions that provide comprehensive test coverage for Copilot runtime.
- Replace references from Codex to GitHub Copilot in README, CLI reference, and getting started guides.
- Modify setup scripts to install GitHub Copilot CLI with MCP configuration.
- Update token management to reflect the removal of GITHUB_NPM_PAT.
- Adjust integration tests to verify Copilot setup.
- Enhance example scripts in apm.yml for Copilot usage.
…e instantiation and enhance runtime info retrieval with mocked subprocess output.
@danielmeppiel danielmeppiel merged commit 55839cb into main Sep 25, 2025
15 checks passed
@danielmeppiel danielmeppiel deleted the integrate-copilot-runtime branch February 27, 2026 09:42
sergio-sisternes-epam added a commit to sergio-sisternes-epam/apm that referenced this pull request Mar 2, 2026
- Use LockFile.read() instead of raw yaml.safe_load() in _collect_transitive_mcp_deps (#1)
- Guard against mcp:null in get_mcp_dependencies() (microsoft#2)
- Remove inline MCP installation pipeline, defer to follow-up PR (microsoft#3/microsoft#7)
- Remove redundant import builtins in _deduplicate_mcp_deps (microsoft#10)
- Add tests for mcp:null, mcp:[], root-over-transitive dedup order (microsoft#9)
- Remove tests for deleted inline pipeline functions
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