Add typed runtime-facing MCP and OAuth configuration models on top of the existing merged settings loader so later parity work can consume validated structures instead of ad hoc JSON traversal. This keeps the first slice bounded to parsing, precedence, exports, and tests. While validating the slice under the repo's required clippy gate, I also fixed a handful of pre-existing clippy failures in runtime file operations so the requested verification command can pass for this commit. Constraint: Must keep scope to parity-unblocking primitives, not full MCP or OAuth flow execution Constraint: cargo clippy --all-targets is a required verification gate for this repo Rejected: Add a new integrations crate first | too much boundary churn for the first landing slice Rejected: Leave existing clippy failures untouched | would block the required verification command for this commit Confidence: medium Scope-risk: moderate Reversibility: clean Directive: Keep future MCP/OAuth additions layered on these typed config surfaces before introducing transport orchestration Tested: cargo fmt --all; cargo test -p runtime; cargo clippy -p runtime --all-targets -- -D warnings Not-tested: workspace-wide clippy/test beyond the runtime crate; live MCP or OAuth network flows
44 lines
1.7 KiB
Rust
44 lines
1.7 KiB
Rust
mod bash;
|
|
mod bootstrap;
|
|
mod compact;
|
|
mod config;
|
|
mod conversation;
|
|
mod file_ops;
|
|
mod json;
|
|
mod permissions;
|
|
mod prompt;
|
|
mod session;
|
|
mod usage;
|
|
|
|
pub use bash::{execute_bash, BashCommandInput, BashCommandOutput};
|
|
pub use bootstrap::{BootstrapPhase, BootstrapPlan};
|
|
pub use compact::{
|
|
compact_session, estimate_session_tokens, format_compact_summary,
|
|
get_compact_continuation_message, should_compact, CompactionConfig, CompactionResult,
|
|
};
|
|
pub use config::{
|
|
ConfigEntry, ConfigError, ConfigLoader, ConfigSource, McpClaudeAiProxyServerConfig,
|
|
McpConfigCollection, McpOAuthConfig, McpRemoteServerConfig, McpSdkServerConfig,
|
|
McpServerConfig, McpStdioServerConfig, McpTransport, McpWebSocketServerConfig, OAuthConfig,
|
|
RuntimeConfig, RuntimeFeatureConfig, ScopedMcpServerConfig, CLAUDE_CODE_SETTINGS_SCHEMA_NAME,
|
|
};
|
|
pub use conversation::{
|
|
ApiClient, ApiRequest, AssistantEvent, ConversationRuntime, RuntimeError, StaticToolExecutor,
|
|
ToolError, ToolExecutor, TurnSummary,
|
|
};
|
|
pub use file_ops::{
|
|
edit_file, glob_search, grep_search, read_file, write_file, EditFileOutput, GlobSearchOutput,
|
|
GrepSearchInput, GrepSearchOutput, ReadFileOutput, StructuredPatchHunk, TextFilePayload,
|
|
WriteFileOutput,
|
|
};
|
|
pub use permissions::{
|
|
PermissionMode, PermissionOutcome, PermissionPolicy, PermissionPromptDecision,
|
|
PermissionPrompter, PermissionRequest,
|
|
};
|
|
pub use prompt::{
|
|
load_system_prompt, prepend_bullets, ContextFile, ProjectContext, PromptBuildError,
|
|
SystemPromptBuilder, FRONTIER_MODEL_NAME, SYSTEM_PROMPT_DYNAMIC_BOUNDARY,
|
|
};
|
|
pub use session::{ContentBlock, ConversationMessage, MessageRole, Session, SessionError};
|
|
pub use usage::{TokenUsage, UsageTracker};
|