Skip to content

Commit 73758c3

Browse files
committed
Revert "chore: Migrate to new mastra and sdk v5 (#1356)"
This reverts commit 27664e6.
1 parent 27664e6 commit 73758c3

File tree

68 files changed

+2490
-2615
lines changed

Some content is hidden

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

68 files changed

+2490
-2615
lines changed

apps/api/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,29 @@
99
},
1010
"dependencies": {
1111
"@ai-sdk/ui-utils": "^1.2.11",
12-
"@deco/actors": "npm:@jsr/[email protected].2",
12+
"@deco/actors": "npm:@jsr/[email protected].1",
1313
"@deco/ai": "^1.0.0",
1414
"@deco/mcp": "npm:@jsr/[email protected]",
1515
"@deco/sdk": "^0.1.1",
1616
"@libsql/client": "^0.15.4",
1717
"@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.59",
21+
"ai": "^4.3.13",
2122
"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",
2626
"unpdf": "^1.0.5",
2727
"zod": "^3.24.3"
2828
},
2929
"devDependencies": {
3030
"@cloudflare/workers-types": "^4.20250620.0",
31-
"supabase": "^2.22.12"
31+
"supabase": "^2.22.12",
32+
"wrangler": "^4.23.0"
3233
},
3334
"engines": {
34-
"node": ">=24.0.0"
35+
"node": ">=20.0.0"
3536
}
3637
}

apps/api/src/api.ts

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

180180
registeredTools.add(tool.name);
181181

182-
const evalInputSchema =
183-
tool.inputSchema instanceof z.ZodLazy
184-
? tool.inputSchema.schema
185-
: tool.inputSchema;
186-
187-
const evalOutputSchema =
188-
tool.outputSchema instanceof z.ZodLazy
189-
? tool.outputSchema.schema
190-
: tool.outputSchema;
191-
192182
server.registerTool(
193183
tool.name,
194184
{
195185
annotations: tool.annotations,
196186
description: tool.description,
197187
inputSchema:
198-
"shape" in evalInputSchema
199-
? (evalInputSchema.shape as z.ZodRawShape)
188+
"shape" in tool.inputSchema
189+
? (tool.inputSchema.shape as z.ZodRawShape)
200190
: z.object({}).shape,
201191
outputSchema:
202-
evalOutputSchema && "shape" in evalOutputSchema
203-
? (evalOutputSchema.shape as z.ZodRawShape)
192+
tool.outputSchema &&
193+
typeof tool.outputSchema === "object" &&
194+
"shape" in tool.outputSchema
195+
? (tool.outputSchema.shape as z.ZodRawShape)
204196
: z.object({}).shape,
205197
},
206198
// @ts-expect-error: zod shape is not typed

apps/api/src/email.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ 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
],
114114
{

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: 7 additions & 7 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/[email protected].2",
13+
"@ai-sdk/provider": "^1.1.3",
14+
"@ai-sdk/react": "^1.2.5",
15+
"@deco/actors": "npm:@jsr/[email protected].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",
@@ -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)