Dashboard › opencode › Distillation
3aea470a-dfd3-4f26-80fd-56bd4d2a4378["lore_tm_v1_Tlherg9VUtdTZAwHs3YsCKI4gAbYqKGFxDJtrm8XAiY","lore_tm_v1_rilt7c1pl1KewjCiJqAV1HW7Kfy0PM-8nt_Mh7EJAJI","lore_tm_v1_Md9MbTZqvtWdBqYjwD_RwyNjCzhae-1jVkAWNwabB3M","lore_tm_v1__ROiM3iuLKAyOmawCSx0CBtrFTVPkfCl9HAU7t8dQNI","lore_tm_v1_PLkUCfXpVsVI5R5CZFBoxilEx9zVLXpuhXBCx91hHf0"]
Date: Sep 14, 2026
/home/byk/Code/opencode/packages/schema/src/session-status-event.ts defines SessionStatusEvent.Info as a Schema.Union of 3 statuses: { type: "idle" }, { type: "retry", attempt: NonNegativeInt, message: string, action?: { reason, provider, title, message, label, link? }, next: NonNegativeInt }, and { type: "busy" }; the union is annotated with identifier "SessionStatus"./home/byk/Code/opencode/packages/schema/src/session-status-event.ts defines Status via Event.define with event type "session.status" and schema fields sessionID: SessionID and status: Info./home/byk/Code/opencode/packages/schema/src/session-status-event.ts retains deprecated Idle, an event with type "session.idle" and schema field sessionID: SessionID; Definitions = Event.inventory(Status, Idle).SessionEvent.Step.Started/Ended/Failed references were found in 5 files across 12 matches: /home/byk/Code/opencode/packages/core/test/session-runner.test.ts lines 2270, 2334, and 2394 publish Step.Started; /home/byk/Code/opencode/packages/core/test/session-projector.test.ts lines 398 and 469 publish Step.Started and Step.Ended; /home/byk/Code/opencode/packages/core/test/session-tool-progress.test.ts line 51 publishes Step.Started; /home/byk/Code/opencode/packages/core/src/session/projector.ts lines 379–381 project Step.Started, Step.Ended, and Step.Failed; /home/byk/Code/opencode/packages/core/src/session/runner/llm.ts line 333 publishes Step.Ended; /home/byk/Code/opencode/packages/core/src/session/runner/publish-llm-event.ts lines 78 and 205 publish Step.Started and Step.Failed./home/byk/Code/opencode/packages/core/src/database/database.ts creates SQLite through EffectDrizzleSqlite.makeWithDefaults() and initializes it with PRAGMA journal_mode = WAL, PRAGMA synchronous = NORMAL, PRAGMA busy_timeout = 5000, PRAGMA cache_size = -64000, PRAGMA foreign_keys = ON, and PRAGMA wal_checkpoint(PASSIVE) before calling DatabaseMigration.apply(db)./home/byk/Code/opencode/packages/core/src/database/database.ts defines Database.Service with context tag "@opencode/v2/storage/Database" and interface field db: DatabaseShape; layerFromPath(filename) provides sqliteLayer({ filename }).Database.path() in /home/byk/Code/opencode/packages/core/src/database/database.ts resolves Flag.OPENCODE_DB directly when it is ":memory:" or absolute, otherwise relative to Global.Path.data. Without that flag, installation channels latest, beta, and prod, or OPENCODE_DISABLE_CHANNEL_DB equal to "1" or "true", use Global.Path.data/opencode.db; other channels use opencode-${InstallationChannel.replace(/[^a-zA-Z0-9._-]/g, "-")}.db./home/byk/Code/opencode/packages/core/src/database/database.ts exports global app node node = makeGlobalNode({ service: Service, layer: layerFromPath(path()), deps: [] })./home/byk/Code/opencode/packages/core/src/session/info.ts defines fromRow(row: typeof SessionTable.$inferSelect): SessionSchema.Info, converting database identifiers into branded SessionSchema.ID, ProjectV2.ID, optional AgentV2.ID, ModelV2.ID, ProviderV2.ID, and ModelV2.VariantID; a missing stored model variant defaults to "default".fromRow() maps session accounting fields exactly: cost; tokens input, output, and reasoning; and cache tokens read and write, sourced from row.tokens_input, row.tokens_output, row.tokens_reasoning, row.tokens_cache_read, and row.tokens_cache_write.fromRow() maps session location to Location.Ref with directory: AbsolutePath.make(row.directory) and optional workspaceID: WorkspaceV2.ID.make(row.workspace_id); it maps optional row.path to RelativePath, optional row.revert.messageID to SessionMessage.ID, and time_created, time_updated, and optional time_archived through DateTime.makeUnsafe.