Dashboard › opencode › Distillation
53bb25f1-82e0-4e71-8efb-b53c00c69bf1["lore_tm_v1_QdQfxx8Z4vOEpNWLg9ZDtGMmF1x-Cxc3-5izjQGZDgc","lore_tm_v1_i3bQqW_DOvHHknv3beaC4dGoaAGY5eO_5TbB4kyyMOA","lore_tm_v1_zWl12oTEKHhKn0TXkJ849DUumhmQwc1A3SBMNysHOYo","lore_tm_v1_jqDDmzjBg4P6kzpyFZ0nFrEu4M_K00sM_cHjsaWe5uc","lore_tm_v1_UW_HK5kt9xIjTyQyfNHgXaRhcvtCkz3ikZkzl5cY18o","lore_tm_v1_GkaIWmt_OAKTrP8gYtVZ5CxXk5YKUGah2dcrKLZX3Mo","lore_tm_v1_3w2BqTXyr5MO49u_XHnes_2Qit8GwQMGhqaZwgJAWkA"]
Date: Sep 14, 2026
/home/byk/Code/opencode/packages/core/src/session/event.ts is a 2-line re-export module: line 1 is export * from "@opencode-ai/schema/session-event" and line 2 is export * as SessionEvent from "@opencode-ai/schema/session-event"./home/byk/Code/opencode/packages/schema/src/: v1/session.ts, session.ts, session-v1.ts, session-todo.ts, session-status-event.ts, session-message.ts, session-input.ts, session-id.ts, session-event.ts, session-delivery.ts, and session-compaction-event.ts./home/byk/Code/opencode/packages/schema/src/session-event.ts defines event types including session.next.context.updated, session.next.synthetic, session.next.shell.started, session.next.retried, session.next.compaction.started, and session.next.compaction.delta; it includes RevertEvent, unions event definitions such as Shell.Ended, Tool.Failed, AgentSwitched, Step.Failed, and Tool.Success, and exports Durable = Schema.Union(DurableDefinitions, { mode: "oneOf" }).safe(value) as Math.max(0, Number.isFinite(value) ? (value ?? 0) : 0), publishes events such as SessionEvent.Step.Started, SessionEvent.Text.Ended, and SessionEvent.Tool.Failed, tracks assistantActive/assistantFailed, and dies on invalid stream transitions including ${name} delta before start: ${id}, Tool call name changed for ${event.id}: ${tool.name} -> ${event.name}, and Tool error name changed for ${event.id}: ${tool.name} -> ${event.name}./home/byk/Code/opencode/packages/core/test/session-runner.test.ts contains targeted tests for durable context and execution behavior: line 741 reuses one durable baseline after the context producer changes; line 775 includes the effective default-agent system before durable context; line 941 admits removed context as a chronological System message; line 1039 rebuilds the baseline after completed compaction; line 1575 restores durable reasoning provider metadata on a second turn; line 1632 replays durable provider-executed tool results inline on a second turn; and line 1687 starts recorded local tools eagerly and awaits settlement./home/byk/Code/opencode/packages/core/test/session-runner.test.ts cover: line 1875 steering an active provider turn with newly recorded prompts; line 1918 promoting queued input after continuation ends; line 1965 preserving durable queued input for a later wake after interruption; line 2008 preserving durable steering input for a later resume after interruption; line 2051 promoting queued inputs one at a time in FIFO order; line 2094 promoting queued input after steering continuation; and line 2128 prioritizing steers before the next queued input./home/byk/Code/opencode/packages/core/test/session-runner.test.ts cover durably failing pending tool input from a prior process before continuing (line 2382), promoting the first queued input when woken while idle (line 2421), recovering promoted input after a defect using prompt text "Recover promoted input" (lines 2446-2463), and not stranding a committed promotion when a post-commit SessionEvent.Prompted listener defects, using prompt text "Run committed promotion" (lines 2467-2485)./home/byk/Code/opencode/packages/core/test/session-runner.test.ts also tests resetting the configured step allowance when steering input promotes (line 3103) and refusing context-overflow recovery after durable assistant output (line 3196)./home/byk/Code/opencode/packages/core/test/session-projector.test.ts tests ordering projected messages and context by durable aggregate sequence (line 133), marking an inbox row promoted with the Prompted event sequence (line 202), and projecting durable context messages supported by the updater (line 246). The promotion test uses SessionMessage.ID.make("msg_admitted"), prompt text "promote me", and expects promoted_seq to equal event.durable?.seq./home/byk/Code/opencode/packages/core/test/database-migration.test.ts verifies indexes including event_aggregate_seq_idx, event_aggregate_type_seq_idx, session_input_session_pending_seq_idx, session_input_session_pending_delivery_seq_idx, session_input_session_admitted_seq_idx, session_input_session_promoted_seq_idx, session_message_session_idx, session_message_session_type_idx, session_message_session_seq_idx, session_message_session_type_seq_idx, and session_message_session_time_created_id_idx.session_input table has columns seq, id, session_id, prompt, delivery, promoted_seq, and time_created; the rebuilt expected columns are id, session_id, prompt, delivery, admitted_seq, promoted_seq, and time_created, with unique session_input_session_admitted_seq_idx and session_input_session_promoted_seq_idx.session_input row with id='input', session_id='session', delivery='steer', admitted_seq=9, and time_created=1, plus a projected session_message row whose expected result is { id: "fresh_projection", seq: 7 }.keeps branch checkouts isolated from branchless refreshes), native handling of a small PNG instead of durable base64 text in /home/byk/Code/opencode/packages/core/test/tool-read.test.ts, and refusing to invent tool-ownership metadata without a durable registry source in /home/byk/Code/opencode/packages/core/test/tool-question.test.ts.