import type { HarnessSession } from "#harness/types.js";
import type { BackgroundWorkflowToolRun } from "#harness/workflow-tool-runs.js";
export interface TaskExecutorCancelContext {
    readonly entry: BackgroundWorkflowToolRun;
    readonly serializedContext?: Record<string, unknown>;
    readonly session?: Pick<HarnessSession, "state">;
}
export type TaskExecutorCancel = (input: TaskExecutorCancelContext) => Promise<void>;
/** Cancels task-owned work and waits for the invocation cleanup boundary. */
export declare function cancelTaskOwnedWork(input: TaskExecutorCancelContext & {
    readonly cancelOwnedWork?: TaskExecutorCancel;
}): Promise<void>;
