1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! # 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 pipeline
//! - `AdditionalContext` / `ProviderConfig` — typed runtime context
//! - `ToolOutput` — typed results from tool execution
//! - `ToolEnricher` — plugin trait for dynamic schema modification
//! - `factory` — creates providers from `ProviderConfig`
//!
//! ## Usage
//!
//! ```rust,no_run
//! use devboy_executor::{Executor, AdditionalContext, ProviderConfig, GitLabScope};
//! use devboy_executor::enricher::FormatPipelineEnricher;
//! use std::collections::HashMap;
//!
//! # async fn example() -> devboy_core::Result<()> {
//! 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());
//! # Ok(())
//! # }
//! ```
/// Typed runtime context: provider configs, scopes, additional metadata.
/// Provider factory — builds concrete `Provider` instances from `ProviderConfig`.
/// Typed `ToolOutput` returned from tool execution.
// Re-export main types at crate root
pub use ;
pub use ;
pub use PipelineFormatEnricher;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;