@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
47 lines • 1.87 kB
TypeScript
import type { ExtensionAPI } from "../../types.ts";
import { type ConfigReloadLogger } from "./log.ts";
import { type WatchClock, type WatchEventSource } from "./watch-engine.ts";
export declare const DEFAULT_DEBOUNCE_MS = 200;
type ConfigReloadWatchSettings = {
readonly settings?: boolean;
readonly models?: boolean;
readonly keybindings?: boolean;
readonly prompts?: boolean;
readonly skills?: boolean;
readonly extensions?: boolean;
};
type ConfigReloadSettingsPatch = {
readonly enabled?: boolean;
readonly debounceMs?: number;
readonly watch?: ConfigReloadWatchSettings;
};
/** Keep config-reload's settings schema owned by the builtin while exposing it on Settings. */
declare module "../../../settings-manager.ts" {
interface Settings {
configReload?: ConfigReloadSettingsPatch;
}
}
/** Session-keyed handoffs survive replacement extension factories during reload. */
export declare class ConfigReloadHandoffRegistry<T> {
#private;
set(sessionHandle: string, handoff: T): void;
take(sessionHandle: string): T | undefined;
delete(sessionHandle: string): void;
}
export interface ConfigReloadExtensionOptions {
readonly agentDir?: string;
readonly subscribe?: WatchEventSource;
readonly clock?: WatchClock;
readonly logger?: ConfigReloadLogger;
/** Test seam. Production uses the watch engine's SHA-256 implementation. */
readonly hashFile?: (path: string) => string;
}
/**
* Watch config resources and request the host's existing full reload flow.
*
* The optional options are test seams. Production registration uses the default
* filesystem event source and agent directory.
*/
export declare function configReloadExtension(pi: ExtensionAPI, options?: ConfigReloadExtensionOptions): void;
export default configReloadExtension;
//# sourceMappingURL=index.d.ts.map