mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-28 02:04:41 +00:00
chore: generate
This commit is contained in:
parent
0beb4de3e8
commit
63f3e84792
4 changed files with 79 additions and 20 deletions
|
|
@ -257,7 +257,9 @@ export interface Interface {
|
|||
clientName: string,
|
||||
resourceUri: string,
|
||||
) => Effect.Effect<Awaited<ReturnType<MCPClient["readResource"]>> | undefined>
|
||||
readonly startAuth: (mcpName: string) => Effect.Effect<{ authorizationUrl: string; oauthState: string }, NotFoundError>
|
||||
readonly startAuth: (
|
||||
mcpName: string,
|
||||
) => Effect.Effect<{ authorizationUrl: string; oauthState: string }, NotFoundError>
|
||||
readonly authenticate: (mcpName: string) => Effect.Effect<Status, NotFoundError>
|
||||
readonly finishAuth: (mcpName: string, authorizationCode: string) => Effect.Effect<Status, NotFoundError>
|
||||
readonly removeAuth: (mcpName: string) => Effect.Effect<void>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ export const mcpHandlers = HttpApiBuilder.group(InstanceHttpApi, "mcp", (handler
|
|||
.finishAuth(ctx.params.name, ctx.payload.code)
|
||||
.pipe(
|
||||
Effect.catchTag("MCP.NotFoundError", (error) =>
|
||||
Effect.fail(new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` })),
|
||||
Effect.fail(
|
||||
new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` }),
|
||||
),
|
||||
),
|
||||
)
|
||||
})
|
||||
|
|
@ -75,7 +77,9 @@ export const mcpHandlers = HttpApiBuilder.group(InstanceHttpApi, "mcp", (handler
|
|||
.connect(ctx.params.name)
|
||||
.pipe(
|
||||
Effect.catchTag("MCP.NotFoundError", (error) =>
|
||||
Effect.fail(new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` })),
|
||||
Effect.fail(
|
||||
new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` }),
|
||||
),
|
||||
),
|
||||
)
|
||||
return true
|
||||
|
|
@ -86,7 +90,9 @@ export const mcpHandlers = HttpApiBuilder.group(InstanceHttpApi, "mcp", (handler
|
|||
.disconnect(ctx.params.name)
|
||||
.pipe(
|
||||
Effect.catchTag("MCP.NotFoundError", (error) =>
|
||||
Effect.fail(new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` })),
|
||||
Effect.fail(
|
||||
new McpServerNotFoundError({ name: error.name, message: `MCP server not found: ${error.name}` }),
|
||||
),
|
||||
),
|
||||
)
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue