@mastra/core 0.2.0-alpha.91 → 0.2.0-alpha.92
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/dist/agent/index.js +2 -2
- package/dist/bundler/index.d.ts +11 -3
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-5NQ3MEZM.js → chunk-BOS3IA23.js} +0 -1
- package/dist/{chunk-MMJCCJNP.js → chunk-DINPURQT.js} +1 -2
- package/dist/{chunk-YKASGA6R.js → chunk-JJ57BXQR.js} +1 -1
- package/dist/{chunk-RDEXABVY.js → chunk-MCB4M5W4.js} +2 -2
- package/dist/{chunk-YPMAHKBC.js → chunk-RI3ECMVF.js} +0 -1
- package/dist/{chunk-WGUGRCAP.js → chunk-U7WDR4WO.js} +1 -1
- package/dist/{chunk-FD4KOA4T.js → chunk-UCOTMN3J.js} +1 -1
- package/dist/{chunk-ECXV3EAT.js → chunk-WBPDZBUT.js} +3 -9
- package/dist/deployer/index.d.ts +6 -3
- package/dist/deployer/index.js +2 -2
- package/dist/embeddings/index.js +1 -1
- package/dist/index.js +11 -11
- package/dist/llm/index.js +1 -1
- package/dist/mastra/index.js +2 -2
- package/dist/relevance/index.js +3 -3
- package/dist/vector/index.js +2 -2
- package/dist/vector/libsql/index.js +2 -2
- package/package.json +1 -1
package/dist/agent/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { Agent } from '../chunk-
|
|
1
|
+
export { Agent } from '../chunk-DINPURQT.js';
|
|
2
2
|
import '../chunk-HBTQNIAX.js';
|
|
3
3
|
import '../chunk-SDKEPBBH.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-RI3ECMVF.js';
|
|
5
5
|
import '../chunk-6ZVFVYLE.js';
|
|
6
6
|
import '../chunk-KNPBNSJ7.js';
|
|
7
7
|
import '../chunk-G4MCO7XF.js';
|
package/dist/bundler/index.d.ts
CHANGED
|
@@ -7,15 +7,23 @@ import '../telemetry-oCUM52DG.js';
|
|
|
7
7
|
import '@opentelemetry/sdk-node';
|
|
8
8
|
import '@opentelemetry/sdk-trace-base';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
interface IBundler {
|
|
11
|
+
loadEnvVars(): Promise<Map<string, string>>;
|
|
12
|
+
getEnvFiles(): Promise<string[]>;
|
|
13
|
+
bundle(entryFile: string, outputDirectory: string): Promise<void>;
|
|
14
|
+
prepare(outputDirectory: string): Promise<void>;
|
|
15
|
+
writePackageJson(outputDirectory: string, dependencies: Map<string, string>): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
declare abstract class MastraBundler extends MastraBase implements IBundler {
|
|
11
18
|
constructor({ name, component }: {
|
|
12
19
|
name: string;
|
|
13
20
|
component?: 'BUNDLER' | 'DEPLOYER';
|
|
14
21
|
});
|
|
15
22
|
loadEnvVars(): Promise<Map<string, string>>;
|
|
16
23
|
abstract prepare(outputDirectory: string): Promise<void>;
|
|
24
|
+
abstract writePackageJson(outputDirectory: string, dependencies: Map<string, string>): Promise<void>;
|
|
17
25
|
abstract getEnvFiles(): Promise<string[]>;
|
|
18
|
-
abstract bundle(
|
|
26
|
+
abstract bundle(entryFile: string, outputDirectory: string): Promise<void>;
|
|
19
27
|
}
|
|
20
28
|
|
|
21
|
-
export { MastraBundler };
|
|
29
|
+
export { type IBundler, MastraBundler };
|
package/dist/bundler/index.js
CHANGED
|
@@ -6,7 +6,6 @@ import { createMistral } from '@ai-sdk/mistral';
|
|
|
6
6
|
import { createOpenAI } from '@ai-sdk/openai';
|
|
7
7
|
import { embed as embed$1, embedMany as embedMany$1 } from 'ai';
|
|
8
8
|
import { createVoyage } from 'voyage-ai-provider';
|
|
9
|
-
import 'dotenv/config';
|
|
10
9
|
|
|
11
10
|
function getEmbeddingModel(embedding) {
|
|
12
11
|
let embeddingModel;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { executeHook, AvailableHooks } from './chunk-HBTQNIAX.js';
|
|
2
|
-
import { LLM } from './chunk-
|
|
2
|
+
import { LLM } from './chunk-RI3ECMVF.js';
|
|
3
3
|
import { InstrumentClass } from './chunk-6ZVFVYLE.js';
|
|
4
4
|
import { MastraBase } from './chunk-G4MCO7XF.js';
|
|
5
5
|
import { RegisteredLogger, LogLevel } from './chunk-ICMEXHKD.js';
|
|
6
6
|
import { __name, __publicField, __privateAdd, __privateSet, __privateGet } from './chunk-AJJZUHB4.js';
|
|
7
7
|
import { randomUUID } from 'crypto';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import 'dotenv/config';
|
|
10
9
|
|
|
11
10
|
function _ts_decorate(decorators, target, key, desc) {
|
|
12
11
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MastraBase } from './chunk-G4MCO7XF.js';
|
|
2
2
|
import { __name } from './chunk-AJJZUHB4.js';
|
|
3
|
-
import
|
|
3
|
+
import { parse } from 'dotenv';
|
|
4
4
|
import { readFile } from 'fs/promises';
|
|
5
5
|
|
|
6
6
|
var _MastraBundler = class _MastraBundler extends MastraBase {
|
|
@@ -14,7 +14,7 @@ var _MastraBundler = class _MastraBundler extends MastraBase {
|
|
|
14
14
|
const envVars = /* @__PURE__ */ new Map();
|
|
15
15
|
for (const file of await this.getEnvFiles()) {
|
|
16
16
|
const content = await readFile(file, "utf-8");
|
|
17
|
-
const config =
|
|
17
|
+
const config = parse(content);
|
|
18
18
|
Object.entries(config).forEach(([key, value]) => {
|
|
19
19
|
envVars.set(key, value);
|
|
20
20
|
});
|
|
@@ -14,7 +14,6 @@ import { createXai } from '@ai-sdk/xai';
|
|
|
14
14
|
import { tool, generateText, jsonSchema, generateObject, streamText, streamObject } from 'ai';
|
|
15
15
|
import { createAnthropicVertex } from 'anthropic-vertex-ai';
|
|
16
16
|
import { z } from 'zod';
|
|
17
|
-
import 'dotenv/config';
|
|
18
17
|
|
|
19
18
|
function _ts_decorate(decorators, target, key, desc) {
|
|
20
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Telemetry } from './chunk-SDKEPBBH.js';
|
|
2
|
-
import { LLM } from './chunk-
|
|
2
|
+
import { LLM } from './chunk-RI3ECMVF.js';
|
|
3
3
|
import { InstrumentClass } from './chunk-6ZVFVYLE.js';
|
|
4
4
|
import { LogLevel, createLogger, noopLogger } from './chunk-ICMEXHKD.js';
|
|
5
5
|
import { __name, __publicField } from './chunk-AJJZUHB4.js';
|
|
6
|
-
import 'dotenv/config';
|
|
7
6
|
|
|
7
|
+
// src/mastra/index.ts
|
|
8
8
|
function _ts_decorate(decorators, target, key, desc) {
|
|
9
9
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
10
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -224,13 +224,7 @@ var _Mastra = class _Mastra {
|
|
|
224
224
|
this.logger = logger;
|
|
225
225
|
if (this.agents) {
|
|
226
226
|
Object.keys(this.agents).forEach((key) => {
|
|
227
|
-
|
|
228
|
-
if (agent) {
|
|
229
|
-
agent.__setLogger(this.logger);
|
|
230
|
-
if (agent.hasOwnMemory()) {
|
|
231
|
-
agent.getMemory()?.__setLogger(this.logger);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
227
|
+
this.agents?.[key]?.__setLogger(this.logger);
|
|
234
228
|
});
|
|
235
229
|
}
|
|
236
230
|
if (this.workflows) {
|
package/dist/deployer/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MastraBundler } from '../bundler/index.js';
|
|
1
|
+
import { IBundler, MastraBundler } from '../bundler/index.js';
|
|
2
2
|
import '../base.js';
|
|
3
3
|
import '@opentelemetry/api';
|
|
4
4
|
import '../index-CBZ2mk2H.js';
|
|
@@ -8,11 +8,14 @@ import '../telemetry-oCUM52DG.js';
|
|
|
8
8
|
import '@opentelemetry/sdk-node';
|
|
9
9
|
import '@opentelemetry/sdk-trace-base';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
interface IDeployer extends IBundler {
|
|
12
|
+
deploy(outputDirectory: string): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
declare abstract class MastraDeployer extends MastraBundler implements IDeployer {
|
|
12
15
|
constructor({ name }: {
|
|
13
16
|
name: string;
|
|
14
17
|
});
|
|
15
18
|
abstract deploy(outputDirectory: string): Promise<void>;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
|
-
export { MastraDeployer };
|
|
21
|
+
export { type IDeployer, MastraDeployer };
|
package/dist/deployer/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { MastraDeployer } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { MastraDeployer } from '../chunk-JJ57BXQR.js';
|
|
2
|
+
import '../chunk-MCB4M5W4.js';
|
|
3
3
|
import '../chunk-G4MCO7XF.js';
|
|
4
4
|
import '../chunk-ICMEXHKD.js';
|
|
5
5
|
import '../chunk-AJJZUHB4.js';
|
package/dist/embeddings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { embed, embedMany } from '../chunk-
|
|
1
|
+
export { embed, embedMany } from '../chunk-BOS3IA23.js';
|
|
2
2
|
import '../chunk-AJJZUHB4.js';
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-
|
|
2
|
-
import {
|
|
1
|
+
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-U7WDR4WO.js';
|
|
2
|
+
import { MastraStorage, MastraStorageLibSql } from './chunk-XDXRDRTQ.js';
|
|
3
3
|
import { MastraTTS } from './chunk-ECUVL2G5.js';
|
|
4
|
-
import { MastraVector } from './chunk-
|
|
4
|
+
import { MastraVector } from './chunk-UCOTMN3J.js';
|
|
5
5
|
import { Workflow } from './chunk-E3TBVBIO.js';
|
|
6
6
|
export { Step, createStep, getStepResult, isErrorEvent, isTransitionEvent, isVariableReference } from './chunk-E3TBVBIO.js';
|
|
7
|
-
export { BaseFilterTranslator } from './chunk-4LJFWC2Q.js';
|
|
8
7
|
export { Metric, evaluate } from './chunk-QLN26TPI.js';
|
|
8
|
+
export { BaseFilterTranslator } from './chunk-4LJFWC2Q.js';
|
|
9
9
|
import { Integration, OpenAPIToolset } from './chunk-42DYOLDV.js';
|
|
10
10
|
import { Tool } from './chunk-VOUPGVRD.js';
|
|
11
11
|
export { createTool } from './chunk-VOUPGVRD.js';
|
|
12
|
-
export { Mastra } from './chunk-
|
|
13
|
-
import {
|
|
14
|
-
import { Agent } from './chunk-
|
|
12
|
+
export { Mastra } from './chunk-WBPDZBUT.js';
|
|
13
|
+
import { MastraMemory } from './chunk-IE37CBXB.js';
|
|
14
|
+
import { Agent } from './chunk-DINPURQT.js';
|
|
15
15
|
export { AvailableHooks, executeHook, registerHook } from './chunk-HBTQNIAX.js';
|
|
16
16
|
export { Telemetry } from './chunk-SDKEPBBH.js';
|
|
17
|
-
import './chunk-
|
|
17
|
+
import './chunk-RI3ECMVF.js';
|
|
18
18
|
export { InstrumentClass, hasActiveTelemetry, withSpan } from './chunk-6ZVFVYLE.js';
|
|
19
19
|
export { deepMerge, delay, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, maskStreamTags } from './chunk-KNPBNSJ7.js';
|
|
20
|
-
import { MastraDeployer } from './chunk-
|
|
21
|
-
import './chunk-
|
|
20
|
+
import { MastraDeployer } from './chunk-JJ57BXQR.js';
|
|
21
|
+
import './chunk-MCB4M5W4.js';
|
|
22
22
|
import { MastraBase } from './chunk-G4MCO7XF.js';
|
|
23
23
|
import { createLogger } from './chunk-ICMEXHKD.js';
|
|
24
24
|
export { LogLevel, Logger, LoggerTransport, MultiLogger, RegisteredLogger, combineLoggers, noopLogger } from './chunk-ICMEXHKD.js';
|
|
25
|
-
import { embed, embedMany } from './chunk-
|
|
25
|
+
import { embed, embedMany } from './chunk-BOS3IA23.js';
|
|
26
26
|
import { __name } from './chunk-AJJZUHB4.js';
|
|
27
27
|
|
|
28
28
|
// src/agent/index.warning.ts
|
package/dist/llm/index.js
CHANGED
package/dist/mastra/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Mastra } from '../chunk-
|
|
1
|
+
export { Mastra } from '../chunk-WBPDZBUT.js';
|
|
2
2
|
import '../chunk-SDKEPBBH.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-RI3ECMVF.js';
|
|
4
4
|
import '../chunk-6ZVFVYLE.js';
|
|
5
5
|
import '../chunk-KNPBNSJ7.js';
|
|
6
6
|
import '../chunk-G4MCO7XF.js';
|
package/dist/relevance/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-U7WDR4WO.js';
|
|
2
|
+
import '../chunk-DINPURQT.js';
|
|
3
3
|
import '../chunk-HBTQNIAX.js';
|
|
4
4
|
import '../chunk-SDKEPBBH.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-RI3ECMVF.js';
|
|
6
6
|
import '../chunk-6ZVFVYLE.js';
|
|
7
7
|
import '../chunk-KNPBNSJ7.js';
|
|
8
8
|
import '../chunk-G4MCO7XF.js';
|
package/dist/vector/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { MastraVector } from '../chunk-
|
|
1
|
+
export { MastraVector } from '../chunk-UCOTMN3J.js';
|
|
2
2
|
import '../chunk-G4MCO7XF.js';
|
|
3
3
|
import '../chunk-ICMEXHKD.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-BOS3IA23.js';
|
|
5
5
|
import '../chunk-AJJZUHB4.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MastraVector } from '../../chunk-
|
|
1
|
+
import { MastraVector } from '../../chunk-UCOTMN3J.js';
|
|
2
2
|
import { BaseFilterTranslator } from '../../chunk-4LJFWC2Q.js';
|
|
3
3
|
import '../../chunk-G4MCO7XF.js';
|
|
4
4
|
import '../../chunk-ICMEXHKD.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-BOS3IA23.js';
|
|
6
6
|
import { __name, __publicField } from '../../chunk-AJJZUHB4.js';
|
|
7
7
|
import { createClient } from '@libsql/client';
|
|
8
8
|
|