import type { ShellSuggestion } from "@kenkaiiii/gg-protocol"; export type { ShellSuggestion }; /** * What the `!` picker offers: commands the user already ran in this project * (most used first) and commands that fit the project (its git repo, package * scripts, build tool) for one they haven't run yet. */ interface HistoryEntry { command: string; count: number; lastUsed: number; } /** Commands kept per project; the least used fall off. */ export declare const SHELL_HISTORY_MAX = 100; export declare function shellHistoryFile(): string; /** Most used first; ties go to the most recent, then alphabetical. */ export declare function rankHistory(entries: readonly HistoryEntry[]): HistoryEntry[]; export declare function loadShellHistory(cwd: string): Promise; /** Count one run of `command` in this project. */ export declare function recordShellCommand(cwd: string, command: string, now?: number): Promise; type PackageManager = "pnpm" | "yarn" | "bun" | "npm"; export declare function scriptCommands(scripts: Record, pm: PackageManager): string[]; /** Commands that fit this project, best first. */ export declare function projectShellSuggestions(cwd: string): Promise; /** History first (most used), then project commands not already in it. */ export declare function mergeShellSuggestions(history: readonly HistoryEntry[], project: readonly ShellSuggestion[]): ShellSuggestion[]; export declare function shellSuggestions(cwd: string): Promise;