@mastra/deployer 0.10.2-alpha.1 → 0.10.2-alpha.3

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.
@@ -387,6 +387,11 @@ export declare function getLegacyWorkflowRunsHandler(c: Context): Promise<Respon
387
387
 
388
388
  export declare function getLegacyWorkflowsHandler(c: Context): Promise<Response>;
389
389
 
390
+ /**
391
+ * Get available speakers for an agent
392
+ */
393
+ export declare function getListenerHandler(c: Context): Promise<Response>;
394
+
390
395
  export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response & TypedResponse< {
391
396
  id: string;
392
397
  name: any;
@@ -387,6 +387,11 @@ export declare function getLegacyWorkflowRunsHandler(c: Context): Promise<Respon
387
387
 
388
388
  export declare function getLegacyWorkflowsHandler(c: Context): Promise<Response>;
389
389
 
390
+ /**
391
+ * Get available speakers for an agent
392
+ */
393
+ export declare function getListenerHandler(c: Context): Promise<Response>;
394
+
390
395
  export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response & TypedResponse< {
391
396
  id: string;
392
397
  name: any;
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkOJY5LJPT_cjs = require('../chunk-OJY5LJPT.cjs');
3
+ var chunkTSG63RGL_cjs = require('../chunk-TSG63RGL.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "analyzeBundle", {
8
8
  enumerable: true,
9
- get: function () { return chunkOJY5LJPT_cjs.analyzeBundle; }
9
+ get: function () { return chunkTSG63RGL_cjs.analyzeBundle; }
10
10
  });
@@ -1 +1 @@
1
- export { analyzeBundle } from '../chunk-W46BY5GT.js';
1
+ export { analyzeBundle } from '../chunk-2LZRVR53.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkYHCVXGZM_cjs = require('../chunk-YHCVXGZM.cjs');
4
- var chunkWK63QOD5_cjs = require('../chunk-WK63QOD5.cjs');
5
- var chunkOJY5LJPT_cjs = require('../chunk-OJY5LJPT.cjs');
3
+ var chunkJ46MFOZR_cjs = require('../chunk-J46MFOZR.cjs');
4
+ var chunkDTQ7BTPM_cjs = require('../chunk-DTQ7BTPM.cjs');
5
+ var chunkTSG63RGL_cjs = require('../chunk-TSG63RGL.cjs');
6
6
  var chunkIMGVLBV7_cjs = require('../chunk-IMGVLBV7.cjs');
7
7
  var chunk4VC5Z4YR_cjs = require('../chunk-4VC5Z4YR.cjs');
8
8
 
@@ -10,27 +10,27 @@ var chunk4VC5Z4YR_cjs = require('../chunk-4VC5Z4YR.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "createWatcher", {
12
12
  enumerable: true,
13
- get: function () { return chunkYHCVXGZM_cjs.createWatcher; }
13
+ get: function () { return chunkJ46MFOZR_cjs.createWatcher; }
14
14
  });
15
15
  Object.defineProperty(exports, "getServerOptions", {
16
16
  enumerable: true,
17
- get: function () { return chunkYHCVXGZM_cjs.getServerOptions; }
17
+ get: function () { return chunkJ46MFOZR_cjs.getServerOptions; }
18
18
  });
19
19
  Object.defineProperty(exports, "getWatcherInputOptions", {
20
20
  enumerable: true,
21
- get: function () { return chunkYHCVXGZM_cjs.getInputOptions; }
21
+ get: function () { return chunkJ46MFOZR_cjs.getInputOptions; }
22
22
  });
23
23
  Object.defineProperty(exports, "writeTelemetryConfig", {
24
24
  enumerable: true,
25
- get: function () { return chunkWK63QOD5_cjs.writeTelemetryConfig; }
25
+ get: function () { return chunkDTQ7BTPM_cjs.writeTelemetryConfig; }
26
26
  });
27
27
  Object.defineProperty(exports, "analyzeBundle", {
28
28
  enumerable: true,
29
- get: function () { return chunkOJY5LJPT_cjs.analyzeBundle; }
29
+ get: function () { return chunkTSG63RGL_cjs.analyzeBundle; }
30
30
  });
31
31
  Object.defineProperty(exports, "getBundlerOptions", {
32
32
  enumerable: true,
33
- get: function () { return chunkOJY5LJPT_cjs.getBundlerOptions; }
33
+ get: function () { return chunkTSG63RGL_cjs.getBundlerOptions; }
34
34
  });
