@mastra/server 1.86.0-alpha.7 → 1.86.0-alpha.8

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.
Files changed (127) hide show
  1. package/dist/{a2a-WPGF38fX.js → a2a-BfWMjFe2.js} +1 -1
  2. package/dist/{a2a-vSZkdSRE.cjs → a2a-DQIwTZyo.cjs} +1 -1
  3. package/dist/{agent-builder-C4AIqOxt.js → agent-builder-DpuK5-6A.js} +2 -2
  4. package/dist/{agent-builder-dZlRNj1k.cjs → agent-builder-NSemjs4B.cjs} +2 -2
  5. package/dist/{agent-controller-BHJDvCaS.cjs → agent-controller-BP-CFfsg.cjs} +9 -9
  6. package/dist/{agent-controller-NRR6SK66.js → agent-controller-CzKnfKkw.js} +9 -9
  7. package/dist/{agent-versions-CwWhEoU5.cjs → agent-versions-0q4KKmLv.cjs} +12 -12
  8. package/dist/{agent-versions-DfcKpYNW.js → agent-versions-Pml6WNbA.js} +12 -12
  9. package/dist/{agents-mjQZV5tv.cjs → agents-BO1mcMDf.cjs} +14 -3
  10. package/dist/{agents-272TP94y.js → agents-YvaBPFiS.js} +14 -3
  11. package/dist/{api-schema-manifest-DVkepK_s.cjs → api-schema-manifest-016lHJO2.cjs} +1 -1
  12. package/dist/{api-schema-manifest-BjhiTdNv.js → api-schema-manifest-CAZsA5Lk.js} +1 -1
  13. package/dist/{catalogue-BTE9b_mr.cjs → catalogue-Cf7Zz7zb.cjs} +11 -11
  14. package/dist/{catalogue-DH64Duv-.js → catalogue-DN4dvU88.js} +11 -11
  15. package/dist/{conversations-CXyaNjLR.js → conversations-4ZO0Pjvk.js} +1 -1
  16. package/dist/{conversations-BWA_---j.cjs → conversations-BaYtooZZ.cjs} +1 -1
  17. package/dist/{datasets-C1XJLHN8.js → datasets-CYdtUF8e.js} +4 -1
  18. package/dist/{datasets-hqDd4IUN.cjs → datasets-CZRqni0N.cjs} +4 -1
  19. package/dist/dist-Bz6gINFc.js +1 -0
  20. package/dist/{dist-DGwsCtT4.cjs → dist-DaRCrkAU.cjs} +228 -217
  21. package/dist/{dist-CSffo32A.cjs → dist-uiPbWl5E.cjs} +1 -1
  22. package/dist/{dist-Bp1bObAq.js → dist-yny1avqv.js} +228 -217
  23. package/dist/docs/SKILL.md +1 -1
  24. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  25. package/dist/docs/references/reference-observability-tracing-advanced-queries.md +20 -0
  26. package/dist/{dynamic-workflows-DPgV6qtS.cjs → dynamic-workflows-CEKdGcSr.cjs} +4 -4
  27. package/dist/{dynamic-workflows-DmkCJ4Lp.js → dynamic-workflows-DF9X_oDG.js} +4 -4
  28. package/dist/{editor-builder-BS2xogE_.cjs → editor-builder-ChYG8YTs.cjs} +1 -1
  29. package/dist/{editor-builder-BayzCprJ.js → editor-builder-CwsIbd0F.js} +1 -1
  30. package/dist/{observability-zr7LDCQG.js → observability-URaJnI_U.js} +1 -1
  31. package/dist/{observability-Cn4P60P4.cjs → observability-zNA_CVaz.cjs} +1 -1
  32. package/dist/{plans-xGwuiZUd.js → plans-CbR8EDiT.js} +1 -1
  33. package/dist/{plans-Bes_LVgv.cjs → plans-k3UN9Nd1.cjs} +1 -1
  34. package/dist/probe-image-size-DZvSdjzK.js +13297 -0
  35. package/dist/probe-image-size-z8zXmjaH.cjs +13304 -0
  36. package/dist/{responses-BH567IZf.cjs → responses-B-BKx236.cjs} +1 -1
  37. package/dist/{responses-CwQO5y2X.js → responses-Blzxy0XP.js} +1 -1
  38. package/dist/{routes-CrBCJmjc.js → routes-D-I2voQe.js} +16 -16
  39. package/dist/{routes-6p-xrUIq.cjs → routes-jiZyt9kU.cjs} +16 -16
  40. package/dist/{schedules-0ceTSdBB.cjs → schedules-CwL28Eca.cjs} +4 -4
  41. package/dist/{schedules-D_VfFdAH.js → schedules-RWgPeypN.js} +4 -4
  42. package/dist/{scorer-versions-Bhdvt-cX.cjs → scorer-versions-DK-PGj7-.cjs} +1 -1
  43. package/dist/{scorer-versions-DhT7Lj33.js → scorer-versions-oJoK2Exw.js} +1 -1
  44. package/dist/{scores-CXNkN7Bn.cjs → scores-BikU9phm.cjs} +1 -1
  45. package/dist/{scores-ksmJiJnJ.js → scores-DAv6Uisq.js} +1 -1
  46. package/dist/server/handlers/a2a.cjs +1 -1
  47. package/dist/server/handlers/a2a.js +1 -1
  48. package/dist/server/handlers/agent-builder.cjs +1 -1
  49. package/dist/server/handlers/agent-builder.js +1 -1
  50. package/dist/server/handlers/agent-controller.cjs +1 -1
  51. package/dist/server/handlers/agent-controller.js +1 -1
  52. package/dist/server/handlers/agent-versions.cjs +1 -1
  53. package/dist/server/handlers/agent-versions.js +1 -1
  54. package/dist/server/handlers/agents.cjs +1 -1
  55. package/dist/server/handlers/agents.js +1 -1
  56. package/dist/server/handlers/auth.cjs +1 -1
  57. package/dist/server/handlers/auth.js +1 -1
  58. package/dist/server/handlers/conversations.cjs +1 -1
  59. package/dist/server/handlers/conversations.js +1 -1
  60. package/dist/server/handlers/datasets.cjs +16 -11
  61. package/dist/server/handlers/datasets.d.ts +6 -0
  62. package/dist/server/handlers/datasets.js +16 -11
  63. package/dist/server/handlers/dynamic-workflows.cjs +1 -1
  64. package/dist/server/handlers/dynamic-workflows.js +1 -1
  65. package/dist/server/handlers/editor-builder.cjs +1 -1
  66. package/dist/server/handlers/editor-builder.js +1 -1
  67. package/dist/server/handlers/favorites-enrichment.cjs +1 -1
  68. package/dist/server/handlers/favorites-enrichment.js +1 -1
  69. package/dist/server/handlers/observability.cjs +1 -1
  70. package/dist/server/handlers/observability.js +1 -1
  71. package/dist/server/handlers/plans.cjs +1 -1
  72. package/dist/server/handlers/plans.js +1 -1
  73. package/dist/server/handlers/responses.cjs +1 -1
  74. package/dist/server/handlers/responses.js +1 -1
  75. package/dist/server/handlers/schedules.cjs +1 -1
  76. package/dist/server/handlers/schedules.js +1 -1
  77. package/dist/server/handlers/scorer-versions.cjs +1 -1
  78. package/dist/server/handlers/scorer-versions.js +1 -1
  79. package/dist/server/handlers/scores.cjs +1 -1
  80. package/dist/server/handlers/scores.js +1 -1
  81. package/dist/server/handlers/stored-agent-favorites.cjs +3 -3
  82. package/dist/server/handlers/stored-agent-favorites.js +3 -3
  83. package/dist/server/handlers/stored-agents.cjs +2 -2
  84. package/dist/server/handlers/stored-agents.js +2 -2
  85. package/dist/server/handlers/stored-scorers.cjs +1 -1
  86. package/dist/server/handlers/stored-scorers.js +1 -1
  87. package/dist/server/handlers/stored-skill-favorites.cjs +2 -2
  88. package/dist/server/handlers/stored-skill-favorites.js +2 -2
  89. package/dist/server/handlers/stored-skills.cjs +1 -1
  90. package/dist/server/handlers/stored-skills.js +1 -1
  91. package/dist/server/handlers/system.cjs +1 -1
  92. package/dist/server/handlers/system.js +1 -1
  93. package/dist/server/handlers/tool-providers.cjs +2 -2
  94. package/dist/server/handlers/tool-providers.js +2 -2
  95. package/dist/server/handlers/tools.cjs +1 -1
  96. package/dist/server/handlers/tools.js +1 -1
  97. package/dist/server/handlers/voice.cjs +1 -1
  98. package/dist/server/handlers/voice.js +1 -1
  99. package/dist/server/handlers/workflows.cjs +1 -1
  100. package/dist/server/handlers/workflows.js +1 -1
  101. package/dist/server/handlers.cjs +12 -12
  102. package/dist/server/handlers.js +12 -12
  103. package/dist/server/schemas/datasets.d.ts +3 -0
  104. package/dist/server/schemas/index.cjs +6 -6
  105. package/dist/server/schemas/index.js +6 -6
  106. package/dist/server/server-adapter/index.cjs +3 -3
  107. package/dist/server/server-adapter/index.js +3 -3
  108. package/dist/server/server-adapter/routes/conversations.d.ts +3 -3
  109. package/dist/server/server-adapter/routes/datasets.d.ts +6 -0
  110. package/dist/{server-adapter-Ceag3til.cjs → server-adapter-BB2Lw2Ig.cjs} +4 -4
  111. package/dist/{server-adapter-BGOi-s7x.js → server-adapter-CMJcvkpD.js} +4 -4
  112. package/dist/{stored-agents-m0Knvv29.cjs → stored-agents-BS4_LGSs.cjs} +32 -32
  113. package/dist/{stored-agents-DmN_pIIl.js → stored-agents-DcyDMKP2.js} +32 -32
  114. package/dist/{stored-scorers-2F2k6XSx.js → stored-scorers-Bdz_5k57.js} +1 -1
  115. package/dist/{stored-scorers-iM2Qq9Nh.cjs → stored-scorers-D8YYszOj.cjs} +1 -1
  116. package/dist/{tool-providers-Cq3vFqgE.js → tool-providers-BN2Ni06Z.js} +2 -2
  117. package/dist/{tool-providers-BVwRJTtB.cjs → tool-providers-BeiSkVHu.cjs} +2 -2
  118. package/dist/{tools-DLZ7go-n.cjs → tools-CoamSJif.cjs} +1 -1
  119. package/dist/{tools-CY44YtDW.js → tools-DsSk01Ti.js} +1 -1
  120. package/dist/{voice-DTjrAgqg.js → voice-BFh2Zx5m.js} +1 -1
  121. package/dist/{voice-NaerSeVQ.cjs → voice-CquR7YyA.cjs} +1 -1
  122. package/dist/{workflows-gIKukZ1O.cjs → workflows-CHKSHV4f.cjs} +33 -0
  123. package/dist/{workflows-D3QrUMfm.js → workflows-D5bfbang.js} +33 -0
  124. package/package.json +3 -3
  125. package/dist/dist-Bn0zFASI.js +0 -1
  126. package/dist/probe-image-size-BR5MlnnJ.cjs +0 -13304
  127. package/dist/probe-image-size-DBCcUUw_.js +0 -13297
