@mastra/deployer 0.18.1-alpha.0 → 0.19.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/build/analyze/analyzeEntry.d.ts.map +1 -1
  3. package/dist/build/analyze/bundleExternals.d.ts.map +1 -1
  4. package/dist/build/analyze.cjs +2 -2
  5. package/dist/build/analyze.js +1 -1
  6. package/dist/build/bundler.cjs +3 -3
  7. package/dist/build/bundler.d.ts.map +1 -1
  8. package/dist/build/bundler.js +1 -1
  9. package/dist/build/index.cjs +15 -15
  10. package/dist/build/index.js +5 -5
  11. package/dist/build/plugins/node-modules-extension-resolver.d.ts.map +1 -1
  12. package/dist/build/utils.d.ts +13 -0
  13. package/dist/build/utils.d.ts.map +1 -1
  14. package/dist/build/watcher.d.ts.map +1 -1
  15. package/dist/bundler/index.cjs +2 -2
  16. package/dist/bundler/index.d.ts.map +1 -1
  17. package/dist/bundler/index.js +1 -1
  18. package/dist/bundler/workspaceDependencies.d.ts.map +1 -1
  19. package/dist/{chunk-CGLMV75H.cjs → chunk-3JYRSECU.cjs} +10 -5
  20. package/dist/chunk-3JYRSECU.cjs.map +1 -0
  21. package/dist/{chunk-4PSE6XXT.cjs → chunk-5HLB56SX.cjs} +18 -18
  22. package/dist/chunk-5HLB56SX.cjs.map +1 -0
  23. package/dist/{chunk-CHKSDG3W.js → chunk-5QFG6SCM.js} +8 -3
  24. package/dist/chunk-5QFG6SCM.js.map +1 -0
  25. package/dist/{chunk-36EU6KMX.cjs → chunk-7XYNDWHM.cjs} +58 -37
  26. package/dist/chunk-7XYNDWHM.cjs.map +1 -0
  27. package/dist/{chunk-BZDTNUHJ.cjs → chunk-C63Y45DE.cjs} +18 -12
  28. package/dist/chunk-C63Y45DE.cjs.map +1 -0
  29. package/dist/{chunk-E3RTDQG6.js → chunk-E56YDU6G.js} +56 -36
  30. package/dist/chunk-E56YDU6G.js.map +1 -0
  31. package/dist/{chunk-BNYQVIRY.js → chunk-G6MQAGP6.js} +10 -9
  32. package/dist/chunk-G6MQAGP6.js.map +1 -0
  33. package/dist/{chunk-AGJGRBDD.cjs → chunk-JKSGIHN5.cjs} +5 -5
  34. package/dist/{chunk-AGJGRBDD.cjs.map → chunk-JKSGIHN5.cjs.map} +1 -1
  35. package/dist/{chunk-CKF6WWGH.cjs → chunk-LSVYJCYH.cjs} +24 -23
  36. package/dist/chunk-LSVYJCYH.cjs.map +1 -0
  37. package/dist/{chunk-AUXVJBHV.js → chunk-P76ACDWK.js} +3 -3
  38. package/dist/{chunk-AUXVJBHV.js.map → chunk-P76ACDWK.js.map} +1 -1
  39. package/dist/{chunk-4775FISH.js → chunk-RCG3326W.js} +9 -8
  40. package/dist/chunk-RCG3326W.js.map +1 -0
  41. package/dist/{chunk-IARXPG3L.js → chunk-RZGW2FV5.js} +15 -9
  42. package/dist/chunk-RZGW2FV5.js.map +1 -0
  43. package/dist/index.cjs +12 -12
  44. package/dist/index.js +4 -4
  45. package/dist/server/handlers/routes/agents/handlers.d.ts.map +1 -1
  46. package/dist/server/handlers/routes/agents/router.d.ts.map +1 -1
  47. package/dist/server/handlers/routes/observability/handlers.d.ts +1 -0
  48. package/dist/server/handlers/routes/observability/handlers.d.ts.map +1 -1
  49. package/dist/server/handlers/routes/observability/router.d.ts.map +1 -1
  50. package/dist/server/handlers/routes/workflows/handlers.d.ts.map +1 -1
  51. package/dist/server/handlers/routes/workflows/router.d.ts.map +1 -1
  52. package/dist/server/index.cjs +262 -24
  53. package/dist/server/index.cjs.map +1 -1
  54. package/dist/server/index.js +263 -25
  55. package/dist/server/index.js.map +1 -1
  56. package/dist/services/deps.d.ts.map +1 -1
  57. package/dist/services/index.cjs +4 -4
  58. package/dist/services/index.js +1 -1
  59. package/dist/validator/validate.d.ts.map +1 -1
  60. package/package.json +8 -8
  61. package/dist/chunk-36EU6KMX.cjs.map +0 -1
  62. package/dist/chunk-4775FISH.js.map +0 -1
  63. package/dist/chunk-4PSE6XXT.cjs.map +0 -1
  64. package/dist/chunk-BNYQVIRY.js.map +0 -1
  65. package/dist/chunk-BZDTNUHJ.cjs.map +0 -1
  66. package/dist/chunk-CGLMV75H.cjs.map +0 -1
  67. package/dist/chunk-CHKSDG3W.js.map +0 -1
  68. package/dist/chunk-CKF6WWGH.cjs.map +0 -1
  69. package/dist/chunk-E3RTDQG6.js.map +0 -1
  70. package/dist/chunk-IARXPG3L.js.map +0 -1
