refactor(cli): remove obsolete gateway call options export (#106549)

This commit is contained in:
Vincent Koc
2026-07-14 00:38:14 +08:00
committed by GitHub
parent dd4f36690a
commit 1708faf85b
3 changed files with 1 additions and 20 deletions

View File

@@ -1263,7 +1263,6 @@ export const KNIP_UNUSED_EXPORT_BASELINE = [
"src/cli/cron-cli/register.cron-simple.ts: loadCronJobForShow",
"src/cli/daemon-cli/launchd-recovery.ts: LAUNCH_AGENT_RECOVERY_MESSAGE",
"src/cli/daemon-cli/response.ts: buildDaemonHintItems",
"src/cli/gateway-cli/call.ts: gatewayCallOpts",
"src/cli/gateway-cli/qa-parent-watchdog.ts: QA_PARENT_PID_ENV",
"src/cli/gateway-cli/qa-parent-watchdog.ts: QA_STAGED_RUNTIME_ROOT_ENV",
"src/cli/gateway-cli/qa-parent-watchdog.ts: QA_TEMP_ROOT_ENV",

View File

@@ -1,5 +1,4 @@
// Shared gateway RPC command options and progress-wrapped CLI call helper.
import type { Command } from "commander";
// Progress-wrapped Gateway RPC helper shared by CLI command surfaces.
import {
GATEWAY_CLIENT_MODES,
GATEWAY_CLIENT_NAMES,
@@ -22,15 +21,6 @@ export type GatewayRpcOpts = {
const DEFAULT_GATEWAY_RPC_TIMEOUT_MS = 10_000;
export const gatewayCallOpts = (cmd: Command) =>
cmd
.option("--url <url>", "Gateway WebSocket URL (defaults to gateway.remote.url when configured)")
.option("--token <token>", "Gateway token (if required)")
.option("--password <password>", "Gateway password (password auth)")
.option("--timeout <ms>", "Timeout in ms", "10000")
.option("--expect-final", "Wait for final response (agent)", false)
.option("--json", "Output JSON", false);
export const callGatewayCli = async (method: string, opts: GatewayRpcOpts, params?: unknown) => {
const timeoutMs =
opts.timeout === null

View File

@@ -46,14 +46,6 @@ vi.mock("../../commands/gateway-status.js", () => ({
}));
vi.mock("./call.js", () => ({
gatewayCallOpts: (cmd: Command) =>
cmd
.option("--url <url>", "Gateway WebSocket URL")
.option("--token <token>", "Gateway token")
.option("--password <password>", "Gateway password")
.option("--timeout <ms>", "Timeout in ms", "10000")
.option("--expect-final", "Wait for final response (agent)", false)
.option("--json", "Output JSON", false),
callGatewayCli: (method: string, opts: unknown, params?: unknown) =>
mocks.callGatewayCli(method, opts, params),
}));