import type { RuntimeAdapter } from "../../platform/adapters/base.js"; import type { RouteMatch } from "./api-route-matcher.js"; import type { APIRoute } from "./module-loader/types.js"; import { type PreparedWorkerModule, type SerializedRequest } from "../../security/sandbox/worker-types.js"; import { type ProjectEnvSnapshot } from "../../platform/compat/process/project-env-contract.js"; import type { ApplicationIdentity } from "../../security/application-auth/types.js"; declare function snapshotProjectEnvRecordForWorker(raw: unknown): ProjectEnvSnapshot | undefined; /** @internal Captured-primordial project env snapshot regression hook. */ export declare const __snapshotProjectEnvRecordForTests: typeof snapshotProjectEnvRecordForWorker; declare function serializeRequest(request: Request): Promise; /** @internal Captured-primordial request serialization regression hook. */ export declare const __serializeRequestForTests: typeof serializeRequest; export interface ExecuteRouteOptions { /** Absolute path to the handler module on disk (for isolated execution) */ modulePath?: string; /** Project directory (for isolated execution scope) */ projectDir?: string; /** Whether the handler module belongs to a trusted local development project. */ isLocalProject?: boolean; /** * Whether runtime trust resolution permits this project module to execute in * the server process. Local development projects retain this capability * through `isLocalProject`. */ allowHostProjectCodeExecution?: boolean; /** Non-evaluated, policy-checked route source for worker execution. */ preparedModule?: PreparedWorkerModule; /** Opaque tenant/version/handler-lifetime worker isolation key. */ executionScopeId?: string; /** Verified application identity admitted by the host-owned auth boundary. */ applicationIdentity?: ApplicationIdentity | null; } export interface PreparedRouteExecutionOptions { readonly executionScopeId: string; readonly module: PreparedWorkerModule; readonly modulePath: string; readonly projectDir: string; readonly isLocalProject: boolean; readonly applicationIdentity?: ApplicationIdentity | null; } export declare function executePreparedAppRoute(request: Request, match: RouteMatch, pathname: string, options: PreparedRouteExecutionOptions): Promise; export declare function executePreparedPagesRoute(request: Request, match: RouteMatch, pathname: string, options: PreparedRouteExecutionOptions): Promise; export declare function resolvePreparedRouteMethods(requestedMethod: string | undefined, options: Omit): Promise; export declare function executeAppRoute(handler: APIRoute, request: Request, match: RouteMatch, pathname: string, _adapter: RuntimeAdapter, options?: ExecuteRouteOptions): Promise; export declare function executePagesRoute(handler: APIRoute, request: Request, match: RouteMatch, pathname: string, adapter: RuntimeAdapter, projectDir?: string, options?: ExecuteRouteOptions): Promise; export {}; //# sourceMappingURL=route-executor.d.ts.map