Dashboard › opencode-lore › Distillation
6c0454a3-bcd7-4d1a-9707-382ca5cd2704["lore_tm_v1_bvBxMxwdghiDOyGBxTIFdGTdZ-zxZru8jMCejbahUVo","lore_tm_v1_z0RlVH_9vRV_vTMTXcloultv0ditcKtYhe7BgtMHZb8"]
Date: Sep 16, 2026
packages/gateway/src/pipeline.ts covering approximately lines 9030-9670 of the Responses stream lifecycle, terminal reconciliation, SSE parsing, and recall-diagnostics implementation."invalid Responses reasoning summary item" and reasoning completion without content with Responses reasoning completed without content for index ${outputIndex}.response.created with Responses event before response.created: ${event} and rejects response identity changes with exact error "Responses terminal event changed response identity".raw.summary when it is an array, updates acc.rawItems only when changed, validates terminal part values through partValue(state.kind, record, \terminal ${description}`), and can synthesize response.output_item.done` events.output_index, throwing exact error "invalid Responses output_index for item_reference", and checks identities against outputIdentities using item.id."\n\n", parses event data with JSON.parse(data) as Record<string, unknown>, and guards completion with if (completionAttempted) return completed.opts.onRecall, handles late or aborted results through onLateResult(), and records successful diagnostics via recallDiagnostics.record(input, result.resultText, result.coverage).packages/gateway/src/pipeline.ts covering approximately lines 9680-10370, including synthetic Responses events, usage accounting, final-output construction, visible-index forwarding, stream cancellation, retries, hidden recall handling, and event accumulation.response.content_part.added events and message content shaped as { type: "output_text", text, annotations: [] }.inclusiveInputTokens with addUsageTokens(...) and maps ru.cacheCreationInputTokens ?? 0 to cache_write_tokens.Array<{ index: number; item: Record<string, unknown> }>; construction handles items whose type === "text" and consults state.rawItems.get(index).principalTransportRetries, a "principal_missing_terminal" condition, forwardedVisibleOutputIndices as new Map<number, number>(), hiddenRecallBaseline, and pendingRecalls as PendingResponsesRecall[]."hidden Responses output item reached the client" if a hidden output item is exposed.seedImplicitCodexItem(state, normalizationState, event, parsed) and distinguishes recall tools using item.name !== RECALL_TOOL_NAME; resolution state includes resolvingVisibleTool and resolvingRecallTool.postResponse.