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
parent 0543fd29c8
commit 83452558f7
129 changed files with 1578 additions and 1227 deletions

View File

@@ -1,5 +1,6 @@
import { afterEach, describe, expect } from "bun:test"
import { SessionLegacy } from "@opencode-ai/core/session/legacy"
import { ConfigV1 } from "@opencode-ai/core/v1/config/config"
import { SessionV1 } from "@opencode-ai/core/v1/session"
import { Deferred, Effect, Layer } from "effect"
import type * as Scope from "effect/Scope"
import { HttpServer } from "effect/unstable/http"
@@ -190,7 +191,7 @@ function httpapiInstance<A, E>(
options: {
serverPath: ServerPath
git?: boolean
config?: Partial<Config.Info>
config?: Partial<ConfigV1.Info>
setup?: (dir: string) => Effect.Effect<void, E, TestServices>
},
run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>,
@@ -214,7 +215,7 @@ function withProject<A, E, E2 = never>(
serverPath: ServerPath,
options: {
git?: boolean
config?: Partial<Config.Info>
config?: Partial<ConfigV1.Info>
setup?: (dir: string) => Effect.Effect<void, E2, TestServices>
},
run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>,
@@ -300,7 +301,7 @@ function seedMessage(directory: string, sessionID: string) {
agent: "test",
model: { providerID: ProviderV2.ID.make("test"), modelID: ProviderV2.ModelID.make("test") },
tools: {},
} satisfies SessionLegacy.User)
} satisfies SessionV1.User)
const part = yield* svc.updatePart({
id: PartID.ascending(),
sessionID: id,