//#region src/cli/utils/gateway-client-options.ts
function addGatewayClientOptions(cmd) {
	return cmd.option("--url <url>", "Gateway HTTP URL (defaults to config or http://127.0.0.1:18790)").option("--token <token>", "Gateway auth token").option("--timeout <ms>", "Request timeout in ms", "10000").option("--json", "Output raw JSON", false);
}
function parseGatewayClientOptions(opts) {
	const rawTimeout = opts.timeout;
	const timeoutMs = typeof rawTimeout === "string" ? Number.parseInt(rawTimeout, 10) || 1e4 : typeof rawTimeout === "number" && Number.isFinite(rawTimeout) ? rawTimeout : 1e4;
	return {
		url: typeof opts.url === "string" ? opts.url : void 0,
		token: typeof opts.token === "string" ? opts.token : void 0,
		timeoutMs,
		json: Boolean(opts.json)
	};
}
//#endregion
export { addGatewayClientOptions, parseGatewayClientOptions };

//# sourceMappingURL=gateway-client-options.js.map