chore: include pre-built dist for github install

This commit is contained in:
Robin Mordasiewicz
2026-03-14 04:56:50 +00:00
parent a7f0a4cf46
commit bce8ff3a75
1011 changed files with 150081 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
import type { CheckResult } from "../types";
export declare function checkConfig(): Promise<CheckResult>;
+4
View File
@@ -0,0 +1,4 @@
import type { DependencyInfo } from "../types";
export declare function checkAstGrepCli(): Promise<DependencyInfo>;
export declare function checkAstGrepNapi(): Promise<DependencyInfo>;
export declare function checkCommentChecker(): Promise<DependencyInfo>;
+7
View File
@@ -0,0 +1,7 @@
import type { CheckDefinition } from "../types";
import { gatherSystemInfo } from "./system";
import { gatherToolsSummary } from "./tools";
export type { CheckDefinition };
export * from "./model-resolution-types";
export { gatherSystemInfo, gatherToolsSummary };
export declare function getAllCheckDefinitions(): CheckDefinition[];
+2
View File
@@ -0,0 +1,2 @@
import type { AvailableModelsInfo } from "./model-resolution-types";
export declare function loadAvailableModelsFromCache(): AvailableModelsInfo;
+2
View File
@@ -0,0 +1,2 @@
import type { OmoConfig } from "./model-resolution-types";
export declare function loadOmoConfig(): OmoConfig | null;
+6
View File
@@ -0,0 +1,6 @@
import type { AvailableModelsInfo, ModelResolutionInfo, OmoConfig } from "./model-resolution-types";
export declare function buildModelResolutionDetails(options: {
info: ModelResolutionInfo;
available: AvailableModelsInfo;
config: OmoConfig;
}): string[];
@@ -0,0 +1,3 @@
import type { ModelRequirement } from "../../../shared/model-requirements";
export declare function getEffectiveModel(requirement: ModelRequirement, userOverride?: string): string;
export declare function buildEffectiveResolution(requirement: ModelRequirement, userOverride?: string): string;
+37
View File
@@ -0,0 +1,37 @@
import type { ModelRequirement } from "../../../shared/model-requirements";
export interface AgentResolutionInfo {
name: string;
requirement: ModelRequirement;
userOverride?: string;
userVariant?: string;
effectiveModel: string;
effectiveResolution: string;
}
export interface CategoryResolutionInfo {
name: string;
requirement: ModelRequirement;
userOverride?: string;
userVariant?: string;
effectiveModel: string;
effectiveResolution: string;
}
export interface ModelResolutionInfo {
agents: AgentResolutionInfo[];
categories: CategoryResolutionInfo[];
}
export interface OmoConfig {
agents?: Record<string, {
model?: string;
variant?: string;
category?: string;
}>;
categories?: Record<string, {
model?: string;
variant?: string;
}>;
}
export interface AvailableModelsInfo {
providers: string[];
modelCount: number;
cacheExists: boolean;
}
+5
View File
@@ -0,0 +1,5 @@
import type { ModelRequirement } from "../../../shared/model-requirements";
import type { OmoConfig } from "./model-resolution-types";
export declare function formatModelWithVariant(model: string, variant?: string): string;
export declare function getEffectiveVariant(agentName: string, requirement: ModelRequirement, config: OmoConfig): string | undefined;
export declare function getCategoryEffectiveVariant(categoryName: string, requirement: ModelRequirement, config: OmoConfig): string | undefined;
+6
View File
@@ -0,0 +1,6 @@
import type { CheckResult } from "../types";
import type { ModelResolutionInfo, OmoConfig } from "./model-resolution-types";
export declare function getModelResolutionInfo(): ModelResolutionInfo;
export declare function getModelResolutionInfoWithOverrides(config: OmoConfig): ModelResolutionInfo;
export declare function checkModels(): Promise<CheckResult>;
export declare const checkModelResolution: typeof checkModels;
+13
View File
@@ -0,0 +1,13 @@
export interface OpenCodeBinaryInfo {
binary: string;
path: string;
}
export declare function getDesktopAppPaths(platform: NodeJS.Platform): string[];
export declare function getBinaryLookupCommand(platform: NodeJS.Platform): "which" | "where";
export declare function parseBinaryPaths(output: string): string[];
export declare function selectBinaryPath(paths: string[], platform: NodeJS.Platform): string | null;
export declare function buildVersionCommand(binaryPath: string, platform: NodeJS.Platform): string[];
export declare function findDesktopBinary(platform?: NodeJS.Platform, checkExists?: (path: string) => boolean): OpenCodeBinaryInfo | null;
export declare function findOpenCodeBinary(): Promise<OpenCodeBinaryInfo | null>;
export declare function getOpenCodeVersion(binaryPath: string, platform?: NodeJS.Platform): Promise<string | null>;
export declare function compareVersions(current: string, minimum: string): boolean;
+10
View File
@@ -0,0 +1,10 @@
export interface LoadedVersionInfo {
cacheDir: string;
cachePackagePath: string;
installedPackagePath: string;
expectedVersion: string | null;
loadedVersion: string | null;
}
export declare function getLoadedPluginVersion(): LoadedVersionInfo;
export declare function getLatestPluginVersion(currentVersion: string | null): Promise<string | null>;
export declare function getSuggestedInstallTag(currentVersion: string | null): string;
+15
View File
@@ -0,0 +1,15 @@
export interface PluginInfo {
registered: boolean;
configPath: string | null;
entry: string | null;
isPinned: boolean;
pinnedVersion: string | null;
isLocalDev: boolean;
}
declare function detectConfigPath(): string | null;
declare function findPluginEntry(entries: string[]): {
entry: string;
isLocalDev: boolean;
} | null;
export declare function getPluginInfo(): PluginInfo;
export { detectConfigPath, findPluginEntry };
+3
View File
@@ -0,0 +1,3 @@
import type { CheckResult, SystemInfo } from "../types";
export declare function gatherSystemInfo(): Promise<SystemInfo>;
export declare function checkSystem(): Promise<CheckResult>;
+10
View File
@@ -0,0 +1,10 @@
export interface GhCliInfo {
installed: boolean;
version: string | null;
path: string | null;
authenticated: boolean;
username: string | null;
scopes: string[];
error: string | null;
}
export declare function getGhCliInfo(): Promise<GhCliInfo>;
+6
View File
@@ -0,0 +1,6 @@
import type { LspServerInfo } from "../types";
export declare function getLspServersInfo(): LspServerInfo[];
export declare function getLspServerStats(servers: LspServerInfo[]): {
installed: number;
total: number;
};
+3
View File
@@ -0,0 +1,3 @@
import type { McpServerInfo } from "../types";
export declare function getBuiltinMcpInfo(): McpServerInfo[];
export declare function getUserMcpInfo(): McpServerInfo[];
+3
View File
@@ -0,0 +1,3 @@
import type { CheckResult, ToolsSummary } from "../types";
export declare function gatherToolsSummary(): Promise<ToolsSummary>;
export declare function checkTools(): Promise<CheckResult>;
+29
View File
@@ -0,0 +1,29 @@
export declare const SYMBOLS: {
readonly check: string;
readonly cross: string;
readonly warn: string;
readonly info: string;
readonly arrow: string;
readonly bullet: string;
readonly skip: string;
};
export declare const STATUS_COLORS: {
readonly pass: import("picocolors/types").Formatter;
readonly fail: import("picocolors/types").Formatter;
readonly warn: import("picocolors/types").Formatter;
readonly skip: import("picocolors/types").Formatter;
};
export declare const CHECK_IDS: {
readonly SYSTEM: "system";
readonly CONFIG: "config";
readonly TOOLS: "tools";
readonly MODELS: "models";
};
export declare const CHECK_NAMES: Record<string, string>;
export declare const EXIT_CODES: {
readonly SUCCESS: 0;
readonly FAILURE: 1;
};
export declare const MIN_OPENCODE_VERSION = "1.0.150";
export declare const PACKAGE_NAME = "oh-my-opencode";
export declare const OPENCODE_BINARIES: readonly ["opencode", "opencode-desktop"];
+2
View File
@@ -0,0 +1,2 @@
import type { DoctorResult } from "./types";
export declare function formatDefault(result: DoctorResult): string;
+6
View File
@@ -0,0 +1,6 @@
import type { CheckStatus, DoctorIssue } from "./types";
export declare function formatStatusSymbol(status: CheckStatus): string;
export declare function formatStatusMark(available: boolean): string;
export declare function stripAnsi(str: string): string;
export declare function formatHeader(): string;
export declare function formatIssue(issue: DoctorIssue, index: number): string;
+2
View File
@@ -0,0 +1,2 @@
import type { DoctorResult } from "./types";
export declare function formatStatus(result: DoctorResult): string;
+2
View File
@@ -0,0 +1,2 @@
import type { DoctorResult } from "./types";
export declare function formatVerbose(result: DoctorResult): string;
+3
View File
@@ -0,0 +1,3 @@
import type { DoctorResult, DoctorMode } from "./types";
export declare function formatDoctorOutput(result: DoctorResult, mode: DoctorMode): string;
export declare function formatJsonOutput(result: DoctorResult): string;
+5
View File
@@ -0,0 +1,5 @@
import type { DoctorOptions } from "./types";
export declare function doctor(options?: DoctorOptions): Promise<number>;
export * from "./types";
export { runDoctor } from "./runner";
export { formatDoctorOutput, formatJsonOutput } from "./formatter";
+5
View File
@@ -0,0 +1,5 @@
import type { DoctorOptions, DoctorResult, CheckDefinition, CheckResult, DoctorSummary } from "./types";
export declare function runCheck(check: CheckDefinition): Promise<CheckResult>;
export declare function calculateSummary(results: CheckResult[], duration: number): DoctorSummary;
export declare function determineExitCode(results: CheckResult[]): number;
export declare function runDoctor(options: DoctorOptions): Promise<DoctorResult>;
+124
View File
@@ -0,0 +1,124 @@
export type DoctorMode = "default" | "status" | "verbose";
export interface DoctorOptions {
mode: DoctorMode;
json?: boolean;
}
export interface DoctorIssue {
title: string;
description: string;
fix?: string;
affects?: string[];
severity: "error" | "warning";
}
export type CheckStatus = "pass" | "fail" | "warn" | "skip";
export interface CheckResult {
name: string;
status: CheckStatus;
message: string;
details?: string[];
issues: DoctorIssue[];
duration?: number;
}
export type CheckFunction = () => Promise<CheckResult>;
export interface CheckDefinition {
id: string;
name: string;
check: CheckFunction;
critical?: boolean;
}
export interface SystemInfo {
opencodeVersion: string | null;
opencodePath: string | null;
pluginVersion: string | null;
loadedVersion: string | null;
bunVersion: string | null;
configPath: string | null;
configValid: boolean;
isLocalDev: boolean;
}
export interface ToolsSummary {
lspInstalled: number;
lspTotal: number;
astGrepCli: boolean;
astGrepNapi: boolean;
commentChecker: boolean;
ghCli: {
installed: boolean;
authenticated: boolean;
username: string | null;
};
mcpBuiltin: string[];
mcpUser: string[];
}
export interface DoctorSummary {
total: number;
passed: number;
failed: number;
warnings: number;
skipped: number;
duration: number;
}
export interface DoctorResult {
results: CheckResult[];
systemInfo: SystemInfo;
tools: ToolsSummary;
summary: DoctorSummary;
exitCode: number;
}
export type CheckCategory = "installation" | "configuration" | "authentication" | "dependencies" | "tools" | "updates";
export interface OpenCodeInfo {
installed: boolean;
version: string | null;
path: string | null;
binary: "opencode" | "opencode-desktop" | null;
}
export interface PluginInfo {
registered: boolean;
configPath: string | null;
entry: string | null;
isPinned: boolean;
pinnedVersion: string | null;
}
export interface ConfigInfo {
exists: boolean;
path: string | null;
format: "json" | "jsonc" | null;
valid: boolean;
errors: string[];
}
export type AuthProviderId = "anthropic" | "openai" | "google";
export interface AuthProviderInfo {
id: AuthProviderId;
name: string;
pluginInstalled: boolean;
configured: boolean;
error?: string;
}
export interface DependencyInfo {
name: string;
required: boolean;
installed: boolean;
version: string | null;
path: string | null;
installHint?: string;
}
export interface LspServerInfo {
id: string;
installed: boolean;
extensions: string[];
source: "builtin" | "config" | "plugin";
}
export interface McpServerInfo {
id: string;
type: "builtin" | "user";
enabled: boolean;
valid: boolean;
error?: string;
}
export interface VersionCheckInfo {
currentVersion: string | null;
latestVersion: string | null;
isUpToDate: boolean;
isLocalDev: boolean;
isPinned: boolean;
}