Dashboard › opencode › Distillation
d4f6df2a-3eb9-486e-b0d8-31ed1cddfef4["lore_tm_v1_p_F8iuiWAShkDU2eJHYrFjB0oEjARgaU3jchFGljiz0","lore_tm_v1_64xy8x2SaXevmMMUpnKKiTrfWraxux3efjTqtCL593k","lore_tm_v1_Mnr5t6EGmKr0Nb9XbP9LojfCGp65EOI1-boFATAAWlc","lore_tm_v1_XOAy0nOT9_H-xPuNx1vtKuOLG19k7BgHX4Dqr6kv1YU","lore_tm_v1_VVaIMVpWNfi4SYDs6VBG06yFd1PUaYhJ-lb39dQWtZA","lore_tm_v1_L995o9NlVTXyw6YHP_1devv-rb3Y9nvr-bD5zfkEQdM"]
Date: Sep 16, 2026
/tmp/opencode/session-recovery-v10-review/packages/server/src/routes.ts defines applicationServices with Database.node, EventV2.node, httpClient, ToolOutputStore.cleanupNode, SessionV2.node, SessionRecovery.node, PermissionSaved.node, PtyTicket.node, Credential.node, PtyEnvironment.node, and LocationServiceMap.node./tmp/opencode/session-recovery-v10-review/packages/server/src/routes.ts: createRoutes(password?) configures username "opencode" and optional password auth; createEmbeddedRoutes() configures "opencode" with Option.none(); makeRoutes() builds services through AppNodeBuilder.build(applicationServices, [[SessionExecution.node, SessionExecutionLocal.node]])./tmp/opencode/session-recovery-v10-review/packages/server/src/routes.ts exposes OpenAPI at /openapi.json and layers handlers, sessionLocationLayer, locationLayer, authorizationLayer, schemaErrorLayer, auth, and serviceLayer; routes = createRoutes(), while webHandler uses HttpRouter.toWebHandler(..., { disableLogger: true })./tmp/opencode/session-recovery-v10-review/packages/core/src/database/migration.gen.ts registers migrations in this exact order: 1. 20260127222353_familiar_lady_ursula, 2. 20260211171708_add_project_commands, 3. 20260213144116_wakeful_the_professor, 4. 20260225215848_workspace, 5. 20260227213759_add_session_workspace_id, 6. 20260228203230_blue_harpoon, 7. 20260303231226_add_workspace_fields, 8. 20260309230000_move_org_to_state, 9. 20260312043431_session_message_cursor, 10. 20260323234822_events, 11. 20260410174513_workspace-name, 12. 20260413175956_chief_energizer, 13. 20260423070820_add_icon_url_override, 14. 20260427172553_slow_nightmare, 15. 20260428004200_add_session_path, 16. 20260501142318_next_venus, 17. 20260504145000_add_sync_owner, 18. 20260507164347_add_workspace_time, 19. 20260510033149_session_usage, 20. 20260511000411_data_migration_state, 21. 20260511173437_session-metadata, 22. 20260601010001_normalize_storage_paths, 23. 20260601202201_amazing_prowler, 24. 20260602002951_lowly_union_jack, 25. 20260602182828_add_project_directories, 26. 20260603001617_session_message_projection_indexes, 27. 20260603040000_session_message_projection_order, 28. 20260603141458_session_input_inbox, 29. 20260603160727_jittery_ezekiel_stane, 30. 20260604172448_event_sourced_session_input, 31. 20260605003541_add_session_context_snapshot, 32. 20260605042240_add_context_epoch_agent, 33. 20260611035744_credential, 34. 20260611192811_lush_chimera, 35. 20260612174303_project_dir_strategy, 36. 20260622142730_simplify_session_context_epoch, 37. 20260622170816_reset_v2_session_state, 38. 20260622202450_simplify_session_input, 39. 20260914170650_session-recovery.packages/core/src/database/schema.gen.ts defines session_execution with primary key session_execution_pk, a cascading foreign key from session_id to session.id, and session_execution_phase_check limiting phase to 'ready', 'safe', 'unknown', 'continue', or 'cancelling'; it also creates unique index session_execution_session_idx on session_id and index session_execution_owner_idx on owner_id.packages/core/src/database/schema.gen.ts defines session_recovery keyed by execution_id, with wake_pending integer DEFAULT true NOT NULL, wake_attempts integer DEFAULT 0 NOT NULL, cascading foreign keys from session_id to session.id, assistant_message_id to session_message.id, and continuation_message_id to session_input.id; session_recovery_wake_attempts_check enforces wake_attempts >= 0 AND wake_attempts <= 9007199254740991.packages/core/src/database/schema.gen.ts: unique session_recovery_continuation_message_idx on continuation_message_id, plus session_recovery_wake_pending_error_attempts_created_execution_idx on (wake_pending, recovery_error, wake_attempts, time_created, execution_id).packages/core/src/database/schema.gen.ts also creates session_input_wake_pending_promoted_session_idx on (wake_pending, promoted_seq, session_id) and applies session_wake_attempts_check with the exact range wake_attempts >= 0 AND wake_attempts <= 9007199254740991.