import { type GatewayDependencies } from "../gateway/Gateway.js"; import { type GatewayConfig, type GatewayFlags } from "../gateway/GatewayConfig.js"; import { type ParsedArguments } from "./Arguments.js"; import type { CliProcess } from "./CliProcess.js"; export declare const PROXY_ARGUMENTS: { readonly valued: readonly ["upstream", "port", "listen", "mode", "failure-policy", "authority", "config"]; readonly flags: readonly ["verbose", "json"]; }; /** The flags `proxy` and `run` share, in the loader's shape. */ export declare function gatewayFlags(parsed: ParsedArguments): GatewayFlags; /** The resolved configuration and the environment the gateway opens its secrets from. */ export interface ResolvedGateway { readonly config: GatewayConfig; readonly env: Readonly>; readonly configPath: string | null; } /** * Resolves the configuration the way every gateway command does: the flags, * the environment, the file, the stored login. A stored key is handed to the * gateway as if it were in the environment, which is the one place the * secret store reads a value from outside production. */ export declare function resolveGateway(io: CliProcess, parsed: ParsedArguments): ResolvedGateway; /** Whether the process should speak JSON: asked for, or running where a log pipeline listens. */ export declare function speaksJson(io: CliProcess, argv: readonly string[]): boolean; /** * A refusal to start as one JSON line, in the executor's own shape, for a * container or a service whose logs are lines: the code and the setting, * never a value. */ export declare function refusalLine(error: unknown): string; /** A refusal to start, on one line that names the setting and never a value. */ export declare function explainRefusal(error: unknown): string; /** * `agentsafe proxy` and `agentsafe run`: the gateway as a process. The * configuration is resolved, the gateway assembled, the listener bound, the * banner printed; `SIGTERM` and `SIGINT` stop the listener with a grace * period, close the gateway and exit 0. */ export declare function runProxy(io: CliProcess, argv: readonly string[], dependencies?: GatewayDependencies): Promise; //# sourceMappingURL=Proxy.d.ts.map