Download src/plugin-sdk/agent-harness-exec-review-runtime.test.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/plugin-sdk/agent-harness-exec-review-runtime.test.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/plugin-sdk/agent-harness-exec-review-runtime.test.ts
-
curl -L -o agent-harness-exec-review-runtime.test.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/plugin-sdk/agent-harness-exec-review-runtime.test.ts
1.06 kB
| import { describe, expect, it } from "vitest"; | |
| import { buildExecAutoReviewInputForShellCommand } from "./agent-harness-exec-review-runtime.js"; | |
| describe("agent harness exec auto-review input", () => { | |
| it.runIf(process.platform !== "win32").each(["bash", "sh", "/bin/sh"])( | |
| "does not bind %s login-shell startup as a reviewable command", | |
| async (shell) => { | |
| await expect( | |
| buildExecAutoReviewInputForShellCommand({ | |
| command: `${shell} -lc "echo auto-review-startup-proof"`, | |
| cwd: process.cwd(), | |
| host: "codex-app-server", | |
| }), | |
| ).resolves.toBeUndefined(); | |
| }, | |
| ); | |
| it("preserves ordinary single-command auto-review input", async () => { | |
| await expect( | |
| buildExecAutoReviewInputForShellCommand({ | |
| command: "node --version", | |
| cwd: process.cwd(), | |
| host: "codex-app-server", | |
| }), | |
| ).resolves.toMatchObject({ | |
| command: "node --version", | |
| argv: ["node", "--version"], | |
| host: "codex-app-server", | |
| reason: "approval-required", | |
| }); | |
| }); | |
| }); | |