Expand description
§devboy-executor
Tool execution engine for devboy-tools.
Separates tool execution logic from transport (MCP stdio, HTTP, NAPI). Provides:
Executor— dispatches tool calls to providers with enrichment pipelineAdditionalContext/ProviderConfig— typed runtime contextToolOutput— typed results from tool executionToolEnricher— plugin trait for dynamic schema modificationfactory— creates providers fromProviderConfig
§Usage
use devboy_executor::{Executor, AdditionalContext, ProviderConfig, GitLabScope};
use devboy_executor::enricher::FormatPipelineEnricher;
use std::collections::HashMap;
let mut executor = Executor::new();
executor.add_enricher(Box::new(FormatPipelineEnricher));
let ctx = AdditionalContext {
provider: ProviderConfig::GitLab {
base_url: "https://gitlab.com".into(),
access_token: "glpat-xxx".into(),
scope: GitLabScope::Project { id: "12345".into() },
extra: HashMap::new(),
},
proxy: None,
metadata: None,
extra: HashMap::new(),
};
let args = serde_json::json!({ "state": "opened", "limit": 10 });
let output = executor.execute("get_merge_requests", args, &ctx).await?;
println!("Got {} items", output.item_count());Re-exports§
pub use context::AdditionalContext;pub use context::ClickUpScope;pub use context::ConfluenceAuthConfig;pub use context::ConfluenceScope;pub use context::GitHubScope;pub use context::GitLabScope;pub use context::JiraScope;pub use context::ProviderConfig;pub use context::ProviderMetadata;pub use context::ProxyConfig;pub use enricher::PipelineFormatEnricher;pub use executor::Executor;pub use executor::SUPPORTED_TOOLS;pub use factory::create_enricher;pub use factory::create_knowledge_base_enricher;pub use factory::create_knowledge_base_provider;pub use format::FormatMetadata;pub use format::FormatResult;pub use format::execute_and_format;pub use format::format_output;pub use output::ResultMeta;pub use output::ToolOutput;pub use tools::McpOnlyTool;pub use tools::ToolDefinition;
Modules§
- context
- Typed runtime context: provider configs, scopes, additional metadata.
- enricher
- Built-in enrichers for the executor.
- executor
- factory
- Provider factory — builds concrete
Providerinstances fromProviderConfig. - format
- Format
ToolOutputto text using the format pipeline. - output
- Typed
ToolOutputreturned from tool execution. - tool_
docs - Auto-generated tool reference documentation.
- tools
- Base tool definitions for all provider tools.
Structs§
- Tool
Schema - Tool input schema with typed property definitions.
Traits§
- Tool
Enricher - Trait for plugins that dynamically modify tool schemas and transform arguments.
Functions§
- sanitize_
field_ name - Convert a human-readable field name to a safe
cf_parameter name.