fix: 修复 runner Codex shell 工具环境
This commit is contained in:
@@ -23,6 +23,10 @@ for await (const line of rl) {
|
||||
}
|
||||
if (message.method === "thread/start") {
|
||||
observedThreadModel = Object.hasOwn(message.params ?? {}, "model");
|
||||
if (mode === "require-danger-sandbox" && message.params?.sandbox !== "danger-full-access") {
|
||||
respond(message.id, null, { code: -32000, message: `thread/start expected danger-full-access sandbox, got ${String(message.params?.sandbox ?? "missing")}` });
|
||||
continue;
|
||||
}
|
||||
if (mode === "reject-unexpected-model" && observedThreadModel) {
|
||||
respond(message.id, null, { code: -32000, message: "thread/start unexpectedly included model" });
|
||||
continue;
|
||||
@@ -39,6 +43,10 @@ for await (const line of rl) {
|
||||
}
|
||||
if (message.method === "thread/resume") {
|
||||
observedThreadModel = Object.hasOwn(message.params ?? {}, "model");
|
||||
if (mode === "require-danger-sandbox" && message.params?.sandbox !== "danger-full-access") {
|
||||
respond(message.id, null, { code: -32000, message: `thread/resume expected danger-full-access sandbox, got ${String(message.params?.sandbox ?? "missing")}` });
|
||||
continue;
|
||||
}
|
||||
if (mode === "resume-no-rollout") {
|
||||
respond(message.id, null, { code: -32000, message: `no rollout found for thread id ${String(message.params?.threadId ?? "unknown")}` });
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user