feat: configure executor models

This commit is contained in:
liujing
2026-07-20 13:54:11 +08:00
parent c1a982a179
commit 4026f04b93
8 changed files with 396 additions and 14 deletions
+11 -1
View File
@@ -205,7 +205,12 @@ This allows continuation of the same executor session after reaching the cycle l
## Configuration
Create `agent-workflow.json` in your repository root:
Create `agent-workflow.json` in your repository root, and optionally create `~/.agent-workflow/config.json` for host-wide defaults. Settings are merged per field with the following precedence:
1. CLI flags (`--executor`, `--vcs`, `--max-cycles`)
2. `agent-workflow.json` in the project root
3. `~/.agent-workflow/config.json`
4. Built-in defaults
```json
{
@@ -233,6 +238,11 @@ Create `agent-workflow.json` in your repository root:
`timeoutSeconds` is an inactivity timeout, not a total runtime limit. The host resets the timeout whenever the executor emits stdout/stderr progress, so an active task may run longer than the configured window. A continuously silent executor is terminated after the configured number of seconds. Agy receives a 24-hour internal print-mode ceiling while the host inactivity timeout remains the primary stuck-process guard.
- `defaultVcs` - Default VCS kind: `"auto"` (detect), `"git"`, `"svn"`, or `"none"`. Default is `"auto"`.
- `model` - Executor model identifier (accepted as any non-empty string). When set, it is passed to Claude, Agy, and Reasonix. The effective model is reloaded from the latest config before each later cycle, scope remediation, cycle extension, and executor retry, so mid-run model changes take effect without starting a new run. Binary path, agent, profile, budget, timeout, and other executor settings are locked at run start.
Configuration files are forbidden from storing secrets (`apiKey`, `token`, `secret`, `password`, `credential`, etc.). If the latest config is invalid or the reloaded `model` is empty, the run enters a `blocked` state before launching the executor. After correcting the config, the same run can continue with `agent-workflow retry-execute --run <run-id>`.
The path used to load `agent-workflow.json` is persisted with the run so later model reloads use the same config source for Git, SVN, and snapshot-mode repositories.
## Environment Variables