chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-09 13:11:45 +00:00
parent 28b03595bf
commit d01cb7f013
7 changed files with 8 additions and 20 deletions

View File

@@ -14,8 +14,9 @@ export const WorkspaceInfo = Schema.Struct({
}).annotate({ identifier: "Workspace" }) }).annotate({ identifier: "Workspace" })
export type WorkspaceInfo = DeepMutable<Schema.Schema.Type<typeof WorkspaceInfo>> export type WorkspaceInfo = DeepMutable<Schema.Schema.Type<typeof WorkspaceInfo>>
export const WorkspaceListedInfo = Schema.Struct(Struct.omit(WorkspaceInfo.fields, ["id"])) export const WorkspaceListedInfo = Schema.Struct(Struct.omit(WorkspaceInfo.fields, ["id"])).annotate({
.annotate({ identifier: "WorkspaceListedInfo" }) identifier: "WorkspaceListedInfo",
})
export type WorkspaceListedInfo = DeepMutable<Schema.Schema.Type<typeof WorkspaceListedInfo>> export type WorkspaceListedInfo = DeepMutable<Schema.Schema.Type<typeof WorkspaceListedInfo>>
export const WorkspaceAdapterEntry = Schema.Struct({ export const WorkspaceAdapterEntry = Schema.Struct({

View File

@@ -8,7 +8,6 @@ import { waitGlobalBusEventPromise } from "./global-bus"
void Log.init({ print: false }) void Log.init({ print: false })
function app() { function app() {
return Server.Default().app return Server.Default().app
} }

View File

@@ -41,8 +41,7 @@ export function coverageResult(scenario: Scenario): Result {
export function parseOptions(args: string[]): Options { export function parseOptions(args: string[]): Options {
const mode = option(args, "--mode") ?? "effect" const mode = option(args, "--mode") ?? "effect"
if (mode !== "effect" && mode !== "coverage" && mode !== "auth") if (mode !== "effect" && mode !== "coverage" && mode !== "auth") throw new Error(`invalid --mode ${mode}`)
throw new Error(`invalid --mode ${mode}`)
return { return {
mode, mode,
include: option(args, "--include"), include: option(args, "--include"),

View File

@@ -8,15 +8,7 @@ import { MessageID, PartID } from "../../../src/session/schema"
import { call, callAuthProbe } from "./backend" import { call, callAuthProbe } from "./backend"
import { original } from "./environment" import { original } from "./environment"
import { runtime } from "./runtime" import { runtime } from "./runtime"
import type { import type { ActiveScenario, Options, ProjectOptions, Result, Scenario, ScenarioContext, SeededContext } from "./types"
ActiveScenario,
Options,
ProjectOptions,
Result,
Scenario,
ScenarioContext,
SeededContext,
} from "./types"
export function runScenario(options: Options) { export function runScenario(options: Options) {
return (scenario: Scenario) => { return (scenario: Scenario) => {

View File

@@ -12,7 +12,6 @@ import * as Log from "@opencode-ai/core/util/log"
void Log.init({ print: false }) void Log.init({ print: false })
function app(input: { password?: string; username?: string }) { function app(input: { password?: string; username?: string }) {
const handler = HttpRouter.toWebHandler( const handler = HttpRouter.toWebHandler(
ExperimentalHttpApiServer.routes.pipe( ExperimentalHttpApiServer.routes.pipe(

View File

@@ -421,9 +421,9 @@ describe("session HttpApi", () => {
directory: currentDir, directory: currentDir,
}) })
const headers = { "x-opencode-directory": tmp.path } const headers = { "x-opencode-directory": tmp.path }
const sessions = (yield* json<Session.Info[]>(yield* request(`${SessionPaths.list}?${query}`, { headers }))).map( const sessions = (yield* json<Session.Info[]>(
(item) => item.id, yield* request(`${SessionPaths.list}?${query}`, { headers }),
) )).map((item) => item.id)
expect(sessions).toContain(pathSession.id) expect(sessions).toContain(pathSession.id)
expect(sessions).not.toContain(pathlessSession.id) expect(sessions).not.toContain(pathlessSession.id)

View File

@@ -287,7 +287,6 @@ describe("HttpApi UI fallback", () => {
}) })
test("keeps matched API routes ahead of the UI fallback", async () => { test("keeps matched API routes ahead of the UI fallback", async () => {
const response = await Server.Default().app.request("/session/nope") const response = await Server.Default().app.request("/session/nope")
expect(response.status).toBe(404) expect(response.status).toBe(404)
@@ -344,7 +343,6 @@ describe("HttpApi UI fallback", () => {
}) })
test("allows web UI preflight without auth", async () => { test("allows web UI preflight without auth", async () => {
const response = await app({ password: "secret", username: "opencode" }).request("/", { const response = await app({ password: "secret", username: "opencode" }).request("/", {
method: "OPTIONS", method: "OPTIONS",
headers: { headers: {