@mastra/deployer 0.0.0-commonjs-20250227130920

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.
Files changed (86) hide show
  1. package/.turbo/turbo-build.log +41 -0
  2. package/CHANGELOG.md +897 -0
  3. package/LICENSE +44 -0
  4. package/README.md +159 -0
  5. package/dist/_tsup-dts-rollup.d.cts +360 -0
  6. package/dist/_tsup-dts-rollup.d.ts +360 -0
  7. package/dist/build/analyze.cjs +367 -0
  8. package/dist/build/analyze.d.cts +1 -0
  9. package/dist/build/analyze.d.ts +1 -0
  10. package/dist/build/analyze.js +2 -0
  11. package/dist/build/bundler.cjs +353 -0
  12. package/dist/build/bundler.d.cts +2 -0
  13. package/dist/build/bundler.d.ts +2 -0
  14. package/dist/build/bundler.js +2 -0
  15. package/dist/build/index.cjs +1146 -0
  16. package/dist/build/index.d.cts +10 -0
  17. package/dist/build/index.d.ts +10 -0
  18. package/dist/build/index.js +5 -0
  19. package/dist/bundler/index.cjs +999 -0
  20. package/dist/bundler/index.d.cts +1 -0
  21. package/dist/bundler/index.d.ts +1 -0
  22. package/dist/bundler/index.js +5 -0
  23. package/dist/chunk-3ONBKVC4.js +113 -0
  24. package/dist/chunk-AXS5WSIK.js +290 -0
  25. package/dist/chunk-DTSFVNIF.js +260 -0
  26. package/dist/chunk-JMH7HCD6.js +274 -0
  27. package/dist/chunk-SGK37ZWD.js +254 -0
  28. package/dist/chunk-YNXJO2XU.js +69 -0
  29. package/dist/index.cjs +1229 -0
  30. package/dist/index.d.cts +6 -0
  31. package/dist/index.d.ts +6 -0
  32. package/dist/index.js +131 -0
  33. package/dist/server/index.cjs +4930 -0
  34. package/dist/server/index.d.cts +2 -0
  35. package/dist/server/index.d.ts +2 -0
  36. package/dist/server/index.js +4923 -0
  37. package/dist/templates/instrumentation-template.js +86 -0
  38. package/eslint.config.js +6 -0
  39. package/global.d.ts +0 -0
  40. package/package.json +112 -0
  41. package/public/templates/instrumentation-template.js +86 -0
  42. package/src/build/analyze.ts +279 -0
  43. package/src/build/babel/fix-libsql.ts +41 -0
  44. package/src/build/babel/get-deployer.ts +54 -0
  45. package/src/build/babel/get-telemetry-config.ts +62 -0
  46. package/src/build/babel/remove-deployer.ts +43 -0
  47. package/src/build/bundle.ts +139 -0
  48. package/src/build/bundler.ts +135 -0
  49. package/src/build/deployer.ts +67 -0
  50. package/src/build/deps.ts +149 -0
  51. package/src/build/env.ts +76 -0
  52. package/src/build/fs.ts +66 -0
  53. package/src/build/index.ts +7 -0
  54. package/src/build/isNodeBuiltin.ts +7 -0
  55. package/src/build/plugins/fix-libsql.ts +69 -0
  56. package/src/build/plugins/hono-alias.ts +17 -0
  57. package/src/build/plugins/pino.ts +93 -0
  58. package/src/build/plugins/remove-deployer.ts +37 -0
  59. package/src/build/plugins/telemetry-fix.ts +54 -0
  60. package/src/build/telemetry.ts +76 -0
  61. package/src/build/utils.ts +12 -0
  62. package/src/build/watcher.ts +43 -0
  63. package/src/bundler/index.ts +144 -0
  64. package/src/deploy/base.ts +30 -0
  65. package/src/deploy/index.ts +2 -0
  66. package/src/deploy/log.ts +61 -0
  67. package/src/index.ts +3 -0
  68. package/src/server/handlers/agents.ts +209 -0
  69. package/src/server/handlers/client.ts +36 -0
  70. package/src/server/handlers/error.ts +29 -0
  71. package/src/server/handlers/logs.ts +53 -0
  72. package/src/server/handlers/memory.ts +196 -0
  73. package/src/server/handlers/prompt.ts +128 -0
  74. package/src/server/handlers/root.ts +6 -0
  75. package/src/server/handlers/telemetry.ts +48 -0
  76. package/src/server/handlers/tools.ts +114 -0
  77. package/src/server/handlers/utils.ts +15 -0
  78. package/src/server/handlers/vector.ts +149 -0
  79. package/src/server/handlers/workflows.ts +119 -0
  80. package/src/server/index.ts +1355 -0
  81. package/src/server/openapi.json +434 -0
  82. package/src/server/openapi.script.js +22 -0
  83. package/src/server/types.ts +4 -0
  84. package/src/server/welcome.ts +105 -0
  85. package/tsconfig.json +5 -0
  86. package/vitest.config.ts +8 -0
