@mastra/core 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 (137) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +180 -0
  3. package/dist/agent/index.cjs +1865 -0
  4. package/dist/agent/index.d.cts +15 -0
  5. package/dist/agent/index.d.ts +15 -0
  6. package/dist/agent/index.js +1 -0
  7. package/dist/base-D90KQ4XI.d.ts +139 -0
  8. package/dist/base-hs9NDAZ2.d.cts +139 -0
  9. package/dist/base-nKCMCNrM.d.ts +920 -0
  10. package/dist/base-nhesrHv3.d.cts +920 -0
  11. package/dist/base.cjs +138 -0
  12. package/dist/base.d.cts +6 -0
  13. package/dist/base.d.ts +6 -0
  14. package/dist/base.js +1 -0
  15. package/dist/bundler/index.cjs +158 -0
  16. package/dist/bundler/index.d.cts +28 -0
  17. package/dist/bundler/index.d.ts +28 -0
  18. package/dist/bundler/index.js +1 -0
  19. package/dist/chunk-33GSTUNK.js +620 -0
  20. package/dist/chunk-4YRYBCOZ.js +10 -0
  21. package/dist/chunk-55NFNRKO.js +10 -0
  22. package/dist/chunk-5XPCMNGW.js +215 -0
  23. package/dist/chunk-B3M27AMP.js +1479 -0
  24. package/dist/chunk-BB4KXGBU.js +83 -0
  25. package/dist/chunk-C6A6W6XS.js +77 -0
  26. package/dist/chunk-HQ55LN2U.js +318 -0
  27. package/dist/chunk-KNVTCZW7.js +416 -0
  28. package/dist/chunk-LH47WVJL.js +61 -0
  29. package/dist/chunk-NGD2HQYW.js +346 -0
  30. package/dist/chunk-NUDAZEOG.js +35 -0
  31. package/dist/chunk-OZ4XVJ6F.js +49 -0
  32. package/dist/chunk-PHMSPCTC.js +145 -0
  33. package/dist/chunk-PNZK456O.js +88 -0
  34. package/dist/chunk-QAAJAHDB.js +37 -0
  35. package/dist/chunk-RG66XEJT.js +8 -0
  36. package/dist/chunk-SIFBBGY6.js +190 -0
  37. package/dist/chunk-SVEAENO7.js +22 -0
  38. package/dist/chunk-SY5244IR.js +1499 -0
  39. package/dist/chunk-W5HVJX45.js +402 -0
  40. package/dist/chunk-WIBGG4X6.js +173 -0
  41. package/dist/chunk-ZDWFBE5L.js +1 -0
  42. package/dist/chunk-ZINPRHAN.js +22 -0
  43. package/dist/deployer/index.cjs +165 -0
  44. package/dist/deployer/index.d.cts +19 -0
  45. package/dist/deployer/index.d.ts +19 -0
  46. package/dist/deployer/index.js +1 -0
  47. package/dist/eval/index.cjs +110 -0
  48. package/dist/eval/index.d.cts +28 -0
  49. package/dist/eval/index.d.ts +28 -0
  50. package/dist/eval/index.js +1 -0
  51. package/dist/filter/index.cjs +192 -0
  52. package/dist/filter/index.d.cts +90 -0
  53. package/dist/filter/index.d.ts +90 -0
  54. package/dist/filter/index.js +1 -0
  55. package/dist/hooks/index.cjs +87 -0
  56. package/dist/hooks/index.d.cts +33 -0
  57. package/dist/hooks/index.d.ts +33 -0
  58. package/dist/hooks/index.js +1 -0
  59. package/dist/index-mKY1XrpK.d.cts +90 -0
  60. package/dist/index-mKY1XrpK.d.ts +90 -0
  61. package/dist/index.cjs +6844 -0
  62. package/dist/index.d.cts +97 -0
  63. package/dist/index.d.ts +97 -0
  64. package/dist/index.js +119 -0
  65. package/dist/integration/index.cjs +113 -0
  66. package/dist/integration/index.d.cts +52 -0
  67. package/dist/integration/index.d.ts +52 -0
  68. package/dist/integration/index.js +1 -0
  69. package/dist/llm/index.cjs +2 -0
  70. package/dist/llm/index.d.cts +15 -0
  71. package/dist/llm/index.d.ts +15 -0
  72. package/dist/llm/index.js +1 -0
  73. package/dist/logger/index.cjs +159 -0
  74. package/dist/logger/index.d.cts +3 -0
  75. package/dist/logger/index.d.ts +3 -0
  76. package/dist/logger/index.js +1 -0
  77. package/dist/mastra/index.cjs +1741 -0
  78. package/dist/mastra/index.d.cts +67 -0
  79. package/dist/mastra/index.d.ts +67 -0
  80. package/dist/mastra/index.js +1 -0
  81. package/dist/memory/index.cjs +1907 -0
  82. package/dist/memory/index.d.cts +15 -0
  83. package/dist/memory/index.d.ts +15 -0
  84. package/dist/memory/index.js +1 -0
  85. package/dist/relevance/index.cjs +1927 -0
  86. package/dist/relevance/index.d.cts +21 -0
  87. package/dist/relevance/index.d.ts +21 -0
  88. package/dist/relevance/index.js +1 -0
  89. package/dist/storage/index.cjs +361 -0
  90. package/dist/storage/index.d.cts +15 -0
  91. package/dist/storage/index.d.ts +15 -0
  92. package/dist/storage/index.js +2 -0
  93. package/dist/storage/libsql/index.cjs +770 -0
  94. package/dist/storage/libsql/index.d.cts +81 -0
  95. package/dist/storage/libsql/index.d.ts +81 -0
  96. package/dist/storage/libsql/index.js +1 -0
  97. package/dist/telemetry/index.cjs +413 -0
  98. package/dist/telemetry/index.d.cts +51 -0
  99. package/dist/telemetry/index.d.ts +51 -0
  100. package/dist/telemetry/index.js +1 -0
  101. package/dist/telemetry/otel-vendor.cjs +52 -0
  102. package/dist/telemetry/otel-vendor.d.cts +7 -0
  103. package/dist/telemetry/otel-vendor.d.ts +7 -0
  104. package/dist/telemetry/otel-vendor.js +7 -0
  105. package/dist/tools/index.cjs +25 -0
  106. package/dist/tools/index.d.cts +29 -0
  107. package/dist/tools/index.d.ts +29 -0
  108. package/dist/tools/index.js +1 -0
  109. package/dist/tts/index.cjs +328 -0
  110. package/dist/tts/index.d.cts +28 -0
  111. package/dist/tts/index.d.ts +28 -0
  112. package/dist/tts/index.js +1 -0
  113. package/dist/types-m9RryK9a.d.cts +14 -0
  114. package/dist/types-m9RryK9a.d.ts +14 -0
  115. package/dist/utils.cjs +179 -0
  116. package/dist/utils.d.cts +26 -0
  117. package/dist/utils.d.ts +26 -0
  118. package/dist/utils.js +1 -0
  119. package/dist/vector/index.cjs +145 -0
  120. package/dist/vector/index.d.cts +30 -0
  121. package/dist/vector/index.d.ts +30 -0
  122. package/dist/vector/index.js +1 -0
  123. package/dist/vector/libsql/index.cjs +951 -0
  124. package/dist/vector/libsql/index.d.cts +29 -0
  125. package/dist/vector/libsql/index.d.ts +29 -0
  126. package/dist/vector/libsql/index.js +1 -0
  127. package/dist/voice/index.cjs +369 -0
  128. package/dist/voice/index.d.cts +67 -0
  129. package/dist/voice/index.d.ts +67 -0
  130. package/dist/voice/index.js +76 -0
  131. package/dist/workflow-DqQ4pON_.d.cts +84 -0
  132. package/dist/workflow-Ng_F_Zaf.d.ts +84 -0
  133. package/dist/workflows/index.cjs +1628 -0
  134. package/dist/workflows/index.d.cts +48 -0
  135. package/dist/workflows/index.d.ts +48 -0
  136. package/dist/workflows/index.js +1 -0
  137. package/package.json +162 -0
