@mastra/core 0.5.0-alpha.8 → 0.5.0
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.cjs +3 -2100
- package/dist/agent/index.d.cts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/{base-CTdONy0_.d.cts → base-CIPKleAU.d.cts} +103 -70
- package/dist/{base-DIn_km7X.d.ts → base-C_Oq53qk.d.ts} +103 -70
- package/dist/base.cjs +5 -140
- package/dist/bundler/index.cjs +5 -160
- package/dist/chunk-2W2GYEYQ.cjs +25 -0
- package/dist/chunk-3ASEZT7U.cjs +1586 -0
- package/dist/chunk-43Y7WG5W.cjs +335 -0
- package/dist/{chunk-HBHPTMAC.js → chunk-4Y74D74B.js} +46 -6
- package/dist/chunk-ENT7U27Y.cjs +37 -0
- package/dist/chunk-F5UYWPV4.cjs +14 -0
- package/dist/chunk-FL3GQXQ2.cjs +218 -0
- package/dist/chunk-FRQFWZDN.cjs +2 -0
- package/dist/chunk-GXQRMKSN.cjs +367 -0
- package/dist/chunk-HJPMYDWO.cjs +37 -0
- package/dist/chunk-IIWRJFLQ.cjs +51 -0
- package/dist/chunk-KFQ7Z3PO.cjs +347 -0
- package/dist/{chunk-SWDQYPJS.js → chunk-KP5UAFLN.js} +3 -2
- package/dist/chunk-KPKFLQFR.cjs +12 -0
- package/dist/{chunk-RRJB4TCC.js → chunk-MLFXOST6.js} +1 -1
- package/dist/{chunk-KBSR2LLT.js → chunk-OD7ZMKHY.js} +176 -63
- package/dist/chunk-OTFLHXHZ.cjs +65 -0
- package/dist/chunk-RWTSGWWL.cjs +81 -0
- package/dist/chunk-ST5RMVLG.cjs +87 -0
- package/dist/chunk-SYQ7NK2E.cjs +24 -0
- package/dist/chunk-UZNQG7QO.cjs +1868 -0
- package/dist/chunk-V5ORZPFW.cjs +38 -0
- package/dist/chunk-VA4P7QJT.cjs +443 -0
- package/dist/chunk-WB2HREXE.cjs +166 -0
- package/dist/chunk-WOMOGDGR.cjs +691 -0
- package/dist/chunk-XB2TJ7LX.cjs +408 -0
- package/dist/{chunk-QABMKXI3.js → chunk-XF2FMJYK.js} +1 -1
- package/dist/chunk-XLSROQ26.cjs +91 -0
- package/dist/chunk-YK3XJ52U.cjs +192 -0
- package/dist/{chunk-SF5GHHOQ.js → chunk-YPD6BQIM.js} +121 -93
- package/dist/deployer/index.cjs +5 -167
- package/dist/eval/index.cjs +9 -105
- package/dist/eval/index.d.cts +1 -1
- package/dist/eval/index.d.ts +1 -1
- package/dist/hooks/index.cjs +14 -83
- package/dist/index.cjs +253 -7470
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/integration/index.cjs +9 -108
- package/dist/integration/index.d.cts +1 -1
- package/dist/integration/index.d.ts +1 -1
- package/dist/llm/index.d.cts +1 -1
- package/dist/llm/index.d.ts +1 -1
- package/dist/logger/index.cjs +33 -161
- package/dist/mastra/index.cjs +3 -1755
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.ts +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +4 -2050
- package/dist/memory/index.d.cts +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/memory/index.js +1 -1
- package/dist/relevance/index.cjs +10 -2161
- package/dist/relevance/index.d.cts +19 -2
- package/dist/relevance/index.d.ts +19 -2
- package/dist/relevance/index.js +1 -1
- package/dist/storage/index.cjs +29 -367
- package/dist/storage/index.d.cts +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/libsql/index.cjs +9 -798
- package/dist/storage/libsql/index.d.cts +1 -1
- package/dist/storage/libsql/index.d.ts +1 -1
- package/dist/telemetry/index.cjs +21 -408
- package/dist/telemetry/index.d.cts +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/tools/index.cjs +11 -22
- package/dist/tools/index.d.cts +3 -3
- package/dist/tools/index.d.ts +3 -3
- package/dist/tts/index.cjs +3 -328
- package/dist/utils.cjs +41 -309
- package/dist/utils.d.cts +10 -4
- package/dist/utils.d.ts +10 -4
- package/dist/utils.js +1 -1
- package/dist/vector/filter/index.cjs +7 -189
- package/dist/vector/index.cjs +5 -172
- package/dist/vector/libsql/index.cjs +9 -1047
- package/dist/voice/index.cjs +8 -306
- package/dist/workflows/index.cjs +65 -1925
- package/dist/workflows/index.d.cts +4 -3
- package/dist/workflows/index.d.ts +4 -3
- package/dist/workflows/index.js +1 -1
- package/package.json +27 -27
package/dist/eval/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Metric, T as TestInfo, a as MetricResult } from '../types-CwTG2XyQ.cjs';
|
|
2
|
-
import { A as Agent } from '../base-
|
|
2
|
+
import { A as Agent } from '../base-CIPKleAU.cjs';
|
|
3
3
|
import 'ai';
|
|
4
4
|
import '../base-DboIg_Cd.cjs';
|
|
5
5
|
import '@opentelemetry/api';
|
package/dist/eval/index.d.ts
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -1,87 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
function mitt(all) {
|
|
5
|
-
all = all || /* @__PURE__ */ new Map();
|
|
6
|
-
return {
|
|
7
|
-
/**
|
|
8
|
-
* A Map of event names to registered handler functions.
|
|
9
|
-
*/
|
|
10
|
-
all,
|
|
11
|
-
/**
|
|
12
|
-
* Register an event handler for the given type.
|
|
13
|
-
* @param {string|symbol} type Type of event to listen for, or `'*'` for all events
|
|
14
|
-
* @param {Function} handler Function to call in response to given event
|
|
15
|
-
* @memberOf mitt
|
|
16
|
-
*/
|
|
17
|
-
on(type, handler) {
|
|
18
|
-
const handlers = all.get(type);
|
|
19
|
-
if (handlers) {
|
|
20
|
-
handlers.push(handler);
|
|
21
|
-
} else {
|
|
22
|
-
all.set(type, [handler]);
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
/**
|
|
26
|
-
* Remove an event handler for the given type.
|
|
27
|
-
* If `handler` is omitted, all handlers of the given type are removed.
|
|
28
|
-
* @param {string|symbol} type Type of event to unregister `handler` from (`'*'` to remove a wildcard handler)
|
|
29
|
-
* @param {Function} [handler] Handler function to remove
|
|
30
|
-
* @memberOf mitt
|
|
31
|
-
*/
|
|
32
|
-
off(type, handler) {
|
|
33
|
-
const handlers = all.get(type);
|
|
34
|
-
if (handlers) {
|
|
35
|
-
if (handler) {
|
|
36
|
-
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
37
|
-
} else {
|
|
38
|
-
all.set(type, []);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* Invoke all handlers for the given type.
|
|
44
|
-
* If present, `'*'` handlers are invoked after type-matched handlers.
|
|
45
|
-
*
|
|
46
|
-
* Note: Manually firing '*' handlers is not supported.
|
|
47
|
-
*
|
|
48
|
-
* @param {string|symbol} type The event type to invoke
|
|
49
|
-
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
50
|
-
* @memberOf mitt
|
|
51
|
-
*/
|
|
52
|
-
emit(type, evt) {
|
|
53
|
-
let handlers = all.get(type);
|
|
54
|
-
if (handlers) {
|
|
55
|
-
handlers.slice().map((handler) => {
|
|
56
|
-
handler(evt);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
handlers = all.get("*");
|
|
60
|
-
if (handlers) {
|
|
61
|
-
handlers.slice().map((handler) => {
|
|
62
|
-
handler(type, evt);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
3
|
+
var chunkST5RMVLG_cjs = require('../chunk-ST5RMVLG.cjs');
|
|
68
4
|
|
|
69
|
-
// src/hooks/index.ts
|
|
70
|
-
var AvailableHooks = /* @__PURE__ */ ((AvailableHooks2) => {
|
|
71
|
-
AvailableHooks2["ON_EVALUATION"] = "onEvaluation";
|
|
72
|
-
AvailableHooks2["ON_GENERATION"] = "onGeneration";
|
|
73
|
-
return AvailableHooks2;
|
|
74
|
-
})(AvailableHooks || {});
|
|
75
|
-
var hooks = mitt();
|
|
76
|
-
function registerHook(hook, action) {
|
|
77
|
-
hooks.on(hook, action);
|
|
78
|
-
}
|
|
79
|
-
function executeHook(hook, data) {
|
|
80
|
-
setImmediate(() => {
|
|
81
|
-
hooks.emit(hook, data);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
5
|
|
|
85
|
-
|
|
86
|
-
exports
|
|
87
|
-
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "AvailableHooks", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkST5RMVLG_cjs.AvailableHooks; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "executeHook", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkST5RMVLG_cjs.executeHook; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "registerHook", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkST5RMVLG_cjs.registerHook; }
|
|
18
|
+
});
|