@orq-ai/node 4.0.0-rc.26 → 4.0.0-rc.29

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 (152) hide show
  1. package/bin/mcp-server.js +788 -281
  2. package/bin/mcp-server.js.map +50 -50
  3. package/docs/sdks/agents/README.md +2 -2
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/toolsDuplicate.js +2 -1
  6. package/funcs/toolsDuplicate.js.map +1 -1
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +3 -3
  9. package/lib/config.js +3 -3
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/models/operations/createagent.d.ts +195 -11
  13. package/models/operations/createagent.d.ts.map +1 -1
  14. package/models/operations/createagent.js +189 -13
  15. package/models/operations/createagent.js.map +1 -1
  16. package/models/operations/createbudget.js +2 -2
  17. package/models/operations/createcontact.js +2 -2
  18. package/models/operations/createdataset.js +2 -2
  19. package/models/operations/createdatasetitem.js +8 -8
  20. package/models/operations/createdatasource.js +2 -2
  21. package/models/operations/createeval.d.ts +2 -0
  22. package/models/operations/createeval.d.ts.map +1 -1
  23. package/models/operations/createeval.js +30 -28
  24. package/models/operations/createeval.js.map +1 -1
  25. package/models/operations/createprompt.d.ts +0 -2
  26. package/models/operations/createprompt.d.ts.map +1 -1
  27. package/models/operations/createprompt.js +0 -4
  28. package/models/operations/createprompt.js.map +1 -1
  29. package/models/operations/createtool.js +10 -10
  30. package/models/operations/duplicateagent.d.ts +94 -0
  31. package/models/operations/duplicateagent.d.ts.map +1 -1
  32. package/models/operations/duplicateagent.js +95 -3
  33. package/models/operations/duplicateagent.js.map +1 -1
  34. package/models/operations/duplicatetool.d.ts +18 -0
  35. package/models/operations/duplicatetool.d.ts.map +1 -1
  36. package/models/operations/duplicatetool.js +40 -12
  37. package/models/operations/duplicatetool.js.map +1 -1
  38. package/models/operations/fileget.js +2 -2
  39. package/models/operations/filelist.js +2 -2
  40. package/models/operations/fileupload.js +2 -2
  41. package/models/operations/getagent.d.ts +94 -0
  42. package/models/operations/getagent.d.ts.map +1 -1
  43. package/models/operations/getagent.js +95 -3
  44. package/models/operations/getagent.js.map +1 -1
  45. package/models/operations/getallprompts.d.ts +0 -2
  46. package/models/operations/getallprompts.d.ts.map +1 -1
  47. package/models/operations/getallprompts.js +0 -4
  48. package/models/operations/getallprompts.js.map +1 -1
  49. package/models/operations/getalltools.js +10 -10
  50. package/models/operations/getbudget.js +2 -2
  51. package/models/operations/getevals.js +28 -28
  52. package/models/operations/getoneprompt.d.ts +0 -2
  53. package/models/operations/getoneprompt.d.ts.map +1 -1
  54. package/models/operations/getoneprompt.js +0 -4
  55. package/models/operations/getoneprompt.js.map +1 -1
  56. package/models/operations/getpromptversion.d.ts +0 -2
  57. package/models/operations/getpromptversion.d.ts.map +1 -1
  58. package/models/operations/getpromptversion.js +0 -4
  59. package/models/operations/getpromptversion.js.map +1 -1
  60. package/models/operations/listagents.d.ts +94 -0
  61. package/models/operations/listagents.d.ts.map +1 -1
  62. package/models/operations/listagents.js +96 -3
  63. package/models/operations/listagents.js.map +1 -1
  64. package/models/operations/listbudgets.js +2 -2
  65. package/models/operations/listcontacts.js +2 -2
  66. package/models/operations/listdatasetdatapoints.js +8 -8
  67. package/models/operations/listdatasets.js +2 -2
  68. package/models/operations/listdatasources.js +2 -2
  69. package/models/operations/listpromptversions.d.ts +0 -2
  70. package/models/operations/listpromptversions.d.ts.map +1 -1
  71. package/models/operations/listpromptversions.js +0 -4
  72. package/models/operations/listpromptversions.js.map +1 -1
  73. package/models/operations/retrievecontact.js +2 -2
  74. package/models/operations/retrievedatapoint.js +8 -8
  75. package/models/operations/retrievedataset.js +2 -2
  76. package/models/operations/retrievedatasource.js +2 -2
  77. package/models/operations/retrievetool.js +10 -10
  78. package/models/operations/runagent.d.ts +92 -0
  79. package/models/operations/runagent.d.ts.map +1 -1
  80. package/models/operations/runagent.js +97 -7
  81. package/models/operations/runagent.js.map +1 -1
  82. package/models/operations/streamrunagent.d.ts +92 -0
  83. package/models/operations/streamrunagent.d.ts.map +1 -1
  84. package/models/operations/streamrunagent.js +96 -6
  85. package/models/operations/streamrunagent.js.map +1 -1
  86. package/models/operations/updateagent.d.ts +188 -0
  87. package/models/operations/updateagent.d.ts.map +1 -1
  88. package/models/operations/updateagent.js +192 -7
  89. package/models/operations/updateagent.js.map +1 -1
  90. package/models/operations/updatebudget.js +2 -2
  91. package/models/operations/updatecontact.js +2 -2
  92. package/models/operations/updatedatapoint.js +8 -8
  93. package/models/operations/updatedataset.js +2 -2
  94. package/models/operations/updatedatasource.js +2 -2
  95. package/models/operations/updateeval.d.ts +2 -0
  96. package/models/operations/updateeval.d.ts.map +1 -1
  97. package/models/operations/updateeval.js +30 -28
  98. package/models/operations/updateeval.js.map +1 -1
  99. package/models/operations/updateprompt.d.ts +0 -4
  100. package/models/operations/updateprompt.d.ts.map +1 -1
  101. package/models/operations/updateprompt.js +0 -8
  102. package/models/operations/updateprompt.js.map +1 -1
  103. package/models/operations/updatetool.js +10 -10
  104. package/package.json +1 -1
  105. package/src/funcs/toolsDuplicate.ts +3 -2
  106. package/src/lib/config.ts +3 -3
  107. package/src/mcp-server/mcp-server.ts +1 -1
  108. package/src/mcp-server/server.ts +1 -1
  109. package/src/models/operations/createagent.ts +403 -17
  110. package/src/models/operations/createbudget.ts +2 -2
  111. package/src/models/operations/createcontact.ts +2 -2
  112. package/src/models/operations/createdataset.ts +2 -2
  113. package/src/models/operations/createdatasetitem.ts +8 -8
  114. package/src/models/operations/createdatasource.ts +2 -2
  115. package/src/models/operations/createeval.ts +30 -28
  116. package/src/models/operations/createprompt.ts +0 -6
  117. package/src/models/operations/createtool.ts +10 -10
  118. package/src/models/operations/duplicateagent.ts +206 -0
  119. package/src/models/operations/duplicatetool.ts +70 -10
  120. package/src/models/operations/fileget.ts +2 -2
  121. package/src/models/operations/filelist.ts +2 -2
  122. package/src/models/operations/fileupload.ts +2 -2
  123. package/src/models/operations/getagent.ts +204 -0
  124. package/src/models/operations/getallprompts.ts +0 -6
  125. package/src/models/operations/getalltools.ts +10 -10
  126. package/src/models/operations/getbudget.ts +2 -2
  127. package/src/models/operations/getevals.ts +28 -28
  128. package/src/models/operations/getoneprompt.ts +0 -6
  129. package/src/models/operations/getpromptversion.ts +0 -6
  130. package/src/models/operations/listagents.ts +204 -0
  131. package/src/models/operations/listbudgets.ts +2 -2
  132. package/src/models/operations/listcontacts.ts +2 -2
  133. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  134. package/src/models/operations/listdatasets.ts +2 -2
  135. package/src/models/operations/listdatasources.ts +2 -2
  136. package/src/models/operations/listpromptversions.ts +0 -6
  137. package/src/models/operations/retrievecontact.ts +2 -2
  138. package/src/models/operations/retrievedatapoint.ts +8 -8
  139. package/src/models/operations/retrievedataset.ts +2 -2
  140. package/src/models/operations/retrievedatasource.ts +2 -2
  141. package/src/models/operations/retrievetool.ts +10 -10
  142. package/src/models/operations/runagent.ts +202 -0
  143. package/src/models/operations/streamrunagent.ts +204 -0
  144. package/src/models/operations/updateagent.ts +415 -0
  145. package/src/models/operations/updatebudget.ts +2 -2
  146. package/src/models/operations/updatecontact.ts +2 -2
  147. package/src/models/operations/updatedatapoint.ts +8 -8
  148. package/src/models/operations/updatedataset.ts +2 -2
  149. package/src/models/operations/updatedatasource.ts +2 -2
  150. package/src/models/operations/updateeval.ts +30 -28
  151. package/src/models/operations/updateprompt.ts +0 -12
  152. package/src/models/operations/updatetool.ts +10 -10
