@mastra/core 0.1.14 → 0.1.16
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/agents/index.d.ts.map +1 -1
- package/dist/agents/openai/assistant.d.ts +4 -1
- package/dist/agents/openai/assistant.d.ts.map +1 -1
- package/dist/core.cjs.development.js +44 -18
- 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 +44 -19
- package/dist/core.esm.js.map +1 -1
- package/dist/framework.d.ts +3 -3
- package/dist/framework.d.ts.map +1 -1
- package/dist/lib/logger-utils/logger.d.ts +11 -5
- package/dist/lib/logger-utils/logger.d.ts.map +1 -1
- package/dist/prisma/client.ts +31 -0
- package/dist/prisma/gen.js +139 -0
- package/dist/prisma/schema.prisma +129 -0
- package/dist/workflows/runner.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,QAAQ,CAAC,EAC7B,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,MAAM,GACP,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,CAAC;CACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,QAAQ,CAAC,EAC7B,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,MAAM,GACP,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,CAAC;CACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAsHo+N,CAAC;;;;;;;iEANr+N;AAED,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import OpenAI from 'openai';
|
|
2
|
-
import { Logger } from '../../lib';
|
|
2
|
+
import { Logger, RegisteredLogger } from '../../lib';
|
|
3
3
|
export declare function createAssistantAgentHandler(logger?: Logger<{
|
|
4
|
+
type: RegisteredLogger;
|
|
4
5
|
destinationPath: string;
|
|
5
6
|
statusCode: number;
|
|
6
7
|
message: string;
|
|
@@ -14,6 +15,7 @@ export declare function createAssistantAgentHandler(logger?: Logger<{
|
|
|
14
15
|
_request_id?: string | null;
|
|
15
16
|
}>;
|
|
16
17
|
export declare function updateAssistantAgentHandler(logger?: Logger<{
|
|
18
|
+
type: RegisteredLogger;
|
|
17
19
|
destinationPath: string;
|
|
18
20
|
statusCode: number;
|
|
19
21
|
message: string;
|
|
@@ -26,6 +28,7 @@ export declare function updateAssistantAgentHandler(logger?: Logger<{
|
|
|
26
28
|
response_format?: OpenAI.Beta.Threads.AssistantResponseFormatOption;
|
|
27
29
|
}) => Promise<void>;
|
|
28
30
|
export declare function getAssistantAgentHandler(logger?: Logger<{
|
|
31
|
+
type: RegisteredLogger;
|
|
29
32
|
destinationPath: string;
|
|
30
33
|
statusCode: number;
|
|
31
34
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/agents/openai/assistant.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/agents/openai/assistant.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAgB,2BAA2B,CACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,4DAQC;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC;CACrE;;GA8BF;AAED,wBAAgB,2BAA2B,CACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,yEASC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC;CACrE,mBA6BF;AAED,wBAAgB,wBAAwB,CACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,mCAMC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC;;;;kCA2Pe,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;;;iCAOjB;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE;mCAlBtD;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf;;;0CA7OE;QACD,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;QAClC,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAG,OAAO,CAAC,GAAG,CAAC;+CAkCb;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;KACnC,KAAG,OAAO,CAAC,GAAG,CAAC;gDAiOX;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB;;;qCAUE;QACD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB;GAkCN"}
|
|
@@ -2452,6 +2452,10 @@ function mergeWithDefinedOnly(base, overrides) {
|
|
|
2452
2452
|
return result;
|
|
2453
2453
|
}
|
|
2454
2454
|
|
|
2455
|
+
var RegisteredLogger = {
|
|
2456
|
+
AGENT: 'AGENT',
|
|
2457
|
+
WORKFLOW: 'WORKFLOW'
|
|
2458
|
+
};
|
|
2455
2459
|
var LogProvider = {
|
|
2456
2460
|
CONSOLE: 'CONSOLE',
|
|
2457
2461
|
FILE: 'FILE',
|
|
@@ -2614,8 +2618,7 @@ var UpstashRedisLogger = /*#__PURE__*/function (_BaseLogger4) {
|
|
|
2614
2618
|
_inheritsLoose(UpstashRedisLogger, _BaseLogger4);
|
|
2615
2619
|
var _proto4 = UpstashRedisLogger.prototype;
|
|
2616
2620
|
_proto4.log = function log(level, message) {
|
|
2617
|
-
|
|
2618
|
-
_classPrivateFieldLooseBase(this, _redisClient)[_redisClient].lpush(fullKey, JSON.stringify(_extends({}, message, {
|
|
2621
|
+
_classPrivateFieldLooseBase(this, _redisClient)[_redisClient].lpush(_classPrivateFieldLooseBase(this, _key6)[_key6], JSON.stringify(_extends({}, message, {
|
|
2619
2622
|
level: level,
|
|
2620
2623
|
createdAt: new Date()
|
|
2621
2624
|
})));
|
|
@@ -2626,9 +2629,9 @@ var UpstashRedisLogger = /*#__PURE__*/function (_BaseLogger4) {
|
|
|
2626
2629
|
return UpstashRedisLogger;
|
|
2627
2630
|
}(BaseLogger);
|
|
2628
2631
|
function createLogger(_ref4) {
|
|
2629
|
-
var
|
|
2632
|
+
var provider = _ref4.provider,
|
|
2630
2633
|
options = _ref4.options;
|
|
2631
|
-
switch (
|
|
2634
|
+
switch (provider) {
|
|
2632
2635
|
case 'CONSOLE':
|
|
2633
2636
|
return new ConsoleLogger({
|
|
2634
2637
|
level: options == null ? void 0 : options.level
|
|
@@ -2645,7 +2648,7 @@ function createLogger(_ref4) {
|
|
|
2645
2648
|
level: options.level
|
|
2646
2649
|
});
|
|
2647
2650
|
default:
|
|
2648
|
-
throw new Error("Unsupported logger type: " +
|
|
2651
|
+
throw new Error("Unsupported logger type: " + provider);
|
|
2649
2652
|
}
|
|
2650
2653
|
}
|
|
2651
2654
|
|
|
@@ -4218,6 +4221,7 @@ function _runActionsRecursively() {
|
|
|
4218
4221
|
action = _step2.value;
|
|
4219
4222
|
concreteAction = frameworkApis[action.type];
|
|
4220
4223
|
logger.info({
|
|
4224
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4221
4225
|
destinationPath: "" + blueprintId,
|
|
4222
4226
|
message: JSON.stringify({
|
|
4223
4227
|
message: "Running action " + action.type,
|
|
@@ -4351,6 +4355,7 @@ function _runActionsRecursively() {
|
|
|
4351
4355
|
break;
|
|
4352
4356
|
}
|
|
4353
4357
|
logger.debug({
|
|
4358
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4354
4359
|
destinationPath: "" + blueprintId,
|
|
4355
4360
|
message: JSON.stringify({
|
|
4356
4361
|
message: "No valid branch found for action: " + action.type + ":" + action.id
|
|
@@ -4368,6 +4373,7 @@ function _runActionsRecursively() {
|
|
|
4368
4373
|
break;
|
|
4369
4374
|
}
|
|
4370
4375
|
logger.debug({
|
|
4376
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4371
4377
|
destinationPath: "" + blueprintId,
|
|
4372
4378
|
message: JSON.stringify({
|
|
4373
4379
|
message: "Running default action: " + defaultAction.type + ":" + defaultAction.id
|
|
@@ -4392,6 +4398,7 @@ function _runActionsRecursively() {
|
|
|
4392
4398
|
});
|
|
4393
4399
|
case 30:
|
|
4394
4400
|
logger.debug({
|
|
4401
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4395
4402
|
destinationPath: "" + blueprintId,
|
|
4396
4403
|
message: JSON.stringify({
|
|
4397
4404
|
message: "No default action found for action: " + action.type + ":" + action.id
|
|
@@ -4407,6 +4414,7 @@ function _runActionsRecursively() {
|
|
|
4407
4414
|
break;
|
|
4408
4415
|
}
|
|
4409
4416
|
logger.debug({
|
|
4417
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4410
4418
|
destinationPath: "" + blueprintId,
|
|
4411
4419
|
message: JSON.stringify({
|
|
4412
4420
|
message: "No executor found for " + action.type + ":" + action.id
|
|
@@ -4449,6 +4457,7 @@ function _runActionsRecursively() {
|
|
|
4449
4457
|
case 49:
|
|
4450
4458
|
executorResult = _context2.sent;
|
|
4451
4459
|
logger.info({
|
|
4460
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4452
4461
|
destinationPath: "" + blueprintId,
|
|
4453
4462
|
message: JSON.stringify({
|
|
4454
4463
|
message: "Action " + action.type + ":" + action.id + " completed",
|
|
@@ -4461,6 +4470,7 @@ function _runActionsRecursively() {
|
|
|
4461
4470
|
_context2.prev = 53;
|
|
4462
4471
|
_context2.t2 = _context2["catch"](46);
|
|
4463
4472
|
logger.error({
|
|
4473
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4464
4474
|
destinationPath: "" + blueprintId,
|
|
4465
4475
|
message: JSON.stringify({
|
|
4466
4476
|
message: "Action " + action.type + ":" + action.id + " failed",
|
|
@@ -4551,6 +4561,7 @@ function _blueprintRunner() {
|
|
|
4551
4561
|
ctx = _ref8.ctx, dataCtx = _ref8.dataCtx, blueprint = _ref8.blueprint, frameworkEvents = _ref8.frameworkEvents, frameworkApis = _ref8.frameworkApis, logger = _ref8.logger;
|
|
4552
4562
|
console.log("Running blueprint " + blueprint.id);
|
|
4553
4563
|
logger.info({
|
|
4564
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4554
4565
|
destinationPath: "" + blueprint.id,
|
|
4555
4566
|
message: JSON.stringify({
|
|
4556
4567
|
message: 'Started workflow run',
|
|
@@ -4593,6 +4604,7 @@ function _blueprintRunner() {
|
|
|
4593
4604
|
break;
|
|
4594
4605
|
}
|
|
4595
4606
|
logger.info({
|
|
4607
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4596
4608
|
destinationPath: "" + blueprint.id,
|
|
4597
4609
|
message: JSON.stringify({
|
|
4598
4610
|
message: 'Workflow run skipped'
|
|
@@ -4617,6 +4629,7 @@ function _blueprintRunner() {
|
|
|
4617
4629
|
ranSuccessfully = _context4.sent;
|
|
4618
4630
|
if (ranSuccessfully) {
|
|
4619
4631
|
logger.info({
|
|
4632
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4620
4633
|
destinationPath: "" + blueprint.id,
|
|
4621
4634
|
message: JSON.stringify({
|
|
4622
4635
|
message: 'Workflow run completed'
|
|
@@ -4624,6 +4637,7 @@ function _blueprintRunner() {
|
|
|
4624
4637
|
});
|
|
4625
4638
|
} else {
|
|
4626
4639
|
logger.error({
|
|
4640
|
+
type: RegisteredLogger.WORKFLOW,
|
|
4627
4641
|
destinationPath: "" + blueprint.id,
|
|
4628
4642
|
message: JSON.stringify({
|
|
4629
4643
|
message: 'Workflow run failed'
|
|
@@ -5882,6 +5896,7 @@ function createAssistantAgentHandler(logger) {
|
|
|
5882
5896
|
logger == null || logger.info({
|
|
5883
5897
|
destinationPath: "" + assistant.id,
|
|
5884
5898
|
statusCode: 201,
|
|
5899
|
+
type: RegisteredLogger.AGENT,
|
|
5885
5900
|
message: JSON.stringify({
|
|
5886
5901
|
message: 'Created assistant',
|
|
5887
5902
|
metadata: {
|
|
@@ -5926,6 +5941,7 @@ function updateAssistantAgentHandler(logger) {
|
|
|
5926
5941
|
logger == null || logger.info({
|
|
5927
5942
|
destinationPath: "" + assistant.id,
|
|
5928
5943
|
statusCode: 200,
|
|
5944
|
+
type: RegisteredLogger.AGENT,
|
|
5929
5945
|
message: JSON.stringify({
|
|
5930
5946
|
message: 'Updated assistant',
|
|
5931
5947
|
metadata: {
|
|
@@ -5994,6 +6010,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
5994
6010
|
logger == null || logger.error({
|
|
5995
6011
|
destinationPath: "" + id,
|
|
5996
6012
|
statusCode: 400,
|
|
6013
|
+
type: RegisteredLogger.AGENT,
|
|
5997
6014
|
message: JSON.stringify({
|
|
5998
6015
|
message: "Run did not complete",
|
|
5999
6016
|
event_type: 'run_error',
|
|
@@ -6042,6 +6059,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6042
6059
|
logger == null || logger.info({
|
|
6043
6060
|
destinationPath: "" + id,
|
|
6044
6061
|
statusCode: 100,
|
|
6062
|
+
type: RegisteredLogger.AGENT,
|
|
6045
6063
|
message: JSON.stringify({
|
|
6046
6064
|
message: "[local] Starting tool call " + callInfo + ": " + tool["function"].name,
|
|
6047
6065
|
metadata: {
|
|
@@ -6057,6 +6075,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6057
6075
|
logger == null || logger.error({
|
|
6058
6076
|
destinationPath: "" + id,
|
|
6059
6077
|
statusCode: 404,
|
|
6078
|
+
type: RegisteredLogger.AGENT,
|
|
6060
6079
|
message: JSON.stringify({
|
|
6061
6080
|
message: "[local] No tool fn found: " + tool["function"].name,
|
|
6062
6081
|
metadata: {
|
|
@@ -6074,6 +6093,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6074
6093
|
logger == null || logger.info({
|
|
6075
6094
|
destinationPath: "" + id,
|
|
6076
6095
|
statusCode: 200,
|
|
6096
|
+
type: RegisteredLogger.AGENT,
|
|
6077
6097
|
message: JSON.stringify({
|
|
6078
6098
|
message: "[local] Passing args to tool call: " + tool["function"].name,
|
|
6079
6099
|
metadata: {
|
|
@@ -6093,6 +6113,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6093
6113
|
logger == null || logger.info({
|
|
6094
6114
|
destinationPath: "" + id,
|
|
6095
6115
|
statusCode: 200,
|
|
6116
|
+
type: RegisteredLogger.AGENT,
|
|
6096
6117
|
message: JSON.stringify({
|
|
6097
6118
|
message: "[local] Completed tool call " + callInfo + ": " + tool["function"].name,
|
|
6098
6119
|
metadata: {
|
|
@@ -6126,6 +6147,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6126
6147
|
logger == null || logger.error({
|
|
6127
6148
|
destinationPath: "" + id,
|
|
6128
6149
|
statusCode: 404,
|
|
6150
|
+
type: RegisteredLogger.AGENT,
|
|
6129
6151
|
message: JSON.stringify({
|
|
6130
6152
|
message: "No tool outputs submitted",
|
|
6131
6153
|
metadata: {}
|
|
@@ -6150,6 +6172,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6150
6172
|
logger == null || logger.info({
|
|
6151
6173
|
destinationPath: "" + id,
|
|
6152
6174
|
statusCode: 200,
|
|
6175
|
+
type: RegisteredLogger.AGENT,
|
|
6153
6176
|
message: JSON.stringify({
|
|
6154
6177
|
message: "Tool outputs submitted",
|
|
6155
6178
|
metadata: {
|
|
@@ -6164,6 +6187,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6164
6187
|
logger == null || logger.info({
|
|
6165
6188
|
destinationPath: "" + id,
|
|
6166
6189
|
statusCode: 404,
|
|
6190
|
+
type: RegisteredLogger.AGENT,
|
|
6167
6191
|
message: JSON.stringify({
|
|
6168
6192
|
message: "No tool outputs to submit",
|
|
6169
6193
|
metadata: {}
|
|
@@ -6314,6 +6338,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6314
6338
|
logger == null || logger.info({
|
|
6315
6339
|
destinationPath: "" + id,
|
|
6316
6340
|
statusCode: 202,
|
|
6341
|
+
type: RegisteredLogger.AGENT,
|
|
6317
6342
|
message: JSON.stringify({
|
|
6318
6343
|
message: "Creating and polling run, tool choice required",
|
|
6319
6344
|
metadata: {
|
|
@@ -6934,14 +6959,14 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
6934
6959
|
var MASTRA_APP_DIR = process.env.MASTRA_APP_DIR || process.cwd();
|
|
6935
6960
|
var basePath = path.join(MASTRA_APP_DIR, '/mastra/logs/');
|
|
6936
6961
|
agentLogger = createLogger({
|
|
6937
|
-
|
|
6962
|
+
provider: 'FILE',
|
|
6938
6963
|
options: {
|
|
6939
6964
|
dirPath: path.join(basePath, 'agent'),
|
|
6940
6965
|
level: (_config$logs2 = config.logs) == null ? void 0 : _config$logs2.level
|
|
6941
6966
|
}
|
|
6942
6967
|
});
|
|
6943
6968
|
workflowLogger = createLogger({
|
|
6944
|
-
|
|
6969
|
+
provider: 'FILE',
|
|
6945
6970
|
options: {
|
|
6946
6971
|
dirPath: path.join(basePath, 'workflow'),
|
|
6947
6972
|
level: (_config$logs3 = config.logs) == null ? void 0 : _config$logs3.level
|
|
@@ -6954,42 +6979,42 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
6954
6979
|
token: (_config$logs$config2 = config.logs.config) == null ? void 0 : _config$logs$config2.token
|
|
6955
6980
|
});
|
|
6956
6981
|
agentLogger = createLogger({
|
|
6957
|
-
|
|
6982
|
+
provider: 'UPSTASH',
|
|
6958
6983
|
options: {
|
|
6959
6984
|
redisClient: redisClient,
|
|
6960
|
-
key: "mastra
|
|
6985
|
+
key: "mastra/logs/agent",
|
|
6961
6986
|
level: (_config$logs5 = config.logs) == null ? void 0 : _config$logs5.level
|
|
6962
6987
|
}
|
|
6963
6988
|
});
|
|
6964
6989
|
workflowLogger = createLogger({
|
|
6965
|
-
|
|
6990
|
+
provider: 'UPSTASH',
|
|
6966
6991
|
options: {
|
|
6967
6992
|
redisClient: redisClient,
|
|
6968
|
-
key: "mastra
|
|
6993
|
+
key: "mastra/logs/workflow",
|
|
6969
6994
|
level: (_config$logs6 = config.logs) == null ? void 0 : _config$logs6.level
|
|
6970
6995
|
}
|
|
6971
6996
|
});
|
|
6972
6997
|
} else {
|
|
6973
6998
|
var _config$logs7, _config$logs8;
|
|
6974
6999
|
agentLogger = createLogger({
|
|
6975
|
-
|
|
7000
|
+
provider: 'CONSOLE',
|
|
6976
7001
|
options: {
|
|
6977
7002
|
level: (_config$logs7 = config.logs) == null ? void 0 : _config$logs7.level
|
|
6978
7003
|
}
|
|
6979
7004
|
});
|
|
6980
7005
|
workflowLogger = createLogger({
|
|
6981
|
-
|
|
7006
|
+
provider: 'CONSOLE',
|
|
6982
7007
|
options: {
|
|
6983
7008
|
level: (_config$logs8 = config.logs) == null ? void 0 : _config$logs8.level
|
|
6984
7009
|
}
|
|
6985
7010
|
});
|
|
6986
7011
|
}
|
|
6987
7012
|
framework.attachLogger({
|
|
6988
|
-
key:
|
|
7013
|
+
key: RegisteredLogger.AGENT,
|
|
6989
7014
|
logger: agentLogger
|
|
6990
7015
|
});
|
|
6991
7016
|
framework.attachLogger({
|
|
6992
|
-
key:
|
|
7017
|
+
key: RegisteredLogger.WORKFLOW,
|
|
6993
7018
|
logger: workflowLogger
|
|
6994
7019
|
});
|
|
6995
7020
|
// Register integrations
|
|
@@ -7876,9 +7901,9 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7876
7901
|
key: "openAIAssistant",
|
|
7877
7902
|
get: function get() {
|
|
7878
7903
|
return {
|
|
7879
|
-
createAssistantAgent: createAssistantAgentHandler(this.logger.get(
|
|
7880
|
-
getAssistantAgent: getAssistantAgentHandler(this.logger.get(
|
|
7881
|
-
updateAssistantAgent: updateAssistantAgentHandler(this.logger.get(
|
|
7904
|
+
createAssistantAgent: createAssistantAgentHandler(this.logger.get(RegisteredLogger.AGENT)),
|
|
7905
|
+
getAssistantAgent: getAssistantAgentHandler(this.logger.get(RegisteredLogger.AGENT)),
|
|
7906
|
+
updateAssistantAgent: updateAssistantAgentHandler(this.logger.get(RegisteredLogger.AGENT))
|
|
7882
7907
|
};
|
|
7883
7908
|
}
|
|
7884
7909
|
}]);
|
|
@@ -7921,6 +7946,7 @@ exports.IntegrationError = IntegrationError;
|
|
|
7921
7946
|
exports.IntegrationFieldTypeEnum = IntegrationFieldTypeEnum;
|
|
7922
7947
|
exports.LogProvider = LogProvider;
|
|
7923
7948
|
exports.Mastra = Mastra;
|
|
7949
|
+
exports.RegisteredLogger = RegisteredLogger;
|
|
7924
7950
|
exports.RunStatus = RunStatus;
|
|
7925
7951
|
exports.SORT_MODE_TO_ABBR = SORT_MODE_TO_ABBR;
|
|
7926
7952
|
exports.WorkflowStatusEnum = WorkflowStatusEnum;
|