From bc83ab0559595219bf2f603ddc349bae133fdbbd Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Wed, 18 Feb 2026 22:54:47 -0800 Subject: [PATCH] fix: deduplicate isInteractiveTTY and remove dead OVH env wrapper (#1457) - Export isInteractiveTTY from commands.ts and import in index.ts, removing the duplicate definition that was missing !! boolean coercion - Remove unused inject_env_vars_ovh function from ovh/lib/common.sh (all OVH scripts use spawn_agent which calls _spawn_inject_env_vars) - Bump CLI version to 0.5.6 Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 --- cli/package.json | 2 +- cli/src/commands.ts | 2 +- cli/src/index.ts | 5 +---- ovh/lib/common.sh | 7 ------- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/cli/package.json b/cli/package.json index e328081c..e502899d 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.5.5", + "version": "0.5.6", "type": "module", "bin": { "spawn": "cli.js" diff --git a/cli/src/commands.ts b/cli/src/commands.ts index 91b3ec64..f4bd4e19 100644 --- a/cli/src/commands.ts +++ b/cli/src/commands.ts @@ -1682,7 +1682,7 @@ function renderListTable(records: SpawnRecord[], manifest: Manifest | null): voi console.log(); } -function isInteractiveTTY(): boolean { +export function isInteractiveTTY(): boolean { return !!(process.stdin.isTTY && process.stdout.isTTY); } diff --git a/cli/src/index.ts b/cli/src/index.ts index 50705096..5bbcddec 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -20,6 +20,7 @@ import { resolveAgentKey, resolveCloudKey, loadManifestWithSpinner, + isInteractiveTTY, } from "./commands.js"; import pc from "picocolors"; import pkg from "../package.json" with { type: "json" }; @@ -28,10 +29,6 @@ import { loadManifest, agentKeys, cloudKeys, getCacheAge } from "./manifest.js"; const VERSION = pkg.version; -function isInteractiveTTY(): boolean { - return process.stdin.isTTY && process.stdout.isTTY; -} - function handleError(err: unknown): never { // Use duck typing instead of instanceof to avoid prototype chain issues const msg = err && typeof err === "object" && "message" in err ? String(err.message) : String(err); diff --git a/ovh/lib/common.sh b/ovh/lib/common.sh index dda9487e..4d40558f 100644 --- a/ovh/lib/common.sh +++ b/ovh/lib/common.sh @@ -390,13 +390,6 @@ install_base_deps() { log_info "Base dependencies installed" } -# Inject environment variables using SSH -inject_env_vars_ovh() { - local server_ip="$1" - shift - inject_env_vars_ssh "${server_ip}" "upload_file_ovh ${server_ip}" "run_ovh ${server_ip}" "$@" -} - # List all OVH instances list_instances() { local response