The repo includes pytest coverage for:
- workspace config loading
- route matching
- prompt rendering
- direct routed output handling
- dispatcher chaining
- heartbeat scheduling
- Slack polling and cursor logic
- Telegram polling, normalization, and reply flow
- repository CRUD
- Claude provider resource reuse in fake mode
Run tests with:
python -m pytest -qWhen extending LightWire, keep these constraints in mind:
- normalize source-specific events early
- keep routing provider-neutral
- isolate provider-specific translation in adapter modules
- keep deployment logic in app code and use thin operational wrappers
- keep shared workspace files declarative
- persist enough local state to resume safely after restarts
To add a route:
- create or reuse a prompt template under
workspace/prompt_templates/ - add a route entry to
workspace/routes.yaml - point it at an existing agent
- reload config or restart the service
Prefer direct routed outputs for normal chaining. require_artifacts remains only for backward compatibility.
To add an agent:
- create
workspace/agents/<agent_id>/config.yaml - create
workspace/agents/<agent_id>/AGENT.md - optionally attach skills and tools
- if the agent needs external tools, activate only the smallest toolset it actually needs
- run
python scripts/deploy_managed_agents.py
The deploy script is only a wrapper. The real deployment path lives in app/deploy/service.py, which is the right place for future provider-agnostic deployment orchestration.
To add a generic third-party HTTP MCP server:
- declare it in
workspace/tools.yaml - choose an auth pattern
- provide referenced secret env vars
- activate it in the relevant agent configs
- redeploy agents or restart the service
The easiest seam for another managed-agent backend is:
- add a provider adapter package parallel to
app/claude/ - keep the existing routing and repository layers
- translate workspace tool config into the new provider’s tool model
- make session execution return the same internal result shape