Executor
The devboy-executor crate separates tool execution logic from transport (MCP stdio, HTTP, NAPI). It provides a stateless execution engine that creates providers on-the-fly from runtime context.
Core Concepts
AdditionalContext
Runtime context for each tool call. Contains everything needed to create a provider:
ProviderConfig
Typed enum with provider-specific scopes. Compiler prevents invalid combinations:
Each scope determines which API endpoint prefix to use:
GitLabScope::Project { id }→/api/v4/projects/{id}/...GitHubScope::Repository { owner, repo }→/repos/{owner}/{repo}/...
ToolOutput
Typed enum for structured results. The caller decides how to format:
Usage
Direct execution
With formatting
With enrichers
Supported Tools
Provider Factory
factory::create_provider() creates a provider from ProviderConfig. Provider instances are cheap and stateless — they hold a reqwest::Client and connection parameters, with no persistent connections.
factory::create_enricher() creates the matching enricher:
- GitLab/GitHub: static enrichers (no metadata needed)
- ClickUp/Jira: dynamic enrichers (require metadata for enum population)