@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
40 lines • 2.16 kB
TypeScript
import type { SettingsManager, TerminalSettings } from "../../../settings-manager.ts";
export type TimeoutAction = "background" | "kill";
export type NotifyMode = "wake" | "next-turn" | "off";
export interface MonitorDeliverySettings {
readonly coalesceWindowMs: number;
readonly rateLimitMs: number;
readonly maxLinesPerInjection: number;
readonly maxCharsPerInjection: number;
readonly wakeBudget: number;
/** Average wakes an hour (and burst size) of a persistent command watch; more lines batch. */
readonly wakesPerHour: number;
}
/** Runaway guard of a persistent command watch: pause after this many lines a minute for this many minutes. */
export interface MonitorRunawayGuard {
readonly linesPerMinute: number;
readonly minutes: number;
}
export interface ResolvedTerminalSettings {
readonly redactSecretsInOutput?: boolean;
readonly defaultCols: number;
readonly defaultRows: number;
readonly scrollback: number;
readonly maxSessions: number;
readonly timeoutAction: TimeoutAction;
readonly notify: NotifyMode;
readonly monitor: MonitorDeliverySettings;
readonly monitorRunaway: MonitorRunawayGuard;
/** Admission cap on persistent (restart-surviving) monitors per session. */
readonly maxDurableMonitors: number | "unlimited";
/** Age in minutes at which a background session is stopped (senpi#6201); undefined means never (the default). */
readonly backgroundAutoReapMinutes: number | undefined;
}
export declare const TERMINAL_SETTINGS_DEFAULTS: ResolvedTerminalSettings;
/** Upper bound of a wake rate (setting or per-monitor override): one wake a second on average. */
export declare const MAX_MONITOR_WAKES_PER_HOUR = 3600;
/** Resolve terminal-tool config from a raw `terminal` settings block, filling defaults. */
export declare function resolveTerminalSettings(raw: TerminalSettings | undefined): ResolvedTerminalSettings;
/** Load and merge terminal-tool settings from global + project settings.json. */
export declare function loadTerminalSettings(settingsManager: SettingsManager): ResolvedTerminalSettings;
//# sourceMappingURL=settings.d.ts.map