@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.
- package/bin/mcp-server.js +788 -281
- package/bin/mcp-server.js.map +50 -50
- package/docs/sdks/agents/README.md +2 -2
- package/examples/package-lock.json +1 -1
- package/funcs/toolsDuplicate.js +2 -1
- package/funcs/toolsDuplicate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createagent.d.ts +195 -11
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +189 -13
- package/models/operations/createagent.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.d.ts +2 -0
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +30 -28
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createprompt.d.ts +0 -2
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +0 -4
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +10 -10
- package/models/operations/duplicateagent.d.ts +94 -0
- package/models/operations/duplicateagent.d.ts.map +1 -1
- package/models/operations/duplicateagent.js +95 -3
- package/models/operations/duplicateagent.js.map +1 -1
- package/models/operations/duplicatetool.d.ts +18 -0
- package/models/operations/duplicatetool.d.ts.map +1 -1
- package/models/operations/duplicatetool.js +40 -12
- package/models/operations/duplicatetool.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getagent.d.ts +94 -0
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js +95 -3
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getallprompts.d.ts +0 -2
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +0 -4
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +10 -10
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/getoneprompt.d.ts +0 -2
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +0 -4
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +0 -2
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +0 -4
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/listagents.d.ts +94 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +96 -3
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listpromptversions.d.ts +0 -2
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +0 -4
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +10 -10
- package/models/operations/runagent.d.ts +92 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +97 -7
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +92 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +96 -6
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +188 -0
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +192 -7
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.d.ts +2 -0
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +30 -28
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updateprompt.d.ts +0 -4
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +0 -8
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +10 -10
- package/package.json +1 -1
- package/src/funcs/toolsDuplicate.ts +3 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createagent.ts +403 -17
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +30 -28
- package/src/models/operations/createprompt.ts +0 -6
- package/src/models/operations/createtool.ts +10 -10
- package/src/models/operations/duplicateagent.ts +206 -0
- package/src/models/operations/duplicatetool.ts +70 -10
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getagent.ts +204 -0
- package/src/models/operations/getallprompts.ts +0 -6
- package/src/models/operations/getalltools.ts +10 -10
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/getoneprompt.ts +0 -6
- package/src/models/operations/getpromptversion.ts +0 -6
- package/src/models/operations/listagents.ts +204 -0
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listpromptversions.ts +0 -6
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +10 -10
- package/src/models/operations/runagent.ts +202 -0
- package/src/models/operations/streamrunagent.ts +204 -0
- package/src/models/operations/updateagent.ts +415 -0
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +30 -28
- package/src/models/operations/updateprompt.ts +0 -12
- package/src/models/operations/updatetool.ts +10 -10
|
@@ -1395,6 +1395,64 @@ export type StreamRunAgentToolApprovalRequired = ClosedEnum<
|
|
|
1395
1395
|
typeof StreamRunAgentToolApprovalRequired
|
|
1396
1396
|
>;
|
|
1397
1397
|
|
|
1398
|
+
/**
|
|
1399
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
1400
|
+
*/
|
|
1401
|
+
export const StreamRunAgentExecuteOn = {
|
|
1402
|
+
Input: "input",
|
|
1403
|
+
Output: "output",
|
|
1404
|
+
} as const;
|
|
1405
|
+
/**
|
|
1406
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
1407
|
+
*/
|
|
1408
|
+
export type StreamRunAgentExecuteOn = ClosedEnum<
|
|
1409
|
+
typeof StreamRunAgentExecuteOn
|
|
1410
|
+
>;
|
|
1411
|
+
|
|
1412
|
+
export type StreamRunAgentEvaluators = {
|
|
1413
|
+
/**
|
|
1414
|
+
* Unique key or identifier of the evaluator
|
|
1415
|
+
*/
|
|
1416
|
+
id: string;
|
|
1417
|
+
/**
|
|
1418
|
+
* 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.
|
|
1419
|
+
*/
|
|
1420
|
+
sampleRate?: number | undefined;
|
|
1421
|
+
/**
|
|
1422
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
1423
|
+
*/
|
|
1424
|
+
executeOn: StreamRunAgentExecuteOn;
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
1429
|
+
*/
|
|
1430
|
+
export const StreamRunAgentAgentsExecuteOn = {
|
|
1431
|
+
Input: "input",
|
|
1432
|
+
Output: "output",
|
|
1433
|
+
} as const;
|
|
1434
|
+
/**
|
|
1435
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
1436
|
+
*/
|
|
1437
|
+
export type StreamRunAgentAgentsExecuteOn = ClosedEnum<
|
|
1438
|
+
typeof StreamRunAgentAgentsExecuteOn
|
|
1439
|
+
>;
|
|
1440
|
+
|
|
1441
|
+
export type StreamRunAgentGuardrails = {
|
|
1442
|
+
/**
|
|
1443
|
+
* Unique key or identifier of the evaluator
|
|
1444
|
+
*/
|
|
1445
|
+
id: string;
|
|
1446
|
+
/**
|
|
1447
|
+
* 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.
|
|
1448
|
+
*/
|
|
1449
|
+
sampleRate?: number | undefined;
|
|
1450
|
+
/**
|
|
1451
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
1452
|
+
*/
|
|
1453
|
+
executeOn: StreamRunAgentAgentsExecuteOn;
|
|
1454
|
+
};
|
|
1455
|
+
|
|
1398
1456
|
export type StreamRunAgentSettings = {
|
|
1399
1457
|
/**
|
|
1400
1458
|
* Tools available to the agent
|
|
@@ -1429,6 +1487,14 @@ export type StreamRunAgentSettings = {
|
|
|
1429
1487
|
* Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
|
|
1430
1488
|
*/
|
|
1431
1489
|
maxExecutionTime?: number | undefined;
|
|
1490
|
+
/**
|
|
1491
|
+
* Configuration for an evaluator applied to the agent
|
|
1492
|
+
*/
|
|
1493
|
+
evaluators?: Array<StreamRunAgentEvaluators> | undefined;
|
|
1494
|
+
/**
|
|
1495
|
+
* Configuration for a guardrail applied to the agent
|
|
1496
|
+
*/
|
|
1497
|
+
guardrails?: Array<StreamRunAgentGuardrails> | undefined;
|
|
1432
1498
|
};
|
|
1433
1499
|
|
|
1434
1500
|
export type StreamRunAgentRequestBody = {
|
|
@@ -5825,6 +5891,134 @@ export const StreamRunAgentToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
|
|
|
5825
5891
|
typeof StreamRunAgentToolApprovalRequired
|
|
5826
5892
|
> = StreamRunAgentToolApprovalRequired$inboundSchema;
|
|
5827
5893
|
|
|
5894
|
+
/** @internal */
|
|
5895
|
+
export const StreamRunAgentExecuteOn$inboundSchema: z.ZodNativeEnum<
|
|
5896
|
+
typeof StreamRunAgentExecuteOn
|
|
5897
|
+
> = z.nativeEnum(StreamRunAgentExecuteOn);
|
|
5898
|
+
/** @internal */
|
|
5899
|
+
export const StreamRunAgentExecuteOn$outboundSchema: z.ZodNativeEnum<
|
|
5900
|
+
typeof StreamRunAgentExecuteOn
|
|
5901
|
+
> = StreamRunAgentExecuteOn$inboundSchema;
|
|
5902
|
+
|
|
5903
|
+
/** @internal */
|
|
5904
|
+
export const StreamRunAgentEvaluators$inboundSchema: z.ZodType<
|
|
5905
|
+
StreamRunAgentEvaluators,
|
|
5906
|
+
z.ZodTypeDef,
|
|
5907
|
+
unknown
|
|
5908
|
+
> = z.object({
|
|
5909
|
+
id: z.string(),
|
|
5910
|
+
sample_rate: z.number().default(50),
|
|
5911
|
+
execute_on: StreamRunAgentExecuteOn$inboundSchema,
|
|
5912
|
+
}).transform((v) => {
|
|
5913
|
+
return remap$(v, {
|
|
5914
|
+
"sample_rate": "sampleRate",
|
|
5915
|
+
"execute_on": "executeOn",
|
|
5916
|
+
});
|
|
5917
|
+
});
|
|
5918
|
+
/** @internal */
|
|
5919
|
+
export type StreamRunAgentEvaluators$Outbound = {
|
|
5920
|
+
id: string;
|
|
5921
|
+
sample_rate: number;
|
|
5922
|
+
execute_on: string;
|
|
5923
|
+
};
|
|
5924
|
+
|
|
5925
|
+
/** @internal */
|
|
5926
|
+
export const StreamRunAgentEvaluators$outboundSchema: z.ZodType<
|
|
5927
|
+
StreamRunAgentEvaluators$Outbound,
|
|
5928
|
+
z.ZodTypeDef,
|
|
5929
|
+
StreamRunAgentEvaluators
|
|
5930
|
+
> = z.object({
|
|
5931
|
+
id: z.string(),
|
|
5932
|
+
sampleRate: z.number().default(50),
|
|
5933
|
+
executeOn: StreamRunAgentExecuteOn$outboundSchema,
|
|
5934
|
+
}).transform((v) => {
|
|
5935
|
+
return remap$(v, {
|
|
5936
|
+
sampleRate: "sample_rate",
|
|
5937
|
+
executeOn: "execute_on",
|
|
5938
|
+
});
|
|
5939
|
+
});
|
|
5940
|
+
|
|
5941
|
+
export function streamRunAgentEvaluatorsToJSON(
|
|
5942
|
+
streamRunAgentEvaluators: StreamRunAgentEvaluators,
|
|
5943
|
+
): string {
|
|
5944
|
+
return JSON.stringify(
|
|
5945
|
+
StreamRunAgentEvaluators$outboundSchema.parse(streamRunAgentEvaluators),
|
|
5946
|
+
);
|
|
5947
|
+
}
|
|
5948
|
+
export function streamRunAgentEvaluatorsFromJSON(
|
|
5949
|
+
jsonString: string,
|
|
5950
|
+
): SafeParseResult<StreamRunAgentEvaluators, SDKValidationError> {
|
|
5951
|
+
return safeParse(
|
|
5952
|
+
jsonString,
|
|
5953
|
+
(x) => StreamRunAgentEvaluators$inboundSchema.parse(JSON.parse(x)),
|
|
5954
|
+
`Failed to parse 'StreamRunAgentEvaluators' from JSON`,
|
|
5955
|
+
);
|
|
5956
|
+
}
|
|
5957
|
+
|
|
5958
|
+
/** @internal */
|
|
5959
|
+
export const StreamRunAgentAgentsExecuteOn$inboundSchema: z.ZodNativeEnum<
|
|
5960
|
+
typeof StreamRunAgentAgentsExecuteOn
|
|
5961
|
+
> = z.nativeEnum(StreamRunAgentAgentsExecuteOn);
|
|
5962
|
+
/** @internal */
|
|
5963
|
+
export const StreamRunAgentAgentsExecuteOn$outboundSchema: z.ZodNativeEnum<
|
|
5964
|
+
typeof StreamRunAgentAgentsExecuteOn
|
|
5965
|
+
> = StreamRunAgentAgentsExecuteOn$inboundSchema;
|
|
5966
|
+
|
|
5967
|
+
/** @internal */
|
|
5968
|
+
export const StreamRunAgentGuardrails$inboundSchema: z.ZodType<
|
|
5969
|
+
StreamRunAgentGuardrails,
|
|
5970
|
+
z.ZodTypeDef,
|
|
5971
|
+
unknown
|
|
5972
|
+
> = z.object({
|
|
5973
|
+
id: z.string(),
|
|
5974
|
+
sample_rate: z.number().default(50),
|
|
5975
|
+
execute_on: StreamRunAgentAgentsExecuteOn$inboundSchema,
|
|
5976
|
+
}).transform((v) => {
|
|
5977
|
+
return remap$(v, {
|
|
5978
|
+
"sample_rate": "sampleRate",
|
|
5979
|
+
"execute_on": "executeOn",
|
|
5980
|
+
});
|
|
5981
|
+
});
|
|
5982
|
+
/** @internal */
|
|
5983
|
+
export type StreamRunAgentGuardrails$Outbound = {
|
|
5984
|
+
id: string;
|
|
5985
|
+
sample_rate: number;
|
|
5986
|
+
execute_on: string;
|
|
5987
|
+
};
|
|
5988
|
+
|
|
5989
|
+
/** @internal */
|
|
5990
|
+
export const StreamRunAgentGuardrails$outboundSchema: z.ZodType<
|
|
5991
|
+
StreamRunAgentGuardrails$Outbound,
|
|
5992
|
+
z.ZodTypeDef,
|
|
5993
|
+
StreamRunAgentGuardrails
|
|
5994
|
+
> = z.object({
|
|
5995
|
+
id: z.string(),
|
|
5996
|
+
sampleRate: z.number().default(50),
|
|
5997
|
+
executeOn: StreamRunAgentAgentsExecuteOn$outboundSchema,
|
|
5998
|
+
}).transform((v) => {
|
|
5999
|
+
return remap$(v, {
|
|
6000
|
+
sampleRate: "sample_rate",
|
|
6001
|
+
executeOn: "execute_on",
|
|
6002
|
+
});
|
|
6003
|
+
});
|
|
6004
|
+
|
|
6005
|
+
export function streamRunAgentGuardrailsToJSON(
|
|
6006
|
+
streamRunAgentGuardrails: StreamRunAgentGuardrails,
|
|
6007
|
+
): string {
|
|
6008
|
+
return JSON.stringify(
|
|
6009
|
+
StreamRunAgentGuardrails$outboundSchema.parse(streamRunAgentGuardrails),
|
|
6010
|
+
);
|
|
6011
|
+
}
|
|
6012
|
+
export function streamRunAgentGuardrailsFromJSON(
|
|
6013
|
+
jsonString: string,
|
|
6014
|
+
): SafeParseResult<StreamRunAgentGuardrails, SDKValidationError> {
|
|
6015
|
+
return safeParse(
|
|
6016
|
+
jsonString,
|
|
6017
|
+
(x) => StreamRunAgentGuardrails$inboundSchema.parse(JSON.parse(x)),
|
|
6018
|
+
`Failed to parse 'StreamRunAgentGuardrails' from JSON`,
|
|
6019
|
+
);
|
|
6020
|
+
}
|
|
6021
|
+
|
|
5828
6022
|
/** @internal */
|
|
5829
6023
|
export const StreamRunAgentSettings$inboundSchema: z.ZodType<
|
|
5830
6024
|
StreamRunAgentSettings,
|
|
@@ -5875,6 +6069,10 @@ export const StreamRunAgentSettings$inboundSchema: z.ZodType<
|
|
|
5875
6069
|
.default("none"),
|
|
5876
6070
|
max_iterations: z.number().int().default(15),
|
|
5877
6071
|
max_execution_time: z.number().int().default(300),
|
|
6072
|
+
evaluators: z.array(z.lazy(() => StreamRunAgentEvaluators$inboundSchema))
|
|
6073
|
+
.optional(),
|
|
6074
|
+
guardrails: z.array(z.lazy(() => StreamRunAgentGuardrails$inboundSchema))
|
|
6075
|
+
.optional(),
|
|
5878
6076
|
}).transform((v) => {
|
|
5879
6077
|
return remap$(v, {
|
|
5880
6078
|
"tool_approval_required": "toolApprovalRequired",
|
|
@@ -5905,6 +6103,8 @@ export type StreamRunAgentSettings$Outbound = {
|
|
|
5905
6103
|
tool_approval_required: string;
|
|
5906
6104
|
max_iterations: number;
|
|
5907
6105
|
max_execution_time: number;
|
|
6106
|
+
evaluators?: Array<StreamRunAgentEvaluators$Outbound> | undefined;
|
|
6107
|
+
guardrails?: Array<StreamRunAgentGuardrails$Outbound> | undefined;
|
|
5908
6108
|
};
|
|
5909
6109
|
|
|
5910
6110
|
/** @internal */
|
|
@@ -5957,6 +6157,10 @@ export const StreamRunAgentSettings$outboundSchema: z.ZodType<
|
|
|
5957
6157
|
.default("none"),
|
|
5958
6158
|
maxIterations: z.number().int().default(15),
|
|
5959
6159
|
maxExecutionTime: z.number().int().default(300),
|
|
6160
|
+
evaluators: z.array(z.lazy(() => StreamRunAgentEvaluators$outboundSchema))
|
|
6161
|
+
.optional(),
|
|
6162
|
+
guardrails: z.array(z.lazy(() => StreamRunAgentGuardrails$outboundSchema))
|
|
6163
|
+
.optional(),
|
|
5960
6164
|
}).transform((v) => {
|
|
5961
6165
|
return remap$(v, {
|
|
5962
6166
|
toolApprovalRequired: "tool_approval_required",
|