@mastra/mcp-docs-server 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fcomposio.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +11 -0
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Frag.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-azure.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-deepgram.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-elevenlabs.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-google.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-ibm.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-murf.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-openai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-playai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-replicate.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-speechify.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fstabilityai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +59 -0
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +24 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +12 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +302 -0
- package/.docs/organized/changelogs/create-mastra.md +302 -0
- package/.docs/organized/changelogs/mastra.md +302 -0
- package/.docs/organized/code-examples/agent.md +385 -0
- package/.docs/organized/code-examples/ai-sdk-useChat.md +377 -0
- package/.docs/organized/code-examples/assistant-ui.md +37 -0
- package/.docs/organized/code-examples/bird-checker-with-express.md +235 -0
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +360 -0
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +250 -0
- package/.docs/organized/code-examples/crypto-chatbot.md +96 -0
- package/.docs/organized/code-examples/fireworks-r1.md +159 -0
- package/.docs/organized/code-examples/integrations.md +184 -0
- package/.docs/organized/code-examples/mcp-configuration.md +341 -0
- package/.docs/organized/code-examples/memory-todo-agent.md +161 -0
- package/.docs/organized/code-examples/memory-with-context.md +167 -0
- package/.docs/organized/code-examples/memory-with-libsql.md +204 -0
- package/.docs/organized/code-examples/memory-with-pg.md +224 -0
- package/.docs/organized/code-examples/memory-with-upstash.md +268 -0
- package/.docs/organized/code-examples/quick-start.md +127 -0
- package/.docs/organized/code-examples/stock-price-tool.md +124 -0
- package/.docs/organized/code-examples/weather-agent.md +352 -0
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +159 -0
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +111 -0
- package/.docs/organized/code-examples/workflow-with-memory.md +393 -0
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +131 -0
- package/.docs/raw/agents/00-overview.mdx +185 -0
- package/.docs/raw/agents/01-agent-memory.mdx +610 -0
- package/.docs/raw/agents/02-adding-tools.mdx +224 -0
- package/.docs/raw/agents/03-adding-voice.mdx +170 -0
- package/.docs/raw/deployment/deployment.mdx +156 -0
- package/.docs/raw/deployment/logging-and-tracing.mdx +242 -0
- package/.docs/raw/deployment/server.mdx +114 -0
- package/.docs/raw/evals/00-overview.mdx +106 -0
- package/.docs/raw/evals/01-supported-evals.mdx +31 -0
- package/.docs/raw/evals/02-custom-eval.mdx +187 -0
- package/.docs/raw/faq/index.mdx +63 -0
- package/.docs/raw/frameworks/01-next-js.mdx +238 -0
- package/.docs/raw/frameworks/02-ai-sdk.mdx +218 -0
- package/.docs/raw/getting-started/installation.mdx +436 -0
- package/.docs/raw/getting-started/project-structure.mdx +80 -0
- package/.docs/raw/guides/01-chef-michel.mdx +242 -0
- package/.docs/raw/guides/02-stock-agent.mdx +182 -0
- package/.docs/raw/guides/03-recruiter.mdx +187 -0
- package/.docs/raw/index.mdx +22 -0
- package/.docs/raw/local-dev/creating-projects.mdx +74 -0
- package/.docs/raw/local-dev/integrations.mdx +127 -0
- package/.docs/raw/local-dev/mastra-dev.mdx +65 -0
- package/.docs/raw/rag/chunking-and-embedding.mdx +128 -0
- package/.docs/raw/rag/overview.mdx +85 -0
- package/.docs/raw/rag/retrieval.mdx +362 -0
- package/.docs/raw/rag/vector-databases.mdx +271 -0
- package/.docs/raw/reference/agents/createTool.mdx +190 -0
- package/.docs/raw/reference/agents/generate.mdx +327 -0
- package/.docs/raw/reference/agents/getAgent.mdx +54 -0
- package/.docs/raw/reference/agents/stream.mdx +361 -0
- package/.docs/raw/reference/cli/build.mdx +48 -0
- package/.docs/raw/reference/cli/deploy.mdx +22 -0
- package/.docs/raw/reference/cli/dev.mdx +97 -0
- package/.docs/raw/reference/cli/init.mdx +43 -0
- package/.docs/raw/reference/client-js/agents.mdx +90 -0
- package/.docs/raw/reference/client-js/error-handling.mdx +38 -0
- package/.docs/raw/reference/client-js/index.mdx +127 -0
- package/.docs/raw/reference/client-js/logs.mdx +24 -0
- package/.docs/raw/reference/client-js/memory.mdx +94 -0
- package/.docs/raw/reference/client-js/telemetry.mdx +20 -0
- package/.docs/raw/reference/client-js/tools.mdx +44 -0
- package/.docs/raw/reference/client-js/vectors.mdx +79 -0
- package/.docs/raw/reference/client-js/workflows.mdx +137 -0
- package/.docs/raw/reference/core/mastra-class.mdx +232 -0
- package/.docs/raw/reference/deployer/cloudflare.mdx +176 -0
- package/.docs/raw/reference/deployer/deployer.mdx +159 -0
- package/.docs/raw/reference/deployer/netlify.mdx +88 -0
- package/.docs/raw/reference/deployer/vercel.mdx +97 -0
- package/.docs/raw/reference/evals/answer-relevancy.mdx +186 -0
- package/.docs/raw/reference/evals/bias.mdx +186 -0
- package/.docs/raw/reference/evals/completeness.mdx +174 -0
- package/.docs/raw/reference/evals/content-similarity.mdx +183 -0
- package/.docs/raw/reference/evals/context-position.mdx +190 -0
- package/.docs/raw/reference/evals/context-precision.mdx +189 -0
- package/.docs/raw/reference/evals/context-relevancy.mdx +188 -0
- package/.docs/raw/reference/evals/contextual-recall.mdx +191 -0
- package/.docs/raw/reference/evals/faithfulness.mdx +193 -0
- package/.docs/raw/reference/evals/hallucination.mdx +219 -0
- package/.docs/raw/reference/evals/keyword-coverage.mdx +176 -0
- package/.docs/raw/reference/evals/prompt-alignment.mdx +238 -0
- package/.docs/raw/reference/evals/summarization.mdx +205 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +161 -0
- package/.docs/raw/reference/evals/tone-consistency.mdx +181 -0
- package/.docs/raw/reference/evals/toxicity.mdx +165 -0
- package/.docs/raw/reference/index.mdx +8 -0
- package/.docs/raw/reference/memory/Memory.mdx +186 -0
- package/.docs/raw/reference/memory/createThread.mdx +93 -0
- package/.docs/raw/reference/memory/getThreadById.mdx +43 -0
- package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +45 -0
- package/.docs/raw/reference/memory/query.mdx +164 -0
- package/.docs/raw/reference/observability/create-logger.mdx +106 -0
- package/.docs/raw/reference/observability/logger.mdx +55 -0
- package/.docs/raw/reference/observability/otel-config.mdx +120 -0
- package/.docs/raw/reference/observability/providers/braintrust.mdx +40 -0
- package/.docs/raw/reference/observability/providers/index.mdx +15 -0
- package/.docs/raw/reference/observability/providers/laminar.mdx +41 -0
- package/.docs/raw/reference/observability/providers/langfuse.mdx +51 -0
- package/.docs/raw/reference/observability/providers/langsmith.mdx +46 -0
- package/.docs/raw/reference/observability/providers/langwatch.mdx +45 -0
- package/.docs/raw/reference/observability/providers/new-relic.mdx +40 -0
- package/.docs/raw/reference/observability/providers/signoz.mdx +40 -0
- package/.docs/raw/reference/observability/providers/traceloop.mdx +40 -0
- package/.docs/raw/reference/rag/astra.mdx +258 -0
- package/.docs/raw/reference/rag/chroma.mdx +281 -0
- package/.docs/raw/reference/rag/chunk.mdx +237 -0
- package/.docs/raw/reference/rag/document.mdx +129 -0
- package/.docs/raw/reference/rag/embeddings.mdx +160 -0
- package/.docs/raw/reference/rag/extract-params.mdx +72 -0
- package/.docs/raw/reference/rag/graph-rag.mdx +182 -0
- package/.docs/raw/reference/rag/libsql.mdx +357 -0
- package/.docs/raw/reference/rag/metadata-filters.mdx +298 -0
- package/.docs/raw/reference/rag/pg.mdx +477 -0
- package/.docs/raw/reference/rag/pinecone.mdx +249 -0
- package/.docs/raw/reference/rag/qdrant.mdx +236 -0
- package/.docs/raw/reference/rag/rerank.mdx +212 -0
- package/.docs/raw/reference/rag/turbopuffer.mdx +249 -0
- package/.docs/raw/reference/rag/upstash.mdx +198 -0
- package/.docs/raw/reference/rag/vectorize.mdx +253 -0
- package/.docs/raw/reference/storage/libsql.mdx +74 -0
- package/.docs/raw/reference/storage/postgresql.mdx +48 -0
- package/.docs/raw/reference/storage/upstash.mdx +86 -0
- package/.docs/raw/reference/tools/client.mdx +180 -0
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +141 -0
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +154 -0
- package/.docs/raw/reference/tools/mcp-configuration.mdx +206 -0
- package/.docs/raw/reference/tools/vector-query-tool.mdx +212 -0
- package/.docs/raw/reference/voice/composite-voice.mdx +140 -0
- package/.docs/raw/reference/voice/deepgram.mdx +164 -0
- package/.docs/raw/reference/voice/elevenlabs.mdx +216 -0
- package/.docs/raw/reference/voice/google.mdx +198 -0
- package/.docs/raw/reference/voice/mastra-voice.mdx +394 -0
- package/.docs/raw/reference/voice/murf.mdx +251 -0
- package/.docs/raw/reference/voice/openai-realtime.mdx +431 -0
- package/.docs/raw/reference/voice/openai.mdx +168 -0
- package/.docs/raw/reference/voice/playai.mdx +159 -0
- package/.docs/raw/reference/voice/speechify.mdx +145 -0
- package/.docs/raw/reference/workflows/after.mdx +88 -0
- package/.docs/raw/reference/workflows/commit.mdx +37 -0
- package/.docs/raw/reference/workflows/createRun.mdx +77 -0
- package/.docs/raw/reference/workflows/else.mdx +72 -0
- package/.docs/raw/reference/workflows/execute.mdx +110 -0
- package/.docs/raw/reference/workflows/if.mdx +107 -0
- package/.docs/raw/reference/workflows/resume.mdx +155 -0
- package/.docs/raw/reference/workflows/start.mdx +84 -0
- package/.docs/raw/reference/workflows/step-class.mdx +100 -0
- package/.docs/raw/reference/workflows/step-condition.mdx +134 -0
- package/.docs/raw/reference/workflows/step-function.mdx +92 -0
- package/.docs/raw/reference/workflows/step-options.mdx +69 -0
- package/.docs/raw/reference/workflows/suspend.mdx +80 -0
- package/.docs/raw/reference/workflows/then.mdx +74 -0
- package/.docs/raw/reference/workflows/until.mdx +165 -0
- package/.docs/raw/reference/workflows/watch.mdx +118 -0
- package/.docs/raw/reference/workflows/while.mdx +168 -0
- package/.docs/raw/reference/workflows/workflow.mdx +233 -0
- package/.docs/raw/workflows/00-overview.mdx +168 -0
- package/.docs/raw/workflows/control-flow.mdx +712 -0
- package/.docs/raw/workflows/dynamic-workflows.mdx +232 -0
- package/.docs/raw/workflows/steps.mdx +98 -0
- package/.docs/raw/workflows/suspend-and-resume.mdx +196 -0
- package/.docs/raw/workflows/variables.mdx +248 -0
- package/LICENSE +44 -0
- package/README.md +129 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/prepare-docs/code-examples.d.ts +4 -0
- package/dist/prepare-docs/code-examples.js +91 -0
- package/dist/prepare-docs/copy-raw.d.ts +1 -0
- package/dist/prepare-docs/copy-raw.js +41 -0
- package/dist/prepare-docs/index.d.ts +1 -0
- package/dist/prepare-docs/index.js +8 -0
- package/dist/prepare-docs/package-changes.d.ts +4 -0
- package/dist/prepare-docs/package-changes.js +92 -0
- package/dist/prepare-docs/prepare.d.ts +1 -0
- package/dist/prepare-docs/prepare.js +13 -0
- package/dist/sse.d.ts +1 -0
- package/dist/sse.js +9 -0
- package/dist/stdio.d.ts +1 -0
- package/dist/stdio.js +8 -0
- package/dist/tools/__tests__/blog.test.d.ts +1 -0
- package/dist/tools/__tests__/blog.test.js +48 -0
- package/dist/tools/__tests__/changes.test.d.ts +1 -0
- package/dist/tools/__tests__/changes.test.js +36 -0
- package/dist/tools/__tests__/docs.test.d.ts +1 -0
- package/dist/tools/__tests__/docs.test.js +46 -0
- package/dist/tools/__tests__/examples.test.d.ts +1 -0
- package/dist/tools/__tests__/examples.test.js +52 -0
- package/dist/tools/blog.d.ts +15 -0
- package/dist/tools/blog.js +73 -0
- package/dist/tools/changes.d.ts +11 -0
- package/dist/tools/changes.js +69 -0
- package/dist/tools/docs.d.ts +11 -0
- package/dist/tools/docs.js +176 -0
- package/dist/tools/examples.d.ts +11 -0
- package/dist/tools/examples.js +61 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +9 -0
- package/package.json +66 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
### package.json
|
|
2
|
+
```json
|
|
3
|
+
{
|
|
4
|
+
"name": "examples-bird-checker-with-nextjs-and-eval",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "next dev --turbopack",
|
|
9
|
+
"build": "next build",
|
|
10
|
+
"start": "next start",
|
|
11
|
+
"lint": "next lint",
|
|
12
|
+
"mastra:init": "pnpm dlx mastra init",
|
|
13
|
+
"mastra:dev": "pnpm dlx mastra dev",
|
|
14
|
+
"braintrust:eval": "npx braintrust eval src/lib/evals"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@ai-sdk/anthropic": "latest",
|
|
18
|
+
"@mastra/core": "workspace:*",
|
|
19
|
+
"braintrust": "^0.0.168",
|
|
20
|
+
"class-variance-authority": "^0.7.1",
|
|
21
|
+
"clsx": "^2.1.1",
|
|
22
|
+
"lucide-react": "^0.454.0",
|
|
23
|
+
"next": "15.0.2",
|
|
24
|
+
"next-themes": "^0.4.5",
|
|
25
|
+
"nuqs": "^2.4.1",
|
|
26
|
+
"react": "19.0.0-rc-02c0e824-20241028",
|
|
27
|
+
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
|
28
|
+
"sonner": "^1.7.4",
|
|
29
|
+
"tailwind-merge": "^2.6.0",
|
|
30
|
+
"tailwindcss-animate": "^1.0.7",
|
|
31
|
+
"zod": "^3.24.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.17.24",
|
|
35
|
+
"@types/react": "^18.3.18",
|
|
36
|
+
"@types/react-dom": "^18.3.5",
|
|
37
|
+
"eslint": "^8.57.1",
|
|
38
|
+
"eslint-config-next": "15.0.2",
|
|
39
|
+
"postcss": "^8.5.3",
|
|
40
|
+
"tailwindcss": "^3.4.17",
|
|
41
|
+
"typescript": "^5.8.2"
|
|
42
|
+
},
|
|
43
|
+
"version": "0.0.1"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### lib/evals/data.ts
|
|
49
|
+
```typescript
|
|
50
|
+
export const IMAGES = {
|
|
51
|
+
notBird: {
|
|
52
|
+
bird: false,
|
|
53
|
+
species: "Panthera leo",
|
|
54
|
+
image:
|
|
55
|
+
"https://images.unsplash.com/photo-1470848051974-964b789cb6fa?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w2NzI1Mzd8MHwxfHNlYXJjaHwzNXx8d2lsZGxpZmV8ZW58MHx8fHwxNzMyMTIwMTMyfDA&ixlib=rb-4.0.3&q=80&w=1080",
|
|
56
|
+
},
|
|
57
|
+
isBird: {
|
|
58
|
+
bird: true,
|
|
59
|
+
species: "Ardea herodias",
|
|
60
|
+
image:
|
|
61
|
+
"https://images.unsplash.com/photo-1730510011925-e064a259f722?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w2NzI1Mzd8MHwxfHNlYXJjaHwxN3x8ZmVhdGhlcnN8ZW58MHx8Mnx8MTczMTQyMjI5MXww&ixlib=rb-4.0.3&q=80&w=1080",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### lib/evals/index.eval.ts
|
|
68
|
+
```typescript
|
|
69
|
+
import { Eval } from "braintrust";
|
|
70
|
+
import { IMAGES } from "./data";
|
|
71
|
+
import { BirdResponse, promptClaude } from "../mastra/actions";
|
|
72
|
+
|
|
73
|
+
const containsScorer = ({
|
|
74
|
+
output,
|
|
75
|
+
expected,
|
|
76
|
+
}: {
|
|
77
|
+
output: BirdResponse;
|
|
78
|
+
expected: Omit<BirdResponse, "location">;
|
|
79
|
+
}) => {
|
|
80
|
+
const birdDataCorrect = output?.bird === expected?.bird;
|
|
81
|
+
|
|
82
|
+
const speciesDataCorrect = output?.species
|
|
83
|
+
?.toLocaleLowerCase()
|
|
84
|
+
?.includes(expected?.species?.toLocaleLowerCase());
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
name: "containsScorer",
|
|
88
|
+
score: birdDataCorrect && speciesDataCorrect ? 1 : 0,
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
Eval("Is a bird", {
|
|
93
|
+
data: () => {
|
|
94
|
+
return [
|
|
95
|
+
{
|
|
96
|
+
input: IMAGES.isBird.image,
|
|
97
|
+
expected: IMAGES.isBird,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
input: IMAGES.notBird.image,
|
|
101
|
+
expected: IMAGES.notBird,
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
},
|
|
105
|
+
task: async (input) => {
|
|
106
|
+
const claudeResponse = await promptClaude({ imageUrl: input });
|
|
107
|
+
if (!claudeResponse.ok) {
|
|
108
|
+
return { bird: false, location: "", species: "" };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return claudeResponse.data;
|
|
112
|
+
},
|
|
113
|
+
scores: [containsScorer],
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### lib/mastra/actions.ts
|
|
119
|
+
```typescript
|
|
120
|
+
"use server";
|
|
121
|
+
|
|
122
|
+
import { mastra } from "@/mastra";
|
|
123
|
+
import { getRandomImage, Image, ImageResponse } from "./system-tools";
|
|
124
|
+
import { z } from "zod";
|
|
125
|
+
|
|
126
|
+
export type ImageQuery = "wildlife" | "feathers" | "flying" | "birds";
|
|
127
|
+
|
|
128
|
+
export type BirdResponse = {
|
|
129
|
+
bird: boolean;
|
|
130
|
+
species: string;
|
|
131
|
+
location: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export const getImage = async ({
|
|
135
|
+
query,
|
|
136
|
+
}: {
|
|
137
|
+
query: ImageQuery;
|
|
138
|
+
}): Promise<ImageResponse<Image, string>> => {
|
|
139
|
+
console.log("get image ============", "got here");
|
|
140
|
+
|
|
141
|
+
const response = await getRandomImage({
|
|
142
|
+
query,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
return response;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export const promptClaude = async ({
|
|
149
|
+
imageUrl,
|
|
150
|
+
}: {
|
|
151
|
+
imageUrl: string;
|
|
152
|
+
}): Promise<ImageResponse<BirdResponse, string>> => {
|
|
153
|
+
try {
|
|
154
|
+
const birdAgent = mastra.getAgent("birdAgent");
|
|
155
|
+
|
|
156
|
+
console.log("calling bird checker agent");
|
|
157
|
+
|
|
158
|
+
const response = await birdAgent.generate(
|
|
159
|
+
[
|
|
160
|
+
{
|
|
161
|
+
role: "user",
|
|
162
|
+
content: [
|
|
163
|
+
{
|
|
164
|
+
type: "image",
|
|
165
|
+
image: imageUrl,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: "text",
|
|
169
|
+
text: "view this image and let me know if it's a bird or not, and the scientific name of the bird without any explanation. Also summarize the location for this picture in one or two short sentences understandable by a high school student",
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
{
|
|
175
|
+
output: z.object({
|
|
176
|
+
bird: z.boolean(),
|
|
177
|
+
species: z.string(),
|
|
178
|
+
location: z.string(),
|
|
179
|
+
}),
|
|
180
|
+
},
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
const { object } = response || {};
|
|
184
|
+
|
|
185
|
+
console.log("prompt claude response====", JSON.stringify(object, null, 2));
|
|
186
|
+
|
|
187
|
+
return { ok: true, data: object as BirdResponse };
|
|
188
|
+
} catch (err) {
|
|
189
|
+
console.error("Error prompting claude:", err);
|
|
190
|
+
return { ok: false, error: "Could not fetch image metadata" };
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### lib/mastra/system-tools.ts
|
|
197
|
+
```typescript
|
|
198
|
+
export type Image = {
|
|
199
|
+
alt_description: string;
|
|
200
|
+
urls: {
|
|
201
|
+
regular: string;
|
|
202
|
+
raw: string;
|
|
203
|
+
};
|
|
204
|
+
user: {
|
|
205
|
+
first_name: string;
|
|
206
|
+
links: {
|
|
207
|
+
html: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export type ImageResponse<T, K> =
|
|
213
|
+
| {
|
|
214
|
+
ok: true;
|
|
215
|
+
data: T;
|
|
216
|
+
}
|
|
217
|
+
| {
|
|
218
|
+
ok: false;
|
|
219
|
+
error: K;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export type ImageQuery = "wildlife" | "feathers" | "flying" | "birds";
|
|
223
|
+
|
|
224
|
+
// Executor functions
|
|
225
|
+
export const getRandomImage = async ({
|
|
226
|
+
query,
|
|
227
|
+
}: {
|
|
228
|
+
query: ImageQuery;
|
|
229
|
+
}): Promise<ImageResponse<Image, string>> => {
|
|
230
|
+
const page = Math.floor(Math.random() * 20);
|
|
231
|
+
const order_by = Math.random() < 0.5 ? "relevant" : "latest";
|
|
232
|
+
try {
|
|
233
|
+
const res = await fetch(
|
|
234
|
+
`https://api.unsplash.com/search/photos?query=${query}&page=${page}&order_by=${order_by}`,
|
|
235
|
+
{
|
|
236
|
+
method: "GET",
|
|
237
|
+
headers: {
|
|
238
|
+
Authorization: `Client-ID ${process.env.NEXT_PUBLIC_UNSPLASH_ACCESS_KEY}`,
|
|
239
|
+
"Accept-Version": "v1",
|
|
240
|
+
},
|
|
241
|
+
cache: "no-store",
|
|
242
|
+
},
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
console.log("res in get_random_image api executor===", res);
|
|
246
|
+
|
|
247
|
+
if (!res.ok) {
|
|
248
|
+
return {
|
|
249
|
+
ok: false,
|
|
250
|
+
error: "Failed to fetch image",
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const data = (await res.json()) as {
|
|
255
|
+
results: Array<Image>;
|
|
256
|
+
};
|
|
257
|
+
const randomNo = Math.floor(Math.random() * data.results.length);
|
|
258
|
+
|
|
259
|
+
return {
|
|
260
|
+
ok: true,
|
|
261
|
+
data: data.results[randomNo] as Image,
|
|
262
|
+
};
|
|
263
|
+
} catch (err) {
|
|
264
|
+
console.log("Error in get_random_image api executor===", err);
|
|
265
|
+
return {
|
|
266
|
+
ok: false,
|
|
267
|
+
error: "Error fetching image",
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### lib/utils.ts
|
|
275
|
+
```typescript
|
|
276
|
+
import { clsx, type ClassValue } from "clsx";
|
|
277
|
+
import { twMerge } from "tailwind-merge";
|
|
278
|
+
|
|
279
|
+
export function cn(...inputs: ClassValue[]) {
|
|
280
|
+
return twMerge(clsx(inputs));
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export type BirdObj = {
|
|
284
|
+
bird: string;
|
|
285
|
+
location: string;
|
|
286
|
+
species: string;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export function getObjectFromString(text: string): BirdObj {
|
|
290
|
+
// First approach: using match()
|
|
291
|
+
const regex =
|
|
292
|
+
/(?<=bird:).*?(?=,|\n)|(?<=location:).*?(?=,|\n)|(?<=species:).*(?=\n|})/g;
|
|
293
|
+
const matches = text.match(regex);
|
|
294
|
+
|
|
295
|
+
if (!matches) {
|
|
296
|
+
return {
|
|
297
|
+
bird: "no",
|
|
298
|
+
location: text,
|
|
299
|
+
species: "",
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const [bird, location, species] = matches;
|
|
304
|
+
console.log("Bird:", bird);
|
|
305
|
+
console.log("Location:", location);
|
|
306
|
+
console.log("Species:", species);
|
|
307
|
+
|
|
308
|
+
return {
|
|
309
|
+
bird: bird?.trim(),
|
|
310
|
+
location: location?.trim(),
|
|
311
|
+
species: species?.split("}")?.join("")?.trim(),
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### mastra/agents/index.ts
|
|
318
|
+
```typescript
|
|
319
|
+
import { anthropic } from "@ai-sdk/anthropic";
|
|
320
|
+
import { Agent } from "@mastra/core/agent";
|
|
321
|
+
|
|
322
|
+
export const birdAgent = new Agent({
|
|
323
|
+
name: "birdAgent",
|
|
324
|
+
instructions:
|
|
325
|
+
"You can view an image and figure out if it is a bird or not. You can also figure out the species of the bird and where the picture was taken.",
|
|
326
|
+
model: anthropic("claude-3-haiku-20240307"),
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### mastra/index.ts
|
|
332
|
+
```typescript
|
|
333
|
+
import { Mastra } from "@mastra/core";
|
|
334
|
+
|
|
335
|
+
import { birdAgent } from "./agents";
|
|
336
|
+
|
|
337
|
+
export const mastra = new Mastra({
|
|
338
|
+
agents: { birdAgent },
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### mastra/tools/index.ts
|
|
344
|
+
```typescript
|
|
345
|
+
import { getRandomImage } from "@/lib/mastra/system-tools";
|
|
346
|
+
import { createTool } from "@mastra/core/tools";
|
|
347
|
+
import { z } from "zod";
|
|
348
|
+
|
|
349
|
+
export const getRandomImageTool = createTool({
|
|
350
|
+
id: "Get a random image from unsplash",
|
|
351
|
+
description: "Gets a random image from unsplash based on the selected option",
|
|
352
|
+
inputSchema: z.object({
|
|
353
|
+
query: z.enum(["wildlife", "feathers", "flying", "birds"]),
|
|
354
|
+
}),
|
|
355
|
+
execute: async ({ context }) => {
|
|
356
|
+
return getRandomImage(context);
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
```
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
### package.json
|
|
2
|
+
```json
|
|
3
|
+
{
|
|
4
|
+
"name": "examples-bird-checker-with-nextjs",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"version": "0.0.1",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "next dev --turbopack",
|
|
10
|
+
"build": "next build",
|
|
11
|
+
"start": "next start",
|
|
12
|
+
"lint": "next lint"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@ai-sdk/anthropic": "latest",
|
|
16
|
+
"@mastra/core": "workspace:*",
|
|
17
|
+
"class-variance-authority": "^0.7.1",
|
|
18
|
+
"clsx": "^2.1.1",
|
|
19
|
+
"lucide-react": "^0.454.0",
|
|
20
|
+
"next": "15.0.2",
|
|
21
|
+
"next-themes": "^0.4.5",
|
|
22
|
+
"nuqs": "^2.4.1",
|
|
23
|
+
"react": "19.0.0-rc-02c0e824-20241028",
|
|
24
|
+
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
|
25
|
+
"sonner": "^1.7.4",
|
|
26
|
+
"tailwind-merge": "^2.6.0",
|
|
27
|
+
"tailwindcss-animate": "^1.0.7",
|
|
28
|
+
"zod": "^3.24.2"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^20.17.24",
|
|
32
|
+
"@types/react": "^19.0.10",
|
|
33
|
+
"@types/react-dom": "^19.0.4",
|
|
34
|
+
"eslint": "^8.57.1",
|
|
35
|
+
"eslint-config-next": "15.0.2",
|
|
36
|
+
"postcss": "^8.5.3",
|
|
37
|
+
"tailwindcss": "^3.4.17",
|
|
38
|
+
"typescript": "^5.8.2"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### lib/mastra/actions.ts
|
|
45
|
+
```typescript
|
|
46
|
+
"use server";
|
|
47
|
+
|
|
48
|
+
import { mastra } from "@/mastra";
|
|
49
|
+
import { getRandomImage, Image, ImageResponse } from "./system-tools";
|
|
50
|
+
import { z } from "zod";
|
|
51
|
+
|
|
52
|
+
export type ImageQuery = "wildlife" | "feathers" | "flying" | "birds";
|
|
53
|
+
|
|
54
|
+
export type BirdResponse = {
|
|
55
|
+
bird: boolean;
|
|
56
|
+
species: string;
|
|
57
|
+
location: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const getImage = async ({
|
|
61
|
+
query,
|
|
62
|
+
}: {
|
|
63
|
+
query: ImageQuery;
|
|
64
|
+
}): Promise<ImageResponse<Image, string>> => {
|
|
65
|
+
console.log("get image ============", "got here");
|
|
66
|
+
const response = await getRandomImage({ query });
|
|
67
|
+
|
|
68
|
+
return response as ImageResponse<Image, string>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const promptClaude = async ({
|
|
72
|
+
imageUrl,
|
|
73
|
+
}: {
|
|
74
|
+
imageUrl: string;
|
|
75
|
+
}): Promise<ImageResponse<BirdResponse, string>> => {
|
|
76
|
+
try {
|
|
77
|
+
const birdAgent = mastra.getAgent("birdAgent");
|
|
78
|
+
|
|
79
|
+
console.log("calling bird checker agent");
|
|
80
|
+
|
|
81
|
+
const response = await birdAgent.generate(
|
|
82
|
+
[
|
|
83
|
+
{
|
|
84
|
+
role: "user",
|
|
85
|
+
content: [
|
|
86
|
+
{
|
|
87
|
+
type: "image",
|
|
88
|
+
image: imageUrl,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: "text",
|
|
92
|
+
text: "view this image and let me know if it's a bird or not, and the scientific name of the bird without any explanation. Also summarize the location for this picture in one or two short sentences understandable by a high school student",
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
{
|
|
98
|
+
output: z.object({
|
|
99
|
+
bird: z.boolean(),
|
|
100
|
+
species: z.string(),
|
|
101
|
+
location: z.string(),
|
|
102
|
+
}),
|
|
103
|
+
},
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
const { object } = response;
|
|
107
|
+
|
|
108
|
+
console.log("prompt claude response====", JSON.stringify(object, null, 2));
|
|
109
|
+
|
|
110
|
+
return { ok: true, data: object as BirdResponse };
|
|
111
|
+
} catch (err) {
|
|
112
|
+
console.error("Error prompting claude:", err);
|
|
113
|
+
return { ok: false, error: "Could not fetch image metadata" };
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### lib/mastra/system-tools.ts
|
|
120
|
+
```typescript
|
|
121
|
+
export type Image = {
|
|
122
|
+
alt_description: string;
|
|
123
|
+
urls: {
|
|
124
|
+
regular: string;
|
|
125
|
+
raw: string;
|
|
126
|
+
};
|
|
127
|
+
user: {
|
|
128
|
+
first_name: string;
|
|
129
|
+
links: {
|
|
130
|
+
html: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export type ImageResponse<T, K> =
|
|
136
|
+
| {
|
|
137
|
+
ok: true;
|
|
138
|
+
data: T;
|
|
139
|
+
}
|
|
140
|
+
| {
|
|
141
|
+
ok: false;
|
|
142
|
+
error: K;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export type ImageQuery = "wildlife" | "feathers" | "flying" | "birds";
|
|
146
|
+
|
|
147
|
+
export const getRandomImage = async ({
|
|
148
|
+
query,
|
|
149
|
+
}: {
|
|
150
|
+
query: ImageQuery;
|
|
151
|
+
}): Promise<ImageResponse<Image, string>> => {
|
|
152
|
+
const page = Math.floor(Math.random() * 20);
|
|
153
|
+
const order_by = Math.random() < 0.5 ? "relevant" : "latest";
|
|
154
|
+
try {
|
|
155
|
+
const res = await fetch(
|
|
156
|
+
`https://api.unsplash.com/search/photos?query=${query}&page=${page}&order_by=${order_by}`,
|
|
157
|
+
{
|
|
158
|
+
method: "GET",
|
|
159
|
+
headers: {
|
|
160
|
+
Authorization: `Client-ID ${process.env.NEXT_PUBLIC_UNSPLASH_ACCESS_KEY}`,
|
|
161
|
+
"Accept-Version": "v1",
|
|
162
|
+
},
|
|
163
|
+
cache: "no-store",
|
|
164
|
+
},
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
console.log("res in get_random_image api executor===", res);
|
|
168
|
+
|
|
169
|
+
if (!res.ok) {
|
|
170
|
+
return {
|
|
171
|
+
ok: false,
|
|
172
|
+
error: "Failed to fetch image",
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const data = (await res.json()) as {
|
|
177
|
+
results: Array<Image>;
|
|
178
|
+
};
|
|
179
|
+
const randomNo = Math.floor(Math.random() * data.results.length);
|
|
180
|
+
console.log("data ====", JSON.stringify(data.results[randomNo], null, 2));
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
ok: true,
|
|
184
|
+
data: data.results[randomNo] as Image,
|
|
185
|
+
};
|
|
186
|
+
} catch (err) {
|
|
187
|
+
console.log("Error in get_random_image api executor===", err);
|
|
188
|
+
return {
|
|
189
|
+
ok: false,
|
|
190
|
+
error: "Error fetching image",
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### lib/utils.ts
|
|
198
|
+
```typescript
|
|
199
|
+
import { clsx, type ClassValue } from "clsx";
|
|
200
|
+
import { twMerge } from "tailwind-merge";
|
|
201
|
+
|
|
202
|
+
export function cn(...inputs: ClassValue[]) {
|
|
203
|
+
return twMerge(clsx(inputs));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### mastra/agents/index.ts
|
|
209
|
+
```typescript
|
|
210
|
+
import { anthropic } from "@ai-sdk/anthropic";
|
|
211
|
+
import { Agent } from "@mastra/core/agent";
|
|
212
|
+
|
|
213
|
+
export const birdAgent = new Agent({
|
|
214
|
+
name: "Bird checker",
|
|
215
|
+
instructions:
|
|
216
|
+
"You can view an image and figure out if it is a bird or not. You can also figure out the species of the bird and where the picture was taken.",
|
|
217
|
+
model: anthropic("claude-3-haiku-20240307"),
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### mastra/index.ts
|
|
223
|
+
```typescript
|
|
224
|
+
import { Mastra } from "@mastra/core";
|
|
225
|
+
import { birdAgent } from "./agents";
|
|
226
|
+
|
|
227
|
+
export const mastra = new Mastra({
|
|
228
|
+
agents: { birdAgent },
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### mastra/tools/index.ts
|
|
234
|
+
```typescript
|
|
235
|
+
import { getRandomImage } from "@/lib/mastra/system-tools";
|
|
236
|
+
import { createTool } from "@mastra/core/tools";
|
|
237
|
+
import { z } from "zod";
|
|
238
|
+
|
|
239
|
+
export const getRandomImageTool = createTool({
|
|
240
|
+
id: "Get a random image from unsplash",
|
|
241
|
+
description: "Gets a random image from unsplash based on the selected option",
|
|
242
|
+
inputSchema: z.object({
|
|
243
|
+
query: z.enum(["wildlife", "feathers", "flying", "birds"]),
|
|
244
|
+
}),
|
|
245
|
+
execute: async ({ context }) => {
|
|
246
|
+
return getRandomImage(context);
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
### package.json
|
|
2
|
+
```json
|
|
3
|
+
{
|
|
4
|
+
"name": "examples-crypto-chatbot",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "next dev --turbo",
|
|
9
|
+
"build": "tsx db/migrate && next build",
|
|
10
|
+
"start": "next start",
|
|
11
|
+
"lint": "next lint",
|
|
12
|
+
"db:generate": "drizzle-kit generate",
|
|
13
|
+
"db:migrate": "npx tsx ./db/migrate.ts"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@ai-sdk/openai": "latest",
|
|
17
|
+
"@ai-sdk/react": "^1.1.21",
|
|
18
|
+
"@mastra/core": "workspace:^",
|
|
19
|
+
"@mastra/memory": "workspace:^",
|
|
20
|
+
"@mastra/pg": "workspace:^",
|
|
21
|
+
"@next/env": "^15.2.2",
|
|
22
|
+
"@radix-ui/react-alert-dialog": "^1.1.6",
|
|
23
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
24
|
+
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
25
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
26
|
+
"@radix-ui/react-label": "^2.1.2",
|
|
27
|
+
"@radix-ui/react-select": "^2.1.6",
|
|
28
|
+
"@radix-ui/react-separator": "^1.1.2",
|
|
29
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
30
|
+
"@radix-ui/react-tooltip": "^1.1.8",
|
|
31
|
+
"@radix-ui/react-visually-hidden": "^1.1.2",
|
|
32
|
+
"@vercel/analytics": "^1.5.0",
|
|
33
|
+
"@vercel/blob": "^0.24.1",
|
|
34
|
+
"@vercel/postgres": "^0.10.0",
|
|
35
|
+
"ai": "latest",
|
|
36
|
+
"bcrypt-ts": "^5.0.3",
|
|
37
|
+
"class-variance-authority": "^0.7.1",
|
|
38
|
+
"classnames": "^2.5.1",
|
|
39
|
+
"clsx": "^2.1.1",
|
|
40
|
+
"date-fns": "^4.1.0",
|
|
41
|
+
"diff-match-patch": "^1.0.5",
|
|
42
|
+
"dotenv": "^16.4.7",
|
|
43
|
+
"drizzle-orm": "^0.37.0",
|
|
44
|
+
"framer-motion": "^11.18.2",
|
|
45
|
+
"geist": "^1.3.1",
|
|
46
|
+
"lucide-react": "^0.446.0",
|
|
47
|
+
"next": "15.0.3-canary.2",
|
|
48
|
+
"next-auth": "5.0.0-beta.25",
|
|
49
|
+
"next-themes": "^0.3.0",
|
|
50
|
+
"orderedmap": "^2.1.1",
|
|
51
|
+
"pg": "^8.13.3",
|
|
52
|
+
"postgres": "^3.4.5",
|
|
53
|
+
"prosemirror-example-setup": "^1.2.3",
|
|
54
|
+
"prosemirror-inputrules": "^1.4.0",
|
|
55
|
+
"prosemirror-markdown": "^1.13.1",
|
|
56
|
+
"prosemirror-model": "^1.24.1",
|
|
57
|
+
"prosemirror-schema-basic": "^1.2.3",
|
|
58
|
+
"prosemirror-schema-list": "^1.5.1",
|
|
59
|
+
"prosemirror-state": "^1.4.3",
|
|
60
|
+
"prosemirror-view": "^1.38.1",
|
|
61
|
+
"react": "19.0.0-rc-45804af1-20241021",
|
|
62
|
+
"react-dom": "19.0.0-rc-45804af1-20241021",
|
|
63
|
+
"react-markdown": "^9.1.0",
|
|
64
|
+
"remark-gfm": "^4.0.1",
|
|
65
|
+
"server-only": "^0.0.1",
|
|
66
|
+
"sonner": "^1.7.4",
|
|
67
|
+
"swr": "^2.3.3",
|
|
68
|
+
"tailwind-merge": "^2.6.0",
|
|
69
|
+
"tailwindcss-animate": "^1.0.7",
|
|
70
|
+
"usehooks-ts": "^3.1.1",
|
|
71
|
+
"zod": "^3.24.2"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
75
|
+
"@types/d3-scale": "^4.0.9",
|
|
76
|
+
"@types/node": "^20.17.24",
|
|
77
|
+
"@types/pdf-parse": "^1.1.4",
|
|
78
|
+
"@types/react": "^19.0.10",
|
|
79
|
+
"@types/react-dom": "^19.0.4",
|
|
80
|
+
"drizzle-kit": "^0.25.0",
|
|
81
|
+
"eslint": "^8.57.1",
|
|
82
|
+
"eslint-config-next": "14.2.5",
|
|
83
|
+
"eslint-config-prettier": "^9.1.0",
|
|
84
|
+
"eslint-import-resolver-typescript": "^3.8.4",
|
|
85
|
+
"eslint-plugin-import": "^2.31.0",
|
|
86
|
+
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
87
|
+
"postcss": "^8.5.3",
|
|
88
|
+
"prettier": "^3.5.3",
|
|
89
|
+
"tailwindcss": "^3.4.17",
|
|
90
|
+
"tsx": "^4.19.3",
|
|
91
|
+
"typescript": "^5.8.2"
|
|
92
|
+
},
|
|
93
|
+
"version": "0.0.1"
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
```
|