Skip to content

Commit 119dd58

Browse files
committed
Revert "chore: Remove mastra in favor of ai sdk v5 (#1356) (#1359)"
This reverts commit 6ed1d3e.
1 parent 6ed1d3e commit 119dd58

93 files changed

Lines changed: 16481 additions & 4162 deletions

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@ dist
4040
kv
4141
kv-shm
4242
kv-wal
43-
.specstory/**
44-
.tsbuildinfo
43+
.specstory/**

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/api/package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,28 @@
99
},
1010
"dependencies": {
1111
"@ai-sdk/ui-utils": "^1.2.11",
12-
"@deco/actors": "npm:@jsr/deco__actors@0.34.2",
12+
"@deco/actors": "npm:@jsr/deco__actors@0.34.1",
1313
"@deco/ai": "^1.0.0",
1414
"@deco/mcp": "npm:@jsr/deco__mcp@0.5.5",
1515
"@deco/sdk": "^0.1.1",
1616
"@libsql/client": "^0.15.4",
17-
"@modelcontextprotocol/sdk": "1.19.1",
17+
"@modelcontextprotocol/sdk": "1.17.1",
18+
"outerbase-browsable-do-enforced": "0.2.0",
1819
"@supabase/ssr": "0.6.1",
1920
"@supabase/supabase-js": "2.49.4",
20-
"ai": "^5.0.60",
21-
"cloudflare": "4.5.0",
21+
"ai": "^4.3.13",
22+
"cloudflare": "^4.2.0",
2223
"hono": "^4.7.7",
2324
"mimetext": "^3.0.27",
24-
"outerbase-browsable-do-enforced": "0.2.0",
2525
"postal-mime": "^2.4.3",
26-
"zod": "3.25.75"
26+
"zod": "^3.24.3"
2727
},
2828
"devDependencies": {
2929
"@cloudflare/workers-types": "^4.20250620.0",
30-
"supabase": "^2.22.12"
30+
"supabase": "^2.22.12",
31+
"wrangler": "^4.23.0"
3132
},
3233
"engines": {
33-
"node": ">=24.0.0"
34+
"node": ">=20.0.0"
3435
}
3536
}

apps/api/src/api.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -189,28 +189,20 @@ const createMCPHandlerFor = (
189189

190190
registeredTools.add(tool.name);
191191

192-
const evalInputSchema =
193-
tool.inputSchema instanceof z.ZodLazy
194-
? tool.inputSchema.schema
195-
: tool.inputSchema;
196-
197-
const evalOutputSchema =
198-
tool.outputSchema instanceof z.ZodLazy
199-
? tool.outputSchema.schema
200-
: tool.outputSchema;
201-
202192
server.registerTool(
203193
tool.name,
204194
{
205195
annotations: tool.annotations,
206196
description: tool.description,
207197
inputSchema:
208-
"shape" in evalInputSchema
209-
? (evalInputSchema.shape as z.ZodRawShape)
198+
"shape" in tool.inputSchema
199+
? (tool.inputSchema.shape as z.ZodRawShape)
210200
: z.object({}).shape,
211201
outputSchema:
212-
evalOutputSchema && "shape" in evalOutputSchema
213-
? (evalOutputSchema.shape as z.ZodRawShape)
202+
tool.outputSchema &&
203+
typeof tool.outputSchema === "object" &&
204+
"shape" in tool.outputSchema
205+
? (tool.outputSchema.shape as z.ZodRawShape)
214206
: z.object({}).shape,
215207
},
216208
// @ts-expect-error: zod shape is not typed

apps/api/src/email.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,9 @@ export function email(
108108
{
109109
id: crypto.randomUUID(),
110110
role: "user",
111-
parts: [{ type: "text", text: await readContent(message) }],
111+
content: await readContent(message),
112112
},
113113
],
114-
{}, // metadata - empty for email
115114
{
116115
threadId: originalMessageId,
117116
resourceId: originalMessageId,

apps/outbound/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"@supabase/ssr": "0.6.1",
1313
"@supabase/supabase-js": "2.49.4"
1414
},
15+
"devDependencies": {
16+
"wrangler": "^4.13.2"
17+
},
1518
"engines": {
16-
"node": ">=24.0.0"
19+
"node": ">=20.0.0"
1720
}
1821
}

apps/web/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@ai-sdk/provider": "^2.0.0",
14-
"@ai-sdk/react": "^2.0.59",
15-
"@deco/actors": "npm:@jsr/deco__actors@0.34.2",
13+
"@ai-sdk/provider": "^1.1.3",
14+
"@ai-sdk/react": "^1.2.5",
15+
"@deco/actors": "npm:@jsr/deco__actors@0.34.1",
1616
"@deco/sdk": "^0.1.1",
1717
"@deco/ui": "^1.0.0",
1818
"@gsap/react": "^2.1.2",
@@ -39,8 +39,8 @@
3939
"marked": "^15.0.7",
4040
"posthog-js": "^1.259.0",
4141
"prismjs": "1.30.0",
42-
"react": "^19.2.0",
43-
"react-dom": "^19.2.0",
42+
"react": "^19.0.0",
43+
"react-dom": "^19.0.0",
4444
"react-hook-form": "^7.55.0",
4545
"react-markdown": "^10.1.0",
4646
"react-router": "^7.4.1",
@@ -54,7 +54,7 @@
5454
"urlpattern-polyfill": "^10.1.0",
5555
"use-debounce": "^10.0.6",
5656
"vite-plugin-pwa": "^1.0.1",
57-
"zod": "3.25.75"
57+
"zod": "^3.24.3"
5858
},
5959
"devDependencies": {
6060
"@react-scan/vite-plugin-react-scan": "^0.1.8",
@@ -64,10 +64,10 @@
6464
"@types/react": "^19.0.10",
6565
"@types/react-syntax-highlighter": "^15.5.13",
6666
"@types/react-dom": "^19.0.4",
67-
"@vitejs/plugin-react-swc": "^4.1.0",
67+
"@vitejs/plugin-react-swc": "^3.8.0",
6868
"react-scan": "^0.4.3",
6969
"tailwindcss": "^4.1.1",
7070
"vite-plugin-inspect": "^11.3.0",
71-
"vite": "^7.1.8"
71+
"vite": "^7.0.5"
7272
}
7373
}

0 commit comments

Comments
 (0)