35
35
  Object.defineProperty(exports, "createBundler", {
36
36
  enumerable: true,
@@ -1,5 +1,5 @@
1
- export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-5ZQI6XPC.js';
2
- export { writeTelemetryConfig } from '../chunk-O3VM5GJZ.js';
3
- export { analyzeBundle, getBundlerOptions } from '../chunk-W46BY5GT.js';
1
+ export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-XFHGCEOK.js';
2
+ export { writeTelemetryConfig } from '../chunk-KWJ2766I.js';
3
+ export { analyzeBundle, getBundlerOptions } from '../chunk-2LZRVR53.js';
4
4
  export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-AOSWYZKN.js';
5
5
  export { Deps, FileService } from '../chunk-UV4RQQ3R.js';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkPJB6TDF7_cjs = require('../chunk-PJB6TDF7.cjs');
3
+ var chunk3W43JESU_cjs = require('../chunk-3W43JESU.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Bundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkPJB6TDF7_cjs.Bundler; }
9
+ get: function () { return chunk3W43JESU_cjs.Bundler; }
10
10
  });
@@ -1 +1 @@
1
- export { Bundler } from '../chunk-DGNRILK6.js';
1
+ export { Bundler } from '../chunk-TDWDSZWX.js';
@@ -392,7 +392,7 @@ async function analyze(entry, mastraEntry, isVirtualFile, platform, logger) {
392
392
  continue;
393
393
  }
394
394
  for (const dynamicImport of o.dynamicImports) {
395
- if (!depsToOptimize.has(dynamicImport)) {
395
+ if (!depsToOptimize.has(dynamicImport) && !isNodeBuiltin(dynamicImport)) {
396
396
  depsToOptimize.set(dynamicImport, ["*"]);
397
397
  }
398
398
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkWK63QOD5_cjs = require('./chunk-WK63QOD5.cjs');
4
- var chunkOJY5LJPT_cjs = require('./chunk-OJY5LJPT.cjs');
3
+ var chunkDTQ7BTPM_cjs = require('./chunk-DTQ7BTPM.cjs');
4
+ var chunkTSG63RGL_cjs = require('./chunk-TSG63RGL.cjs');
5
5
  var chunkIMGVLBV7_cjs = require('./chunk-IMGVLBV7.cjs');
6
6
  var chunk4VC5Z4YR_cjs = require('./chunk-4VC5Z4YR.cjs');
7
7
  var fs = require('fs');
@@ -131,7 +131,7 @@ var Bundler = class extends bundler.MastraBundler {
131
131
  }
132
132
  async writeInstrumentationFile(outputDirectory) {
133
133
  const instrumentationFile = path.join(outputDirectory, "instrumentation.mjs");
134
- const __dirname = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-PJB6TDF7.cjs', document.baseURI).href))));
134
+ const __dirname = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-3W43JESU.cjs', document.baseURI).href))));
135
135
  await fsExtra.copy(path.join(__dirname, "templates", "instrumentation-template.js"), instrumentationFile);
136
136
  }
137
137
  async writePackageJson(outputDirectory, dependencies, resolutions) {
@@ -143,9 +143,10 @@ var Bundler = class extends bundler.MastraBundler {
143
143
  if (key.startsWith("@")) {
144
144
  const pkgChunks = key.split("/");
145
145
  dependenciesMap.set(`${pkgChunks[0]}/${pkgChunks[1]}`, value);
146
- continue;
146
+ } else {
147
+ const pkgName = key.split("/")[0] || key;
148
+ dependenciesMap.set(pkgName, value);
147
149
  }
148
- dependenciesMap.set(key, value);
149
150
  }
150
151
  dependenciesMap.set("@opentelemetry/instrumentation", "latest");
151
152
  await promises.writeFile(
@@ -177,7 +178,7 @@ var Bundler = class extends bundler.MastraBundler {
177
178
  return chunkIMGVLBV7_cjs.createBundler(inputOptions, outputOptions);
178
179
  }
179
180
  async analyze(entry, mastraFile, outputDirectory) {
180
- return await chunkOJY5LJPT_cjs.analyzeBundle(entry, mastraFile, path.join(outputDirectory, this.analyzeOutputDir), "node", this.logger);
181
+ return await chunkTSG63RGL_cjs.analyzeBundle(entry, mastraFile, path.join(outputDirectory, this.analyzeOutputDir), "node", this.logger);
181
182
  }
182
183
  async installDependencies(outputDirectory, rootDir = process.cwd()) {
183
184
  const deps = new chunk4VC5Z4YR_cjs.DepsService(rootDir);
@@ -239,14 +240,14 @@ var Bundler = class extends bundler.MastraBundler {
239
240
  }
240
241
  async _bundle(serverFile, mastraEntryFile, outputDirectory, toolsPaths = [], bundleLocation = path.join(outputDirectory, this.outputDir)) {
241
242
  this.logger.info("Start bundling Mastra");
242
- const analyzedBundleInfo = await chunkOJY5LJPT_cjs.analyzeBundle(
243
+ const analyzedBundleInfo = await chunkTSG63RGL_cjs.analyzeBundle(
243
244
  serverFile,
244
245
  mastraEntryFile,
245
246
  path.join(outputDirectory, this.analyzeOutputDir),
246
247
  "node",
247
248
  this.logger
248
249
  );
249
- const { externalDependencies } = await chunkWK63QOD5_cjs.writeTelemetryConfig(mastraEntryFile, path.join(outputDirectory, this.outputDir));
250
+ const { externalDependencies } = await chunkDTQ7BTPM_cjs.writeTelemetryConfig(mastraEntryFile, path.join(outputDirectory, this.outputDir));
250
251
  const dependenciesToInstall = /* @__PURE__ */ new Map();
251
252
  for (const external of externalDependencies) {
252
253
  dependenciesToInstall.set(external, "latest");
@@ -289,9 +290,6 @@ var Bundler = class extends bundler.MastraBundler {
289
290
  return;
290
291
  }
291
292
  }
292
- if (analyzedBundleInfo.externalDependencies.has("@mastra/memory") || analyzedBundleInfo.dependencies.has("@mastra/memory")) {
293
- dependenciesToInstall.set("fastembed", "latest");
294
- }
295
293
  await this.writePackageJson(path.join(outputDirectory, this.outputDir), dependenciesToInstall, resolutions);
296
294
  await this.writeInstrumentationFile(path.join(outputDirectory, this.outputDir));
297
295
  this.logger.info("Bundling Mastra application");
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkOJY5LJPT_cjs = require('./chunk-OJY5LJPT.cjs');
3
+ var chunkTSG63RGL_cjs = require('./chunk-TSG63RGL.cjs');
4
4
  var babel = require('@babel/core');
5
5
  var rollup = require('rollup');
6
6
  var esbuild = require('rollup-plugin-esbuild');
@@ -32,7 +32,7 @@ var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
32
32
 
33
33
  // src/build/babel/remove-all-options-telemetry.ts
34
34
  function removeAllOptionsExceptTelemetry(result) {
35
- return chunkOJY5LJPT_cjs.removeAllOptionsFromMastraExcept(result, "telemetry");
35
+ return chunkTSG63RGL_cjs.removeAllOptionsFromMastraExcept(result, "telemetry");
36
36
  }
37
37
 
38
38
  // src/build/telemetry.ts
@@ -96,7 +96,7 @@ function getTelemetryBundler(entryFile, result) {
96
96
  if (id !== entryFile) {
97
97
  return;
98
98
  }
99
- return chunkOJY5LJPT_cjs.recursiveRemoveNonReferencedNodes(code);
99
+ return chunkTSG63RGL_cjs.recursiveRemoveNonReferencedNodes(code);
100
100
  }
101
101
  },
102
102
  // let esbuild remove all unused imports
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkOJY5LJPT_cjs = require('./chunk-OJY5LJPT.cjs');
3
+ var chunkTSG63RGL_cjs = require('./chunk-TSG63RGL.cjs');
4
4
  var chunkIMGVLBV7_cjs = require('./chunk-IMGVLBV7.cjs');
5
5
  var chunk54KOF3NB_cjs = require('./chunk-54KOF3NB.cjs');
6
6
  var rollup = require('rollup');
@@ -48,7 +48,7 @@ async function getInputOptions2(entryFile, platform, env) {
48
48
  // @ts-ignore
49
49
  (plugin) => !plugin || !plugin?.name || plugin.name !== "node-resolve"
50
50
  );
51
- inputOptions.plugins.push(chunkOJY5LJPT_cjs.aliasHono());
51
+ inputOptions.plugins.push(chunkTSG63RGL_cjs.aliasHono());
52
52
  }
53
53
  return inputOptions;
54
54
  }
@@ -67,7 +67,7 @@ async function createWatcher(inputOptions, outputOptions) {
67
67
 
68
68
  // src/build/babel/remove-all-options-server.ts
69
69
  function removeAllOptionsExceptServer(result) {
70
- return chunkOJY5LJPT_cjs.removeAllOptionsFromMastraExcept(result, "server");
70
+ return chunkTSG63RGL_cjs.removeAllOptionsFromMastraExcept(result, "server");
71
71
  }
72
72
  function getServerOptionsBundler(entryFile, result) {
73
73
  return rollup.rollup({
@@ -130,7 +130,7 @@ function getServerOptionsBundler(entryFile, result) {
130
130
  if (id !== entryFile) {
131
131
  return;
132
132
  }
133
- return chunkOJY5LJPT_cjs.recursiveRemoveNonReferencedNodes(code);
133
+ return chunkTSG63RGL_cjs.recursiveRemoveNonReferencedNodes(code);
134
134
  }
135
135
  },
136
136
  // let esbuild remove all unused imports
@@ -1,4 +1,4 @@
1
- import { recursiveRemoveNonReferencedNodes, removeAllOptionsFromMastraExcept } from './chunk-W46BY5GT.js';
1
+ import { recursiveRemoveNonReferencedNodes, removeAllOptionsFromMastraExcept } from './chunk-2LZRVR53.js';
2
2
  import * as babel from '@babel/core';
3
3
  import { rollup } from 'rollup';
4
4
  import esbuild from 'rollup-plugin-esbuild';
@@ -1,5 +1,5 @@
1
- import { writeTelemetryConfig } from './chunk-O3VM5GJZ.js';
2
- import { analyzeBundle } from './chunk-W46BY5GT.js';
1
+ import { writeTelemetryConfig } from './chunk-KWJ2766I.js';
2
+ import { analyzeBundle } from './chunk-2LZRVR53.js';
3
3
  import { createBundler, getInputOptions } from './chunk-AOSWYZKN.js';
4
4
  import { DepsService, FileService } from './chunk-UV4RQQ3R.js';
5
5
  import { existsSync } from 'node:fs';
@@ -133,9 +133,10 @@ var Bundler = class extends MastraBundler {
133
133
  if (key.startsWith("@")) {
134
134
  const pkgChunks = key.split("/");
135
135
  dependenciesMap.set(`${pkgChunks[0]}/${pkgChunks[1]}`, value);
136
- continue;
136
+ } else {
137
+ const pkgName = key.split("/")[0] || key;
138
+ dependenciesMap.set(pkgName, value);
137
139
  }
138
- dependenciesMap.set(key, value);
139
140
  }
140
141
  dependenciesMap.set("@opentelemetry/instrumentation", "latest");
141
142
  await writeFile(
@@ -279,9 +280,6 @@ var Bundler = class extends MastraBundler {
279
280
  return;
280
281
  }
281
282
  }
282
- if (analyzedBundleInfo.externalDependencies.has("@mastra/memory") || analyzedBundleInfo.dependencies.has("@mastra/memory")) {
283
- dependenciesToInstall.set("fastembed", "latest");
284
- }
285
283
  await this.writePackageJson(join(outputDirectory, this.outputDir), dependenciesToInstall, resolutions);
286
284
  await this.writeInstrumentationFile(join(outputDirectory, this.outputDir));
287
285
  this.logger.info("Bundling Mastra application");
@@ -420,7 +420,7 @@ async function analyze(entry, mastraEntry, isVirtualFile, platform, logger) {
420
420
  continue;
421
421
  }
422
422
  for (const dynamicImport of o.dynamicImports) {
423
- if (!depsToOptimize.has(dynamicImport)) {
423
+ if (!depsToOptimize.has(dynamicImport) && !isNodeBuiltin(dynamicImport)) {
424
424
  depsToOptimize.set(dynamicImport, ["*"]);
425
425
  }
426
426
  }
@@ -1,4 +1,4 @@
1
- import { aliasHono, recursiveRemoveNonReferencedNodes, removeAllOptionsFromMastraExcept } from './chunk-W46BY5GT.js';
1
+ import { aliasHono, recursiveRemoveNonReferencedNodes, removeAllOptionsFromMastraExcept } from './chunk-2LZRVR53.js';
2
2
  import { getInputOptions } from './chunk-AOSWYZKN.js';
3
3
  import { tsConfigPaths } from './chunk-WVBUOQT6.js';
4
4
  import { watch, rollup } from 'rollup';
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkPJB6TDF7_cjs = require('./chunk-PJB6TDF7.cjs');
4
- var chunkOJY5LJPT_cjs = require('./chunk-OJY5LJPT.cjs');
3
+ var chunk3W43JESU_cjs = require('./chunk-3W43JESU.cjs');
4
+ var chunkTSG63RGL_cjs = require('./chunk-TSG63RGL.cjs');
5
5
  var chunk4VC5Z4YR_cjs = require('./chunk-4VC5Z4YR.cjs');
6
6
  var babel = require('@babel/core');
7
7
  var rollup = require('rollup');
@@ -33,7 +33,7 @@ var esbuild__default = /*#__PURE__*/_interopDefault(esbuild);
33
33
  var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
34
34
 
35
35
  // src/deploy/base.ts
36
- var Deployer = class extends chunkPJB6TDF7_cjs.Bundler {
36
+ var Deployer = class extends chunk3W43JESU_cjs.Bundler {
37
37
  deps = new chunk4VC5Z4YR_cjs.DepsService();
38
38
  constructor(args) {
39
39
  super(args.name, "DEPLOYER");
@@ -148,7 +148,7 @@ function getDeployerBundler(entryFile, result) {
148
148
  if (id !== entryFile) {
149
149
  return;
150
150
  }
151
- return chunkOJY5LJPT_cjs.recursiveRemoveNonReferencedNodes(code);
151
+ return chunkTSG63RGL_cjs.recursiveRemoveNonReferencedNodes(code);
152
152
  }
153
153
  },
154
154
  // let esbuild remove all unused imports
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Bundler } from './chunk-DGNRILK6.js';
2
- import { recursiveRemoveNonReferencedNodes } from './chunk-W46BY5GT.js';
1
+ import { Bundler } from './chunk-TDWDSZWX.js';
2
+ import { recursiveRemoveNonReferencedNodes } from './chunk-2LZRVR53.js';
3
3
  import { DepsService, FileService } from './chunk-UV4RQQ3R.js';
4
4
  export { Deps, FileService, createChildProcessLogger, createPinoStream } from './chunk-UV4RQQ3R.js';
5
5
  import * as babel from '@babel/core';
@@ -4054,6 +4054,19 @@ async function speakHandler(c2) {
4054
4054
  return handleError(error, "Error generating speech");
4055
4055
  }
4056
4056
  }
4057
+ async function getListenerHandler(c2) {
4058
+ try {
4059
+ const mastra = c2.get("mastra");
4060
+ const agentId = c2.req.param("agentId");
4061
+ const listeners = await voice.getListenerHandler({
4062
+ mastra,
4063
+ agentId
4064
+ });
4065
+ return c2.json(listeners);
4066
+ } catch (error) {
4067
+ return handleError(error, "Error getting listener");
4068
+ }
4069
+ }
4057
4070
  async function listenHandler(c2) {
4058
4071
  try {
4059
4072
  const mastra = c2.get("mastra");
@@ -5364,6 +5377,45 @@ async function createHonoServer(mastra, options = {}) {
5364
5377
  }),
5365
5378
  speakHandler
5366
5379
  );
5380
+ app.get(
5381
+ "/api/agents/:agentId/voice/listener",
5382
+ h({
5383
+ description: "Get available listener for an agent",
5384
+ tags: ["agents"],
5385
+ parameters: [
5386
+ {
5387
+ name: "agentId",
5388
+ in: "path",
5389
+ required: true,
5390
+ schema: { type: "string" }
5391
+ }
5392
+ ],
5393
+ responses: {
5394
+ 200: {
5395
+ description: "Checks if listener is available for the agent",
5396
+ content: {
5397
+ "application/json": {
5398
+ schema: {
5399
+ type: "object",
5400
+ description: "Listener information depending on the voice provider",
5401
+ properties: {
5402
+ enabled: { type: "boolean" }
5403
+ },
5404
+ additionalProperties: true
5405
+ }
5406
+ }
5407
+ }
5408
+ },
5409
+ 400: {
5410
+ description: "Agent does not have voice capabilities"
5411
+ },
5412
+ 404: {
5413
+ description: "Agent not found"
5414
+ }
5415
+ }
5416
+ }),
5417
+ getListenerHandler
5418
+ );
5367
5419
  app.post(
5368
5420
  "/api/agents/:agentId/listen",
5369
5421
  bodyLimit.bodyLimit({
@@ -5656,7 +5708,43 @@ async function createHonoServer(mastra, options = {}) {
5656
5708
  schema: {
5657
5709
  type: "object",
5658
5710
  properties: {
5659
- servers: { type: "array", items: { $ref: "#/components/schemas/ServerInfo" } },
5711
+ servers: {
5712
+ type: "array",
5713
+ items: {
5714
+ type: "object",
5715
+ properties: {
5716
+ id: { type: "string" },
5717
+ name: { type: "string" },
5718
+ description: { type: "string" },
5719
+ repository: {
5720
+ type: "object",
5721
+ properties: {
5722
+ url: { type: "string", description: "The URL of the repository (e.g., a GitHub URL)" },
5723
+ source: {
5724
+ type: "string",
5725
+ description: "The source control platform (e.g., 'github', 'gitlab')",
5726
+ enum: ["github", "gitlab"]
5727
+ },
5728
+ id: { type: "string", description: "A unique identifier for the repository at the source" }
5729
+ }
5730
+ },
5731
+ version_detail: {
5732
+ type: "object",
5733
+ properties: {
5734
+ version: { type: "string", description: 'The semantic version string (e.g., "1.0.2")' },
5735
+ release_date: {
5736
+ type: "string",
5737
+ description: "The ISO 8601 date-time string when this version was released or registered"
5738
+ },
5739
+ is_latest: {
5740
+ type: "boolean",
5741
+ description: "Indicates if this version is the latest available"
5742
+ }
5743
+ }
5744
+ }
5745
+ }
5746
+ }
5747
+ },
5660
5748
  next: { type: "string", format: "uri", nullable: true },
5661
5749
  total_count: { type: "integer" }
5662
5750
  }
@@ -5693,12 +5781,117 @@ async function createHonoServer(mastra, options = {}) {
5693
5781
  200: {
5694
5782
  description: "Detailed information about the MCP server instance.",
5695
5783
  content: {
5696
- "application/json": { schema: { $ref: "#/components/schemas/ServerDetailInfo" } }
5784
+ "application/json": {
5785
+ schema: {
5786
+ type: "object",
5787
+ properties: {
5788
+ id: { type: "string" },
5789
+ name: { type: "string" },
5790
+ description: { type: "string" },
5791
+ repository: {
5792
+ type: "object",
5793
+ properties: {
5794
+ url: { type: "string" },
5795
+ source: { type: "string" },
5796
+ id: { type: "string" }
5797
+ }
5798
+ },
5799
+ version_detail: {
5800
+ type: "object",
5801
+ properties: {
5802
+ version: { type: "string" },
5803
+ release_date: { type: "string" },
5804
+ is_latest: { type: "boolean" }
5805
+ }
5806
+ },
5807
+ package_canonical: { type: "string" },
5808
+ packages: {
5809
+ type: "array",
5810
+ items: {
5811
+ type: "object",
5812
+ properties: {
5813
+ registry_name: { type: "string" },
5814
+ name: { type: "string" },
5815
+ version: { type: "string" },
5816
+ command: {
5817
+ type: "object",
5818
+ properties: {
5819
+ name: { type: "string" },
5820
+ subcommands: {
5821
+ type: "array",
5822
+ items: {
5823
+ type: "object",
5824
+ properties: {
5825
+ name: { type: "string" },
5826
+ description: { type: "string" },
5827
+ is_required: { type: "boolean" },
5828
+ subcommands: {
5829
+ type: "array",
5830
+ items: { type: "object" }
5831
+ },
5832
+ positional_arguments: {
5833
+ type: "array",
5834
+ items: { type: "object" }
5835
+ },
5836
+ named_arguments: {
5837
+ type: "array",
5838
+ items: { type: "object" }
5839
+ }
5840
+ }
5841
+ }
5842
+ },
5843
+ positional_arguments: {
5844
+ type: "array",
5845
+ items: { type: "object" }
5846
+ },
5847
+ named_arguments: {
5848
+ type: "array",
5849
+ items: { type: "object" }
5850
+ }
5851
+ }
5852
+ },
5853
+ environment_variables: {
5854
+ type: "array",
5855
+ items: {
5856
+ type: "object",
5857
+ properties: {
5858
+ name: { type: "string" },
5859
+ description: { type: "string" },
5860
+ required: { type: "boolean" },
5861
+ default_value: { type: "string" }
5862
+ }
5863
+ }
5864
+ }
5865
+ }
5866
+ }
5867
+ },
5868
+ remotes: {
5869
+ type: "array",
5870
+ items: {
5871
+ type: "object",
5872
+ properties: {
5873
+ transport_type: { type: "string" },
5874
+ url: { type: "string" }
5875
+ }
5876
+ }
5877
+ }
5878
+ }
5879
+ }
5880
+ }
5697
5881
  }
5698
5882
  },
5699
5883
  404: {
5700
5884
  description: "MCP server instance not found.",
5701
- content: { "application/json": { schema: { type: "object", properties: { error: { type: "string" } } } } }
5885
+ content: {
5886
+ "application/json": {
5887
+ schema: {
5888
+ type: "object",
5889
+ properties: {
5890
+ error: { type: "string" }
5891
+ }
5892
+ }
5893
+ }
5894
+ }
5702
5895
  }
5703
5896
  }
5704
5897
  }),
@@ -7083,7 +7276,11 @@ async function createHonoServer(mastra, options = {}) {
7083
7276
  return await next();
7084
7277
  }
7085
7278
  if (options?.playground) {
7086
- const indexHtml = await promises.readFile(posix.join(process.cwd(), "./playground/index.html"), "utf-8");
7279
+ let indexHtml = await promises.readFile(posix.join(process.cwd(), "./playground/index.html"), "utf-8");
7280
+ indexHtml = indexHtml.replace(
7281
+ `'%%MASTRA_TELEMETRY_DISABLED%%'`,
7282
+ `${Boolean(process.env.MASTRA_TELEMETRY_DISABLED)}`
7283
+ );
7087
7284
  return c2.newResponse(indexHtml, 200, { "Content-Type": "text/html" });
7088
7285
  }
7089
7286
  return c2.newResponse(html2, 200, { "Content-Type": "text/html" });
@@ -31,7 +31,7 @@ import { z } from 'zod';
31
31
  import { getTelemetryHandler as getTelemetryHandler$1, storeTelemetryHandler as storeTelemetryHandler$1 } from '@mastra/server/handlers/telemetry';
32
32
  import { executeAgentToolHandler as executeAgentToolHandler$1, getToolsHandler as getToolsHandler$1, getToolByIdHandler as getToolByIdHandler$1, executeToolHandler as executeToolHandler$1 } from '@mastra/server/handlers/tools';
33
33
  import { upsertVectors as upsertVectors$1, createIndex as createIndex$1, queryVectors as queryVectors$1, listIndexes as listIndexes$1, describeIndex as describeIndex$1, deleteIndex as deleteIndex$1 } from '@mastra/server/handlers/vector';
34
- import { getSpeakersHandler as getSpeakersHandler$1, generateSpeechHandler, transcribeSpeechHandler } from '@mastra/server/handlers/voice';
34
+ import { getSpeakersHandler as getSpeakersHandler$1, generateSpeechHandler, getListenerHandler as getListenerHandler$1, transcribeSpeechHandler } from '@mastra/server/handlers/voice';
35
35
  import { streamWorkflowHandler as streamWorkflowHandler$1, getWorkflowsHandler as getWorkflowsHandler$1, getWorkflowByIdHandler as getWorkflowByIdHandler$1, getWorkflowRunsHandler as getWorkflowRunsHandler$1, resumeWorkflowHandler as resumeWorkflowHandler$1, resumeAsyncWorkflowHandler as resumeAsyncWorkflowHandler$1, createWorkflowRunHandler as createWorkflowRunHandler$1, startAsyncWorkflowHandler as startAsyncWorkflowHandler$1, startWorkflowRunHandler as startWorkflowRunHandler$1, watchWorkflowHandler as watchWorkflowHandler$1 } from '@mastra/server/handlers/workflows';
36
36
 
37
37
  // src/server/index.ts
@@ -4048,6 +4048,19 @@ async function speakHandler(c2) {
4048
4048
  return handleError(error, "Error generating speech");
4049
4049
  }
4050
4050
  }
4051
+ async function getListenerHandler(c2) {
4052
+ try {
4053
+ const mastra = c2.get("mastra");
4054
+ const agentId = c2.req.param("agentId");
4055
+ const listeners = await getListenerHandler$1({
4056
+ mastra,
4057
+ agentId
4058
+ });
4059
+ return c2.json(listeners);
4060
+ } catch (error) {
4061
+ return handleError(error, "Error getting listener");
4062
+ }
4063
+ }
4051
4064
  async function listenHandler(c2) {
4052
4065
  try {
4053
4066
  const mastra = c2.get("mastra");
@@ -5358,6 +5371,45 @@ async function createHonoServer(mastra, options = {}) {
5358
5371
  }),
5359
5372
  speakHandler
5360
5373
  );
5374
+ app.get(
5375
+ "/api/agents/:agentId/voice/listener",
5376
+ h({
5377
+ description: "Get available listener for an agent",
5378
+ tags: ["agents"],
5379
+ parameters: [
5380
+ {
5381
+ name: "agentId",
5382
+ in: "path",
5383
+ required: true,
5384
+ schema: { type: "string" }
5385
+ }
5386
+ ],
5387
+ responses: {
5388
+ 200: {
5389
+ description: "Checks if listener is available for the agent",
5390
+ content: {
5391
+ "application/json": {
5392
+ schema: {
5393
+ type: "object",
5394
+ description: "Listener information depending on the voice provider",
5395
+ properties: {
5396
+ enabled: { type: "boolean" }
5397
+ },
5398
+ additionalProperties: true
5399
+ }
5400
+ }
5401
+ }
5402
+ },
5403
+ 400: {
5404
+ description: "Agent does not have voice capabilities"
5405
+ },
5406
+ 404: {
5407
+ description: "Agent not found"
5408
+ }
5409
+ }
5410
+ }),
5411
+ getListenerHandler
5412
+ );
5361
5413
  app.post(
5362
5414
  "/api/agents/:agentId/listen",
5363
5415
  bodyLimit({
@@ -5650,7 +5702,43 @@ async function createHonoServer(mastra, options = {}) {
5650
5702
  schema: {
5651
5703
  type: "object",
5652
5704
  properties: {
5653
- servers: { type: "array", items: { $ref: "#/components/schemas/ServerInfo" } },
5705
+ servers: {
5706
+ type: "array",
5707
+ items: {
5708
+ type: "object",
5709
+ properties: {
5710
+ id: { type: "string" },
5711
+ name: { type: "string" },
5712
+ description: { type: "string" },
5713
+ repository: {
5714
+ type: "object",
5715
+ properties: {
5716
+ url: { type: "string", description: "The URL of the repository (e.g., a GitHub URL)" },
5717
+ source: {
5718
+ type: "string",
5719
+ description: "The source control platform (e.g., 'github', 'gitlab')",
5720
+ enum: ["github", "gitlab"]
5721
+ },
5722
+ id: { type: "string", description: "A unique identifier for the repository at the source" }
5723
+ }
5724
+ },
5725
+ version_detail: {
5726
+ type: "object",
5727
+ properties: {
5728
+ version: { type: "string", description: 'The semantic version string (e.g., "1.0.2")' },
5729
+ release_date: {
5730
+ type: "string",
5731
+ description: "The ISO 8601 date-time string when this version was released or registered"
5732
+ },
5733
+ is_latest: {
5734
+ type: "boolean",
5735
+ description: "Indicates if this version is the latest available"
5736
+ }
5737
+ }
5738
+ }
5739
+ }
5740
+ }
5741
+ },
5654
5742
  next: { type: "string", format: "uri", nullable: true },
5655
5743
  total_count: { type: "integer" }
5656
5744
  }
@@ -5687,12 +5775,117 @@ async function createHonoServer(mastra, options = {}) {
5687
5775
  200: {
5688
5776
  description: "Detailed information about the MCP server instance.",
5689
5777
  content: {
5690
- "application/json": { schema: { $ref: "#/components/schemas/ServerDetailInfo" } }
5778
+ "application/json": {
5779
+ schema: {
5780
+ type: "object",
5781
+ properties: {
5782
+ id: { type: "string" },
5783
+ name: { type: "string" },
5784
+ description: { type: "string" },
5785
+ repository: {
5786
+ type: "object",
5787
+ properties: {
5788
+ url: { type: "string" },
5789
+ source: { type: "string" },
5790
+ id: { type: "string" }
5791
+ }
5792
+ },
5793
+ version_detail: {
5794
+ type: "object",
5795
+ properties: {
5796
+ version: { type: "string" },
5797
+ release_date: { type: "string" },
5798
+ is_latest: { type: "boolean" }
5799
+ }
5800
+ },
5801
+ package_canonical: { type: "string" },
5802
+ packages: {
5803
+ type: "array",
5804
+ items: {
5805
+ type: "object",
5806
+ properties: {
5807
+ registry_name: { type: "string" },
5808
+ name: { type: "string" },
5809
+ version: { type: "string" },
5810
+ command: {
5811
+ type: "object",
5812
+ properties: {
5813
+ name: { type: "string" },
5814
+ subcommands: {
5815
+ type: "array",
5816
+ items: {
5817
+ type: "object",
5818
+ properties: {
5819
+ name: { type: "string" },
5820
+ description: { type: "string" },
5821
+ is_required: { type: "boolean" },
5822
+ subcommands: {
5823
+ type: "array",
5824
+ items: { type: "object" }
5825
+ },
5826
+ positional_arguments: {
5827
+ type: "array",
5828
+ items: { type: "object" }
5829
+ },
5830
+ named_arguments: {
5831
+ type: "array",
5832
+ items: { type: "object" }
5833
+ }
5834
+ }
5835
+ }
5836
+ },
5837
+ positional_arguments: {
5838
+ type: "array",
5839
+ items: { type: "object" }
5840
+ },
5841
+ named_arguments: {
5842
+ type: "array",
5843
+ items: { type: "object" }
5844
+ }
5845
+ }
5846
+ },
5847
+ environment_variables: {
5848
+ type: "array",
5849
+ items: {
5850
+ type: "object",
5851
+ properties: {
5852
+ name: { type: "string" },
5853
+ description: { type: "string" },
5854
+ required: { type: "boolean" },
5855
+ default_value: { type: "string" }
5856
+ }
5857
+ }
5858
+ }
5859
+ }
5860
+ }
5861
+ },
5862
+ remotes: {
5863
+ type: "array",
5864
+ items: {
5865
+ type: "object",
5866
+ properties: {
5867
+ transport_type: { type: "string" },
5868
+ url: { type: "string" }
5869
+ }
5870
+ }
5871
+ }
5872
+ }
5873
+ }
5874
+ }
5691
5875
  }
5692
5876
  },
5693
5877
  404: {
5694
5878
  description: "MCP server instance not found.",
5695
- content: { "application/json": { schema: { type: "object", properties: { error: { type: "string" } } } } }
5879
+ content: {
5880
+ "application/json": {
5881
+ schema: {
5882
+ type: "object",
5883
+ properties: {
5884
+ error: { type: "string" }
5885
+ }
5886
+ }
5887
+ }
5888
+ }
5696
5889
  }
5697
5890
  }
5698
5891
  }),
@@ -7077,7 +7270,11 @@ async function createHonoServer(mastra, options = {}) {
7077
7270
  return await next();
7078
7271
  }
7079
7272
  if (options?.playground) {
7080
- const indexHtml = await readFile(join(process.cwd(), "./playground/index.html"), "utf-8");
7273
+ let indexHtml = await readFile(join(process.cwd(), "./playground/index.html"), "utf-8");
7274
+ indexHtml = indexHtml.replace(
7275
+ `'%%MASTRA_TELEMETRY_DISABLED%%'`,
7276
+ `${Boolean(process.env.MASTRA_TELEMETRY_DISABLED)}`
7277
+ );
7081
7278
  return c2.newResponse(indexHtml, 200, { "Content-Type": "text/html" });
7082
7279
  }
7083
7280
  return c2.newResponse(html2, 200, { "Content-Type": "text/html" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/deployer",
3
- "version": "0.10.2-alpha.1",
3
+ "version": "0.10.2-alpha.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -108,7 +108,7 @@
108
108
  "rollup-plugin-node-externals": "^8.0.0",
109
109
  "typescript-paths": "^1.5.1",
110
110
  "zod": "^3.24.3",
111
- "@mastra/server": "^0.10.2-alpha.1"
111
+ "@mastra/server": "^0.10.2-alpha.3"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@hono/node-server": "^1.13.8",
@@ -128,11 +128,11 @@
128
128
  "typescript": "^5.8.2",
129
129
  "vitest": "^2.1.9",
130
130
  "@internal/lint": "0.0.7",
131
- "@mastra/core": "0.10.2-alpha.1",
132
- "@mastra/mcp": "^0.10.2-alpha.0"
131
+ "@mastra/core": "0.10.2-alpha.3",
132
+ "@mastra/mcp": "^0.10.2-alpha.1"
133
133
  },
134
134
  "peerDependencies": {
135
- "@mastra/core": "^0.10.0"
135
+ "@mastra/core": "^0.10.2-alpha.0"
136
136
  },
137
137
  "scripts": {
138
138
  "build": "tsup src/index.ts src/build/index.ts src/server/index.ts src/build/bundler.ts src/build/analyze.ts src/bundler/index.ts src/services/index.ts src/validator/loader.ts src/validator/custom-resolver.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting --publicDir",