@@ -3,7 +3,7 @@ name: mastra-server
3
3
  description: Documentation for @mastra/server. Use when working with @mastra/server APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/server"
6
- version: "1.86.0-alpha.7"
6
+ version: "1.86.0-alpha.8"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.86.0-alpha.7",
2
+ "version": "1.86.0-alpha.8",
3
3
  "package": "@mastra/server",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -360,6 +360,26 @@ Both the literal and the stored value are lowercased and split into words. A wor
360
360
 
361
361
  The literal must contain at least one letter or digit; otherwise the request fails with `422 TRACE_QUERY_INVALID`. A missing field satisfies neither operator. Use `{ op: 'not', arg: { op: 'matches', ... } }` when records without the field should also match. Text operators are available on span `name`. Other string fields, numbers, timestamps, tags, and metadata reject them. Substring, wildcard, regular-expression, and fuzzy matching aren't supported, and there is no search across several fields.
362
362
 
363
+ #### Search span content by token
364
+
365
+ Hosts with token-indexed span content, such as Mastra Platform, also accept `hasAllTokens`. It matches a span when the field contains every token in the literal, in any order:
366
+
367
+ ```typescript
368
+ const timeoutErrors = {
369
+ spans: {
370
+ some: {
371
+ op: 'hasAllTokens',
372
+ left: { path: 'error' },
373
+ right: { literal: 'connection timeout' },
374
+ },
375
+ },
376
+ }
377
+ ```
378
+
379
+ `left.path` is one of `input`, `output`, `error`, `inputPreview`, `outputPreview`, `errorPreview`, or `all`. With `all`, one of those fields must contain every token. Tokens found in different fields don't combine. The literal is trimmed and accepts 1 to 256 characters. Tokenization and case folding are defined by the host's store. A literal that produces no tokens matches nothing.
380
+
381
+ `hasAllTokens` is available inside `spans.some` in trace queries and directly in span query predicates. It composes with `and` and `or`, but not beneath `not` or `spans.none`, and thread queries reject it. Self-hosted servers don't support token search and reject the operator with `422 TRACE_QUERY_INVALID`.
382
+
363
383
  ### Query limits
