fix: keep AgentRun output flags local

This commit is contained in:
Codex
2026-06-11 06:00:56 +00:00
parent c70edd39a6
commit b1dcbb51ef
2 changed files with 68 additions and 12 deletions
+40
View File
@@ -0,0 +1,40 @@
import { describe, expect, test } from "bun:test";
import { stripAgentRunResourceWrapperArgs } from "./agentrun";
describe("AgentRun resource bridge argv", () => {
test("does not forward UniDesk output flags to create task prompt argv", () => {
expect(stripAgentRunResourceWrapperArgs([
"--aipod",
"Artificer",
"--prompt-stdin",
"-o",
"json",
"--idempotency-key",
"case-262",
"--dry-run",
])).toEqual([
"--aipod",
"Artificer",
"--prompt-stdin",
"--idempotency-key",
"case-262",
"--dry-run",
]);
});
test("strips wrapper display flags while preserving official apply arguments", () => {
expect(stripAgentRunResourceWrapperArgs([
"-f",
"-",
"--output=yaml",
"--raw",
"--full",
"--full-text",
"--dry-run",
])).toEqual([
"-f",
"-",
"--dry-run",
]);
});
});