Merge branch 'main' into feat/shell-pty-default-and-enhancements

This commit is contained in:
tanzhenxin 2026-03-06 15:02:41 +08:00
commit 648d48edbc
24 changed files with 170 additions and 149 deletions

View file

@ -29,7 +29,7 @@
(allow network-inbound (local ip "localhost:9229"))
;; deny all outbound network traffic EXCEPT through proxy on localhost:8877
;; set `GEMINI_SANDBOX_PROXY_COMMAND=<command>` to run proxy alongside sandbox
;; set `QWEN_SANDBOX_PROXY_COMMAND=<command>` to run proxy alongside sandbox
;; proxy must listen on :::8877 (see docs/examples/proxy-script.md)
(deny network-outbound)
(allow network-outbound (remote tcp "localhost:8877"))

View file

@ -93,6 +93,6 @@
(allow network-inbound (local ip "localhost:9229"))
;; allow outbound network traffic through proxy on localhost:8877
;; set `GEMINI_SANDBOX_PROXY_COMMAND=<command>` to run proxy alongside sandbox
;; set `QWEN_SANDBOX_PROXY_COMMAND=<command>` to run proxy alongside sandbox
;; proxy must listen on :::8877 (see docs/examples/proxy-script.md)
(allow network-outbound (remote tcp "localhost:8877"))

View file

@ -263,8 +263,8 @@ export async function start_sandbox(
...finalArgv.map((arg) => quote([arg])),
].join(' '),
);
// start and set up proxy if GEMINI_SANDBOX_PROXY_COMMAND is set
const proxyCommand = process.env['GEMINI_SANDBOX_PROXY_COMMAND'];
// start and set up proxy if QWEN_SANDBOX_PROXY_COMMAND is set
const proxyCommand = process.env['QWEN_SANDBOX_PROXY_COMMAND'];
let proxyProcess: ChildProcess | undefined = undefined;
let sandboxProcess: ChildProcess | undefined = undefined;
const sandboxEnv = { ...process.env };
@ -378,7 +378,7 @@ export async function start_sandbox(
stdio: 'inherit',
env: {
...process.env,
GEMINI_SANDBOX: config.command, // in case sandbox is enabled via flags (see config.ts under cli package)
QWEN_SANDBOX: config.command, // in case sandbox is enabled via flags (see config.ts under cli package)
},
},
);
@ -498,8 +498,8 @@ export async function start_sandbox(
// copy proxy environment variables, replacing localhost with SANDBOX_PROXY_NAME
// copy as both upper-case and lower-case as is required by some utilities
// GEMINI_SANDBOX_PROXY_COMMAND implies HTTPS_PROXY unless HTTP_PROXY is set
const proxyCommand = process.env['GEMINI_SANDBOX_PROXY_COMMAND'];
// QWEN_SANDBOX_PROXY_COMMAND implies HTTPS_PROXY unless HTTP_PROXY is set
const proxyCommand = process.env['QWEN_SANDBOX_PROXY_COMMAND'];
if (proxyCommand) {
let proxy =
@ -563,11 +563,11 @@ export async function start_sandbox(
}
args.push('--name', containerName, '--hostname', containerName);
// copy GEMINI_CLI_TEST_VAR for integration tests
if (process.env['GEMINI_CLI_TEST_VAR']) {
// copy QWEN_CODE_TEST_VAR for integration tests
if (process.env['QWEN_CODE_TEST_VAR']) {
args.push(
'--env',
`GEMINI_CLI_TEST_VAR=${process.env['GEMINI_CLI_TEST_VAR']}`,
`QWEN_CODE_TEST_VAR=${process.env['QWEN_CODE_TEST_VAR']}`,
);
}
@ -773,7 +773,7 @@ export async function start_sandbox(
// push container entrypoint (including args)
args.push(...finalEntrypoint);
// start and set up proxy if GEMINI_SANDBOX_PROXY_COMMAND is set
// start and set up proxy if QWEN_SANDBOX_PROXY_COMMAND is set
let proxyProcess: ChildProcess | undefined = undefined;
let sandboxProcess: ChildProcess | undefined = undefined;