@@ -0,0 +1,48 @@
1
+ export { S as Step, W as Workflow, c as createStep } from '../workflow-DqQ4pON_.cjs';
2
+ import { X as VariableReference, h as StepResult } from '../base-nhesrHv3.cjs';
3
+ export { Z as ActionContext, Y as BaseCondition, a6 as DependencyCheckOutput, ac as ExtractSchemaFromStep, af as ExtractSchemaType, ad as ExtractStepResult, ag as PathsToStringProps, a3 as ResolverFunctionInput, a4 as ResolverFunctionOutput, R as RetryConfig, f as StepAction, $ as StepCondition, j as StepConfig, _ as StepDef, e as StepExecutionContext, l as StepGraph, ab as StepId, ae as StepInputType, V as StepNode, i as StepVariableType, a5 as SubscriberFunctionOutput, a8 as WorkflowActionParams, a9 as WorkflowActions, a7 as WorkflowActors, a0 as WorkflowContext, a2 as WorkflowEvent, a1 as WorkflowLogMessage, W as WorkflowOptions, ah as WorkflowResumeResult, k as WorkflowRunState, aa as WorkflowState } from '../base-nhesrHv3.cjs';
4
+ import '@opentelemetry/api';
5
+ import 'zod';
6
+ import '../base-hs9NDAZ2.cjs';
7
+ import '../index-mKY1XrpK.cjs';
8
+ import 'stream';
9
+ import 'pino';
10
+ import '@opentelemetry/sdk-trace-base';
11
+ import 'ai';
12
+ import 'sift';
13
+ import 'json-schema';
14
+ import '../types-m9RryK9a.cjs';
15
+ import '../vector/index.cjs';
16
+ import '../voice/index.cjs';
17
+ import '../tts/index.cjs';
18
+
19
+ declare function isErrorEvent(stateEvent: any): stateEvent is {
20
+ type: `xstate.error.actor.${string}`;
21
+ error: Error;
22
+ };
23
+ declare function isTransitionEvent(stateEvent: any): stateEvent is {
24
+ type: `xstate.done.actor.${string}`;
25
+ output?: unknown;
26
+ };
27
+ declare function isVariableReference(value: any): value is VariableReference<any, any>;
28
+ declare function getStepResult(result?: StepResult<any>): any;
29
+ declare function getSuspendedPaths({ value, path, suspendedPaths, }: {
30
+ value: string | Record<string, string>;
31
+ path: string;
32
+ suspendedPaths: Set<string>;
33
+ }): void;
34
+ declare function isFinalState(status: string): boolean;
35
+ declare function recursivelyCheckForFinalState({ value, suspendedPaths, path, }: {
36
+ value: string | Record<string, string>;
37
+ suspendedPaths: Set<string>;
38
+ path: string;
39
+ }): boolean;
40
+ declare function getActivePathsAndStatus(value: Record<string, any>): Array<{
41
+ stepPath: string[];
42
+ stepId: string;
43
+ status: string;
44
+ }>;
45
+ declare function mergeChildValue(startStepId: string, parent: Record<string, any>, child: Record<string, any>): Record<string, any>;
46
+ declare const updateStepInHierarchy: (value: Record<string, any>, targetStepId: string) => Record<string, any>;
47
+
48
+ export { StepResult, VariableReference, getActivePathsAndStatus, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy };
@@ -0,0 +1,48 @@
1
+ export { S as Step, W as Workflow, c as createStep } from '../workflow-Ng_F_Zaf.js';
2
+ import { X as VariableReference, h as StepResult } from '../base-nKCMCNrM.js';
3
+ export { Z as ActionContext, Y as BaseCondition, a6 as DependencyCheckOutput, ac as ExtractSchemaFromStep, af as ExtractSchemaType, ad as ExtractStepResult, ag as PathsToStringProps, a3 as ResolverFunctionInput, a4 as ResolverFunctionOutput, R as RetryConfig, f as StepAction, $ as StepCondition, j as StepConfig, _ as StepDef, e as StepExecutionContext, l as StepGraph, ab as StepId, ae as StepInputType, V as StepNode, i as StepVariableType, a5 as SubscriberFunctionOutput, a8 as WorkflowActionParams, a9 as WorkflowActions, a7 as WorkflowActors, a0 as WorkflowContext, a2 as WorkflowEvent, a1 as WorkflowLogMessage, W as WorkflowOptions, ah as WorkflowResumeResult, k as WorkflowRunState, aa as WorkflowState } from '../base-nKCMCNrM.js';
4
+ import '@opentelemetry/api';
5
+ import 'zod';
6
+ import '../base-D90KQ4XI.js';
7
+ import '../index-mKY1XrpK.js';
8
+ import 'stream';
9
+ import 'pino';
10
+ import '@opentelemetry/sdk-trace-base';
11
+ import 'ai';
12
+ import 'sift';
13
+ import 'json-schema';
14
+ import '../types-m9RryK9a.js';
15
+ import '../vector/index.js';
16
+ import '../voice/index.js';
17
+ import '../tts/index.js';
18
+
19
+ declare function isErrorEvent(stateEvent: any): stateEvent is {
20
+ type: `xstate.error.actor.${string}`;
21
+ error: Error;
22
+ };
23
+ declare function isTransitionEvent(stateEvent: any): stateEvent is {
24
+ type: `xstate.done.actor.${string}`;
25
+ output?: unknown;
26
+ };
27
+ declare function isVariableReference(value: any): value is VariableReference<any, any>;
28
+ declare function getStepResult(result?: StepResult<any>): any;
29
+ declare function getSuspendedPaths({ value, path, suspendedPaths, }: {
30
+ value: string | Record<string, string>;
31
+ path: string;
32
+ suspendedPaths: Set<string>;
33
+ }): void;
34
+ declare function isFinalState(status: string): boolean;
35
+ declare function recursivelyCheckForFinalState({ value, suspendedPaths, path, }: {
36
+ value: string | Record<string, string>;
37
+ suspendedPaths: Set<string>;
38
+ path: string;
39
+ }): boolean;
40
+ declare function getActivePathsAndStatus(value: Record<string, any>): Array<{
41
+ stepPath: string[];
42
+ stepId: string;
43
+ status: string;
44
+ }>;
45
+ declare function mergeChildValue(startStepId: string, parent: Record<string, any>, child: Record<string, any>): Record<string, any>;
46
+ declare const updateStepInHierarchy: (value: Record<string, any>, targetStepId: string) => Record<string, any>;
47
+
48
+ export { StepResult, VariableReference, getActivePathsAndStatus, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy };
@@ -0,0 +1 @@
1
+ export { Step, Workflow, createStep, getActivePathsAndStatus, getStepResult, getSuspendedPaths, isErrorEvent, isFinalState, isTransitionEvent, isVariableReference, mergeChildValue, recursivelyCheckForFinalState, updateStepInHierarchy } from '../chunk-B3M27AMP.js';
package/package.json ADDED
@@ -0,0 +1,162 @@
1
+ {
2
+ "name": "@mastra/core",
3
+ "version": "0.0.0-commonjs-20250227130920",
4
+ "license": "ISC",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "import": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "require": {
18
+ "types": "./dist/index.d.cts",
19
+ "default": "./dist/index.cjs"
20
+ }
21
+ },
22
+ "./*": {
23
+ "import": {
24
+ "types": "./dist/*/index.d.ts",
25
+ "default": "./dist/*/index.js"
26
+ },
27
+ "require": {
28
+ "types": "./dist/*/index.d.cts",
29
+ "default": "./dist/*/index.cjs"
30
+ }
31
+ },
32
+ "./storage/libsql": {
33
+ "import": {
34
+ "types": "./dist/storage/libsql/index.d.ts",
35
+ "default": "./dist/storage/libsql/index.js"
36
+ },
37
+ "require": {
38
+ "types": "./dist/storage/libsql/index.d.cts",
39
+ "default": "./dist/storage/libsql/index.cjs"
40
+ }
41
+ },
42
+ "./vector/libsql": {
43
+ "import": {
44
+ "types": "./dist/vector/libsql/index.d.ts",
45
+ "default": "./dist/vector/libsql/index.js"
46
+ },
47
+ "require": {
48
+ "types": "./dist/vector/libsql/index.d.cts",
49
+ "default": "./dist/vector/libsql/index.cjs"
50
+ }
51
+ },
52
+ "./utils": {
53
+ "import": {
54
+ "types": "./dist/utils.d.ts",
55
+ "default": "./dist/utils.js"
56
+ },
57
+ "require": {
58
+ "types": "./dist/utils.d.cts",
59
+ "default": "./dist/utils.cjs"
60
+ }
61
+ },
62
+ "./base": {
63
+ "import": {
64
+ "types": "./dist/base.d.ts",
65
+ "default": "./dist/base.js"
66
+ },
67
+ "require": {
68
+ "types": "./dist/base.d.cts",
69
+ "default": "./dist/base.cjs"
70
+ }
71
+ },
72
+ "./telemetry/otel-vendor": {
73
+ "import": {
74
+ "types": "./dist/telemetry/otel-vendor.d.ts",
75
+ "default": "./dist/telemetry/otel-vendor.js"
76
+ },
77
+ "require": {
78
+ "types": "./dist/telemetry/otel-vendor.d.cts",
79
+ "default": "./dist/telemetry/otel-vendor.cjs"
80
+ }
81
+ },
82
+ "./package.json": "./package.json"
83
+ },
84
+ "sideEffects": false,
85
+ "dependencies": {
86
+ "@libsql/client": "^0.14.0",
87
+ "@opentelemetry/api": "^1.9.0",
88
+ "@opentelemetry/auto-instrumentations-node": "^0.53.0",
89
+ "@opentelemetry/core": "^1.30.1",
90
+ "@opentelemetry/exporter-trace-otlp-http": "^0.55.0",
91
+ "@opentelemetry/otlp-exporter-base": "^0.57.1",
92
+ "@opentelemetry/otlp-transformer": "^0.57.1",
93
+ "@opentelemetry/resources": "^1.28.0",
94
+ "@opentelemetry/sdk-metrics": "^1.28.0",
95
+ "@opentelemetry/sdk-node": "^0.55.0",
96
+ "@opentelemetry/sdk-trace-base": "^1.30.1",
97
+ "@opentelemetry/sdk-trace-node": "^1.28.0",
98
+ "@opentelemetry/semantic-conventions": "^1.28.0",
99
+ "ai": "^4.1.41",
100
+ "cohere-ai": "^7.15.4",
101
+ "date-fns": "^3.0.5",
102
+ "dotenv": "^16.4.7",
103
+ "fastembed": "^1.14.1",
104
+ "json-schema": "^0.4.0",
105
+ "node_modules-path": "^2.0.8",
106
+ "pino": "^9.6.0",
107
+ "pino-pretty": "^13.0.0",
108
+ "radash": "^12.1.0",
109
+ "sift": "^17.1.3",
110
+ "xstate": "^5.19.0",
111
+ "zod": "^3.24.1"
112
+ },
113
+ "devDependencies": {
114
+ "@ai-sdk/openai": "^1.1.12",
115
+ "@babel/core": "^7.26.7",
116
+ "@microsoft/api-extractor": "^7.49.2",
117
+ "@size-limit/preset-small-lib": "^11.1.4",
118
+ "@types/babel__core": "^7.20.5",
119
+ "@types/json-schema": "^7.0.15",
120
+ "@types/lodash-es": "^4.17.12",
121
+ "@types/node": "^22.13.1",
122
+ "@types/pino": "^7.0.5",
123
+ "@types/qs": "^6.9.15",
124
+ "eslint": "^9.20.1",
125
+ "rollup": "^4.30.1",
126
+ "size-limit": "^11.1.4",
127
+ "tsup": "^8.3.6",
128
+ "typescript": "^5.7.3",
129
+ "vitest": "^3.0.4",
130
+ "@internal/lint": "0.0.0"
131
+ },
132
+ "engines": {
133
+ "node": ">=20"
134
+ },
135
+ "keywords": [
136
+ "ai",
137
+ "llm",
138
+ "llms",
139
+ "agent",
140
+ "agents",
141
+ "vectorstore",
142
+ "embeddings",
143
+ "rag",
144
+ "evals",
145
+ "memory",
146
+ "tools",
147
+ "telemetry",
148
+ "typescript",
149
+ "opentelemetry",
150
+ "otel",
151
+ "framework"
152
+ ],
153
+ "scripts": {
154
+ "check": "tsc --noEmit",
155
+ "analyze": "size-limit --why",
156
+ "lint": "eslint .",
157
+ "build": "tsup --config tsup.config.ts --format esm,cjs",
158
+ "build:watch": "pnpm build --watch",
159
+ "size": "size-limit",
160
+ "test": "vitest run"
161
+ }
162
+ }