import { type Task } from "./models.js"; import type { SubmitOptions } from "./client.js"; import type { TaskStore } from "./store/base.js"; import { type TaskDef } from "./task.js"; /** Handed to a task handler. Worker-side capabilities mirror the Python SDK. */ export declare class TaskContext { private readonly store; private readonly task; readonly workerId: string; private readonly leaseMs; constructor(store: TaskStore, task: Task, workerId: string, leaseMs: number); get taskId(): string; get name(): string; get queue(): string; get attempt(): number; get metadata(): any; get rootId(): string | null; get correlationId(): string | null; get payload(): any; progress(value: number | null, message?: string | null): Promise; heartbeat(): Promise; /** Cooperative cancel check. */ canceled(): Promise; /** Submit a child task; parent/root/correlation are wired automatically. */ submit(name: string, payload?: unknown, opts?: SubmitOptions): Promise; submit(task: TaskDef, payload?: P, opts?: SubmitOptions): Promise; wait(taskId: string, opts?: { timeoutMs?: number; pollMs?: number; }): Promise; }