import { type ConsequentialMethod, type RouteConfig } from "../gateway/GatewayConfig.js"; import type { CliProcess } from "./CliProcess.js"; export declare const INIT_ARGUMENTS: { readonly valued: readonly ["upstream", "port", "mode", "config"]; readonly flags: readonly ["force"]; }; /** What `init` learned about the directory, and wrote. */ export interface InitReport { readonly path: string; readonly upstream: string; readonly routes: readonly RouteConfig[]; readonly source: "flag" | "package.json" | "default"; readonly openapi: string | null; } /** An OpenAPI operationId as an action name, or a name from the path and method. */ export declare function actionNameFrom(operationId: unknown, path: string, method: ConsequentialMethod): string; /** * The consequential operations an OpenAPI document declares, as routes. A * document that is not one, or that has none, yields no routes; the file * is a hint, never a requirement. */ export declare function routesFromOpenApi(text: string): readonly RouteConfig[]; /** The upstream a `package.json` script implies, or null. */ export declare function upstreamFromPackage(text: string | null): string | null; /** * `agentsafe init`: writes the smallest working configuration into the * current directory, and looks around first. A `package.json` whose scripts * name a port gives the upstream; an OpenAPI document gives the routes. It * modifies no application code and refuses to overwrite a file it finds. */ export declare function runInit(io: CliProcess, argv: readonly string[]): InitReport | null; //# sourceMappingURL=Init.d.ts.map