import type { BranchSummary, Checkpoint, CheckpointJSON, GuardSummary, LoopState, ThreadView } from "../checkpointStore.js"; import type { LoopStopKind } from "../sourceLocation.js"; import type { StateJSON } from "../stateStack.js"; import type { BranchAddress, FrameAddress, GuardAddress, Refusal, ThreadAddress } from "./edits.js"; /** Where the stop is: its branch path, and which of the loop's own stops * it is, if any. An omitted address resolves against this. A stop in a * batch shares its checkpoint with its siblings, so the caller passes * the stop's own location; a checkpoint on its own passes its own. */ export type StopAt = { branchPath: string[]; loopStop: LoopStopKind | undefined; }; /** The stop a checkpoint names, for a caller with no stop record. */ export declare function stopOfCheckpoint(checkpoint: Checkpoint | CheckpointJSON): StopAt; /** What an address found, and where in the checkpoint's JSON. */ export type Located = { jsonPath: string[]; found: T; }; export declare function resolveFrame(address: FrameAddress | undefined, checkpoint: Checkpoint, at: StopAt): Located | Refusal; /** The nearest tool loop above the stop: `loopState`'s rule, over every * stack along the branch path, since a stop inside a tool call has its * loop on the parent's stack. */ export declare function resolveLoopFrame(address: { branchPath?: string[]; } | undefined, checkpoint: Checkpoint, at: StopAt): Located | Refusal; export declare function resolveThread(address: ThreadAddress | undefined, checkpoint: Checkpoint, at: StopAt): Located | Refusal; export declare function resolveBranch(address: BranchAddress, checkpoint: Checkpoint): Located | Refusal; /** A guard on the stacks the stop runs under, with every copy's path; * `jsonPath` is the owning copy's. */ export declare function resolveGuard(address: GuardAddress, branchPath: string[] | undefined, checkpoint: Checkpoint, at: StopAt): Located | Refusal; /** A module's globals in the store the stop reads: a fork or parallel * branch's own copy inside one, the root's otherwise. */ export declare function resolveModule(module: string | undefined, branchPath: string[] | undefined, checkpoint: Checkpoint, at: StopAt): Located> | Refusal;