refactor(doctor): redesign with 3-tier output and consolidated checks

Consolidate 16 separate checks into 5 (system, config, providers, tools, models).
Add 3-tier formatting: default (problems-only), --status (dashboard), --verbose (deep diagnostics).
Read actual loaded plugin version from opencode cache directory.
Check environment variables for provider authentication.
This commit is contained in:
YeonGyu-Kim
2026-02-13 17:29:38 +09:00
parent f7295db277
commit fe5c0ad8c2
45 changed files with 1808 additions and 3328 deletions
+34 -38
View File
@@ -1,46 +1,42 @@
import type { CheckDefinition } from "../types"
import { getOpenCodeCheckDefinition } from "./opencode"
import { getPluginCheckDefinition } from "./plugin"
import { getConfigCheckDefinition } from "./config"
import { getModelResolutionCheckDefinition } from "./model-resolution"
import { getAuthCheckDefinitions } from "./auth"
import { getDependencyCheckDefinitions } from "./dependencies"
import { getGhCliCheckDefinition } from "./gh"
import { getLspCheckDefinition } from "./lsp"
import { getMcpCheckDefinitions } from "./mcp"
import { getMcpOAuthCheckDefinition } from "./mcp-oauth"
import { getVersionCheckDefinition } from "./version"
import { CHECK_IDS, CHECK_NAMES } from "../constants"
import { checkSystem, gatherSystemInfo } from "./system"
import { checkConfig } from "./config"
import { checkProviders, gatherProviderStatuses } from "./providers"
import { checkTools, gatherToolsSummary } from "./tools"
import { checkModels } from "./model-resolution"
export * from "./opencode"
export * from "./plugin"
export * from "./config"
export * from "./model-resolution"
export type { CheckDefinition }
export * from "./model-resolution-types"
export * from "./model-resolution-cache"
export * from "./model-resolution-config"
export * from "./model-resolution-effective-model"
export * from "./model-resolution-variant"
export * from "./model-resolution-details"
export * from "./auth"
export * from "./dependencies"
export * from "./gh"
export * from "./lsp"
export * from "./mcp"
export * from "./mcp-oauth"
export * from "./version"
export { gatherSystemInfo, gatherProviderStatuses, gatherToolsSummary }
export function getAllCheckDefinitions(): CheckDefinition[] {
return [
getOpenCodeCheckDefinition(),
getPluginCheckDefinition(),
getConfigCheckDefinition(),
getModelResolutionCheckDefinition(),
...getAuthCheckDefinitions(),
...getDependencyCheckDefinitions(),
getGhCliCheckDefinition(),
getLspCheckDefinition(),
...getMcpCheckDefinitions(),
getMcpOAuthCheckDefinition(),
getVersionCheckDefinition(),
{
id: CHECK_IDS.SYSTEM,
name: CHECK_NAMES[CHECK_IDS.SYSTEM],
check: checkSystem,
critical: true,
},
{
id: CHECK_IDS.CONFIG,
name: CHECK_NAMES[CHECK_IDS.CONFIG],
check: checkConfig,
},
{
id: CHECK_IDS.PROVIDERS,
name: CHECK_NAMES[CHECK_IDS.PROVIDERS],
check: checkProviders,
},
{
id: CHECK_IDS.TOOLS,
name: CHECK_NAMES[CHECK_IDS.TOOLS],
check: checkTools,
},
{
id: CHECK_IDS.MODELS,
name: CHECK_NAMES[CHECK_IDS.MODELS],
check: checkModels,
},
]
}