/** * omx doctor - Validate oh-my-codex installation */ import { type NativeHookClaimJournalDurability } from "./native-hook-claim-journal.js"; import { spawnSync } from "child_process"; import { type CanonicalSessionBindingSnapshot } from "../mcp/state-paths.js"; import { type SetupInstallMode } from "./setup-preferences.js"; import { type ProcessInspectionProvider } from "../hooks/session.js"; /** @internal Test seam for deterministic claim-journal durability coverage. */ export declare function setDoctorClaimJournalDurabilityForTest(durability: NativeHookClaimJournalDurability | undefined): () => void; interface DoctorOptions { verbose?: boolean; force?: boolean; dryRun?: boolean; team?: boolean; } interface Check { name: string; status: "pass" | "warn" | "fail"; message: string; } interface RepoArtifactStats { uid?: number; gid?: number; isSymbolicLink(): boolean; isDirectory(): boolean; } interface RepoArtifactScanOptions { currentUid?: number; currentGid?: number; maxExamples?: number; statPath?: (path: string) => Promise; readDir?: (path: string) => Promise; accessPath?: (path: string, mode: number) => Promise; } interface RepoArtifactRepairOptions extends RepoArtifactScanOptions { chownPath?: (path: string, uid: number, gid: number) => Promise; } interface NativeHookDistSmokeOptions { packageRoot?: string; nodePath?: string; runner?: typeof spawnSync; } interface ProcessIdentityReadinessOptions { platform?: NodeJS.Platform; pid?: number; provider?: Pick; } type DoctorSetupScope = "user" | "project"; interface DoctorPaths { codexHomeDir: string; configPath: string; hooksPath: string; promptsDir: string; skillsDir: string; agentsDir: string; stateDir: string; } type BindingSelectorName = "OMX_SESSION_ID" | "CODEX_SESSION_ID" | "SESSION_ID"; export declare function sanitizeBindingDiagnosticLine(value: string): string; declare function selectorEvaluation(snapshot: CanonicalSessionBindingSnapshot, env: NodeJS.ProcessEnv): { nonblank: BindingSelectorName[]; bad: BindingSelectorName[]; }; export declare const evaluateStateRootSessionBinding: typeof selectorEvaluation; export declare function formatStateRootSessionBindingDiagnostic(snapshot: CanonicalSessionBindingSnapshot, env?: NodeJS.ProcessEnv, badSelectors?: readonly BindingSelectorName[]): string; export declare function checkStateRootSessionBinding(snapshot: CanonicalSessionBindingSnapshot, env?: NodeJS.ProcessEnv): Check; export declare function doctor(options?: DoctorOptions): Promise; export declare function checkProcessIdentityReadiness(options?: ProcessIdentityReadinessOptions): Check | null; export declare function checkExploreHarness(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, options?: { exploreRoutingEnabled?: boolean; }): Check; export declare function checkRepoArtifactOwnership(repoRoot: string, options?: RepoArtifactScanOptions): Promise; export declare function repairRepoArtifactOwnership(repoRoot: string, options?: RepoArtifactRepairOptions): Promise<{ repaired: number; skipped: string[]; }>; export declare function checkLegacyMultiAgentCompatibility(configPath: string, scope: DoctorSetupScope): Promise; interface ExternalCodexProcessGuardOptions { platform?: NodeJS.Platform; homeDir?: string; } export declare function checkExternalCodexProcessGuards(options?: ExternalCodexProcessGuardOptions): Promise; export interface NativeHookCheckContext { codexHomeDir: string; installMode?: SetupInstallMode; platform?: NodeJS.Platform; } export declare function checkNativeHooks(hooksPath: string, configPath: string, context: NativeHookCheckContext): Promise; export declare function checkNativeHookDistSmoke(options?: NativeHookDistSmokeOptions): Promise; export declare function classifyPostCompactHookStdout(stdout: string): Check | null; interface PostCompactSmokeSpawnInvocation { command: string; args: string[]; shell: boolean; } export declare function buildPostCompactSmokeSpawnInvocation(expectedCommand: string, options?: { platform?: NodeJS.Platform; env?: NodeJS.ProcessEnv; }): PostCompactSmokeSpawnInvocation; interface NativePostCompactHookRuntimeOptions { nativeHooksCheck?: Check; platform?: NodeJS.Platform; expectedCommand?: string; runner?: typeof spawnSync; beforeWindowsShimSmoke?: (paths: { canonicalShimPath: string; smokeCwd: string; }) => void | Promise; } export declare function checkNativePostCompactHookRuntime(hooksPath: string, cwd: string, codexHomeDir: string, options?: NativePostCompactHookRuntimeOptions): Promise; /** * Surface effective Spark/model lane routing and flag the common reasons the * `gpt-5.6-luna` quota stays unused even though resolution is wired * (issue #2757): a missing/stale installed Spark-lane agent toml, a model that * diverges from the resolved Spark default, or a non-default provider that does * not draw from native Spark quota. */ export declare function checkSparkRouting(paths: DoctorPaths): Check; export {}; //# sourceMappingURL=doctor.d.ts.map