@@ -24,6 +24,7 @@ var a2a = require('@mastra/server/handlers/a2a');
24
24
  var streaming = require('hono/streaming');
25
25
  var bodyLimit = require('hono/body-limit');
26
26
  var agentBuilder = require('@mastra/server/handlers/agent-builder');
27
+ var error = require('@mastra/core/error');
27
28
  var agents = require('@mastra/server/handlers/agents');
28
29
  var agent = require('@mastra/core/agent');
29
30
  var zod = require('zod');
@@ -318,12 +319,16 @@ async function readWithoutBlocking(readPromise) {
318
319
  return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
319
320
  }
320
321
  function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
321
- const handleError2 = () => {
322
+ const cancel = (error) => {
323
+ reader.cancel(error).catch(() => {
324
+ });
322
325
  };
323
- writable.on("error", handleError2);
326
+ writable.on("close", cancel);
327
+ writable.on("error", cancel);
324
328
  (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
325
329
  return reader.closed.finally(() => {
326
- writable.off("error", handleError2);
330
+ writable.off("close", cancel);
331
+ writable.off("error", cancel);
327
332
  });
328
333
  function handleStreamError(error) {
329
334
  if (error) {
@@ -2382,6 +2387,17 @@ var vNextBodyOptions = {
2382
2387
  description: "Controls how tools are selected during generation"
2383
2388
  },
2384
2389
  format: { type: "string", enum: ["mastra", "aisdk"], description: "Response format" },
2390
+ tracingOptions: {
2391
+ type: "object",
2392
+ description: "Tracing options for the agent execution",
2393
+ properties: {
2394
+ metadata: {
2395
+ type: "object",
2396
+ description: "Custom metadata to attach to the trace",
2397
+ additionalProperties: true
2398
+ }
2399
+ }
2400
+ },
2385
2401
  ...sharedBodyOptions
2386
2402
  };
2387
2403
  async function getAgentsHandler(c2) {
@@ -2566,6 +2582,27 @@ async function streamNetworkHandler(c2) {
2566
2582
  const runtimeContext = c2.get("runtimeContext");
2567
2583
  const body = await c2.req.json();
2568
2584
  const logger2 = mastra.getLogger();
2585
+ const agent = mastra.getAgent(agentId);
2586
+ if (!agent) {
2587
+ throw new error.MastraError({
2588
+ id: "AGENT_NOT_FOUND",
2589
+ domain: error.ErrorDomain.AGENT,
2590
+ category: error.ErrorCategory.USER,
2591
+ text: "Agent not found"
2592
+ });
2593
+ }
2594
+ const memory = await agent.getMemory({ runtimeContext });
2595
+ if (!memory) {
2596
+ throw new error.MastraError({
2597
+ id: "AGENT_NETWORK_MEMORY_REQUIRED",
2598
+ domain: error.ErrorDomain.AGENT_NETWORK,
2599
+ category: error.ErrorCategory.USER,
2600
+ text: "Memory is required for the agent network to function properly. Please configure memory for the agent.",
2601
+ details: {
2602
+ status: 400
2603
+ }
2604
+ });
2605
+ }
2569
2606
  c2.header("Transfer-Encoding", "chunked");
2570
2607
  return streaming.stream(
2571
2608
  c2,
@@ -3104,7 +3141,18 @@ function agentsRouter(bodyLimitOptions) {
3104
3141
  deprecated: true
3105
3142
  },
3106
3143
  runId: { type: "string" },
3107
- output: { type: "object" }
3144
+ output: { type: "object" },
3145
+ tracingOptions: {
3146
+ type: "object",
3147
+ description: "Tracing options for the agent execution",
3148
+ properties: {
3149
+ metadata: {
3150
+ type: "object",
3151
+ description: "Custom metadata to attach to the trace",
3152
+ additionalProperties: true
3153
+ }
3154
+ }
3155
+ }
3108
3156
  },
3109
3157
  required: ["messages"]
3110
3158
  }
@@ -3155,7 +3203,18 @@ function agentsRouter(bodyLimitOptions) {
3155
3203
  deprecated: true
3156
3204
  },
3157
3205
  runId: { type: "string" },
3158
- output: { type: "object" }
3206
+ output: { type: "object" },
3207
+ tracingOptions: {
3208
+ type: "object",
3209
+ description: "Tracing options for the agent execution",
3210
+ properties: {
3211
+ metadata: {
3212
+ type: "object",
3213
+ description: "Custom metadata to attach to the trace",
3214
+ additionalProperties: true
3215
+ }
3216
+ }
3217
+ }
3159
3218
  },
3160
3219
  required: ["messages"]
3161
3220
  }
@@ -3309,7 +3368,18 @@ function agentsRouter(bodyLimitOptions) {
3309
3368
  deprecated: true
3310
3369
  },
3311
3370
  runId: { type: "string" },
3312
- output: { type: "object" }
3371
+ output: { type: "object" },
3372
+ tracingOptions: {
3373
+ type: "object",
3374
+ description: "Tracing options for the agent execution",
3375
+ properties: {
3376
+ metadata: {
3377
+ type: "object",
3378
+ description: "Custom metadata to attach to the trace",
3379
+ additionalProperties: true
3380
+ }
3381
+ }
3382
+ }
3313
3383
  },
3314
3384
  required: ["messages"]
3315
3385
  }