364
384
 
365
385
  The planner rejects a query before storage execution when it exceeds any of these limits:
@@ -151,20 +151,20 @@ const listDynamicWorkflowsQuerySchema = zod_v4.z.object({
151
151
  * `mastra.addDynamicWorkflow()`.
152
152
  */
153
153
  const dynamicWorkflowDefinitionBodySchema = zod_v4.z.object({
154
- id: zod_v4.z.string().describe("Workflow id — kebab-case, descriptive"),
154
+ id: zod_v4.z.string().describe("Workflow id \u2014 kebab-case, descriptive"),
155
155
  description: zod_v4.z.string().optional(),
156
156
  metadata: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown()).optional(),
157
157
  inputSchema: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown()).describe("JSON Schema (Draft 2020-12) for the workflow input"),
158
158
  outputSchema: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown()).describe("JSON Schema (Draft 2020-12) for the workflow output"),
159
159
  stateSchema: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown()).optional(),
160
160
  requestContextSchema: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown()).optional(),
161
- graph: zod_v4.z.array(graphEntrySchema).describe("Static workflow graph — ordered array of serialized step entries with all refs as ids.")
161
+ graph: zod_v4.z.array(graphEntrySchema).describe("Static workflow graph \u2014 ordered array of serialized step entries with all refs as ids.")
162
162
  });
