Dashboard › opencode-lore › Distillation
ff9f8545-8f39-4cb2-a29f-11d89e686541["lore_tm_v1_RlC7_yrFKsU5CmujUR2G2FOKAjPfyfp3RbLoJYP8w-c","lore_tm_v1_gkTY24hCTKrHir_hP1G8orNiBKsBB_mfpe_ik5di9Ec","lore_tm_v1_rQjqLF8k8KNY_k7zl9JoQUx05iJS2JPNroqfUh_lHeQ"]
Date: Sep 16, 2026
/home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/src/stream/anthropic.ts: deterministic local stream limits must never be reclassified as transport./home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/src/stream/anthropic.ts defines SSEStreamTransportError with kind: "inactivity" | "read" and a distinct SSEStreamLimitError; readStreamChunk() preserves SSEStreamLimitError, wraps other reader failures as SSEStreamTransportError("read", "SSE stream read failed"), independently handles aborts, and raises SSEStreamTransportError("inactivity", "SSE stream inactivity deadline exceeded") after inactivityMs.parseSSEStream() in /home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/src/stream/anthropic.ts supports maxEventBytes, maxFrames, shared frameCounter, inactivityMs, signal, requireEventTerminator, maxTotalBytes, and fatalUtf8; it rejects a non-safe-integer or negative frame limit with "SSE frame limit must be a non-negative safe integer", raises SSEStreamLimitError when the frame or aggregate-byte ceiling is exceeded, and raises "malformed SSE UTF-8" for decode failures.stripInitialBom() owns one-time UTF-8 BOM removal and byte accounting even when the BOM is split across transport chunks; appendDecoded() retains a 3-character delimiter scan tail; accumulated bufferParts are joined only once a complete event delimiter exists, preventing repeated copies and full-prefix scans for attacker-fragmented unterminated events; every delimiter counts as parser work, including blank and comment-only frames./home/byk/Code/opencode-lore-responses-accumulation/packages/core/src/log.ts defines LogSink methods info(), warn(), error(), captureException(), and optional withDbSpan<T>(); registerSink() supports one sink, while traceDbQuery() routes through sink.withDbSpan(sql, fn) when available and otherwise calls fn() exactly once as an allocation-free transparent pass-through./home/byk/Code/opencode-lore-responses-accumulation/packages/core/src/log.ts: all levels persist to ~/.local/share/lore/lore.log, rotate above 5 MB to one .log.1 backup, and are disabled during NODE_ENV=test; LORE_DEBUG enables informational stderr output only for "1" or case-insensitive "true", fixing the prior bug where "0" and "false" were treated as truthy; silenceStderr() is used by in-process TUI hosts so logging goes only to the persistent file and registered sink rather than corrupting the TUI.