refactor(client): split package into promise and effect entrypoints

This commit is contained in:
Dax Raad 2026-07-03 01:42:50 -04:00
commit af5eabcb26
46 changed files with 5211 additions and 2332 deletions

View file

@ -0,0 +1,6 @@
[
"client-error.ts",
"client.ts",
"index.ts",
"types.ts"
]

View file

@ -0,0 +1,11 @@
export type ClientErrorReason = "Transport" | "UnexpectedStatus" | "UnsupportedContentType" | "MalformedResponse"
export class ClientError extends Error {
override readonly name = "ClientError"
constructor(
readonly reason: ClientErrorReason,
options?: ErrorOptions,
) {
super(reason, options)
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
export { ClientError, type ClientErrorReason } from "./client-error"
export * as OpenCode from "./client"
export * from "./types"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
export * from "./generated/index"
export type { Transport } from "../effect/service.js"
export type { EventSubscribeOutput as OpenCodeEvent } from "./generated/types"
export type OpenCodeClient = ReturnType<typeof import("./generated/client").make>