@mastra/client-js 1.57.0-alpha.2 → 1.57.0-alpha.4

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.
@@ -3,7 +3,7 @@ name: mastra-client-js
3
3
  description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/client-js"
6
- version: "1.57.0-alpha.2"
6
+ version: "1.57.0-alpha.4"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.57.0-alpha.2",
2
+ "version": "1.57.0-alpha.4",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -162,6 +162,9 @@ The same operations are available from `@mastra/client-js` over the `/api/schedu
162
162
  Hooks let you run code at key points in an agent schedule's lifecycle, for example to compute fire-time parameters or react to the outcome. Configure them on the `Mastra` constructor under `schedules`. The hooks are a single flat bundle that runs for every agent's schedules; each hook context carries the firing `agentId`, so branch on it when you need per-agent behavior. Hooks live at the `Mastra` level so they apply to both code-defined and stored agents.
163
163
 
164
164
  ```typescript
165
+ import { Mastra } from '@mastra/core'
166
+ import { LibSQLStore } from '@mastra/libsql'
167
+
165
168
  const mastra = new Mastra({
166
169
  agents: { pinger },
167
170
  storage: new LibSQLStore({ id: 'mastra-storage', url: 'file:./mastra.db' }),
@@ -55,7 +55,7 @@ Returns an array of AI SDK V4 `UIMessage` objects with the following structure:
55
55
 
56
56
  **toolInvocations** (`ToolInvocation[]`): Array of tool invocations for assistant messages.
57
57
 
58
- **experimental\_attachments** (`Attachment[]`): File attachments on the message.
58
+ **experimental_attachments** (`Attachment[]`): File attachments on the message.
59
59
 
60
60
  **metadata** (`Record<string, unknown>`): Custom metadata attached to the message.
61
61
 
@@ -46,6 +46,9 @@ Each entry's `id` is the key the controller is registered under in `new Mastra({
46
46
  Get an instance of an agent controller by the key it's registered under in `new Mastra({ agentControllers })`. The key can differ from the controller's `id`. In this example, pass `'coding'`, not `'coding-controller'`:
47
47
 
48
48
  ```typescript
49
+ import { Mastra } from '@mastra/core'
50
+ import { AgentController } from '@mastra/core/agent-controller'
51
+
49
52
  const codingController = new AgentController({ id: 'coding-controller', agent, modes })
50
53
 
51
54
  export const mastra = new Mastra({
@@ -21,6 +21,8 @@ Returns a record of agent IDs to their serialized agent configurations.
21
21
  Get an instance of a specific agent by its ID:
22
22
 
23
23
  ```typescript
24
+ import { Agent } from '@mastra/core/agent'
25
+
24
26
  export const myAgent = new Agent({
25
27
  id: 'my-agent',
26
28
  })
@@ -126,11 +126,11 @@ console.log(items.data)
126
126
 
127
127
  ## Parameters
128
128
 
129
- **agent\_id** (`string`): Required. The registered Mastra agent that owns the conversation memory.
129
+ **agent_id** (`string`): Required. The registered Mastra agent that owns the conversation memory.
130
130
 
131
- **conversation\_id** (`string`): Optional conversation ID to use as the raw thread ID.
131
+ **conversation_id** (`string`): Optional conversation ID to use as the raw thread ID.
132
132
 
133
- **resource\_id** (`string`): Optional resource ID to associate with the conversation thread.
133
+ **resource_id** (`string`): Optional resource ID to associate with the conversation thread.
134
134
 
135
135
  **title** (`string`): Optional thread title stored with the conversation.
136
136
 
@@ -198,7 +198,7 @@ The returned response object includes:
198
198
 
199
199
  ## Parameters
200
200
 
201
- **agent\_id** (`string`): Required on initial requests. Selects the Mastra agent that executes the request. Stored follow-up turns can omit it when continuing with previous\_response\_id.
201
+ **agent_id** (`string`): Required on initial requests. Selects the Mastra agent that executes the request. Stored follow-up turns can omit it when continuing with previous_response_id.
202
202
 
203
203
  **model** (`string`): Optional model override for this request, such as openai/gpt-5. If omitted, Mastra uses the model configured on the selected agent.
204
204
 
@@ -206,7 +206,7 @@ The returned response object includes:
206
206
 
207
207
  **instructions** (`string`): Optional instruction override for this request.
208
208
 
209
- **text** (`{ format: { type: 'json_object' } | { type: 'json_schema'; name: string; schema: Record<string, unknown>; description?: string; strict?: boolean } }`): Optional text output format. Use json\_object for JSON mode or json\_schema for schema-constrained structured output.
209
+ **text** (`{ format: { type: 'json_object' } | { type: 'json_schema'; name: string; schema: Record<string, unknown>; description?: string; strict?: boolean } }`): Optional text output format. Use json_object for JSON mode or json_schema for schema-constrained structured output.
210
210
 
211
211
  **providerOptions** (`Record<string, Record<string, unknown> | undefined>`): Optional provider-specific options passed through to the underlying model call.
212
212
 
@@ -214,8 +214,8 @@ The returned response object includes:
214
214
 
215
215
  **store** (`boolean`): When true, persists the response through the selected agent memory.
216
216
 
217
- **conversation\_id** (`string`): Optional conversation identifier. In Mastra, this is the raw memory thread ID.
217
+ **conversation_id** (`string`): Optional conversation identifier. In Mastra, this is the raw memory thread ID.
218
218
 
219
- **previous\_response\_id** (`string`): Continues a stored response chain from a previous stored response.
219
+ **previous_response_id** (`string`): Continues a stored response chain from a previous stored response.
220
220
 
221
221
  **requestContext** (`RequestContext | Record<string, any>`): Optional request context forwarded to the Mastra server.
@@ -32,6 +32,8 @@ The server may cache the counts for a few seconds between requests. Servers that
32
32
  Get an instance of a specific workflow by its ID:
33
33
 
34
34
  ```typescript
35
+ import { createWorkflow } from '@mastra/core/workflows'
36
+
35
37
  export const testWorkflow = createWorkflow({
36
38
  id: 'city-workflow',
37
39
  })
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -20,7 +20,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
23
- //#endregion
24
23
  let _lukeed_uuid = require("@lukeed/uuid");
25
24
  let _mastra_core_error = require("@mastra/core/error");
26
25
  let _mastra_core_request_context = require("@mastra/core/request-context");
@@ -31,7 +30,7 @@ let _mastra_core_a2a_v1 = require("@mastra/core/a2a/v1");
31
30
  let canonicalize = require("canonicalize");
32
31
  canonicalize = __toESM(canonicalize, 1);
33
32
  let jose = require("jose");
34
- //#region src/observability/collector.ts
33
+ // src/observability/collector.ts
35
34
  const TRACEPARENT_RE = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/;
36
35
  const ZERO_TRACE_ID = "00000000000000000000000000000000";
37
36
  const ZERO_SPAN_ID = "0000000000000000";
@@ -230,8 +229,7 @@ var ObservabilityCollectorImpl = class {
230
229
  * `@mastra/client-js/observability` subpath.
231
230
  */
232
231
  const createObservabilityCollector = (parentContext) => new ObservabilityCollectorImpl(parentContext);
233
- //#endregion
234
- //#region src/utils/index.ts
232
+ // src/utils/index.ts
235
233
  /**
236
234
  * Normalizes a route path to ensure consistent formatting.
237
235
  * - Removes leading/trailing whitespace
@@ -419,8 +417,7 @@ function isTerminalReconnectError(error) {
419
417
  const status = error?.status;
420
418
  return isTerminalHttpError(error) && status !== 408 && status !== 429;
421
419
  }
422
- //#endregion
423
- //#region src/utils/ai-sdk-v4/data-stream-parts.ts
420
+ // src/utils/ai-sdk-v4/data-stream-parts.ts
424
421
  const dataStreamParts = [
425
422
  {
426
423
  code: "0",
@@ -633,8 +630,7 @@ const parseDataStreamPart = (line) => {
633
630
  const jsonValue = JSON.parse(textValue);
634
631
  return dataStreamPartsByCode[code].parse(jsonValue);
635
632
  };
636
- //#endregion
637
- //#region src/utils/ai-sdk-v4/fix-json.ts
633
+ // src/utils/ai-sdk-v4/fix-json.ts
638
634
  function fixJson(input) {
639
635
  const stack = ["ROOT"];
640
636
  let lastValidIndex = -1;
@@ -870,8 +866,7 @@ function fixJson(input) {
870
866
  }
871
867
  return result;
872
868
  }
873
- //#endregion
874
- //#region src/utils/ai-sdk-v4/parse-partial-json.ts
869
+ // src/utils/ai-sdk-v4/parse-partial-json.ts
875
870
  function tryParse(text) {
876
871
  try {
877
872
  return {
@@ -902,8 +897,7 @@ function parsePartialJson(jsonText) {
902
897
  state: "failed-parse"
903
898
  };
904
899
  }
905
- //#endregion
906
- //#region src/utils/ai-sdk-v4/process-data-stream.ts
900
+ // src/utils/ai-sdk-v4/process-data-stream.ts
907
901
  const NEWLINE = "\n".charCodeAt(0);
908
902
  function concatChunks(chunks, totalLength) {
909
903
  const concatenatedChunks = new Uint8Array(totalLength);
@@ -984,8 +978,7 @@ async function processDataStream({ stream, onTextPart, onReasoningPart, onReason
984
978
  }
985
979
  }
986
980
  }
987
- //#endregion
988
- //#region src/utils/client-tool-model-output.ts
981
+ // src/utils/client-tool-model-output.ts
989
982
  /**
990
983
  * Normalize modelOutput from toModelOutput() to the AI SDK V2 tool result
991
984
  * content shape. Mirrors `normalizeModelOutput` in @mastra/core's
@@ -1044,8 +1037,7 @@ async function getClientToolModelOutput(clientTool, result) {
1044
1037
  const modelOutput = await toModelOutput(result);
1045
1038
  return modelOutput == null ? void 0 : normalizeModelOutput(modelOutput);
1046
1039
  }
1047
- //#endregion
1048
- //#region src/utils/zod-to-json-schema.ts
1040
+ // src/utils/zod-to-json-schema.ts
1049
1041
  /**
1050
1042
  * Check if a value is a Zod schema type.
1051
1043
  * This is a simple check that doesn't require any Node.js dependencies.
@@ -1065,8 +1057,7 @@ function zodToJsonSchema(zodSchema) {
1065
1057
  if (!isZodType(zodSchema)) return zodSchema;
1066
1058
  return (0, _mastra_schema_compat_zod_to_json.zodToJsonSchema)(zodSchema);
1067
1059
  }
1068
- //#endregion
1069
- //#region src/utils/process-client-tools.ts
1060
+ // src/utils/process-client-tools.ts
1070
1061
  function processClientTools(clientTools) {
1071
1062
  if (!clientTools) return;
1072
1063
  return Object.fromEntries(Object.entries(clientTools).map(([key, value]) => {
@@ -1079,8 +1070,7 @@ function processClientTools(clientTools) {
1079
1070
  }];
1080
1071
  }));
1081
1072
  }
1082
- //#endregion
1083
- //#region src/utils/sse-event-splitter.ts
1073
+ // src/utils/sse-event-splitter.ts
1084
1074
  /** Split SSE events without rescanning or copying an unfinished event on each read. */
1085
1075
  function createSseEventSplitter() {
1086
1076
  let parts = [];
@@ -1119,8 +1109,7 @@ function createSseEventSplitter() {
1119
1109
  return events;
1120
1110
  };
1121
1111
  }
1122
- //#endregion
1123
- //#region src/utils/process-mastra-stream.ts
1112
+ // src/utils/process-mastra-stream.ts
1124
1113
  async function sharedProcessMastraStream({ stream, onChunk, signal }) {
1125
1114
  const reader = stream.getReader();
1126
1115
  const decoder = new TextDecoder();
@@ -1165,8 +1154,7 @@ async function processMastraStream({ stream, onChunk, signal }) {
1165
1154
  signal
1166
1155
  });
1167
1156
  }
1168
- //#endregion
1169
- //#region src/types.ts
1157
+ // src/types.ts
1170
1158
  /**
1171
1159
  * HTTP error thrown by the Mastra client.
1172
1160
  * Extends Error with additional properties for better error handling.
@@ -1199,8 +1187,7 @@ var MastraClientError = class extends Error {
1199
1187
  this.body = body;
1200
1188
  }
1201
1189
  };
1202
- //#endregion
1203
- //#region src/resources/base.ts
1190
+ // src/resources/base.ts
1204
1191
  var BaseResource = class {
1205
1192
  options;
1206
1193
  apiPrefix;
@@ -1274,8 +1261,7 @@ var BaseResource = class {
1274
1261
  throw lastError || /* @__PURE__ */ new Error("Request failed");
1275
1262
  }
1276
1263
  };
1277
- //#endregion
1278
- //#region src/resources/agent.ts
1264
+ // src/resources/agent.ts
1279
1265
  const SIGNAL_RUNTIME_OPTIONS_TTL_MS = 3e5;
1280
1266
  const signalRuntimeOptionsByRunId = /* @__PURE__ */ new Map();
1281
1267
  /**
@@ -3662,8 +3648,7 @@ var Agent = class extends BaseResource {
3662
3648
  });
3663
3649
  }
3664
3650
  };
3665
- //#endregion
3666
- //#region src/resources/memory-thread.ts
3651
+ // src/resources/memory-thread.ts
3667
3652
  /**
3668
3653
  * Serializes the message-listing filters both memory message routes accept. The network route
3669
3654
  * takes the same filters under a different path, so the two callers share one serializer.
@@ -3832,8 +3817,7 @@ function normalizeWriteOpts(opts) {
3832
3817
  if (Object.keys(opts).length === 0) return {};
3833
3818
  return { requestContext: opts };
3834
3819
  }
3835
- //#endregion
3836
- //#region src/resources/vector.ts
3820
+ // src/resources/vector.ts
3837
3821
  var Vector = class extends BaseResource {
3838
3822
  vectorName;
3839
3823
  constructor(options, vectorName) {
@@ -3899,8 +3883,7 @@ var Vector = class extends BaseResource {
3899
3883
  });
3900
3884
  }
3901
3885
  };
3902
- //#endregion
3903
- //#region src/resources/tool.ts
3886
+ // src/resources/tool.ts
3904
3887
  var Tool = class extends BaseResource {
3905
3888
  toolId;
3906
3889
  constructor(options, toolId) {
@@ -3933,8 +3916,7 @@ var Tool = class extends BaseResource {
3933
3916
  });
3934
3917
  }
3935
3918
  };
3936
- //#endregion
3937
- //#region src/resources/processor.ts
3919
+ // src/resources/processor.ts
3938
3920
  var Processor = class extends BaseResource {
3939
3921
  processorId;
3940
3922
  constructor(options, processorId) {
@@ -3967,8 +3949,7 @@ var Processor = class extends BaseResource {
3967
3949
  });
3968
3950
  }
3969
3951
  };
3970
- //#endregion
3971
- //#region src/resources/conversations.ts
3952
+ // src/resources/conversations.ts
3972
3953
  var ConversationItems = class extends BaseResource {
3973
3954
  constructor(options) {
3974
3955
  super(options);
@@ -3997,8 +3978,7 @@ var Conversations = class extends BaseResource {
3997
3978
  return this.request(`/v1/conversations/${encodeURIComponent(conversationId)}${requestContextQueryString(requestContext)}`, { method: "DELETE" });
3998
3979
  }
3999
3980
  };
4000
- //#endregion
4001
- //#region src/utils/stream-transforms.ts
3981
+ // src/utils/stream-transforms.ts
4002
3982
  const RECORD_SEPARATOR$1 = "";
4003
3983
  const SSE_FRAME_SEPARATOR = /\r?\n\r?\n/;
4004
3984
  /**
@@ -4066,8 +4046,7 @@ function createSseJsonTransform() {
4066
4046
  }
4067
4047
  });
4068
4048
  }
4069
- //#endregion
4070
- //#region src/resources/run.ts
4049
+ // src/resources/run.ts
4071
4050
  /**
4072
4051
  * Deserializes the error property in a workflow result back to an Error instance.
4073
4052
  * Server sends SerializedError (plain object), client converts to Error for instanceof checks.
@@ -4436,8 +4415,7 @@ var Run = class extends BaseResource {
4436
4415
  return response.body.pipeThrough(this.createChunkTransformStream());
4437
4416
  }
4438
4417
  };
4439
- //#endregion
4440
- //#region src/resources/workflow.ts
4418
+ // src/resources/workflow.ts
4441
4419
  const RECORD_SEPARATOR = "";
4442
4420
  var Workflow = class extends BaseResource {
4443
4421
  workflowId;
@@ -4554,8 +4532,7 @@ var Workflow = class extends BaseResource {
4554
4532
  } });
4555
4533
  }
4556
4534
  };
4557
- //#endregion
4558
- //#region src/utils/process-a2a-stream.ts
4535
+ // src/utils/process-a2a-stream.ts
4559
4536
  function splitNextEvent(buffer) {
4560
4537
  const normalizedBuffer = buffer.replace(/\x1E/g, "\n\n");
4561
4538
  const match = normalizedBuffer.match(/\r?\n\r?\n/);
@@ -4609,8 +4586,7 @@ async function* processA2AStream(stream) {
4609
4586
  reader.releaseLock();
4610
4587
  }
4611
4588
  }
4612
- //#endregion
4613
- //#region src/utils/verify-agent-card-signature.ts
4589
+ // src/utils/verify-agent-card-signature.ts
4614
4590
  const DEFAULT_AGENT_CARD_SIGNATURE_ALGORITHMS = [
4615
4591
  "ES256",
4616
4592
  "ES384",
@@ -4679,8 +4655,7 @@ async function verifyAgentCardSignatureIfPresent(agentCard, options) {
4679
4655
  }
4680
4656
  throw new MastraClientError(200, "OK", `A2A Agent Card signature verification failed: ${verificationErrors.join("; ")}`);
4681
4657
  }
4682
- //#endregion
4683
- //#region src/resources/a2a.ts
4658
+ // src/resources/a2a.ts
4684
4659
  function createA2AJsonRpcError(response) {
4685
4660
  const error = response.error;
4686
4661
  const message = error?.message ?? "Unknown A2A JSON-RPC error";
@@ -4992,8 +4967,7 @@ var A2AV1 = class extends BaseResource {
4992
4967
  for await (const event of processA2AStream(await requireResponseBody(response, "tasks/resubscribe"))) yield _mastra_core_a2a_v1.StreamResponse.fromJSON(event);
4993
4968
  }
4994
4969
  };
4995
- //#endregion
4996
- //#region src/resources/mcp-tool.ts
4970
+ // src/resources/mcp-tool.ts
4997
4971
  /**
4998
4972
  * Represents a specific tool available on a specific MCP server.
4999
4973
  * Provides methods to get details and execute the tool.
@@ -5030,8 +5004,7 @@ var MCPTool = class extends BaseResource {
5030
5004
  });
5031
5005
  }
5032
5006
  };
5033
- //#endregion
5034
- //#region src/resources/agent-builder.ts
5007
+ // src/resources/agent-builder.ts
5035
5008
  /**
5036
5009
  * Agent Builder resource: operations related to agent-builder workflows via server endpoints.
5037
5010
  */
@@ -5290,8 +5263,7 @@ var AgentBuilder = class extends BaseResource {
5290
5263
  return this.request(url, { method: "POST" });
5291
5264
  }
5292
5265
  };
5293
- //#endregion
5294
- //#region src/resources/observability.ts
5266
+ // src/resources/observability.ts
5295
5267
  /** Client resource for interacting with the Mastra observability API (traces, logs, scores, feedback, and metrics). */
5296
5268
  var Observability = class extends BaseResource {
5297
5269
  constructor(options) {
@@ -5787,8 +5759,7 @@ var Observability = class extends BaseResource {
5787
5759
  return this.request("/observability/capabilities");
5788
5760
  }
5789
5761
  };
5790
- //#endregion
5791
- //#region src/resources/stored-agent.ts
5762
+ // src/resources/stored-agent.ts
5792
5763
  /**
5793
5764
  * Resource for interacting with a specific stored agent
5794
5765
  */
@@ -5956,8 +5927,7 @@ var StoredAgent = class extends BaseResource {
5956
5927
  return this.request(`/stored/agents/${encodeURIComponent(this.storedAgentId)}/versions/compare?${queryParams.toString()}${contextString ? `&${contextString.slice(1)}` : ""}`);
5957
5928
  }
5958
5929
  };
5959
- //#endregion
5960
- //#region src/resources/dynamic-workflow.ts
5930
+ // src/resources/dynamic-workflow.ts
5961
5931
  /** Resource for interacting with a specific dynamic workflow definition. */
5962
5932
  var DynamicWorkflow = class extends BaseResource {
5963
5933
  dynamicWorkflowId;
@@ -5980,8 +5950,7 @@ var DynamicWorkflow = class extends BaseResource {
5980
5950
  return this.request(`/stored/workflows/${encodeURIComponent(this.dynamicWorkflowId)}`, { method: "DELETE" });
5981
5951
  }
5982
5952
  };
5983
- //#endregion
5984
- //#region src/resources/stored-prompt-block.ts
5953
+ // src/resources/stored-prompt-block.ts
5985
5954
  /**
5986
5955
  * Resource for interacting with a specific stored prompt block
5987
5956
  */
@@ -6104,8 +6073,7 @@ var StoredPromptBlock = class extends BaseResource {
6104
6073
  return this.request(`/stored/prompt-blocks/${encodeURIComponent(this.storedPromptBlockId)}/versions/compare?${queryParams.toString()}${contextString}`);
6105
6074
  }
6106
6075
  };
6107
- //#endregion
6108
- //#region src/resources/stored-mcp-client.ts
6076
+ // src/resources/stored-mcp-client.ts
6109
6077
  /**
6110
6078
  * Resource for interacting with a specific stored MCP client
6111
6079
  */
@@ -6144,8 +6112,7 @@ var StoredMCPClient = class extends BaseResource {
6144
6112
  return this.request(`/stored/mcp-clients/${encodeURIComponent(this.storedMCPClientId)}${requestContextQueryString(requestContext)}`, { method: "DELETE" });
6145
6113
  }
6146
6114
  };
6147
- //#endregion
6148
- //#region src/resources/stored-scorer.ts
6115
+ // src/resources/stored-scorer.ts
6149
6116
  /**
6150
6117
  * Resource for interacting with a specific stored scorer definition
6151
6118
  */
@@ -6269,8 +6236,7 @@ var StoredScorer = class extends BaseResource {
6269
6236
  return this.request(`/stored/scorers/${encodeURIComponent(this.storedScorerId)}/versions/compare?${queryParams.toString()}${contextString ? `&${contextString.slice(1)}` : ""}`);
6270
6237
  }
6271
6238
  };
6272
- //#endregion
6273
- //#region src/resources/tool-provider.ts
6239
+ // src/resources/tool-provider.ts
6274
6240
  /**
6275
6241
  * Resource for interacting with a specific tool provider.
6276
6242
  *
@@ -6405,8 +6371,7 @@ var ToolProvider = class extends BaseResource {
6405
6371
  return this.request(`/tool-providers/${encodeURIComponent(this.providerId)}/health`);
6406
6372
  }
6407
6373
  };
6408
- //#endregion
6409
- //#region src/resources/processor-provider.ts
6374
+ // src/resources/processor-provider.ts
6410
6375
  /**
6411
6376
  * Resource for interacting with a specific processor provider
6412
6377
  */
@@ -6424,8 +6389,7 @@ var ProcessorProvider = class extends BaseResource {
6424
6389
  return this.request(`/processor-providers/${encodeURIComponent(this.providerId)}`);
6425
6390
  }
6426
6391
  };
6427
- //#endregion
6428
- //#region src/resources/workspace.ts
6392
+ // src/resources/workspace.ts
6429
6393
  /**
6430
6394
  * Resource for interacting with a specific skill via the workspace API
6431
6395
  */
@@ -6695,8 +6659,7 @@ var Workspace = class extends BaseResource {
6695
6659
  });
6696
6660
  }
6697
6661
  };
6698
- //#endregion
6699
- //#region src/resources/stored-skill.ts
6662
+ // src/resources/stored-skill.ts
6700
6663
  /**
6701
6664
  * Resource for interacting with a specific stored skill
6702
6665
  */
@@ -6749,8 +6712,7 @@ var StoredSkill = class extends BaseResource {
6749
6712
  return this.request(`/stored/skills/${encodeURIComponent(this.storedSkillId)}/favorite${requestContextQueryString(requestContext)}`, { method: "DELETE" });
6750
6713
  }
6751
6714
  };
6752
- //#endregion
6753
- //#region src/resources/responses.ts
6715
+ // src/resources/responses.ts
6754
6716
  function getOutputText(output) {
6755
6717
  return output.flatMap((item) => item.type === "message" ? item.content : []).map((part) => typeof part?.text === "string" ? part.text : "").filter(Boolean).join("");
6756
6718
  }
@@ -6855,8 +6817,7 @@ var Responses = class extends BaseResource {
6855
6817
  return this.request(`/v1/responses/${encodeURIComponent(responseId)}${requestContextQueryString(requestContext)}`, { method: "DELETE" });
6856
6818
  }
6857
6819
  };
6858
- //#endregion
6859
- //#region src/resources/channels.ts
6820
+ // src/resources/channels.ts
6860
6821
  var Channels = class extends BaseResource {
6861
6822
  constructor(options) {
6862
6823
  super(options);
@@ -6916,8 +6877,7 @@ var Channels = class extends BaseResource {
6916
6877
  return this.request(`/channels/${platform}/${agentId}/disconnect`, { method: "POST" });
6917
6878
  }
6918
6879
  };
6919
- //#endregion
6920
- //#region src/resources/agent-controller.ts
6880
+ // src/resources/agent-controller.ts
6921
6881
  const KNOWN_AGENT_CONTROLLER_EVENT_TYPES = new Set(Object.keys({
6922
6882
  agent_start: true,
6923
6883
  agent_end: true,
@@ -7617,8 +7577,7 @@ var AgentController = class extends BaseResource {
7617
7577
  function agentControllerMessageText(message) {
7618
7578
  return message.content.parts.filter((p) => p.type === "text" && typeof p.text === "string").map((p) => p.text).join("");
7619
7579
  }
7620
- //#endregion
7621
- //#region src/client.ts
7580
+ // src/client.ts
7622
7581
  /**
7623
7582
  * Provides typed access to agents, workflows, and other APIs on a running Mastra server.
7624
7583
  * Point `baseUrl` at your server and configure authentication when required.
@@ -9388,8 +9347,7 @@ var MastraClient = class extends BaseResource {
9388
9347
  return this.request(`/schedules/${encodeURIComponent(scheduleId)}/resume`, { method: "POST" });
9389
9348
  }
9390
9349
  };
9391
- //#endregion
9392
- //#region src/tools.ts
9350
+ // src/tools.ts
9393
9351
  var ClientTool = class {
9394
9352
  id;
9395
9353
  description;
@@ -9407,7 +9365,6 @@ var ClientTool = class {
9407
9365
  function createTool(opts) {
9408
9366
  return new ClientTool(opts);
9409
9367
  }
9410
- //#endregion
9411
9368
  exports.ClientTool = ClientTool;
9412
9369
  exports.MastraClient = MastraClient;
9413
9370
  exports.MastraClientError = MastraClientError;