@@ -1007,6 +1007,60 @@ export type AgentToolInputCRUD =
1007
1007
  | CodeExecutionTool
1008
1008
  | FunctionTool;
1009
1009
 
1010
+ /**
1011
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1012
+ */
1013
+ export const ExecuteOn = {
1014
+ Input: "input",
1015
+ Output: "output",
1016
+ } as const;
1017
+ /**
1018
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1019
+ */
1020
+ export type ExecuteOn = ClosedEnum<typeof ExecuteOn>;
1021
+
1022
+ export type Evaluators = {
1023
+ /**
1024
+ * Unique key or identifier of the evaluator
1025
+ */
1026
+ id: string;
1027
+ /**
1028
+ * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
1029
+ */
1030
+ sampleRate?: number | undefined;
1031
+ /**
1032
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1033
+ */
1034
+ executeOn: ExecuteOn;
1035
+ };
1036
+
1037
+ /**
1038
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1039
+ */
1040
+ export const CreateAgentExecuteOn = {
1041
+ Input: "input",
1042
+ Output: "output",
1043
+ } as const;
1044
+ /**
1045
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1046
+ */
1047
+ export type CreateAgentExecuteOn = ClosedEnum<typeof CreateAgentExecuteOn>;
1048
+
1049
+ export type Guardrails = {
1050
+ /**
1051
+ * Unique key or identifier of the evaluator
1052
+ */
1053
+ id: string;
1054
+ /**
1055
+ * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
1056
+ */
1057
+ sampleRate?: number | undefined;
1058
+ /**
1059
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1060
+ */
1061
+ executeOn: CreateAgentExecuteOn;
1062
+ };
1063
+
1010
1064
  /**
1011
1065
  * Configuration settings for the agent's behavior
1012
1066
  */
