Skip to content

Commit 63f3e84

Browse files
chore: generate
1 parent 0beb4de commit 63f3e84

4 files changed

Lines changed: 79 additions & 20 deletions

File tree

packages/opencode/src/mcp/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ export interface Interface {
257257
clientName: string,
258258
resourceUri: string,
259259
) => Effect.Effect<Awaited<ReturnType<MCPClient["readResource"]>> | undefined>
260-
readonly startAuth: (mcpName: string) => Effect.Effect<{ authorizationUrl: string; oauthState: string }, NotFoundError>
260+
readonly startAuth: (
261+
mcpName: string,
262+
) => Effect.Effect<{ authorizationUrl: string; oauthState: string }, NotFoundError>
261263
readonly authenticate: (mcpName: string) => Effect.Effect<Status, NotFoundError>
262264
readonly finishAuth: (mcpName: string, authorizationCode: string) => Effect.Effect<Status, NotFoundError>
263265
readonly removeAuth: (mcpName: string) => Effect.Effect<void>

packages/opencode/src/server/routes/instance/httpapi/handlers/mcp.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export const mcpHandlers = HttpApiBuilder.group(InstanceHttpApi, "mcp", (handler
4141
.finishAuth(ctx.params.name, ctx.payload.code)
4242
.pipe(
4343
Effect.catchTag("MCP.NotFoundError", (error) =>
44-
Effect.fail(new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` })),
44+
Effect.fail(
45+
new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` }),
46+
),
4547
),
4648
)
4749
})
@@ -75,7 +77,9 @@ export const mcpHandlers = HttpApiBuilder.group(InstanceHttpApi, "mcp", (handler
7577
.connect(ctx.params.name)
7678
.pipe(
7779
Effect.catchTag("MCP.NotFoundError", (error) =>
78-
Effect.fail(new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` })),
80+
Effect.fail(
81+
new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` }),
82+
),
7983
),
8084
)
8185
return true
@@ -86,7 +90,9 @@ export const mcpHandlers = HttpApiBuilder.group(InstanceHttpApi, "mcp", (handler
8690
.disconnect(ctx.params.name)
8791
.pipe(
8892
Effect.catchTag("MCP.NotFoundError", (error) =>
89-
Effect.fail(new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` })),
93+
Effect.fail(
94+
new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` }),
95+
),
9096
),
9197
)
9298
return true

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

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,12 @@ export type McpUnsupportedOAuthError = {
16941694
error: string
16951695
}
16961696

1697+
export type McpServerNotFoundError = {
1698+
_tag: "McpServerNotFoundError"
1699+
name: string
1700+
message: string
1701+
}
1702+
16971703
export type NotFoundError = {
16981704
name: "NotFoundError"
16991705
data: {
@@ -5122,9 +5128,9 @@ export type McpAuthRemoveErrors = {
51225128
*/
51235129
400: BadRequestError
51245130
/**
5125-
* Not found
5131+
* McpServerNotFoundError
51265132
*/
5127-
404: NotFoundError
5133+
404: McpServerNotFoundError
51285134
}
51295135

51305136
export type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors]
@@ -5158,9 +5164,9 @@ export type McpAuthStartErrors = {
51585164
*/
51595165
400: McpUnsupportedOAuthError | InvalidRequestError
51605166
/**
5161-
* Not found
5167+
* McpServerNotFoundError
51625168
*/
5163-
404: NotFoundError
5169+
404: McpServerNotFoundError
51645170
}
51655171

51665172
export type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors]
@@ -5197,9 +5203,9 @@ export type McpAuthCallbackErrors = {
51975203
*/
51985204
400: EffectHttpApiErrorBadRequest | InvalidRequestError
51995205
/**
5200-
* Not found
5206+
* McpServerNotFoundError
52015207
*/
5202-
404: NotFoundError
5208+
404: McpServerNotFoundError
52035209
}
52045210

52055211
export type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors]
@@ -5231,9 +5237,9 @@ export type McpAuthAuthenticateErrors = {
52315237
*/
52325238
400: McpUnsupportedOAuthError | InvalidRequestError
52335239
/**
5234-
* Not found
5240+
* McpServerNotFoundError
52355241
*/
5236-
404: NotFoundError
5242+
404: McpServerNotFoundError
52375243
}
52385244

