import { type ProjectMarkerReference, type ProjectResolverSource, type ProjectTargetResolution } from "./project-resolver.js";
import { PROJECT_RENDER_SCHEMA_VERSION } from "./project-render.js";
import type { ProjectStore } from "../store/project-store.js";
import type { AgentRun, JsonObject, WorkspaceAgentAssignment, WorkspaceEvent } from "../types/workspace.js";
export interface ProjectAgentContextOptions {
    target?: string;
    cwd?: string;
    eventsLimit?: number;
    siblingsLimit?: number;
}
export interface ProjectAgentContext {
    schema_version: typeof PROJECT_RENDER_SCHEMA_VERSION;
    kind: "projects.agent_context";
    machine: {
        hostname: string;
    };
    target: {
        input: string;
        resolved: boolean;
        source: ProjectResolverSource | "none";
        note?: string;
    };
    project?: JsonObject;
    root?: JsonObject;
    recipe?: JsonObject;
    assigned_agents?: WorkspaceAgentAssignment[];
    siblings?: JsonObject[];
    recent_events?: WorkspaceEvent[];
    tmux?: {
        available: boolean;
        session_names: string[];
    };
    integrations?: JsonObject;
    doctor?: {
        ok: boolean;
        checks: {
            code: string;
            status: string;
            message: string;
        }[];
    };
    budgets?: {
        exhausted: boolean;
        warnings: string[];
    }[];
    marker?: ProjectMarkerReference | null;
}
export declare function buildProjectAgentContext(store: ProjectStore, options?: ProjectAgentContextOptions): Promise<ProjectAgentContext>;
export interface ProjectNextAction {
    id: string;
    priority: "high" | "medium" | "low";
    title: string;
    rationale: string;
    command: string;
}
export interface ProjectNextOptions {
    target?: string;
    cwd?: string;
    limit?: number;
}
export interface ProjectNextResult {
    schema_version: typeof PROJECT_RENDER_SCHEMA_VERSION;
    kind: "projects.next";
    machine: {
        hostname: string;
    };
    target: {
        input: string;
        resolved: boolean;
    };
    actions: ProjectNextAction[];
}
export declare function suggestProjectNextActions(store: ProjectStore, options?: ProjectNextOptions): Promise<ProjectNextResult>;
export interface ProjectWhyStep {
    source: ProjectResolverSource;
    tried: boolean;
    matched: boolean;
    detail: string;
}
export interface ProjectWhyResult {
    schema_version: typeof PROJECT_RENDER_SCHEMA_VERSION;
    kind: "projects.why";
    target: string;
    resolved: boolean;
    resolution?: ProjectTargetResolution;
    steps: ProjectWhyStep[];
    marker?: ProjectMarkerReference | null;
    suggestions: string[];
}
export declare function explainProjectResolution(store: ProjectStore, target: string | undefined, options?: {
    cwd?: string;
}): Promise<ProjectWhyResult>;
export interface ProjectHandoffOptions {
    target?: string;
    cwd?: string;
    eventsLimit?: number;
    runsLimit?: number;
}
export interface ProjectHandoff {
    schema_version: typeof PROJECT_RENDER_SCHEMA_VERSION;
    kind: "projects.handoff";
    machine: {
        hostname: string;
    };
    project: JsonObject;
    root?: JsonObject;
    integrations: JsonObject;
    tmux: {
        available: boolean;
        session_names: string[];
    };
    open_locks: {
        lock_key: string;
        reason: string | null;
        created_at: string;
    }[];
    recent_events: WorkspaceEvent[];
    recent_runs: AgentRun[];
    handoff_instructions: string;
}
export declare function buildProjectHandoff(store: ProjectStore, options?: ProjectHandoffOptions): Promise<ProjectHandoff>;
export interface ProjectRunsOptions {
    target?: string;
    cwd?: string;
    limit?: number;
    status?: AgentRun["status"];
}
export interface ProjectRunsResult {
    schema_version: typeof PROJECT_RENDER_SCHEMA_VERSION;
    kind: "projects.runs";
    target: {
        input: string;
        resolved: boolean;
    };
    runs: Array<{
        id: string;
        status: AgentRun["status"];
        agent_id: string | null;
        model: string | null;
        prompt: string;
        tool_calls: number;
        error: string | null;
        started_at: string;
        completed_at: string | null;
    }>;
}
export declare function listProjectAgentRunsView(store: ProjectStore, options?: ProjectRunsOptions): Promise<ProjectRunsResult>;
export interface ProjectRunDetailOptions {
    target?: string;
    cwd?: string;
    runId: string;
}
export interface ProjectRunDetail {
    schema_version: typeof PROJECT_RENDER_SCHEMA_VERSION;
    kind: "projects.run_detail";
    run: AgentRun;
    agent?: JsonObject;
}
export declare function getProjectAgentRunDetail(store: ProjectStore, options: ProjectRunDetailOptions): Promise<ProjectRunDetail>;
export declare function toAgentText(value: unknown): string;
export { PROJECT_RENDER_SCHEMA_VERSION };
//# sourceMappingURL=project-agent-assist.d.ts.map