chore: generate

This commit is contained in:
opencode-agent[bot]
2026-08-17 21:55:57 +00:00
Unverified
parent d9b81d2233
commit aca42423d3
12 changed files with 3311 additions and 31029 deletions
+4 -3
View File
@@ -92,9 +92,10 @@ describe("AI.Usage", () => {
test("sseFraming maps decoder failures to AI errors", async () => {
const error = await Effect.runPromise(
ProviderShared.sseFraming(
Stream.make(new TextEncoder().encode(`data: ${"x".repeat(10 * 1024 * 1024)}`)),
).pipe(Stream.runCollect, Effect.flip),
ProviderShared.sseFraming(Stream.make(new TextEncoder().encode(`data: ${"x".repeat(10 * 1024 * 1024)}`))).pipe(
Stream.runCollect,
Effect.flip,
),
)
expect(error).toBeInstanceOf(AIError)
+3 -4
View File
@@ -25,10 +25,9 @@ export class InvalidModeError extends Schema.TaggedError<InvalidModeError>()("AC
export class AuthRequiredError extends Schema.TaggedError<AuthRequiredError>()("ACPAuthRequiredError", {}) {}
export class UnknownAuthMethodError extends Schema.TaggedError<UnknownAuthMethodError>()(
"ACPUnknownAuthMethodError",
{ methodId: Schema.String },
) {}
export class UnknownAuthMethodError extends Schema.TaggedError<UnknownAuthMethodError>()("ACPUnknownAuthMethodError", {
methodId: Schema.String,
}) {}
export class ServiceFailureError extends Schema.TaggedError<ServiceFailureError>()("ACPServiceFailureError", {
safeMessage: Schema.String,
+3 -4
View File
@@ -12,10 +12,9 @@ export interface TextInput {
readonly model?: Model.Ref
}
export class ModelSelectionError extends Schema.TaggedError<ModelSelectionError>()(
"Generate.ModelSelectionError",
{ message: Schema.String },
) {}
export class ModelSelectionError extends Schema.TaggedError<ModelSelectionError>()("Generate.ModelSelectionError", {
message: Schema.String,
}) {}
export class UnavailableError extends Schema.TaggedError<UnavailableError>()("Generate.UnavailableError", {
message: Schema.String,
+9 -15
View File
@@ -31,13 +31,10 @@ export type EnsureInput = {
readonly branch?: string
}
export class InvalidBranchError extends Schema.TaggedError<InvalidBranchError>()(
"RepositoryCacheInvalidBranchError",
{
branch: Schema.String,
message: Schema.String,
},
) {}
export class InvalidBranchError extends Schema.TaggedError<InvalidBranchError>()("RepositoryCacheInvalidBranchError", {
branch: Schema.String,
message: Schema.String,
}) {}
export class CloneFailedError extends Schema.TaggedError<CloneFailedError>()("RepositoryCacheCloneFailedError", {
repository: Schema.String,
@@ -68,14 +65,11 @@ export class LockFailedError extends Schema.TaggedError<LockFailedError>()("Repo
message: Schema.String,
}) {}
export class CacheOperationError extends Schema.TaggedError<CacheOperationError>()(
"RepositoryCacheOperationError",
{
operation: Schema.String,
path: Schema.String,
message: Schema.String,
},
) {}
export class CacheOperationError extends Schema.TaggedError<CacheOperationError>()("RepositoryCacheOperationError", {
operation: Schema.String,
path: Schema.String,
message: Schema.String,
}) {}
export type Error =
| InvalidBranchError
+4 -7
View File
@@ -11,13 +11,10 @@ import { SessionMessage } from "./message.js"
import { SessionSchema } from "./schema.js"
import { SessionMessageTable } from "./sql.js"
export class MessageNotFoundError extends Schema.TaggedError<MessageNotFoundError>()(
"Session.MessageNotFoundError",
{
sessionID: SessionSchema.ID,
messageID: SessionMessage.ID,
},
) {}
export class MessageNotFoundError extends Schema.TaggedError<MessageNotFoundError>()("Session.MessageNotFoundError", {
sessionID: SessionSchema.ID,
messageID: SessionMessage.ID,
}) {}
interface BoundaryInput {
readonly sessionID: SessionSchema.ID
+3 -6
View File
@@ -33,12 +33,9 @@ export class ProviderRequiredError extends Schema.TaggedError<ProviderRequiredEr
{},
) {}
export class ProviderNotFoundError extends Schema.TaggedError<ProviderNotFoundError>()(
"WebSearch.ProviderNotFound",
{
providerID: ID,
},
) {}
export class ProviderNotFoundError extends Schema.TaggedError<ProviderNotFoundError>()("WebSearch.ProviderNotFound", {
providerID: ID,
}) {}
export class DisabledError extends Schema.TaggedError<DisabledError>()("WebSearch.Disabled", {}) {}
+6 -5
View File
@@ -461,7 +461,9 @@ function effectType(schema: Schema.Top, references: ReturnType<typeof effectType
imports.add(direct.import)
return direct.name
}
const document = SchemaRepresentation.toCodeDocument(SchemaRepresentation.toRepresentations([codegenAst(projected.ast)]))
const document = SchemaRepresentation.toCodeDocument(
SchemaRepresentation.toRepresentations([codegenAst(projected.ast)]),
)
const source = new Map(document.references.nonRecursives.map((reference) => [reference.$ref, reference.code.Type]))
const expand = (type: string, seen = new Set<string>()): string => {
for (const [name, value] of source) {
@@ -1844,10 +1846,9 @@ function renderSchemas(slots: ReadonlyArray<Slot>) {
]
const [first, ...rest] = expanded
const document = SchemaRepresentation.toCodeDocument(
SchemaRepresentation.toRepresentations(codegenAsts(expanded.map((slot) => slot.schema.ast)) as [
SchemaAST.AST,
...Array<SchemaAST.AST>,
]),
SchemaRepresentation.toRepresentations(
codegenAsts(expanded.map((slot) => slot.schema.ast)) as [SchemaAST.AST, ...Array<SchemaAST.AST>],
),
)
const artifacts = document.artifacts.flatMap((artifact) => {
if (artifact._tag === "Import") return [artifact.importDeclaration]
+1090 -10324
View File
File diff suppressed because it is too large Load Diff
+6 -9
View File
@@ -60,15 +60,12 @@ export namespace JsonRpc {
}
}
export class SimulationRequestError extends Schema.TaggedError<SimulationRequestError>()(
"SimulationRequestError",
{
method: Schema.String,
code: Schema.Number,
message: Schema.String,
data: Schema.optionalKey(Schema.Json),
},
) {}
export class SimulationRequestError extends Schema.TaggedError<SimulationRequestError>()("SimulationRequestError", {
method: Schema.String,
code: Schema.Number,
message: Schema.String,
data: Schema.optionalKey(Schema.Json),
}) {}
const request = <
const Tag extends string,
@@ -147,10 +147,9 @@ class ToolInvocationNotFoundError extends Schema.TaggedError<ToolInvocationNotFo
{ id: Schema.String, message: Schema.String },
) {}
class ToolControllerError extends Schema.TaggedError<ToolControllerError>()(
"SimulatedProvider.ToolControllerError",
{ message: Schema.String },
) {}
class ToolControllerError extends Schema.TaggedError<ToolControllerError>()("SimulatedProvider.ToolControllerError", {
message: Schema.String,
}) {}
export const layerDrive = (options: { readonly endpoint: string; readonly version: string }) =>
Layer.effect(
+1090 -10324
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff