/**
 * Pure REST handlers for `/api/projects/*`.
 *
 * Extracted from the deleted Hono `routes.ts` so the relay envelope dispatcher
 * (Batch 3) can call them with a parsed payload instead of a Hono context.
 *
 * Contract:
 *  - Inputs are already-parsed JSON objects (or `unknown` shapes the handler
 *    validates). The dispatcher upstream parses the relay envelope body.
 *  - Outputs are the wire shapes the landing client already expects, so the
 *    Batch 3 dispatcher can JSON-stringify them straight into the response
 *    envelope without remapping.
 *  - Errors are thrown as typed `HandlerError` subclasses; the dispatcher
 *    maps `BAD_REQUEST` → 400-equivalent and `NOT_FOUND` → 404-equivalent.
 *  - Stream teardown on project delete is the caller's responsibility — the
 *    handler returns the cascaded session ids so the dispatcher can hand
 *    them to `SessionStreamManager.disposeProjectStreams` BEFORE the SQL
 *    cascade has already torn down (in our model the cascade has already
 *    happened by the time we return; that's intentional and matches the
 *    old route's ordering — the manager is best-effort cleanup).
 */
import type { SessionStore } from "../storage.js";
import type { WireProject, WireSessionSummary } from "../wire.js";
export interface CreateProjectInputRaw {
    name?: unknown;
    path?: unknown;
}
export interface UpdateProjectInputRaw {
    name?: unknown;
    path?: unknown;
}
export declare function handleListProjects(store: SessionStore): WireProject[];
export declare function handleCreateProject(store: SessionStore, body: CreateProjectInputRaw): WireProject;
export declare function handleGetProject(store: SessionStore, id: string): WireProject;
export declare function handleUpdateProject(store: SessionStore, id: string, body: UpdateProjectInputRaw): WireProject;
export interface DeleteProjectResult {
    /** Session ids that belonged to the project (cascade-deleted). */
    sessionIds: string[];
}
export declare function handleDeleteProject(store: SessionStore, id: string): DeleteProjectResult;
export interface BindStudioInputRaw {
    studioProjectId?: unknown;
    studioTeamId?: unknown;
    studioProjectName?: unknown;
}
export interface BindStudioResult {
    project: WireProject;
    studioProjectId: string;
    studioProjectName: string;
    studioTeamId?: string;
}
/**
 * Bind a local project directory to an Aexol Studio project by writing
 * `.aexol/aexol.jsonc` into the project's filesystem path.
 */
export declare function handleBindStudioProject(store: SessionStore, id: string, body: BindStudioInputRaw): Promise<BindStudioResult>;
export declare function handleListSessionsByProject(store: SessionStore, id: string): WireSessionSummary[];
//# sourceMappingURL=projects.d.ts.map