Dashboard › opencode › Distillation
b07515b5-ca49-4e92-bd49-ae25a4ed9c49["lore_tm_v1_LUdlPr00rz3zyC0PNyn6x3mz_JBrtjv_v3-YsZvdNw8","lore_tm_v1_WHU5GcjNC_Owc6fFTZ1Tbwhkn0vYEPk79SmampEMSgE","lore_tm_v1_4mNppQdOMjFeCKU1yFjt7VrfvP40FvIoZAkYDYnswEU","lore_tm_v1_Yt_Au3L3RjCWW898tz3jGFNqzeHyDltxo-iSB30oFv4","lore_tm_v1_oMEZxLtsLbnpC_6ZW4lQiA6JW15anPcJDAlU57eUCr4","lore_tm_v1_sQsyhz8Uy5F6NwAyHwe-vroOVHtQ7O7wWY1ABVF94h8","lore_tm_v1_gULm_HaV4ABhEMLgPsEC7ZPxXQewi9r9OUqHjUhcv5o","lore_tm_v1__beBOaLKIfsxEvs7Tx-j0mZPg6FREVCZL9HyiGlbBec"]
Date: Sep 17, 2026
/doc response should remain lazily constructed so processes that never serve it—specifically CLI and scripts—do not pay its cost at module load.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.packages/server/src/routes.ts wires SessionExecution.node to SessionExecutionLocal.node via AppNodeBuilder.build(applicationServices, [[SessionExecution.node, SessionExecutionLocal.node]]).packages/server/src/routes.ts: createRoutes(password?) uses username "opencode" and either Option.some(password) or ServerAuth.Config.layer; createEmbeddedRoutes() uses username "opencode" with Option.none(); makeRoutes() exposes OpenAPI at /openapi.json and provides handlers, sessionLocationLayer, locationLayer, authorizationLayer, schemaErrorLayer, authentication, and the service layer.packages/server/src/routes.ts exports routes = createRoutes() and webHandler(), which calls HttpRouter.toWebHandler(routes.pipe(Layer.provide(HttpServer.layerServices)), { disableLogger: true }).GET /doc route through docResponse() and documents separate route groups including ptyConnectApiRoutes, a typed WebSocket upgrade route with ticket-aware authorization.packages/core/src/database/migration.gen.ts registers 39 dynamically imported migrations through Promise.all(...).map((module) => module.default) satisfies DatabaseMigration.Migration[]; the newest registered migration is ./migration/20260914170650_session-recovery.20260914170650_session-recovery creates session-recovery persistence, including a session_recovery table linked to session.id with ON DELETE CASCADE; the broader generated migration also includes session_execution, session_input, and session_context_epoch tables and their indexes.packages/client/src/generated/types.ts contains generated recovery protocol types in two sections: requestExecution?: boolean at lines 778 and 1272; "session.next.prompt.execution_requested" at lines 784 and 1278; "session.next.step.interrupted" at lines 895 and 1389; and "session.next.step.recovered" at lines 908 and 1402.packages/client/src/generated-effect/client-error.ts, packages/client/src/generated-effect/index.ts, and packages/client/src/generated-effect/client.ts; a separate file search returned no matching files.