feat: surface codex hook lifecycle progress
This commit is contained in:
58
tests/fixtures/codex-app-server-runtime.mjs
vendored
58
tests/fixtures/codex-app-server-runtime.mjs
vendored
@@ -849,6 +849,64 @@ rl.on("line", (line) => {
|
||||
},
|
||||
});
|
||||
}
|
||||
if (process.env.BOSS_CODEX_APP_SERVER_FIXTURE_EMIT_HOOK_EVENTS === "1") {
|
||||
send({
|
||||
method: "hook/started",
|
||||
params: {
|
||||
threadId: message.params?.threadId,
|
||||
turnId: "turn-fixture",
|
||||
run: {
|
||||
id: "hook-secret-should-not-leak",
|
||||
eventName: "postToolUse",
|
||||
handlerType: "command",
|
||||
executionMode: "async",
|
||||
scope: "turn",
|
||||
sourcePath: "/Users/kris/code/boss/.codex/hooks/private-hook.toml",
|
||||
source: "project",
|
||||
displayOrder: 1,
|
||||
status: "running",
|
||||
statusMessage: "running token=sk-secret-should-not-leak",
|
||||
startedAt: Date.now(),
|
||||
completedAt: null,
|
||||
durationMs: null,
|
||||
entries: [
|
||||
{
|
||||
kind: "context",
|
||||
text: "internal hook output token=sk-secret-should-not-leak",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
send({
|
||||
method: "hook/completed",
|
||||
params: {
|
||||
threadId: message.params?.threadId,
|
||||
turnId: "turn-fixture",
|
||||
run: {
|
||||
id: "hook-secret-should-not-leak",
|
||||
eventName: "postToolUse",
|
||||
handlerType: "command",
|
||||
executionMode: "async",
|
||||
scope: "turn",
|
||||
sourcePath: "/Users/kris/code/boss/.codex/hooks/private-hook.toml",
|
||||
source: "project",
|
||||
displayOrder: 1,
|
||||
status: "completed",
|
||||
statusMessage: "completed token=sk-secret-should-not-leak",
|
||||
startedAt: Date.now() - 42,
|
||||
completedAt: Date.now(),
|
||||
durationMs: 42,
|
||||
entries: [
|
||||
{
|
||||
kind: "feedback",
|
||||
text: "private hook result token=sk-secret-should-not-leak",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
if (process.env.BOSS_CODEX_APP_SERVER_FIXTURE_EMIT_REASONING_PLAN_EVENTS === "1") {
|
||||
send({
|
||||
method: "item/completed",
|
||||
|
||||
Reference in New Issue
Block a user