跳转到内容

选择语言

当前语言: 简体中文

CLI configuration previews and writes

The authenticated /api/cli-tools/config and /api/cli-tools/apply routes return non-cacheable, redacted previews. They preserve the existing authentication and authorization checks. Request bodies reject unknown fields. An explicit base URL must use HTTP(S) without embedded username/password credentials; when omitted, the server’s configured base URL is used.

For a batch preview, GET /api/cli-tools/config accepts an optional baseUrl query parameter and takes the configuration credential from the x-omniroute-config-api-key header. Credentials in the query string are rejected. POST /api/cli-tools/config accepts toolId, baseUrl, apiKey and optional model in its JSON body. Responses use Cache-Control: no-store on both success and error paths. Preview text is not a usable credential-bearing configuration.

Preview projection redacts serialized caller credentials and credential fields already present in merged JSONC, TOML or YAML profiles. The apply route writes the original configuration; preview redaction does not alter the on-disk values. Malformed JSON is rejected with 400. Public error responses use the standard sanitized error envelope.

Applying a configuration uses a private temporary file in the destination directory, flushes it, and atomically renames it into place. Files and backups use mode 0600; permissions are set on the owned descriptor before rename. Final destination symlinks and non-regular files are refused. Codex and OpenCode reads also refuse final-path symlinks before merging existing TOML/JSONC. This does not claim protection against an adversary who controls the parent directory.

The container write guard remains active: an unsafe ephemeral destination returns 422 and directs the operator to the host-side setup command. A dry run remains available and does not write files. See CLI integrations for the supported host-side setup commands and error sanitization for the public error contract.


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 执行和项目工作更容易跟进。