fix(tests): type the escape-inference helper from the snapshot row

The helper declared a hand-written structural shape for its baseline, but the
snapshot payload's fields are optional, so TS2345 rejected every call site.
This commit is contained in:
Brennan Benson
2026-08-20 17:18:00 -07:00
parent 5a8cc387a5
commit c5d88b38f6
@@ -52,14 +52,13 @@ function ingestWorking(
return server.getStatusSnapshot()[0]!
}
// Why: take the snapshot row type itself rather than a hand-written structural
// shape - the payload's fields are optional, so a narrower literal type does not
// accept it and typecheck fails (tests are excluded from the mobile tsconfig but
// not from this one).
function inferEscape(
server: AgentHookServer,
baseline: {
receivedAt: number
stateStartedAt: number
prompt: string
agentType: string | undefined
}
baseline: ReturnType<AgentHookServer['getStatusSnapshot']>[0]
) {
return server.inferInterrupt({
paneKey: PANE,