Repository navigation
v1.8.3 — Streaming Tool-Call Revision Rebasing (#11), Instant Inline-Backtick Preview (#10), and Zero-Call Hallucinated Tool-Result Recovery
Streaming Tool-Call Revision Rebasing (Fixes #11), Instant Inline-Backtick Streaming Preview (Fixes #10), and Zero-Call Hallucinated Tool-Result Recovery
Updated standalone extensions: pi-gemini-app@0.1.14, openclaw-gemini-app@0.1.10, opencode-gemini-app@0.1.6, mcp-gemini-app@0.1.5.
- Deferred Tool-Call Emission & Same-ID Snapshot Revision Rebasing (Fixes #11) (
src/native-provider.mjs,src/gateway/app.mjs,extensions/pi/stream.js,extensions/opencode/fetch.js):- Enabled
deferToolCalls: trueacross the HTTP Gateway, Pi/OpenClaw (extensions/pi/stream.js), and OpenCode (extensions/opencode/fetch.js) so parsed caller tool calls are held until turn completion (END_STREAM/modelComplete), verifiedpostToolIdleStall/NATIVE_TURN_TIMEOUT, or salvageableTOOL_ERRORS. Because clients never execute tool calls before turn completion, deferring adds zero turn latency while preventing draft no-op calls from executing. - Added
tryRebaseLive()for same-responseIdcumulative snapshot revisions that preserve already-delivered visible text and published calls, replacing retracted draft tool calls cleanly instead of failing withNON_MONOTONIC_NATIVE_RESPONSE— while keeping revisions of already-shown text or missing/changedresponseIdstrictly fail-closed. - Hardened edge transitions: bound
modelCompleteand deferred call release strictly to accepted snapshots (snapshotAccepted), salvaged already-validated Call A when a trailing Call B has broken JSON followed by reset/timeout, and deferred temporary mid-revisionTOOL_ERRORSinsidetryRebaseLive()when the delivered prefix remains intact so a subsequent same-ID frame can repair it cleanly.
- Enabled
- Immediate Inline-Backtick Streaming Preview & Incremental O(n) Scanner (Fixes #10) (
src/tool-protocol.mjs):- Fixed
safePendingPreview()holding back trailing lines without\nat the first single backtick`(which previously froze visible text before inline code for up to 45 seconds duringpostOutputToolIdleMswaits). Ordinary 1–2 backtick inline code now streams immediately while potentialtool_callfence openings (```) remain safely held. - Replaced repeated per-chunk trailing-line rescans with a localized O(n) incremental cursor inside
safePendingPreview()(64 KiB single-line stress benchmarks reduced from ~174–230 ms to ~3.5–5.6 ms).
- Fixed
- Zero-Call Hallucinated
[Caller tool result]Wire-Block Guard & Automatic Recovery (src/tool-protocol.mjs,src/native-provider.mjs,src/gateway/automatic-recovery.mjs,extensions/pi/stream.js,extensions/opencode/fetch.js):- Unified
classifyCallerResultWire()withleadingWhitespacebuffering andflush({ interrupted })so models that echo synthetic[Caller tool result] {"tool_call_id":...}blocks with zero priortool_callfences are caught immediately, cancelled upstream, and automatically recovered via targetedMALFORMED_TOOL_CALL(hallucinated_caller_result) guidance instead of leaking synthetic transcript text and halting agent loops.
- Unified
Full Changelog: v1.8.2...v1.8.3