import type { AgentsRequestInit, AgentsSession } from "../session/types.js"; /** Issue a JSON request against a BFF `/api/*` path. */ export declare const agentsRequest: (session: AgentsSession, path: string, init?: AgentsRequestInit) => Promise; /** * Open a streaming request (the `chatv2` run endpoint emits * `text/event-stream`) and yield decoded text chunks. SSE framing is * left to the caller. Defaults to POST. */ export declare function agentsStream(session: AgentsSession, path: string, init: AgentsRequestInit): AsyncIterable; /** Next.js RSC encoding for an absent (`undefined`) server-action argument. */ export declare const RSC_UNDEFINED = "$undefined"; export interface ServerActionInit { /** The `Next-Action` hash. ROTATES on every Agentic Studio deploy. */ actionHash: string; /** The `Next-Router-State-Tree` header value for the action's route. */ routerStateTree: string; /** The server action's argument tuple — JSON-encoded as the request body. */ args: unknown; } /** * Invoke a Next.js **server action** on the Agentic Studio app. * * Used by resources with no `/api/` write endpoint (schemas, * html-templates). UNSTABLE by nature — `actionHash` rotates on every * Agentic Studio deploy. Throws `AGENTS_API_FAILED` (with a re-capture * hint) on a non-2xx; the response is an RSC stream and is not parsed. */ export declare const agentsServerAction: (session: AgentsSession, path: string, init: ServerActionInit) => Promise;