@voltagent/server-core 1.0.9 → 1.0.11

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/dist/index.d.mts CHANGED
@@ -450,6 +450,32 @@ declare const WORKFLOW_ROUTES: {
450
450
  };
451
451
  };
452
452
  };
453
+ readonly cancelWorkflow: {
454
+ readonly method: "post";
455
+ readonly path: "/workflows/:id/executions/:executionId/cancel";
456
+ readonly summary: "Cancel workflow execution";
457
+ readonly description: "Cancel a running workflow execution immediately. The workflow stops execution and the state is marked as cancelled. Cancelled workflows cannot be resumed.";
458
+ readonly tags: readonly ["Workflow Management"];
459
+ readonly operationId: "cancelWorkflow";
460
+ readonly responses: {
461
+ readonly 200: {
462
+ readonly description: "Successfully cancelled workflow execution";
463
+ readonly contentType: "application/json";
464
+ };
465
+ readonly 404: {
466
+ readonly description: "Workflow or execution not found";
467
+ readonly contentType: "application/json";
468
+ };
469
+ readonly 409: {
470
+ readonly description: "Workflow execution already completed or not cancellable";
471
+ readonly contentType: "application/json";
472
+ };
473
+ readonly 500: {
474
+ readonly description: "Failed to cancel workflow due to server error";
475
+ readonly contentType: "application/json";
476
+ };
477
+ };
478
+ };
453
479
  readonly resumeWorkflow: {
454
480
  readonly method: "post";
455
481
  readonly path: "/workflows/:id/executions/:executionId/resume";
@@ -1096,6 +1122,32 @@ declare const ALL_ROUTES: {
1096
1122
  };
1097
1123
  };
1098
1124
  };
