/** * RTK (Rust Token Killer) installer + PATH detection. * * RTK is a token-optimized shell command proxy. See * https://github.com/rtk-ai/rtk for details. * * This module: * 1. Detects whether `rtk` is on PATH. * 2. Optionally runs the upstream install script * (`curl -fsSL | sh`) when missing. * 3. Provides a short instruction block that can be injected into * agent sessions so they know to prefix shell commands with `rtk`. * * The installer runs at most once per process and is safe to call from * plugin init — it returns immediately if RTK is already present or if * auto-install is disabled. Network/subprocess failures are logged and * swallowed so a missing RTK never blocks startup. */ import type { Logger, RtkConfig } from '../types'; /** Short instruction snippet injected into agent sessions. */ export declare const RTK_INSTRUCTION_BLOCK = "# RTK - Rust Token Killer\n\n**Usage**: Token-optimized CLI proxy for shell commands.\n\n## Rule\n\nAlways prefix shell commands with `rtk`.\n\nExamples:\n\n```bash\nrtk git status\nrtk cargo test\nrtk npm run build\nrtk pytest -q\n```\n\n## Meta Commands\n\n```bash\nrtk gain # Token savings analytics\nrtk gain --history # Recent command savings history\nrtk proxy # Run raw command without filtering\n```\n\n## Verification\n\n```bash\nrtk --version\nrtk gain\nwhich rtk\n```\n"; /** Whether `rtk` binary is reachable on PATH. */ export declare function isRtkInstalled(): boolean; /** Resolve final RTK config with defaults applied. */ export declare function resolveRtkConfig(config?: RtkConfig): Required>; /** * Ensure RTK is available. If missing and auto-install is enabled, run * `curl -fsSL | sh` in a detached child process. Never throws. * * Returns a promise that resolves with the final install state. */ export declare function ensureRtkInstalled(logger: Logger, config?: RtkConfig): Promise<{ installed: boolean; skipped: boolean; reason?: string; }>; //# sourceMappingURL=rtk.d.ts.map