refactor(core): move v1 schemas into core (#30473)

This commit is contained in:
Dax 2026-06-02 22:42:13 -04:00 committed by GitHub
commit 83452558f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
129 changed files with 1578 additions and 1227 deletions

View file

@ -3,16 +3,18 @@
import * as NodeRuntime from "@effect/platform-node/NodeRuntime"
import * as NodeServices from "@effect/platform-node/NodeServices"
import * as Effect from "effect/Effect"
import * as Layer from "effect/Layer"
import * as Command from "effect/unstable/cli/Command"
import { DebugCommand } from "./debug"
import { LocationServiceMap } from "@opencode-ai/core/location-layer"
import { Api } from "./api"
import { CliBuilder } from "./cli-builder"
const cli = Command.make("opencode", {}, () => Effect.void).pipe(
Command.withDescription("OpenCode command line interface"),
Command.withSubcommands([DebugCommand]),
const Handlers = CliBuilder.handlers(Api, {
debug: {
agents: () => import("./handlers/debug/agents"),
},
migrate: () => import("./handlers/migrate"),
})
CliBuilder.run(Api, Handlers, { version: "local" }).pipe(
Effect.provide(NodeServices.layer),
Effect.scoped,
NodeRuntime.runMain,
)
const layer = Layer.mergeAll(LocationServiceMap.layer, NodeServices.layer)
Command.run(cli, { version: "local" }).pipe(Effect.provide(layer), Effect.scoped, NodeRuntime.runMain)