import { z } from 'zod';
import type { ToolResult } from '../types/index.js';
/** Standard dual projectId/projectPath optional Zod fields. Spread into inputSchema. */
export declare const projectIdSchema: {
    readonly projectId: z.ZodOptional<z.ZodString>;
    readonly projectPath: z.ZodOptional<z.ZodString>;
};
interface MaybeProjectArgs {
    projectId?: string;
    projectPath?: string;
    [k: string]: unknown;
}
/**
 * Wraps a handler that requires a resolved projectId.
 * Resolves projectId from projectId or projectPath; returns missingProjectIdError if neither.
 *
 * Usage (replaces the 5-line resolveProjectId block in each safeTracked/safeLicensed callback):
 * ```ts
 * // Before:
 * safeLicensed('tool', async (args) => {
 *   const pid = resolveProjectId(args as { projectId?: string; projectPath?: string });
 *   if (!pid) return missingProjectIdError;
 *   return handleFoo({ ...args, projectId: pid } as FooInput);
 * })
 *
 * // After:
 * safeLicensed('tool', withProject((args) => handleFoo(args as never)))
 * ```
 */
export declare function withProject<T extends MaybeProjectArgs>(handler: (args: T & {
    projectId: string;
}) => Promise<ToolResult> | ToolResult): (args: T) => Promise<ToolResult>;
export {};
//# sourceMappingURL=tool-registry-helpers.d.ts.map