export type LifecycleHookMode = "off" | "observe" | "enforce";
export type LifecycleHookEvent = "before-task-transition" | "after-task-transition" | "before-module-command" | "after-module-command" | "before-task-store-persist" | "after-task-store-persist" | "before-pr-mutation" | "after-pr-mutation";
export type LifecycleHookHandlerConfig = {
    id: string;
    order: number;
    events: string[];
    kind: "node" | "shell";
    /** Workspace-relative path for kind `node` */
    modulePath?: string;
    /** argv for kind `shell` (no shell unless shellScript set) */
    argv?: string[];
    /** When set, run `/bin/sh -c <shellScript>` with cwd workspace (dangerous; documented). */
    shellScript?: string;
    timeoutMs?: number;
    maxOutputBytes?: number;
};
export type LifecycleHooksConfig = {
    enabled: boolean;
    mode: LifecycleHookMode;
    traceRelativePath: string;
    handlers: LifecycleHookHandlerConfig[];
};
export type HookHandlerVerdict = {
    verdict: "allow";
} | {
    verdict: "deny";
    reason: string;
} | {
    verdict: "modifyTransition";
    action?: string;
} | {
    verdict: "modifyCommandArgs";
    patch: Record<string, unknown>;
};
export type HookEmitResult = {
    denied?: {
        reason: string;
    };
    actionOverride?: string;
    commandArgsPatch?: Record<string, unknown>;
};
export declare class KitLifecycleHookBus {
    private readonly workspacePath;
    private readonly cfg;
    constructor(workspacePath: string, effectiveConfig: Record<string, unknown>);
    isEnabled(): boolean;
    getMode(): LifecycleHookMode;
    private handlersFor;
    private trace;
    emit(event: LifecycleHookEvent, payload: Record<string, unknown>): Promise<HookEmitResult>;
    emitBeforeModuleCommand(command: string, args: Record<string, unknown>): Promise<HookEmitResult>;
    emitAfterModuleCommand(command: string, ok: boolean, code?: string): Promise<void>;
    emitBeforeTaskTransition(payload: Record<string, unknown>): Promise<HookEmitResult>;
    emitAfterTaskTransition(payload: Record<string, unknown>): Promise<void>;
    emitBeforeTaskStorePersist(payload: Record<string, unknown>): Promise<HookEmitResult>;
    emitAfterTaskStorePersist(payload: Record<string, unknown>): Promise<void>;
    /** Reserved stub — no kit choke point in v1 unless handlers are registered for documentation/tests. */
    emitPrMutationStub(phase: "before" | "after", payload: Record<string, unknown>): Promise<HookEmitResult>;
}
export declare function createKitLifecycleHookBus(workspacePath: string, effectiveConfig: Record<string, unknown>): KitLifecycleHookBus;
