Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions astrbot/core/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -4874,10 +4874,10 @@ def get_local_permission_defaults(system: str | None = None) -> dict:
"btw.work_loop.coding_agents": {
"description": "第三方编码代理",
"type": "list",
"hint": "可委派写入任务的本地 CLI 代理(如 Claude Code、Codex)。每项包含 id、type、command、权限模式与 provider 预设;provider 会以该 CLI 原生配置层的形式生效,不改动用户全局配置。权限模式与沙箱是该 CLI 自己执行的策略,不是操作系统级隔离。委派会启动本地进程并写入文件,因此还要求工作循环的 Computer Use 运行时为 local(sandbox 下委派等于绕过沙箱),并通过 tool.local_exec 与 tool.file_write 的授权。Claude Code 以非交互方式(-p)运行,没有终端可以回答权限询问:acceptEdits 只自动放行编辑,需要跑 shell 命令的任务会一直等到超时,这类任务要显式选择 bypassPermissions。",
"hint": "可委派写入任务的本地 CLI 代理(如 Claude Code、Codex)。每项包含 id、type、command、模型、输出上限、权限模式与可写目录;委派会启动本地进程并写入文件,因此还要求工作循环的 Computer Use 运行时为 local(sandbox 下委派等于绕过沙箱),并通过 tool.local_exec 与 tool.file_write 的授权。Claude Code 以非交互方式(-p)运行,没有终端可以回答权限询问:acceptEdits 只自动放行编辑,需要跑 shell 命令的任务会一直等到超时,这类任务要显式选择 bypassPermissions。代理使用的 provider 由「第三方agent配置」页面统一管理,切换的是该 CLI 自己的全局配置。",
"_special": "select_coding_agents",
# The editor is a list of cards holding a nested preset list; half
# of a row is not enough to lay one out.
# The editor is a list of cards, one per agent; half of a row is
# not enough to lay one out.
"full_width": True,
"condition": {"btw.work_loop.enabled": True},
},
Expand Down
15 changes: 15 additions & 0 deletions dashboard/src/api/v1/codingCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ export interface CodingCliState {
providers: CodingCliProvider[];
}

/**
* One provider as `btw.cli_providers` stores it.
*
* `api_key` is what the operator typed in the field and nothing else. A config
* response writes the marker `__ASTRBOT_REDACTED__` where a stored key would
* be, so the editor treats it as "a key is stored, the field is empty": the
* marker goes back only for the entry it came from, and only a switch ever
* writes a value into the CLI's own file.
*/
export interface StoredCliProvider extends CodingCliProvider {
/** The CLI this provider is scoped to; empty means either CLI may use it. */
cli: string;
api_key: string;
}

export interface CodingCliStatePayload {
clis: CodingCliState[];
}
Expand Down
Loading
Loading