export type CliArgs = readonly string[]; export type CommandRunner = (args: CliArgs) => Promise; export type CommandCategory = "admin" | "introspection"; export interface HostCapabilities { readonly claudeSkillHandoff?: boolean; readonly tmuxAvailable?: boolean; } export interface RuntimeEnvironment { readonly OKSTRA_RUNTIME_HOST?: string; } export interface HostRuntimeResolution { readonly ok: boolean; readonly requestedRuntime: string; readonly resolvedRuntime: string | null; readonly launchMode: string | null; readonly installTargets: readonly string[]; readonly catalogHostIds?: readonly string[]; readonly host: string; readonly confidence: string; readonly reason: string; readonly fallbackFrom: string | null; readonly warnings: readonly string[]; } export interface HostDescriptor { readonly id: string; readonly install_targets?: readonly string[]; readonly installTargets?: readonly string[]; } export interface HostRegistryCatalog { readonly hosts?: readonly HostDescriptor[]; } export interface HostProbeOptions { readonly hostRuntime: string; readonly entryMode: string; readonly projectRoot: string; readonly homeDir: string; readonly availableFunctions?: readonly string[]; } export type HostReadinessStatus = "ready" | "blocked" | "unknown"; export interface HostReadiness { readonly runtime: string; readonly status: HostReadinessStatus; readonly checks: readonly unknown[]; readonly [key: string]: unknown; } export interface HostResolveOptions { readonly requestedRuntime: string; readonly command: string; readonly env?: RuntimeEnvironment; readonly capabilities?: HostCapabilities; } export interface CommandDefinition { readonly name: string; readonly module: string; readonly export: string; readonly category: CommandCategory; readonly summary: readonly string[]; } export interface RuntimePaths { readonly agents: string; readonly workspace: string; readonly pythonpath: string; readonly bin: string; readonly home: string; readonly package: string; readonly version: string; readonly "dev-link": string; } export interface ProcessResult { readonly code: number; readonly stdout: string; readonly stderr: string; } export type PythonRunner = (options: PythonModuleOptions) => Promise; export interface PythonModuleOptions { readonly module: string; readonly args?: CliArgs; readonly extraEnv?: Readonly>; readonly stdio?: "capture" | "inherit-stdout"; } export interface PythonSnippetOptions { readonly script: string; readonly args?: CliArgs; readonly extraEnv?: Readonly>; } export interface InstalledScriptOptions { readonly scriptName: string; readonly args: CliArgs; readonly usage: string; readonly emptyArgsCode?: number; } export interface InstalledValidatorOptions { readonly validatorName: string; readonly args: CliArgs; } export interface JsonErrorOptions { readonly stage: string; readonly reason: string; readonly extra?: Readonly>; } export interface RuntimeResolutionManifest { readonly requestedRuntime: string; readonly resolvedRuntime: string; readonly launchMode: string | null; readonly installTargets: readonly string[]; readonly host: string; readonly confidence: string; readonly reason: string; readonly fallbackFrom: string | null; readonly warnings: readonly string[]; readonly catalogHostIds?: readonly string[]; } export interface InstalledAssets { readonly sharedRuntime: boolean; readonly claudeSkills: boolean; readonly claudeAgents: boolean; readonly binWrappers: boolean; readonly templates: boolean; readonly schemas: boolean; readonly validators: boolean; } export interface RuntimeManifest { readonly schemaVersion: number; readonly installedAt: string; readonly installRequest: string; readonly runtimeResolution: RuntimeResolutionManifest | null; readonly installedRuntimes: readonly string[]; readonly installedAssets: InstalledAssets; }