163
163
  /**
164
164
  * Body for `POST /stored/workflows` — upsert a static workflow definition,
165
165
  * optionally together with the helper workflows it nests.
166
166
  */
167
- const upsertDynamicWorkflowBodySchema = dynamicWorkflowDefinitionBodySchema.extend({ dependencies: zod_v4.z.array(dynamicWorkflowDefinitionBodySchema).optional().describe("Helper workflow definitions this workflow nests. Saved with it as one unit — the whole set is validated together, hydrated in derived dependency order, and rejected together, so a failed save never leaves orphaned helpers behind. Each helper becomes an ordinary dynamic workflow in its own right.") });
167
+ const upsertDynamicWorkflowBodySchema = dynamicWorkflowDefinitionBodySchema.extend({ dependencies: zod_v4.z.array(dynamicWorkflowDefinitionBodySchema).optional().describe("Helper workflow definitions this workflow nests. Saved with it as one unit \u2014 the whole set is validated together, hydrated in derived dependency order, and rejected together, so a failed save never leaves orphaned helpers behind. Each helper becomes an ordinary dynamic workflow in its own right.") });
168
168
  /**
169
169
  * Shape returned for any single dynamic workflow row.
170
170
  */
@@ -284,7 +284,7 @@ const UPSERT_DYNAMIC_WORKFLOW_ROUTE = require_route_builder.createRoute({
284
284
  bodySchema: upsertDynamicWorkflowBodySchema,
285
285
  responseSchema: upsertDynamicWorkflowResponseSchema,
286
286
  summary: "Upsert a dynamic workflow definition and live-register it",
287
- description: "Persists a static workflow definition and live-registers it on the running Mastra instance. Idempotent — same id updates in place.",
287
+ description: "Persists a static workflow definition and live-registers it on the running Mastra instance. Idempotent \u2014 same id updates in place.",
288
288
  tags: ["Dynamic Workflows"],
289
289
  requiresAuth: true,
290
290
  requiresPermission: "stored-workflows:write",
@@ -151,20 +151,20 @@ const listDynamicWorkflowsQuerySchema = z.object({
151
151
  * `mastra.addDynamicWorkflow()`.
152
152
  */
153
153
  const dynamicWorkflowDefinitionBodySchema = z.object({
154
- id: z.string().describe("Workflow id — kebab-case, descriptive"),
154
+ id: z.string().describe("Workflow id \u2014 kebab-case, descriptive"),
155
155
  description: z.string().optional(),
156
156
  metadata: z.record(z.string(), z.unknown()).optional(),
157
157
  inputSchema: z.record(z.string(), z.unknown()).describe("JSON Schema (Draft 2020-12) for the workflow input"),
158
158
  outputSchema: z.record(z.string(), z.unknown()).describe("JSON Schema (Draft 2020-12) for the workflow output"),
159
159
  stateSchema: z.record(z.string(), z.unknown()).optional(),
160
160
  requestContextSchema: z.record(z.string(), z.unknown()).optional(),
161
- graph: z.array(graphEntrySchema).describe("Static workflow graph — ordered array of serialized step entries with all refs as ids.")
161
+ graph: z.array(graphEntrySchema).describe("Static workflow graph \u2014 ordered array of serialized step entries with all refs as ids.")
162
162
  });
163
163
  /**
164
164
  * Body for `POST /stored/workflows` — upsert a static workflow definition,
165
165
  * optionally together with the helper workflows it nests.
166
166
  */
167
- const upsertDynamicWorkflowBodySchema = dynamicWorkflowDefinitionBodySchema.extend({ dependencies: z.array(dynamicWorkflowDefinitionBodySchema).optional().describe("Helper workflow definitions this workflow nests. Saved with it as one unit — the whole set is validated together, hydrated in derived dependency order, and rejected together, so a failed save never leaves orphaned helpers behind. Each helper becomes an ordinary dynamic workflow in its own right.") });
167
+ const upsertDynamicWorkflowBodySchema = dynamicWorkflowDefinitionBodySchema.extend({ dependencies: z.array(dynamicWorkflowDefinitionBodySchema).optional().describe("Helper workflow definitions this workflow nests. Saved with it as one unit \u2014 the whole set is validated together, hydrated in derived dependency order, and rejected together, so a failed save never leaves orphaned helpers behind. Each helper becomes an ordinary dynamic workflow in its own right.") });
168
168
  /**
169
169
  * Shape returned for any single dynamic workflow row.
170
170
  */
@@ -284,7 +284,7 @@ const UPSERT_DYNAMIC_WORKFLOW_ROUTE = createRoute({
284
284
  bodySchema: upsertDynamicWorkflowBodySchema,
285
285
  responseSchema: upsertDynamicWorkflowResponseSchema,
286
286
  summary: "Upsert a dynamic workflow definition and live-register it",
287
- description: "Persists a static workflow definition and live-registers it on the running Mastra instance. Idempotent — same id updates in place.",
287
+ description: "Persists a static workflow definition and live-registers it on the running Mastra instance. Idempotent \u2014 same id updates in place.",
288
288
  tags: ["Dynamic Workflows"],
289
289
  requiresAuth: true,
290
290
  requiresPermission: "stored-workflows:write",
@@ -1,7 +1,7 @@
1
1
  const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
2
2
  const require_editor_builder = require("./editor-builder-eF2IetF2.cjs");
3
3
  const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
4
- const require_agents = require("./agents-mjQZV5tv.cjs");
4
+ const require_agents = require("./agents-BO1mcMDf.cjs");
5
5
  const require_server_handlers_error = require("./server/handlers/error.cjs");
6
6
  // src/server/utils/resolve-builder-model-policy.ts
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
2
2
  import { i as builderAvailableModelsResponseSchema, l as infrastructureStatusResponseSchema, n as agentFeaturesSchema, s as builderSettingsResponseSchema } from "./editor-builder-CXLdplIj.js";
3
3
  import { n as createRoute } from "./route-builder-Dz18c3qm.js";
4
- import { U as buildProvidersList } from "./agents-272TP94y.js";
4
+ import { U as buildProvidersList } from "./agents-YvaBPFiS.js";
5
5
  import { handleError } from "./server/handlers/error.js";
6
6
  // src/server/utils/resolve-builder-model-policy.ts
7
7
  /**
@@ -291,7 +291,7 @@ const GET_TRACE_LIGHT_ROUTE = createRoute({
291
291
  mcp: {
292
292
  toolset: "observability",
293
293
  name: "get_trace",
294
- description: "Get a trace as light span records (ids, parent, name, type, timing, status, entity). Call get_span for a span’s input, output and attributes.",
294
+ description: "Get a trace as light span records (ids, parent, name, type, timing, status, entity). Call get_span for a span\u2019s input, output and attributes.",
295
295
  requires: (capabilities) => capabilities.observability !== null
296
296
  },
297
297
  responseType: "json",
@@ -291,7 +291,7 @@ const GET_TRACE_LIGHT_ROUTE = require_route_builder.createRoute({
291
291
  mcp: {
292
292
  toolset: "observability",
293
293
  name: "get_trace",
294
- description: "Get a trace as light span records (ids, parent, name, type, timing, status, entity). Call get_span for a span’s input, output and attributes.",
294
+ description: "Get a trace as light span records (ids, parent, name, type, timing, status, entity). Call get_span for a span\u2019s input, output and attributes.",
295
295
  requires: (capabilities) => capabilities.observability !== null
296
296
  },
297
297
  responseType: "json",
@@ -3,7 +3,7 @@ import { _ as MastraFGAPermissions } from "./utils-CvYihOoy.js";
3
3
  import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
4
4
  import { a as agentIdPathParams, o as agentPlanQuerySchema, s as agentPlanResponseSchema } from "./agents-B0OpLdbp.js";
5
5
  import { n as createRoute } from "./route-builder-Dz18c3qm.js";
6
- import { G as getAgentFromSystem } from "./agents-272TP94y.js";
6
+ import { G as getAgentFromSystem } from "./agents-YvaBPFiS.js";
7
7
  import { handleError } from "./server/handlers/error.js";
8
8
  import { submitPlanTool } from "@mastra/core/tools";
9
9
  // src/server/handlers/plans.ts
@@ -3,7 +3,7 @@ const require_utils = require("./utils-j29NB2ZJ.cjs");
3
3
  const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
4
4
  const require_agents = require("./agents-CH_G37hG.cjs");
5
5
  const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
6
- const require_agents$1 = require("./agents-mjQZV5tv.cjs");
6
+ const require_agents$1 = require("./agents-BO1mcMDf.cjs");
7
7
  const require_server_handlers_error = require("./server/handlers/error.cjs");
8
8
  let _mastra_core_tools = require("@mastra/core/tools");
9
9
  // src/server/handlers/plans.ts