@@ -1044,6 +1098,14 @@ export type Settings = {
1044
1098
  | FunctionTool
1045
1099
  >
1046
1100
  | undefined;
1101
+ /**
1102
+ * Configuration for an evaluator applied to the agent
1103
+ */
1104
+ evaluators?: Array<Evaluators> | undefined;
1105
+ /**
1106
+ * Configuration for a guardrail applied to the agent
1107
+ */
1108
+ guardrails?: Array<Guardrails> | undefined;
1047
1109
  };
1048
1110
 
1049
1111
  export type KnowledgeBases = {
@@ -1065,14 +1127,6 @@ export type TeamOfAgents = {
1065
1127
  };
1066
1128
 
1067
1129
  export type CreateAgentRequestBody = {
1068
- /**
1069
- * The path where the agent will be stored in the project structure. The first element identifies the project, followed by nested folders (auto-created as needed).
1070
- *
1071
- * @remarks
1072
- *
1073
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1074
- */
1075
- path: string;
1076
1130
  /**
1077
1131
  * Unique identifier for the agent within the workspace
1078
1132
  */
@@ -1093,6 +1147,14 @@ export type CreateAgentRequestBody = {
1093
1147
  * A custom system prompt template for the agent. If omitted, the default template is used.
1094
1148
  */
1095
1149
  systemPrompt?: string | undefined;
1150
+ /**
1151
+ * The path where the agent will be stored in the project structure. The first element identifies the project, followed by nested folders (auto-created as needed).
1152
+ *
1153
+ * @remarks
1154
+ *
1155
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1156
+ */
1157
+ path: string;
1096
1158
  /**
1097
1159
  * Model configuration for agent execution. Can be a simple model ID string or a configuration object with optional behavior parameters.
1098
1160
  */
@@ -1187,6 +1249,64 @@ export type CreateAgentTools = {
1187
1249
  timeout?: number | undefined;
1188
1250
  };
1189
1251
 
1252
+ /**
1253
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1254
+ */
1255
+ export const CreateAgentAgentsExecuteOn = {
1256
+ Input: "input",
1257
+ Output: "output",
1258
+ } as const;
1259
+ /**
1260
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1261
+ */
1262
+ export type CreateAgentAgentsExecuteOn = ClosedEnum<
1263
+ typeof CreateAgentAgentsExecuteOn
1264
+ >;
1265
+
1266
+ export type CreateAgentEvaluators = {
1267
+ /**
1268
+ * Unique key or identifier of the evaluator
1269
+ */
1270
+ id: string;
1271
+ /**
1272
+ * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
1273
+ */
1274
+ sampleRate?: number | undefined;
1275
+ /**
1276
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1277
+ */
1278
+ executeOn: CreateAgentAgentsExecuteOn;
1279
+ };
1280
+
1281
+ /**
1282
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1283
+ */
1284
+ export const CreateAgentAgentsResponseExecuteOn = {
1285
+ Input: "input",
1286
+ Output: "output",
1287
+ } as const;
1288
+ /**
1289
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1290
+ */
1291
+ export type CreateAgentAgentsResponseExecuteOn = ClosedEnum<
1292
+ typeof CreateAgentAgentsResponseExecuteOn
1293
+ >;
1294
+
1295
+ export type CreateAgentGuardrails = {
1296
+ /**
1297
+ * Unique key or identifier of the evaluator
1298
+ */
1299
+ id: string;
1300
+ /**
1301
+ * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
1302
+ */
1303
+ sampleRate?: number | undefined;
1304
+ /**
1305
+ * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
1306
+ */
1307
+ executeOn: CreateAgentAgentsResponseExecuteOn;
1308
+ };
1309
+
1190
1310
  export type CreateAgentSettings = {
1191
1311
  /**
1192
1312
  * Maximum iterations(llm calls) before the agent will stop executing.
@@ -1201,6 +1321,14 @@ export type CreateAgentSettings = {
1201
1321
  */
1202
1322
  toolApprovalRequired?: CreateAgentToolApprovalRequired | undefined;
1203
1323
  tools?: Array<CreateAgentTools> | undefined;
1324
+ /**
1325
+ * Configuration for an evaluator applied to the agent
1326
+ */
1327
+ evaluators?: Array<CreateAgentEvaluators> | undefined;
1328
+ /**
1329
+ * Configuration for a guardrail applied to the agent
1330
+ */
1331
+ guardrails?: Array<CreateAgentGuardrails> | undefined;
1204
1332
  };
1205
1333
 
1206
1334
  /**
@@ -1915,6 +2043,8 @@ export const CreateAgentCollapsedConfigurationSections = {
1915
2043
  Tools: "tools",
1916
2044
  Context: "context",
1917
2045
  RuntimeConstraints: "runtime_constraints",
2046
+ Evaluators: "evaluators",
2047
+ Guardrails: "guardrails",
1918
2048
  } as const;
1919
2049
  export type CreateAgentCollapsedConfigurationSections = ClosedEnum<
1920
2050
  typeof CreateAgentCollapsedConfigurationSections
@@ -1926,7 +2056,6 @@ export type CreateAgentCollapsedConfigurationSections = ClosedEnum<
1926
2056
  export type CreateAgentResponseBody = {
1927
2057
  id: string;
1928
2058
  key: string;
1929
- workspaceId: string;
1930
2059
  projectId: string;
1931
2060
  createdById?: string | null | undefined;
1932
2061
  updatedById?: string | null | undefined;
@@ -4627,6 +4756,124 @@ export function agentToolInputCRUDFromJSON(
4627
4756
  );
4628
4757
  }
4629
4758
 
4759
+ /** @internal */
4760
+ export const ExecuteOn$inboundSchema: z.ZodNativeEnum<typeof ExecuteOn> = z
4761
+ .nativeEnum(ExecuteOn);
4762
+ /** @internal */
4763
+ export const ExecuteOn$outboundSchema: z.ZodNativeEnum<typeof ExecuteOn> =
4764
+ ExecuteOn$inboundSchema;
4765
+
4766
+ /** @internal */
4767
+ export const Evaluators$inboundSchema: z.ZodType<
4768
+ Evaluators,
4769
+ z.ZodTypeDef,
4770
+ unknown
4771
+ > = z.object({
4772
+ id: z.string(),
4773
+ sample_rate: z.number().default(50),
4774
+ execute_on: ExecuteOn$inboundSchema,
4775
+ }).transform((v) => {
4776
+ return remap$(v, {
4777
+ "sample_rate": "sampleRate",
4778
+ "execute_on": "executeOn",
4779
+ });
4780
+ });
4781
+ /** @internal */
4782
+ export type Evaluators$Outbound = {
4783
+ id: string;
4784
+ sample_rate: number;
4785
+ execute_on: string;
4786
+ };
4787
+
4788
+ /** @internal */
4789
+ export const Evaluators$outboundSchema: z.ZodType<
4790
+ Evaluators$Outbound,
4791
+ z.ZodTypeDef,
4792
+ Evaluators
4793
+ > = z.object({
4794
+ id: z.string(),
4795
+ sampleRate: z.number().default(50),
4796
+ executeOn: ExecuteOn$outboundSchema,
4797
+ }).transform((v) => {
4798
+ return remap$(v, {
4799
+ sampleRate: "sample_rate",
4800
+ executeOn: "execute_on",
4801
+ });
4802
+ });
4803
+
4804
+ export function evaluatorsToJSON(evaluators: Evaluators): string {
4805
+ return JSON.stringify(Evaluators$outboundSchema.parse(evaluators));
4806
+ }
4807
+ export function evaluatorsFromJSON(
4808
+ jsonString: string,
4809
+ ): SafeParseResult<Evaluators, SDKValidationError> {
4810
+ return safeParse(
4811
+ jsonString,
4812
+ (x) => Evaluators$inboundSchema.parse(JSON.parse(x)),
4813
+ `Failed to parse 'Evaluators' from JSON`,
4814
+ );
4815
+ }
4816
+
4817
+ /** @internal */
4818
+ export const CreateAgentExecuteOn$inboundSchema: z.ZodNativeEnum<
4819
+ typeof CreateAgentExecuteOn
4820
+ > = z.nativeEnum(CreateAgentExecuteOn);
4821
+ /** @internal */
4822
+ export const CreateAgentExecuteOn$outboundSchema: z.ZodNativeEnum<
4823
+ typeof CreateAgentExecuteOn
4824
+ > = CreateAgentExecuteOn$inboundSchema;
4825
+
4826
+ /** @internal */
4827
+ export const Guardrails$inboundSchema: z.ZodType<
4828
+ Guardrails,
4829
+ z.ZodTypeDef,
4830
+ unknown
4831
+ > = z.object({
4832
+ id: z.string(),
4833
+ sample_rate: z.number().default(50),
4834
+ execute_on: CreateAgentExecuteOn$inboundSchema,
4835
+ }).transform((v) => {
4836
+ return remap$(v, {
4837
+ "sample_rate": "sampleRate",
4838
+ "execute_on": "executeOn",
4839
+ });
4840
+ });
4841
+ /** @internal */
4842
+ export type Guardrails$Outbound = {
4843
+ id: string;
4844
+ sample_rate: number;
4845
+ execute_on: string;
4846
+ };
4847
+
4848
+ /** @internal */
4849
+ export const Guardrails$outboundSchema: z.ZodType<
4850
+ Guardrails$Outbound,
4851
+ z.ZodTypeDef,
4852
+ Guardrails
4853
+ > = z.object({
4854
+ id: z.string(),
4855
+ sampleRate: z.number().default(50),
4856
+ executeOn: CreateAgentExecuteOn$outboundSchema,
4857
+ }).transform((v) => {
4858
+ return remap$(v, {
4859
+ sampleRate: "sample_rate",
4860
+ executeOn: "execute_on",
4861
+ });
4862
+ });
4863
+
4864
+ export function guardrailsToJSON(guardrails: Guardrails): string {
4865
+ return JSON.stringify(Guardrails$outboundSchema.parse(guardrails));
4866
+ }
4867
+ export function guardrailsFromJSON(
4868
+ jsonString: string,
4869
+ ): SafeParseResult<Guardrails, SDKValidationError> {
4870
+ return safeParse(
4871
+ jsonString,
4872
+ (x) => Guardrails$inboundSchema.parse(JSON.parse(x)),
4873
+ `Failed to parse 'Guardrails' from JSON`,
4874
+ );
4875
+ }
4876
+
4630
4877
  /** @internal */
4631
4878
  export const Settings$inboundSchema: z.ZodType<
4632
4879
  Settings,
@@ -4656,6 +4903,8 @@ export const Settings$inboundSchema: z.ZodType<
4656
4903
  z.lazy(() => FunctionTool$inboundSchema),
4657
4904
  ]),
4658
4905
  ).optional(),
