@mastra/core 0.10.12 → 0.10.13
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/package.json +1 -1
- package/a2a.d.ts +0 -1
- package/agent.d.ts +0 -1
- package/base.d.ts +0 -1
- package/bundler.d.ts +0 -1
- package/deployer.d.ts +0 -1
- package/di.d.ts +0 -1
- package/dist/a2a/index.cjs +0 -79
- package/dist/a2a/index.d.cts +0 -780
- package/dist/a2a/index.d.ts +0 -780
- package/dist/a2a/index.js +0 -68
- package/dist/agent/index.cjs +0 -15
- package/dist/agent/index.d.cts +0 -29
- package/dist/agent/index.d.ts +0 -29
- package/dist/agent/index.js +0 -2
- package/dist/base-B_y9sMg0.d.cts +0 -162
- package/dist/base-CS5eSXbL.d.cts +0 -4117
- package/dist/base-ClrXcCRx.d.ts +0 -162
- package/dist/base-DBhKcre4.d.ts +0 -4117
- package/dist/base.cjs +0 -10
- package/dist/base.d.cts +0 -6
- package/dist/base.d.ts +0 -6
- package/dist/base.js +0 -1
- package/dist/bundler/index.cjs +0 -10
- package/dist/bundler/index.d.cts +0 -30
- package/dist/bundler/index.d.ts +0 -30
- package/dist/bundler/index.js +0 -1
- package/dist/chunk-2GRYVZ2O.cjs +0 -244
- package/dist/chunk-2HDFKWFU.js +0 -2249
- package/dist/chunk-32C7JDIZ.js +0 -1
- package/dist/chunk-4UBOJFSL.js +0 -989
- package/dist/chunk-4UWPFBC6.js +0 -88
- package/dist/chunk-4Z3OU5RY.cjs +0 -31
- package/dist/chunk-5HTMDAXP.js +0 -359
- package/dist/chunk-5IEKR756.js +0 -53
- package/dist/chunk-5YDTZN2X.js +0 -114
- package/dist/chunk-6UNGH46J.js +0 -75
- package/dist/chunk-6Y4UL5Z6.cjs +0 -94
- package/dist/chunk-7F6BQXE2.cjs +0 -425
- package/dist/chunk-7H2GET5Z.cjs +0 -668
- package/dist/chunk-7HZ6NIAF.cjs +0 -2
- package/dist/chunk-7MZNOW6W.cjs +0 -2263
- package/dist/chunk-7XQIPES3.js +0 -668
- package/dist/chunk-AKYTYALY.js +0 -70
- package/dist/chunk-ATXBSEFT.js +0 -22
- package/dist/chunk-B6TOBUS6.cjs +0 -80
- package/dist/chunk-B7SQOKEC.cjs +0 -91
- package/dist/chunk-BB4KXGBU.js +0 -83
- package/dist/chunk-BB6DPGIV.cjs +0 -6
- package/dist/chunk-C4LMN2IR.js +0 -27
- package/dist/chunk-DFFVEKIG.js +0 -407
- package/dist/chunk-E7AX3U6M.cjs +0 -659
- package/dist/chunk-EWCOOO3H.js +0 -5007
- package/dist/chunk-F2WMR75C.cjs +0 -183
- package/dist/chunk-FBKJ3652.cjs +0 -5034
- package/dist/chunk-FEYYOBBG.cjs +0 -24
- package/dist/chunk-FL5SZ2XU.js +0 -181
- package/dist/chunk-GH2KM66J.js +0 -37
- package/dist/chunk-GWFS5DAR.cjs +0 -37
- package/dist/chunk-HNEE7IF4.js +0 -60
- package/dist/chunk-HSVOEWAM.cjs +0 -2
- package/dist/chunk-J52TXHZV.cjs +0 -73
- package/dist/chunk-JNMQKJH4.js +0 -10
- package/dist/chunk-JQOMTERC.js +0 -89
- package/dist/chunk-LABUWBKX.cjs +0 -71
- package/dist/chunk-LXFZUKP3.cjs +0 -34
- package/dist/chunk-MP2QBLUJ.cjs +0 -70
- package/dist/chunk-MUNFCOMB.cjs +0 -62
- package/dist/chunk-NH5WJNNS.js +0 -1
- package/dist/chunk-P3Q73CAW.cjs +0 -55
- package/dist/chunk-PA2YIVIT.js +0 -61
- package/dist/chunk-QFTBW7ZZ.cjs +0 -2
- package/dist/chunk-QQ5K5TZE.cjs +0 -619
- package/dist/chunk-QUSEDVYI.cjs +0 -991
- package/dist/chunk-R4V75T7J.js +0 -1
- package/dist/chunk-SGGPJWRQ.js +0 -69
- package/dist/chunk-ST5RMVLG.cjs +0 -87
- package/dist/chunk-TC2SCOTE.js +0 -605
- package/dist/chunk-U64IJDC5.cjs +0 -109
- package/dist/chunk-UX3B6S2I.cjs +0 -65
- package/dist/chunk-V5D2LIF5.js +0 -68
- package/dist/chunk-VG4OPO2R.js +0 -240
- package/dist/chunk-WQNOATKB.js +0 -103
- package/dist/chunk-Y7D2JLKS.js +0 -4
- package/dist/chunk-YJEHXYK5.js +0 -657
- package/dist/chunk-YOQP5T77.js +0 -32
- package/dist/chunk-ZIZ3CVHN.cjs +0 -120
- package/dist/chunk-ZPOUMTTH.cjs +0 -362
- package/dist/chunk-ZZLBNB3U.cjs +0 -12
- package/dist/deployer/index.cjs +0 -10
- package/dist/deployer/index.d.cts +0 -19
- package/dist/deployer/index.d.ts +0 -19
- package/dist/deployer/index.js +0 -1
- package/dist/di/index.cjs +0 -10
- package/dist/di/index.d.cts +0 -1
- package/dist/di/index.d.ts +0 -1
- package/dist/di/index.js +0 -1
- package/dist/error/index.cjs +0 -22
- package/dist/error/index.d.cts +0 -86
- package/dist/error/index.d.ts +0 -86
- package/dist/error/index.js +0 -1
- package/dist/eval/index.cjs +0 -14
- package/dist/eval/index.d.cts +0 -43
- package/dist/eval/index.d.ts +0 -43
- package/dist/eval/index.js +0 -1
- package/dist/hooks/index.cjs +0 -18
- package/dist/hooks/index.d.cts +0 -33
- package/dist/hooks/index.d.ts +0 -33
- package/dist/hooks/index.js +0 -1
- package/dist/index.cjs +0 -281
- package/dist/index.d.cts +0 -92
- package/dist/index.d.ts +0 -92
- package/dist/index.js +0 -112
- package/dist/integration/index.cjs +0 -14
- package/dist/integration/index.d.cts +0 -65
- package/dist/integration/index.d.ts +0 -65
- package/dist/integration/index.js +0 -1
- package/dist/llm/index.cjs +0 -10
- package/dist/llm/index.d.cts +0 -29
- package/dist/llm/index.d.ts +0 -29
- package/dist/llm/index.js +0 -1
- package/dist/logger/index.cjs +0 -43
- package/dist/logger/index.d.cts +0 -96
- package/dist/logger/index.d.ts +0 -96
- package/dist/logger/index.js +0 -2
- package/dist/logger-B8XXh6ya.d.cts +0 -159
- package/dist/logger-Bpa2oLL4.d.ts +0 -159
- package/dist/mastra/index.cjs +0 -10
- package/dist/mastra/index.d.cts +0 -29
- package/dist/mastra/index.d.ts +0 -29
- package/dist/mastra/index.js +0 -1
- package/dist/mcp/index.cjs +0 -106
- package/dist/mcp/index.d.cts +0 -29
- package/dist/mcp/index.d.ts +0 -29
- package/dist/mcp/index.js +0 -100
- package/dist/memory/index.cjs +0 -18
- package/dist/memory/index.d.cts +0 -29
- package/dist/memory/index.d.ts +0 -29
- package/dist/memory/index.js +0 -1
- package/dist/network/index.cjs +0 -311
- package/dist/network/index.d.cts +0 -29
- package/dist/network/index.d.ts +0 -29
- package/dist/network/index.js +0 -309
- package/dist/network/vNext/index.cjs +0 -873
- package/dist/network/vNext/index.d.cts +0 -29
- package/dist/network/vNext/index.d.ts +0 -29
- package/dist/network/vNext/index.js +0 -871
- package/dist/relevance/index.cjs +0 -18
- package/dist/relevance/index.d.cts +0 -49
- package/dist/relevance/index.d.ts +0 -49
- package/dist/relevance/index.js +0 -1
- package/dist/runtime-context/index.cjs +0 -10
- package/dist/runtime-context/index.d.cts +0 -52
- package/dist/runtime-context/index.d.ts +0 -52
- package/dist/runtime-context/index.js +0 -1
- package/dist/server/index.cjs +0 -62
- package/dist/server/index.d.cts +0 -52
- package/dist/server/index.d.ts +0 -52
- package/dist/server/index.js +0 -59
- package/dist/storage/index.cjs +0 -336
- package/dist/storage/index.d.cts +0 -149
- package/dist/storage/index.d.ts +0 -149
- package/dist/storage/index.js +0 -303
- package/dist/telemetry/index.cjs +0 -30
- package/dist/telemetry/index.d.cts +0 -75
- package/dist/telemetry/index.d.ts +0 -75
- package/dist/telemetry/index.js +0 -1
- package/dist/telemetry/otel-vendor.cjs +0 -103
- package/dist/telemetry/otel-vendor.d.cts +0 -20
- package/dist/telemetry/otel-vendor.d.ts +0 -20
- package/dist/telemetry/otel-vendor.js +0 -57
- package/dist/tools/index.cjs +0 -18
- package/dist/tools/index.d.cts +0 -41
- package/dist/tools/index.d.ts +0 -41
- package/dist/tools/index.js +0 -1
- package/dist/tts/index.cjs +0 -10
- package/dist/tts/index.d.cts +0 -28
- package/dist/tts/index.d.ts +0 -28
- package/dist/tts/index.js +0 -1
- package/dist/types-Bo1uigWx.d.cts +0 -17
- package/dist/types-Bo1uigWx.d.ts +0 -17
- package/dist/utils.cjs +0 -58
- package/dist/utils.d.cts +0 -149
- package/dist/utils.d.ts +0 -149
- package/dist/utils.js +0 -1
- package/dist/vector/filter/index.cjs +0 -192
- package/dist/vector/filter/index.d.cts +0 -128
- package/dist/vector/filter/index.d.ts +0 -128
- package/dist/vector/filter/index.js +0 -190
- package/dist/vector/index.cjs +0 -10
- package/dist/vector/index.d.cts +0 -77
- package/dist/vector/index.d.ts +0 -77
- package/dist/vector/index.js +0 -1
- package/dist/voice/index.cjs +0 -18
- package/dist/voice/index.d.cts +0 -29
- package/dist/voice/index.d.ts +0 -29
- package/dist/voice/index.js +0 -1
- package/dist/workflows/constants.cjs +0 -10
- package/dist/workflows/constants.d.cts +0 -3
- package/dist/workflows/constants.d.ts +0 -3
- package/dist/workflows/constants.js +0 -1
- package/dist/workflows/index.cjs +0 -42
- package/dist/workflows/index.d.cts +0 -282
- package/dist/workflows/index.d.ts +0 -282
- package/dist/workflows/index.js +0 -1
- package/dist/workflows/legacy/index.cjs +0 -90
- package/dist/workflows/legacy/index.d.cts +0 -91
- package/dist/workflows/legacy/index.d.ts +0 -91
- package/dist/workflows/legacy/index.js +0 -1
- package/error.d.ts +0 -1
- package/eval.d.ts +0 -1
- package/hooks.d.ts +0 -1
- package/integration.d.ts +0 -1
- package/llm.d.ts +0 -1
- package/logger.d.ts +0 -1
- package/mastra.d.ts +0 -1
- package/mcp.d.ts +0 -1
- package/memory.d.ts +0 -1
- package/network/vNext.d.ts +0 -1
- package/network.d.ts +0 -1
- package/relevance.d.ts +0 -1
- package/runtime-context.d.ts +0 -1
- package/server.d.ts +0 -1
- package/storage.d.ts +0 -1
- package/telemetry/otel-vendor.d.ts +0 -1
- package/telemetry.d.ts +0 -1
- package/tools.d.ts +0 -1
- package/tts.d.ts +0 -1
- package/utils.d.ts +0 -1
- package/vector/filter.d.ts +0 -1
- package/vector.d.ts +0 -1
- package/voice.d.ts +0 -1
- package/workflows/_constants.d.ts +0 -1
- package/workflows/legacy.d.ts +0 -1
- package/workflows.d.ts +0 -1
package/dist/tools/index.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk4Z3OU5RY_cjs = require('../chunk-4Z3OU5RY.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "Tool", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunk4Z3OU5RY_cjs.Tool; }
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, "createTool", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunk4Z3OU5RY_cjs.createTool; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "isVercelTool", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunk4Z3OU5RY_cjs.isVercelTool; }
|
|
18
|
-
});
|
package/dist/tools/index.d.cts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { V as VercelTool, c as ToolAction } from '../base-CS5eSXbL.cjs';
|
|
2
|
-
export { C as CoreTool, at as InternalCoreTool, ar as Tool, au as ToolExecutionContext, as as createTool } from '../base-CS5eSXbL.cjs';
|
|
3
|
-
import '../base-B_y9sMg0.cjs';
|
|
4
|
-
import 'ai';
|
|
5
|
-
import 'zod';
|
|
6
|
-
import '../logger-B8XXh6ya.cjs';
|
|
7
|
-
import '../error/index.cjs';
|
|
8
|
-
import 'stream';
|
|
9
|
-
import 'json-schema';
|
|
10
|
-
import '../types-Bo1uigWx.cjs';
|
|
11
|
-
import 'sift';
|
|
12
|
-
import '../runtime-context/index.cjs';
|
|
13
|
-
import '@opentelemetry/api';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
|
-
import '../vector/index.cjs';
|
|
17
|
-
import '../vector/filter/index.cjs';
|
|
18
|
-
import '../tts/index.cjs';
|
|
19
|
-
import '@opentelemetry/sdk-trace-base';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'hono';
|
|
22
|
-
import 'stream/web';
|
|
23
|
-
import 'events';
|
|
24
|
-
import 'node:stream/web';
|
|
25
|
-
import '../workflows/constants.cjs';
|
|
26
|
-
import 'ai/test';
|
|
27
|
-
import '../deployer/index.cjs';
|
|
28
|
-
import '../bundler/index.cjs';
|
|
29
|
-
import 'hono/cors';
|
|
30
|
-
import 'hono-openapi';
|
|
31
|
-
|
|
32
|
-
type ToolToConvert = VercelTool | ToolAction<any, any, any>;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Checks if a tool is a Vercel Tool
|
|
36
|
-
* @param tool - The tool to check
|
|
37
|
-
* @returns True if the tool is a Vercel Tool, false otherwise
|
|
38
|
-
*/
|
|
39
|
-
declare function isVercelTool(tool?: ToolToConvert): tool is VercelTool;
|
|
40
|
-
|
|
41
|
-
export { ToolAction, VercelTool, isVercelTool };
|
package/dist/tools/index.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { V as VercelTool, c as ToolAction } from '../base-DBhKcre4.js';
|
|
2
|
-
export { C as CoreTool, at as InternalCoreTool, ar as Tool, au as ToolExecutionContext, as as createTool } from '../base-DBhKcre4.js';
|
|
3
|
-
import '../base-ClrXcCRx.js';
|
|
4
|
-
import 'ai';
|
|
5
|
-
import 'zod';
|
|
6
|
-
import '../logger-Bpa2oLL4.js';
|
|
7
|
-
import '../error/index.js';
|
|
8
|
-
import 'stream';
|
|
9
|
-
import 'json-schema';
|
|
10
|
-
import '../types-Bo1uigWx.js';
|
|
11
|
-
import 'sift';
|
|
12
|
-
import '../runtime-context/index.js';
|
|
13
|
-
import '@opentelemetry/api';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
|
-
import '../vector/index.js';
|
|
17
|
-
import '../vector/filter/index.js';
|
|
18
|
-
import '../tts/index.js';
|
|
19
|
-
import '@opentelemetry/sdk-trace-base';
|
|
20
|
-
import 'node:http';
|
|
21
|
-
import 'hono';
|
|
22
|
-
import 'stream/web';
|
|
23
|
-
import 'events';
|
|
24
|
-
import 'node:stream/web';
|
|
25
|
-
import '../workflows/constants.js';
|
|
26
|
-
import 'ai/test';
|
|
27
|
-
import '../deployer/index.js';
|
|
28
|
-
import '../bundler/index.js';
|
|
29
|
-
import 'hono/cors';
|
|
30
|
-
import 'hono-openapi';
|
|
31
|
-
|
|
32
|
-
type ToolToConvert = VercelTool | ToolAction<any, any, any>;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Checks if a tool is a Vercel Tool
|
|
36
|
-
* @param tool - The tool to check
|
|
37
|
-
* @returns True if the tool is a Vercel Tool, false otherwise
|
|
38
|
-
*/
|
|
39
|
-
declare function isVercelTool(tool?: ToolToConvert): tool is VercelTool;
|
|
40
|
-
|
|
41
|
-
export { ToolAction, VercelTool, isVercelTool };
|
package/dist/tools/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Tool, createTool, isVercelTool } from '../chunk-C4LMN2IR.js';
|
package/dist/tts/index.cjs
DELETED
package/dist/tts/index.d.cts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { M as MastraBase } from '../base-B_y9sMg0.cjs';
|
|
2
|
-
import '@opentelemetry/api';
|
|
3
|
-
import '../logger-B8XXh6ya.cjs';
|
|
4
|
-
import '../error/index.cjs';
|
|
5
|
-
import 'stream';
|
|
6
|
-
import '@opentelemetry/sdk-trace-base';
|
|
7
|
-
|
|
8
|
-
interface BuiltInModelConfig {
|
|
9
|
-
provider: string;
|
|
10
|
-
name: string;
|
|
11
|
-
apiKey?: string;
|
|
12
|
-
}
|
|
13
|
-
interface TTSConfig {
|
|
14
|
-
model: BuiltInModelConfig;
|
|
15
|
-
}
|
|
16
|
-
declare abstract class MastraTTS extends MastraBase {
|
|
17
|
-
model: BuiltInModelConfig;
|
|
18
|
-
constructor({ model }: TTSConfig);
|
|
19
|
-
traced<T extends Function>(method: T, methodName: string): T;
|
|
20
|
-
abstract generate({ text }: {
|
|
21
|
-
text: string;
|
|
22
|
-
}): Promise<any>;
|
|
23
|
-
abstract stream({ text }: {
|
|
24
|
-
text: string;
|
|
25
|
-
}): Promise<any>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { MastraTTS, type TTSConfig };
|
package/dist/tts/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { M as MastraBase } from '../base-ClrXcCRx.js';
|
|
2
|
-
import '@opentelemetry/api';
|
|
3
|
-
import '../logger-Bpa2oLL4.js';
|
|
4
|
-
import '../error/index.js';
|
|
5
|
-
import 'stream';
|
|
6
|
-
import '@opentelemetry/sdk-trace-base';
|
|
7
|
-
|
|
8
|
-
interface BuiltInModelConfig {
|
|
9
|
-
provider: string;
|
|
10
|
-
name: string;
|
|
11
|
-
apiKey?: string;
|
|
12
|
-
}
|
|
13
|
-
interface TTSConfig {
|
|
14
|
-
model: BuiltInModelConfig;
|
|
15
|
-
}
|
|
16
|
-
declare abstract class MastraTTS extends MastraBase {
|
|
17
|
-
model: BuiltInModelConfig;
|
|
18
|
-
constructor({ model }: TTSConfig);
|
|
19
|
-
traced<T extends Function>(method: T, methodName: string): T;
|
|
20
|
-
abstract generate({ text }: {
|
|
21
|
-
text: string;
|
|
22
|
-
}): Promise<any>;
|
|
23
|
-
abstract stream({ text }: {
|
|
24
|
-
text: string;
|
|
25
|
-
}): Promise<any>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { MastraTTS, type TTSConfig };
|
package/dist/tts/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MastraTTS } from '../chunk-GH2KM66J.js';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
interface MetricResult {
|
|
2
|
-
score: number;
|
|
3
|
-
info?: Record<string, any>;
|
|
4
|
-
}
|
|
5
|
-
declare abstract class Metric {
|
|
6
|
-
abstract measure(input: string, output: string): Promise<MetricResult>;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface TestInfo {
|
|
10
|
-
testName?: string;
|
|
11
|
-
testPath?: string;
|
|
12
|
-
}
|
|
13
|
-
interface EvaluationResult extends MetricResult {
|
|
14
|
-
output: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { type EvaluationResult as E, Metric as M, type TestInfo as T, type MetricResult as a };
|
package/dist/types-Bo1uigWx.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
interface MetricResult {
|
|
2
|
-
score: number;
|
|
3
|
-
info?: Record<string, any>;
|
|
4
|
-
}
|
|
5
|
-
declare abstract class Metric {
|
|
6
|
-
abstract measure(input: string, output: string): Promise<MetricResult>;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface TestInfo {
|
|
10
|
-
testName?: string;
|
|
11
|
-
testPath?: string;
|
|
12
|
-
}
|
|
13
|
-
interface EvaluationResult extends MetricResult {
|
|
14
|
-
output: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { type EvaluationResult as E, Metric as M, type TestInfo as T, type MetricResult as a };
|
package/dist/utils.cjs
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk7F6BQXE2_cjs = require('./chunk-7F6BQXE2.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "checkEvalStorageFields", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunk7F6BQXE2_cjs.checkEvalStorageFields; }
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, "createMastraProxy", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunk7F6BQXE2_cjs.createMastraProxy; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "deepMerge", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunk7F6BQXE2_cjs.deepMerge; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "delay", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunk7F6BQXE2_cjs.delay; }
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports, "ensureToolProperties", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return chunk7F6BQXE2_cjs.ensureToolProperties; }
|
|
26
|
-
});
|
|
27
|
-
Object.defineProperty(exports, "isCoreMessage", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () { return chunk7F6BQXE2_cjs.isCoreMessage; }
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "isUiMessage", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return chunk7F6BQXE2_cjs.isUiMessage; }
|
|
34
|
-
});
|
|
35
|
-
Object.defineProperty(exports, "isZodType", {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
get: function () { return chunk7F6BQXE2_cjs.isZodType; }
|
|
38
|
-
});
|
|
39
|
-
Object.defineProperty(exports, "makeCoreTool", {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function () { return chunk7F6BQXE2_cjs.makeCoreTool; }
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, "maskStreamTags", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () { return chunk7F6BQXE2_cjs.maskStreamTags; }
|
|
46
|
-
});
|
|
47
|
-
Object.defineProperty(exports, "parseFieldKey", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function () { return chunk7F6BQXE2_cjs.parseFieldKey; }
|
|
50
|
-
});
|
|
51
|
-
Object.defineProperty(exports, "parseSqlIdentifier", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function () { return chunk7F6BQXE2_cjs.parseSqlIdentifier; }
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(exports, "resolveSerializedZodOutput", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function () { return chunk7F6BQXE2_cjs.resolveSerializedZodOutput; }
|
|
58
|
-
});
|
package/dist/utils.d.cts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { M as Mastra, a as MastraPrimitives, b as MastraMemory, T as ToolsInput, V as VercelTool, c as ToolAction, C as CoreTool, A as Agent, L as LegacyWorkflow, d as LegacyStep, S as StepExecutionContext, W as WorkflowContext, e as Workflow, f as Step, g as AgentNetwork, N as NewAgentNetwork, h as MCPServerBase } from './base-CS5eSXbL.cjs';
|
|
2
|
-
import { LanguageModelV1, CoreMessage, Message } from 'ai';
|
|
3
|
-
import { MastraTTS } from './tts/index.cjs';
|
|
4
|
-
import { MastraVector } from './vector/index.cjs';
|
|
5
|
-
import { VectorFilter } from './vector/filter/index.cjs';
|
|
6
|
-
import { M as Metric } from './types-Bo1uigWx.cjs';
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
import { I as IMastraLogger } from './logger-B8XXh6ya.cjs';
|
|
9
|
-
import './base-B_y9sMg0.cjs';
|
|
10
|
-
import { RuntimeContext } from './runtime-context/index.cjs';
|
|
11
|
-
import 'json-schema';
|
|
12
|
-
import 'sift';
|
|
13
|
-
import '@opentelemetry/api';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
|
-
import 'node:http';
|
|
17
|
-
import 'hono';
|
|
18
|
-
import 'stream/web';
|
|
19
|
-
import 'events';
|
|
20
|
-
import 'node:stream/web';
|
|
21
|
-
import './workflows/constants.cjs';
|
|
22
|
-
import 'ai/test';
|
|
23
|
-
import './deployer/index.cjs';
|
|
24
|
-
import './bundler/index.cjs';
|
|
25
|
-
import 'hono/cors';
|
|
26
|
-
import 'hono-openapi';
|
|
27
|
-
import './error/index.cjs';
|
|
28
|
-
import 'stream';
|
|
29
|
-
import '@opentelemetry/sdk-trace-base';
|
|
30
|
-
|
|
31
|
-
declare const delay: (ms: number) => Promise<unknown>;
|
|
32
|
-
/**
|
|
33
|
-
* Deep merges two objects, recursively merging nested objects and arrays
|
|
34
|
-
*/
|
|
35
|
-
declare function deepMerge<T extends object = object>(target: T, source: Partial<T>): T;
|
|
36
|
-
interface TagMaskOptions {
|
|
37
|
-
/** Called when masking begins */
|
|
38
|
-
onStart?: () => void;
|
|
39
|
-
/** Called when masking ends */
|
|
40
|
-
onEnd?: () => void;
|
|
41
|
-
/** Called for each chunk that is masked */
|
|
42
|
-
onMask?: (chunk: string) => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Transforms a stream by masking content between XML tags.
|
|
46
|
-
* @param stream Input stream to transform
|
|
47
|
-
* @param tag Tag name to mask between (e.g. for <foo>...</foo>, use 'foo')
|
|
48
|
-
* @param options Optional configuration for masking behavior
|
|
49
|
-
*/
|
|
50
|
-
declare function maskStreamTags(stream: AsyncIterable<string>, tag: string, options?: TagMaskOptions): AsyncIterable<string>;
|
|
51
|
-
/**
|
|
52
|
-
* Resolve serialized zod output - This function takes the string output ot the `jsonSchemaToZod` function
|
|
53
|
-
* and instantiates the zod object correctly.
|
|
54
|
-
*
|
|
55
|
-
* @param schema - serialized zod object
|
|
56
|
-
* @returns resolved zod object
|
|
57
|
-
*/
|
|
58
|
-
declare function resolveSerializedZodOutput(schema: string): z.ZodType;
|
|
59
|
-
interface ToolOptions {
|
|
60
|
-
name: string;
|
|
61
|
-
runId?: string;
|
|
62
|
-
threadId?: string;
|
|
63
|
-
resourceId?: string;
|
|
64
|
-
logger?: IMastraLogger;
|
|
65
|
-
description?: string;
|
|
66
|
-
mastra?: (Mastra & MastraPrimitives) | MastraPrimitives;
|
|
67
|
-
runtimeContext: RuntimeContext;
|
|
68
|
-
memory?: MastraMemory;
|
|
69
|
-
agentName?: string;
|
|
70
|
-
model?: LanguageModelV1;
|
|
71
|
-
}
|
|
72
|
-
type ToolToConvert = VercelTool | ToolAction<any, any, any>;
|
|
73
|
-
/**
|
|
74
|
-
* Checks if a value is a Zod type
|
|
75
|
-
* @param value - The value to check
|
|
76
|
-
* @returns True if the value is a Zod type, false otherwise
|
|
77
|
-
*/
|
|
78
|
-
declare function isZodType(value: unknown): value is z.ZodType;
|
|
79
|
-
/**
|
|
80
|
-
* Ensures a tool has an ID and inputSchema by generating one if not present
|
|
81
|
-
* @param tool - The tool to ensure has an ID and inputSchema
|
|
82
|
-
* @returns The tool with an ID and inputSchema
|
|
83
|
-
*/
|
|
84
|
-
declare function ensureToolProperties(tools: ToolsInput): ToolsInput;
|
|
85
|
-
/**
|
|
86
|
-
* Converts a Vercel Tool or Mastra Tool into a CoreTool format
|
|
87
|
-
* @param originalTool - The tool to convert (either VercelTool or ToolAction)
|
|
88
|
-
* @param options - Tool options including Mastra-specific settings
|
|
89
|
-
* @param logType - Type of tool to log (tool or toolset)
|
|
90
|
-
* @returns A CoreTool that can be used by the system
|
|
91
|
-
*/
|
|
92
|
-
declare function makeCoreTool(originalTool: ToolToConvert, options: ToolOptions, logType?: 'tool' | 'toolset' | 'client-tool'): CoreTool;
|
|
93
|
-
/**
|
|
94
|
-
* Creates a proxy for a Mastra instance to handle deprecated properties
|
|
95
|
-
* @param mastra - The Mastra instance to proxy
|
|
96
|
-
* @param logger - The logger to use for warnings
|
|
97
|
-
* @returns A proxy for the Mastra instance
|
|
98
|
-
*/
|
|
99
|
-
declare function createMastraProxy({ mastra, logger }: {
|
|
100
|
-
mastra: Mastra;
|
|
101
|
-
logger: IMastraLogger;
|
|
102
|
-
}): Mastra<Record<string, Agent<any, ToolsInput, Record<string, Metric>>>, Record<string, LegacyWorkflow<LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], string, any, any>>, Record<string, Workflow<any, Step<string, any, any, any, any, any>[], string, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>>, Record<string, MastraVector<VectorFilter>>, Record<string, MastraTTS>, IMastraLogger, Record<string, AgentNetwork>, Record<string, NewAgentNetwork>, Record<string, MCPServerBase>>;
|
|
103
|
-
declare function checkEvalStorageFields(traceObject: any, logger?: IMastraLogger): boolean;
|
|
104
|
-
declare function isUiMessage(message: CoreMessage | Message): message is Message;
|
|
105
|
-
declare function isCoreMessage(message: CoreMessage | Message): message is CoreMessage;
|
|
106
|
-
/** Represents a validated SQL identifier (e.g., table or column name). */
|
|
107
|
-
type SqlIdentifier = string & {
|
|
108
|
-
__brand: 'SqlIdentifier';
|
|
109
|
-
};
|
|
110
|
-
/** Represents a validated dot-separated SQL field key. */
|
|
111
|
-
type FieldKey = string & {
|
|
112
|
-
__brand: 'FieldKey';
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Parses and returns a valid SQL identifier (such as a table or column name).
|
|
116
|
-
* The identifier must:
|
|
117
|
-
* - Start with a letter (a-z, A-Z) or underscore (_)
|
|
118
|
-
* - Contain only letters, numbers, or underscores
|
|
119
|
-
* - Be at most 63 characters long
|
|
120
|
-
*
|
|
121
|
-
* @param name - The identifier string to parse.
|
|
122
|
-
* @param kind - Optional label for error messages (e.g., 'table name').
|
|
123
|
-
* @returns The validated identifier as a branded type.
|
|
124
|
-
* @throws {Error} If the identifier does not conform to SQL naming rules.
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* const id = parseSqlIdentifier('my_table'); // Ok
|
|
128
|
-
* parseSqlIdentifier('123table'); // Throws error
|
|
129
|
-
*/
|
|
130
|
-
declare function parseSqlIdentifier(name: string, kind?: string): SqlIdentifier;
|
|
131
|
-
/**
|
|
132
|
-
* Parses and returns a valid dot-separated SQL field key (e.g., 'user.profile.name').
|
|
133
|
-
* Each segment must:
|
|
134
|
-
* - Start with a letter (a-z, A-Z) or underscore (_)
|
|
135
|
-
* - Contain only letters, numbers, or underscores
|
|
136
|
-
* - Be at most 63 characters long
|
|
137
|
-
*
|
|
138
|
-
* @param key - The dot-separated field key string to parse.
|
|
139
|
-
* @returns The validated field key as a branded type.
|
|
140
|
-
* @throws {Error} If any segment of the key is invalid.
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* const key = parseFieldKey('user_profile.name'); // Ok
|
|
144
|
-
* parseFieldKey('user..name'); // Throws error
|
|
145
|
-
* parseFieldKey('user.123name'); // Throws error
|
|
146
|
-
*/
|
|
147
|
-
declare function parseFieldKey(key: string): FieldKey;
|
|
148
|
-
|
|
149
|
-
export { type TagMaskOptions, type ToolOptions, checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureToolProperties, isCoreMessage, isUiMessage, isZodType, makeCoreTool, maskStreamTags, parseFieldKey, parseSqlIdentifier, resolveSerializedZodOutput };
|
package/dist/utils.d.ts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { M as Mastra, a as MastraPrimitives, b as MastraMemory, T as ToolsInput, V as VercelTool, c as ToolAction, C as CoreTool, A as Agent, L as LegacyWorkflow, d as LegacyStep, S as StepExecutionContext, W as WorkflowContext, e as Workflow, f as Step, g as AgentNetwork, N as NewAgentNetwork, h as MCPServerBase } from './base-DBhKcre4.js';
|
|
2
|
-
import { LanguageModelV1, CoreMessage, Message } from 'ai';
|
|
3
|
-
import { MastraTTS } from './tts/index.js';
|
|
4
|
-
import { MastraVector } from './vector/index.js';
|
|
5
|
-
import { VectorFilter } from './vector/filter/index.js';
|
|
6
|
-
import { M as Metric } from './types-Bo1uigWx.js';
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
import { I as IMastraLogger } from './logger-Bpa2oLL4.js';
|
|
9
|
-
import './base-ClrXcCRx.js';
|
|
10
|
-
import { RuntimeContext } from './runtime-context/index.js';
|
|
11
|
-
import 'json-schema';
|
|
12
|
-
import 'sift';
|
|
13
|
-
import '@opentelemetry/api';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
|
-
import 'node:http';
|
|
17
|
-
import 'hono';
|
|
18
|
-
import 'stream/web';
|
|
19
|
-
import 'events';
|
|
20
|
-
import 'node:stream/web';
|
|
21
|
-
import './workflows/constants.js';
|
|
22
|
-
import 'ai/test';
|
|
23
|
-
import './deployer/index.js';
|
|
24
|
-
import './bundler/index.js';
|
|
25
|
-
import 'hono/cors';
|
|
26
|
-
import 'hono-openapi';
|
|
27
|
-
import './error/index.js';
|
|
28
|
-
import 'stream';
|
|
29
|
-
import '@opentelemetry/sdk-trace-base';
|
|
30
|
-
|
|
31
|
-
declare const delay: (ms: number) => Promise<unknown>;
|
|
32
|
-
/**
|
|
33
|
-
* Deep merges two objects, recursively merging nested objects and arrays
|
|
34
|
-
*/
|
|
35
|
-
declare function deepMerge<T extends object = object>(target: T, source: Partial<T>): T;
|
|
36
|
-
interface TagMaskOptions {
|
|
37
|
-
/** Called when masking begins */
|
|
38
|
-
onStart?: () => void;
|
|
39
|
-
/** Called when masking ends */
|
|
40
|
-
onEnd?: () => void;
|
|
41
|
-
/** Called for each chunk that is masked */
|
|
42
|
-
onMask?: (chunk: string) => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Transforms a stream by masking content between XML tags.
|
|
46
|
-
* @param stream Input stream to transform
|
|
47
|
-
* @param tag Tag name to mask between (e.g. for <foo>...</foo>, use 'foo')
|
|
48
|
-
* @param options Optional configuration for masking behavior
|
|
49
|
-
*/
|
|
50
|
-
declare function maskStreamTags(stream: AsyncIterable<string>, tag: string, options?: TagMaskOptions): AsyncIterable<string>;
|
|
51
|
-
/**
|
|
52
|
-
* Resolve serialized zod output - This function takes the string output ot the `jsonSchemaToZod` function
|
|
53
|
-
* and instantiates the zod object correctly.
|
|
54
|
-
*
|
|
55
|
-
* @param schema - serialized zod object
|
|
56
|
-
* @returns resolved zod object
|
|
57
|
-
*/
|
|
58
|
-
declare function resolveSerializedZodOutput(schema: string): z.ZodType;
|
|
59
|
-
interface ToolOptions {
|
|
60
|
-
name: string;
|
|
61
|
-
runId?: string;
|
|
62
|
-
threadId?: string;
|
|
63
|
-
resourceId?: string;
|
|
64
|
-
logger?: IMastraLogger;
|
|
65
|
-
description?: string;
|
|
66
|
-
mastra?: (Mastra & MastraPrimitives) | MastraPrimitives;
|
|
67
|
-
runtimeContext: RuntimeContext;
|
|
68
|
-
memory?: MastraMemory;
|
|
69
|
-
agentName?: string;
|
|
70
|
-
model?: LanguageModelV1;
|
|
71
|
-
}
|
|
72
|
-
type ToolToConvert = VercelTool | ToolAction<any, any, any>;
|
|
73
|
-
/**
|
|
74
|
-
* Checks if a value is a Zod type
|
|
75
|
-
* @param value - The value to check
|
|
76
|
-
* @returns True if the value is a Zod type, false otherwise
|
|
77
|
-
*/
|
|
78
|
-
declare function isZodType(value: unknown): value is z.ZodType;
|
|
79
|
-
/**
|
|
80
|
-
* Ensures a tool has an ID and inputSchema by generating one if not present
|
|
81
|
-
* @param tool - The tool to ensure has an ID and inputSchema
|
|
82
|
-
* @returns The tool with an ID and inputSchema
|
|
83
|
-
*/
|
|
84
|
-
declare function ensureToolProperties(tools: ToolsInput): ToolsInput;
|
|
85
|
-
/**
|
|
86
|
-
* Converts a Vercel Tool or Mastra Tool into a CoreTool format
|
|
87
|
-
* @param originalTool - The tool to convert (either VercelTool or ToolAction)
|
|
88
|
-
* @param options - Tool options including Mastra-specific settings
|
|
89
|
-
* @param logType - Type of tool to log (tool or toolset)
|
|
90
|
-
* @returns A CoreTool that can be used by the system
|
|
91
|
-
*/
|
|
92
|
-
declare function makeCoreTool(originalTool: ToolToConvert, options: ToolOptions, logType?: 'tool' | 'toolset' | 'client-tool'): CoreTool;
|
|
93
|
-
/**
|
|
94
|
-
* Creates a proxy for a Mastra instance to handle deprecated properties
|
|
95
|
-
* @param mastra - The Mastra instance to proxy
|
|
96
|
-
* @param logger - The logger to use for warnings
|
|
97
|
-
* @returns A proxy for the Mastra instance
|
|
98
|
-
*/
|
|
99
|
-
declare function createMastraProxy({ mastra, logger }: {
|
|
100
|
-
mastra: Mastra;
|
|
101
|
-
logger: IMastraLogger;
|
|
102
|
-
}): Mastra<Record<string, Agent<any, ToolsInput, Record<string, Metric>>>, Record<string, LegacyWorkflow<LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], string, any, any>>, Record<string, Workflow<any, Step<string, any, any, any, any, any>[], string, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>>, Record<string, MastraVector<VectorFilter>>, Record<string, MastraTTS>, IMastraLogger, Record<string, AgentNetwork>, Record<string, NewAgentNetwork>, Record<string, MCPServerBase>>;
|
|
103
|
-
declare function checkEvalStorageFields(traceObject: any, logger?: IMastraLogger): boolean;
|
|
104
|
-
declare function isUiMessage(message: CoreMessage | Message): message is Message;
|
|
105
|
-
declare function isCoreMessage(message: CoreMessage | Message): message is CoreMessage;
|
|
106
|
-
/** Represents a validated SQL identifier (e.g., table or column name). */
|
|
107
|
-
type SqlIdentifier = string & {
|
|
108
|
-
__brand: 'SqlIdentifier';
|
|
109
|
-
};
|
|
110
|
-
/** Represents a validated dot-separated SQL field key. */
|
|
111
|
-
type FieldKey = string & {
|
|
112
|
-
__brand: 'FieldKey';
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Parses and returns a valid SQL identifier (such as a table or column name).
|
|
116
|
-
* The identifier must:
|
|
117
|
-
* - Start with a letter (a-z, A-Z) or underscore (_)
|
|
118
|
-
* - Contain only letters, numbers, or underscores
|
|
119
|
-
* - Be at most 63 characters long
|
|
120
|
-
*
|
|
121
|
-
* @param name - The identifier string to parse.
|
|
122
|
-
* @param kind - Optional label for error messages (e.g., 'table name').
|
|
123
|
-
* @returns The validated identifier as a branded type.
|
|
124
|
-
* @throws {Error} If the identifier does not conform to SQL naming rules.
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* const id = parseSqlIdentifier('my_table'); // Ok
|
|
128
|
-
* parseSqlIdentifier('123table'); // Throws error
|
|
129
|
-
*/
|
|
130
|
-
declare function parseSqlIdentifier(name: string, kind?: string): SqlIdentifier;
|
|
131
|
-
/**
|
|
132
|
-
* Parses and returns a valid dot-separated SQL field key (e.g., 'user.profile.name').
|
|
133
|
-
* Each segment must:
|
|
134
|
-
* - Start with a letter (a-z, A-Z) or underscore (_)
|
|
135
|
-
* - Contain only letters, numbers, or underscores
|
|
136
|
-
* - Be at most 63 characters long
|
|
137
|
-
*
|
|
138
|
-
* @param key - The dot-separated field key string to parse.
|
|
139
|
-
* @returns The validated field key as a branded type.
|
|
140
|
-
* @throws {Error} If any segment of the key is invalid.
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* const key = parseFieldKey('user_profile.name'); // Ok
|
|
144
|
-
* parseFieldKey('user..name'); // Throws error
|
|
145
|
-
* parseFieldKey('user.123name'); // Throws error
|
|
146
|
-
*/
|
|
147
|
-
declare function parseFieldKey(key: string): FieldKey;
|
|
148
|
-
|
|
149
|
-
export { type TagMaskOptions, type ToolOptions, checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureToolProperties, isCoreMessage, isUiMessage, isZodType, makeCoreTool, maskStreamTags, parseFieldKey, parseSqlIdentifier, resolveSerializedZodOutput };
|
package/dist/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureToolProperties, isCoreMessage, isUiMessage, isZodType, makeCoreTool, maskStreamTags, parseFieldKey, parseSqlIdentifier, resolveSerializedZodOutput } from './chunk-DFFVEKIG.js';
|