/**
 * Hooks adapter — shared types.
 *
 * The hooks adapter gives in-process hosts (Claude Code SDK, Codex runner,
 * internal CLI glue) a direct, typed surface over `kernel.run.*` and a small
 * set of engine services. Unlike the MCP adapter, it does not serialise to
 * JSON-RPC and never crosses a process boundary.
 *
 * Layering rule: files in `src/adapters/hooks/**` may import from
 * `src/kernel/**` and `src/engines/**` only. They MUST NOT import from
 * `src/agents/adapters/mcp/**` or `src/dashboard/**`. Enforced by
 * `test/adapter-boundary.test.ts`.
 */
import type { MemoryEngine } from '../../engines/memory.js';
import type { RuntimeHealthEnvelope } from '../../engines/runtime-health.js';
/** Minimal context a caller provides when composing hook namespaces. */
export interface HooksContext {
    /** Absolute repo root the kernel is operating on. */
    repoRoot: string;
    /** Memory engine instance — required for Hooks.memory.*; optional otherwise. */
    memory?: MemoryEngine;
    /** Runtime health provider — required for Hooks.health.runtime(). */
    runtimeHealth?: () => RuntimeHealthEnvelope | Promise<RuntimeHealthEnvelope>;
}
/** Uniform result envelope. Hosts can discriminate on `ok` for control flow. */
export type HookResult<T> = {
    ok: true;
    value: T;
} | {
    ok: false;
    error: string;
};
/** Helper to wrap a thunk into a HookResult. */
export declare function asHookResult<T>(fn: () => T | Promise<T>): Promise<HookResult<T>>;
