@mastra/core 0.1.27-alpha.25 → 0.1.27-alpha.26
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/core.cjs.development.js +15 -15
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +15 -15
- package/dist/core.esm.js.map +1 -1
- package/dist/mastra/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3329,20 +3329,20 @@ exports.Mastra = (_workflows = /*#__PURE__*/_classPrivateFieldLooseKey("workflow
|
|
|
3329
3329
|
var logger = createLogger({
|
|
3330
3330
|
type: 'CONSOLE'
|
|
3331
3331
|
});
|
|
3332
|
-
if (config.logger) {
|
|
3332
|
+
if (config != null && config.logger) {
|
|
3333
3333
|
logger = config.logger;
|
|
3334
3334
|
}
|
|
3335
3335
|
this.logger = logger;
|
|
3336
3336
|
/*
|
|
3337
3337
|
Telemetry
|
|
3338
3338
|
*/
|
|
3339
|
-
if (config.telemetry) {
|
|
3339
|
+
if (config != null && config.telemetry) {
|
|
3340
3340
|
this.telemetry = Telemetry.init(config.telemetry);
|
|
3341
3341
|
}
|
|
3342
3342
|
/*
|
|
3343
3343
|
Engine
|
|
3344
3344
|
*/
|
|
3345
|
-
if (config.engine) {
|
|
3345
|
+
if (config != null && config.engine) {
|
|
3346
3346
|
if (this.telemetry) {
|
|
3347
3347
|
this.engine = this.telemetry.traceClass(config.engine, {
|
|
3348
3348
|
excludeMethods: ['__setTelemetry', '__getTelemetry']
|
|
@@ -3355,7 +3355,7 @@ exports.Mastra = (_workflows = /*#__PURE__*/_classPrivateFieldLooseKey("workflow
|
|
|
3355
3355
|
/*
|
|
3356
3356
|
Vectors
|
|
3357
3357
|
*/
|
|
3358
|
-
if (config.vectors) {
|
|
3358
|
+
if (config != null && config.vectors) {
|
|
3359
3359
|
var vectors = {};
|
|
3360
3360
|
Object.entries(config.vectors).forEach(function (_ref) {
|
|
3361
3361
|
var key = _ref[0],
|
|
@@ -3375,7 +3375,7 @@ exports.Mastra = (_workflows = /*#__PURE__*/_classPrivateFieldLooseKey("workflow
|
|
|
3375
3375
|
Integrations
|
|
3376
3376
|
*/
|
|
3377
3377
|
this.integrations = new Map();
|
|
3378
|
-
(_config$integrations = config.integrations) == null || _config$integrations.forEach(function (integration) {
|
|
3378
|
+
config == null || (_config$integrations = config.integrations) == null || _config$integrations.forEach(function (integration) {
|
|
3379
3379
|
if (_this.integrations.has(integration.name)) {
|
|
3380
3380
|
throw new Error("Integration with name " + integration.name + " already exists");
|
|
3381
3381
|
}
|
|
@@ -3388,7 +3388,7 @@ exports.Mastra = (_workflows = /*#__PURE__*/_classPrivateFieldLooseKey("workflow
|
|
|
3388
3388
|
/*
|
|
3389
3389
|
Tools
|
|
3390
3390
|
*/
|
|
3391
|
-
var integrationTools = ((_config$integrations2 = config.integrations) == null ? void 0 : _config$integrations2.reduce(function (acc, integration) {
|
|
3391
|
+
var integrationTools = (config == null || (_config$integrations2 = config.integrations) == null ? void 0 : _config$integrations2.reduce(function (acc, integration) {
|
|
3392
3392
|
return _extends({}, acc, integration.tools);
|
|
3393
3393
|
}, {})) || {};
|
|
3394
3394
|
var configuredTools = (config == null ? void 0 : config.tools) || {};
|
|
@@ -3427,7 +3427,7 @@ exports.Mastra = (_workflows = /*#__PURE__*/_classPrivateFieldLooseKey("workflow
|
|
|
3427
3427
|
Workflows
|
|
3428
3428
|
*/
|
|
3429
3429
|
_classPrivateFieldLooseBase(this, _workflows)[_workflows] = new Map();
|
|
3430
|
-
(_config$workflows = config.workflows) == null || _config$workflows.forEach(function (workflow) {
|
|
3430
|
+
config == null || (_config$workflows = config.workflows) == null || _config$workflows.forEach(function (workflow) {
|
|
3431
3431
|
workflow.__registerEngine(_this.engine);
|
|
3432
3432
|
workflow.__registerLogger(_this.getLogger());
|
|
3433
3433
|
workflow.__registerTelemetry(_this.telemetry);
|
|
@@ -3436,15 +3436,15 @@ exports.Mastra = (_workflows = /*#__PURE__*/_classPrivateFieldLooseKey("workflow
|
|
|
3436
3436
|
/*
|
|
3437
3437
|
Syncs
|
|
3438
3438
|
*/
|
|
3439
|
-
if (config.syncs && !config.engine) {
|
|
3439
|
+
if (config != null && config.syncs && !config.engine) {
|
|
3440
3440
|
throw new Error('Engine is required to run syncs');
|
|
3441
3441
|
}
|
|
3442
|
-
this.syncs = config.syncs || {};
|
|
3442
|
+
this.syncs = (config == null ? void 0 : config.syncs) || {};
|
|
3443
3443
|
/*
|
|
3444
3444
|
Agents
|
|
3445
3445
|
*/
|
|
3446
3446
|
this.agents = new Map();
|
|
3447
|
-
(_config$agents = config.agents) == null || _config$agents.forEach(function (agent) {
|
|
3447
|
+
config == null || (_config$agents = config.agents) == null || _config$agents.forEach(function (agent) {
|
|
3448
3448
|
if (_this.agents.has(agent.name)) {
|
|
3449
3449
|
throw new Error("Agent with name " + agent.name + " already exists");
|
|
3450
3450
|
}
|
|
@@ -3458,17 +3458,17 @@ exports.Mastra = (_workflows = /*#__PURE__*/_classPrivateFieldLooseKey("workflow
|
|
|
3458
3458
|
agent.__setMemory(config.memory);
|
|
3459
3459
|
}
|
|
3460
3460
|
});
|
|
3461
|
-
if (config.syncs && !config.engine) {
|
|
3461
|
+
if (config != null && config.syncs && !(config != null && config.engine)) {
|
|
3462
3462
|
throw new Error('Engine is required to run syncs');
|
|
3463
3463
|
}
|
|
3464
|
-
this.syncs = config.syncs || {};
|
|
3465
|
-
if (config.engine) {
|
|
3464
|
+
this.syncs = (config == null ? void 0 : config.syncs) || {};
|
|
3465
|
+
if (config != null && config.engine) {
|
|
3466
3466
|
this.engine = config.engine;
|
|
3467
3467
|
}
|
|
3468
|
-
if (config.vectors) {
|
|
3468
|
+
if (config != null && config.vectors) {
|
|
3469
3469
|
this.vectors = config.vectors;
|
|
3470
3470
|
}
|
|
3471
|
-
this.memory = config.memory;
|
|
3471
|
+
this.memory = config == null ? void 0 : config.memory;
|
|
3472
3472
|
}
|
|
3473
3473
|
var _proto = Mastra.prototype;
|
|
3474
3474
|
_proto.LLM = function LLM$1(modelConfig) {
|