Dashboard › opencode › Distillation
7a5b2eb9-9182-4076-8362-269aee367367["lore_tm_v1_zJXf9iTahQhYC7V7WzA2qe4YEvYh1zbCR0iPi-wEQ6o","lore_tm_v1_xxJHueAkfTzvdaxKRC_bd4WEf-lUBLFnqI4nPpSWjKw","lore_tm_v1_XgJDfWnr7MzexYY7qUVGWFC6CCWPRHTwlGJqffvCxSA","lore_tm_v1_FLH8XtqafELyjs8_QUKr83pUi_FAaO64R7yX0lwsFGI","lore_tm_v1_JJXm1YWF9avJrTNaxb1MdeUAcSPRCaGDHRBGGChKryI","lore_tm_v1_zmGZ41puIUucFbj4sIBj9LGO3knd-uDnKT4WlaK1wdg"]
Date: Sep 16, 2026
Uint8Array rather than re-stringifying the specification.packages/opencode/src/server/routes/instance/httpapi/server.ts createRoutes(corsOptions?) merges rootApiRoutes, eventApiRoutes, ptyConnectApiRoutes, instanceRoutes, serverRoutes, docRoute, and uiRoute; it provides errorLayer, compressionLayer, corsVaryFix, fenceLayer, cors(corsOptions), AppNodeBuilderV1.build(MoveSession.node, [[LocationServiceMap.node, locationServiceMapV2]]), and HttpServer.layerServices.packages/opencode/src/server/routes/instance/httpapi/server.ts, createRoutes(corsOptions?) builds SessionV2.node and SessionRecovery.node with LocationServiceMap.node → locationServiceMapV2 and SessionExecution.node → SessionExecutionLocal.node, then provides locationServiceMapV2 and AppNodeBuilderV1.build(app).packages/opencode/src/server/routes/instance/httpapi/server.ts requires Layer.provideMerge(Observability.layer) to remain last: later-provided layers build beneath earlier ones, and otherwise eagerly forked fibers such as the ModelsDev background refresh capture Effect’s default stdout logger and corrupt the TUI (#34730).packages/opencode/src/server/routes/instance/httpapi/server.ts exports routes = createRoutes() and a lazy webHandler using HttpRouter.toWebHandler(routes, { disableLogger: true, memoMap, middleware: disposeMiddleware }).packages/schema/test/event-manifest.test.ts verifies the public event surface has EventManifest.ServerDefinitions.length === 61, EventManifest.Definitions.length === 91, EventManifest.Latest.size === 91, and EventManifest.Durable.size === 38.packages/schema/test/event-manifest.test.ts verifies canonical current-event definitions: Session.Event === SessionEvent, Workspace.Event === WorkspaceEvent, "session.next.step.ended" maps to SessionEvent.Step.Ended, "todo.updated" maps to SessionTodo.Event.Updated, "project.updated" maps to Project.Event.Updated, and "ide.installed" is absent from EventManifest.Latest while IdeEvent.Definitions remains [IdeEvent.Installed].packages/schema/test/event-manifest.test.ts verifies EventManifest.Definitions.slice(46, 49) is ordered as SessionV1.Event.PartDelta, SessionV1.Event.Diff, and SessionV1.Event.Error; durable lookup excludes "session.next.step.ended.1", maps "session.next.step.ended.2" to SessionEvent.Step.Ended, and maps "session.next.prompt.execution_requested.1" to SessionEvent.PromptExecutionRequested.packages/schema/src/durable-event-manifest.ts defines SessionDurable with definitions: Event.durable(SessionEvent.DurableDefinitions) and schema: SessionEvent.Durable; aggregate Durable combines durable members of SessionV1.Event.Definitions with SessionEvent.DurableDefinitions./tmp/opencode/session-recovery-final-v8.patch updates generated packages/sdk/js/src/v2/gen/types.gen.ts unions to include EventSessionNextPromptExecutionRequested, EventSessionNextStepInterrupted, and EventSessionNextStepRecovered, plus their SyncEvent..., SessionDurableEvent, and V2Event counterparts."session.next.prompt.execution_requested" has timestamp, sessionID, and messageID; prompt-admitted event properties gain optional requestExecution?: boolean."session.next.step.interrupted" has timestamp, sessionID, assistantMessageID, and error: SessionErrorUnknown; "session.next.step.recovered" has timestamp, sessionID, executionID, optional assistantMessageID, and phase: "ready" | "unknown" | "continue".