3 KiB
3 KiB
AGENTS.md
Repository guidance for contributors and coding agents.
Purpose
This repository ships pyro-mcp, an MCP-compatible package for ephemeral VM lifecycle tools used by coding agents.
Development Workflow
- Use
uvfor all Python environment and command execution. - Install Git LFS before cloning or materializing the packaged runtime bundle:
git lfs install. - Run
make setupafter cloning. - Run
make checkbefore opening a PR. - Run
make dist-checkwhen you change packaging, entrypoints, or install docs. - Public user-facing CLI is
pyro. - Public Python SDK entrypoint is
from pyro_mcp import Pyro. - The packaged runtime images under
src/pyro_mcp/runtime_bundle/are stored in Git LFS. - Use
make runtime-bundleto regenerate the packaged runtime bundle fromruntime_sources/. - Use
make runtime-materializeto build real runtime inputs intobuild/runtime_sources/. - Use
make runtime-publish-official-environments-ociafter materialization to push the official OCI environments to their configured registry targets. - Use
make runtime-fetch-binaries,make runtime-build-kernel-real, andmake runtime-build-rootfs-realif you need to debug the real-source pipeline step by step. - Use
make runtime-boot-checkto run a direct Firecracker boot validation against the bundled runtime artifacts. - Use
make runtime-network-checkto validate outbound internet access from inside the guest. - Use
make demoto validate deterministic VM lifecycle execution. - Use
make network-demoto validate deterministic VM lifecycle execution with guest networking enabled. - Use
make ollama-demoto validate model-triggered lifecycle tool usage with guest networking enabled. - Use
make doctorto inspect bundled runtime integrity and host prerequisites. - Network-enabled flows require host privilege for TAP/NAT setup; the current implementation uses
sudo -nforip,nft, andiptableswhen available. - If you need full log payloads from the Ollama demo, use
make ollama-demo OLLAMA_DEMO_FLAGS=-v. - After heavy runtime work, reclaim local space with
rm -rf buildandgit lfs prune. - The pre-migration
pre-lfs-*tag is local backup material only; do not push it or it will keep the old giant blobs reachable. - Public contract documentation lives in
docs/public-contract.md. - Official GHCR publication workflow lives in
.github/workflows/publish-environments.yml.
Quality Gates
- Linting:
ruff - Type checking:
mypy(strict mode) - Tests:
pytestwith coverage threshold
These checks run in pre-commit hooks and should all pass locally.
Key API Contract
- Public SDK facade:
pyro_mcp.Pyro - Public MCP factory:
pyro_mcp.create_server() - Public CLI:
pyro - Current bundled runtime is guest-capable for VM boot, guest exec, and guest networking; check
make doctorfor runtime capabilities. - Primary tool:
vm_run
- Advanced lifecycle tools:
vm_list_environmentsvm_createvm_startvm_execvm_stopvm_deletevm_statusvm_network_infovm_reap_expired