refactor(skill): remove async facade exports (#22308)

This commit is contained in:
Kit Langton
2026-04-13 11:18:10 -04:00
committed by GitHub
parent 9ae8dc2d01
commit 7239b38b7f
4 changed files with 281 additions and 286 deletions

View File

@@ -24,6 +24,7 @@ import { ProviderRoutes } from "./provider"
import { EventRoutes } from "./event"
import { WorkspaceRouterMiddleware } from "./middleware"
import { AppRuntime } from "@/effect/app-runtime"
import { Effect } from "effect"
export const InstanceRoutes = (upgrade: UpgradeWebSocket): Hono =>
new Hono()
@@ -215,7 +216,12 @@ export const InstanceRoutes = (upgrade: UpgradeWebSocket): Hono =>
},
}),
async (c) => {
const skills = await Skill.all()
const skills = await AppRuntime.runPromise(
Effect.gen(function* () {
const skill = yield* Skill.Service
return yield* skill.all()
}),
)
return c.json(skills)
},
)