import { z } from "zod";
import { type Json } from "./protocol.js";
export declare const taskUpdatesSchema: z.ZodObject<{
    responsibility: z.ZodOptional<z.ZodEnum<{
        agent: "agent";
        human: "human";
    }>>;
    dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
        storeId: z.ZodString;
        project: z.ZodString;
        stableId: z.ZodString;
    }, z.core.$strict>>>;
    section: z.ZodOptional<z.ZodEnum<{
        Active: "Active";
        Done: "Done";
        Queue: "Queue";
    }>>;
}, z.core.$strict>;
/** Native clients discover portable identities without knowing filesystem paths
 * or accidentally treating machine-local attachment IDs as dependency IDs. */
export declare function getTaskDirectoryRoute(base: string): Promise<{
    ok: boolean;
    version: number;
    stores: {
        id: string | null;
        name: string;
        role: import("../store-registry.js").StoreRole;
        primary: boolean;
        available: boolean;
        identityReady: boolean;
        ambiguous: boolean;
        repositoryIdentity?: {
            repository: string;
            branch: string;
        } | undefined;
        writerSafety: {
            version: 1;
            metadataVersion: 1;
            activation: "disabled" | "owner-acknowledged";
            requiresCoordinatedAdoption: true;
            legacyWritersFenced: false;
            acknowledgedAt?: string | undefined;
        } | null;
        metadataWritable: boolean;
        projects: string[];
    }[];
}>;
export declare function getTaskRoute(base: string, url: URL): {
    ok: boolean;
    version: number;
    storeId: string;
    project: string;
    revision: string | undefined;
    writerSafety: {
        version: 1;
        metadataVersion: 1;
        activation: "disabled" | "owner-acknowledged";
        requiresCoordinatedAdoption: true;
        legacyWritersFenced: false;
        acknowledgedAt?: string | undefined;
    };
    metadataWritable: boolean;
    counts: {
        human: number;
        agentReady: number;
        agentWaitingOnHuman: number;
        agentWaitingOnTask: number;
        done: number;
    };
    items: {
        [k: string]: {
            responsibility: import("../data/task-contract.js").TaskResponsibility;
            readiness: "ready" | "waiting-on-human" | "waiting-on-task";
            prerequisites: import("../data/task-contract.js").TaskPrerequisite[];
            identity: import("../data/task-contract.js").TaskDependency | null;
            id: string;
            stableId?: string;
            identityAmbiguous?: boolean;
            section: import("../data/tasks.js").TaskSection;
            line: string;
            checked: boolean;
            priority?: "high" | "medium" | "low";
            context?: string;
            pinned?: boolean;
            githubIssue?: number;
            githubUrl?: string;
            claim?: import("../data/tasks.js").TaskClaim;
            rank?: number;
            lastActivity?: string;
            createdAt?: string;
            sessionId?: string;
            scope?: string;
            childFindings?: string[];
            speculative?: boolean;
            parentFinding?: string;
            dependencies?: import("../data/task-contract.js").TaskDependency[];
            history?: import("../data/task-contract.js").TaskChange[];
            taskContractRaw?: string;
            taskContractRecords?: string[];
            taskContractLines?: string[];
            opaqueContinuationLines?: string[];
        }[];
    };
};
export declare function updateTaskRoute(base: string, input: unknown): {
    ok: boolean;
    version: number;
    storeId: string;
    project: string;
    revision: string | undefined;
    writerSafety: {
        version: 1;
        metadataVersion: 1;
        activation: "disabled" | "owner-acknowledged";
        requiresCoordinatedAdoption: true;
        legacyWritersFenced: false;
        acknowledgedAt?: string | undefined;
    };
    metadataWritable: boolean;
    counts: {
        human: number;
        agentReady: number;
        agentWaitingOnHuman: number;
        agentWaitingOnTask: number;
        done: number;
    };
    items: {
        [k: string]: {
            responsibility: import("../data/task-contract.js").TaskResponsibility;
            readiness: "ready" | "waiting-on-human" | "waiting-on-task";
            prerequisites: import("../data/task-contract.js").TaskPrerequisite[];
            identity: import("../data/task-contract.js").TaskDependency | null;
            id: string;
            stableId?: string;
            identityAmbiguous?: boolean;
            section: import("../data/tasks.js").TaskSection;
            line: string;
            checked: boolean;
            priority?: "high" | "medium" | "low";
            context?: string;
            pinned?: boolean;
            githubIssue?: number;
            githubUrl?: string;
            claim?: import("../data/tasks.js").TaskClaim;
            rank?: number;
            lastActivity?: string;
            createdAt?: string;
            sessionId?: string;
            scope?: string;
            childFindings?: string[];
            speculative?: boolean;
            parentFinding?: string;
            dependencies?: import("../data/task-contract.js").TaskDependency[];
            history?: import("../data/task-contract.js").TaskChange[];
            taskContractRaw?: string;
            taskContractRecords?: string[];
            taskContractLines?: string[];
            opaqueContinuationLines?: string[];
        }[];
    };
};
/** One locked write: a Human task is never observable as Agent-ready. The
 * client keeps one stable ID across uncertain replies; conflicts never recreate. */