4906
+ evaluators: z.array(z.lazy(() => Evaluators$inboundSchema)).optional(),
4907
+ guardrails: z.array(z.lazy(() => Guardrails$inboundSchema)).optional(),
4659
4908
  }).transform((v) => {
4660
4909
  return remap$(v, {
4661
4910
  "max_iterations": "maxIterations",
@@ -4686,6 +4935,8 @@ export type Settings$Outbound = {
4686
4935
  | FunctionTool$Outbound
4687
4936
  >
4688
4937
  | undefined;
4938
+ evaluators?: Array<Evaluators$Outbound> | undefined;
4939
+ guardrails?: Array<Guardrails$Outbound> | undefined;
4689
4940
  };
4690
4941
 
4691
4942
  /** @internal */
@@ -4717,6 +4968,8 @@ export const Settings$outboundSchema: z.ZodType<
4717
4968
  z.lazy(() => FunctionTool$outboundSchema),
4718
4969
  ]),
4719
4970
  ).optional(),
4971
+ evaluators: z.array(z.lazy(() => Evaluators$outboundSchema)).optional(),
4972
+ guardrails: z.array(z.lazy(() => Guardrails$outboundSchema)).optional(),
4720
4973
  }).transform((v) => {
4721
4974
  return remap$(v, {
4722
4975
  maxIterations: "max_iterations",
@@ -4825,12 +5078,12 @@ export const CreateAgentRequestBody$inboundSchema: z.ZodType<
4825
5078
  z.ZodTypeDef,
4826
5079
  unknown
4827
5080
  > = z.object({
4828
- path: z.string(),
4829
5081
  key: z.string(),
4830
5082
  role: z.string(),
4831
5083
  description: z.string(),
4832
5084
  instructions: z.string(),
4833
5085
  system_prompt: z.string().optional(),
5086
+ path: z.string(),
4834
5087
  model: z.union([z.lazy(() => ModelConfiguration2$inboundSchema), z.string()]),
4835
5088
  fallback_models: z.array(
4836
5089
  z.union([
@@ -4855,12 +5108,12 @@ export const CreateAgentRequestBody$inboundSchema: z.ZodType<
4855
5108
  });
4856
5109
  /** @internal */
4857
5110
  export type CreateAgentRequestBody$Outbound = {
4858
- path: string;
4859
5111
  key: string;
4860
5112
  role: string;
4861
5113
  description: string;
4862
5114
  instructions: string;
4863
5115
  system_prompt?: string | undefined;
5116
+ path: string;
4864
5117
  model: ModelConfiguration2$Outbound | string;
4865
5118
  fallback_models?:
4866
5119
  | Array<FallbackModelConfiguration2$Outbound | string>
@@ -4878,12 +5131,12 @@ export const CreateAgentRequestBody$outboundSchema: z.ZodType<
4878
5131
  z.ZodTypeDef,
4879
5132
  CreateAgentRequestBody
4880
5133
  > = z.object({
4881
- path: z.string(),
4882
5134
  key: z.string(),
4883
5135
  role: z.string(),
4884
5136
  description: z.string(),
4885
5137
  instructions: z.string(),
4886
5138
  systemPrompt: z.string().optional(),
5139
+ path: z.string(),
4887
5140
  model: z.union([
4888
5141
  z.lazy(() => ModelConfiguration2$outboundSchema),
4889
5142
  z.string(),
@@ -5058,6 +5311,134 @@ export function createAgentToolsFromJSON(
5058
5311
  );
5059
5312
  }
5060
5313
 
5314
+ /** @internal */
5315
+ export const CreateAgentAgentsExecuteOn$inboundSchema: z.ZodNativeEnum<
5316
+ typeof CreateAgentAgentsExecuteOn
5317
+ > = z.nativeEnum(CreateAgentAgentsExecuteOn);
5318
+ /** @internal */
5319
+ export const CreateAgentAgentsExecuteOn$outboundSchema: z.ZodNativeEnum<
5320
+ typeof CreateAgentAgentsExecuteOn
5321
+ > = CreateAgentAgentsExecuteOn$inboundSchema;
5322
+
5323
+ /** @internal */
5324
+ export const CreateAgentEvaluators$inboundSchema: z.ZodType<
5325
+ CreateAgentEvaluators,
5326
+ z.ZodTypeDef,
5327
+ unknown
5328
+ > = z.object({
5329
+ id: z.string(),
5330
+ sample_rate: z.number().default(50),
5331
+ execute_on: CreateAgentAgentsExecuteOn$inboundSchema,
5332
+ }).transform((v) => {
5333
+ return remap$(v, {
5334
+ "sample_rate": "sampleRate",
5335
+ "execute_on": "executeOn",
5336
+ });
5337
+ });
5338
+ /** @internal */
5339
+ export type CreateAgentEvaluators$Outbound = {
5340
+ id: string;
5341
+ sample_rate: number;
5342
+ execute_on: string;
5343
+ };
5344
+
5345
+ /** @internal */
5346
+ export const CreateAgentEvaluators$outboundSchema: z.ZodType<
5347
+ CreateAgentEvaluators$Outbound,
5348
+ z.ZodTypeDef,
5349
+ CreateAgentEvaluators
5350
+ > = z.object({
5351
+ id: z.string(),
5352
+ sampleRate: z.number().default(50),
5353
+ executeOn: CreateAgentAgentsExecuteOn$outboundSchema,
5354
+ }).transform((v) => {
5355
+ return remap$(v, {
5356
+ sampleRate: "sample_rate",
5357
+ executeOn: "execute_on",
5358
+ });
5359
+ });
5360
+
5361
+ export function createAgentEvaluatorsToJSON(
5362
+ createAgentEvaluators: CreateAgentEvaluators,
5363
+ ): string {
5364
+ return JSON.stringify(
5365
+ CreateAgentEvaluators$outboundSchema.parse(createAgentEvaluators),
5366
+ );
5367
+ }
5368
+ export function createAgentEvaluatorsFromJSON(
5369
+ jsonString: string,
5370
+ ): SafeParseResult<CreateAgentEvaluators, SDKValidationError> {
5371
+ return safeParse(
5372
+ jsonString,
5373
+ (x) => CreateAgentEvaluators$inboundSchema.parse(JSON.parse(x)),
5374
+ `Failed to parse 'CreateAgentEvaluators' from JSON`,
5375
+ );
5376
+ }
5377
+
5378
+ /** @internal */
5379
+ export const CreateAgentAgentsResponseExecuteOn$inboundSchema: z.ZodNativeEnum<
5380
+ typeof CreateAgentAgentsResponseExecuteOn
5381
+ > = z.nativeEnum(CreateAgentAgentsResponseExecuteOn);
5382
+ /** @internal */
5383
+ export const CreateAgentAgentsResponseExecuteOn$outboundSchema: z.ZodNativeEnum<
5384
+ typeof CreateAgentAgentsResponseExecuteOn
5385
+ > = CreateAgentAgentsResponseExecuteOn$inboundSchema;
5386
+
5387
+ /** @internal */
5388
+ export const CreateAgentGuardrails$inboundSchema: z.ZodType<
5389
+ CreateAgentGuardrails,
5390
+ z.ZodTypeDef,
5391
+ unknown
5392
+ > = z.object({
5393
+ id: z.string(),
5394
+ sample_rate: z.number().default(50),
5395
+ execute_on: CreateAgentAgentsResponseExecuteOn$inboundSchema,
5396
+ }).transform((v) => {
5397
+ return remap$(v, {
5398
+ "sample_rate": "sampleRate",
5399
+ "execute_on": "executeOn",
5400
+ });
5401
+ });
5402
+ /** @internal */
5403
+ export type CreateAgentGuardrails$Outbound = {
5404
+ id: string;
5405
+ sample_rate: number;
5406
+ execute_on: string;
5407
+ };
5408
+
5409
+ /** @internal */
5410
+ export const CreateAgentGuardrails$outboundSchema: z.ZodType<
5411
+ CreateAgentGuardrails$Outbound,
5412
+ z.ZodTypeDef,
5413
+ CreateAgentGuardrails
5414
+ > = z.object({
5415
+ id: z.string(),
5416
+ sampleRate: z.number().default(50),
5417
+ executeOn: CreateAgentAgentsResponseExecuteOn$outboundSchema,
5418
+ }).transform((v) => {
5419
+ return remap$(v, {
5420
+ sampleRate: "sample_rate",
5421
+ executeOn: "execute_on",
5422
+ });
5423
+ });
5424
+
5425
+ export function createAgentGuardrailsToJSON(
5426
+ createAgentGuardrails: CreateAgentGuardrails,
5427
+ ): string {
5428
+ return JSON.stringify(
5429
+ CreateAgentGuardrails$outboundSchema.parse(createAgentGuardrails),
5430
+ );
5431
+ }
5432
+ export function createAgentGuardrailsFromJSON(
5433
+ jsonString: string,
5434
+ ): SafeParseResult<CreateAgentGuardrails, SDKValidationError> {
5435
+ return safeParse(
5436
+ jsonString,
5437
+ (x) => CreateAgentGuardrails$inboundSchema.parse(JSON.parse(x)),
5438
+ `Failed to parse 'CreateAgentGuardrails' from JSON`,
5439
+ );
5440
+ }
5441
+
5061
5442
  /** @internal */
5062
5443
  export const CreateAgentSettings$inboundSchema: z.ZodType<
5063
5444
  CreateAgentSettings,
@@ -5070,6 +5451,10 @@ export const CreateAgentSettings$inboundSchema: z.ZodType<
5070
5451
  "respect_tool",
5071
5452
  ),
5072
5453
  tools: z.array(z.lazy(() => CreateAgentTools$inboundSchema)).optional(),
5454
+ evaluators: z.array(z.lazy(() => CreateAgentEvaluators$inboundSchema))
5455
+ .optional(),
5456
+ guardrails: z.array(z.lazy(() => CreateAgentGuardrails$inboundSchema))
5457
+ .optional(),
5073
5458
  }).transform((v) => {
5074
5459
  return remap$(v, {
5075
5460
  "max_iterations": "maxIterations",
@@ -5083,6 +5468,8 @@ export type CreateAgentSettings$Outbound = {
5083
5468
  max_execution_time: number;
5084
5469
  tool_approval_required: string;
5085
5470
  tools?: Array<CreateAgentTools$Outbound> | undefined;
5471
+ evaluators?: Array<CreateAgentEvaluators$Outbound> | undefined;
5472
+ guardrails?: Array<CreateAgentGuardrails$Outbound> | undefined;
5086
5473
  };
5087
5474
 
5088
5475
  /** @internal */
@@ -5097,6 +5484,10 @@ export const CreateAgentSettings$outboundSchema: z.ZodType<
5097
5484
  "respect_tool",
5098
5485
  ),
5099
5486
  tools: z.array(z.lazy(() => CreateAgentTools$outboundSchema)).optional(),
5487
+ evaluators: z.array(z.lazy(() => CreateAgentEvaluators$outboundSchema))
5488
+ .optional(),
5489
+ guardrails: z.array(z.lazy(() => CreateAgentGuardrails$outboundSchema))
5490
+ .optional(),
5100
5491
  }).transform((v) => {
5101
5492
  return remap$(v, {
5102
5493
  maxIterations: "max_iterations",
@@ -7168,7 +7559,6 @@ export const CreateAgentResponseBody$inboundSchema: z.ZodType<
7168
7559
  > = z.object({
7169
7560
  _id: z.string(),
7170
7561
  key: z.string(),
7171
- workspace_id: z.string(),
7172
7562
  project_id: z.string(),
7173
7563
  created_by_id: z.nullable(z.string()).optional(),
7174
7564
  updated_by_id: z.nullable(z.string()).optional(),
@@ -7196,7 +7586,6 @@ export const CreateAgentResponseBody$inboundSchema: z.ZodType<
7196
7586
  }).transform((v) => {
7197
7587
  return remap$(v, {
7198
7588
  "_id": "id",
7199
- "workspace_id": "workspaceId",
7200
7589
  "project_id": "projectId",
7201
7590
  "created_by_id": "createdById",
7202
7591
  "updated_by_id": "updatedById",
@@ -7212,7 +7601,6 @@ export const CreateAgentResponseBody$inboundSchema: z.ZodType<
7212
7601
  export type CreateAgentResponseBody$Outbound = {
7213
7602
  _id: string;
7214
7603
  key: string;
7215
- workspace_id: string;
7216
7604
  project_id: string;
7217
7605
  created_by_id?: string | null | undefined;
7218
7606
  updated_by_id?: string | null | undefined;
@@ -7243,7 +7631,6 @@ export const CreateAgentResponseBody$outboundSchema: z.ZodType<
7243
7631
  > = z.object({
7244
7632
  id: z.string(),
7245
7633
  key: z.string(),
7246
- workspaceId: z.string(),
7247
7634
  projectId: z.string(),
7248
7635
  createdById: z.nullable(z.string()).optional(),
7249
7636
  updatedById: z.nullable(z.string()).optional(),
@@ -7271,7 +7658,6 @@ export const CreateAgentResponseBody$outboundSchema: z.ZodType<
7271
7658
  }).transform((v) => {
7272
7659
  return remap$(v, {
7273
7660
  id: "_id",
7274
- workspaceId: "workspace_id",
7275
7661
  projectId: "project_id",
7276
7662
  createdById: "created_by_id",
7277
7663
  updatedById: "updated_by_id",
@@ -516,7 +516,7 @@ export const CreateBudgetResponseBody$inboundSchema: z.ZodType<
516
516
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
517
517
  .optional(),
518
518
  updated: z.string().datetime({ offset: true }).default(
519
- "2025-11-12T13:41:48.371Z",
519
+ "2025-11-13T09:21:06.136Z",
520
520
  ).transform(v => new Date(v)),
521
521
  }).transform((v) => {
522
522
  return remap$(v, {
@@ -553,7 +553,7 @@ export const CreateBudgetResponseBody$outboundSchema: z.ZodType<
553
553
  isActive: z.boolean(),
554
554
  consumption: z.lazy(() => Consumption$outboundSchema).optional(),
555
555
  created: z.date().transform(v => v.toISOString()).optional(),
556
- updated: z.date().default(() => new Date("2025-11-12T13:41:48.371Z"))
556
+ updated: z.date().default(() => new Date("2025-11-13T09:21:06.136Z"))
557
557
  .transform(v => v.toISOString()),
558
558
  }).transform((v) => {
559
559
  return remap$(v, {
@@ -167,7 +167,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
167
167
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
168
168
  .optional(),
169
169
  updated: z.string().datetime({ offset: true }).default(
170
- "2025-11-12T13:41:47.985Z",
170
+ "2025-11-13T09:21:05.843Z",
171
171
  ).transform(v => new Date(v)),
172
172
  }).transform((v) => {
173
173
  return remap$(v, {
@@ -207,7 +207,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
207
207
  tags: z.array(z.string()).optional(),
208
208
  metadata: z.record(z.any()).optional(),
209
209
  created: z.date().transform(v => v.toISOString()).optional(),
210
- updated: z.date().default(() => new Date("2025-11-12T13:41:47.985Z"))
210
+ updated: z.date().default(() => new Date("2025-11-13T09:21:05.843Z"))
211
211
  .transform(v => v.toISOString()),
212
212
  }).transform((v) => {
213
213
  return remap$(v, {
@@ -187,7 +187,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
187
187
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
188
188
  .optional(),
189
189
  updated: z.string().datetime({ offset: true }).default(
190
- "2025-11-12T13:41:47.985Z",
190
+ "2025-11-13T09:21:05.843Z",
191
191
  ).transform(v => new Date(v)),
192
192
  }).transform((v) => {
193
193
  return remap$(v, {
@@ -226,7 +226,7 @@ export const CreateDatasetResponseBody$outboundSchema: z.ZodType<
226
226
  createdById: z.string().optional(),
227
227
  updatedById: z.string().optional(),
228
228
  created: z.date().transform(v => v.toISOString()).optional(),
229
- updated: z.date().default(() => new Date("2025-11-12T13:41:47.985Z"))
229
+ updated: z.date().default(() => new Date("2025-11-13T09:21:05.843Z"))
230
230
  .transform(v => v.toISOString()),
231
231
  }).transform((v) => {
232
232
  return remap$(v, {