- pi-durable: GenerationRequest drops payloadReplaced; the body chain is
unchanged.
- p2: the warmer asks the host for the conversation's phase at each refresh
(streaming while pi.live.run exists, idle for top-level conversations,
nothing once the request is stale) instead of tracking afterRun, uses real
timers, and drops the late-timer guard.
- Tests run the warmer on mocked timers in four tests plus the worker test.
p2 never kept prompt caches warm: every request after more than five quiet
minutes rewrote the whole prompt (about a quarter of p2's spend in the
sessions analyzed). The new cache-warming plugin does what pi-coding-agent's
cache warmer does, per conversation.
- pi-ai: the warming policy (TTL, refresh delay, replayability, refresh
options, cost decision and constants) moves from pi-coding-agent's
cache warmer to shared helpers in pi-ai; pi-coding-agent uses them.
- pi-durable: afterResponse gets the request the attempt sent
(GenerationResponse { message, request }), so a hook can repeat it;
recordUsage is exported.
- p2: plugins/cache-warming registers a hook-only Durable extension,
keeps the worker alive while warming (liveness kind cacheWarming), and
adds the cacheWarming setting (idle by default, streaming, off).