Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mcp-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"test:watch": "vitest"
},
"dependencies": {
"@cloudflare/workers-oauth-provider": "^0.0.10",
"@cloudflare/workers-oauth-provider": "^0.0.13",
"ably": "^1.2.48",
"agents": "^0.1.4",
"agents": "^0.2.19",
"hono": "^4.9.8",
"jose": "^6.1.0",
"oauth4webapi": "^3.8.1"
Expand Down
3 changes: 0 additions & 3 deletions mcp-worker/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,14 @@ export async function authorize(
// Extract client information for the consent screen
const clientName = client.clientName || client.clientId
const clientLogo = client.logoUri || '' // No default logo
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The removed clientUri variable was assigned from client.clientUri || '#', but the code comment indicates 'No default logo' for the clientLogo assignment. Consider verifying that the 'No default logo' comment is still accurate and appropriately placed. The comment placement may be misleading as it appears after the clientLogo assignment when it might have been related to the removed clientUri line.

Suggested change
const clientLogo = client.logoUri || '' // No default logo
const clientLogo = client.logoUri || '' // Defaults to empty string if no logoUri is provided

Copilot uses AI. Check for mistakes.
const clientUri = client.clientUri || '#'
const requestedScopes = (c.env.AUTH0_SCOPE || '').split(' ')

// Render the consent screen with CSRF protection
return c.html(
renderConsentScreen({
clientLogo,
clientName,
clientUri,
consentToken,
redirectUri: mcpClientAuthRequest.redirectUri,
requestedScopes,
transactionState,
}),
Expand Down
4 changes: 0 additions & 4 deletions mcp-worker/src/consentScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ import { html, raw } from 'hono/html'
export function renderConsentScreen({
clientName,
clientLogo,
clientUri,
redirectUri,
requestedScopes,
transactionState,
consentToken,
}: {
clientName: string
clientLogo: string
clientUri: string
redirectUri: string
requestedScopes: string[]
transactionState: string
consentToken: string
Expand Down
2 changes: 1 addition & 1 deletion mcp-worker/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import OAuthProvider, { OAuthHelpers } from '@cloudflare/workers-oauth-provider'
import OAuthProvider from '@cloudflare/workers-oauth-provider'
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import type { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js'
import type { ZodRawShape } from 'zod'
Expand Down
2 changes: 1 addition & 1 deletion oclif.manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.1.1",
"version": "6.1.2",
"commands": {
"authCommand": {
"id": "authCommand",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"@babel/parser": "^7.28.0",
"@modelcontextprotocol/sdk": "^1.18.1",
"@modelcontextprotocol/sdk": "^1.20.2",
"@oclif/core": "^2.16.0",
"@oclif/plugin-autocomplete": "^2.3.10",
"@oclif/plugin-help": "^6.2.27",
Expand Down
4 changes: 3 additions & 1 deletion test-utils/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ process.env.OCLIF_NEXT_VERSION = '1'
// Ensure TypeScript files required by @oclif/test are compiled at runtime
try {
require('ts-node/register')
} catch {}
} catch {
// ts-node may not be available in all environments, ignore error
Comment on lines +12 to +13
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the added comment improves clarity, the empty catch block silently swallows all errors from require('ts-node/register'), not just module-not-found errors. Consider catching and checking for the specific error type (MODULE_NOT_FOUND) to avoid hiding unexpected errors during ts-node initialization.

Suggested change
} catch {
// ts-node may not be available in all environments, ignore error
} catch (err) {
// ts-node may not be available in all environments, ignore MODULE_NOT_FOUND error
if (!err || err.code !== 'MODULE_NOT_FOUND') throw err;

Copilot uses AI. Check for mistakes.
}

global.oclif = global.oclif || {}
global.oclif.columns = 80
Loading