/** * Normalised configuration for the pi-autocommit extension. */ export interface PiAutocommitConfig { /** * Language for the commit message (subject and body). `"auto"` (default) * resolves from the conversation; any language name or code (e.g. `"ja"`, * `"Korean"`) is passed to the LLM prompt as-is. */ lang: string; /** * Resolved commit message language display name (e.g. "Japanese"), set by * the reorganiser from conversation auto-detection when `lang` is unset. * Runtime-only — never persisted to the config file. */ langName?: string; /** Whether auto-commit is enabled. Defaults to `false`. */ enable: boolean; /** * LLM model for commit message generation, in `"provider/modelId"` format * (e.g. `"anthropic/claude-sonnet-4"`). * When omitted, the session's current model is used. */ model?: string; /** * Path-to-scope mapping that fixes the Conventional Commits scope * deterministically. Keys are picomatch globs evaluated against changed * file paths; values are the scope to apply. When set, the LLM is told to * omit scope and the scope is injected by `scope-resolver.ts`. * When unset (or empty), the LLM infers the scope as before. */ scope?: Record; /** * Maximum number of recent commits to fetch from HEAD for the commit picker * popup shown at `agent_end`. Defaults to `30`. */ commitPickerMaxCommits: number; /** * Keep submodule-related parent-side changes out of auto-commits: * gitlink updates (mode 160000 index entries, including absorbed embedded * repositories) and `.gitmodules`. When `true`, checkpoint commits and the * reorganiser never stage or record these paths; recording the pin updates * is left to the user. Detached-orphan warnings stay active, presented as * informational notices at `session_start` only. Defaults to `false` * (gitlinks are recorded like any other changed file, per ADR-0008). */ ignoreSubmodules: boolean; } /** * Load `.pi/pi-autocommit.json` from the project root. * * Returns default config (language auto-detect, auto-commit disabled) when * the file is missing or unreadable. */ export declare function loadConfig(cwd: string): PiAutocommitConfig; /** * Persist `enable` to `.pi/pi-autocommit.json`, preserving every other key. * * Reads the existing file (if any) and replaces only the `enable` field, * so unknown keys and other known keys (`lang`, `model`) are kept intact. * When the file does not exist, it is created with default values * (`lang: "auto"`, no `model`) and the given `enable` value. */ export declare function saveEnable(cwd: string, enable: boolean): void; /** * Persist `model` to `.pi/pi-autocommit.json`, preserving every other key. * * Reads the existing file (if any) and replaces only the `model` field, * so unknown keys and other known keys (`lang`, `enable`) are kept intact. * Pass `undefined` to clear the `model` key entirely (fall back to the * session model). When the file does not exist, it is created with default * values (`lang: "auto"`, `enable: true`) and the given `model` value. */ export declare function saveModel(cwd: string, model: string | undefined): void; /** * The language display name used for commit message generation, by * priority: the `lang` config when set (a fixed language wins over * detection), else the auto-detected `langName` (set at `agent_end`), * else English. */ export declare function resolvedLanguageName(config: PiAutocommitConfig): string; /** * Returns `true` when the commit message should be written in Japanese. */ export declare function isJapanese(config: PiAutocommitConfig): boolean; //# sourceMappingURL=config.d.ts.map