import type { ActionManifest } from '../../build/webpack/plugins/flight-client-entry-plugin';
export interface ServerModuleMap {
    readonly [name: string]: {
        readonly id: string | number;
        readonly name: string;
        readonly chunks: Readonly<Array<string>>;
        readonly async?: boolean;
    };
}
export declare function getActionNotFoundError(actionId: string | null): Error;
export declare function getInvalidServerReferenceIdError(id: string): Error;
export declare function createServerModuleMap({ serverActionsManifest, }: {
    serverActionsManifest: ActionManifest;
}): ServerModuleMap;
/**
 * Checks if the requested action has a worker for the current page.
 * If not, it returns the first worker that has a handler for the action.
 */
export declare function selectWorkerForForwarding(actionId: string, pageName: string, serverActionsManifest: ActionManifest): string | undefined;
