fix(instance): restore InstanceBootstrap init parameter for non-Effec… (#25449)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
HyeokjaeLee
2026-05-03 04:26:30 +09:00
committed by GitHub
parent 05b82a6a30
commit 430bde9e9b
6 changed files with 26 additions and 6 deletions
@@ -1,6 +1,6 @@
import type { MiddlewareHandler } from "hono"
import { Instance } from "@/project/instance"
import { AppRuntime } from "@/effect/app-runtime"
import { getBootstrapRunEffect } from "@/effect/app-runtime"
import { AppFileSystem } from "@opencode-ai/core/filesystem"
import { WorkspaceContext } from "@/control-plane/workspace-context"
import { WorkspaceID } from "@/control-plane/schema"
@@ -23,6 +23,7 @@ export function InstanceMiddleware(workspaceID?: WorkspaceID): MiddlewareHandler
async fn() {
return Instance.provide({
directory,
init: await getBootstrapRunEffect(),
async fn() {
return next()
},
@@ -8,7 +8,7 @@ import z from "zod"
import { ProjectID } from "@/project/schema"
import { errors } from "../../error"
import { lazy } from "@/util/lazy"
import { AppRuntime } from "@/effect/app-runtime"
import { getBootstrapRunEffect } from "@/effect/app-runtime"
import { jsonRequest, runRequest } from "./trace"
export const ProjectRoutes = lazy(() =>
@@ -82,7 +82,7 @@ export const ProjectRoutes = lazy(() =>
Project.Service.use((svc) => svc.initGit({ directory: dir, project: prev })),
)
if (next.id === prev.id && next.vcs === prev.vcs && next.worktree === prev.worktree) return c.json(next)
await InstanceStore.reloadInstance({ directory: dir, worktree: dir, project: next })
await InstanceStore.reloadInstance({ directory: dir, worktree: dir, project: next, init: await getBootstrapRunEffect() })
return c.json(next)
},
)