@mastra/deployer 0.16.2 → 0.16.3-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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.16.3-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
8
+
9
+ - Updated dependencies [[`2a6585f`](https://github.com/mastra-ai/mastra/commit/2a6585f7cb71f023f805d521d1c3c95fb9a3aa59), [`3d26e83`](https://github.com/mastra-ai/mastra/commit/3d26e8353a945719028f087cc6ac4b06f0ce27d2), [`56e55d1`](https://github.com/mastra-ai/mastra/commit/56e55d1e9eb63e7d9e41aa46e012aae471256812), [`9f67cb0`](https://github.com/mastra-ai/mastra/commit/9f67cb05eb4ad6aeccf6b73a7bb215e5fa581509), [`4c81b65`](https://github.com/mastra-ai/mastra/commit/4c81b65a28d128560bdf63bc9b8a1bddd4884812)]:
10
+ - @mastra/server@0.16.3-alpha.1
11
+ - @mastra/core@0.16.3-alpha.1
12
+
13
+ ## 0.16.3-alpha.0
14
+
15
+ ### Patch Changes
16
+
17
+ - dependencies updates: ([#7545](https://github.com/mastra-ai/mastra/pull/7545))
18
+ - Updated dependency [`hono@^4.9.6` ↗︎](https://www.npmjs.com/package/hono/v/4.9.6) (from `^4.8.12`, in `dependencies`)
19
+
20
+ - AN packages ([#7711](https://github.com/mastra-ai/mastra/pull/7711))
21
+
22
+ - Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`4a2e636`](https://github.com/mastra-ai/mastra/commit/4a2e636719b410b25cdae46fb40d4a9c575d3ed0), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
23
+ - @mastra/core@0.16.3-alpha.0
24
+ - @mastra/server@0.16.3-alpha.0
25
+
3
26
  ## 0.16.2
4
27
 
5
28
  ### Patch Changes
@@ -1,9 +1,11 @@
1
1
  import type { Context } from 'hono';
2
+ export declare const sharedBodyOptions: any;
2
3
  export declare const vNextBodyOptions: any;
3
4
  export declare function getAgentsHandler(c: Context): Promise<Response & import("hono").TypedResponse<{
4
5
  [x: string]: {
6
+ agents: {};
5
7
  workflows: {};
6
- name: any;
8
+ name: string;
7
9
  tools: any;
8
10
  provider: string;
9
11
  instructions: string;
@@ -13,17 +15,7 @@ export declare function getAgentsHandler(c: Context): Promise<Response & import(
13
15
  defaultStreamOptions: any;
14
16
  };
15
17
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
16
- export declare function getAgentByIdHandler(c: Context): Promise<Response & import("hono").TypedResponse<{
17
- name: any;
18
- instructions: string;
19
- tools: any;
20
- workflows: {};
21
- provider: string;
22
- modelId: string;
23
- modelVersion: "v2" | "v1";
24
- defaultGenerateOptions: any;
25
- defaultStreamOptions: any;
26
- }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
18
+ export declare function getAgentByIdHandler(c: Context): Promise<Response & import("hono").TypedResponse<never, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
27
19
  export declare function getEvalsByAgentIdHandler(c: Context): Promise<Response & import("hono").TypedResponse<{
28
20
  id: string;
29
21
  name: any;
@@ -80,6 +72,7 @@ export declare function generateVNextHandler(c: Context): Promise<Response>;
80
72
  export declare function streamGenerateLegacyHandler(c: Context): Promise<Response | undefined>;
81
73
  export declare function streamGenerateHandler(c: Context): Promise<Response | undefined>;
82
74
  export declare function streamVNextGenerateHandler(c: Context): Promise<Response | undefined>;
75
+ export declare function streamNetworkHandler(c: Context): Promise<Response>;
83
76
  export declare function streamVNextUIMessageHandler(c: Context): Promise<Response | undefined>;
84
77
  export declare function setAgentInstructionsHandler(c: Context): Promise<Response>;
85
78
  export declare function updateAgentModelHandler(c: Context): Promise<Response>;
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/agents/handlers.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAOpC,eAAO,MAAM,gBAAgB,EAAE,GAiD9B,CAAC;AAGF,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,OAAO;;;;;;;;;;;;mEAOhD;AAED,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,OAAO;;;;;;;;;;mEAcnD;AAED,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;mEAYxD;AAED,wBAAsB,4BAA4B,CAAC,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;mEAY5D;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yHjE"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/agents/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAwBvD,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,gBAAgB,8EAsiC9D;AAED,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,8EAyHjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/agents/voice.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAKpC;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,qBAclD;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,qBAmB5C;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,qBAclD;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,CAAC,EAAE,OAAO,qBAmC7C"}
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/agents/voice.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAKpC;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,qBAgBlD;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,qBAqB5C;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,qBAelD;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,CAAC,EAAE,OAAO,qBAoC7C"}
@@ -2132,39 +2132,21 @@ var AllowedProviderKeys = {
2132
2132
  };
2133
2133
 
2134
2134
  // src/server/handlers/routes/agents/handlers.ts
2135
- var vNextBodyOptions = {
2135
+ var sharedBodyOptions = {
2136
2136
  messages: {
2137
2137
  type: "array",
2138
2138
  items: { type: "object" }
2139
2139
  },
2140
- threadId: { type: "string" },
2141
- resourceId: { type: "string", description: "The resource ID for the conversation" },
2142
2140
  runId: { type: "string" },
2143
- output: { type: "object" },
2144
- instructions: { type: "string", description: "Optional instructions to override the agent's default instructions" },
2145
- context: {
2146
- type: "array",
2147
- items: { type: "object" },
2148
- description: "Additional context messages to include"
2149
- },
2150
2141
  memory: {
2151
2142
  type: "object",
2152
2143
  properties: {
2153
- threadId: { type: "string" },
2154
- resourceId: { type: "string", description: "The resource ID for the conversation" },
2144
+ thread: { type: "string" },
2145
+ resource: { type: "string", description: "The resource ID for the conversation" },
2155
2146
  options: { type: "object", description: "Memory configuration options" }
2156
2147
  },
2157
2148
  description: "Memory options for the conversation"
2158
2149
  },
2159
- savePerStep: { type: "boolean", description: "Whether to save messages incrementally on step finish" },
2160
- format: { type: "string", enum: ["mastra", "aisdk"], description: "Response format" },
2161
- toolChoice: {
2162
- oneOf: [
2163
- { type: "string", enum: ["auto", "none", "required"] },
2164
- { type: "object", properties: { type: { type: "string" }, toolName: { type: "string" } } }
2165
- ],
2166
- description: "Controls how tools are selected during generation"
2167
- },
2168
2150
  modelSettings: {
2169
2151
  type: "object",
2170
2152
  properties: {
@@ -2182,6 +2164,27 @@ var vNextBodyOptions = {
2182
2164
  description: "Model settings for generation"
2183
2165
  }
2184
2166
  };
2167
+ var vNextBodyOptions = {
2168
+ threadId: { type: "string" },
2169
+ resourceId: { type: "string", description: "The resource ID for the conversation" },
2170
+ output: { type: "object" },
2171
+ instructions: { type: "string", description: "Optional instructions to override the agent's default instructions" },
2172
+ context: {
2173
+ type: "array",
2174
+ items: { type: "object" },
2175
+ description: "Additional context messages to include"
2176
+ },
2177
+ savePerStep: { type: "boolean", description: "Whether to save messages incrementally on step finish" },
2178
+ toolChoice: {
2179
+ oneOf: [
2180
+ { type: "string", enum: ["auto", "none", "required"] },
2181
+ { type: "object", properties: { type: { type: "string" }, toolName: { type: "string" } } }
2182
+ ],
2183
+ description: "Controls how tools are selected during generation"
2184
+ },
2185
+ format: { type: "string", enum: ["mastra", "aisdk"], description: "Response format" },
2186
+ ...sharedBodyOptions
2187
+ };
2185
2188
  async function getAgentsHandler(c2) {
2186
2189
  const serializedAgents = await agents.getAgentsHandler({
2187
2190
  mastra: c2.get("mastra"),
@@ -2357,6 +2360,49 @@ async function streamVNextGenerateHandler(c2) {
2357
2360
  return handleError(error, "Error streaming from agent");
2358
2361
  }
2359
2362
  }
2363
+ async function streamNetworkHandler(c2) {
2364
+ try {
2365
+ const mastra = c2.get("mastra");
2366
+ const agentId = c2.req.param("agentId");
2367
+ const runtimeContext = c2.get("runtimeContext");
2368
+ const body = await c2.req.json();
2369
+ const logger2 = mastra.getLogger();
2370
+ c2.header("Transfer-Encoding", "chunked");
2371
+ return streaming.stream(
2372
+ c2,
2373
+ async (stream7) => {
2374
+ try {
2375
+ const streamResponse = await agents.streamNetworkHandler({
2376
+ mastra,
2377
+ agentId,
2378
+ runtimeContext,
2379
+ body
2380
+ // abortSignal: c.req.raw.signal,
2381
+ });
2382
+ const reader = streamResponse.getReader();
2383
+ stream7.onAbort(() => {
2384
+ void reader.cancel("request aborted");
2385
+ });
2386
+ let chunkResult;
2387
+ while ((chunkResult = await reader.read()) && !chunkResult.done) {
2388
+ await stream7.write(`data: ${JSON.stringify(chunkResult.value)}
2389
+
2390
+ `);
2391
+ }
2392
+ await stream7.write("data: [DONE]\n\n");
2393
+ } catch (err) {
2394
+ logger2.error("Error in streamNetwork generate: " + (err?.message ?? "Unknown error"));
2395
+ }
2396
+ await stream7.close();
2397
+ },
2398
+ async (err) => {
2399
+ logger2.error("Error in watch stream: " + err?.message);
2400
+ }
2401
+ );
2402
+ } catch (error) {
2403
+ return handleError(error, "Error streaming from agent in network mode");
2404
+ }
2405
+ }
2360
2406
  async function streamVNextUIMessageHandler(c2) {
2361
2407
  try {
2362
2408
  const mastra = c2.get("mastra");
@@ -2635,9 +2681,11 @@ async function getSpeakersHandler(c2) {
2635
2681
  try {
2636
2682
  const mastra = c2.get("mastra");
2637
2683
  const agentId = c2.req.param("agentId");
2684
+ const runtimeContext = c2.get("runtimeContext");
2638
2685
  const speakers = await voice.getSpeakersHandler({
2639
2686
  mastra,
2640
- agentId
2687
+ agentId,
2688
+ runtimeContext
2641
2689
  });
2642
2690
  return c2.json(speakers);
2643
2691
  } catch (error) {
@@ -2648,10 +2696,12 @@ async function speakHandler(c2) {
2648
2696
  try {
2649
2697
  const mastra = c2.get("mastra");
2650
2698
  const agentId = c2.req.param("agentId");
2699
+ const runtimeContext = c2.get("runtimeContext");
2651
2700
  const { input, options } = await c2.req.json();
2652
2701
  const audioStream = await voice.generateSpeechHandler({
2653
2702
  mastra,
2654
2703
  agentId,
2704
+ runtimeContext,
2655
2705
  body: { text: input, speakerId: options?.speakerId }
2656
2706
  });
2657
2707
  c2.header("Content-Type", `audio/${options?.filetype ?? "mp3"}`);
@@ -2665,9 +2715,11 @@ async function getListenerHandler(c2) {
2665
2715
  try {
2666
2716
  const mastra = c2.get("mastra");
2667
2717
  const agentId = c2.req.param("agentId");
2718
+ const runtimeContext = c2.get("runtimeContext");
2668
2719
  const listeners = await voice.getListenerHandler({
2669
2720
  mastra,
2670
- agentId
2721
+ agentId,
2722
+ runtimeContext
2671
2723
  });
2672
2724
  return c2.json(listeners);
2673
2725
  } catch (error) {
@@ -2678,6 +2730,7 @@ async function listenHandler(c2) {
2678
2730
  try {
2679
2731
  const mastra = c2.get("mastra");
2680
2732
  const agentId = c2.req.param("agentId");
2733
+ const runtimeContext = c2.get("runtimeContext");
2681
2734
  const formData = await c2.req.formData();
2682
2735
  const audioFile = formData.get("audio");
2683
2736
  const options = formData.get("options");
@@ -2693,6 +2746,7 @@ async function listenHandler(c2) {
2693
2746
  const transcription = await voice.transcribeSpeechHandler({
2694
2747
  mastra,
2695
2748
  agentId,
2749
+ runtimeContext,
2696
2750
  body: {
2697
2751
  audioData: Buffer.from(audioData),
2698
2752
  options: parsedOptions
@@ -2888,6 +2942,35 @@ function agentsRouter(bodyLimitOptions) {
2888
2942
  }),
2889
2943
  generateHandler
2890
2944
  );
2945
+ router.post(
2946
+ "/:agentId/network",
2947
+ bodyLimit.bodyLimit(bodyLimitOptions),
2948
+ w({
2949
+ description: "Execute an agent as a Network",
2950
+ tags: ["agents"],
2951
+ parameters: [
2952
+ {
2953
+ name: "agentId",
2954
+ in: "path",
2955
+ required: true,
2956
+ schema: { type: "string" }
2957
+ }
2958
+ ],
2959
+ requestBody: {
2960
+ required: true,
2961
+ content: {
2962
+ "application/json": {
2963
+ schema: {
2964
+ type: "object",
2965
+ properties: sharedBodyOptions,
2966
+ required: ["messages"]
2967
+ }
2968
+ }
2969
+ }
2970
+ }
2971
+ }),
2972
+ streamNetworkHandler
2973
+ );
2891
2974
  router.post(
2892
2975
  "/:agentId/generate/vnext",
2893
2976
  bodyLimit.bodyLimit(bodyLimitOptions),
@@ -10930,6 +11013,27 @@ async function createHonoServer(mastra, options = {
10930
11013
  }
10931
11014
  }
10932
11015
  }
11016
+ if (c2.req.method === "GET") {
11017
+ try {
11018
+ const encodedRuntimeContext = c2.req.query("runtimeContext");
11019
+ if (encodedRuntimeContext) {
11020
+ let parsedRuntimeContext;
11021
+ try {
11022
+ parsedRuntimeContext = JSON.parse(encodedRuntimeContext);
11023
+ } catch {
11024
+ try {
11025
+ const json = Buffer.from(encodedRuntimeContext, "base64").toString("utf-8");
11026
+ parsedRuntimeContext = JSON.parse(json);
11027
+ } catch {
11028
+ }
11029
+ }
11030
+ if (parsedRuntimeContext && typeof parsedRuntimeContext === "object") {
11031
+ runtimeContext$1 = new runtimeContext.RuntimeContext([...runtimeContext$1.entries(), ...Object.entries(parsedRuntimeContext)]);
11032
+ }
11033
+ }
11034
+ } catch {
11035
+ }
11036
+ }
10933
11037
  c2.set("runtimeContext", runtimeContext$1);
10934
11038
  c2.set("mastra", mastra);
10935
11039
  c2.set("tools", options.tools);