Explorar el Código

chore: generate

opencode-agent[bot] hace 3 meses
padre
commit
060fbc9ce7

+ 1 - 3
packages/opencode/src/mcp/index.ts

@@ -773,9 +773,7 @@ export const layer = Layer.effect(
       // Resolve effective redirect URI: explicit redirectUri > callbackPort shorthand > default
       // Resolve effective redirect URI: explicit redirectUri > callbackPort shorthand > default
       const effectiveRedirectUri =
       const effectiveRedirectUri =
         oauthConfig?.redirectUri ??
         oauthConfig?.redirectUri ??
-        (oauthConfig?.callbackPort
-          ? `http://127.0.0.1:${oauthConfig.callbackPort}${OAUTH_CALLBACK_PATH}`
-          : undefined)
+        (oauthConfig?.callbackPort ? `http://127.0.0.1:${oauthConfig.callbackPort}${OAUTH_CALLBACK_PATH}` : undefined)
 
 
       // Start the callback server with custom redirectUri if configured
       // Start the callback server with custom redirectUri if configured
       yield* Effect.promise(() => McpOAuthCallback.ensureRunning(effectiveRedirectUri))
       yield* Effect.promise(() => McpOAuthCallback.ensureRunning(effectiveRedirectUri))

+ 1 - 0
packages/sdk/js/src/v2/gen/types.gen.ts

@@ -1136,6 +1136,7 @@ export type McpOAuthConfig = {
   clientId?: string
   clientId?: string
   clientSecret?: string
   clientSecret?: string
   scope?: string
   scope?: string
+  callbackPort?: number
   redirectUri?: string
   redirectUri?: string
 }
 }
 
 

+ 5 - 0
packages/sdk/openapi.json

@@ -13763,6 +13763,11 @@
           "scope": {
           "scope": {
             "type": "string"
             "type": "string"
           },
           },
+          "callbackPort": {
+            "type": "integer",
+            "minimum": 1,
+            "maximum": 65535
+          },
           "redirectUri": {
           "redirectUri": {
             "type": "string"
             "type": "string"
           }
           }