feat(agent): require absolute path for command in hermes/cursor agent configs

BREAKING: HermesAgentConfig.command and CursorAgentConfig.command are now
required string fields (absolute path to CLI binary). Validation rejects
non-absolute paths at construction time.

- Eliminates PATH resolution ambiguity in spawned worker processes
- spawnCli: explicit env: process.env for clarity
- bundle-entry: WORKFLOW_CURSOR_COMMAND is now required
- Updated tests for both agents
This commit is contained in:
2026-05-12 12:52:48 +08:00
parent ecc348f182
commit 1b62cec0a2
9 changed files with 55 additions and 5 deletions
@@ -31,7 +31,7 @@ const llmProvider = {
};
const agent = createCursorAgent({
command: optionalEnv("WORKFLOW_CURSOR_COMMAND"),
command: requireEnv("WORKFLOW_CURSOR_COMMAND"),
model: optionalEnv("WORKFLOW_CURSOR_MODEL"),
timeout: optionalEnv("WORKFLOW_CURSOR_TIMEOUT")
? Number(optionalEnv("WORKFLOW_CURSOR_TIMEOUT"))