import type { ExtractedTool, ServerActionBinding } from "../formats.js"; /** * Static Next.js server-action extraction (04 ยง1, additive within * vendo/tools@3). `"use server"` modules and functions are parsed with the * TypeScript compiler API โ€” no host code runs. Input schemas come from * validators where statically interpretable (zod via `z.infer` * annotations, primitive/object-literal type annotations); everything else * fails closed to a permissive parameter with a note. * * Execution is direct in-process registration: the generated wiring file * imports the action modules and passes a registration map into * `createVendo({ serverActions })`. Inline actions (a `"use server"` directive * inside a component-scoped function) are real host surface but not * importable, so they are emitted `disabled: true` with a note. Exports the * extractor cannot confirm are functions are emitted disabled + destructive โ€” * never silently auto-allowed. */ export interface ServerActionsExtractResult { tools: ExtractedTool[]; warnings: string[]; } export interface ServerActionRegistration { module: string; exportName: string; } export declare function detectServerActions(root: string): Promise; /** The registration-map key the generated wiring and the runtime agree on. */ export declare function serverActionKey(binding: Pick): string; /** Enabled server actions only โ€” the entries the generated wiring file must * import and register. Disabled tools (inline, unclassifiable) stay out: the * runtime fails closed on the missing key instead. */ export declare function serverActionRegistrations(tools: readonly ExtractedTool[]): ServerActionRegistration[]; export declare function extractServerActions(root: string): Promise;