feat(agent): add command config to hermes/cursor agents + explicit env inheritance

- HermesAgentConfig.command: override hermes CLI path (default: "hermes")
- CursorAgentConfig.command: override cursor-agent CLI path (default: "cursor-agent")
- spawnCli: explicit env: process.env for clarity and future extensibility
- bundle-entry: read WORKFLOW_CURSOR_COMMAND from env
This commit is contained in:
2026-05-12 12:49:28 +08:00
parent 41209f1ef8
commit ecc348f182
6 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ export function createCursorAgent(config: CursorAgentConfig): AgentFn {
"--trust",
"--force",
];
const run = await spawnCli("cursor-agent", args, {
const run = await spawnCli(config.command ?? "cursor-agent", args, {
cwd: workspace,
timeoutMs,
});
@@ -1,6 +1,7 @@
import type { LlmProvider } from "@uncaged/workflow-protocol";
export type CursorAgentConfig = {
command: string | null;
model: string | null;
timeout: number;
/** Explicit workspace path. When `null`, the agent extracts workspace from AgentContext via a ReAct LLM call. */