@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/mastra/index.d.cts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../index
|
|
1
|
+
export { aG as Config, a as Mastra } from '../base-aJ3etsh5.cjs';
|
|
2
|
+
import '../deployer/index.cjs';
|
|
3
|
+
import '../logger-EhZkzZOr.cjs';
|
|
3
4
|
import '../vector/index.cjs';
|
|
4
|
-
import '../base-
|
|
5
|
+
import '../base-aPYtPBT2.cjs';
|
|
5
6
|
import '../tts/index.cjs';
|
|
6
|
-
import '../deployer/index.cjs';
|
|
7
7
|
import 'ai';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-Bo1uigWx.cjs';
|
|
9
9
|
import 'sift';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import 'json-schema';
|
|
12
|
+
import 'node:http';
|
|
13
|
+
import 'hono';
|
|
12
14
|
import '../runtime-context/index.cjs';
|
|
15
|
+
import 'hono/cors';
|
|
16
|
+
import 'hono-openapi';
|
|
13
17
|
import '@opentelemetry/api';
|
|
14
18
|
import 'xstate';
|
|
15
19
|
import 'node:events';
|
|
16
|
-
import 'node:http';
|
|
17
|
-
import 'hono';
|
|
18
20
|
import 'events';
|
|
19
|
-
import 'hono/cors';
|
|
20
|
-
import 'hono-openapi';
|
|
21
21
|
import 'ai/test';
|
|
22
|
+
import '../bundler/index.cjs';
|
|
22
23
|
import 'stream';
|
|
23
|
-
import 'pino';
|
|
24
|
-
import '../vector/filter/index.cjs';
|
|
25
24
|
import '@opentelemetry/sdk-trace-base';
|
|
26
|
-
import '../
|
|
25
|
+
import '../vector/filter/index.cjs';
|
package/dist/mastra/index.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../index
|
|
1
|
+
export { aG as Config, a as Mastra } from '../base-DttB7sJD.js';
|
|
2
|
+
import '../deployer/index.js';
|
|
3
|
+
import '../logger-EhZkzZOr.js';
|
|
3
4
|
import '../vector/index.js';
|
|
4
|
-
import '../base-
|
|
5
|
+
import '../base-tc5kgDTD.js';
|
|
5
6
|
import '../tts/index.js';
|
|
6
|
-
import '../deployer/index.js';
|
|
7
7
|
import 'ai';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-Bo1uigWx.js';
|
|
9
9
|
import 'sift';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import 'json-schema';
|
|
12
|
+
import 'node:http';
|
|
13
|
+
import 'hono';
|
|
12
14
|
import '../runtime-context/index.js';
|
|
15
|
+
import 'hono/cors';
|
|
16
|
+
import 'hono-openapi';
|
|
13
17
|
import '@opentelemetry/api';
|
|
14
18
|
import 'xstate';
|
|
15
19
|
import 'node:events';
|
|
16
|
-
import 'node:http';
|
|
17
|
-
import 'hono';
|
|
18
20
|
import 'events';
|
|
19
|
-
import 'hono/cors';
|
|
20
|
-
import 'hono-openapi';
|
|
21
21
|
import 'ai/test';
|
|
22
|
+
import '../bundler/index.js';
|
|
22
23
|
import 'stream';
|
|
23
|
-
import 'pino';
|
|
24
|
-
import '../vector/filter/index.js';
|
|
25
24
|
import '@opentelemetry/sdk-trace-base';
|
|
26
|
-
import '../
|
|
25
|
+
import '../vector/filter/index.js';
|
package/dist/mastra/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Mastra } from '../chunk-
|
|
1
|
+
export { Mastra } from '../chunk-ZB3LEHL2.js';
|
package/dist/mcp/index.cjs
CHANGED
|
@@ -1,40 +1,98 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkYEULQPUY_cjs = require('../chunk-YEULQPUY.cjs');
|
|
4
|
+
var chunkSWW4EBUZ_cjs = require('../chunk-SWW4EBUZ.cjs');
|
|
5
|
+
var crypto = require('crypto');
|
|
6
|
+
var slugify = require('@sindresorhus/slugify');
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var slugify__default = /*#__PURE__*/_interopDefault(slugify);
|
|
11
|
+
|
|
12
|
+
var MCPServerBase = class extends chunkYEULQPUY_cjs.MastraBase {
|
|
13
|
+
/** Tracks if the server ID has been definitively set. */
|
|
14
|
+
idWasSet = false;
|
|
15
|
+
/** The display name of the MCP server. */
|
|
11
16
|
name;
|
|
12
|
-
/**
|
|
13
|
-
* Version of the MCP server
|
|
14
|
-
*/
|
|
17
|
+
/** The semantic version of the MCP server. */
|
|
15
18
|
version;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
/** Internal storage for the server's unique ID. */
|
|
20
|
+
_id;
|
|
21
|
+
/** A description of what the MCP server does. */
|
|
22
|
+
description;
|
|
23
|
+
/** Repository information for the server's source code. */
|
|
24
|
+
repository;
|
|
25
|
+
/** The release date of this server version (ISO 8601 string). */
|
|
26
|
+
releaseDate;
|
|
27
|
+
/** Indicates if this version is the latest available. */
|
|
28
|
+
isLatest;
|
|
29
|
+
/** The canonical packaging format (e.g., "npm", "docker"), if applicable. */
|
|
30
|
+
packageCanonical;
|
|
31
|
+
/** Information about installable packages for this server. */
|
|
32
|
+
packages;
|
|
33
|
+
/** Information about remote access points for this server. */
|
|
34
|
+
remotes;
|
|
35
|
+
/** The tools registered with and converted by this MCP server. */
|
|
19
36
|
convertedTools;
|
|
37
|
+
/** Reference to the Mastra instance if this server is registered with one. */
|
|
20
38
|
mastra;
|
|
21
39
|
/**
|
|
22
|
-
*
|
|
40
|
+
* Public getter for the server's unique ID.
|
|
41
|
+
* The ID is set at construction or by Mastra and is read-only afterwards.
|
|
42
|
+
*/
|
|
43
|
+
get id() {
|
|
44
|
+
return this._id;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets a read-only view of the registered tools.
|
|
48
|
+
* @returns A readonly record of converted tools.
|
|
23
49
|
*/
|
|
24
50
|
tools() {
|
|
25
51
|
return this.convertedTools;
|
|
26
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Sets the server's unique ID. This method is typically called by Mastra when
|
|
55
|
+
* registering the server, using the key provided in the Mastra configuration.
|
|
56
|
+
* It ensures the ID is set only once.
|
|
57
|
+
* If an ID was already provided in the MCPServerConfig, this method will be a no-op.
|
|
58
|
+
* @param id The unique ID to assign to the server.
|
|
59
|
+
*/
|
|
60
|
+
setId(id) {
|
|
61
|
+
if (this.idWasSet) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this._id = id;
|
|
65
|
+
this.idWasSet = true;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Internal method used by Mastra to register itself with the server.
|
|
69
|
+
* @param mastra The Mastra instance.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
27
72
|
__registerMastra(mastra) {
|
|
28
73
|
this.mastra = mastra;
|
|
29
74
|
}
|
|
30
75
|
/**
|
|
31
|
-
* Constructor for the MCPServerBase
|
|
32
|
-
* @param config Configuration options for the MCP server
|
|
76
|
+
* Constructor for the MCPServerBase.
|
|
77
|
+
* @param config Configuration options for the MCP server, including metadata.
|
|
33
78
|
*/
|
|
34
79
|
constructor(config) {
|
|
35
|
-
super({ component:
|
|
80
|
+
super({ component: chunkSWW4EBUZ_cjs.RegisteredLogger.MCP_SERVER, name: config.name });
|
|
36
81
|
this.name = config.name;
|
|
37
82
|
this.version = config.version;
|
|
83
|
+
if (config.id) {
|
|
84
|
+
this._id = slugify__default.default(config.id);
|
|
85
|
+
this.idWasSet = true;
|
|
86
|
+
} else {
|
|
87
|
+
this._id = crypto.randomUUID();
|
|
88
|
+
}
|
|
89
|
+
this.description = config.description;
|
|
90
|
+
this.repository = config.repository;
|
|
91
|
+
this.releaseDate = config.releaseDate || (/* @__PURE__ */ new Date()).toISOString();
|
|
92
|
+
this.isLatest = config.isLatest === void 0 ? true : config.isLatest;
|
|
93
|
+
this.packageCanonical = config.packageCanonical;
|
|
94
|
+
this.packages = config.packages;
|
|
95
|
+
this.remotes = config.remotes;
|
|
38
96
|
this.convertedTools = this.convertTools(config.tools);
|
|
39
97
|
}
|
|
40
98
|
};
|
package/dist/mcp/index.d.cts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../base-
|
|
1
|
+
export { bv as ArgumentInfo, bz as CommandInfo, bp as ConvertedTool, bA as EnvironmentVariableInfo, bh as MCPServerBase, bD as MCPServerConfig, bs as MCPServerHTTPOptions, br as MCPServerHonoSSEOptions, bq as MCPServerSSEOptions, bx as NamedArgumentInfo, bB as PackageInfo, bw as PositionalArgumentInfo, bC as RemoteInfo, bt as Repository, bF as ServerDetailInfo, bE as ServerInfo, by as SubcommandInfo, bu as VersionDetail } from '../base-aJ3etsh5.cjs';
|
|
2
|
+
import '../base-aPYtPBT2.cjs';
|
|
3
3
|
import 'ai';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-Bo1uigWx.cjs';
|
|
5
5
|
import 'sift';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'json-schema';
|
|
8
|
-
import '../index
|
|
9
|
-
import '
|
|
10
|
-
import 'pino';
|
|
11
|
-
import '../runtime-context/index.cjs';
|
|
8
|
+
import '../deployer/index.cjs';
|
|
9
|
+
import '../bundler/index.cjs';
|
|
12
10
|
import '@opentelemetry/api';
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
15
|
-
import '../vector/index.cjs';
|
|
16
|
-
import '../vector/filter/index.cjs';
|
|
11
|
+
import '../logger-EhZkzZOr.cjs';
|
|
12
|
+
import 'stream';
|
|
17
13
|
import '@opentelemetry/sdk-trace-base';
|
|
18
|
-
import '../tts/index.cjs';
|
|
19
14
|
import 'node:http';
|
|
20
15
|
import 'hono';
|
|
21
|
-
import '
|
|
22
|
-
import '../
|
|
23
|
-
import '../
|
|
16
|
+
import '../runtime-context/index.cjs';
|
|
17
|
+
import '../vector/index.cjs';
|
|
18
|
+
import '../vector/filter/index.cjs';
|
|
24
19
|
import 'hono/cors';
|
|
25
20
|
import 'hono-openapi';
|
|
21
|
+
import '../tts/index.cjs';
|
|
22
|
+
import 'xstate';
|
|
23
|
+
import 'node:events';
|
|
24
|
+
import 'events';
|
|
26
25
|
import 'ai/test';
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../base-
|
|
1
|
+
export { bv as ArgumentInfo, bz as CommandInfo, bp as ConvertedTool, bA as EnvironmentVariableInfo, bh as MCPServerBase, bD as MCPServerConfig, bs as MCPServerHTTPOptions, br as MCPServerHonoSSEOptions, bq as MCPServerSSEOptions, bx as NamedArgumentInfo, bB as PackageInfo, bw as PositionalArgumentInfo, bC as RemoteInfo, bt as Repository, bF as ServerDetailInfo, bE as ServerInfo, by as SubcommandInfo, bu as VersionDetail } from '../base-DttB7sJD.js';
|
|
2
|
+
import '../base-tc5kgDTD.js';
|
|
3
3
|
import 'ai';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-Bo1uigWx.js';
|
|
5
5
|
import 'sift';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'json-schema';
|
|
8
|
-
import '../index
|
|
9
|
-
import '
|
|
10
|
-
import 'pino';
|
|
11
|
-
import '../runtime-context/index.js';
|
|
8
|
+
import '../deployer/index.js';
|
|
9
|
+
import '../bundler/index.js';
|
|
12
10
|
import '@opentelemetry/api';
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
15
|
-
import '../vector/index.js';
|
|
16
|
-
import '../vector/filter/index.js';
|
|
11
|
+
import '../logger-EhZkzZOr.js';
|
|
12
|
+
import 'stream';
|
|
17
13
|
import '@opentelemetry/sdk-trace-base';
|
|
18
|
-
import '../tts/index.js';
|
|
19
14
|
import 'node:http';
|
|
20
15
|
import 'hono';
|
|
21
|
-
import '
|
|
22
|
-
import '../
|
|
23
|
-
import '../
|
|
16
|
+
import '../runtime-context/index.js';
|
|
17
|
+
import '../vector/index.js';
|
|
18
|
+
import '../vector/filter/index.js';
|
|
24
19
|
import 'hono/cors';
|
|
25
20
|
import 'hono-openapi';
|
|
21
|
+
import '../tts/index.js';
|
|
22
|
+
import 'xstate';
|
|
23
|
+
import 'node:events';
|
|
24
|
+
import 'events';
|
|
26
25
|
import 'ai/test';
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,38 +1,92 @@
|
|
|
1
|
-
import { MastraBase } from '../chunk-
|
|
2
|
-
import { RegisteredLogger } from '../chunk-
|
|
1
|
+
import { MastraBase } from '../chunk-FI7R232B.js';
|
|
2
|
+
import { RegisteredLogger } from '../chunk-VHLL4AZK.js';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import slugify from '@sindresorhus/slugify';
|
|
3
5
|
|
|
4
|
-
// src/mcp/index.ts
|
|
5
6
|
var MCPServerBase = class extends MastraBase {
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/** Tracks if the server ID has been definitively set. */
|
|
8
|
+
idWasSet = false;
|
|
9
|
+
/** The display name of the MCP server. */
|
|
9
10
|
name;
|
|
10
|
-
/**
|
|
11
|
-
* Version of the MCP server
|
|
12
|
-
*/
|
|
11
|
+
/** The semantic version of the MCP server. */
|
|
13
12
|
version;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
/** Internal storage for the server's unique ID. */
|
|
14
|
+
_id;
|
|
15
|
+
/** A description of what the MCP server does. */
|
|
16
|
+
description;
|
|
17
|
+
/** Repository information for the server's source code. */
|
|
18
|
+
repository;
|
|
19
|
+
/** The release date of this server version (ISO 8601 string). */
|
|
20
|
+
releaseDate;
|
|
21
|
+
/** Indicates if this version is the latest available. */
|
|
22
|
+
isLatest;
|
|
23
|
+
/** The canonical packaging format (e.g., "npm", "docker"), if applicable. */
|
|
24
|
+
packageCanonical;
|
|
25
|
+
/** Information about installable packages for this server. */
|
|
26
|
+
packages;
|
|
27
|
+
/** Information about remote access points for this server. */
|
|
28
|
+
remotes;
|
|
29
|
+
/** The tools registered with and converted by this MCP server. */
|
|
17
30
|
convertedTools;
|
|
31
|
+
/** Reference to the Mastra instance if this server is registered with one. */
|
|
18
32
|
mastra;
|
|
19
33
|
/**
|
|
20
|
-
*
|
|
34
|
+
* Public getter for the server's unique ID.
|
|
35
|
+
* The ID is set at construction or by Mastra and is read-only afterwards.
|
|
36
|
+
*/
|
|
37
|
+
get id() {
|
|
38
|
+
return this._id;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Gets a read-only view of the registered tools.
|
|
42
|
+
* @returns A readonly record of converted tools.
|
|
21
43
|
*/
|
|
22
44
|
tools() {
|
|
23
45
|
return this.convertedTools;
|
|
24
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Sets the server's unique ID. This method is typically called by Mastra when
|
|
49
|
+
* registering the server, using the key provided in the Mastra configuration.
|
|
50
|
+
* It ensures the ID is set only once.
|
|
51
|
+
* If an ID was already provided in the MCPServerConfig, this method will be a no-op.
|
|
52
|
+
* @param id The unique ID to assign to the server.
|
|
53
|
+
*/
|
|
54
|
+
setId(id) {
|
|
55
|
+
if (this.idWasSet) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this._id = id;
|
|
59
|
+
this.idWasSet = true;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Internal method used by Mastra to register itself with the server.
|
|
63
|
+
* @param mastra The Mastra instance.
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
25
66
|
__registerMastra(mastra) {
|
|
26
67
|
this.mastra = mastra;
|
|
27
68
|
}
|
|
28
69
|
/**
|
|
29
|
-
* Constructor for the MCPServerBase
|
|
30
|
-
* @param config Configuration options for the MCP server
|
|
70
|
+
* Constructor for the MCPServerBase.
|
|
71
|
+
* @param config Configuration options for the MCP server, including metadata.
|
|
31
72
|
*/
|
|
32
73
|
constructor(config) {
|
|
33
74
|
super({ component: RegisteredLogger.MCP_SERVER, name: config.name });
|
|
34
75
|
this.name = config.name;
|
|
35
76
|
this.version = config.version;
|
|
77
|
+
if (config.id) {
|
|
78
|
+
this._id = slugify(config.id);
|
|
79
|
+
this.idWasSet = true;
|
|
80
|
+
} else {
|
|
81
|
+
this._id = randomUUID();
|
|
82
|
+
}
|
|
83
|
+
this.description = config.description;
|
|
84
|
+
this.repository = config.repository;
|
|
85
|
+
this.releaseDate = config.releaseDate || (/* @__PURE__ */ new Date()).toISOString();
|
|
86
|
+
this.isLatest = config.isLatest === void 0 ? true : config.isLatest;
|
|
87
|
+
this.packageCanonical = config.packageCanonical;
|
|
88
|
+
this.packages = config.packages;
|
|
89
|
+
this.remotes = config.remotes;
|
|
36
90
|
this.convertedTools = this.convertTools(config.tools);
|
|
37
91
|
}
|
|
38
92
|
};
|
package/dist/memory/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZZDAC5KD_cjs = require('../chunk-ZZDAC5KD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraMemory", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkZZDAC5KD_cjs.MastraMemory; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MemoryProcessor", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkZZDAC5KD_cjs.MemoryProcessor; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "memoryDefaultOptions", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkZZDAC5KD_cjs.memoryDefaultOptions; }
|
|
18
18
|
});
|
package/dist/memory/index.d.cts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ab as MastraMemory, aI as MemoryConfig, aL as MemoryProcessor, aK as MemoryProcessorOpts, aH as MessageResponse, e as MessageType, aJ as SharedMemoryConfig, d as StorageThreadType, aM as memoryDefaultOptions } from '../base-aJ3etsh5.cjs';
|
|
2
2
|
export { Message as AiMessageType } from 'ai';
|
|
3
|
-
import '../base-
|
|
3
|
+
import '../base-aPYtPBT2.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
|
-
import '../
|
|
5
|
+
import '../logger-EhZkzZOr.cjs';
|
|
6
6
|
import 'stream';
|
|
7
|
-
import 'pino';
|
|
8
7
|
import '@opentelemetry/sdk-trace-base';
|
|
9
|
-
import '../types-
|
|
8
|
+
import '../types-Bo1uigWx.cjs';
|
|
10
9
|
import 'sift';
|
|
11
10
|
import 'zod';
|
|
12
11
|
import 'json-schema';
|
|
12
|
+
import '../deployer/index.cjs';
|
|
13
|
+
import '../bundler/index.cjs';
|
|
14
|
+
import 'node:http';
|
|
15
|
+
import 'hono';
|
|
13
16
|
import '../runtime-context/index.cjs';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
17
|
import '../vector/index.cjs';
|
|
17
18
|
import '../vector/filter/index.cjs';
|
|
18
|
-
import '../tts/index.cjs';
|
|
19
|
-
import 'node:http';
|
|
20
|
-
import 'hono';
|
|
21
|
-
import 'events';
|
|
22
|
-
import '../deployer/index.cjs';
|
|
23
|
-
import '../bundler/index.cjs';
|
|
24
19
|
import 'hono/cors';
|
|
25
20
|
import 'hono-openapi';
|
|
21
|
+
import '../tts/index.cjs';
|
|
22
|
+
import 'xstate';
|
|
23
|
+
import 'node:events';
|
|
24
|
+
import 'events';
|
|
26
25
|
import 'ai/test';
|
package/dist/memory/index.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ab as MastraMemory, aI as MemoryConfig, aL as MemoryProcessor, aK as MemoryProcessorOpts, aH as MessageResponse, e as MessageType, aJ as SharedMemoryConfig, d as StorageThreadType, aM as memoryDefaultOptions } from '../base-DttB7sJD.js';
|
|
2
2
|
export { Message as AiMessageType } from 'ai';
|
|
3
|
-
import '../base-
|
|
3
|
+
import '../base-tc5kgDTD.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
|
-
import '../
|
|
5
|
+
import '../logger-EhZkzZOr.js';
|
|
6
6
|
import 'stream';
|
|
7
|
-
import 'pino';
|
|
8
7
|
import '@opentelemetry/sdk-trace-base';
|
|
9
|
-
import '../types-
|
|
8
|
+
import '../types-Bo1uigWx.js';
|
|
10
9
|
import 'sift';
|
|
11
10
|
import 'zod';
|
|
12
11
|
import 'json-schema';
|
|
12
|
+
import '../deployer/index.js';
|
|
13
|
+
import '../bundler/index.js';
|
|
14
|
+
import 'node:http';
|
|
15
|
+
import 'hono';
|
|
13
16
|
import '../runtime-context/index.js';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
17
|
import '../vector/index.js';
|
|
17
18
|
import '../vector/filter/index.js';
|
|
18
|
-
import '../tts/index.js';
|
|
19
|
-
import 'node:http';
|
|
20
|
-
import 'hono';
|
|
21
|
-
import 'events';
|
|
22
|
-
import '../deployer/index.js';
|
|
23
|
-
import '../bundler/index.js';
|
|
24
19
|
import 'hono/cors';
|
|
25
20
|
import 'hono-openapi';
|
|
21
|
+
import '../tts/index.js';
|
|
22
|
+
import 'xstate';
|
|
23
|
+
import 'node:events';
|
|
24
|
+
import 'events';
|
|
26
25
|
import 'ai/test';
|
package/dist/memory/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MastraMemory, MemoryProcessor, memoryDefaultOptions } from '../chunk-
|
|
1
|
+
export { MastraMemory, MemoryProcessor, memoryDefaultOptions } from '../chunk-GQ2XQ4UN.js';
|
package/dist/network/index.cjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkAOGUTJUO_cjs = require('../chunk-AOGUTJUO.cjs');
|
|
4
|
+
var chunkU3L3NEOM_cjs = require('../chunk-U3L3NEOM.cjs');
|
|
5
|
+
var chunkYEULQPUY_cjs = require('../chunk-YEULQPUY.cjs');
|
|
6
|
+
var chunkSWW4EBUZ_cjs = require('../chunk-SWW4EBUZ.cjs');
|
|
7
7
|
var zod = require('zod');
|
|
8
8
|
|
|
9
|
-
var AgentNetwork = class extends
|
|
9
|
+
var AgentNetwork = class extends chunkYEULQPUY_cjs.MastraBase {
|
|
10
10
|
#instructions;
|
|
11
11
|
#agents;
|
|
12
12
|
#model;
|
|
13
13
|
#routingAgent;
|
|
14
14
|
#agentHistory = {};
|
|
15
15
|
constructor(config) {
|
|
16
|
-
super({ component:
|
|
16
|
+
super({ component: chunkSWW4EBUZ_cjs.RegisteredLogger.NETWORK, name: config.name || "AgentNetwork" });
|
|
17
17
|
this.#instructions = config.instructions;
|
|
18
18
|
this.#agents = config.agents;
|
|
19
19
|
this.#model = config.model;
|
|
20
|
-
this.#routingAgent = new
|
|
20
|
+
this.#routingAgent = new chunkAOGUTJUO_cjs.Agent({
|
|
21
21
|
name: config.name,
|
|
22
22
|
instructions: this.getInstructions(),
|
|
23
23
|
model: this.#model,
|
|
@@ -29,7 +29,7 @@ var AgentNetwork = class extends chunkEG74VBSP_cjs.MastraBase {
|
|
|
29
29
|
}
|
|
30
30
|
getTools() {
|
|
31
31
|
return {
|
|
32
|
-
transmit:
|
|
32
|
+
transmit: chunkU3L3NEOM_cjs.createTool({
|
|
33
33
|
id: "transmit",
|
|
34
34
|
description: "Call one or more specialized agents to handle specific tasks",
|
|
35
35
|
inputSchema: zod.z.object({
|
package/dist/network/index.d.cts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { bg as AgentNetwork, bo as AgentNetworkConfig } from '../base-aJ3etsh5.cjs';
|
|
2
2
|
import 'ai';
|
|
3
|
-
import '../base-
|
|
3
|
+
import '../base-aPYtPBT2.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
|
-
import '../
|
|
5
|
+
import '../logger-EhZkzZOr.cjs';
|
|
6
6
|
import 'stream';
|
|
7
|
-
import 'pino';
|
|
8
7
|
import '@opentelemetry/sdk-trace-base';
|
|
9
|
-
import '../types-
|
|
8
|
+
import '../types-Bo1uigWx.cjs';
|
|
10
9
|
import 'sift';
|
|
11
10
|
import 'zod';
|
|
12
11
|
import 'json-schema';
|
|
12
|
+
import '../deployer/index.cjs';
|
|
13
|
+
import '../bundler/index.cjs';
|
|
14
|
+
import 'node:http';
|
|
15
|
+
import 'hono';
|
|
13
16
|
import '../runtime-context/index.cjs';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
17
|
import '../vector/index.cjs';
|
|
17
18
|
import '../vector/filter/index.cjs';
|
|
18
|
-
import '../tts/index.cjs';
|
|
19
|
-
import 'node:http';
|
|
20
|
-
import 'hono';
|
|
21
|
-
import 'events';
|
|
22
|
-
import '../deployer/index.cjs';
|
|
23
|
-
import '../bundler/index.cjs';
|
|
24
19
|
import 'hono/cors';
|
|
25
20
|
import 'hono-openapi';
|
|
21
|
+
import '../tts/index.cjs';
|
|
22
|
+
import 'xstate';
|
|
23
|
+
import 'node:events';
|
|
24
|
+
import 'events';
|
|
26
25
|
import 'ai/test';
|
package/dist/network/index.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { bg as AgentNetwork, bo as AgentNetworkConfig } from '../base-DttB7sJD.js';
|
|
2
2
|
import 'ai';
|
|
3
|
-
import '../base-
|
|
3
|
+
import '../base-tc5kgDTD.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
|
-
import '../
|
|
5
|
+
import '../logger-EhZkzZOr.js';
|
|
6
6
|
import 'stream';
|
|
7
|
-
import 'pino';
|
|
8
7
|
import '@opentelemetry/sdk-trace-base';
|
|
9
|
-
import '../types-
|
|
8
|
+
import '../types-Bo1uigWx.js';
|
|
10
9
|
import 'sift';
|
|
11
10
|
import 'zod';
|
|
12
11
|
import 'json-schema';
|
|
12
|
+
import '../deployer/index.js';
|
|
13
|
+
import '../bundler/index.js';
|
|
14
|
+
import 'node:http';
|
|
15
|
+
import 'hono';
|
|
13
16
|
import '../runtime-context/index.js';
|
|
14
|
-
import 'xstate';
|
|
15
|
-
import 'node:events';
|
|
16
17
|
import '../vector/index.js';
|
|
17
18
|
import '../vector/filter/index.js';
|
|
18
|
-
import '../tts/index.js';
|
|
19
|
-
import 'node:http';
|
|
20
|
-
import 'hono';
|
|
21
|
-
import 'events';
|
|
22
|
-
import '../deployer/index.js';
|
|
23
|
-
import '../bundler/index.js';
|
|
24
19
|
import 'hono/cors';
|
|
25
20
|
import 'hono-openapi';
|
|
21
|
+
import '../tts/index.js';
|
|
22
|
+
import 'xstate';
|
|
23
|
+
import 'node:events';
|
|
24
|
+
import 'events';
|
|
26
25
|
import 'ai/test';
|
package/dist/network/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Agent } from '../chunk-
|
|
2
|
-
import { createTool } from '../chunk-
|
|
3
|
-
import { MastraBase } from '../chunk-
|
|
4
|
-
import { RegisteredLogger } from '../chunk-
|
|
1
|
+
import { Agent } from '../chunk-E7CLY6SK.js';
|
|
2
|
+
import { createTool } from '../chunk-2PW6UJMW.js';
|
|
3
|
+
import { MastraBase } from '../chunk-FI7R232B.js';
|
|
4
|
+
import { RegisteredLogger } from '../chunk-VHLL4AZK.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
7
|
var AgentNetwork = class extends MastraBase {
|
|
@@ -11,7 +11,7 @@ var AgentNetwork = class extends MastraBase {
|
|
|
11
11
|
#routingAgent;
|
|
12
12
|
#agentHistory = {};
|
|
13
13
|
constructor(config) {
|
|
14
|
-
super({ component: RegisteredLogger.NETWORK, name: "AgentNetwork" });
|
|
14
|
+
super({ component: RegisteredLogger.NETWORK, name: config.name || "AgentNetwork" });
|
|
15
15
|
this.#instructions = config.instructions;
|
|
16
16
|
this.#agents = config.agents;
|
|
17
17
|
this.#model = config.model;
|
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2U7ZZUFO_cjs = require('../chunk-2U7ZZUFO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CohereRelevanceScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk2U7ZZUFO_cjs.CohereRelevanceScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk2U7ZZUFO_cjs.MastraAgentRelevanceScorer; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "createSimilarityPrompt", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk2U7ZZUFO_cjs.createSimilarityPrompt; }
|
|
18
18
|
});
|