Skip to content

Commit cdced81

Browse files
committed
update everything
1 parent 7d81613 commit cdced81

File tree

109 files changed

+10608
-4638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+10608
-4638
lines changed

epicshop/epic-me/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@
2121
},
2222
"dependencies": {
2323
"zod": "^3.25.67",
24-
"isbot": "^5.1.30",
24+
"isbot": "^5.1.31",
2525
"react": "^19.1.1",
2626
"react-dom": "^19.1.1",
2727
"react-router": "^7.9.1"
2828
},
2929
"devDependencies": {
30-
"@cloudflare/vite-plugin": "^1.13.1",
30+
"@cloudflare/vite-plugin": "^1.13.3",
3131
"@epic-web/config": "^1.21.3",
3232
"@react-router/dev": "^7.9.1",
3333
"@tailwindcss/vite": "^4.1.13",
3434
"@types/node": "^24",
3535
"@types/react": "^19.1.13",
3636
"@types/react-dom": "^19.1.9",
37-
"eslint": "^9.35.0",
37+
"eslint": "^9.36.0",
3838
"prettier": "^3.6.2",
3939
"prettier-plugin-tailwindcss": "^0.6.14",
4040
"tailwindcss": "^4.1.13",
4141
"typescript": "^5.9.2",
42-
"vite": "^7.1.5",
42+
"vite": "^7.1.7",
4343
"vite-plugin-devtools-json": "^1.0.0",
4444
"vite-tsconfig-paths": "^5.1.4",
45-
"wrangler": "^4.37.0"
45+
"wrangler": "^4.38.0"
4646
},
4747
"prettier": "@epic-web/config/prettier"
4848
}

epicshop/epic-me/workers/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ const defaultHandler = {
1616
cloudflare: { env, ctx },
1717
})
1818
},
19-
} satisfies ExportedHandler<Env>
19+
}
2020

2121
export default defaultHandler

epicshop/mcp-dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mcp-dev": "./dev.js"
77
},
88
"dependencies": {
9-
"close-with-grace": "^2.2.0",
9+
"close-with-grace": "^2.3.0",
1010
"execa": "^9.6.0",
1111
"get-port": "^7.1.0",
1212
"http-proxy": "^1.18.1"

epicshop/package-lock.json

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

exercises/01.simple/01.problem.raw-html/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
},
1515
"dependencies": {
1616
"@epic-web/invariant": "^1.0.0",
17-
"@mcp-ui/server": "^5.10.0",
18-
"@modelcontextprotocol/sdk": "^1.18.0",
19-
"agents": "0.1.1",
17+
"@mcp-ui/server": "^5.11.0",
18+
"@modelcontextprotocol/sdk": "^1.18.1",
19+
"agents": "^0.2.0",
2020
"zod": "^3.25.67"
2121
},
2222
"devDependencies": {
2323
"@epic-web/config": "^1.21.3",
2424
"@epic-web/mcp-dev": "*",
2525
"@faker-js/faker": "^10.0.0",
26-
"@modelcontextprotocol/inspector": "0.16.7",
27-
"@types/node": "^24.5.0",
26+
"@modelcontextprotocol/inspector": "0.16.8",
27+
"@types/node": "^24.5.2",
2828
"cross-env": "^10.0.0",
29-
"eslint": "^9.35.0",
29+
"eslint": "^9.36.0",
3030
"execa": "^9.6.0",
3131
"prettier": "^3.6.2",
3232
"typescript": "^5.9.2",
3333
"vitest": "^3.2.4",
34-
"wrangler": "^4.37.0"
34+
"wrangler": "^4.38.0"
3535
},
3636
"prettier": "@epic-web/config/prettier",
3737
"license": "GPL-3.0-only"

exercises/01.simple/01.problem.raw-html/worker/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { EpicMeMCP } from './mcp/index.ts'
22

