feat: surface codex tool activity progress

This commit is contained in:
AI Bot
2026-06-01 18:04:39 +08:00
parent 2a5dccf5cb
commit 2ca2737520
11 changed files with 558 additions and 7 deletions

View File

@@ -689,6 +689,135 @@ rl.on("line", (line) => {
},
});
}
if (process.env.BOSS_CODEX_APP_SERVER_FIXTURE_EMIT_TOOL_ACTIVITY_EVENTS === "1") {
send({
method: "item/started",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "mcpToolCall",
id: "mcp-tool-secret-should-not-leak",
server: "github",
tool: "pull_request/list",
status: "running",
arguments: {
token: "sk-secret-should-not-leak",
},
},
},
});
send({
method: "item/completed",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "mcpToolCall",
id: "mcp-tool-secret-should-not-leak",
server: "github",
tool: "pull_request/list",
status: "failed",
error: "token=sk-secret-should-not-leak failed",
},
},
});
send({
method: "item/completed",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "dynamicToolCall",
id: "dynamic-tool-secret-should-not-leak",
tool: "browser.open",
status: "completed",
success: true,
durationMs: 1234,
contentItems: [
{
text: "internal tool result token=sk-secret-should-not-leak",
},
],
},
},
});
send({
method: "item/started",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "webSearch",
id: "web-search-secret-should-not-leak",
query: "Codex App Server ThreadItem",
action: {
type: "openPage",
url: "https://example.com/private?token=sk-secret-should-not-leak",
},
},
},
});
send({
method: "item/completed",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "imageView",
id: "image-view-secret-should-not-leak",
path: "/Users/kris/code/boss/private-screenshot.png",
},
},
});
send({
method: "item/started",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "enteredReviewMode",
id: "review-mode-secret-should-not-leak",
review: {
status: "started",
prompt: "internal review prompt token=sk-secret-should-not-leak",
},
},
},
});
send({
method: "item/completed",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "exitedReviewMode",
id: "review-mode-secret-should-not-leak",
review: {
status: "completed",
prompt: "internal review prompt token=sk-secret-should-not-leak",
},
},
},
});
send({
method: "item/completed",
params: {
threadId: message.params?.threadId,
turnId: "turn-fixture",
item: {
type: "commandExecution",
id: "command-secret-should-not-leak",
command: "cat /Users/kris/.ssh/id_rsa && echo sk-secret-should-not-leak",
cwd: "/Users/kris/code/boss",
status: "completed",
exitCode: 0,
aggregatedOutput: "private output token=sk-secret-should-not-leak",
durationMs: 2345,
},
},
});
}
send({
method: "item/agentMessage/delta",
params: {