@mastra/core 0.1.23 → 0.1.25
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 +3 -6
- 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 +42 -42
- 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 +42 -46
- package/dist/core.esm.js.map +1 -1
- package/dist/framework.d.ts +6 -13
- package/dist/framework.d.ts.map +1 -1
- package/dist/integration.d.ts +1 -0
- package/dist/integration.d.ts.map +1 -1
- package/dist/utils/inngest.d.ts +0 -1
- package/dist/utils/inngest.d.ts.map +1 -1
- package/dist/workflows/handler.d.ts +0 -5
- package/dist/workflows/handler.d.ts.map +1 -1
- package/dist/workflows/runner.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -52,15 +52,13 @@ export declare function getAssistantAgentHandler(logger?: Logger<{
|
|
|
52
52
|
}) => Promise<OpenAI.Beta.Threads.Runs.Run & {
|
|
53
53
|
_request_id?: string | null;
|
|
54
54
|
}>;
|
|
55
|
-
handleRunStatus: ({ threadId, run,
|
|
55
|
+
handleRunStatus: ({ threadId, run, }: {
|
|
56
56
|
run: OpenAI.Beta.Threads.Runs.Run;
|
|
57
57
|
threadId: string;
|
|
58
|
-
callback?: (run: OpenAI.Beta.Threads.Run) => void;
|
|
59
58
|
}) => Promise<any>;
|
|
60
|
-
handleRequiresAction: ({ threadId, run,
|
|
59
|
+
handleRequiresAction: ({ threadId, run, }: {
|
|
61
60
|
threadId: string;
|
|
62
61
|
run: OpenAI.Beta.Threads.Runs.Run;
|
|
63
|
-
callback?: (run: OpenAI.Beta.Threads.Run) => void;
|
|
64
62
|
}) => Promise<any>;
|
|
65
63
|
createUserMessage: ({ threadId, content, }: {
|
|
66
64
|
threadId: string;
|
|
@@ -68,10 +66,9 @@ export declare function getAssistantAgentHandler(logger?: Logger<{
|
|
|
68
66
|
}) => Promise<OpenAI.Beta.Threads.Messages.Message & {
|
|
69
67
|
_request_id?: string | null;
|
|
70
68
|
}>;
|
|
71
|
-
watchRun: ({ runId, threadId,
|
|
69
|
+
watchRun: ({ runId, threadId, }: {
|
|
72
70
|
runId?: string;
|
|
73
71
|
threadId: string;
|
|
74
|
-
callback?: (run: OpenAI.Beta.Threads.Run) => void;
|
|
75
72
|
}) => Promise<any>;
|
|
76
73
|
}>;
|
|
77
74
|
//# sourceMappingURL=assistant.d.ts.map
|
|
@@ -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,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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;;;;EAM9B;AAED,wBAAsB,wCAAwC,CAAC,EAC7D,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;CAChB,iBA6BA"}
|
|
@@ -1890,8 +1890,7 @@ var makeCallback = function makeCallback(framework) {
|
|
|
1890
1890
|
var APP_ID = 'mastra';
|
|
1891
1891
|
var client$1 = /*#__PURE__*/new inngest.Inngest({
|
|
1892
1892
|
id: APP_ID,
|
|
1893
|
-
eventKey: process.env.INNGEST_EVENT_KEY
|
|
1894
|
-
baseUrl: process.env.INNGEST_URL
|
|
1893
|
+
eventKey: process.env.INNGEST_EVENT_KEY
|
|
1895
1894
|
});
|
|
1896
1895
|
|
|
1897
1896
|
function readBlueprintSync(filePath) {
|
|
@@ -4639,8 +4638,11 @@ function _blueprintRunner() {
|
|
|
4639
4638
|
});
|
|
4640
4639
|
case 19:
|
|
4641
4640
|
ranSuccessfully = _context4.sent;
|
|
4641
|
+
console.log('====Full context====', {
|
|
4642
|
+
fullCtx: fullCtx
|
|
4643
|
+
});
|
|
4642
4644
|
if (!ranSuccessfully) {
|
|
4643
|
-
_context4.next =
|
|
4645
|
+
_context4.next = 26;
|
|
4644
4646
|
break;
|
|
4645
4647
|
}
|
|
4646
4648
|
logger.info({
|
|
@@ -4653,7 +4655,7 @@ function _blueprintRunner() {
|
|
|
4653
4655
|
return _context4.abrupt("return", {
|
|
4654
4656
|
fullCtx: fullCtx
|
|
4655
4657
|
});
|
|
4656
|
-
case
|
|
4658
|
+
case 26:
|
|
4657
4659
|
logger.error({
|
|
4658
4660
|
type: RegisteredLogger.WORKFLOW,
|
|
4659
4661
|
destinationPath: "" + blueprint.id,
|
|
@@ -4664,7 +4666,7 @@ function _blueprintRunner() {
|
|
|
4664
4666
|
return _context4.abrupt("return", {
|
|
4665
4667
|
fullCtx: null
|
|
4666
4668
|
});
|
|
4667
|
-
case
|
|
4669
|
+
case 28:
|
|
4668
4670
|
case "end":
|
|
4669
4671
|
return _context4.stop();
|
|
4670
4672
|
}
|
|
@@ -5744,6 +5746,7 @@ function _syncAndWriteVectorProviderIndexesToLocal() {
|
|
|
5744
5746
|
while (1) switch (_context15.prev = _context15.next) {
|
|
5745
5747
|
case 0:
|
|
5746
5748
|
mastra = _ref14.mastra;
|
|
5749
|
+
// TODO: Return in prod ? or do somethif different
|
|
5747
5750
|
vectorProviders = mastra.config.agents.vectorProvider;
|
|
5748
5751
|
pullVectorProviderIndexes = /*#__PURE__*/function () {
|
|
5749
5752
|
var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref15) {
|
|
@@ -5882,9 +5885,9 @@ function getAgentSystemApis(_ref) {
|
|
|
5882
5885
|
case 19:
|
|
5883
5886
|
run = _context.sent;
|
|
5884
5887
|
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;
|
|
5885
|
-
_answer2 = run == null || (_run$content2 = run.content) == null
|
|
5888
|
+
_answer2 = run == null || (_run$content2 = run.content) == null ? void 0 : _run$content2.find(function (m) {
|
|
5886
5889
|
return m.toolName === 'answer';
|
|
5887
|
-
})
|
|
5890
|
+
}).args;
|
|
5888
5891
|
return _context.abrupt("return", {
|
|
5889
5892
|
message: message,
|
|
5890
5893
|
answer: _answer2
|
|
@@ -5962,8 +5965,7 @@ function updateAssistantAgentHandler(logger) {
|
|
|
5962
5965
|
while (1) switch (_context2.prev = _context2.next) {
|
|
5963
5966
|
case 0:
|
|
5964
5967
|
assistantId = _ref2.assistantId, name = _ref2.name, instructions = _ref2.instructions, model = _ref2.model, tools = _ref2.tools, response_format = _ref2.response_format;
|
|
5965
|
-
|
|
5966
|
-
_context2.next = 4;
|
|
5968
|
+
_context2.next = 3;
|
|
5967
5969
|
return client.beta.assistants.update(assistantId, {
|
|
5968
5970
|
name: name,
|
|
5969
5971
|
model: model,
|
|
@@ -5971,7 +5973,7 @@ function updateAssistantAgentHandler(logger) {
|
|
|
5971
5973
|
tools: tools,
|
|
5972
5974
|
response_format: response_format
|
|
5973
5975
|
});
|
|
5974
|
-
case
|
|
5976
|
+
case 3:
|
|
5975
5977
|
assistant = _context2.sent;
|
|
5976
5978
|
logger == null || logger.info({
|
|
5977
5979
|
destinationPath: "" + assistant.id,
|
|
@@ -5988,7 +5990,7 @@ function updateAssistantAgentHandler(logger) {
|
|
|
5988
5990
|
}
|
|
5989
5991
|
}, null, 2)
|
|
5990
5992
|
});
|
|
5991
|
-
case
|
|
5993
|
+
case 5:
|
|
5992
5994
|
case "end":
|
|
5993
5995
|
return _context2.stop();
|
|
5994
5996
|
}
|
|
@@ -6014,11 +6016,11 @@ function getAssistantAgentHandler(logger) {
|
|
|
6014
6016
|
agent = _context11.sent;
|
|
6015
6017
|
handleRunStatus = /*#__PURE__*/function () {
|
|
6016
6018
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref4) {
|
|
6017
|
-
var threadId, run,
|
|
6019
|
+
var threadId, run, _messages$data, messages;
|
|
6018
6020
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
6019
6021
|
while (1) switch (_context3.prev = _context3.next) {
|
|
6020
6022
|
case 0:
|
|
6021
|
-
threadId = _ref4.threadId, run = _ref4.run
|
|
6023
|
+
threadId = _ref4.threadId, run = _ref4.run;
|
|
6022
6024
|
if (!(run.status === 'completed')) {
|
|
6023
6025
|
_context3.next = 8;
|
|
6024
6026
|
break;
|
|
@@ -6030,19 +6032,17 @@ function getAssistantAgentHandler(logger) {
|
|
|
6030
6032
|
return _context3.abrupt("return", (_messages$data = messages.data) == null ? void 0 : _messages$data[0]);
|
|
6031
6033
|
case 8:
|
|
6032
6034
|
if (!(run.status === 'requires_action')) {
|
|
6033
|
-
_context3.next =
|
|
6035
|
+
_context3.next = 14;
|
|
6034
6036
|
break;
|
|
6035
6037
|
}
|
|
6036
|
-
|
|
6037
|
-
_context3.next = 12;
|
|
6038
|
+
_context3.next = 11;
|
|
6038
6039
|
return handleRequiresAction({
|
|
6039
6040
|
run: run,
|
|
6040
|
-
threadId: threadId
|
|
6041
|
-
callback: callback
|
|
6041
|
+
threadId: threadId
|
|
6042
6042
|
});
|
|
6043
|
-
case
|
|
6043
|
+
case 11:
|
|
6044
6044
|
return _context3.abrupt("return", _context3.sent);
|
|
6045
|
-
case
|
|
6045
|
+
case 14:
|
|
6046
6046
|
console.error('Run did not complete:', run);
|
|
6047
6047
|
logger == null || logger.error({
|
|
6048
6048
|
destinationPath: "" + id,
|
|
@@ -6057,7 +6057,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6057
6057
|
}, null, 2)
|
|
6058
6058
|
});
|
|
6059
6059
|
return _context3.abrupt("return", run == null ? void 0 : run.last_error);
|
|
6060
|
-
case
|
|
6060
|
+
case 17:
|
|
6061
6061
|
case "end":
|
|
6062
6062
|
return _context3.stop();
|
|
6063
6063
|
}
|
|
@@ -6069,13 +6069,13 @@ function getAssistantAgentHandler(logger) {
|
|
|
6069
6069
|
}();
|
|
6070
6070
|
handleRequiresAction = /*#__PURE__*/function () {
|
|
6071
6071
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref6) {
|
|
6072
|
-
var threadId, run,
|
|
6072
|
+
var threadId, run, toolOutputs;
|
|
6073
6073
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
6074
6074
|
while (1) switch (_context5.prev = _context5.next) {
|
|
6075
6075
|
case 0:
|
|
6076
|
-
threadId = _ref6.threadId, run = _ref6.run
|
|
6076
|
+
threadId = _ref6.threadId, run = _ref6.run;
|
|
6077
6077
|
if (!(run.required_action && run.required_action.submit_tool_outputs && run.required_action.submit_tool_outputs.tool_calls)) {
|
|
6078
|
-
_context5.next =
|
|
6078
|
+
_context5.next = 23;
|
|
6079
6079
|
break;
|
|
6080
6080
|
}
|
|
6081
6081
|
_context5.t0 = _.compact;
|
|
@@ -6192,19 +6192,19 @@ function getAssistantAgentHandler(logger) {
|
|
|
6192
6192
|
});
|
|
6193
6193
|
return _context5.abrupt("return", handleRunStatus({
|
|
6194
6194
|
threadId: threadId,
|
|
6195
|
-
run: run
|
|
6196
|
-
callback: callback
|
|
6195
|
+
run: run
|
|
6197
6196
|
}));
|
|
6198
6197
|
case 11:
|
|
6199
6198
|
if (!(toolOutputs && (toolOutputs == null ? void 0 : toolOutputs.length) > 0)) {
|
|
6200
|
-
_context5.next =
|
|
6199
|
+
_context5.next = 20;
|
|
6201
6200
|
break;
|
|
6202
6201
|
}
|
|
6203
|
-
|
|
6202
|
+
console.log(toolOutputs, '###### YOOOOOO');
|
|
6203
|
+
_context5.next = 15;
|
|
6204
6204
|
return client.beta.threads.runs.submitToolOutputsAndPoll(threadId, run.id, {
|
|
6205
6205
|
tool_outputs: toolOutputs
|
|
6206
6206
|
});
|
|
6207
|
-
case
|
|
6207
|
+
case 15:
|
|
6208
6208
|
run = _context5.sent;
|
|
6209
6209
|
logger == null || logger.info({
|
|
6210
6210
|
destinationPath: "" + id,
|
|
@@ -6218,9 +6218,9 @@ function getAssistantAgentHandler(logger) {
|
|
|
6218
6218
|
}, null, 2)
|
|
6219
6219
|
});
|
|
6220
6220
|
console.log('Tool outputs submitted successfully.');
|
|
6221
|
-
_context5.next =
|
|
6221
|
+
_context5.next = 22;
|
|
6222
6222
|
break;
|
|
6223
|
-
case
|
|
6223
|
+
case 20:
|
|
6224
6224
|
logger == null || logger.info({
|
|
6225
6225
|
destinationPath: "" + id,
|
|
6226
6226
|
statusCode: 404,
|
|
@@ -6231,13 +6231,12 @@ function getAssistantAgentHandler(logger) {
|
|
|
6231
6231
|
}, null, 2)
|
|
6232
6232
|
});
|
|
6233
6233
|
console.log('No tool outputs to submit.');
|
|
6234
|
-
case
|
|
6234
|
+
case 22:
|
|
6235
6235
|
return _context5.abrupt("return", handleRunStatus({
|
|
6236
6236
|
threadId: threadId,
|
|
6237
|
-
run: run
|
|
6238
|
-
callback: callback
|
|
6237
|
+
run: run
|
|
6239
6238
|
}));
|
|
6240
|
-
case
|
|
6239
|
+
case 23:
|
|
6241
6240
|
case "end":
|
|
6242
6241
|
return _context5.stop();
|
|
6243
6242
|
}
|
|
@@ -6347,11 +6346,11 @@ function getAssistantAgentHandler(logger) {
|
|
|
6347
6346
|
}(),
|
|
6348
6347
|
watchRun: function () {
|
|
6349
6348
|
var _watchRun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref13) {
|
|
6350
|
-
var runId, threadId,
|
|
6349
|
+
var runId, threadId, run;
|
|
6351
6350
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
6352
6351
|
while (1) switch (_context10.prev = _context10.next) {
|
|
6353
6352
|
case 0:
|
|
6354
|
-
runId = _ref13.runId, threadId = _ref13.threadId
|
|
6353
|
+
runId = _ref13.runId, threadId = _ref13.threadId;
|
|
6355
6354
|
if (!runId) {
|
|
6356
6355
|
_context10.next = 7;
|
|
6357
6356
|
break;
|
|
@@ -6390,8 +6389,7 @@ function getAssistantAgentHandler(logger) {
|
|
|
6390
6389
|
case 11:
|
|
6391
6390
|
return _context10.abrupt("return", handleRunStatus({
|
|
6392
6391
|
threadId: threadId,
|
|
6393
|
-
run: run
|
|
6394
|
-
callback: callback
|
|
6392
|
+
run: run
|
|
6395
6393
|
}));
|
|
6396
6394
|
case 12:
|
|
6397
6395
|
case "end":
|
|
@@ -7885,7 +7883,9 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7885
7883
|
var v = _ref30[1];
|
|
7886
7884
|
return _extends({}, acc, v);
|
|
7887
7885
|
}, {});
|
|
7888
|
-
console.log('got finalApis==='
|
|
7886
|
+
console.log('got finalApis===', {
|
|
7887
|
+
finalApis: finalApis
|
|
7888
|
+
});
|
|
7889
7889
|
return _context14.abrupt("return", getAgent({
|
|
7890
7890
|
connectionId: connectionId,
|
|
7891
7891
|
agent: agentBlueprint,
|
|
@@ -7908,11 +7908,11 @@ var Mastra = /*#__PURE__*/function () {
|
|
|
7908
7908
|
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
7909
7909
|
while (1) switch (_context15.prev = _context15.next) {
|
|
7910
7910
|
case 0:
|
|
7911
|
-
_context15.next =
|
|
7911
|
+
_context15.next = 2;
|
|
7912
7912
|
return syncAndWriteVectorProviderIndexesToLocal({
|
|
7913
7913
|
mastra: this
|
|
7914
7914
|
});
|
|
7915
|
-
case
|
|
7915
|
+
case 2:
|
|
7916
7916
|
case "end":
|
|
7917
7917
|
return _context15.stop();
|
|
7918
7918
|
}
|