33
export default {
4-
fetch: async (request, env, ctx) => {
4+
fetch: async (request: Request, env: Env, ctx: ExecutionContext) => {
55
const url = new URL(request.url)
66

77
if (url.pathname === '/mcp') {
@@ -12,6 +12,6 @@ export default {
1212

1313
return new Response('Not found', { status: 404 })
1414
},
15-
} satisfies ExportedHandler<Env>
15+
}
1616

1717
export { EpicMeMCP }
Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import { type DBClient } from '@epic-web/epicme-db-client'
2-
import { invariant } from '@epic-web/invariant'
32
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
43
import { McpAgent } from 'agents/mcp'
54
import { db } from '../db.ts'
65
import { initializePrompts } from './prompts.ts'
76
import { initializeResources } from './resources.ts'
87
import { initializeTools } from './tools.ts'
98

10-
type Props = { baseUrl: string }
11-
type State = {}
12-
13-
export class EpicMeMCP extends McpAgent<Env, State, Props> {
9+
export class EpicMeMCP extends McpAgent<Env> {
1410
db!: DBClient
1511
server = new McpServer(
1612
{
@@ -42,26 +38,4 @@ You can also help users add tags to their entries and get all tags for an entry.
4238
await initializeResources(this)
4339
await initializePrompts(this)
4440
}
45-
requireBaseUrl() {
46-
const baseUrl = this.props?.baseUrl
47-
invariant(baseUrl, 'Unexpected: baseUrl not set on agent')
48-
return baseUrl
49-
}
5041
}
51-
52-
export default {
53-
fetch: async (request, env, ctx) => {
54-
const url = new URL(request.url)
55-
56-
if (url.pathname === '/mcp') {
57-
ctx.props.baseUrl = url.origin
58-
59-
const mcp = EpicMeMCP.serve('/mcp', {
60-
binding: 'EPIC_ME_MCP_OBJECT',
61-
})
62-
return mcp.fetch(request, env, ctx)
63-
}
64-
65-
return new Response('Not found', { status: 404 })
66-
},
67-
} satisfies ExportedHandler<Env>

exercises/01.simple/01.solution.raw-html/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
},
1515
"dependencies": {
1616
"@epic-web/invariant": "^1.0.0",
17-
"@mcp-ui/server": "^5.10.0",
18-
"@modelcontextprotocol/sdk": "^1.18.0",
19-
"agents": "0.1.1",
17+
"@mcp-ui/server": "^5.11.0",
18+
"@modelcontextprotocol/sdk": "^1.18.1",
19+
"agents": "^0.2.0",
2020
"zod": "^3.25.67"
2121
},
2222
"devDependencies": {
2323
"@epic-web/config": "^1.21.3",
2424
"@epic-web/mcp-dev": "*",
2525
"@faker-js/faker": "^10.0.0",
26-
"@modelcontextprotocol/inspector": "0.16.7",
27-
"@types/node": "^24.5.0",
26+
"@modelcontextprotocol/inspector": "0.16.8",
27+
"@types/node": "^24.5.2",
2828
"cross-env": "^10.0.0",
29-
"eslint": "^9.35.0",
29+
"eslint": "^9.36.0",
3030
"execa": "^9.6.0",
3131
"prettier": "^3.6.2",
3232
"typescript": "^5.9.2",
3333
"vitest": "^3.2.4",
34-
"wrangler": "^4.37.0"
34+
"wrangler": "^4.38.0"
3535
},
3636
"prettier": "@epic-web/config/prettier",
3737
"license": "GPL-3.0-only"

exercises/01.simple/01.solution.raw-html/worker/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { EpicMeMCP } from './mcp/index.ts'
22

33
export default {
4-
fetch: async (request, env, ctx) => {
4+
fetch: async (request: Request, env: Env, ctx: ExecutionContext) => {
55
const url = new URL(request.url)
66

77
if (url.pathname === '/mcp') {
@@ -12,6 +12,6 @@ export default {
1212

1313
return new Response('Not found', { status: 404 })
1414
},
15-
} satisfies ExportedHandler<Env>
15+
}
1616

1717
export { EpicMeMCP }
Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import { type DBClient } from '@epic-web/epicme-db-client'
2-
import { invariant } from '@epic-web/invariant'
32
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
43
import { McpAgent } from 'agents/mcp'
54
import { db } from '../db.ts'
65
import { initializePrompts } from './prompts.ts'
76
import { initializeResources } from './resources.ts'
87
import { initializeTools } from './tools.ts'
98

10-
type Props = { baseUrl: string }
11-
type State = {}
12-
13-
export class EpicMeMCP extends McpAgent<Env, State, Props> {
9+
export class EpicMeMCP extends McpAgent<Env> {
1410
db!: DBClient
1511
server = new McpServer(
1612
{
@@ -42,26 +38,4 @@ You can also help users add tags to their entries and get all tags for an entry.
4238
await initializeResources(this)
4339
await initializePrompts(this)
4440
}
45-
requireBaseUrl() {
46-
const baseUrl = this.props?.baseUrl
47-
invariant(baseUrl, 'Unexpected: baseUrl not set on agent')
48-
return baseUrl
49-
}
5041
}
51-
52-
export default {
53-
fetch: async (request, env, ctx) => {
54-
const url = new URL(request.url)
55-
56-
if (url.pathname === '/mcp') {
57-
ctx.props.baseUrl = url.origin
58-
59-
const mcp = EpicMeMCP.serve('/mcp', {
60-
binding: 'EPIC_ME_MCP_OBJECT',
61-
})
62-
return mcp.fetch(request, env, ctx)
63-
}
64-
65-
return new Response('Not found', { status: 404 })
66-
},
67-
} satisfies ExportedHandler<Env>

0 commit comments

Comments
 (0)