/**
 * Context assembly.
 *
 * Tools run inside a {@link ToolContext}: a working directory, the {@link Fs} and
 * {@link Shell} backends, a cancellation signal, and a default
 * {@link OutputBudget}. Production code builds that from real Node-backed
 * backends; tests want to build it cheaply with only the fields a single case
 * cares about.
 *
 * This module fixes the *shape* of that helper — {@link ContextOverrides} and the
 * {@link ContextFactory} signature — so call sites can type against it now. The
 * concrete {@link makeContext} body is wired up in the backends phase, once the
 * Node {@link Fs}/{@link Shell} implementations exist to serve as the defaults.
 */
import type { Fs, Shell } from "./backends";
import type { ToolContext } from "./spec";
import type { OutputBudget } from "./output";
/**
 * A partial {@link ToolContext} supplied to {@link makeContext}.
 *
 * Any field left out is filled with a default: `cwd` falls back to the current
 * working directory, `fs`/`shell` to the Node backends, `signal` to a
 * never-aborting signal, and `budget` to the kernel's standard window.
 */
export interface ContextOverrides {
    readonly cwd?: string;
    readonly fs?: Fs;
    readonly shell?: Shell;
    readonly signal?: AbortSignal;
    readonly budget?: OutputBudget;
    /** Optional open bag of host-injected framework handles (e.g. the read-state store). */
    readonly framework?: {
        readonly [key: string]: unknown;
    };
}
/**
 * Build a {@link ToolContext}, defaulting every field the caller omits.
 *
 * Intended chiefly as a test seam: a case overrides only the slice it exercises
 * (say, a stub `fs`) and inherits sensible defaults for the rest. The real
 * implementation arrives with the Node backends; this declaration pins the
 * contract every call site can rely on.
 */
export type ContextFactory = (overrides?: ContextOverrides) => ToolContext;
/**
 * The {@link ContextFactory} the rest of the codebase imports.
 *
 * Declared here, defined in the backends phase. Until then it is intentionally
 * unbound so any premature call fails loudly rather than silently producing a
 * half-formed context.
 */
export declare const makeContext: ContextFactory;