1125
+ readonly cancelWorkflow: {
1126
+ readonly method: "post";
1127
+ readonly path: "/workflows/:id/executions/:executionId/cancel";
1128
+ readonly summary: "Cancel workflow execution";
1129
+ readonly description: "Cancel a running workflow execution immediately. The workflow stops execution and the state is marked as cancelled. Cancelled workflows cannot be resumed.";
1130
+ readonly tags: readonly ["Workflow Management"];
1131
+ readonly operationId: "cancelWorkflow";
1132
+ readonly responses: {
1133
+ readonly 200: {
1134
+ readonly description: "Successfully cancelled workflow execution";
1135
+ readonly contentType: "application/json";
1136
+ };
1137
+ readonly 404: {
1138
+ readonly description: "Workflow or execution not found";
1139
+ readonly contentType: "application/json";
1140
+ };
1141
+ readonly 409: {
1142
+ readonly description: "Workflow execution already completed or not cancellable";
1143
+ readonly contentType: "application/json";
1144
+ };
1145
+ readonly 500: {
1146
+ readonly description: "Failed to cancel workflow due to server error";
1147
+ readonly contentType: "application/json";
1148
+ };
1149
+ };
1150
+ };
1099
1151
  readonly resumeWorkflow: {
1100
1152
  readonly method: "post";
1101
1153
  readonly path: "/workflows/:id/executions/:executionId/resume";
@@ -1957,7 +2009,7 @@ declare const AgentListSchema: z.ZodArray<z.ZodObject<{
1957
2009
  declare const GenerateOptionsSchema: z.ZodObject<{
1958
2010
  userId: z.ZodOptional<z.ZodString>;
1959
2011
  conversationId: z.ZodOptional<z.ZodString>;
1960
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2012
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1961
2013
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1962
2014
  maxSteps: z.ZodOptional<z.ZodNumber>;
1963
2015
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1967,11 +2019,11 @@ declare const GenerateOptionsSchema: z.ZodObject<{
1967
2019
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1968
2020
  seed: z.ZodOptional<z.ZodNumber>;
1969
2021
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1970
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2022
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1971
2023
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1972
2024
  userId: z.ZodOptional<z.ZodString>;
1973
2025
  conversationId: z.ZodOptional<z.ZodString>;
1974
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2026
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1975
2027
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1976
2028
  maxSteps: z.ZodOptional<z.ZodNumber>;
1977
2029
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1981,11 +2033,11 @@ declare const GenerateOptionsSchema: z.ZodObject<{
1981
2033
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1982
2034
  seed: z.ZodOptional<z.ZodNumber>;
1983
2035
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1984
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2036
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1985
2037
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1986
2038
  userId: z.ZodOptional<z.ZodString>;
1987
2039
  conversationId: z.ZodOptional<z.ZodString>;
1988
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2040
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1989
2041
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1990
2042
  maxSteps: z.ZodOptional<z.ZodNumber>;
1991
2043
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1995,14 +2047,14 @@ declare const GenerateOptionsSchema: z.ZodObject<{
1995
2047
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1996
2048
  seed: z.ZodOptional<z.ZodNumber>;
1997
2049
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1998
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2050
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1999
2051
  }, z.ZodTypeAny, "passthrough">>;
2000
2052
  declare const TextRequestSchema: z.ZodObject<{
2001
2053
  input: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodAny, "many">]>;
2002
2054
  options: z.ZodOptional<z.ZodObject<{
2003
2055
  userId: z.ZodOptional<z.ZodString>;
2004
2056
  conversationId: z.ZodOptional<z.ZodString>;
2005
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2057
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2006
2058
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2007
2059
  maxSteps: z.ZodOptional<z.ZodNumber>;
2008
2060
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2012,11 +2064,11 @@ declare const TextRequestSchema: z.ZodObject<{
2012
2064
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2013
2065
  seed: z.ZodOptional<z.ZodNumber>;
2014
2066
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2015
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2067
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2016
2068
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2017
2069
  userId: z.ZodOptional<z.ZodString>;
2018
2070
  conversationId: z.ZodOptional<z.ZodString>;
2019
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2071
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2020
2072
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2021
2073
  maxSteps: z.ZodOptional<z.ZodNumber>;
2022
2074
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2026,11 +2078,11 @@ declare const TextRequestSchema: z.ZodObject<{
2026
2078
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2027
2079
  seed: z.ZodOptional<z.ZodNumber>;
2028
2080
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2029
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2081
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2030
2082
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2031
2083
  userId: z.ZodOptional<z.ZodString>;
2032
2084
  conversationId: z.ZodOptional<z.ZodString>;
2033
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2085
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2034
2086
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2035
2087
  maxSteps: z.ZodOptional<z.ZodNumber>;
2036
2088
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2040,14 +2092,14 @@ declare const TextRequestSchema: z.ZodObject<{
2040
2092
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2041
2093
  seed: z.ZodOptional<z.ZodNumber>;
2042
2094
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2043
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2095
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2044
2096
  }, z.ZodTypeAny, "passthrough">>>;
2045
2097
  }, "strip", z.ZodTypeAny, {
2046
2098
  input: string | any[];
2047
2099
  options?: z.objectOutputType<{
2048
2100
  userId: z.ZodOptional<z.ZodString>;
2049
2101
  conversationId: z.ZodOptional<z.ZodString>;
2050
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2102
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2051
2103
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2052
2104
  maxSteps: z.ZodOptional<z.ZodNumber>;
2053
2105
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2057,14 +2109,14 @@ declare const TextRequestSchema: z.ZodObject<{
2057
2109
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2058
2110
  seed: z.ZodOptional<z.ZodNumber>;
2059
2111
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2060
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2112
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2061
2113
  }, z.ZodTypeAny, "passthrough"> | undefined;
2062
2114
  }, {
2063
2115
  input: string | any[];
2064
2116
  options?: z.objectInputType<{
2065
2117
  userId: z.ZodOptional<z.ZodString>;
2066
2118
  conversationId: z.ZodOptional<z.ZodString>;
2067
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2119
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2068
2120
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2069
2121
  maxSteps: z.ZodOptional<z.ZodNumber>;
2070
2122
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2074,7 +2126,7 @@ declare const TextRequestSchema: z.ZodObject<{
2074
2126
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2075
2127
  seed: z.ZodOptional<z.ZodNumber>;
2076
2128
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2077
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2129
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2078
2130
  }, z.ZodTypeAny, "passthrough"> | undefined;
2079
2131
  }>;
2080
2132
  declare const TextResponseSchema: z.ZodObject<{
@@ -2180,72 +2232,36 @@ declare const StreamTextEventSchema: z.ZodObject<{
2180
2232
  }>;
2181
2233
  declare const BasicJsonSchema: z.ZodObject<{
2182
2234
  type: z.ZodLiteral<"object">;
2183
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2184
- type: z.ZodEnum<["string", "number", "boolean", "object", "array", "null", "any"]>;
2185
- }, "strip", z.ZodTypeAny, {
2186
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2187
- }, {
2188
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2189
- }>>>;
2235
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2190
2236
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2191
2237
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2192
2238
  type: z.ZodLiteral<"object">;
2193
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2194
- type: z.ZodEnum<["string", "number", "boolean", "object", "array", "null", "any"]>;
2195
- }, "strip", z.ZodTypeAny, {
2196
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2197
- }, {
2198
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2199
- }>>>;
2239
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2200
2240
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2201
2241
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2202
2242
  type: z.ZodLiteral<"object">;
2203
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2204
- type: z.ZodEnum<["string", "number", "boolean", "object", "array", "null", "any"]>;
2205
- }, "strip", z.ZodTypeAny, {
2206
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2207
- }, {
2208
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2209
- }>>>;
2243
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2210
2244
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2211
2245
  }, z.ZodTypeAny, "passthrough">>;
2212
2246
  declare const ObjectRequestSchema: z.ZodObject<{
2213
2247
  input: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodAny, "many">]>;
2214
2248
  schema: z.ZodObject<{
2215
2249
  type: z.ZodLiteral<"object">;
2216
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2217
- type: z.ZodEnum<["string", "number", "boolean", "object", "array", "null", "any"]>;
2218
- }, "strip", z.ZodTypeAny, {
2219
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2220
- }, {
2221
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2222
- }>>>;
2250
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2223
2251
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2224
2252
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2225
2253
  type: z.ZodLiteral<"object">;
2226
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2227
- type: z.ZodEnum<["string", "number", "boolean", "object", "array", "null", "any"]>;
2228
- }, "strip", z.ZodTypeAny, {
2229
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2230
- }, {
2231
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2232
- }>>>;
2254
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2233
2255
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2234
2256
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2235
2257
  type: z.ZodLiteral<"object">;
2236
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2237
- type: z.ZodEnum<["string", "number", "boolean", "object", "array", "null", "any"]>;
2238
- }, "strip", z.ZodTypeAny, {
2239
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2240
- }, {
2241
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2242
- }>>>;
2258
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2243
2259
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2244
2260
  }, z.ZodTypeAny, "passthrough">>;
2245
2261
  options: z.ZodOptional<z.ZodObject<{
2246
2262
  userId: z.ZodOptional<z.ZodString>;
2247
2263
  conversationId: z.ZodOptional<z.ZodString>;
2248
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2264
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2249
2265
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2250
2266
  maxSteps: z.ZodOptional<z.ZodNumber>;
2251
2267
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2255,11 +2271,11 @@ declare const ObjectRequestSchema: z.ZodObject<{
2255
2271
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2256
2272
  seed: z.ZodOptional<z.ZodNumber>;
2257
2273
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2258
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2274
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2259
2275
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2260
2276
  userId: z.ZodOptional<z.ZodString>;
2261
2277
  conversationId: z.ZodOptional<z.ZodString>;
2262
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2278
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2263
2279
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2264
2280
  maxSteps: z.ZodOptional<z.ZodNumber>;
2265
2281
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2269,11 +2285,11 @@ declare const ObjectRequestSchema: z.ZodObject<{
2269
2285
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2270
2286
  seed: z.ZodOptional<z.ZodNumber>;
2271
2287
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2272
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2288
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2273
2289
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2274
2290
  userId: z.ZodOptional<z.ZodString>;
2275
2291
  conversationId: z.ZodOptional<z.ZodString>;
2276
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2292
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2277
2293
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2278
2294
  maxSteps: z.ZodOptional<z.ZodNumber>;
2279
2295
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2283,15 +2299,13 @@ declare const ObjectRequestSchema: z.ZodObject<{
2283
2299
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2284
2300
  seed: z.ZodOptional<z.ZodNumber>;
2285
2301
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2286
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2302
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2287
2303
  }, z.ZodTypeAny, "passthrough">>>;
2288
2304
  }, "strip", z.ZodTypeAny, {
2289
2305
  input: string | any[];
2290
2306
  schema: {
2291
2307
  type: "object";
2292
- properties?: Record<string, {
2293
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2294
- }> | undefined;
2308
+ properties?: Record<string, unknown> | null | undefined;
2295
2309
  required?: string[] | undefined;
2296
2310
  } & {
2297
2311
  [k: string]: unknown;
@@ -2299,7 +2313,7 @@ declare const ObjectRequestSchema: z.ZodObject<{
2299
2313
  options?: z.objectOutputType<{
2300
2314
  userId: z.ZodOptional<z.ZodString>;
2301
2315
  conversationId: z.ZodOptional<z.ZodString>;
2302
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2316
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2303
2317
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2304
2318
  maxSteps: z.ZodOptional<z.ZodNumber>;
2305
2319
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2309,15 +2323,13 @@ declare const ObjectRequestSchema: z.ZodObject<{
2309
2323
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2310
2324
  seed: z.ZodOptional<z.ZodNumber>;
2311
2325
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2312
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2326
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2313
2327
  }, z.ZodTypeAny, "passthrough"> | undefined;
2314
2328
  }, {
2315
2329
  input: string | any[];
2316
2330
  schema: {
2317
2331
  type: "object";
2318
- properties?: Record<string, {
2319
- type: "string" | "number" | "boolean" | "object" | "null" | "array" | "any";
2320
- }> | undefined;
2332
+ properties?: Record<string, unknown> | null | undefined;
2321
2333
  required?: string[] | undefined;
2322
2334
  } & {
2323
2335
  [k: string]: unknown;
@@ -2325,7 +2337,7 @@ declare const ObjectRequestSchema: z.ZodObject<{
2325
2337
  options?: z.objectInputType<{
2326
2338
  userId: z.ZodOptional<z.ZodString>;
2327
2339
  conversationId: z.ZodOptional<z.ZodString>;
2328
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2340
+ context: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2329
2341
  contextLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2330
2342
  maxSteps: z.ZodOptional<z.ZodNumber>;
2331
2343
  temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2335,7 +2347,7 @@ declare const ObjectRequestSchema: z.ZodObject<{
2335
2347
  presencePenalty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2336
2348
  seed: z.ZodOptional<z.ZodNumber>;
2337
2349
  stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2338
- providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2350
+ providerOptions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2339
2351
  }, z.ZodTypeAny, "passthrough"> | undefined;
2340
2352
  }>;
2341
2353
  declare const ObjectResponseSchema: z.ZodObject<{
@@ -2467,14 +2479,14 @@ declare const WorkflowStreamEventSchema: z.ZodObject<{
2467
2479
  from: z.ZodString;
2468
2480
  input: z.ZodOptional<z.ZodAny>;
2469
2481
  output: z.ZodOptional<z.ZodAny>;
2470
- status: z.ZodEnum<["pending", "running", "success", "error", "suspended"]>;
2482
+ status: z.ZodEnum<["pending", "running", "success", "error", "suspended", "cancelled"]>;
2471
2483
  timestamp: z.ZodString;
2472
2484
  stepIndex: z.ZodOptional<z.ZodNumber>;
2473
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2485
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2474
2486
  error: z.ZodOptional<z.ZodAny>;
2475
2487
  }, "strip", z.ZodTypeAny, {
2476
2488
  type: string;
2477
- status: "success" | "error" | "running" | "pending" | "suspended";
2489
+ status: "success" | "error" | "running" | "pending" | "suspended" | "cancelled";
2478
2490
  executionId: string;
2479
2491
  timestamp: string;
2480
2492
  from: string;
@@ -2482,10 +2494,10 @@ declare const WorkflowStreamEventSchema: z.ZodObject<{
2482
2494
  input?: any;
2483
2495
  output?: any;
2484
2496
  stepIndex?: number | undefined;
2485
- metadata?: Record<string, any> | undefined;
2497
+ metadata?: Record<string, any> | null | undefined;
2486
2498
  }, {
2487
2499
  type: string;
2488
- status: "success" | "error" | "running" | "pending" | "suspended";
2500
+ status: "success" | "error" | "running" | "pending" | "suspended" | "cancelled";
2489
2501
  executionId: string;
2490
2502
  timestamp: string;
2491
2503
  from: string;
@@ -2493,7 +2505,7 @@ declare const WorkflowStreamEventSchema: z.ZodObject<{
2493
2505
  input?: any;
2494
2506
  output?: any;
2495
2507
  stepIndex?: number | undefined;
2496
- metadata?: Record<string, any> | undefined;
2508
+ metadata?: Record<string, any> | null | undefined;
2497
2509
  }>;
2498
2510
  declare const WorkflowSuspendRequestSchema: z.ZodObject<{
2499
2511
  reason: z.ZodOptional<z.ZodString>;
@@ -2553,6 +2565,48 @@ declare const WorkflowSuspendResponseSchema: z.ZodObject<{
2553
2565
  };
2554
2566
  };
2555
2567
  }>;
2568
+ declare const WorkflowCancelRequestSchema: z.ZodObject<{
2569
+ reason: z.ZodOptional<z.ZodString>;
2570
+ }, "strip", z.ZodTypeAny, {
2571
+ reason?: string | undefined;
2572
+ }, {
2573
+ reason?: string | undefined;
2574
+ }>;
2575
+ declare const WorkflowCancelResponseSchema: z.ZodObject<{
2576
+ success: z.ZodLiteral<true>;
2577
+ data: z.ZodObject<{
2578
+ executionId: z.ZodString;
2579
+ status: z.ZodLiteral<"cancelled">;
2580
+ cancelledAt: z.ZodString;
2581
+ reason: z.ZodOptional<z.ZodString>;
2582
+ }, "strip", z.ZodTypeAny, {
2583
+ status: "cancelled";
2584
+ executionId: string;
2585
+ cancelledAt: string;
2586
+ reason?: string | undefined;
2587
+ }, {
2588
+ status: "cancelled";
2589
+ executionId: string;
2590
+ cancelledAt: string;
2591
+ reason?: string | undefined;
2592
+ }>;
2593
+ }, "strip", z.ZodTypeAny, {
2594
+ success: true;
2595
+ data: {
2596
+ status: "cancelled";
2597
+ executionId: string;
2598
+ cancelledAt: string;
2599
+ reason?: string | undefined;
2600
+ };
2601
+ }, {
2602
+ success: true;
2603
+ data: {
2604
+ status: "cancelled";
2605
+ executionId: string;
2606
+ cancelledAt: string;
2607
+ reason?: string | undefined;
2608
+ };
2609
+ }>;
2556
2610
  declare const WorkflowResumeRequestSchema: z.ZodOptional<z.ZodObject<{
2557
2611
  resumeData: z.ZodOptional<z.ZodAny>;
2558
2612
  options: z.ZodOptional<z.ZodObject<{
@@ -2952,6 +3006,11 @@ declare function handleStreamWorkflow(workflowId: string, body: any, deps: Serve
2952
3006
  * Returns suspension result
2953
3007
  */
2954
3008
  declare function handleSuspendWorkflow(executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
3009
+ /**
3010
+ * Handler for cancelling a workflow
3011
+ * Returns cancellation result
3012
+ */
3013
+ declare function handleCancelWorkflow(executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2955
3014
  /**
2956
3015
  * Handler for resuming a workflow
2957
3016
  * Returns resume result
@@ -3728,4 +3787,4 @@ declare const DEFAULT_CORS_OPTIONS: {
3728
3787
  credentials: boolean;
3729
3788
  };
3730
3789
 
3731
- export { A2AErrorCode, type A2AJsonRpcId, type A2ARequestContext, type A2AServerLikeWithHandlers, type A2AServerLookupResult, A2A_ROUTES, AGENT_ROUTES, ALL_ROUTES, type AgentCard, type AgentCardCapabilities, type AgentCardProviderInfo, type AgentCardSkill, AgentListSchema, AgentParamsSchema, AgentResponseSchema, type ApiResponse, type AppSetupConfig, type AuthFrameworkAdapter, type AuthProvider, type BaseCustomEndpointDefinition, type BaseServerConfig, BaseServerProvider, BasicJsonSchema, type CapabilityRecord, CustomEndpointError, type CustomEndpointHandler, DEFAULT_A2A_ROUTE_PREFIX, DEFAULT_A2A_WELL_KNOWN_PREFIX, DEFAULT_CORS_OPTIONS, DEFAULT_MCP_HTTP_SEGMENT, DEFAULT_MCP_MESSAGES_SEGMENT, DEFAULT_MCP_ROUTE_PREFIX, DEFAULT_MCP_SSE_SEGMENT, DEFAULT_PUBLIC_ROUTES, type ErrorResponse, ErrorSchema, type FilterContext, GenerateOptionsSchema, type HttpMethod, type IWebSocket, type JWTAuthOptions, type JsonRpcError, type JsonRpcHandlerResult, type JsonRpcRequest, type JsonRpcResponse, type JsonRpcStream, LOG_ROUTES, type LogFilterOptions, type LogHandlerResponse, type LogStreamClient, LogStreamManager, type MCPAgentMetadata, type MCPListedTool, type MCPServerCapabilitiesConfig, type MCPServerLike, type MCPServerMetadata, type MCPServerPackageInfo, type MCPServerRemoteInfo, type MCPToolMetadata, type MCPToolOrigin, type MCPWorkflowSummary, MCP_ROUTES, MCP_SESSION_QUERY_PARAM, type McpInvokeToolRequest, type McpInvokeToolResponse, type McpPromptDetailResponse, type McpPromptListResponse, type McpResourceDetailResponse, type McpResourceListResponse, type McpResourceTemplateListResponse, type McpRouteOptions, type McpRoutePaths, type McpServerDetailResponse, type McpServerListResponse, type McpServerLookupResult, McpSessionStore, type McpSetLogLevelRequest, type McpSetLogLevelResponse, type McpToolListResponse, OBSERVABILITY_ROUTES, ObjectRequestSchema, ObjectResponseSchema, type OpenApiInfo, PROTECTED_ROUTES, ParamsSchema, type PortConfig, type ProcessedAgentOptions, type ProtocolConfig, type ProtocolRecord, type ResponseDefinition, type RouteDefinition, type ServerEndpointSummary, type ServerProviderConfig, type ServerStartupOptions, StreamObjectEventSchema, type StreamResponse, StreamTextEventSchema, SubAgentResponseSchema, type SuccessResponse, TextRequestSchema, TextResponseSchema, UPDATE_ROUTES, VoltA2AError, WORKFLOW_ROUTES, type WebSocketAdapter, type WebSocketConnectionHandler, type WebSocketConnectionInfo, type WebSocketEventHandlers, type WebSocketMessage, WebSocketRouter, WorkflowExecutionParamsSchema, WorkflowExecutionRequestSchema, WorkflowExecutionResponseSchema, WorkflowListSchema, WorkflowParamsSchema, WorkflowResponseSchema, WorkflowResumeRequestSchema, WorkflowResumeResponseSchema, WorkflowStreamEventSchema, WorkflowSuspendRequestSchema, WorkflowSuspendResponseSchema, buildA2AEndpointPath, buildAgentCardPath, buildMcpRoutePaths, cleanupWebSockets, closeAllObservabilityConnections, colors, createAuthErrorResponse, createAuthMiddlewareFactory, createJWT, createSSEHeaders, createSSEResponse, createSSEStream, createUserContext, createWebSocketRouter, createWebSocketServer, executeA2ARequest, extractBearerToken, extractToken, formatSSE, getAllRoutesArray, getLandingPageHTML, getLogsBySpanIdHandler, getLogsByTraceIdHandler, getObservabilityStatusHandler, getOpenApiDoc, getOrCreateLogger, getPortsToTry, getResponseStatus, getRoutesByTag, getSpanByIdHandler, getTraceByIdHandler, getTracesHandler, handleChatStream, handleCheckUpdates, handleExecuteWorkflow, handleGenerateObject, handleGenerateText, handleGetAgent, handleGetAgentHistory, handleGetAgents, handleGetLogs, handleGetMcpPrompt, handleGetMcpResource, handleGetMcpServer, handleGetWorkflow, handleGetWorkflowState, handleGetWorkflows, handleInstallUpdates, handleInvokeMcpServerTool, handleListMcpPrompts, handleListMcpResourceTemplates, handleListMcpResources, handleListMcpServerTools, handleListMcpServers, handleObservabilityConnection, handleResumeWorkflow, handleSetMcpLogLevel, handleStreamObject, handleStreamText, handleStreamWorkflow, handleSuspendWorkflow, handleWebSocketConnection, injectUserIntoBody, isErrorResponse, isJsonRpcRequest, isSuccessResponse, jwtAuth, listA2AServers, listMcpServers, lookupA2AServer, lookupMcpServer, mapHandlerResponse, mapLogResponse, normalizeError, parseJsonRpcRequest, pathMatches, portManager, preferredPorts, printServerStartup, processAgentOptions, processWorkflowOptions, queryLogsHandler, requiresAuth, resolveAgentCard, setupObservabilityHandler, setupObservabilityListeners, setupWebSocketUpgrade, shouldEnableSwaggerUI, transformToSSE, validateBaseCustomEndpoint, validateEndpointMethod, validateEndpointPath };
3790
+ export { A2AErrorCode, type A2AJsonRpcId, type A2ARequestContext, type A2AServerLikeWithHandlers, type A2AServerLookupResult, A2A_ROUTES, AGENT_ROUTES, ALL_ROUTES, type AgentCard, type AgentCardCapabilities, type AgentCardProviderInfo, type AgentCardSkill, AgentListSchema, AgentParamsSchema, AgentResponseSchema, type ApiResponse, type AppSetupConfig, type AuthFrameworkAdapter, type AuthProvider, type BaseCustomEndpointDefinition, type BaseServerConfig, BaseServerProvider, BasicJsonSchema, type CapabilityRecord, CustomEndpointError, type CustomEndpointHandler, DEFAULT_A2A_ROUTE_PREFIX, DEFAULT_A2A_WELL_KNOWN_PREFIX, DEFAULT_CORS_OPTIONS, DEFAULT_MCP_HTTP_SEGMENT, DEFAULT_MCP_MESSAGES_SEGMENT, DEFAULT_MCP_ROUTE_PREFIX, DEFAULT_MCP_SSE_SEGMENT, DEFAULT_PUBLIC_ROUTES, type ErrorResponse, ErrorSchema, type FilterContext, GenerateOptionsSchema, type HttpMethod, type IWebSocket, type JWTAuthOptions, type JsonRpcError, type JsonRpcHandlerResult, type JsonRpcRequest, type JsonRpcResponse, type JsonRpcStream, LOG_ROUTES, type LogFilterOptions, type LogHandlerResponse, type LogStreamClient, LogStreamManager, type MCPAgentMetadata, type MCPListedTool, type MCPServerCapabilitiesConfig, type MCPServerLike, type MCPServerMetadata, type MCPServerPackageInfo, type MCPServerRemoteInfo, type MCPToolMetadata, type MCPToolOrigin, type MCPWorkflowSummary, MCP_ROUTES, MCP_SESSION_QUERY_PARAM, type McpInvokeToolRequest, type McpInvokeToolResponse, type McpPromptDetailResponse, type McpPromptListResponse, type McpResourceDetailResponse, type McpResourceListResponse, type McpResourceTemplateListResponse, type McpRouteOptions, type McpRoutePaths, type McpServerDetailResponse, type McpServerListResponse, type McpServerLookupResult, McpSessionStore, type McpSetLogLevelRequest, type McpSetLogLevelResponse, type McpToolListResponse, OBSERVABILITY_ROUTES, ObjectRequestSchema, ObjectResponseSchema, type OpenApiInfo, PROTECTED_ROUTES, ParamsSchema, type PortConfig, type ProcessedAgentOptions, type ProtocolConfig, type ProtocolRecord, type ResponseDefinition, type RouteDefinition, type ServerEndpointSummary, type ServerProviderConfig, type ServerStartupOptions, StreamObjectEventSchema, type StreamResponse, StreamTextEventSchema, SubAgentResponseSchema, type SuccessResponse, TextRequestSchema, TextResponseSchema, UPDATE_ROUTES, VoltA2AError, WORKFLOW_ROUTES, type WebSocketAdapter, type WebSocketConnectionHandler, type WebSocketConnectionInfo, type WebSocketEventHandlers, type WebSocketMessage, WebSocketRouter, WorkflowCancelRequestSchema, WorkflowCancelResponseSchema, WorkflowExecutionParamsSchema, WorkflowExecutionRequestSchema, WorkflowExecutionResponseSchema, WorkflowListSchema, WorkflowParamsSchema, WorkflowResponseSchema, WorkflowResumeRequestSchema, WorkflowResumeResponseSchema, WorkflowStreamEventSchema, WorkflowSuspendRequestSchema, WorkflowSuspendResponseSchema, buildA2AEndpointPath, buildAgentCardPath, buildMcpRoutePaths, cleanupWebSockets, closeAllObservabilityConnections, colors, createAuthErrorResponse, createAuthMiddlewareFactory, createJWT, createSSEHeaders, createSSEResponse, createSSEStream, createUserContext, createWebSocketRouter, createWebSocketServer, executeA2ARequest, extractBearerToken, extractToken, formatSSE, getAllRoutesArray, getLandingPageHTML, getLogsBySpanIdHandler, getLogsByTraceIdHandler, getObservabilityStatusHandler, getOpenApiDoc, getOrCreateLogger, getPortsToTry, getResponseStatus, getRoutesByTag, getSpanByIdHandler, getTraceByIdHandler, getTracesHandler, handleCancelWorkflow, handleChatStream, handleCheckUpdates, handleExecuteWorkflow, handleGenerateObject, handleGenerateText, handleGetAgent, handleGetAgentHistory, handleGetAgents, handleGetLogs, handleGetMcpPrompt, handleGetMcpResource, handleGetMcpServer, handleGetWorkflow, handleGetWorkflowState, handleGetWorkflows, handleInstallUpdates, handleInvokeMcpServerTool, handleListMcpPrompts, handleListMcpResourceTemplates, handleListMcpResources, handleListMcpServerTools, handleListMcpServers, handleObservabilityConnection, handleResumeWorkflow, handleSetMcpLogLevel, handleStreamObject, handleStreamText, handleStreamWorkflow, handleSuspendWorkflow, handleWebSocketConnection, injectUserIntoBody, isErrorResponse, isJsonRpcRequest, isSuccessResponse, jwtAuth, listA2AServers, listMcpServers, lookupA2AServer, lookupMcpServer, mapHandlerResponse, mapLogResponse, normalizeError, parseJsonRpcRequest, pathMatches, portManager, preferredPorts, printServerStartup, processAgentOptions, processWorkflowOptions, queryLogsHandler, requiresAuth, resolveAgentCard, setupObservabilityHandler, setupObservabilityListeners, setupWebSocketUpgrade, shouldEnableSwaggerUI, transformToSSE, validateBaseCustomEndpoint, validateEndpointMethod, validateEndpointPath };