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