import { type Flock } from "./hand-activity-lock.ts";
import type { NestedRequest } from "@earendil-works/pi-agent-core";
import type { HandFileGuards } from "./hand-file-ops.ts";
import { type HandRunContext } from "./hand-run-allowlist.ts";
export interface RunArgs {
    readonly exe: string;
    readonly argv: readonly string[];
    readonly cwd: string;
    readonly env: Readonly<Record<string, string>>;
    readonly stdin?: string;
    readonly timeoutMs?: number;
    readonly activityLock?: boolean;
}
export interface RunOutcome {
    readonly code: number | null;
    readonly signal: string | null;
    readonly stdout: string;
    readonly stderr: string;
}
/**
 * One `run` on a hand (S40 PR 2, design v2.2-v2.4): the allowlist's exact argv and environment, the scope's handlers
 * judging the rendered command as `bash`, the policy checking `cwd` as a write, `GIT_INDEX_FILE` confined, git's version
 * floor, the activity lock held as fd 3 until the child exits, and no shell. Streams and time are bounded.
 */
export declare function runOnHand(args: RunArgs, deps: {
    readonly root: string;
    readonly guards: HandFileGuards;
    readonly context: HandRunContext;
    readonly flock: Flock | undefined;
    /** The operation's nested requester: a two-sided extension's tool_call runs on the loop's copy (S29). */
    readonly nested?: NestedRequest;
}, signal: AbortSignal): Promise<RunOutcome>;
//# sourceMappingURL=hand-run-ops.d.ts.map