export type ClientName = "codex" | "claude" | "opencode"; export type CapabilityMode = "off" | "registered" | "auto" | "project" | "always"; export type RiskLevel = "low" | "medium" | "high"; export type ReportFormat = "terminal" | "json" | "markdown" | "sarif" | "html"; export interface CapabilitySelection { mode: CapabilityMode; provider?: string; options?: Record; } export interface CapabilityDefinition { description: string; defaultProvider: string; defaultMode: CapabilityMode; risk: RiskLevel; conflicts?: string[]; projectSignals?: string[]; skills?: string[]; } export interface CapabilityRegistry { schemaVersion: 2; capabilities: Record; } export interface ProviderDefinition { description: string; kind: "builtin" | "skill" | "cli" | "mcp" | "plugin" | "hook"; source: string; version?: string; commit?: string; executable?: string; versionArgs?: string[]; args?: string[]; serverName?: string; transport?: "stdio" | "http"; endpoint?: string; clients: ClientName[]; risk: RiskLevel; network: boolean; authenticated: boolean; writes: boolean; hooks: boolean; } export interface ProviderRegistry { schemaVersion: 2; providers: Record; } export interface DependencyInstaller { platforms?: NodeJS.Platform[]; architectures?: NodeJS.Architecture[]; requires?: string; command?: string; args?: string[]; environment?: Record; artifact?: { url: string; sha256: string; archive: "tar.gz"; executable: string; target: "go-bin"; }; versionCheck?: { command: string; args: string[]; minimum: string; }; } export interface DependencyDefinition { description: string; source: string; version?: string; commit?: string; requiredBy: string[]; satisfiedBy: string[]; installers: DependencyInstaller[]; } export interface DependencyRegistry { schemaVersion: 1; dependencies: Record; } export interface DependencyPlanItem { name: string; description: string; source: string; version?: string; commit?: string; requiredBy: string[]; satisfiedBy: string[]; status: "satisfied" | "missing" | "unresolved"; spec?: DependencyInstallSpec; remediation?: string; } export interface ProfileDefinition { schemaVersion: 2; name: string; description: string; detects?: string[]; capabilities: Record; skills?: string[]; } export interface Components { policies: boolean; bundledSkills: boolean; externalSkills: boolean; contextMode: boolean; serena: boolean; astGrep: boolean; } export interface Preset { schemaVersion: 1 | 2; name: string; description: string; components: Components; capabilities: Record; externalSkillSets?: string[]; } export interface UserConfig { schemaVersion: 1 | 2; preset?: string; clients?: "auto" | ClientName[]; components?: Partial; capabilities?: Record; profiles?: string[]; externalSkillSets?: string[]; } export interface ToolRegistry { schemaVersion: number; tools: Record; }>; } export interface SkillSource { repository: string; commit: string; version: string; license: string; licensePath: string; licenseDigest?: string; reviewedAt?: string; risk?: RiskLevel; contentDigests?: Record; permissions?: { network: boolean; hooks: boolean; writesOutsideProject: boolean; }; sets: Record; } export interface SkillSourcesRegistry { schemaVersion: number; sources: Record; } export interface AppPaths { home: string; configDir: string; dataDir: string; stateDir: string; appConfigDir: string; appDataDir: string; appStateDir: string; } export interface CommandSpec { command: string; args: string[]; environment?: Record; inverse?: CommandSpec; cwd?: string; timeoutMs?: number; } export interface ArtifactInstallSpec { kind: "artifact"; url: string; sha256: string; archive: "tar.gz"; executable: string; target: string; extractor: string; command?: undefined; args?: undefined; } export type DependencyInstallSpec = CommandSpec | ArtifactInstallSpec; export type PlanItem = { kind: "write"; id: string; description: string; target: string; content: string; } | { kind: "symlink"; id: string; description: string; target: string; source: string; replaceExisting?: boolean; } | { kind: "copy-dir"; id: string; description: string; target: string; source: string; } | { kind: "external-skills"; id: string; description: string; target: string; sourceName: string; skillSet: string; } | { kind: "command"; id: string; description: string; spec: CommandSpec; } | { kind: "notice"; id: string; description: string; level: "info" | "warn" | "error"; }; export interface InstallPlan { preset: Preset; items: PlanItem[]; clients: Record; capabilities: Record; releaseDir: string; dependencies?: DependencyPlanItem[]; } export interface Finding { id: string; capability: string; status: "pass" | "info" | "warning" | "error"; summary: string; evidence?: string[]; remediation?: string; source?: string; durationMs?: number; } export interface PathSnapshot { target: string; existed: boolean; type?: "file" | "directory" | "symlink"; backupPath?: string; symlinkTarget?: string; } export interface AppliedCommand { id: string; inverse?: CommandSpec; } export interface InstallManifest { schemaVersion: 1; toolkitVersion: string; createdAt: string; preset: string; backupDir: string; snapshots: PathSnapshot[]; commands: AppliedCommand[]; ownedSymlinks: string[]; } export type ProgressCallback = (completed: number, total: number, label: string) => void; export interface GlobalOptions { home: string; root: string; preset?: string; dryRun: boolean; json: boolean; yes: boolean; skipExternal: boolean; adoptExisting?: boolean; format?: ReportFormat; output?: string; budget?: number; skipDependencies?: boolean; assumedExecutables?: string[]; }