feat(orc): centralize host-aware routing

This commit is contained in:
2026-08-01 20:04:55 +08:00
parent 34bbb97406
commit f5bf35c722
9 changed files with 499 additions and 275 deletions
+14 -6
View File
@@ -16,9 +16,12 @@ orca orchestration inbox --limit 20 --json
## 解析安全启动计划
对每个阶段调用 `resolve_profile.py resolve`,同时传入规范绝对 `--project-root`
`--worktree`,以及本阶段精确的 `--model-auth``--remote-auth`。JSON 结果包含选择来源、
结构化 profile、认证选择、配置与 worktree identity、可信 Python/Codex/Orca executable、
对每个阶段调用 `resolve_profile.py resolve`,同时传入规范绝对 `--project-root`
`--worktree` 和从当前 Agent 系统身份确定的必填 `--host-cli`,以及本阶段精确的
`--model-auth``--remote-auth`
resolver 始终读取 skill 内共享的 `config.yaml`,不接受项目配置路径。JSON 结果包含
选择来源、结构化 profile、认证选择、配置与 worktree identity、可信 Python/Agent
CLI/Orca executable、
`launchFingerprint`、固定 worker/launcher argv,以及完整的 `terminalCreateArgv`
`terminalCreateShellCommand`
@@ -31,11 +34,16 @@ orca orchestration inbox --limit 20 --json
同时暴露多个 token 或 SSH agent。需要代理、额外凭据或 Docker registry env secret 时
fail closed,由用户确认新的最小权限适配,不继承 ambient proxy/credential 变量。
- resolver 失败时停止;不改用默认模型、邻近档位或已有未知终端。
-重复手写 worktree 检查;resolver 已拒绝 root、不存在、非规范、含 symlink、未注册、
跨仓库或不在 allowlist 的目标,并把身份写入 fingerprint
- ORC v1 profile 必须使用 `workspace-write``read-only` sandbox 可能阻止 Orca CLI
-从任务文本、可执行文件存在性或共享配置猜宿主;Codex 传 `--host-cli codex`Cursor
`--host-cli cursor-agent`。宿主身份不明确时停止
- 不重复手写 worktree 检查;resolver 已拒绝 root、不存在、非规范、含 symlink、未注册
或跨仓库的目标,并把身份写入 fingerprint。
- ORC v2 profile 必须使用 `workspace-write``read-only` sandbox 可能阻止 Orca CLI
写入自身运行时或挂载目录,导致 worker 无法发送 `worker_done`;只读工作通过 task
spec 限制,而不是换成无法完成 lifecycle 的 sandbox。
- Codex 与 Cursor 使用不同的固定 argv 适配器。Cursor 只允许 `--auto-review`、启用的
sandbox 和精确 workspace;不得把 Codex 参数套给 Cursor,也不得给 Cursor 追加
`--force``--yolo`
## 创建与派发