跳转到内容

选择语言

当前语言: 简体中文

Isolated CLI smoke tests

Run the optional harness against already installed Aider, Goose, OpenCode, Qwen Code, or Codex binaries:

终端窗口
node scripts/cli/smoke-cli-integrations.mjs --targets qwen,codex --json

--bin-dir /absolute/path prepends an existing binary directory. The harness does not install tools. Missing executables produce HOLD-missing-binary; a timeout produces HOLD-timeout. Any FAIL makes the process exit with code 1; HOLD makes it exit with code 2. All targets must PASS for exit code 0.

Each target runs through omniroute run against a disposable HTTP server bound to 127.0.0.1, using a fixed, non-secret sentinel credential. HOME, XDG directories, CLI configuration homes, and the OmniRoute data directory are temporary. Provider credentials, proxy variables, runtime-loader flags, and existing configurations are not inherited. No real upstream credentials are required or accepted.

The explicit --inherit-isolated-env harness option forwards --inherit-env to omniroute run, allowing harness-controlled metadata/update suppression flags to reach the third-party child. It is off by default and still rebuilds the outer environment from the same narrow allowlist: it never inherits the caller’s secrets, NODE_OPTIONS, NODE_PATH, LD_PRELOAD, PYTHONPATH, or proxy settings. Storage encryption uses a non-secret sentinel only inside the disposable data directory. The harness also selects LiteLLM’s packaged model metadata and unbuffered Python output; these are fixed test controls, not caller-supplied environment values. This option requires a CLI implementing run --inherit-env; unsupported launchers fail normally and must not be counted as a successful smoke.

A PASS requires a successful child exit, the expected protocol path and model, the sentinel authorization header, a completed HTTP response, and an unpredictable server-generated response marker in stdout. The marker does not appear in the prompt, so printing the prompt or a diagnostic cannot satisfy the test. This proves the installed binary’s transport/response contract, not real provider authentication, tool execution, a production deployment, or every CLI version.

The runner bounds captured output and execution time. On POSIX it creates a dedicated process group and terminates remaining members of that group at teardown; Windows currently returns HOLD-process-isolation because equivalent descendant cleanup is not implemented. Temporary files and server sockets are closed after each target. This is configuration and process isolation, not an operating-system network sandbox: third-party binaries may attempt their own metadata or update requests. Run only trusted installed binaries and use an externally restricted environment if zero non-loopback traffic is required.

Run the harness’s deterministic tests without third-party binaries:

终端窗口
node --import tsx/esm --test tests/unit/cli/real-cli-smoke-harness.test.ts tests/unit/cli/real-cli-smoke-safety.test.ts

The mock supports OpenAI Chat Completions and Responses API JSON/SSE. It never forwards requests to a provider. Credential-dependent upstream tests remain a separate opt-in validation and must not be reported as covered by this harness.


undefined (a58000c7685f)

HagiCode

HagiCode 是面向项目开发的 AI 编码工作台:丰富、便捷的界面交互让规划、Agent 执行与项目工作更容易上手和跟进,带来更投入的开发体验。

丰富、便捷的界面交互,让规划、Agent 执行与项目工作更容易上手和跟进。

访问 HagiCode阅读文档
  • 智能OpenSpec 工作流把意图转化为从提案、设计、任务到交付的可执行路径。
  • 高效多 Agent 并行推进调研、实现与审阅,并支持多仓库变更和你熟悉的 Agent CLI。
  • 有趣丰富、便捷的界面交互让规划、Agent 执行与项目工作更容易上手和跟进,带来更投入的开发体验。

下载 Windows 版

从 Microsoft Store 获取全部下载

让想法变成真正交付的软件。

HagiCode 是面向项目开发的 AI 编码工作台:用 OpenSpec 工作流规划变更,多 Agent 并行执行,再由 Hero Scenario 让进度一目了然,把想法变成真正交付的软件。

智能
OpenSpec 工作流把意图变成从提案到交付的可执行路径。
高效
多 Agent 并行推进调研、实现与审阅。
有趣
丰富、便捷的界面交互,让规划、Agent 执行和项目工作更容易跟进。