feat: surface codex account runtime notices
This commit is contained in:
61
tests/fixtures/codex-app-server-runtime.mjs
vendored
61
tests/fixtures/codex-app-server-runtime.mjs
vendored
@@ -581,6 +581,67 @@ rl.on("line", (line) => {
|
||||
},
|
||||
});
|
||||
}
|
||||
if (process.env.BOSS_CODEX_APP_SERVER_FIXTURE_EMIT_ACCOUNT_NOTICE_EVENTS === "1") {
|
||||
send({
|
||||
method: "account/updated",
|
||||
params: {
|
||||
authMode: "chatgpt",
|
||||
planType: "team",
|
||||
},
|
||||
});
|
||||
send({
|
||||
method: "account/rateLimits/updated",
|
||||
params: {
|
||||
rateLimits: {
|
||||
limitId: "codex",
|
||||
limitName: "Codex",
|
||||
primary: {
|
||||
usedPercent: 88,
|
||||
windowDurationMins: 180,
|
||||
resetsAt: 1770003600,
|
||||
},
|
||||
secondary: null,
|
||||
credits: {
|
||||
hasCredits: true,
|
||||
unlimited: false,
|
||||
balance: "120.5",
|
||||
},
|
||||
planType: "team",
|
||||
rateLimitReachedType: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
send({
|
||||
method: "model/verification",
|
||||
params: {
|
||||
threadId: message.params?.threadId,
|
||||
turnId: "turn-fixture",
|
||||
verifications: ["trustedAccessForCyber"],
|
||||
},
|
||||
});
|
||||
send({
|
||||
method: "warning",
|
||||
params: {
|
||||
threadId: message.params?.threadId,
|
||||
message: "模型切换提醒 token=sk-secret-should-not-leak",
|
||||
},
|
||||
});
|
||||
send({
|
||||
method: "configWarning",
|
||||
params: {
|
||||
summary: "项目配置已忽略",
|
||||
details: "openai_base_url 不能放在项目配置里",
|
||||
path: "/Users/kris/code/boss/.codex/config.toml",
|
||||
},
|
||||
});
|
||||
send({
|
||||
method: "deprecationNotice",
|
||||
params: {
|
||||
summary: "on-failure 已废弃",
|
||||
details: "请改用 on-request",
|
||||
},
|
||||
});
|
||||
}
|
||||
send({
|
||||
method: "item/agentMessage/delta",
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user