feat: harden enterprise control plane
This commit is contained in:
31
tests/fixtures/codex-computer-use-runtime.mjs
vendored
Normal file
31
tests/fixtures/codex-computer-use-runtime.mjs
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
let input = "";
|
||||
|
||||
process.stdin.setEncoding("utf8");
|
||||
process.stdin.on("data", (chunk) => {
|
||||
input += chunk;
|
||||
});
|
||||
|
||||
process.stdin.on("end", () => {
|
||||
const payload = JSON.parse(input || "{}");
|
||||
const status = String(process.env.BOSS_CODEX_COMPUTER_USE_FIXTURE_STATUS || "completed");
|
||||
if (status === "failed") {
|
||||
process.stdout.write(
|
||||
`${JSON.stringify({
|
||||
status: "failed",
|
||||
requestId: payload.requestId,
|
||||
error: "CODEX_COMPUTER_USE_UNAVAILABLE",
|
||||
})}\n`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
process.stdout.write(
|
||||
`${JSON.stringify({
|
||||
status: "completed",
|
||||
requestId: payload.requestId,
|
||||
replyBody: `Codex Computer Use 已执行:${payload.objective || "未提供目标"}`,
|
||||
targetApp: "Codex",
|
||||
executionSummary: "codex-computer-use-runtime-ok",
|
||||
})}\n`,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user