1#![allow(
2 clippy::expect_used,
3 clippy::unreachable,
4 missing_docs,
5 dead_code,
6 unused_imports,
7 reason = "Intentional compatibility, platform, or test-only suppression."
8)]
9#![cfg_attr(
10 not(test),
11 allow(
12 clippy::map_err_ignore,
13 reason = "Configuration compatibility paths preserve legacy error mapping semantics."
14 )
15)]
16#![expect(
17 unused_results,
18 clippy::let_underscore_must_use,
19 clippy::indexing_slicing,
20 clippy::string_slice,
21 clippy::cast_possible_truncation,
22 reason = "Configuration loading mutates layered maps, parses validated text boundaries, and converts bounded persistence timestamps."
23)]
24mod accessibility;
50pub mod acp;
51pub mod api_keys;
52pub mod auth;
53pub mod codex;
54pub mod computer_use;
55pub mod constants;
56pub mod context;
57pub mod core;
58pub mod debug;
59pub mod defaults;
60pub(crate) mod env_helpers;
61pub mod hooks;
62pub mod loader;
63pub mod mcp;
64pub mod models;
65pub mod network_allowlist;
66pub mod optimization;
67pub mod output_styles;
68pub mod root;
69pub mod safety;
70#[cfg(feature = "schema")]
71pub mod schema;
72pub mod status_line;
73pub mod subagents;
74pub mod telemetry;
75pub mod terminal_title;
76pub mod timeouts;
77pub mod types;
78pub mod update;
79pub mod webmcp;
80pub mod workspace_env;
81
82#[cfg(test)]
83mod test_support;
84
85pub use acp::{
86 AcpAuthMethod, AgentClientProtocolConfig, AgentClientProtocolTransport, AgentClientProtocolZedConfig,
87 AgentClientProtocolZedToolsConfig, AgentClientProtocolZedWorkspaceTrustMode, WorkspaceTrustLevel,
88};
89pub use api_keys::ApiKeySources;
90pub use computer_use::ComputerUseConfig;
91pub use context::{ContextFeaturesConfig, DynamicContextConfig, LedgerConfig};
92pub use core::{
93 AgentCodexAppServerConfig, AgentConfig, AgentOnboardingConfig, AgentPromptSuggestionsConfig, AnthropicSpeed,
94 AuthConfig, AutoPermissionConfig, AutoPermissionEnvironmentConfig, AutomationConfig, BundledSkillsConfig,
95 CommandsConfig, CopilotAuthConfig, CustomProviderApiFormat, CustomProviderCommandAuthConfig, CustomProviderConfig,
96 CustomProviderProfileConfig, DockerSandboxConfig, EditorToolConfig, ExternalSandboxConfig, ExternalSandboxType,
97 FullAutoConfig, GatekeeperConfig, MemoriesConfig, MicroVMSandboxConfig, MicroVmProvider, ModelConfig,
98 NetworkAllowlistEntryConfig, NetworkConfig, NetworkPolicy, OpenAIAuthConfig, OpenAIConfig, OpenAIHostedShellConfig,
99 OpenAIHostedShellDomainSecret, OpenAIHostedShellEnvironment, OpenAIHostedShellNetworkPolicy,
100 OpenAIHostedShellNetworkPolicyType, OpenAIHostedSkill, OpenAIManualCompactionConfig, OpenAIPreferredMethod,
101 OpenAIServiceTier, OpenResponsesConfig, OpenRouterAuthConfig, PluginRuntimeConfig, PluginTrustLevel,
102 PromptCacheRetention, PromptCachingConfig, ProviderOverrideConfig, ProviderPromptCachingConfig,
103 ResolvedCustomProviderProfile, ResourceLimitsConfig, ResourceLimitsPreset, SandboxConfig, SandboxPolicy,
104 SeccompConfig, SeccompProfilePreset, SecurityConfig, SensitivePathsConfig, SkillsConfig, SkillsRenderMode,
105 ThinkingDisplayMode, ToolPolicy, ToolProfile, ToolSearchAlgorithm, ToolsConfig, WebFetchConfig, WebFetchMode,
106 WebSearchConfig, WebSearchProvider,
107};
108pub use debug::{DebugConfig, TraceLevel};
109pub use defaults::{
110 ConfigDefaultsProvider, ContextStoreDefaults, PerformanceDefaults, ScenarioDefaults, SyntaxHighlightingDefaults,
111 WorkspacePathsDefaults, current_config_defaults, get_config_dir, get_data_dir, install_config_defaults_provider,
112 reset_to_default_config_defaults, with_config_defaults,
113};
114pub use hooks::{
115 HookCommandConfig, HookCommandKind, HookGroupConfig, HooksConfig, LifecycleHooksConfig, WorkspaceHookCommand,
116 WorkspaceLifecycleHooks,
117};
118pub use loader::layers::{
119 ConfigLayerEntry, ConfigLayerLoadError, ConfigLayerMetadata, ConfigLayerSource, ConfigLayerStack,
120 LayerDisabledReason,
121};
122pub use loader::{
123 ConfigBuilder, ConfigManager, ConfigWatcher, FeaturesConfig, SimpleConfigWatcher, SyntaxHighlightingConfig,
124 VTCodeConfig, WorkspaceConfig, explicit_config_path, fingerprint_str, fingerprint_toml_value, merge_toml_values,
125 merge_toml_values_with_origins, set_explicit_config_path,
126};
127pub use mcp::{
128 McpAllowListConfig, McpAllowListRules, McpClientConfig, McpHttpServerConfig, McpLifecycleConfig, McpProviderConfig,
129 McpStdioServerConfig, McpTransportConfig, McpUiConfig, McpUiMode,
130};
131pub use models::{MiMoAuthMethod, ModelId, OpenRouterMetadata};
132pub(crate) use network_allowlist::{
133 AiProviderCategories, AllowlistEntry, AllowlistMeta, DEFAULT_ALLOWLIST_TOML, LocalAiProviderEntry,
134 NetworkAllowlist, SearchCategories,
135};
136pub use optimization::{
137 AgentExecutionConfig, AsyncPipelineConfig, CommandCacheConfig, FileReadCacheConfig, LLMClientConfig,
138 MemoryPoolConfig, OptimizationConfig, ProfilingConfig, ToolRegistryConfig,
139};
140pub use output_styles::{OutputStyle, OutputStyleConfig, OutputStyleManager};
141pub use root::{
142 AskQuestionsConfig, ChatConfig, LayoutModeOverride, NotificationBackend, NotificationDeliveryMode, PtyConfig,
143 ReasoningDisplayMode, ToolDisplayMode, ToolOutputMode, UiConfig, UiDisplayMode, UiFullscreenConfig,
144 UiNotificationsConfig, UiProgramStatusConfig, UiTranscriptReviewConfig,
145};
146#[cfg(feature = "schema")]
147pub use schema::{vtcode_config_schema, vtcode_config_schema_json, vtcode_config_schema_pretty};
148pub use status_line::{StatusLineConfig, StatusLineMode};
149pub use subagents::{
150 AgentMode, DiscoveredSubagents, IsolationMode, SubagentDiscoveryInput, SubagentMcpServer, SubagentMemoryScope,
151 SubagentRuntimeLimits, SubagentSource, SubagentSpec, builtin_plan_agent, builtin_primary_auto_agent,
152 builtin_primary_build_agent, builtin_primary_coordinator_agent, builtin_primary_duck_agent, builtin_subagents,
153 discover_subagents, load_subagent_from_file,
154};
155pub use telemetry::TelemetryConfig;
156pub use terminal_title::effective_title_items;
157pub use terminal_title::{DEFAULT_TERMINAL_TITLE_ITEMS, TerminalTitleConfig};
158pub use timeouts::{TimeoutsConfig, resolve_timeout};
159pub use types::{
160 ReasoningEffortLevel, ResolvedShellPromptProfile, ShellProfilePlatform, ShellPromptProfile, SystemPromptMode,
161 ToolDocumentationMode, UiSurfacePreference, VerbosityLevel,
162};
163pub use vtcode_commons::ui_protocol::{CommunicationStyle, DiffPreviewMode, ThinkingBlockState};
164pub use webmcp::{RemoteMcpConfig, WebmcpConfig};
165pub use workspace_env::{
166 read_workspace_env_value, remove_workspace_env_value, workspace_env_path, workspace_env_path_display,
167 write_workspace_env_value,
168};
169
170pub use auth::{
172 AuthStatus, CopilotAuthConfig as AuthCopilotConfig, McpOAuthConfig, McpOAuthService, McpOAuthStatus, McpOAuthToken,
173 OpenAIAccountAuthService, OpenAIChatGptAuthHandle, OpenAIChatGptAuthStatus, OpenAIChatGptSession,
174 OpenRouterOAuthConfig, OpenRouterToken, PkceChallenge, clear_oauth_token, clear_openai_chatgpt_session,
175 generate_pkce_challenge, get_auth_status, get_auth_url, get_openai_chatgpt_auth_status,
176 get_openai_chatgpt_auth_url, load_oauth_token, load_openai_chatgpt_session, resolve_openai_auth, save_oauth_token,
177 save_openai_chatgpt_session,
178};
179pub use codex::{
180 FileOpener, HistoryConfig, HistoryPersistence, NotificationCondition, TerminalNotificationMethod,
181 TuiAlternateScreen, TuiConfig, TuiNotificationEvent, TuiNotificationsConfig,
182};