feat: add AGENT=goose environment variable for cross-tool compatibility (#7017)

This commit is contained in:
Sam W
2026-02-10 09:18:50 -08:00
committed by GitHub
parent 7267621ab8
commit 1168d7d9b1
5 changed files with 7 additions and 0 deletions
+1
View File
@@ -30,6 +30,7 @@ pub fn update(canary: bool, reconfigure: bool) -> Result<()> {
.env("CANARY", canary.to_string())
.env("CONFIGURE", reconfigure.to_string())
.env("GOOSE_TERMINAL", "1")
.env("AGENT", "goose")
.spawn()?;
update.wait_with_output()?;
@@ -709,6 +709,7 @@ impl ComputerControllerServer {
.arg("-File")
.arg(&command)
.env("GOOSE_TERMINAL", "1")
.env("AGENT", "goose")
.output()
.await
.map_err(|e| {
@@ -723,6 +724,7 @@ impl ComputerControllerServer {
.arg(shell_arg)
.arg(&command)
.env("GOOSE_TERMINAL", "1")
.env("AGENT", "goose")
.output()
.await
.map_err(|e| {
@@ -12,6 +12,7 @@ impl SystemAutomation for WindowsAutomation {
.arg("-Command")
.arg(script)
.env("GOOSE_TERMINAL", "1")
.env("AGENT", "goose")
.output()?;
Ok(String::from_utf8_lossy(&output.stdout).into_owned())
+1
View File
@@ -122,6 +122,7 @@ pub fn configure_shell_command(
.stdin(Stdio::null())
.kill_on_drop(true)
.env("GOOSE_TERMINAL", "1")
.env("AGENT", "goose")
.env("GIT_EDITOR", "sh -c 'echo \"Interactive Git commands are not supported in this environment.\" >&2; exit 1'")
.env("GIT_SEQUENCE_EDITOR", "sh -c 'echo \"Interactive Git commands are not supported in this environment.\" >&2; exit 1'")
.env("VISUAL", "sh -c 'echo \"Interactive editor not available in this environment.\" >&2; exit 1'")
+2
View File
@@ -233,11 +233,13 @@ pub async fn execute_shell_command(
let mut cmd = Command::new("cmd");
cmd.args(["/C", command]);
cmd.env("GOOSE_TERMINAL", "1");
cmd.env("AGENT", "goose");
cmd
} else {
let mut cmd = Command::new("sh");
cmd.args(["-c", command]);
cmd.env("GOOSE_TERMINAL", "1");
cmd.env("AGENT", "goose");
cmd
};