52395245
export type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors]
@@ -5264,6 +5270,10 @@ export type McpConnectErrors = {
52645270
* Bad request
52655271
*/
52665272
400: BadRequestError
5273+
/**
5274+
* McpServerNotFoundError
5275+
*/
5276+
404: McpServerNotFoundError
52675277
}
52685278

52695279
export type McpConnectError = McpConnectErrors[keyof McpConnectErrors]
@@ -5294,6 +5304,10 @@ export type McpDisconnectErrors = {
52945304
* Bad request
52955305
*/
52965306
400: BadRequestError
5307+
/**
5308+
* McpServerNotFoundError
5309+
*/
5310+
404: McpServerNotFoundError
52975311
}
52985312

52995313
export type McpDisconnectError = McpDisconnectErrors[keyof McpDisconnectErrors]

packages/sdk/openapi.json

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,11 +2988,11 @@
29882988
}
29892989
},
29902990
"404": {
2991-
"description": "Not found",
2991+
"description": "McpServerNotFoundError",
29922992
"content": {
29932993
"application/json": {
29942994
"schema": {
2995-
"$ref": "#/components/schemas/NotFoundError"
2995+
"$ref": "#/components/schemas/McpServerNotFoundError"
29962996
}
29972997
}
29982998
}
@@ -3067,11 +3067,11 @@
30673067
}
30683068
},
30693069
"404": {
3070-
"description": "Not found",
3070+
"description": "McpServerNotFoundError",
30713071
"content": {
30723072
"application/json": {
30733073
"schema": {
3074-
"$ref": "#/components/schemas/NotFoundError"
3074+
"$ref": "#/components/schemas/McpServerNotFoundError"
30753075
}
30763076
}
30773077
}
@@ -3146,11 +3146,11 @@
31463146
}
31473147
},
31483148
"404": {
3149-
"description": "Not found",
3149+
"description": "McpServerNotFoundError",
31503150
"content": {
31513151
"application/json": {
31523152
"schema": {
3153-
"$ref": "#/components/schemas/NotFoundError"
3153+
"$ref": "#/components/schemas/McpServerNotFoundError"
31543154
}
31553155
}
31563156
}
@@ -3241,11 +3241,11 @@
32413241
}
32423242
},
32433243
"404": {
3244-
"description": "Not found",
3244+
"description": "McpServerNotFoundError",
32453245
"content": {
32463246
"application/json": {
32473247
"schema": {
3248-
"$ref": "#/components/schemas/NotFoundError"
3248+
"$ref": "#/components/schemas/McpServerNotFoundError"
32493249
}
32503250
}
32513251
}
@@ -3312,6 +3312,16 @@
33123312
}
33133313
}
33143314
}
3315+
},
3316+
"404": {
3317+
"description": "McpServerNotFoundError",
3318+
"content": {
3319+
"application/json": {
3320+
"schema": {
3321+
"$ref": "#/components/schemas/McpServerNotFoundError"
3322+
}
3323+
}
3324+
}
33153325
}
33163326
},
33173327
"description": "Connect an MCP server.",
@@ -3374,6 +3384,16 @@
33743384
}
33753385
}
33763386
}
3387+
},
3388+
"404": {
3389+
"description": "McpServerNotFoundError",
3390+
"content": {
3391+
"application/json": {
3392+
"schema": {
3393+
"$ref": "#/components/schemas/McpServerNotFoundError"
3394+
}
3395+
}
3396+
}
33773397
}
33783398
},
33793399
"description": "Disconnect an MCP server.",
@@ -15382,6 +15402,23 @@
1538215402
"required": ["error"],
1538315403
"additionalProperties": false
1538415404
},
15405+
"McpServerNotFoundError": {
15406+
"type": "object",
15407+
"properties": {
15408+
"_tag": {
15409+
"type": "string",
15410+
"enum": ["McpServerNotFoundError"]
15411+
},
15412+
"name": {
15413+
"type": "string"
15414+
},
15415+
"message": {
15416+
"type": "string"
15417+
}
15418+
},
15419+
"required": ["_tag", "name", "message"],
15420+
"additionalProperties": false
15421+
},
1538515422
"NotFoundError": {
1538615423
"type": "object",
1538715424
"required": ["name", "data"],

0 commit comments

Comments
 (0)