@@ -3360,7 +3430,18 @@ function agentsRouter(bodyLimitOptions) {
3360
3430
  deprecated: true
3361
3431
  },
3362
3432
  runId: { type: "string" },
3363
- output: { type: "object" }
3433
+ output: { type: "object" },
3434
+ tracingOptions: {
3435
+ type: "object",
3436
+ description: "Tracing options for the agent execution",
3437
+ properties: {
3438
+ metadata: {
3439
+ type: "object",
3440
+ description: "Custom metadata to attach to the trace",
3441
+ additionalProperties: true
3442
+ }
3443
+ }
3444
+ }
3364
3445
  },
3365
3446
  required: ["messages"]
3366
3447
  }
@@ -3426,6 +3507,17 @@ function agentsRouter(bodyLimitOptions) {
3426
3507
  { type: "string", enum: ["auto", "none", "required"] },
3427
3508
  { type: "object", properties: { type: { type: "string" }, toolName: { type: "string" } } }
3428
3509
  ]
3510
+ },
3511
+ tracingOptions: {
3512
+ type: "object",
3513
+ description: "Tracing options for the agent execution",
3514
+ properties: {
3515
+ metadata: {
3516
+ type: "object",
3517
+ description: "Custom metadata to attach to the trace",
3518
+ additionalProperties: true
3519
+ }
3520
+ }
3429
3521
  }
3430
3522
  },
3431
3523
  required: ["messages"]
@@ -8854,6 +8946,25 @@ async function processTraceScoringHandler(c2) {
8854
8946
  return handleError(error, "Error processing trace scoring");
8855
8947
  }
8856
8948
  }
8949
+ async function getScoresBySpan(c2) {
8950
+ const mastra = c2.get("mastra");
8951
+ const traceId = c2.req.param("traceId");
8952
+ const spanId = c2.req.param("spanId");
8953
+ const page = parseInt(c2.req.query("page") || "0");
8954
+ const perPage = parseInt(c2.req.query("perPage") || "10");
8955
+ const pagination = { page, perPage };
8956
+ try {
8957
+ const scores = await observability.getScoresBySpan({
8958
+ mastra,
8959
+ traceId,
8960
+ spanId,
8961
+ pagination
8962
+ });
8963
+ return c2.json(scores);
8964
+ } catch (error) {
8965
+ return handleError(error, "Error getting scores by span");
8966
+ }
8967
+ }
8857
8968
 
8858
8969
  // src/server/handlers/routes/observability/router.ts
