refactor: replace UWF_EDGE_PROMPT env var with named CLI args
Agent adapters now use named parameters: uwf-<agent> --thread <id> --role <role> --prompt <text> Instead of positional args + env var: UWF_EDGE_PROMPT=... uwf-<agent> <thread-id> <role> Changes: - workflow-agent-kit/src/run.ts: parseArgv uses named --thread/--role/--prompt - workflow-agent-kit/src/context.ts: edgePrompt passed as parameter, not read from env - cli-workflow/src/commands/thread.ts: spawnAgent passes named args 小橘 <xiaoju@shazhou.work>
This commit is contained in:
@@ -804,13 +804,11 @@ function spawnAgent(
|
||||
role: string,
|
||||
edgePrompt: string,
|
||||
): CasRef {
|
||||
const argv = [...agent.args, threadId, role];
|
||||
const env = { ...process.env, UWF_EDGE_PROMPT: edgePrompt };
|
||||
const argv = [...agent.args, "--thread", threadId, "--role", role, "--prompt", edgePrompt];
|
||||
let stdout: string;
|
||||
try {
|
||||
stdout = execFileSync(agent.command, argv, {
|
||||
encoding: "utf8",
|
||||
env,
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
maxBuffer: 50 * 1024 * 1024, // 50 MB — stream-json output can be large
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user