Dashboard › opencode › Distillation
8001667b-cbf6-444f-893e-34718625e1e0["lore_tm_v1_kjXC2yRqHs2Bh1pllKSI6aBVAjwRLASLv3tjI5gOmJo","lore_tm_v1_On_yjask0cKDjEW2U77CLTlSTObpoR_H-T-ExKYEhvg","lore_tm_v1_tmHbzvA9WnvgZOXCZmVwnsfsZYH6nhiivK0mUmB6guA","lore_tm_v1_zyLQ_R4pVjU_dEut_rCxijtjwng2geg7GutaXf7QSGw","lore_tm_v1_VVjmgGw-YWMYjq-xPTIkMyupbMmZomJn1ZKVzp2WNz8","lore_tm_v1_Vi5UeynTaUtmTG_30C6C3kkyBPioaEzaBYRfstzlX54","lore_tm_v1_YHgwnKAd8Pzqz8TBcmcwg5yj_YJ7X8upOmwno4BY2mY","lore_tm_v1_ubjgrZjm6pbMXK6ET8UodpFmhKIO3KTyuwYyr57K50Q"]
Date: Sep 14, 2026
/home/byk/Code/opencode/packages/core/src/session/event.ts re-exports all symbols from @opencode-ai/schema/session-event and exposes the namespace as SessionEvent./home/byk/Code/opencode/packages/core/src/session/prompt.ts exports AgentAttachment, FileAttachment, Prompt, and Source from @opencode-ai/schema/prompt./home/byk/Code/opencode/packages/core/src/session/input.ts implements durable prompt-input lifecycle operations: find, admit, projectAdmitted, projectPrompted, hasPending, equivalent, promoteSteers, and promoteNextQueued.SessionInput.admit is idempotent by SessionMessage.ID: it first calls find, publishes SessionEvent.PromptAdmitted only when absent, requires event.durable.seq as admittedSeq, and on a publication defect re-reads storage before rethrowing the defect.SessionInput.projectAdmitted rejects lifecycle collisions with SessionInput.LifecycleConflict: it dies if the same ID already exists in SessionMessageTable, inserts into SessionInputTable with .onConflictDoNothing(), and dies if no row was inserted.SessionInput.projectPrompted atomically sets promoted_seq only where the matching input has promoted_seq IS NULL; it validates sessionID, encoded prompt, delivery, and timeCreated via matchesProjection. If the admitted row is missing, it inserts one with both admitted_seq and promoted_seq equal to the supplied promotedSeq./home/byk/Code/opencode/packages/core/src/session/input.ts is delivery-specific: promoteSteers publishes every unpromoted "steer" with admitted_seq <= cutoff in ascending admitted_seq order, while promoteNextQueued publishes only the earliest unpromoted "queue" and returns false if none exists.SessionInput.publish emits SessionEvent.Prompted for each selected row and returns rows.length; a LifecycleConflict is tolerated only when a re-read shows that the input already has a promotedSeq./home/byk/Code/opencode/packages/core/src/session/runner/index.ts defines SessionRunner.Interface.run({ sessionID, force }), returning Effect.Effect<void, RunError>; RunError includes LLMError, SessionRunnerModel.Error, MessageDecodeError, ContextSnapshotDecodeError, SystemContext.InitializationBlocked, and ToolOutputStore.Error.SessionRunner.Interface.run is documented as draining eligible durable work; an explicit run performs one provider attempt even when no work is eligible. /home/byk/Code/opencode/packages/core/src/session/execution/local.ts invokes it as runner.run({ sessionID, force })./home/byk/Code/opencode/packages/core/src/session/runner/llm.ts marks streaming exactly one llm.stream(request) provider turn as complete and retains TODOs to: bound provider retries and repeated identical tool calls; add scoped runtime context, progress updates, and attachment normalization; and update title, summaries, compaction state, and cleanup through bounded background work.