allow forces direct provider; provider_mode in telemetry; eval refuses mixed modes (closes #17)
This commit is contained in:
1 parent
374cf28aed
commit
2ff8abe7a3
8 files changed
+219
-10
No files matched your search
@@ -32,6 +32,26 @@ after each attempt, rewritten before the next) and blocks the call before it exe
|
||||
Limit: plain `bash` (no pattern) is not confined; a shell cannot be parsed reliably. Use `sandbox = true` for that.
|
||||
A repo that already has its own `.hx/config.toml` is refused (`setup:` failure) so the guard is never silently skipped.
|
||||
|
||||
## Provider modes
|
||||
|
||||
hx has two ways to reach Claude. They differ in what orch can enforce:
|
||||
|
||||
| mode | who runs the tools | `allow` | `max_turns` |
|
||||
|---|---|---|---|
|
||||
| `direct` (API provider) | hx | enforced (guard + stream check) | counts model turns |
|
||||
| `claude_cli` (hx starts the `claude` binary; auto-on when `claude` is in PATH and `HX_BASE_URL` is unset) | the `claude` binary; hx emits no `tool_call` events | cannot be enforced | meaningless: 1 hx request per run |
|
||||
|
||||
With `allow` set, orch writes `claude_cli = false` into the generated worktree `.hx/config.toml` (project config
|
||||
beats `~/.hx/config.toml`), so the run uses the direct provider and the allowlist holds. The direct Claude provider
|
||||
bills OAuth calls as extra usage; if that is not acceptable, profiles for `claude_cli` must go without `allow` and
|
||||
rely on `home`, the cleared environment and `sandbox = true`. orch warns for those (no allowlist).
|
||||
|
||||
Telemetry records the mode (`provider_mode`: `claude_cli`, `direct`, `codex`; old lines `unknown`). `orch report`
|
||||
shows it as a column and `orch eval` refuses to compare files with different (or mixed) modes ("NOT COMPARABLE",
|
||||
exit 1): tokens, turns and tool behaviour differ by an order of magnitude between the modes.
|
||||
Limit: the mode is derived from config and the `claude` binary, not from hx itself; hx' remembered last provider
|
||||
(`last.json`) is not read, so set `provider` in profiles you compare.
|
||||
|
||||
## Audit log
|
||||
|
||||
`<state>/audit.log`, append-only JSONL: `run_start` (profile, allowlist, sandbox, yolo), one `tool` line per call
|
||||
|
||||
Reference in new issue
Block a user