import type { Context, MiddlewareHandler } from 'hono';
export declare function getWorkspaceCwd(c: Context, fallback: string): string;
/**
 * Hono middleware that resolves and validates the active workspace directory.
 *
 * Resolution order:
 * 1. `?workspace=` query parameter
 * 2. `X-Workspace` request header
 * 3. Falls back to the server startup `cwd`
 *
 * Sets `c.set('workspace', resolvedPath)` on success.
 * Returns 400 on path traversal, 404 if path does not exist or is not a directory.
 */
export declare function workspaceMiddleware(defaultCwd: string): MiddlewareHandler;
