fix(core): escape quotes again, keep the reference's window label, and sniff the hyper body

Three divergences found by reading the ABI-3 diff and pinned by new parity cases in prime-agent. All three are cases the parity suite could not see before, because it drove Zig one round per process and never compared an HTTP request step. - writeJsonString emitted a bare `"` for a quote inside a value, so any provider string containing one produced invalid JSON: `"notes":["Team: Hyper "Squad""]`. The escape table is the boundary between provider-controlled text and the JSON contract, so it now has a test that parses its own output. - epochToWindowLabel dropped the label for a reset already in the past. The reference (prime-agent's driver.ts) floors it to `Math.max(1, …)`, and a host that shows nothing looks like a provider with no window at all. - hyper classified its round by response count alone, so a caller handing in the billing body as the only response got "no hyper teams found". The reference distinguishes by body shape (`plan` or `balances`), and the host loop is not the only caller. Two tests added for the first two; prime-agent's parity suite grows a multi-round hyper case and a past-due reset case for all three.

7104b97b parent cf47adbb +45 −16
browse files