Skip to content

Commit 6bee6ee

Browse files
chore: generate
1 parent 9739d75 commit 6bee6ee

5 files changed

Lines changed: 68 additions & 3 deletions

File tree

packages/opencode/src/server/routes/instance/httpapi/groups/v2/session.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ import { Prompt } from "@opencode-ai/core/session-prompt"
44
import { SessionV2 } from "@/v2/session"
55
import { Schema } from "effect"
66
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
7-
import { InvalidCursorError, InvalidRequestError, ServiceUnavailableError, SessionNotFoundError, UnknownError } from "../../errors"
7+
import {
8+
InvalidCursorError,
9+
InvalidRequestError,
10+
ServiceUnavailableError,
11+
SessionNotFoundError,
12+
UnknownError,
13+
} from "../../errors"
814
import { V2Authorization } from "../../middleware/authorization"
915
import { WorkspaceRoutingQuery, WorkspaceRoutingQueryFields } from "../../middleware/workspace-routing"
1016
import { QueryBoolean } from "../query"

packages/opencode/src/server/routes/instance/httpapi/handlers/v2/session.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ import { SessionV2 } from "@/v2/session"
33
import { DateTime, Effect, Option, Schema } from "effect"
44
import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi"
55
import { InstanceHttpApi } from "../../api"
6-
import { InvalidCursorError, InvalidRequestError, ServiceUnavailableError, SessionNotFoundError, UnknownError } from "../../errors"
6+
import {
7+
InvalidCursorError,
8+
InvalidRequestError,
9+
ServiceUnavailableError,
10+
SessionNotFoundError,
11+
UnknownError,
12+
} from "../../errors"
713

814
const DefaultSessionsLimit = 50
915

packages/opencode/src/v2/session.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ export interface Interface {
110110
direction: "previous" | "next"
111111
}
112112
}) => Effect.Effect<SessionMessage.Message[], NotFoundError | MessageDecodeError>
113-
readonly context: (sessionID: SessionID) => Effect.Effect<SessionMessage.Message[], NotFoundError | MessageDecodeError>
113+
readonly context: (
114+
sessionID: SessionID,
115+
) => Effect.Effect<SessionMessage.Message[], NotFoundError | MessageDecodeError>
114116
readonly prompt: (input: {
115117
id?: EventV2.ID
116118
sessionID: SessionID

packages/sdk/js/src/v2/gen/types.gen.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,12 @@ export type ServiceUnavailableError = {
18361836
service?: string
18371837
}
18381838

1839+
export type UnknownError1 = {
1840+
_tag: "UnknownError"
1841+
message: string
1842+
ref?: string
1843+
}
1844+
18391845
export type V2SessionMessagesResponse = {
18401846
items: Array<SessionMessage>
18411847
cursor: {
@@ -7311,6 +7317,10 @@ export type V2SessionContextErrors = {
73117317
* SessionNotFoundError
73127318
*/
73137319
404: SessionNotFoundError
7320+
/**
7321+
* UnknownError
7322+
*/
7323+
500: UnknownError1
73147324
}
73157325

73167326
export type V2SessionContextError = V2SessionContextErrors[keyof V2SessionContextErrors]
@@ -7355,6 +7365,10 @@ export type V2SessionMessagesErrors = {
73557365
* SessionNotFoundError
73567366
*/
73577367
404: SessionNotFoundError
7368+
/**
7369+
* UnknownError
7370+
*/
7371+
500: UnknownError1
73587372
}
73597373

73607374
export type V2SessionMessagesError = V2SessionMessagesErrors[keyof V2SessionMessagesErrors]

packages/sdk/openapi.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8517,6 +8517,16 @@
85178517
}
85188518
}
85198519
}
8520+
},
8521+
"500": {
8522+
"description": "UnknownError",
8523+
"content": {
8524+
"application/json": {
8525+
"schema": {
8526+
"$ref": "#/components/schemas/UnknownError1"
8527+
}
8528+
}
8529+
}
85208530
}
85218531
},
85228532
"description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
@@ -8634,6 +8644,16 @@
86348644
}
86358645
}
86368646
}
8647+
},
8648+
"500": {
8649+
"description": "UnknownError",
8650+
"content": {
8651+
"application/json": {
8652+
"schema": {
8653+
"$ref": "#/components/schemas/UnknownError1"
8654+
}
8655+
}
8656+
}
86378657
}
86388658
},
86398659
"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 @@
1573515755
"required": ["_tag", "message"],
1573615756
"additionalProperties": false
1573715757
},
15758+
"UnknownError1": {
15759+
"type": "object",
15760+
"properties": {
15761+
"_tag": {
15762+
"type": "string",
15763+
"enum": ["UnknownError"]
15764+
},
15765+
"message": {
15766+
"type": "string"
15767+
},
15768+
"ref": {
15769+
"type": "string"
15770+
}
15771+
},
15772+
"required": ["_tag", "message"],
15773+
"additionalProperties": false
15774+
},
1573815775
"V2SessionMessagesResponse": {
1573915776
"type": "object",
1574015777
"properties": {

0 commit comments

Comments
 (0)