chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-21 11:01:36 +00:00
parent 9739d75892
commit 6bee6ee755
5 changed files with 68 additions and 3 deletions
@@ -4,7 +4,13 @@ import { Prompt } from "@opencode-ai/core/session-prompt"
import { SessionV2 } from "@/v2/session" import { SessionV2 } from "@/v2/session"
import { Schema } from "effect" import { Schema } from "effect"
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi" import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
import { InvalidCursorError, InvalidRequestError, ServiceUnavailableError, SessionNotFoundError, UnknownError } from "../../errors" import {
InvalidCursorError,
InvalidRequestError,
ServiceUnavailableError,
SessionNotFoundError,
UnknownError,
} from "../../errors"
import { V2Authorization } from "../../middleware/authorization" import { V2Authorization } from "../../middleware/authorization"
import { WorkspaceRoutingQuery, WorkspaceRoutingQueryFields } from "../../middleware/workspace-routing" import { WorkspaceRoutingQuery, WorkspaceRoutingQueryFields } from "../../middleware/workspace-routing"
import { QueryBoolean } from "../query" import { QueryBoolean } from "../query"
@@ -3,7 +3,13 @@ import { SessionV2 } from "@/v2/session"
import { DateTime, Effect, Option, Schema } from "effect" import { DateTime, Effect, Option, Schema } from "effect"
import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi" import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi"
import { InstanceHttpApi } from "../../api" import { InstanceHttpApi } from "../../api"
import { InvalidCursorError, InvalidRequestError, ServiceUnavailableError, SessionNotFoundError, UnknownError } from "../../errors" import {
InvalidCursorError,
InvalidRequestError,
ServiceUnavailableError,
SessionNotFoundError,
UnknownError,
} from "../../errors"
const DefaultSessionsLimit = 50 const DefaultSessionsLimit = 50
+3 -1
View File
@@ -110,7 +110,9 @@ export interface Interface {
direction: "previous" | "next" direction: "previous" | "next"
} }
}) => Effect.Effect<SessionMessage.Message[], NotFoundError | MessageDecodeError> }) => Effect.Effect<SessionMessage.Message[], NotFoundError | MessageDecodeError>
readonly context: (sessionID: SessionID) => Effect.Effect<SessionMessage.Message[], NotFoundError | MessageDecodeError> readonly context: (
sessionID: SessionID,
) => Effect.Effect<SessionMessage.Message[], NotFoundError | MessageDecodeError>
readonly prompt: (input: { readonly prompt: (input: {
id?: EventV2.ID id?: EventV2.ID
sessionID: SessionID sessionID: SessionID
+14
View File
@@ -1836,6 +1836,12 @@ export type ServiceUnavailableError = {
service?: string service?: string
} }
export type UnknownError1 = {
_tag: "UnknownError"
message: string
ref?: string
}
export type V2SessionMessagesResponse = { export type V2SessionMessagesResponse = {
items: Array<SessionMessage> items: Array<SessionMessage>
cursor: { cursor: {
@@ -7311,6 +7317,10 @@ export type V2SessionContextErrors = {
* SessionNotFoundError * SessionNotFoundError
*/ */
404: SessionNotFoundError 404: SessionNotFoundError
/**
* UnknownError
*/
500: UnknownError1
} }
export type V2SessionContextError = V2SessionContextErrors[keyof V2SessionContextErrors] export type V2SessionContextError = V2SessionContextErrors[keyof V2SessionContextErrors]
@@ -7355,6 +7365,10 @@ export type V2SessionMessagesErrors = {
* SessionNotFoundError * SessionNotFoundError
*/ */
404: SessionNotFoundError 404: SessionNotFoundError
/**
* UnknownError
*/
500: UnknownError1
} }
export type V2SessionMessagesError = V2SessionMessagesErrors[keyof V2SessionMessagesErrors] export type V2SessionMessagesError = V2SessionMessagesErrors[keyof V2SessionMessagesErrors]
+37
View File
@@ -8517,6 +8517,16 @@
} }
} }
} }
},
"500": {
"description": "UnknownError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnknownError1"
}
}
}
} }
}, },
"description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).", "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
@@ -8634,6 +8644,16 @@
} }
} }
} }
},
"500": {
"description": "UnknownError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnknownError1"
}
}
}
} }
}, },
"description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.", "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
@@ -15735,6 +15755,23 @@
"required": ["_tag", "message"], "required": ["_tag", "message"],
"additionalProperties": false "additionalProperties": false
}, },
"UnknownError1": {
"type": "object",
"properties": {
"_tag": {
"type": "string",
"enum": ["UnknownError"]
},
"message": {
"type": "string"
},
"ref": {
"type": "string"
}
},
"required": ["_tag", "message"],
"additionalProperties": false
},
"V2SessionMessagesResponse": { "V2SessionMessagesResponse": {
"type": "object", "type": "object",
"properties": { "properties": {