8859
8970
  function observabilityRouter() {
@@ -8946,6 +9057,49 @@ function observabilityRouter() {
8946
9057
  }),
8947
9058
  getAITraceHandler
8948
9059
  );
9060
+ router.get(
9061
+ "/traces/:traceId/:spanId/scores",
9062
+ w({
9063
+ description: "Get scores by trace ID and span ID",
9064
+ tags: ["scores"],
9065
+ parameters: [
9066
+ {
9067
+ name: "traceId",
9068
+ in: "path",
9069
+ required: true,
9070
+ schema: { type: "string" },
9071
+ description: "Trace ID"
9072
+ },
9073
+ {
9074
+ name: "spanId",
9075
+ in: "path",
9076
+ required: true,
9077
+ schema: { type: "string" },
9078
+ description: "Span ID"
9079
+ },
9080
+ {
9081
+ name: "page",
9082
+ in: "query",
9083
+ required: false,
9084
+ schema: { type: "number" },
9085
+ description: "Page number for pagination (default: 0)"
9086
+ },
9087
+ {
9088
+ name: "perPage",
9089
+ in: "query",
9090
+ required: false,
9091
+ schema: { type: "number" },
9092
+ description: "Number of items per page (default: 10)"
9093
+ }
9094
+ ],
9095
+ responses: {
9096
+ 200: {
9097
+ description: "Paginated list of scores for span"
9098
+ }
9099
+ }
9100
+ }),
9101
+ getScoresBySpan
9102
+ );
8949
9103
  router.post(
8950
9104
  "/traces/score",
8951
9105
  w({
@@ -9861,14 +10015,15 @@ async function startAsyncWorkflowHandler(c2) {
9861
10015
  const mastra = c2.get("mastra");
9862
10016
  const runtimeContext = c2.get("runtimeContext");
9863
10017
  const workflowId = c2.req.param("workflowId");
9864
- const { inputData } = await c2.req.json();
10018
+ const { inputData, tracingOptions } = await c2.req.json();
9865
10019
  const runId = c2.req.query("runId");
9866
10020
  const result = await workflows.startAsyncWorkflowHandler({
9867
10021
  mastra,
9868
10022
  runtimeContext,
9869
10023
  workflowId,
9870
10024
  runId,
9871
- inputData
10025
+ inputData,
10026
+ tracingOptions
9872
10027
  });
9873
10028
  return c2.json(result);
9874
10029
  } catch (error) {
@@ -9880,14 +10035,15 @@ async function startWorkflowRunHandler(c2) {
9880
10035
  const mastra = c2.get("mastra");
9881
10036
  const runtimeContext = c2.get("runtimeContext");
9882
10037
  const workflowId = c2.req.param("workflowId");
9883
- const { inputData } = await c2.req.json();
10038
+ const { inputData, tracingOptions } = await c2.req.json();
9884
10039
  const runId = c2.req.query("runId");
9885
10040
  await workflows.startWorkflowRunHandler({
9886
10041
  mastra,
9887
10042
  runtimeContext,
9888
10043
  workflowId,
9889
10044
  runId,
9890
- inputData
10045
+ inputData,
10046
+ tracingOptions
9891
10047
  });
9892
10048
  return c2.json({ message: "Workflow run started" });
9893
10049
  } catch (e2) {
@@ -9939,7 +10095,7 @@ async function streamWorkflowHandler(c2) {
9939
10095
  const runtimeContext = c2.get("runtimeContext");
9940
10096
  const logger2 = mastra.getLogger();
9941
10097
  const workflowId = c2.req.param("workflowId");
9942
- const { inputData } = await c2.req.json();
10098
+ const { inputData, tracingOptions } = await c2.req.json();
9943
10099
  const runId = c2.req.query("runId");
9944
10100
  c2.header("Transfer-Encoding", "chunked");
9945
10101
  return streaming.stream(
@@ -9951,7 +10107,8 @@ async function streamWorkflowHandler(c2) {
9951
10107
  workflowId,
9952
10108
  runId,
9953
10109
  inputData,
9954
- runtimeContext
10110
+ runtimeContext,
10111
+ tracingOptions
9955
10112
  });
9956
10113
  const reader = result.stream.getReader();
9957
10114
  stream7.onAbort(() => {
@@ -10020,7 +10177,7 @@ async function streamVNextWorkflowHandler(c2) {
10020
10177
  const runtimeContext = c2.get("runtimeContext");
10021
10178
  const logger2 = mastra.getLogger();
10022
10179
  const workflowId = c2.req.param("workflowId");
10023
- const { inputData, closeOnSuspend } = await c2.req.json();
10180
+ const { inputData, closeOnSuspend, tracingOptions } = await c2.req.json();
10024
10181
  const runId = c2.req.query("runId");
10025
10182
  c2.header("Transfer-Encoding", "chunked");
10026
10183
  return streaming.stream(
@@ -10033,7 +10190,8 @@ async function streamVNextWorkflowHandler(c2) {
10033
10190
  runId,
10034
10191
  inputData,
10035
10192
  runtimeContext,
10036
- closeOnSuspend
10193
+ closeOnSuspend,
10194
+ tracingOptions
10037
10195
  });
10038
10196
  const reader = result.getReader();
10039
10197
  stream7.onAbort(() => {
@@ -10061,7 +10219,7 @@ async function resumeStreamWorkflowHandler(c2) {
10061
10219
  const runtimeContext = c2.get("runtimeContext");
10062
10220
  const logger2 = mastra.getLogger();
10063
10221
  const workflowId = c2.req.param("workflowId");
10064
- const { step, resumeData } = await c2.req.json();
10222
+ const { step, resumeData, tracingOptions } = await c2.req.json();
10065
10223
  const runId = c2.req.query("runId");
10066
10224
  c2.header("Transfer-Encoding", "chunked");
10067
10225
  return streaming.stream(
@@ -10073,7 +10231,8 @@ async function resumeStreamWorkflowHandler(c2) {
10073
10231
  workflowId,
10074
10232
  runId,
10075
10233
  body: { step, resumeData },
10076
- runtimeContext
10234
+ runtimeContext,
10235
+ tracingOptions
10077
10236
  });
10078
10237
  const reader = result.getReader();
10079
10238
  stream7.onAbort(() => {
@@ -10101,7 +10260,7 @@ async function resumeAsyncWorkflowHandler(c2) {
10101
10260
  const runtimeContext = c2.get("runtimeContext");
10102
10261
  const workflowId = c2.req.param("workflowId");
10103
10262
  const runId = c2.req.query("runId");
10104
- const { step, resumeData } = await c2.req.json();
10263
+ const { step, resumeData, tracingOptions } = await c2.req.json();
10105
10264
  if (!runId) {
10106
10265
  throw new httpException.HTTPException(400, { message: "runId required to resume workflow" });
10107
10266
  }
@@ -10110,7 +10269,8 @@ async function resumeAsyncWorkflowHandler(c2) {
10110
10269
  runtimeContext,
10111
10270
  workflowId,
10112
10271
  runId,
10113
- body: { step, resumeData }
10272
+ body: { step, resumeData },
10273
+ tracingOptions
10114
10274
  });
10115
10275
  return c2.json(result);
10116
10276
  } catch (error) {
@@ -10123,7 +10283,7 @@ async function resumeWorkflowHandler(c2) {
10123
10283
  const runtimeContext = c2.get("runtimeContext");
10124
10284
  const workflowId = c2.req.param("workflowId");
10125
10285
  const runId = c2.req.query("runId");
10126
- const { step, resumeData } = await c2.req.json();
10286
+ const { step, resumeData, tracingOptions } = await c2.req.json();
10127
10287
  if (!runId) {
10128
10288
  throw new httpException.HTTPException(400, { message: "runId required to resume workflow" });
10129
10289
  }
@@ -10132,7 +10292,8 @@ async function resumeWorkflowHandler(c2) {
10132
10292
  runtimeContext,
10133
10293
  workflowId,
10134
10294
  runId,
10135
- body: { step, resumeData }
10295
+ body: { step, resumeData },
10296
+ tracingOptions
10136
10297
  });
10137
10298
  return c2.json({ message: "Workflow run resumed" });
10138
10299
  } catch (error) {
@@ -10493,7 +10654,18 @@ function workflowsRouter(bodyLimitOptions) {
10493
10654
  type: "object",
10494
10655
  properties: {
10495
10656
  stepId: { type: "string" },
10496
- context: { type: "object" }
10657
+ context: { type: "object" },
10658
+ tracingOptions: {
10659
+ type: "object",
10660
+ description: "Tracing options for the workflow execution",
10661
+ properties: {
10662
+ metadata: {
10663
+ type: "object",
10664
+ description: "Custom metadata to attach to the trace",
10665
+ additionalProperties: true
10666
+ }
10667
+ }
10668
+ }
10497
10669
  }
10498
10670
  }
10499
10671
  }
@@ -10530,7 +10702,18 @@ function workflowsRouter(bodyLimitOptions) {
10530
10702
  type: "object",
10531
10703
  properties: {
10532
10704
  stepId: { type: "string" },
10533
- context: { type: "object" }
10705
+ context: { type: "object" },
10706
+ tracingOptions: {
10707
+ type: "object",
10708
+ description: "Tracing options for the workflow execution",
10709
+ properties: {
10710
+ metadata: {
10711
+ type: "object",
10712
+ description: "Custom metadata to attach to the trace",
10713
+ additionalProperties: true
10714
+ }
10715
+ }
10716
+ }
10534
10717
  }
10535
10718
  }
10536
10719
  }
@@ -10879,6 +11062,17 @@ function workflowsRouter(bodyLimitOptions) {
10879
11062
  runtimeContext: {
10880
11063
  type: "object",
10881
11064
  description: "Runtime context for the workflow execution"
11065
+ },
11066
+ tracingOptions: {
11067
+ type: "object",
11068
+ description: "Tracing options for the workflow execution",
11069
+ properties: {
11070
+ metadata: {
11071
+ type: "object",
11072
+ description: "Custom metadata to attach to the trace",
11073
+ additionalProperties: true
11074
+ }
11075
+ }
10882
11076
  }
10883
11077
  },
10884
11078
  required: ["step"]
@@ -10962,6 +11156,17 @@ function workflowsRouter(bodyLimitOptions) {
10962
11156
  runtimeContext: {
10963
11157
  type: "object",
10964
11158
  description: "Runtime context for the workflow execution"
11159
+ },
11160
+ tracingOptions: {
11161
+ type: "object",
11162
+ description: "Tracing options for the workflow execution",
11163
+ properties: {
11164
+ metadata: {
11165
+ type: "object",
11166
+ description: "Custom metadata to attach to the trace",
11167
+ additionalProperties: true
11168
+ }
11169
+ }
10965
11170
  }
10966
11171
  }
10967
11172
  }
@@ -11043,6 +11248,17 @@ function workflowsRouter(bodyLimitOptions) {
11043
11248
  closeOnSuspend: {
11044
11249
  type: "boolean",
11045
11250
  description: "Close the stream on suspend"
11251
+ },
11252
+ tracingOptions: {
11253
+ type: "object",
11254
+ description: "Tracing options for the workflow execution",
11255
+ properties: {
11256
+ metadata: {
11257
+ type: "object",
11258
+ description: "Custom metadata to attach to the trace",
11259
+ additionalProperties: true
11260
+ }
11261
+ }
11046
11262
  }
11047
11263
  }
11048
11264
  }
@@ -11120,6 +11336,17 @@ function workflowsRouter(bodyLimitOptions) {
11120
11336
  runtimeContext: {
11121
11337
  type: "object",
11122
11338
  description: "Runtime context for the workflow execution"
11339
+ },
11340
+ tracingOptions: {
11341
+ type: "object",
11342
+ description: "Tracing options for the workflow execution",
11343
+ properties: {
11344
+ metadata: {
11345
+ type: "object",
11346
+ description: "Custom metadata to attach to the trace",
11347
+ additionalProperties: true
11348
+ }
11349
+ }
11123
11350
  }
11124
11351
  }
11125
11352
  }
@@ -11140,7 +11367,7 @@ function workflowsRouter(bodyLimitOptions) {
11140
11367
  router.post(
11141
11368
  "/:workflowId/start",
11142
11369
  w({
11143
- description: "Create and start a new workflow run",
11370
+ description: "Start an existing workflow run",
11144
11371
  tags: ["workflows"],
11145
11372
  parameters: [
11146
11373
  {
@@ -11167,6 +11394,17 @@ function workflowsRouter(bodyLimitOptions) {
11167
11394
  runtimeContext: {
11168
11395
  type: "object",
11169
11396
  description: "Runtime context for the workflow execution"
11397
+ },
11398
+ tracingOptions: {
11399
+ type: "object",
11400
+ description: "Tracing options for the workflow execution",
11401
+ properties: {
11402
+ metadata: {
11403
+ type: "object",
11404
+ description: "Custom metadata to attach to the trace",
11405
+ additionalProperties: true
11406
+ }
11407
+ }
11170
11408
  }
11171
11409
  }
11172
11410
  }