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