SolonCode in CI: Headless Runs, JSONL Events, and Remote Workspace Execution
说明与用途
SolonCode 允许在 CI 中无交互地运行 AI 代理,提供工具权限、回合数和预算限制,并输出可机器解析的 JSON,便于自动化处理。
问题
Integrating interactive coding agents into CI pipelines requires non‑interactive, machine‑readable execution, explicit tool permissions, and bounded resource usage.
结果
SolonCode enables CI pipelines to run AI agents headlessly, enforce tool permissions, bound execution, and produce machine‑parseable JSON results, improving automation reliability.
工作流
- 1. Invoke
soloncode runwith a prompt and options (output‑format, allowedTools, disallowedTools, permission‑mode, max‑turns, max‑budget‑usd). - 2. Agent executes non‑interactively, producing a JSON result object (or text/stream‑json).
- 3. CI wrapper checks exit status and parses JSON to determine success, errors, or budget overruns.
- 4. Use
--json-schemato constrain structured output when needed. - 5. For long tasks, use
stream-jsonwith--verboseto capture event stream and optionally tee to a file. - 6. Optionally resume sessions by reusing the session ID from the first run for a second phase (analysis then modification).
证据
SolonCode has a separate run entry point for that boundary. It is a one-shot, non-interactive execution mode
The distinction between the exit code and the JSON body matters. A result can be valid JSON and still represent an incomplete or over-budget execution.
- 记录日期: 2026-09-10T02:49:00.883Z