@mastra/core 0.9.4 → 0.10.0-alpha.1
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/README.md +3 -2
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +13 -14
- package/dist/agent/index.d.ts +13 -14
- package/dist/agent/index.js +1 -1
- package/dist/{base-BCfssGt6.d.ts → base-DttB7sJD.d.ts} +1187 -886
- package/dist/{base-CAEcd6q2.d.cts → base-aJ3etsh5.d.cts} +1187 -886
- package/dist/{base-H7siSAfu.d.cts → base-aPYtPBT2.d.cts} +3 -3
- package/dist/{base-4Z34GQL8.d.ts → base-tc5kgDTD.d.ts} +3 -3
- package/dist/base.cjs +2 -2
- package/dist/base.d.cts +2 -3
- package/dist/base.d.ts +2 -3
- package/dist/base.js +1 -1
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.d.cts +2 -3
- package/dist/bundler/index.d.ts +2 -3
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-W4BSLENO.js → chunk-2NTUAUGH.js} +1 -1
- package/dist/{chunk-S34QVMKE.js → chunk-2PW6UJMW.js} +77 -10
- package/dist/{chunk-WE36CRQV.cjs → chunk-2U7ZZUFO.cjs} +2 -2
- package/dist/{workflows/vNext/index.js → chunk-3SQ3G2EJ.js} +19 -16
- package/dist/chunk-5HULBQ2W.cjs +38 -0
- package/dist/{chunk-XRGDVLM4.cjs → chunk-5JRD3NDP.cjs} +15 -15
- package/dist/{chunk-GXKODTLA.cjs → chunk-5W2G7S44.cjs} +83 -68
- package/dist/chunk-75Z4BZEE.js +36 -0
- package/dist/{chunk-66GQROSI.cjs → chunk-AOGUTJUO.cjs} +58 -51
- package/dist/{chunk-WIKOYZ63.js → chunk-BPTSLJHA.js} +9 -9
- package/dist/{chunk-JBJ7KXN5.js → chunk-C3ICEF6E.js} +1 -1
- package/dist/{chunk-E4FAXBUV.cjs → chunk-CWSFP2HS.cjs} +2 -2
- package/dist/{chunk-FW5RS6WV.js → chunk-E7CLY6SK.js} +42 -35
- package/dist/{chunk-235X76GC.js → chunk-FI7R232B.js} +2 -2
- package/dist/chunk-GQ2XQ4UN.js +321 -0
- package/dist/{chunk-H4CEZSRM.js → chunk-J7GDGV6F.js} +1 -1
- package/dist/{chunk-NLBJOFNG.js → chunk-JW5TMK2L.js} +1 -1
- package/dist/{chunk-NOPY74PV.js → chunk-KJQFFEEQ.js} +1 -1
- package/dist/{chunk-V2Q2FEVO.cjs → chunk-KSPHQSZX.cjs} +2 -2
- package/dist/{chunk-NZV4OA6P.js → chunk-LHRZV5VG.js} +2 -23
- package/dist/chunk-NMDM4IZN.cjs +78 -0
- package/dist/chunk-OBEALYTK.js +74 -0
- package/dist/{chunk-PEK4TY3P.js → chunk-OCT2762Q.js} +1 -1
- package/dist/{chunk-5DUFC7TV.cjs → chunk-P7BGXOQV.cjs} +2 -2
- package/dist/{chunk-WQKOM7XM.cjs → chunk-PIZM25KI.cjs} +3 -24
- package/dist/{chunk-S7J63JOG.cjs → chunk-RVS6OUJN.cjs} +2 -2
- package/dist/{chunk-5JUWUTPJ.cjs → chunk-SKG2NIZW.cjs} +2 -2
- package/dist/chunk-SWW4EBUZ.cjs +96 -0
- package/dist/{chunk-RGE4UF6A.cjs → chunk-TMPFLJLG.cjs} +2 -2
- package/dist/{workflows/vNext/index.cjs → chunk-TTKQ37ZZ.cjs} +24 -21
- package/dist/{chunk-EJITEVAB.cjs → chunk-U3L3NEOM.cjs} +81 -10
- package/dist/chunk-VHLL4AZK.js +90 -0
- package/dist/{chunk-EG74VBSP.cjs → chunk-YEULQPUY.cjs} +6 -6
- package/dist/{chunk-SOLXHDNQ.js → chunk-ZB3LEHL2.js} +81 -66
- package/dist/{chunk-TAFOICHR.js → chunk-ZKN6HYYQ.js} +1 -1
- package/dist/chunk-ZZDAC5KD.cjs +325 -0
- package/dist/deployer/index.cjs +2 -2
- package/dist/deployer/index.d.cts +2 -3
- package/dist/deployer/index.d.ts +2 -3
- package/dist/deployer/index.js +1 -1
- package/dist/eval/index.d.cts +13 -14
- package/dist/eval/index.d.ts +13 -14
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.cjs +88 -159
- package/dist/index.d.cts +17 -25
- package/dist/index.d.ts +17 -25
- package/dist/index.js +18 -25
- package/dist/integration/index.cjs +3 -3
- package/dist/integration/index.d.cts +12 -13
- package/dist/integration/index.d.ts +12 -13
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.d.cts +13 -14
- package/dist/llm/index.d.ts +13 -14
- package/dist/logger/index.cjs +18 -17
- package/dist/logger/index.d.cts +42 -2
- package/dist/logger/index.d.ts +42 -2
- package/dist/logger/index.js +2 -1
- package/dist/{index-QV27jkxQ.d.ts → logger-EhZkzZOr.d.cts} +38 -52
- package/dist/{index-QV27jkxQ.d.cts → logger-EhZkzZOr.d.ts} +38 -52
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.cts +11 -12
- package/dist/mastra/index.d.ts +11 -12
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +75 -17
- package/dist/mcp/index.d.cts +14 -15
- package/dist/mcp/index.d.ts +14 -15
- package/dist/mcp/index.js +69 -15
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.d.cts +12 -13
- package/dist/memory/index.d.ts +12 -13
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +8 -8
- package/dist/network/index.d.cts +12 -13
- package/dist/network/index.d.ts +12 -13
- package/dist/network/index.js +5 -5
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +15 -16
- package/dist/relevance/index.d.ts +15 -16
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +4 -0
- package/dist/server/index.d.cts +13 -12
- package/dist/server/index.d.ts +13 -12
- package/dist/server/index.js +4 -1
- package/dist/storage/index.cjs +184 -3
- package/dist/storage/index.d.cts +83 -13
- package/dist/storage/index.d.ts +83 -13
- package/dist/storage/index.js +186 -1
- package/dist/telemetry/index.d.cts +14 -15
- package/dist/telemetry/index.d.ts +14 -15
- package/dist/telemetry/otel-vendor.cjs +2 -2
- package/dist/telemetry/otel-vendor.d.cts +1 -1
- package/dist/telemetry/otel-vendor.d.ts +1 -1
- package/dist/telemetry/otel-vendor.js +1 -1
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.d.cts +12 -13
- package/dist/tools/index.d.ts +12 -13
- package/dist/tools/index.js +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.d.cts +2 -3
- package/dist/tts/index.d.ts +2 -3
- package/dist/tts/index.js +1 -1
- package/dist/{types-BtMyV38I.d.ts → types-Bo1uigWx.d.cts} +1 -1
- package/dist/{types-BtMyV38I.d.cts → types-Bo1uigWx.d.ts} +1 -1
- package/dist/utils.cjs +28 -12
- package/dist/utils.d.cts +59 -16
- package/dist/utils.d.ts +59 -16
- package/dist/utils.js +1 -1
- package/dist/vector/filter/index.cjs +189 -7
- package/dist/vector/filter/index.js +190 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.d.cts +28 -20
- package/dist/vector/index.d.ts +28 -20
- package/dist/vector/index.js +1 -1
- package/dist/voice/index.cjs +4 -4
- package/dist/voice/index.d.cts +12 -13
- package/dist/voice/index.d.ts +12 -13
- package/dist/voice/index.js +1 -1
- package/dist/workflows/index.cjs +17 -69
- package/dist/workflows/index.d.cts +197 -77
- package/dist/workflows/index.d.ts +197 -77
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +90 -0
- package/dist/workflows/legacy/index.d.cts +87 -0
- package/dist/workflows/legacy/index.d.ts +87 -0
- package/dist/workflows/legacy/index.js +1 -0
- package/package.json +19 -40
- package/workflows/legacy.d.ts +1 -0
- package/dist/chunk-4WABQORE.js +0 -781
- package/dist/chunk-CIEPFV6B.js +0 -658
- package/dist/chunk-CMPPXW4U.js +0 -154
- package/dist/chunk-CTKNWYK2.js +0 -131
- package/dist/chunk-LGERQTJM.js +0 -190
- package/dist/chunk-O44MSFMZ.cjs +0 -168
- package/dist/chunk-QDAMIZY3.cjs +0 -783
- package/dist/chunk-QHDPLMHB.cjs +0 -667
- package/dist/chunk-RAQBTCIR.cjs +0 -134
- package/dist/chunk-YK3XJ52U.cjs +0 -192
- package/dist/storage/libsql/index.cjs +0 -581
- package/dist/storage/libsql/index.d.cts +0 -104
- package/dist/storage/libsql/index.d.ts +0 -104
- package/dist/storage/libsql/index.js +0 -578
- package/dist/vector/libsql/index.cjs +0 -14
- package/dist/vector/libsql/index.d.cts +0 -82
- package/dist/vector/libsql/index.d.ts +0 -82
- package/dist/vector/libsql/index.js +0 -1
- package/dist/workflows/vNext/index.d.cts +0 -209
- package/dist/workflows/vNext/index.d.ts +0 -209
- package/storage/libsql.d.ts +0 -1
- package/vector/libsql.d.ts +0 -1
- package/workflows/vNext.d.ts +0 -1
package/dist/storage/index.js
CHANGED
|
@@ -1,2 +1,187 @@
|
|
|
1
|
-
|
|
1
|
+
import { MastraStorage } from '../chunk-ZKN6HYYQ.js';
|
|
2
|
+
export { MastraStorage } from '../chunk-ZKN6HYYQ.js';
|
|
2
3
|
export { TABLE_EVALS, TABLE_MESSAGES, TABLE_SCHEMAS, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT } from '../chunk-SEOWDGC2.js';
|
|
4
|
+
|
|
5
|
+
// src/storage/mock.ts
|
|
6
|
+
var MockStore = class extends MastraStorage {
|
|
7
|
+
data = {
|
|
8
|
+
mastra_workflow_snapshot: {},
|
|
9
|
+
mastra_evals: {},
|
|
10
|
+
mastra_messages: {},
|
|
11
|
+
mastra_threads: {},
|
|
12
|
+
mastra_traces: {}
|
|
13
|
+
};
|
|
14
|
+
constructor() {
|
|
15
|
+
super({ name: "MockStore" });
|
|
16
|
+
this.hasInitialized = Promise.resolve(true);
|
|
17
|
+
}
|
|
18
|
+
async createTable({ tableName }) {
|
|
19
|
+
this.logger.debug(`MockStore: createTable called for ${tableName}`);
|
|
20
|
+
}
|
|
21
|
+
async clearTable({ tableName }) {
|
|
22
|
+
this.logger.debug(`MockStore: clearTable called for ${tableName}`);
|
|
23
|
+
this.data[tableName] = {};
|
|
24
|
+
}
|
|
25
|
+
async insert({ tableName, record }) {
|
|
26
|
+
this.logger.debug(`MockStore: insert called for ${tableName}`, record);
|
|
27
|
+
this.data[tableName][record.run_id] = JSON.parse(JSON.stringify(record));
|
|
28
|
+
}
|
|
29
|
+
async batchInsert({ tableName, records }) {
|
|
30
|
+
this.logger.debug(`MockStore: batchInsert called for ${tableName} with ${records.length} records`);
|
|
31
|
+
for (const record of records) {
|
|
32
|
+
this.data[tableName][record.run_id] = JSON.parse(JSON.stringify(record));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async load({ tableName, keys }) {
|
|
36
|
+
this.logger.debug(`MockStore: load called for ${tableName} with keys`, keys);
|
|
37
|
+
const record = this.data[tableName][keys.run_id];
|
|
38
|
+
return record ? record : null;
|
|
39
|
+
}
|
|
40
|
+
async getThreadById({ threadId }) {
|
|
41
|
+
this.logger.debug(`MockStore: getThreadById called for ${threadId}`);
|
|
42
|
+
const thread = Object.values(this.data.mastra_threads).find((t) => t.id === threadId);
|
|
43
|
+
return thread ? thread : null;
|
|
44
|
+
}
|
|
45
|
+
async getThreadsByResourceId({ resourceId }) {
|
|
46
|
+
this.logger.debug(`MockStore: getThreadsByResourceId called for ${resourceId}`);
|
|
47
|
+
const threads = Object.values(this.data.mastra_threads).filter((t) => t.resourceId === resourceId);
|
|
48
|
+
return threads;
|
|
49
|
+
}
|
|
50
|
+
async saveThread({ thread }) {
|
|
51
|
+
this.logger.debug(`MockStore: saveThread called for ${thread.id}`);
|
|
52
|
+
const key = thread.id;
|
|
53
|
+
this.data.mastra_threads[key] = thread;
|
|
54
|
+
return thread;
|
|
55
|
+
}
|
|
56
|
+
async updateThread({
|
|
57
|
+
id,
|
|
58
|
+
title,
|
|
59
|
+
metadata
|
|
60
|
+
}) {
|
|
61
|
+
this.logger.debug(`MockStore: updateThread called for ${id}`);
|
|
62
|
+
const thread = this.data.mastra_threads[id];
|
|
63
|
+
if (thread) {
|
|
64
|
+
thread.title = title;
|
|
65
|
+
thread.metadata = { ...thread.metadata, ...metadata };
|
|
66
|
+
thread.updatedAt = /* @__PURE__ */ new Date();
|
|
67
|
+
}
|
|
68
|
+
return thread;
|
|
69
|
+
}
|
|
70
|
+
async deleteThread({ threadId }) {
|
|
71
|
+
this.logger.debug(`MockStore: deleteThread called for ${threadId}`);
|
|
72
|
+
delete this.data.mastra_threads[threadId];
|
|
73
|
+
this.data.mastra_messages = Object.fromEntries(
|
|
74
|
+
Object.entries(this.data.mastra_messages).filter(([, msg]) => msg.threadId !== threadId)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
async getMessages({ threadId, selectBy }) {
|
|
78
|
+
this.logger.debug(`MockStore: getMessages called for thread ${threadId}`);
|
|
79
|
+
let messages = Object.values(this.data.mastra_messages).filter((msg) => msg.threadId === threadId);
|
|
80
|
+
if (selectBy?.last) {
|
|
81
|
+
messages = messages.slice(-selectBy.last);
|
|
82
|
+
}
|
|
83
|
+
messages.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());
|
|
84
|
+
return messages;
|
|
85
|
+
}
|
|
86
|
+
async saveMessages({ messages }) {
|
|
87
|
+
this.logger.debug(`MockStore: saveMessages called with ${messages.length} messages`);
|
|
88
|
+
for (const message of messages) {
|
|
89
|
+
const key = message.id;
|
|
90
|
+
this.data.mastra_messages[key] = message;
|
|
91
|
+
}
|
|
92
|
+
return messages;
|
|
93
|
+
}
|
|
94
|
+
async getTraces({
|
|
95
|
+
name,
|
|
96
|
+
scope,
|
|
97
|
+
page,
|
|
98
|
+
perPage,
|
|
99
|
+
attributes,
|
|
100
|
+
filters,
|
|
101
|
+
fromDate,
|
|
102
|
+
toDate
|
|
103
|
+
}) {
|
|
104
|
+
this.logger.debug(`MockStore: getTraces called`);
|
|
105
|
+
let traces = Object.values(this.data.mastra_traces);
|
|
106
|
+
if (name) traces = traces.filter((t) => t.name?.startsWith(name));
|
|
107
|
+
if (scope) traces = traces.filter((t) => t.scope === scope);
|
|
108
|
+
if (attributes) {
|
|
109
|
+
traces = traces.filter(
|
|
110
|
+
(t) => Object.entries(attributes).every(([key, value]) => t.attributes?.[key] === value)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
if (filters) {
|
|
114
|
+
traces = traces.filter((t) => Object.entries(filters).every(([key, value]) => t[key] === value));
|
|
115
|
+
}
|
|
116
|
+
if (fromDate) traces = traces.filter((t) => new Date(t.createdAt) >= fromDate);
|
|
117
|
+
if (toDate) traces = traces.filter((t) => new Date(t.createdAt) <= toDate);
|
|
118
|
+
traces.sort((a, b) => new Date(b.startTime).getTime() - new Date(a.startTime).getTime());
|
|
119
|
+
const start = page * perPage;
|
|
120
|
+
const end = start + perPage;
|
|
121
|
+
return traces.slice(start, end);
|
|
122
|
+
}
|
|
123
|
+
async getEvalsByAgentName(agentName, type) {
|
|
124
|
+
this.logger.debug(`MockStore: getEvalsByAgentName called for ${agentName}`);
|
|
125
|
+
let evals = Object.values(this.data.mastra_evals).filter((e) => e.agentName === agentName);
|
|
126
|
+
if (type === "test") {
|
|
127
|
+
evals = evals.filter((e) => e.testInfo && e.testInfo.testPath);
|
|
128
|
+
} else if (type === "live") {
|
|
129
|
+
evals = evals.filter((e) => !e.testInfo || !e.testInfo.testPath);
|
|
130
|
+
}
|
|
131
|
+
evals.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
132
|
+
return evals;
|
|
133
|
+
}
|
|
134
|
+
async getWorkflowRuns({
|
|
135
|
+
workflowName,
|
|
136
|
+
fromDate,
|
|
137
|
+
toDate,
|
|
138
|
+
limit,
|
|
139
|
+
offset,
|
|
140
|
+
resourceId
|
|
141
|
+
} = {}) {
|
|
142
|
+
this.logger.debug(`MockStore: getWorkflowRuns called`);
|
|
143
|
+
let runs = Object.values(this.data.mastra_workflow_snapshot || {});
|
|
144
|
+
if (workflowName) runs = runs.filter((run) => run.workflow_name === workflowName);
|
|
145
|
+
if (fromDate) runs = runs.filter((run) => new Date(run.createdAt) >= fromDate);
|
|
146
|
+
if (toDate) runs = runs.filter((run) => new Date(run.createdAt) <= toDate);
|
|
147
|
+
if (resourceId) runs = runs.filter((run) => run.resourceId === resourceId);
|
|
148
|
+
const total = runs.length;
|
|
149
|
+
runs.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
150
|
+
if (limit !== void 0 && offset !== void 0) {
|
|
151
|
+
const start = offset;
|
|
152
|
+
const end = start + limit;
|
|
153
|
+
runs = runs.slice(start, end);
|
|
154
|
+
}
|
|
155
|
+
const parsedRuns = runs.map((run) => ({
|
|
156
|
+
...run,
|
|
157
|
+
snapshot: typeof run.snapshot === "string" ? JSON.parse(run.snapshot) : { ...run.snapshot },
|
|
158
|
+
createdAt: new Date(run.createdAt),
|
|
159
|
+
updatedAt: new Date(run.updatedAt),
|
|
160
|
+
runId: run.run_id,
|
|
161
|
+
workflowName: run.workflow_name
|
|
162
|
+
}));
|
|
163
|
+
return { runs: parsedRuns, total };
|
|
164
|
+
}
|
|
165
|
+
async getWorkflowRunById({
|
|
166
|
+
runId,
|
|
167
|
+
workflowName
|
|
168
|
+
}) {
|
|
169
|
+
this.logger.debug(`MockStore: getWorkflowRunById called for runId ${runId}`);
|
|
170
|
+
let run = Object.values(this.data.mastra_workflow_snapshot || {}).find((r) => r.run_id === runId);
|
|
171
|
+
if (run && workflowName && run.workflow_name !== workflowName) {
|
|
172
|
+
run = void 0;
|
|
173
|
+
}
|
|
174
|
+
if (!run) return null;
|
|
175
|
+
const parsedRun = {
|
|
176
|
+
...run,
|
|
177
|
+
snapshot: typeof run.snapshot === "string" ? JSON.parse(run.snapshot) : run.snapshot,
|
|
178
|
+
createdAt: new Date(run.createdAt),
|
|
179
|
+
updatedAt: new Date(run.updatedAt),
|
|
180
|
+
runId: run.run_id,
|
|
181
|
+
workflowName: run.workflow_name
|
|
182
|
+
};
|
|
183
|
+
return parsedRun;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export { MockStore };
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from '../base-
|
|
1
|
+
export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from '../base-aPYtPBT2.cjs';
|
|
2
2
|
import { SpanKind, Context } from '@opentelemetry/api';
|
|
3
3
|
import { ExportResult } from '@opentelemetry/core';
|
|
4
4
|
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { I as IMastraLogger } from '../logger-EhZkzZOr.cjs';
|
|
6
|
+
import { c as MastraStorage } from '../base-aJ3etsh5.cjs';
|
|
7
7
|
import 'stream';
|
|
8
|
-
import 'pino';
|
|
9
8
|
import 'ai';
|
|
10
|
-
import '../types-
|
|
9
|
+
import '../types-Bo1uigWx.cjs';
|
|
11
10
|
import 'sift';
|
|
12
11
|
import 'zod';
|
|
13
12
|
import 'json-schema';
|
|
13
|
+
import '../deployer/index.cjs';
|
|
14
|
+
import '../bundler/index.cjs';
|
|
15
|
+
import 'node:http';
|
|
16
|
+
import 'hono';
|
|
14
17
|
import '../runtime-context/index.cjs';
|
|
15
|
-
import 'xstate';
|
|
16
|
-
import 'node:events';
|
|
17
18
|
import '../vector/index.cjs';
|
|
18
19
|
import '../vector/filter/index.cjs';
|
|
19
|
-
import '../tts/index.cjs';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'hono';
|
|
22
|
-
import 'events';
|
|
23
|
-
import '../deployer/index.cjs';
|
|
24
|
-
import '../bundler/index.cjs';
|
|
25
20
|
import 'hono/cors';
|
|
26
21
|
import 'hono-openapi';
|
|
22
|
+
import '../tts/index.cjs';
|
|
23
|
+
import 'xstate';
|
|
24
|
+
import 'node:events';
|
|
25
|
+
import 'events';
|
|
27
26
|
import 'ai/test';
|
|
28
27
|
|
|
29
28
|
declare function withSpan(options: {
|
|
@@ -59,14 +58,14 @@ declare class OTLPTraceExporter implements SpanExporter {
|
|
|
59
58
|
private logger;
|
|
60
59
|
private activeFlush;
|
|
61
60
|
constructor({ logger, storage }: {
|
|
62
|
-
logger:
|
|
61
|
+
logger: IMastraLogger;
|
|
63
62
|
storage: MastraStorage;
|
|
64
63
|
});
|
|
65
64
|
export(internalRepresentation: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
66
65
|
shutdown(): Promise<void>;
|
|
67
66
|
flush(): Promise<void>;
|
|
68
67
|
forceFlush(): Promise<void>;
|
|
69
|
-
__setLogger(logger:
|
|
68
|
+
__setLogger(logger: IMastraLogger): void;
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, getBaggageValues, hasActiveTelemetry, withSpan };
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from '../base-
|
|
1
|
+
export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from '../base-tc5kgDTD.js';
|
|
2
2
|
import { SpanKind, Context } from '@opentelemetry/api';
|
|
3
3
|
import { ExportResult } from '@opentelemetry/core';
|
|
4
4
|
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { I as IMastraLogger } from '../logger-EhZkzZOr.js';
|
|
6
|
+
import { c as MastraStorage } from '../base-DttB7sJD.js';
|
|
7
7
|
import 'stream';
|
|
8
|
-
import 'pino';
|
|
9
8
|
import 'ai';
|
|
10
|
-
import '../types-
|
|
9
|
+
import '../types-Bo1uigWx.js';
|
|
11
10
|
import 'sift';
|
|
12
11
|
import 'zod';
|
|
13
12
|
import 'json-schema';
|
|
13
|
+
import '../deployer/index.js';
|
|
14
|
+
import '../bundler/index.js';
|
|
15
|
+
import 'node:http';
|
|
16
|
+
import 'hono';
|
|
14
17
|
import '../runtime-context/index.js';
|
|
15
|
-
import 'xstate';
|
|
16
|
-
import 'node:events';
|
|
17
18
|
import '../vector/index.js';
|
|
18
19
|
import '../vector/filter/index.js';
|
|
19
|
-
import '../tts/index.js';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'hono';
|
|
22
|
-
import 'events';
|
|
23
|
-
import '../deployer/index.js';
|
|
24
|
-
import '../bundler/index.js';
|
|
25
20
|
import 'hono/cors';
|
|
26
21
|
import 'hono-openapi';
|
|
22
|
+
import '../tts/index.js';
|
|
23
|
+
import 'xstate';
|
|
24
|
+
import 'node:events';
|
|
25
|
+
import 'events';
|
|
27
26
|
import 'ai/test';
|
|
28
27
|
|
|
29
28
|
declare function withSpan(options: {
|
|
@@ -59,14 +58,14 @@ declare class OTLPTraceExporter implements SpanExporter {
|
|
|
59
58
|
private logger;
|
|
60
59
|
private activeFlush;
|
|
61
60
|
constructor({ logger, storage }: {
|
|
62
|
-
logger:
|
|
61
|
+
logger: IMastraLogger;
|
|
63
62
|
storage: MastraStorage;
|
|
64
63
|
});
|
|
65
64
|
export(internalRepresentation: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
66
65
|
shutdown(): Promise<void>;
|
|
67
66
|
flush(): Promise<void>;
|
|
68
67
|
forceFlush(): Promise<void>;
|
|
69
|
-
__setLogger(logger:
|
|
68
|
+
__setLogger(logger: IMastraLogger): void;
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, getBaggageValues, hasActiveTelemetry, withSpan };
|
|
@@ -72,9 +72,9 @@ Object.defineProperty(exports, "ATTR_SERVICE_NAME", {
|
|
|
72
72
|
enumerable: true,
|
|
73
73
|
get: function () { return semanticConventions.ATTR_SERVICE_NAME; }
|
|
74
74
|
});
|
|
75
|
-
Object.defineProperty(exports, "
|
|
75
|
+
Object.defineProperty(exports, "resourceFromAttributes", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return resources.
|
|
77
|
+
get: function () { return resources.resourceFromAttributes; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "OTLPHttpExporter", {
|
|
80
80
|
enumerable: true,
|
|
@@ -2,7 +2,7 @@ export { NodeSDK } from '@opentelemetry/sdk-node';
|
|
|
2
2
|
export { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
3
3
|
export { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
|
|
4
4
|
export { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
|
|
5
|
-
export {
|
|
5
|
+
export { resourceFromAttributes } from '@opentelemetry/resources';
|
|
6
6
|
export { OTLPTraceExporter as OTLPHttpExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
7
7
|
export { OTLPTraceExporter as OTLPGrpcExporter } from '@opentelemetry/exporter-trace-otlp-grpc';
|
|
8
8
|
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
@@ -2,7 +2,7 @@ export { NodeSDK } from '@opentelemetry/sdk-node';
|
|
|
2
2
|
export { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
3
3
|
export { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
|
|
4
4
|
export { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
|
|
5
|
-
export {
|
|
5
|
+
export { resourceFromAttributes } from '@opentelemetry/resources';
|
|
6
6
|
export { OTLPTraceExporter as OTLPHttpExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
7
7
|
export { OTLPTraceExporter as OTLPGrpcExporter } from '@opentelemetry/exporter-trace-otlp-grpc';
|
|
8
8
|
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
@@ -2,7 +2,7 @@ export { NodeSDK } from '@opentelemetry/sdk-node';
|
|
|
2
2
|
export { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
3
3
|
export { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
|
|
4
4
|
export { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
|
|
5
|
-
export {
|
|
5
|
+
export { resourceFromAttributes } from '@opentelemetry/resources';
|
|
6
6
|
export { OTLPTraceExporter as OTLPHttpExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
7
7
|
export { OTLPTraceExporter as OTLPGrpcExporter } from '@opentelemetry/exporter-trace-otlp-grpc';
|
|
8
8
|
export { AlwaysOffSampler, AlwaysOnSampler, ParentBasedSampler, TraceIdRatioBasedSampler } from '@opentelemetry/sdk-trace-base';
|
package/dist/tools/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkU3L3NEOM_cjs = require('../chunk-U3L3NEOM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Tool", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkU3L3NEOM_cjs.Tool; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "createTool", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkU3L3NEOM_cjs.createTool; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "isVercelTool", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkU3L3NEOM_cjs.isVercelTool; }
|
|
18
18
|
});
|
package/dist/tools/index.d.cts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aP as CoreTool, aQ as InternalCoreTool, ad as Tool, a9 as ToolAction, ac as ToolExecutionContext, aO as VercelTool, aN as createTool } from '../base-aJ3etsh5.cjs';
|
|
2
2
|
export { isVercelTool } from '../utils.cjs';
|
|
3
3
|
import 'ai';
|
|
4
|
-
import '../base-
|
|
4
|
+
import '../base-aPYtPBT2.cjs';
|
|
5
5
|
import '@opentelemetry/api';
|
|
6
|
-
import '../
|
|
6
|
+
import '../logger-EhZkzZOr.cjs';
|
|
7
7
|
import 'stream';
|
|
8
|
-
import 'pino';
|
|
9
8
|
import '@opentelemetry/sdk-trace-base';
|
|
10
|
-
import '../types-
|
|
9
|
+
import '../types-Bo1uigWx.cjs';
|
|
11
10
|
import 'sift';
|
|
12
11
|
import 'zod';
|
|
13
12
|
import 'json-schema';
|
|
13
|
+
import '../deployer/index.cjs';
|
|
14
|
+
import '../bundler/index.cjs';
|
|
15
|
+
import 'node:http';
|
|
16
|
+
import 'hono';
|
|
14
17
|
import '../runtime-context/index.cjs';
|
|
15
|
-
import 'xstate';
|
|
16
|
-
import 'node:events';
|
|
17
18
|
import '../vector/index.cjs';
|
|
18
19
|
import '../vector/filter/index.cjs';
|
|
19
|
-
import '../tts/index.cjs';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'hono';
|
|
22
|
-
import 'events';
|
|
23
|
-
import '../deployer/index.cjs';
|
|
24
|
-
import '../bundler/index.cjs';
|
|
25
20
|
import 'hono/cors';
|
|
26
21
|
import 'hono-openapi';
|
|
22
|
+
import '../tts/index.cjs';
|
|
23
|
+
import 'xstate';
|
|
24
|
+
import 'node:events';
|
|
25
|
+
import 'events';
|
|
27
26
|
import 'ai/test';
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aP as CoreTool, aQ as InternalCoreTool, ad as Tool, a9 as ToolAction, ac as ToolExecutionContext, aO as VercelTool, aN as createTool } from '../base-DttB7sJD.js';
|
|
2
2
|
export { isVercelTool } from '../utils.js';
|
|
3
3
|
import 'ai';
|
|
4
|
-
import '../base-
|
|
4
|
+
import '../base-tc5kgDTD.js';
|
|
5
5
|
import '@opentelemetry/api';
|
|
6
|
-
import '../
|
|
6
|
+
import '../logger-EhZkzZOr.js';
|
|
7
7
|
import 'stream';
|
|
8
|
-
import 'pino';
|
|
9
8
|
import '@opentelemetry/sdk-trace-base';
|
|
10
|
-
import '../types-
|
|
9
|
+
import '../types-Bo1uigWx.js';
|
|
11
10
|
import 'sift';
|
|
12
11
|
import 'zod';
|
|
13
12
|
import 'json-schema';
|
|
13
|
+
import '../deployer/index.js';
|
|
14
|
+
import '../bundler/index.js';
|
|
15
|
+
import 'node:http';
|
|
16
|
+
import 'hono';
|
|
14
17
|
import '../runtime-context/index.js';
|
|
15
|
-
import 'xstate';
|
|
16
|
-
import 'node:events';
|
|
17
18
|
import '../vector/index.js';
|
|
18
19
|
import '../vector/filter/index.js';
|
|
19
|
-
import '../tts/index.js';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'hono';
|
|
22
|
-
import 'events';
|
|
23
|
-
import '../deployer/index.js';
|
|
24
|
-
import '../bundler/index.js';
|
|
25
20
|
import 'hono/cors';
|
|
26
21
|
import 'hono-openapi';
|
|
22
|
+
import '../tts/index.js';
|
|
23
|
+
import 'xstate';
|
|
24
|
+
import 'node:events';
|
|
25
|
+
import 'events';
|
|
27
26
|
import 'ai/test';
|
package/dist/tools/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Tool, createTool, isVercelTool } from '../chunk-
|
|
1
|
+
export { Tool, createTool, isVercelTool } from '../chunk-2PW6UJMW.js';
|
package/dist/tts/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKSPHQSZX_cjs = require('../chunk-KSPHQSZX.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraTTS", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkKSPHQSZX_cjs.MastraTTS; }
|
|
10
10
|
});
|
package/dist/tts/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { M as MastraBase } from '../base-
|
|
1
|
+
import { M as MastraBase } from '../base-aPYtPBT2.cjs';
|
|
2
2
|
import '@opentelemetry/api';
|
|
3
|
-
import '../
|
|
3
|
+
import '../logger-EhZkzZOr.cjs';
|
|
4
4
|
import 'stream';
|
|
5
|
-
import 'pino';
|
|
6
5
|
import '@opentelemetry/sdk-trace-base';
|
|
7
6
|
|
|
8
7
|
interface BuiltInModelConfig {
|
package/dist/tts/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { M as MastraBase } from '../base-
|
|
1
|
+
import { M as MastraBase } from '../base-tc5kgDTD.js';
|
|
2
2
|
import '@opentelemetry/api';
|
|
3
|
-
import '../
|
|
3
|
+
import '../logger-EhZkzZOr.js';
|
|
4
4
|
import 'stream';
|
|
5
|
-
import 'pino';
|
|
6
5
|
import '@opentelemetry/sdk-trace-base';
|
|
7
6
|
|
|
8
7
|
interface BuiltInModelConfig {
|
package/dist/tts/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MastraTTS } from '../chunk-
|
|
1
|
+
export { MastraTTS } from '../chunk-C3ICEF6E.js';
|
|
@@ -14,4 +14,4 @@ interface EvaluationResult extends MetricResult {
|
|
|
14
14
|
output: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export { type EvaluationResult as E,
|
|
17
|
+
export { type EvaluationResult as E, Metric as M, type TestInfo as T, type MetricResult as a };
|
|
@@ -14,4 +14,4 @@ interface EvaluationResult extends MetricResult {
|
|
|
14
14
|
output: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export { type EvaluationResult as E,
|
|
17
|
+
export { type EvaluationResult as E, Metric as M, type TestInfo as T, type MetricResult as a };
|
package/dist/utils.cjs
CHANGED
|
@@ -1,50 +1,66 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkU3L3NEOM_cjs = require('./chunk-U3L3NEOM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "checkEvalStorageFields", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkU3L3NEOM_cjs.checkEvalStorageFields; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "createMastraProxy", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkU3L3NEOM_cjs.createMastraProxy; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "deepMerge", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkU3L3NEOM_cjs.deepMerge; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "delay", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkU3L3NEOM_cjs.delay; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ensureAllMessagesAreCoreMessages", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkU3L3NEOM_cjs.ensureAllMessagesAreCoreMessages; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "ensureToolProperties", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkU3L3NEOM_cjs.ensureToolProperties; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "isCoreMessage", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkU3L3NEOM_cjs.isCoreMessage; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "isUiMessage", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkU3L3NEOM_cjs.isUiMessage; }
|
|
30
38
|
});
|
|
31
39
|
Object.defineProperty(exports, "isVercelTool", {
|
|
32
40
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkU3L3NEOM_cjs.isVercelTool; }
|
|
34
42
|
});
|
|
35
43
|
Object.defineProperty(exports, "isZodType", {
|
|
36
44
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkU3L3NEOM_cjs.isZodType; }
|
|
38
46
|
});
|
|
39
47
|
Object.defineProperty(exports, "makeCoreTool", {
|
|
40
48
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkU3L3NEOM_cjs.makeCoreTool; }
|
|
42
50
|
});
|
|
43
51
|
Object.defineProperty(exports, "maskStreamTags", {
|
|
44
52
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkU3L3NEOM_cjs.maskStreamTags; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "parseFieldKey", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunkU3L3NEOM_cjs.parseFieldKey; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "parseSqlIdentifier", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return chunkU3L3NEOM_cjs.parseSqlIdentifier; }
|
|
46
62
|
});
|
|
47
63
|
Object.defineProperty(exports, "resolveSerializedZodOutput", {
|
|
48
64
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkU3L3NEOM_cjs.resolveSerializedZodOutput; }
|
|
50
66
|
});
|