v0.2.6 - fix streaming: lossless-JSON chunks
v0.2.6 - fix streaming: lossless-JSON chunks
Real agy sessions crashed with: session event "assistant/chunk" carries non-JSON-serializable data.
DSH's session layer rejects any chunk whose fields are undefined (lossless-JSON boundary). Four sites assigned undefined into chunk/event objects - every usage event, replayState-less finish, and parser event could kill the turn, which also stopped thinking from streaming:
usageFromRaw: cacheRead/cacheWrite/reasoningTokens set to undefinedfinish:replayState: undefinedwhen no conversation idparseUsage: input/output/thinking/cache fields set to undefined- parser events:
tool/error/conversationIdset to undefined
All four now omit absent optional fields instead of assigning undefined. New test/lossless-json.test.ts replicates the dsh-session lossless-JSON walker and asserts every emitted chunk survives it (63 tests green).