diff --git a/src/cli/agent.ts b/src/cli/agent.ts index 8f833bfa..13c37ef6 100644 --- a/src/cli/agent.ts +++ b/src/cli/agent.ts @@ -221,7 +221,7 @@ const STRIPPED = [ ]; /** The agent's environment: the user's, minus `STRIPPED`, plus its one key. */ -export function agentEnvironment(env: NodeJS.ProcessEnv, variable: string, key: string): NodeJS.ProcessEnv { +export function launchEnvironment(env: NodeJS.ProcessEnv, variable: string, key: string): NodeJS.ProcessEnv { return { ...strippedEnvironment(env), [variable]: key }; } @@ -658,7 +658,7 @@ export async function runAgent( }), ); }; - const env = agentEnvironment(deps.env, harness.keyVariable, key); + const env = launchEnvironment(deps.env, harness.keyVariable, key); if (checkouts) { supervised = checkouts.run(checkout!, argv, { env, spawned: connect }); supervised.catch(reject); diff --git a/test/agent.test.ts b/test/agent.test.ts index 0296fd1e..d2b9f2f8 100644 --- a/test/agent.test.ts +++ b/test/agent.test.ts @@ -17,7 +17,7 @@ import { afterEach, expect, test, vi } from "vitest"; import { AgentInputError, - agentEnvironment, + launchEnvironment, boundedLines, redactedLines, refuseUnsupported, @@ -238,7 +238,7 @@ const launch = (harness: string, key: string) => [ ]; test("the agent environment holds only its own key", () => { - const env = agentEnvironment( + const env = launchEnvironment( { PATH: "/bin", HOME: "/home/me",