Skip to content

A desktop coding agent with free access to frontier models.

TypeScript
1.7 KB
Raw Blame
export type PathEnv = Record<string, string | undefined>;

export interface PathOptions {
  env?: PathEnv;
  homeDir?: string;
  platform?: NodeJS.Platform;
  userDataDir?: string;
}

export interface OpencodeDbPathOptions extends PathOptions {
  /** Additional OpenCode data roots to search before the platform defaults. */
  dataDirs?: string[];
  /** Channel used when OPENCODE_CHANNEL is unset. */
  defaultChannel?: string;
}

export declare const MAX_CONFIG_ROOT_LENGTH: 4096;

export declare function normalizeWorkspaceRootPath(value: unknown, opts?: PathOptions): string;
export declare function omnirushConfigDir(opts?: PathOptions): string;
export declare function omnirushServerConfigPath(opts?: PathOptions): string;
export declare function omnirushEnvStorePath(opts?: PathOptions): string;
export declare function globalOpencodeConfigDir(opts?: PathOptions): string;
export declare function resolveGlobalOpencodeConfigPath(opts?: PathOptions): string;
export declare function workspaceOpencodeConfigCandidates(workspaceRoot: string): string[];
export declare function resolveWorkspaceOpencodeConfigPath(workspaceRoot: string): string;
export declare function desktopBootstrapPath(opts?: PathOptions): string;
export declare function legacyDesktopBootstrapPath(opts?: PathOptions): string;
export declare function expandHomePath(value: string, opts?: PathOptions): string;
export declare function omnirushServerDataDir(opts?: PathOptions): string;
export declare function opencodeDataDirs(opts?: PathOptions): string[];
export declare function opencodeDbCandidates(opts?: OpencodeDbPathOptions): string[];
export declare function opencodeCacheDirs(opts?: PathOptions): string[];