Skip to content

Commit fef3633

Browse files
committed
i guess it needs to be hard-set version
1 parent 99b395a commit fef3633

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

apps/cloudflare-one-casb/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"test": "vitest run"
1313
},
1414
"dependencies": {
15-
"@cloudflare/workers-oauth-provider": "^0.0.3",
15+
"@cloudflare/workers-oauth-provider": "0.0.3",
1616
"@hono/zod-validator": "0.4.3",
17-
"@modelcontextprotocol/sdk": "^1.10.2",
17+
"@modelcontextprotocol/sdk": "1.10.2",
1818
"@repo/mcp-common": "workspace:*",
1919
"agents": "0.0.67",
2020
"cloudflare": "4.2.0",

packages/mcp-common/src/api/account.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const withAccountCheck = <T extends Record<string, any>>(
1414
handler: ToolHandler<T>
1515
) => {
1616
return async (params: T) => {
17-
const accountId = agent.getActiveAccountId()
17+
const accountId = await agent.getActiveAccountId()
1818
if (!accountId) {
1919
return {
2020
content: [
@@ -30,7 +30,7 @@ export const withAccountCheck = <T extends Record<string, any>>(
3030
const result = await handler({
3131
...params,
3232
accountId,
33-
apiToken: agent.props.accessToken as string,
33+
apiToken: agent.props.accessToken || '',
3434
})
3535
return {
3636
content: [{ type: 'text' as const, text: JSON.stringify(result) }],

packages/mcp-common/src/types/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { z } from 'zod'
22

33
export type ToolHandler<T extends Record<string, any>> = (
4-
params: T & { accountId: string; apiToken: string }
4+
params: T & { accountId: string | null; apiToken: string }
55
) => Promise<any>
66

77
export interface ToolDefinition<T extends Record<string, any>> {

pnpm-lock.yaml

Lines changed: 13 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)