Historical native `web_search_call` items become a labeled assistant text message (recorded status, action, queries and sources; no item id, no internal turn metadata) once the filter has removed the reasoning they depend on. Other native tools keep their ids; tool call/result pairs, unsafe-reference rejection and passthrough for providers without the rule are unchanged. Split out of #168 as asked in its review. codex-history 0.1.0 -> 0.1.1.
What was run at 61b6f0b (reviewer, bun 1.4.2, macOS):
- bun test packages/codex-history: 29 pass, 0 fail. node --test packages/codex-history/web-search.test.mjs: 6 pass. bun scripts/check.mjs codex-history: exit 0.
- Broken by hand: with the web_search_call branch disabled, 5 bun tests and 4 node tests go red.
- magpie (built from yetone/magpie main 85eef5d87) in a sandbox HOME, middleware added from the PR's package, a custom Responses provider `demo` pointing at a local fake, options {"providers":{"magpie:demo":{"historyFilter":true}}}, gateway on 127.0.0.1:18763 (moejs). A Codex-shaped request with reasoning + web_search_call + function_call pair: the fake received the search as the labeled assistant text, no rs_/ws_ ids, no PRIVATE_TURN, the call pair intact, store false. With main's 0.1.0 file swapped in, the fake received the bare web_search_call.
- Not tried: a real Codex session or real vendors.