export declare function createTaskRoute(base: string, input: unknown): {
    ok: boolean;
    version: number;
    storeId: string;
    project: string;
    revision: string | undefined;
    writerSafety: {
        version: 1;
        metadataVersion: 1;
        activation: "disabled" | "owner-acknowledged";
        requiresCoordinatedAdoption: true;
        legacyWritersFenced: false;
        acknowledgedAt?: string | undefined;
    };
    metadataWritable: boolean;
    counts: {
        human: number;
        agentReady: number;
        agentWaitingOnHuman: number;
        agentWaitingOnTask: number;
        done: number;
    };
    items: {
        [k: string]: {
            responsibility: import("../data/task-contract.js").TaskResponsibility;
            readiness: "ready" | "waiting-on-human" | "waiting-on-task";
            prerequisites: import("../data/task-contract.js").TaskPrerequisite[];
            identity: import("../data/task-contract.js").TaskDependency | null;
            id: string;
            stableId?: string;
            identityAmbiguous?: boolean;
            section: import("../data/tasks.js").TaskSection;
            line: string;
            checked: boolean;
            priority?: "high" | "medium" | "low";
            context?: string;
            pinned?: boolean;
            githubIssue?: number;
            githubUrl?: string;
            claim?: import("../data/tasks.js").TaskClaim;
            rank?: number;
            lastActivity?: string;
            createdAt?: string;
            sessionId?: string;
            scope?: string;
            childFindings?: string[];
            speculative?: boolean;
            parentFinding?: string;
            dependencies?: import("../data/task-contract.js").TaskDependency[];
            history?: import("../data/task-contract.js").TaskChange[];
            taskContractRaw?: string;
            taskContractRecords?: string[];
            taskContractLines?: string[];
            opaqueContinuationLines?: string[];
        }[];
    };
};
/** CAS applies the complete change set under the data layer's graph/document
 * locks. Empty context clears it; omitted fields retain their current value. */
export declare function saveTaskRoute(base: string, input: unknown): {
    ok: boolean;
    version: number;
    storeId: string;
    project: string;
    revision: string | undefined;
    writerSafety: {
        version: 1;
        metadataVersion: 1;
        activation: "disabled" | "owner-acknowledged";
        requiresCoordinatedAdoption: true;
        legacyWritersFenced: false;
        acknowledgedAt?: string | undefined;
    };
    metadataWritable: boolean;
    counts: {
        human: number;
        agentReady: number;
        agentWaitingOnHuman: number;
        agentWaitingOnTask: number;
        done: number;
    };
    items: {
        [k: string]: {
            responsibility: import("../data/task-contract.js").TaskResponsibility;
            readiness: "ready" | "waiting-on-human" | "waiting-on-task";
            prerequisites: import("../data/task-contract.js").TaskPrerequisite[];
            identity: import("../data/task-contract.js").TaskDependency | null;
            id: string;
            stableId?: string;
            identityAmbiguous?: boolean;
            section: import("../data/tasks.js").TaskSection;
            line: string;
            checked: boolean;
            priority?: "high" | "medium" | "low";
            context?: string;
            pinned?: boolean;
            githubIssue?: number;
            githubUrl?: string;
            claim?: import("../data/tasks.js").TaskClaim;
            rank?: number;
            lastActivity?: string;
            createdAt?: string;
            sessionId?: string;
            scope?: string;
            childFindings?: string[];
            speculative?: boolean;
            parentFinding?: string;
            dependencies?: import("../data/task-contract.js").TaskDependency[];
            history?: import("../data/task-contract.js").TaskChange[];
            taskContractRaw?: string;
            taskContractRecords?: string[];
            taskContractLines?: string[];
            opaqueContinuationLines?: string[];
        }[];
    };
};
/** The task and prompt are bound by a durable reservation, before invoking the
 * ordinary launcher. Never roll back that claim after an uncertain side effect. */
export declare function launchTaskRoute(base: string, server: string, input: unknown): Promise<Json>;
