test: harden remote control stress flow
This commit is contained in:
24
tests/fixtures/computer-use-dialog-runtime.mjs
vendored
Normal file
24
tests/fixtures/computer-use-dialog-runtime.mjs
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
let input = "";
|
||||
|
||||
process.stdin.setEncoding("utf8");
|
||||
process.stdin.on("data", (chunk) => {
|
||||
input += chunk;
|
||||
});
|
||||
|
||||
process.stdin.on("end", () => {
|
||||
const payload = JSON.parse(input || "{}");
|
||||
process.stdout.write(
|
||||
`${JSON.stringify({
|
||||
status: "needs_user_action",
|
||||
requestId: payload.requestId,
|
||||
kind: "dialog_intervention_required",
|
||||
dialogId: "dialog-system-permission",
|
||||
appName: "System Settings",
|
||||
platform: "darwin",
|
||||
risk: "high",
|
||||
summary: "System Settings 弹窗需要用户确认。",
|
||||
recommendedAction: "handled_on_device",
|
||||
availableActions: ["handled_on_device", "cancel_task"],
|
||||
})}\n`,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user