@@ -0,0 +1,434 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": { "title": "Mastra API", "description": "Mastra API", "version": "1.0.0" },
4
+ "paths": {
5
+ "/api": {
6
+ "get": {
7
+ "responses": { "200": { "description": "Success" } },
8
+ "operationId": "getApi",
9
+ "description": "Get API status",
10
+ "tags": ["system"]
11
+ }
12
+ },
13
+ "/api/agents": {
14
+ "get": {
15
+ "responses": { "200": { "description": "List of all agents" } },
16
+ "operationId": "getApiAgents",
17
+ "description": "Get all available agents",
18
+ "tags": ["agents"]
19
+ }
20
+ },
21
+ "/api/agents/{agentId}": {
22
+ "get": {
23
+ "responses": { "200": { "description": "Agent details" }, "404": { "description": "Agent not found" } },
24
+ "operationId": "getApiAgentsByAgentId",
25
+ "description": "Get agent by ID",
26
+ "tags": ["agents"],
27
+ "parameters": [{ "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } }]
28
+ }
29
+ },
30
+ "/api/agents/{agentId}/evals/ci": {
31
+ "get": {
32
+ "responses": { "200": { "description": "List of evals" } },
33
+ "operationId": "getApiAgentsByAgentIdEvalsCi",
34
+ "description": "Get CI evals by agent ID",
35
+ "tags": ["agents"],
36
+ "parameters": [{ "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } }]
37
+ }
38
+ },
39
+ "/api/agents/{agentId}/evals/live": {
40
+ "get": {
41
+ "responses": { "200": { "description": "List of evals" } },
42
+ "operationId": "getApiAgentsByAgentIdEvalsLive",
43
+ "description": "Get live evals by agent ID",
44
+ "tags": ["agents"],
45
+ "parameters": [{ "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } }]
46
+ }
47
+ },
48
+ "/api/agents/{agentId}/generate": {
49
+ "post": {
50
+ "responses": { "200": { "description": "Generated response" }, "404": { "description": "Agent not found" } },
51
+ "operationId": "postApiAgentsByAgentIdGenerate",
52
+ "description": "Generate a response from an agent",
53
+ "tags": ["agents"],
54
+ "parameters": [{ "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } }],
55
+ "requestBody": {
56
+ "required": true,
57
+ "content": {
58
+ "application/json": {
59
+ "schema": {
60
+ "type": "object",
61
+ "properties": {
62
+ "messages": { "type": "array", "items": { "type": "object" } },
63
+ "threadId": { "type": "string" },
64
+ "resourceId": { "type": "string", "description": "The resource ID for the conversation" },
65
+ "resourceid": { "type": "string", "description": "The resource ID for the conversation (deprecated, use resourceId instead)", "deprecated": true },
66
+ "output": { "type": "object" }
67
+ },
68
+ "required": ["messages"]
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "/api/agents/{agentId}/stream": {
76
+ "post": {
77
+ "responses": { "200": { "description": "Streamed response" }, "404": { "description": "Agent not found" } },
78
+ "operationId": "postApiAgentsByAgentIdStream",
79
+ "description": "Stream a response from an agent",
80
+ "tags": ["agents"],
81
+ "parameters": [{ "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } }],
82
+ "requestBody": {
83
+ "required": true,
84
+ "content": {
85
+ "application/json": {
86
+ "schema": {
87
+ "type": "object",
88
+ "properties": {
89
+ "messages": { "type": "array", "items": { "type": "object" } },
90
+ "threadId": { "type": "string" },
91
+ "resourceId": { "type": "string", "description": "The resource ID for the conversation" },
92
+ "resourceid": { "type": "string", "description": "The resource ID for the conversation (deprecated, use resourceId instead)", "deprecated": true },
93
+ "output": { "type": "object" }
94
+ },
95
+ "required": ["messages"]
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "/api/agents/{agentId}/tools/{toolId}/execute": {
103
+ "post": {
104
+ "responses": {
105
+ "200": { "description": "Tool execution result" },
106
+ "404": { "description": "Tool or agent not found" }
107
+ },
108
+ "operationId": "postApiAgentsByAgentIdToolsByToolIdExecute",
109
+ "description": "Execute a tool through an agent",
110
+ "tags": ["agents"],
111
+ "parameters": [
112
+ { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string" } },
113
+ { "name": "toolId", "in": "path", "required": true, "schema": { "type": "string" } }
114
+ ],
115
+ "requestBody": {
116
+ "required": true,
117
+ "content": {
118
+ "application/json": {
119
+ "schema": {
120
+ "type": "object",
121
+ "properties": {
122
+ "args": { "type": "object" },
123
+ "threadId": { "type": "string" },
124
+ "resourceid": { "type": "string" }
125
+ },
126
+ "required": ["args"]
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "/api/memory/status": {
134
+ "get": {
135
+ "responses": { "200": { "description": "Memory status" } },
136
+ "operationId": "getApiMemoryStatus",
137
+ "description": "Get memory status",
138
+ "tags": ["memory"]
139
+ }
140
+ },
141
+ "/api/memory/threads": {
142
+ "get": {
143
+ "responses": { "200": { "description": "List of all threads" } },
144
+ "operationId": "getApiMemoryThreads",
145
+ "description": "Get all threads",
146
+ "tags": ["memory"],
147
+ "parameters": [{ "name": "resourceid", "in": "query", "required": true, "schema": { "type": "string" } }]
148
+ },
149
+ "post": {
150
+ "responses": { "200": { "description": "Created thread" } },
151
+ "operationId": "postApiMemoryThreads",
152
+ "description": "Create a new thread",
153
+ "tags": ["memory"],
154
+ "requestBody": {
155
+ "required": true,
156
+ "content": {
157
+ "application/json": {
158
+ "schema": {
159
+ "type": "object",
160
+ "properties": {
161
+ "title": { "type": "string" },
162
+ "metadata": { "type": "object" },
163
+ "resourceid": { "type": "string" },
164
+ "threadId": { "type": "string" }
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "/api/memory/threads/{threadId}": {
173
+ "get": {
174
+ "responses": { "200": { "description": "Thread details" }, "404": { "description": "Thread not found" } },
175
+ "operationId": "getApiMemoryThreadsByThreadId",
176
+ "description": "Get thread by ID",
177
+ "tags": ["memory"],
178
+ "parameters": [{ "name": "threadId", "in": "path", "required": true, "schema": { "type": "string" } }]
179
+ },
180
+ "patch": {
181
+ "responses": { "200": { "description": "Updated thread" }, "404": { "description": "Thread not found" } },
182
+ "operationId": "patchApiMemoryThreadsByThreadId",
183
+ "description": "Update a thread",
184
+ "tags": ["memory"],
185
+ "parameters": [{ "name": "threadId", "in": "path", "required": true, "schema": { "type": "string" } }],
186
+ "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object" } } } }
187
+ },
188
+ "delete": {
189
+ "responses": { "200": { "description": "Thread deleted" }, "404": { "description": "Thread not found" } },
190
+ "operationId": "deleteApiMemoryThreadsByThreadId",
191
+ "description": "Delete a thread",
192
+ "tags": ["memory"],
193
+ "parameters": [{ "name": "threadId", "in": "path", "required": true, "schema": { "type": "string" } }]
194
+ }
195
+ },
196
+ "/api/memory/threads/{threadId}/messages": {
197
+ "get": {
198
+ "responses": { "200": { "description": "List of messages" } },
199
+ "operationId": "getApiMemoryThreadsByThreadIdMessages",
200
+ "description": "Get messages for a thread",
201
+ "tags": ["memory"],
202
+ "parameters": [{ "name": "threadId", "in": "path", "required": true, "schema": { "type": "string" } }]
203
+ }
204
+ },
205
+ "/api/memory/save-messages": {
206
+ "post": {
207
+ "responses": { "200": { "description": "Messages saved" } },
208
+ "operationId": "postApiMemorySave-messages",
209
+ "description": "Save messages",
210
+ "tags": ["memory"],
211
+ "requestBody": {
212
+ "required": true,
213
+ "content": {
214
+ "application/json": {
215
+ "schema": {
216
+ "type": "object",
217
+ "properties": { "messages": { "type": "array", "items": { "type": "object" } } },
218
+ "required": ["messages"]
219
+ }
220
+ }
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "/api/workflows": {
226
+ "get": {
227
+ "responses": { "200": { "description": "List of all workflows" } },
228
+ "operationId": "getApiWorkflows",
229
+ "description": "Get all workflows",
230
+ "tags": ["workflows"]
231
+ }
232
+ },
233
+ "/api/workflows/{workflowId}": {
234
+ "get": {
235
+ "responses": { "200": { "description": "Workflow details" }, "404": { "description": "Workflow not found" } },
236
+ "operationId": "getApiWorkflowsByWorkflowId",
237
+ "description": "Get workflow by ID",
238
+ "tags": ["workflows"],
239
+ "parameters": [{ "name": "workflowId", "in": "path", "required": true, "schema": { "type": "string" } }]
240
+ }
241
+ },
242
+ "/api/workflows/{workflowId}/execute": {
243
+ "post": {
244
+ "responses": {
245
+ "200": { "description": "Workflow execution result" },
246
+ "404": { "description": "Workflow not found" }
247
+ },
248
+ "operationId": "postApiWorkflowsByWorkflowIdExecute",
249
+ "description": "Execute a workflow",
250
+ "tags": ["workflows"],
251
+ "parameters": [{ "name": "workflowId", "in": "path", "required": true, "schema": { "type": "string" } }],
252
+ "requestBody": {
253
+ "required": true,
254
+ "content": {
255
+ "application/json": { "schema": { "type": "object", "properties": { "input": { "type": "object" } } } }
256
+ }
257
+ }
258
+ }
259
+ },
260
+ "/api/logs": {
261
+ "get": {
262
+ "responses": { "200": { "description": "List of all logs" } },
263
+ "operationId": "getApiLogs",
264
+ "description": "Get all logs",
265
+ "tags": ["logs"],
266
+ "parameters": [{ "name": "transportId", "in": "query", "required": true, "schema": { "type": "string" } }]
267
+ }
268
+ },
269
+ "/api/logs/{runId}": {
270
+ "get": {
271
+ "responses": { "200": { "description": "List of logs for run ID" } },
272
+ "operationId": "getApiLogsByRunId",
273
+ "description": "Get logs by run ID",
274
+ "tags": ["logs"],
275
+ "parameters": [
276
+ { "name": "runId", "in": "path", "required": true, "schema": { "type": "string" } },
277
+ { "name": "transportId", "in": "query", "required": true, "schema": { "type": "string" } }
278
+ ]
279
+ }
280
+ },
281
+ "/api/tools": {
282
+ "get": {
283
+ "responses": { "200": { "description": "List of all tools" } },
284
+ "operationId": "getApiTools",
285
+ "description": "Get all tools",
286
+ "tags": ["tools"]
287
+ }
288
+ },
289
+ "/api/tools/{toolId}": {
290
+ "get": {
291
+ "responses": { "200": { "description": "Tool details" }, "404": { "description": "Tool not found" } },
292
+ "operationId": "getApiToolsByToolId",
293
+ "description": "Get tool by ID",
294
+ "tags": ["tools"],
295
+ "parameters": [{ "name": "toolId", "in": "path", "required": true, "schema": { "type": "string" } }]
296
+ }
297
+ },
298
+ "/api/tools/{toolId}/execute": {
299
+ "post": {
300
+ "responses": { "200": { "description": "Tool execution result" }, "404": { "description": "Tool not found" } },
301
+ "operationId": "postApiToolsByToolIdExecute",
302
+ "description": "Execute a tool",
303
+ "tags": ["tools"],
304
+ "parameters": [{ "name": "toolId", "in": "path", "required": true, "schema": { "type": "string" } }],
305
+ "requestBody": {
306
+ "required": true,
307
+ "content": {
308
+ "application/json": {
309
+ "schema": {
310
+ "type": "object",
311
+ "properties": {
312
+ "args": { "type": "object" },
313
+ "threadId": { "type": "string" },
314
+ "resourceid": { "type": "string" }
315
+ },
316
+ "required": ["args"]
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ },
323
+ "/api/vector/{vectorName}/upsert": {
324
+ "post": {
325
+ "responses": { "200": { "description": "Vectors upserted successfully" } },
326
+ "operationId": "postApiVectorByVectorNameUpsert",
327
+ "description": "Upsert vectors into an index",
328
+ "tags": ["vector"],
329
+ "parameters": [{ "name": "vectorName", "in": "path", "required": true, "schema": { "type": "string" } }],
330
+ "requestBody": {
331
+ "required": true,
332
+ "content": {
333
+ "application/json": {
334
+ "schema": {
335
+ "type": "object",
336
+ "properties": {
337
+ "indexName": { "type": "string" },
338
+ "vectors": { "type": "array", "items": { "type": "array", "items": { "type": "number" } } },
339
+ "metadata": { "type": "array", "items": { "type": "object" } },
340
+ "ids": { "type": "array", "items": { "type": "string" } }
341
+ },
342
+ "required": ["indexName", "vectors"]
343
+ }
344
+ }
345
+ }
346
+ }
347
+ }
348
+ },
349
+ "/api/vector/{vectorName}/create-index": {
350
+ "post": {
351
+ "responses": { "200": { "description": "Index created successfully" } },
352
+ "operationId": "postApiVectorByVectorNameCreate-index",
353
+ "description": "Create a new vector index",
354
+ "tags": ["vector"],
355
+ "parameters": [{ "name": "vectorName", "in": "path", "required": true, "schema": { "type": "string" } }],
356
+ "requestBody": {
357
+ "required": true,
358
+ "content": {
359
+ "application/json": {
360
+ "schema": {
361
+ "type": "object",
362
+ "properties": {
363
+ "indexName": { "type": "string" },
364
+ "dimension": { "type": "number" },
365
+ "metric": { "type": "string", "enum": ["cosine", "euclidean", "dotproduct"] }
366
+ },
367
+ "required": ["indexName", "dimension"]
368
+ }
369
+ }
370
+ }
371
+ }
372
+ }
373
+ },
374
+ "/api/vector/{vectorName}/query": {
375
+ "post": {
376
+ "responses": { "200": { "description": "Query results" } },
377
+ "operationId": "postApiVectorByVectorNameQuery",
378
+ "description": "Query vectors from an index",
379
+ "tags": ["vector"],
380
+ "parameters": [{ "name": "vectorName", "in": "path", "required": true, "schema": { "type": "string" } }],
381
+ "requestBody": {
382
+ "required": true,
383
+ "content": {
384
+ "application/json": {
385
+ "schema": {
386
+ "type": "object",
387
+ "properties": {
388
+ "indexName": { "type": "string" },
389
+ "queryVector": { "type": "array", "items": { "type": "number" } },
390
+ "topK": { "type": "number" },
391
+ "filter": { "type": "object" },
392
+ "includeVector": { "type": "boolean" }
393
+ },
394
+ "required": ["indexName", "queryVector"]
395
+ }
396
+ }
397
+ }
398
+ }
399
+ }
400
+ },
401
+ "/api/vector/{vectorName}/indexes": {
402
+ "get": {
403
+ "responses": { "200": { "description": "List of indexes" } },
404
+ "operationId": "getApiVectorByVectorNameIndexes",
405
+ "description": "List all indexes for a vector store",
406
+ "tags": ["vector"],
407
+ "parameters": [{ "name": "vectorName", "in": "path", "required": true, "schema": { "type": "string" } }]
408
+ }
409
+ },
410
+ "/api/vector/{vectorName}/indexes/{indexName}": {
411
+ "get": {
412
+ "responses": { "200": { "description": "Index details" } },
413
+ "operationId": "getApiVectorByVectorNameIndexesByIndexName",
414
+ "description": "Get details about a specific index",
415
+ "tags": ["vector"],
416
+ "parameters": [
417
+ { "name": "vectorName", "in": "path", "required": true, "schema": { "type": "string" } },
418
+ { "name": "indexName", "in": "path", "required": true, "schema": { "type": "string" } }
419
+ ]
420
+ },
421
+ "delete": {
422
+ "responses": { "200": { "description": "Index deleted successfully" } },
423
+ "operationId": "deleteApiVectorByVectorNameIndexesByIndexName",
424
+ "description": "Delete a specific index",
425
+ "tags": ["vector"],
426
+ "parameters": [
427
+ { "name": "vectorName", "in": "path", "required": true, "schema": { "type": "string" } },
428
+ { "name": "indexName", "in": "path", "required": true, "schema": { "type": "string" } }
429
+ ]
430
+ }
431
+ }
432
+ },
433
+ "components": { "schemas": {} }
434
+ }
@@ -0,0 +1,22 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = path.dirname(__filename);
7
+
8
+ async function pullOpenApiSpec() {
9
+ try {
10
+ const response = await fetch('http://localhost:4111/openapi.json');
11
+ const text = await response.text();
12
+ const outputPath = path.join(__dirname, 'openapi.json');
13
+
14
+ fs.writeFileSync(outputPath, text);
15
+ console.log('Successfully pulled and saved OpenAPI spec');
16
+ } catch (error) {
17
+ console.error('Failed to pull OpenAPI spec:', error);
18
+ process.exit(1);
19
+ }
20
+ }
21
+
22
+ pullOpenApiSpec();
@@ -0,0 +1,4 @@
1
+ export interface ApiError extends Error {
2
+ message: string;
3
+ status?: number;
4
+ }
@@ -0,0 +1,105 @@
1
+ export const html = `
2
+ <!doctype html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Welcome to Mastra</title>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/inter-ui/3.19.3/inter.min.css" />
9
+ <style>
10
+ body {
11
+ margin: 0;
12
+ padding: 0;
13
+ background-color: #0d0d0d;
14
+ color: #ffffff;
15
+ font-family:
16
+ 'Inter',
17
+ -apple-system,
18
+ BlinkMacSystemFont,
19
+ system-ui,
20
+ sans-serif;
21
+ min-height: 100vh;
22
+ display: flex;
23
+ flex-direction: column;
24
+ }
25
+
26
+ main {
27
+ flex: 1;
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: center;
32
+ padding: 2rem;
33
+ text-align: center;
34
+ }
35
+
36
+ h1 {
37
+ font-size: 4rem;
38
+ font-weight: 600;
39
+ margin: 0 0 1rem 0;
40
+ background: linear-gradient(to right, #fff, #ccc);
41
+ -webkit-background-clip: text;
42
+ -webkit-text-fill-color: transparent;
43
+ line-height: 1.2;
44
+ }
45
+
46
+ .subtitle {
47
+ color: #9ca3af;
48
+ font-size: 1.25rem;
49
+ max-width: 600px;
50
+ margin: 0 auto 3rem auto;
51
+ line-height: 1.6;
52
+ }
53
+
54
+ .docs-link {
55
+ background-color: #1a1a1a;
56
+ padding: 1rem 2rem;
57
+ border-radius: 0.5rem;
58
+ display: flex;
59
+ align-items: center;
60
+ gap: 1rem;
61
+ font-family: monospace;
62
+ font-size: 1rem;
63
+ color: #ffffff;
64
+ text-decoration: none;
65
+ transition: background-color 0.2s;
66
+ }
67
+
68
+ .docs-link:hover {
69
+ background-color: #252525;
70
+ }
71
+
72
+ .arrow-icon {
73
+ transition: transform 0.2s;
74
+ }
75
+
76
+ .docs-link:hover .arrow-icon {
77
+ transform: translateX(4px);
78
+ }
79
+ </style>
80
+ </head>
81
+ <body>
82
+ <main>
83
+ <h1>Welcome to Mastra</h1>
84
+ <p class="subtitle">
85
+ From the team that brought you Gatsby: prototype and productionize AI features with a modern JS/TS stack.
86
+ </p>
87
+
88
+ <a href="https://mastra.ai/docs" class="docs-link">
89
+ Browse the docs
90
+ <svg
91
+ class="arrow-icon"
92
+ width="20"
93
+ height="20"
94
+ viewBox="0 0 24 24"
95
+ fill="none"
96
+ stroke="currentColor"
97
+ stroke-width="2"
98
+ >
99
+ <path d="M5 12h14M12 5l7 7-7 7" />
100
+ </svg>
101
+ </a>
102
+ </main>
103
+ </body>
104
+ </html>
105
+ `;
package/tsconfig.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "../../tsconfig.node.json",
3
+ "include": ["./global.d.ts", "src/**/*"],
4
+ "exclude": ["node_modules", "**/*.test.ts"]
5
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ environment: 'node',
6
+ include: ['src/**/*.test.ts'],
7
+ },
8
+ });