@mastra/core 0.1.25 → 0.1.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/agents/openai/assistant.d.ts +6 -3
- package/dist/agents/openai/assistant.d.ts.map +1 -1
- package/dist/agents/vector-sync.d.ts.map +1 -1
- package/dist/core.cjs.development.js +89 -83
- 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 +93 -83
- package/dist/core.esm.js.map +1 -1
- package/dist/framework.d.ts +13 -6
- package/dist/framework.d.ts.map +1 -1
- package/dist/utils/inngest.d.ts +1 -0
- package/dist/utils/inngest.d.ts.map +1 -1
- package/dist/workflows/runner.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/core.esm.js
CHANGED
|
@@ -1869,7 +1869,8 @@ var makeCallback = function makeCallback(framework) {
|
|
|
1869
1869
|
var APP_ID = 'mastra';
|
|
1870
1870
|
var client$1 = /*#__PURE__*/new Inngest({
|
|
1871
1871
|
id: APP_ID,
|
|
1872
|
-
eventKey: process.env.INNGEST_EVENT_KEY
|
|
1872
|
+
eventKey: process.env.INNGEST_EVENT_KEY,
|
|
1873
|
+
baseUrl: process.env.INNGEST_URL
|
|
1873
1874
|
});
|
|
1874
1875
|
|
|
1875
1876
|
function readBlueprintSync(filePath) {
|
|
@@ -4617,11 +4618,8 @@ function _blueprintRunner() {
|
|
|
4617
4618
|
});
|
|
4618
4619
|
case 19:
|
|
4619
4620
|
ranSuccessfully = _context4.sent;
|
|
4620
|
-
console.log('====Full context====', {
|
|
4621
|
-
fullCtx: fullCtx
|
|
4622
|
-
});
|
|
4623
4621
|
if (!ranSuccessfully) {
|
|
4624
|
-
_context4.next =
|
|
4622
|
+
_context4.next = 25;
|
|
4625
4623
|
break;
|
|
4626
4624
|
}
|
|
4627
4625
|
logger.info({
|
|
@@ -4634,7 +4632,7 @@ function _blueprintRunner() {
|
|
|
4634
4632
|
return _context4.abrupt("return", {
|
|
4635
4633
|
fullCtx: fullCtx
|
|
4636
4634
|
});
|
|
4637
|
-
case
|
|
4635
|
+
case 25:
|
|
4638
4636
|
logger.error({
|
|
4639
4637
|
type: RegisteredLogger.WORKFLOW,
|
|
4640
4638
|
destinationPath: "" + blueprint.id,
|
|
@@ -4645,7 +4643,7 @@ function _blueprintRunner() {
|
|
|
4645
4643
|
return _context4.abrupt("return", {
|
|
4646
4644
|
fullCtx: null
|
|
4647
4645
|
});
|
|
4648
|
-
case
|
|
4646
|
+
case 27:
|
|
4649
4647
|
case "end":
|
|
4650
4648
|
return _context4.stop();
|
|
4651
4649
|
}
|
|
@@ -5725,7 +5723,6 @@ function _syncAndWriteVectorProviderIndexesToLocal() {
|
|
|
5725
5723
|
while (1) switch (_context15.prev = _context15.next) {
|
|
5726
5724
|
case 0:
|
|
5727
5725
|
mastra = _ref14.mastra;
|
|
5728
|
-
// TODO: Return in prod ? or do somethif different
|
|
5729
5726
|
vectorProviders = mastra.config.agents.vectorProvider;
|
|
5730
5727
|
pullVectorProviderIndexes = /*#__PURE__*/function () {
|
|
5731
5728
|
var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref15) {
|
|
@@ -5864,9 +5861,9 @@ function getAgentSystemApis(_ref) {
|
|
|
5864
5861
|
case 19:
|
|
5865
5862
|
run = _context.sent;
|
|
5866
5863
|
message = run == null || (_run$content = run.content) == null || (_run$content = _run$content[0]) == null || (_run$content = _run$content.text) == null ? void 0 : _run$content.value;
|
|
5867
|
-
_answer2 = run == null || (_run$content2 = run.content) == null
|
|
5864
|
+
_answer2 = run == null || (_run$content2 = run.content) == null || (_run$content2 = _run$content2.find(function (m) {
|
|
5868
5865
|
return m.toolName === 'answer';
|
|
5869
|
-
}).args;
|
|
5866
|
+
})) == null ? void 0 : _run$content2.args;
|
|
5870
5867
|
return _context.abrupt("return", {
|
|
5871
5868
|
message: message,
|
|
5872
5869
|
answer: _answer2
|
|
@@ -5894,18 +5891,18 @@ if (process.env.OPENAI_API_KEY) {
|
|
|
5894
5891
|
function createAssistantAgentHandler(logger) {
|
|
5895
5892
|
return /*#__PURE__*/function () {
|
|
5896
5893
|
var _createAssistantAgent = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
5897
|
-
var name, instructions, model, tools,
|
|
5894
|
+
var name, instructions, model, tools, assistant;
|
|
5898
5895
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5899
5896
|
while (1) switch (_context.prev = _context.next) {
|
|
5900
5897
|
case 0:
|
|
5901
|
-
name = _ref.name, instructions = _ref.instructions, model = _ref.model, tools = _ref.tools
|
|
5898
|
+
name = _ref.name, instructions = _ref.instructions, model = _ref.model, tools = _ref.tools;
|
|
5902
5899
|
_context.next = 3;
|
|
5903
5900
|
return client.beta.assistants.create({
|
|
5904
5901
|
name: name,
|
|
5905
5902
|
model: model,
|
|
5906
5903
|
instructions: instructions,
|
|
5907
|
-
tools: tools
|
|
5908
|
-
response_format
|
|
5904
|
+
tools: tools
|
|
5905
|
+
//response_format,
|
|
5909
5906
|
});
|
|
5910
5907
|
case 3:
|
|
5911
5908
|
assistant = _context.sent;
|
|
@@ -5944,15 +5941,16 @@ function updateAssistantAgentHandler(logger) {
|
|
|
5944
5941
|
while (1) switch (_context2.prev = _context2.next) {
|
|
5945
5942
|
case 0:
|
|
5946
5943
|
assistantId = _ref2.assistantId, name = _ref2.name, instructions = _ref2.instructions, model = _ref2.model, tools = _ref2.tools, response_format = _ref2.response_format;
|
|
5947
|
-
|
|
5944
|
+
console.log('response_format', response_format);
|
|
5945
|
+
_context2.next = 4;
|
|
5948
5946
|
return client.beta.assistants.update(assistantId, {
|
|
5949
5947
|
name: name,
|
|
5950
5948
|
model: model,
|
|
5951
5949
|
instructions: instructions,
|
|
5952
|
-
tools: tools
|
|
5953
|
-
response_format
|
|
5950
|
+
tools: tools
|
|
5951
|
+
//response_format,
|
|
5954
5952
|
});
|
|
5955
|
-
case
|
|
5953
|
+
case 4:
|
|
5956
5954
|
assistant = _context2.sent;
|
|
5957
5955
|
logger == null || logger.info({
|
|
5958
5956
|
destinationPath: "" + assistant.id,
|
|
@@ -5969,7 +5967,7 @@ function updateAssistantAgentHandler(logger) {
|
|
|
5969
5967
|
}
|
|
5970
5968
|
}, null, 2)
|
|
5971
5969
|
});
|
|
5972
|
-
case
|
|
5970
|
+
case 6:
|
|
5973
5971
|
case "end":
|
|
5974
5972
|
return _context2.stop();
|
|
5975
5973
|
}
|
|
@@ -5995,11 +5993,11 @@ function getAssistantAgentHandler(logger) {
|
|
|
5995
5993
|
agent = _context11.sent;
|
|
5996
5994
|
handleRunStatus = /*#__PURE__*/function () {
|
|
5997
5995
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref4) {
|
|
5998
|
-
var threadId, run, _messages$data, messages;
|
|
5996
|
+
var threadId, run, callback, _messages$data, messages;
|
|
5999
5997
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
6000
5998
|
while (1) switch (_context3.prev = _context3.next) {
|
|
6001
5999
|
case 0:
|
|
6002
|
-
threadId = _ref4.threadId, run = _ref4.run;
|
|
6000
|
+
threadId = _ref4.threadId, run = _ref4.run, callback = _ref4.callback;
|
|
6003
6001
|
if (!(run.status === 'completed')) {
|
|
6004
6002
|
_context3.next = 8;
|
|
6005
6003
|
break;
|
|
@@ -6011,17 +6009,19 @@ function getAssistantAgentHandler(logger) {
|
|
|
6011
6009
|
return _context3.abrupt("return", (_messages$data = messages.data) == null ? void 0 : _messages$data[0]);
|
|
6012
6010
|
case 8:
|
|
6013
6011
|
if (!(run.status === 'requires_action')) {
|
|
6014
|
-
_context3.next =
|
|
6012
|
+
_context3.next = 15;
|
|
6015
6013
|
break;
|
|
6016
6014
|
}
|
|
6017
|
-
|
|
6015
|
+
callback == null || callback(run);
|
|
6016
|
+
_context3.next = 12;
|
|
6018
6017
|
return handleRequiresAction({
|
|
6019
6018
|
run: run,
|
|
6020
|
-
threadId: threadId
|
|
6019
|
+
threadId: threadId,
|
|
6020
|
+
callback: callback
|
|
6021
6021
|
});
|
|
6022
|
-
case
|
|
6022
|
+
case 12:
|
|
6023
6023
|
return _context3.abrupt("return", _context3.sent);
|
|
6024
|
-
case
|
|
6024
|
+
case 15:
|
|
6025
6025
|
console.error('Run did not complete:', run);
|
|
6026
6026
|
logger == null || logger.error({
|
|
6027
6027
|
destinationPath: "" + id,
|
|
@@ -6036,7 +6036,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6036
6036
|
}, null, 2)
|
|
6037
6037
|
});
|
|
6038
6038
|
return _context3.abrupt("return", run == null ? void 0 : run.last_error);
|
|
6039
|
-
case
|
|
6039
|
+
case 18:
|
|
6040
6040
|
case "end":
|
|
6041
6041
|
return _context3.stop();
|
|
6042
6042
|
}
|
|
@@ -6048,13 +6048,13 @@ function getAssistantAgentHandler(logger) {
|
|
|
6048
6048
|
}();
|
|
6049
6049
|
handleRequiresAction = /*#__PURE__*/function () {
|
|
6050
6050
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref6) {
|
|
6051
|
-
var threadId, run, toolOutputs;
|
|
6051
|
+
var threadId, run, callback, toolOutputs;
|
|
6052
6052
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
6053
6053
|
while (1) switch (_context5.prev = _context5.next) {
|
|
6054
6054
|
case 0:
|
|
6055
|
-
threadId = _ref6.threadId, run = _ref6.run;
|
|
6055
|
+
threadId = _ref6.threadId, run = _ref6.run, callback = _ref6.callback;
|
|
6056
6056
|
if (!(run.required_action && run.required_action.submit_tool_outputs && run.required_action.submit_tool_outputs.tool_calls)) {
|
|
6057
|
-
_context5.next =
|
|
6057
|
+
_context5.next = 22;
|
|
6058
6058
|
break;
|
|
6059
6059
|
}
|
|
6060
6060
|
_context5.t0 = compact;
|
|
@@ -6171,19 +6171,19 @@ function getAssistantAgentHandler(logger) {
|
|
|
6171
6171
|
});
|
|
6172
6172
|
return _context5.abrupt("return", handleRunStatus({
|
|
6173
6173
|
threadId: threadId,
|
|
6174
|
-
run: run
|
|
6174
|
+
run: run,
|
|
6175
|
+
callback: callback
|
|
6175
6176
|
}));
|
|
6176
6177
|
case 11:
|
|
6177
6178
|
if (!(toolOutputs && (toolOutputs == null ? void 0 : toolOutputs.length) > 0)) {
|
|
6178
|
-
_context5.next =
|
|
6179
|
+
_context5.next = 19;
|
|
6179
6180
|
break;
|
|
6180
6181
|
}
|
|
6181
|
-
|
|
6182
|
-
_context5.next = 15;
|
|
6182
|
+
_context5.next = 14;
|
|
6183
6183
|
return client.beta.threads.runs.submitToolOutputsAndPoll(threadId, run.id, {
|
|
6184
6184
|
tool_outputs: toolOutputs
|
|
6185
6185
|
});
|
|
6186
|
-
case
|
|
6186
|
+
case 14:
|
|
6187
6187
|
run = _context5.sent;
|
|
6188
6188
|
logger == null || logger.info({
|
|
6189
6189
|
destinationPath: "" + id,
|
|
@@ -6197,9 +6197,9 @@ function getAssistantAgentHandler(logger) {
|
|
|
6197
6197
|
}, null, 2)
|
|
6198
6198
|
});
|
|
6199
6199
|
console.log('Tool outputs submitted successfully.');
|
|
6200
|
-
_context5.next =
|
|
6200
|
+
_context5.next = 21;
|
|
6201
6201
|
break;
|
|
6202
|
-
case
|
|
6202
|
+
case 19:
|
|
6203
6203
|
logger == null || logger.info({
|
|
6204
6204
|
destinationPath: "" + id,
|
|
6205
6205
|
statusCode: 404,
|
|
@@ -6210,12 +6210,13 @@ function getAssistantAgentHandler(logger) {
|
|
|
6210
6210
|
}, null, 2)
|
|
6211
6211
|
});
|
|
6212
6212
|
console.log('No tool outputs to submit.');
|
|
6213
|
-
case
|
|
6213
|
+
case 21:
|
|
6214
6214
|
return _context5.abrupt("return", handleRunStatus({
|
|
6215
6215
|
threadId: threadId,
|
|
6216
|
-
run: run
|
|
6216
|
+
run: run,
|
|
6217
|
+
callback: callback
|
|
6217
6218
|
}));
|
|
6218
|
-
case
|
|
6219
|
+
case 22:
|
|
6219
6220
|
case "end":
|
|
6220
6221
|
return _context5.stop();
|
|
6221
6222
|
}
|
|
@@ -6325,11 +6326,11 @@ function getAssistantAgentHandler(logger) {
|
|
|
6325
6326
|
}(),
|
|
6326
6327
|
watchRun: function () {
|
|
6327
6328
|
var _watchRun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref13) {
|
|
6328
|
-
var runId, threadId, run;
|
|
6329
|
+
var runId, threadId, callback, run;
|
|
6329
6330
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
6330
6331
|
while (1) switch (_context10.prev = _context10.next) {
|
|
6331
6332
|
case 0:
|
|
6332
|
-
runId = _ref13.runId, threadId = _ref13.threadId;
|
|
6333
|
+
runId = _ref13.runId, threadId = _ref13.threadId, callback = _ref13.callback;
|
|
6333
6334
|
if (!runId) {
|
|
6334
6335
|
_context10.next = 7;
|
|
6335
6336
|
break;
|
|
@@ -6368,7 +6369,8 @@ function getAssistantAgentHandler(logger) {
|
|
|
6368
6369
|
case 11:
|
|
6369
6370
|
return _context10.abrupt("return", handleRunStatus({
|
|
6370
6371
|
threadId: threadId,
|
|
6371
|
-
run: run
|
|
6372
|
+
run: run,
|
|
6373
|
+
callback: callback
|
|
6372
6374
|
}));
|
|
6373
6375
|
case 12:
|
|
6374
6376
|
case "end":
|
|
@@ -7526,13 +7528,16 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7526
7528
|
inngestApiToken = (_ref22 = (_this$config$runner$s = (_this$config$runner2 = this.config.runner) == null ? void 0 : _this$config$runner2.signingKey) != null ? _this$config$runner$s : process.env.INNGEST_SIGNING_KEY) != null ? _ref22 : '123';
|
|
7527
7529
|
startTime = Date.now();
|
|
7528
7530
|
_poll = /*#__PURE__*/function () {
|
|
7529
|
-
var _ref23 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
7530
|
-
var response, obj, data, error, lastRun, elapsedTime;
|
|
7531
|
+
var _ref23 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(lastRunId) {
|
|
7532
|
+
var response, obj, data, error, lastRunning, defaultLastRun, lastRun, elapsedTime;
|
|
7531
7533
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
7532
7534
|
while (1) switch (_context8.prev = _context8.next) {
|
|
7533
7535
|
case 0:
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
+
if (lastRunId === void 0) {
|
|
7537
|
+
lastRunId = '';
|
|
7538
|
+
}
|
|
7539
|
+
_context8.prev = 1;
|
|
7540
|
+
_context8.next = 4;
|
|
7536
7541
|
return fetch(inngestApiUrl + "/v1/events/" + id + "/runs", {
|
|
7537
7542
|
method: 'GET',
|
|
7538
7543
|
headers: {
|
|
@@ -7540,16 +7545,16 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7540
7545
|
Authorization: "Bearer " + inngestApiToken
|
|
7541
7546
|
}
|
|
7542
7547
|
});
|
|
7543
|
-
case
|
|
7548
|
+
case 4:
|
|
7544
7549
|
response = _context8.sent;
|
|
7545
7550
|
console.log("Polling for event " + id + "...", response.ok);
|
|
7546
7551
|
if (!response.ok) {
|
|
7547
7552
|
_context8.next = 28;
|
|
7548
7553
|
break;
|
|
7549
7554
|
}
|
|
7550
|
-
_context8.next =
|
|
7555
|
+
_context8.next = 9;
|
|
7551
7556
|
return response.json();
|
|
7552
|
-
case
|
|
7557
|
+
case 9:
|
|
7553
7558
|
obj = _context8.sent;
|
|
7554
7559
|
console.log({
|
|
7555
7560
|
obj: obj
|
|
@@ -7557,42 +7562,45 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7557
7562
|
data = obj.data, error = obj.error;
|
|
7558
7563
|
console.log("Got data for event " + id + "...", data, error);
|
|
7559
7564
|
if (!error) {
|
|
7560
|
-
_context8.next =
|
|
7565
|
+
_context8.next = 16;
|
|
7561
7566
|
break;
|
|
7562
7567
|
}
|
|
7563
7568
|
console.error(error);
|
|
7564
7569
|
return _context8.abrupt("return", null);
|
|
7565
|
-
case
|
|
7570
|
+
case 16:
|
|
7566
7571
|
if (!((data == null ? void 0 : data.length) === 0)) {
|
|
7567
|
-
_context8.next =
|
|
7572
|
+
_context8.next = 20;
|
|
7568
7573
|
break;
|
|
7569
7574
|
}
|
|
7570
|
-
_context8.next =
|
|
7575
|
+
_context8.next = 19;
|
|
7571
7576
|
return new Promise(function (resolve) {
|
|
7572
7577
|
return setTimeout(resolve, interval);
|
|
7573
7578
|
});
|
|
7574
|
-
case 18:
|
|
7575
|
-
return _context8.abrupt("return", _poll());
|
|
7576
7579
|
case 19:
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
case 23:
|
|
7585
|
-
if (!(lastRun.status === 'Running')) {
|
|
7586
|
-
_context8.next = 27;
|
|
7580
|
+
return _context8.abrupt("return", _poll());
|
|
7581
|
+
case 20:
|
|
7582
|
+
lastRunning = data == null ? void 0 : data.find(function (run) {
|
|
7583
|
+
return run.status === 'Running';
|
|
7584
|
+
});
|
|
7585
|
+
if (!lastRunning) {
|
|
7586
|
+
_context8.next = 25;
|
|
7587
7587
|
break;
|
|
7588
7588
|
}
|
|
7589
|
-
_context8.next =
|
|
7589
|
+
_context8.next = 24;
|
|
7590
7590
|
return new Promise(function (resolve) {
|
|
7591
7591
|
return setTimeout(resolve, interval);
|
|
7592
7592
|
});
|
|
7593
|
-
case
|
|
7594
|
-
return _context8.abrupt("return", _poll());
|
|
7595
|
-
case
|
|
7593
|
+
case 24:
|
|
7594
|
+
return _context8.abrupt("return", _poll(lastRunning.run_id));
|
|
7595
|
+
case 25:
|
|
7596
|
+
defaultLastRun = data[0];
|
|
7597
|
+
if (lastRunId) {
|
|
7598
|
+
lastRun = data == null ? void 0 : data.find(function (run) {
|
|
7599
|
+
return run.run_id === lastRunId;
|
|
7600
|
+
});
|
|
7601
|
+
} else {
|
|
7602
|
+
lastRun = defaultLastRun;
|
|
7603
|
+
}
|
|
7596
7604
|
return _context8.abrupt("return", {
|
|
7597
7605
|
status: lastRun.status,
|
|
7598
7606
|
output: lastRun.output,
|
|
@@ -7604,7 +7612,7 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7604
7612
|
break;
|
|
7605
7613
|
case 30:
|
|
7606
7614
|
_context8.prev = 30;
|
|
7607
|
-
_context8.t0 = _context8["catch"](
|
|
7615
|
+
_context8.t0 = _context8["catch"](1);
|
|
7608
7616
|
console.error("Request failed: " + _context8.t0);
|
|
7609
7617
|
case 33:
|
|
7610
7618
|
// Check if timeout has been reached
|
|
@@ -7626,9 +7634,9 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7626
7634
|
case "end":
|
|
7627
7635
|
return _context8.stop();
|
|
7628
7636
|
}
|
|
7629
|
-
}, _callee8, null, [[
|
|
7637
|
+
}, _callee8, null, [[1, 30]]);
|
|
7630
7638
|
}));
|
|
7631
|
-
return function poll() {
|
|
7639
|
+
return function poll(_x8) {
|
|
7632
7640
|
return _ref23.apply(this, arguments);
|
|
7633
7641
|
};
|
|
7634
7642
|
}();
|
|
@@ -7704,7 +7712,7 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7704
7712
|
}
|
|
7705
7713
|
}, _callee10);
|
|
7706
7714
|
}));
|
|
7707
|
-
function subscribe(
|
|
7715
|
+
function subscribe(_x10) {
|
|
7708
7716
|
return _subscribe.apply(this, arguments);
|
|
7709
7717
|
}
|
|
7710
7718
|
return subscribe;
|
|
@@ -7741,7 +7749,7 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7741
7749
|
}
|
|
7742
7750
|
}, _callee11);
|
|
7743
7751
|
}));
|
|
7744
|
-
function subscribe(
|
|
7752
|
+
function subscribe(_x11) {
|
|
7745
7753
|
return _subscribe2.apply(this, arguments);
|
|
7746
7754
|
}
|
|
7747
7755
|
return subscribe;
|
|
@@ -7758,7 +7766,7 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7758
7766
|
}
|
|
7759
7767
|
}, _callee12, this, [[1, 20]]);
|
|
7760
7768
|
}));
|
|
7761
|
-
function triggerEvent(
|
|
7769
|
+
function triggerEvent(_x9) {
|
|
7762
7770
|
return _triggerEvent.apply(this, arguments);
|
|
7763
7771
|
}
|
|
7764
7772
|
return triggerEvent;
|
|
@@ -7803,7 +7811,7 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7803
7811
|
}
|
|
7804
7812
|
}, _callee13, this);
|
|
7805
7813
|
}));
|
|
7806
|
-
function triggerSystemEvent(
|
|
7814
|
+
function triggerSystemEvent(_x12) {
|
|
7807
7815
|
return _triggerSystemEvent.apply(this, arguments);
|
|
7808
7816
|
}
|
|
7809
7817
|
return triggerSystemEvent;
|
|
@@ -7862,9 +7870,7 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7862
7870
|
var v = _ref30[1];
|
|
7863
7871
|
return _extends({}, acc, v);
|
|
7864
7872
|
}, {});
|
|
7865
|
-
console.log('got finalApis==='
|
|
7866
|
-
finalApis: finalApis
|
|
7867
|
-
});
|
|
7873
|
+
console.log('got finalApis===');
|
|
7868
7874
|
return _context14.abrupt("return", getAgent({
|
|
7869
7875
|
connectionId: connectionId,
|
|
7870
7876
|
agent: agentBlueprint,
|
|
@@ -7877,7 +7883,7 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7877
7883
|
}
|
|
7878
7884
|
}, _callee14, this);
|
|
7879
7885
|
}));
|
|
7880
|
-
function getAgent$1(
|
|
7886
|
+
function getAgent$1(_x13) {
|
|
7881
7887
|
return _getAgent2.apply(this, arguments);
|
|
7882
7888
|
}
|
|
7883
7889
|
return getAgent$1;
|
|
@@ -7887,11 +7893,15 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7887
7893
|
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
7888
7894
|
while (1) switch (_context15.prev = _context15.next) {
|
|
7889
7895
|
case 0:
|
|
7890
|
-
|
|
7896
|
+
if (!(process.env.NODE_ENV === 'development')) {
|
|
7897
|
+
_context15.next = 3;
|
|
7898
|
+
break;
|
|
7899
|
+
}
|
|
7900
|
+
_context15.next = 3;
|
|
7891
7901
|
return syncAndWriteVectorProviderIndexesToLocal({
|
|
7892
7902
|
mastra: this
|
|
7893
7903
|
});
|
|
7894
|
-
case
|
|
7904
|
+
case 3:
|
|
7895
7905
|
case "end":
|
|
7896
7906
|
return _context15.stop();
|
|
7897
7907
|
}
|