/** * Install router (v0.9.6) — routes catalog install commands to safe targets * so that `slaminar install X` doesn't silently dirty the user's CWD. * * Routing by installMethod: * git-clone → clone into `~/.config/slaminar/refs//` (not CWD) * npm-global, pip → run globally, no CWD dependency * npm-dev, npm-init, npx → scaffolders; require explicit `--target ` * marketplace → surface a reminder to run `/install-plugin X` inside * Claude Code (no shell equivalent available) */ import type { CatalogTool } from '../types/index.js'; export type RoutedAction = 'git-clone-ref' | 'npm-global' | 'pip-global' | 'scaffold' | 'marketplace' | 'unknown'; export interface RoutedPlan { tool: string; method: CatalogTool['installMethod']; action: RoutedAction; cwd: string; commands: Array<{ bin: string; args: string[]; }>; notes: string[]; /** Set when the plan cannot be executed (e.g. scaffolder without --target). */ blocked?: string; } export interface RouteOptions { target?: string; refDir?: string; } export declare function defaultRefDir(): string; export declare function routeInstall(tool: CatalogTool, opts?: RouteOptions): RoutedPlan; export interface ExecResult { tool: string; plan: RoutedPlan; success: boolean; output: string; error?: string; } export interface ExecOptions { dryRun?: boolean; timeoutMs?: number; } export declare function executePlan(plan: RoutedPlan, opts?: ExecOptions): ExecResult; export declare function auditLogPath(): string; export declare function appendAudit(result: ExecResult): void;