import type { PortableTool } from "../portable-tool.js";
export declare const TASK_TOOL_NAME: "task";
export declare const TASK_ACTIONS: readonly ["create", "update", "delete", "list", "get", "output", "cancel"];
export type TaskAction = (typeof TASK_ACTIONS)[number];
/**
 * Structural view of the host's background task registry
 * (implemented by BackgroundTaskManager; kept structural so this file stays zero-dep).
 */
export interface TaskRuntimeAccess {
    getTask(taskId: string): RuntimeTaskView | undefined;
    listTasks(): RuntimeTaskView[];
    readOutput(taskId: string): Promise<{
        task: RuntimeTaskView;
        output: string;
        running: boolean;
    } | null>;
    cancelTask(taskId: string): boolean;
}
export interface RuntimeTaskView {
    taskId: string;
    type: string;
    label: string;
    lifecycle: string;
    startedAt: number;
    endedAt?: number;
    error?: string;
}
export interface TaskToolRuntimeDeps {
    /** Live accessor — the registry is bound by the host after bootstrap. */
    getRuntime(): TaskRuntimeAccess | null;
    /** Current chat/session scope. Checklist state is isolated by this key. */
    getScopeKey?(): string | undefined;
}
export type TaskStatus = "not-started" | "in-progress" | "completed";
export declare const TASK_STATUS_VALUES: readonly TaskStatus[];
export interface TaskItem {
    id: number;
    title: string;
    status: TaskStatus;
    description?: string;
    owner?: string;
    blockedBy?: number[];
    blocks?: number[];
}
export interface TaskListSummary {
    total: number;
    completed: number;
    inProgress: number;
    notStarted: number;
    blocked: number;
}
export interface TaskToolParams {
    action: TaskAction;
    id?: number;
    taskId?: string;
    title?: string;
    description?: string;
    status?: TaskStatus;
    owner?: string;
    addBlocks?: number[];
    addBlockedBy?: number[];
}
export declare const TASK_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly action: {
            readonly type: "string";
            readonly enum: readonly ["create", "update", "delete", "list", "get", "output", "cancel"];
            readonly description: string;
        };
        readonly id: {
            readonly type: "number";
            readonly description: "[update|delete|get] Checklist task id to operate on.";
        };
        readonly taskId: {
            readonly type: "string";
            readonly description: "[output|cancel] Background task id (returned by agent background=true / exec background=true).";
        };
        readonly title: {
            readonly type: "string";
            readonly description: "[create|update] Task title (3-7 words, imperative form).";
        };
        readonly description: {
            readonly type: "string";
            readonly description: "[create|update] Detailed task description.";
        };
        readonly status: {
            readonly type: "string";
            readonly enum: readonly ["not-started", "in-progress", "completed"];
            readonly description: "[create|update] Task status. create defaults to not-started.";
        };
        readonly owner: {
            readonly type: "string";
            readonly description: string;
        };
        readonly addBlocks: {
            readonly type: "array";
            readonly items: {
                readonly type: "number";
            };
            readonly description: "[update] Task IDs that this task should block (they depend on this task).";
        };
        readonly addBlockedBy: {
            readonly type: "array";
            readonly items: {
                readonly type: "number";
            };
            readonly description: "[update] Task IDs that should block this task (this task depends on them).";
        };
    };
    readonly required: readonly ["action"];
};
export interface TaskToolOptions {
    /** Unique agent/session identifier for per-agent task isolation. */
    agentId?: string;
    /** Enable verification nudge (default: true). */
    verificationNudge?: boolean;
}
export interface TaskToolHooks {
    onTaskCreated?: (task: TaskItem) => void;
    onTaskCompleted?: (task: TaskItem) => void;
}
export declare function summarizeTaskList(items: readonly TaskItem[]): TaskListSummary;
/**
 * Create a stateful task tool instance (V2 — CC TaskCreate/Update/List/Get aligned).
 */
export declare function createTaskTool(options?: TaskToolOptions, hooks?: TaskToolHooks, runtimeDeps?: TaskToolRuntimeDeps): PortableTool<TaskToolParams>;
