fix: invoke all CLI clients in full-access/yolo mode

- codex: --full-auto
- claude: --dangerously-skip-permissions
- opencode: --dangerously-skip-permissions
This commit is contained in:
2026-05-18 19:15:04 -05:00
parent d3aa92be0d
commit fd1d2c3e92
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -82,7 +82,7 @@ function mockExistsSync(allowedPaths: Set<string>): any {
describe("executePrompt", () => {
it("captures stdout for a successful codex execution", async () => {
const scenarios = new Map<string, MockScenario>([
['codex exec "hello world"', { stdout: "result\n", exitCode: 0 }],
['codex exec --full-auto "hello world"', { stdout: "result\n", exitCode: 0 }],
]);
const result = await executePrompt("codex", '"hello world"', {
spawn: mockSpawn(scenarios),
@@ -95,7 +95,7 @@ describe("executePrompt", () => {
it("captures stderr for a successful claude execution", async () => {
const scenarios = new Map<string, MockScenario>([
["claude -p hello", { stdout: "", stderr: "warning\n", exitCode: 0 }],
["claude -p hello --dangerously-skip-permissions", { stdout: "", stderr: "warning\n", exitCode: 0 }],
]);
const result = await executePrompt("claude", "hello", {
spawn: mockSpawn(scenarios),
@@ -108,7 +108,7 @@ describe("executePrompt", () => {
it("returns non-zero exit code without throwing", async () => {
const scenarios = new Map<string, MockScenario>([
["opencode run fail", { stdout: "", stderr: "error\n", exitCode: 1 }],
["opencode run --dangerously-skip-permissions fail", { stdout: "", stderr: "error\n", exitCode: 1 }],
]);
const result = await executePrompt("opencode", "fail", {
spawn: mockSpawn(scenarios),
@@ -141,7 +141,7 @@ describe("executePrompt", () => {
it("rejects with ExecError when timeout is exceeded", async () => {
const scenarios = new Map<string, MockScenario>([
["codex exec slow", { hang: true }],
["codex exec --full-auto slow", { hang: true }],
]);
await assert.rejects(
executePrompt("codex", "slow", {
@@ -159,7 +159,7 @@ describe("executePrompt", () => {
it("passes prompts with special characters unchanged", async () => {
const scenarios = new Map<string, MockScenario>([
[
'codex exec "quotes\nnewlines"',
'codex exec --full-auto "quotes\nnewlines"',
{ stdout: "ok", exitCode: 0 },
],
]);