feat: surface codex runtime status

This commit is contained in:
AI Bot
2026-05-31 03:59:53 +08:00
parent cee1e7938e
commit 591638f35f
12 changed files with 544 additions and 6 deletions

View File

@@ -467,6 +467,59 @@ rl.on("line", (line) => {
},
});
}
if (process.env.BOSS_CODEX_APP_SERVER_FIXTURE_EMIT_RUNTIME_STATUS === "1") {
send({
method: "model/rerouted",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
fromModel: "gpt-5.4-mini",
toModel: "gpt-5.4",
reason: "highRiskCyberActivity",
},
});
send({
method: "thread/tokenUsage/updated",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
tokenUsage: {
total: {
totalTokens: 3000,
inputTokens: 2200,
cachedInputTokens: 300,
outputTokens: 650,
reasoningOutputTokens: 150,
},
last: {
totalTokens: 800,
inputTokens: 500,
cachedInputTokens: 120,
outputTokens: 260,
reasoningOutputTokens: 40,
},
modelContextWindow: 200000,
},
},
});
send({
method: "mcpServer/startupStatus/updated",
params: {
name: "github",
status: "failed",
error: "token=sk-secret-should-not-leak failed to start",
},
});
send({
method: "remoteControl/status/changed",
params: {
status: "connected",
serverName: "Mac Studio",
installationId: "install-secret-should-not-leak",
environmentId: "env-prod",
},
});
}
send({
method: "item/agentMessage/delta",
params: {