@salesforce/plugin-agent 1.32.1 → 1.32.2
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/README.md +19 -19
- package/oclif.manifest.json +425 -425
- package/package.json +5 -5
package/oclif.manifest.json
CHANGED
|
@@ -888,14 +888,14 @@
|
|
|
888
888
|
"authoring-bundle:publish:agent"
|
|
889
889
|
]
|
|
890
890
|
},
|
|
891
|
-
"agent:
|
|
891
|
+
"agent:preview:end": {
|
|
892
892
|
"aliases": [],
|
|
893
893
|
"args": {},
|
|
894
|
-
"description": "
|
|
894
|
+
"description": "You must have previously started a programmatic agent preview session with the \"agent preview start\" command to then use this command to end it. This command also displays the local directory where the session trace files are stored. \n\nThe original \"agent preview start\" command outputs a session ID which you then use with the --session-id flag of this command to end the session. You don't have to specify the --session-id flag if an agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respecitvely. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory.",
|
|
895
895
|
"examples": [
|
|
896
|
-
"
|
|
897
|
-
"
|
|
898
|
-
"
|
|
896
|
+
"End a preview session of a published agent by specifying its session ID and API name ; use the default org:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --api-name My_Published_Agent",
|
|
897
|
+
"Similar to previous example, but don't specify a session ID; you get an error if the published agent has more than one active session. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent --target-org my-dev-org",
|
|
898
|
+
"End a preview session of an agent using its authoring bundle API name; you get an error if the agent has more than one active session.\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Local_Agent"
|
|
899
899
|
],
|
|
900
900
|
"flags": {
|
|
901
901
|
"json": {
|
|
@@ -913,20 +913,6 @@
|
|
|
913
913
|
"multiple": false,
|
|
914
914
|
"type": "option"
|
|
915
915
|
},
|
|
916
|
-
"api-name": {
|
|
917
|
-
"name": "api-name",
|
|
918
|
-
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
919
|
-
"hasDynamicHelp": false,
|
|
920
|
-
"multiple": false,
|
|
921
|
-
"type": "option"
|
|
922
|
-
},
|
|
923
|
-
"spec": {
|
|
924
|
-
"name": "spec",
|
|
925
|
-
"summary": "Path to the test spec YAML file.",
|
|
926
|
-
"hasDynamicHelp": false,
|
|
927
|
-
"multiple": false,
|
|
928
|
-
"type": "option"
|
|
929
|
-
},
|
|
930
916
|
"target-org": {
|
|
931
917
|
"char": "o",
|
|
932
918
|
"name": "target-org",
|
|
@@ -944,53 +930,67 @@
|
|
|
944
930
|
"multiple": false,
|
|
945
931
|
"type": "option"
|
|
946
932
|
},
|
|
947
|
-
"
|
|
948
|
-
"name": "
|
|
949
|
-
"
|
|
950
|
-
"
|
|
951
|
-
"
|
|
933
|
+
"session-id": {
|
|
934
|
+
"name": "session-id",
|
|
935
|
+
"required": false,
|
|
936
|
+
"summary": "Session ID outputted by \"agent preview start\". Not required when the agent has exactly one active session. Run \"agent preview sessions\" to see the list of all sessions.",
|
|
937
|
+
"hasDynamicHelp": false,
|
|
938
|
+
"multiple": false,
|
|
939
|
+
"type": "option"
|
|
952
940
|
},
|
|
953
|
-
"
|
|
954
|
-
"
|
|
955
|
-
"
|
|
956
|
-
"
|
|
957
|
-
"
|
|
941
|
+
"api-name": {
|
|
942
|
+
"char": "n",
|
|
943
|
+
"name": "api-name",
|
|
944
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
945
|
+
"hasDynamicHelp": false,
|
|
946
|
+
"multiple": false,
|
|
947
|
+
"type": "option"
|
|
948
|
+
},
|
|
949
|
+
"authoring-bundle": {
|
|
950
|
+
"name": "authoring-bundle",
|
|
951
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
952
|
+
"hasDynamicHelp": false,
|
|
953
|
+
"multiple": false,
|
|
954
|
+
"type": "option"
|
|
958
955
|
}
|
|
959
956
|
},
|
|
960
957
|
"hasDynamicHelp": true,
|
|
961
958
|
"hiddenAliases": [],
|
|
962
|
-
"id": "agent:
|
|
959
|
+
"id": "agent:preview:end",
|
|
963
960
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
964
961
|
"pluginName": "@salesforce/plugin-agent",
|
|
965
962
|
"pluginType": "core",
|
|
963
|
+
"state": "beta",
|
|
966
964
|
"strict": true,
|
|
967
|
-
"summary": "
|
|
965
|
+
"summary": "End an existing programmatic agent preview session and get trace location.",
|
|
968
966
|
"enableJsonFlag": true,
|
|
967
|
+
"requiresProject": true,
|
|
969
968
|
"isESM": true,
|
|
970
969
|
"relativePath": [
|
|
971
970
|
"lib",
|
|
972
971
|
"commands",
|
|
973
972
|
"agent",
|
|
974
|
-
"
|
|
975
|
-
"
|
|
973
|
+
"preview",
|
|
974
|
+
"end.js"
|
|
976
975
|
],
|
|
977
976
|
"aliasPermutations": [],
|
|
978
977
|
"permutations": [
|
|
979
|
-
"agent:
|
|
980
|
-
"
|
|
981
|
-
"
|
|
982
|
-
"agent:
|
|
983
|
-
"
|
|
984
|
-
"
|
|
978
|
+
"agent:preview:end",
|
|
979
|
+
"preview:agent:end",
|
|
980
|
+
"preview:end:agent",
|
|
981
|
+
"agent:end:preview",
|
|
982
|
+
"end:agent:preview",
|
|
983
|
+
"end:preview:agent"
|
|
985
984
|
]
|
|
986
985
|
},
|
|
987
|
-
"agent:
|
|
986
|
+
"agent:preview:send": {
|
|
988
987
|
"aliases": [],
|
|
989
988
|
"args": {},
|
|
990
|
-
"description": "
|
|
989
|
+
"description": "You must have previously started a programmatic agent preview session with the \"agent preview start\" command to then use this command to send the agent a message (utterance). This command then displays the agent's response.\n\nThe original \"agent preview start\" command outputs a session ID which you then use with the --session-id flag of this command to send a message. You don't have to specify the --session-id flag if an agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respecitvely. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory.",
|
|
991
990
|
"examples": [
|
|
992
|
-
"
|
|
993
|
-
"
|
|
991
|
+
"Send a message to an activated published agent using its API name and session ID; use the default org:\n<%= config.bin %> <%= command.id %> --utterance \"What can you help me with?\" --api-name My_Published_Agent --session-id <SESSION_ID>",
|
|
992
|
+
"Similar to previous example, but don't specify a session ID; you get an error if the agent has more than one active session. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --utterance \"What can you help me with?\" --api-name My_Published_Agent --target-org my-dev-org",
|
|
993
|
+
"Send a message to an agent using its authoring bundle API name; you get an error if the agent has more than one active session:\n<%= config.bin %> <%= command.id %> --utterance \"what can you help me with?\" --authoring-bundle My_Local_Agent"
|
|
994
994
|
],
|
|
995
995
|
"flags": {
|
|
996
996
|
"json": {
|
|
@@ -1024,43 +1024,130 @@
|
|
|
1024
1024
|
"hasDynamicHelp": false,
|
|
1025
1025
|
"multiple": false,
|
|
1026
1026
|
"type": "option"
|
|
1027
|
+
},
|
|
1028
|
+
"session-id": {
|
|
1029
|
+
"name": "session-id",
|
|
1030
|
+
"required": false,
|
|
1031
|
+
"summary": "Session ID outputted by \"agent preview start\". Not required when the agent has exactly one active session. Run \"agent preview sessions\" to see list of all sessions.",
|
|
1032
|
+
"hasDynamicHelp": false,
|
|
1033
|
+
"multiple": false,
|
|
1034
|
+
"type": "option"
|
|
1035
|
+
},
|
|
1036
|
+
"utterance": {
|
|
1037
|
+
"char": "u",
|
|
1038
|
+
"name": "utterance",
|
|
1039
|
+
"required": true,
|
|
1040
|
+
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1041
|
+
"hasDynamicHelp": false,
|
|
1042
|
+
"multiple": false,
|
|
1043
|
+
"type": "option"
|
|
1044
|
+
},
|
|
1045
|
+
"api-name": {
|
|
1046
|
+
"char": "n",
|
|
1047
|
+
"name": "api-name",
|
|
1048
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1049
|
+
"hasDynamicHelp": false,
|
|
1050
|
+
"multiple": false,
|
|
1051
|
+
"type": "option"
|
|
1052
|
+
},
|
|
1053
|
+
"authoring-bundle": {
|
|
1054
|
+
"name": "authoring-bundle",
|
|
1055
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1056
|
+
"hasDynamicHelp": false,
|
|
1057
|
+
"multiple": false,
|
|
1058
|
+
"type": "option"
|
|
1027
1059
|
}
|
|
1028
1060
|
},
|
|
1029
1061
|
"hasDynamicHelp": true,
|
|
1030
1062
|
"hiddenAliases": [],
|
|
1031
|
-
"id": "agent:
|
|
1063
|
+
"id": "agent:preview:send",
|
|
1032
1064
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1033
1065
|
"pluginName": "@salesforce/plugin-agent",
|
|
1034
1066
|
"pluginType": "core",
|
|
1067
|
+
"state": "beta",
|
|
1035
1068
|
"strict": true,
|
|
1036
|
-
"summary": "
|
|
1069
|
+
"summary": "Send a message to an existing agent preview session.",
|
|
1037
1070
|
"enableJsonFlag": true,
|
|
1071
|
+
"requiresProject": true,
|
|
1038
1072
|
"isESM": true,
|
|
1039
1073
|
"relativePath": [
|
|
1040
1074
|
"lib",
|
|
1041
1075
|
"commands",
|
|
1042
1076
|
"agent",
|
|
1043
|
-
"
|
|
1044
|
-
"
|
|
1077
|
+
"preview",
|
|
1078
|
+
"send.js"
|
|
1045
1079
|
],
|
|
1046
1080
|
"aliasPermutations": [],
|
|
1047
1081
|
"permutations": [
|
|
1048
|
-
"agent:
|
|
1049
|
-
"
|
|
1050
|
-
"
|
|
1051
|
-
"agent:
|
|
1052
|
-
"
|
|
1053
|
-
"
|
|
1082
|
+
"agent:preview:send",
|
|
1083
|
+
"preview:agent:send",
|
|
1084
|
+
"preview:send:agent",
|
|
1085
|
+
"agent:send:preview",
|
|
1086
|
+
"send:agent:preview",
|
|
1087
|
+
"send:preview:agent"
|
|
1054
1088
|
]
|
|
1055
1089
|
},
|
|
1056
|
-
"agent:
|
|
1090
|
+
"agent:preview:sessions": {
|
|
1057
1091
|
"aliases": [],
|
|
1058
1092
|
"args": {},
|
|
1059
|
-
"description": "This command
|
|
1093
|
+
"description": "This command lists the agent preview sessions that were started with the \"agent preview start\" command and are still in the local cache. Use this command to discover specific session IDs that you can pass to the \"agent preview send\" or \"agent preview end\" commands with the --session-id flag.\n\nProgrammatic agent preview sessions can be started for both published activated agents and by using an agent's local authoring bundle, which contains its Agent Script file. In this command's output table, the Agent column contains either the API name of the authoring bundle or the published agent, whichever was used when starting the session. In the table, if the same API name has multiple rows with different session IDs, then it means that you previously started multiple preview sessions with the associated agent.",
|
|
1060
1094
|
"examples": [
|
|
1061
|
-
"
|
|
1062
|
-
|
|
1063
|
-
|
|
1095
|
+
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
1096
|
+
],
|
|
1097
|
+
"flags": {
|
|
1098
|
+
"json": {
|
|
1099
|
+
"description": "Format output as json.",
|
|
1100
|
+
"helpGroup": "GLOBAL",
|
|
1101
|
+
"name": "json",
|
|
1102
|
+
"allowNo": false,
|
|
1103
|
+
"type": "boolean"
|
|
1104
|
+
},
|
|
1105
|
+
"flags-dir": {
|
|
1106
|
+
"helpGroup": "GLOBAL",
|
|
1107
|
+
"name": "flags-dir",
|
|
1108
|
+
"summary": "Import flag values from a directory.",
|
|
1109
|
+
"hasDynamicHelp": false,
|
|
1110
|
+
"multiple": false,
|
|
1111
|
+
"type": "option"
|
|
1112
|
+
}
|
|
1113
|
+
},
|
|
1114
|
+
"hasDynamicHelp": false,
|
|
1115
|
+
"hiddenAliases": [],
|
|
1116
|
+
"id": "agent:preview:sessions",
|
|
1117
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
1118
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
1119
|
+
"pluginType": "core",
|
|
1120
|
+
"state": "beta",
|
|
1121
|
+
"strict": true,
|
|
1122
|
+
"summary": "List all known programmatic agent preview sessions.",
|
|
1123
|
+
"enableJsonFlag": true,
|
|
1124
|
+
"requiresProject": true,
|
|
1125
|
+
"isESM": true,
|
|
1126
|
+
"relativePath": [
|
|
1127
|
+
"lib",
|
|
1128
|
+
"commands",
|
|
1129
|
+
"agent",
|
|
1130
|
+
"preview",
|
|
1131
|
+
"sessions.js"
|
|
1132
|
+
],
|
|
1133
|
+
"aliasPermutations": [],
|
|
1134
|
+
"permutations": [
|
|
1135
|
+
"agent:preview:sessions",
|
|
1136
|
+
"preview:agent:sessions",
|
|
1137
|
+
"preview:sessions:agent",
|
|
1138
|
+
"agent:sessions:preview",
|
|
1139
|
+
"sessions:agent:preview",
|
|
1140
|
+
"sessions:preview:agent"
|
|
1141
|
+
]
|
|
1142
|
+
},
|
|
1143
|
+
"agent:preview:start": {
|
|
1144
|
+
"aliases": [],
|
|
1145
|
+
"args": {},
|
|
1146
|
+
"description": "This command outputs a session ID that you then use with the \"agent preview send\" command to send an utterance to the agent. Use the \"agent preview sessions\" command to list all active sessions and the \"agent preview end\" command to end a specific session.\n\nIdentify the agent you want to start previewing with either the --authoring-bundle flag to specify a local authoring bundle's API name or --api-name to specify an activated published agent's API name. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory. \n\nWhen starting a preview session using the authoring bundle, which contains the agent's Agent Script file, the preview uses mocked actions by default. Specify --use-live-actions for live mode, which uses the real Apex classes, flows, etc, in the org for the actions.",
|
|
1147
|
+
"examples": [
|
|
1148
|
+
"Start a programmatic agent preview session by specifying an authoring bundle; uses mocked actions by default. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org",
|
|
1149
|
+
"Similar to previous example but use live actions and the default org:\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --use-live-actions",
|
|
1150
|
+
"Start a preview session with an activated published agent:\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
1064
1151
|
],
|
|
1065
1152
|
"flags": {
|
|
1066
1153
|
"json": {
|
|
@@ -1095,81 +1182,65 @@
|
|
|
1095
1182
|
"multiple": false,
|
|
1096
1183
|
"type": "option"
|
|
1097
1184
|
},
|
|
1098
|
-
"
|
|
1099
|
-
"char": "
|
|
1100
|
-
"name": "
|
|
1101
|
-
"
|
|
1102
|
-
"summary": "Job ID of the completed agent test run.",
|
|
1103
|
-
"hasDynamicHelp": false,
|
|
1104
|
-
"multiple": false,
|
|
1105
|
-
"type": "option"
|
|
1106
|
-
},
|
|
1107
|
-
"result-format": {
|
|
1108
|
-
"name": "result-format",
|
|
1109
|
-
"summary": "Format of the agent test run results.",
|
|
1110
|
-
"default": "human",
|
|
1185
|
+
"api-name": {
|
|
1186
|
+
"char": "n",
|
|
1187
|
+
"name": "api-name",
|
|
1188
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1111
1189
|
"hasDynamicHelp": false,
|
|
1112
1190
|
"multiple": false,
|
|
1113
|
-
"options": [
|
|
1114
|
-
"json",
|
|
1115
|
-
"human",
|
|
1116
|
-
"junit",
|
|
1117
|
-
"tap"
|
|
1118
|
-
],
|
|
1119
1191
|
"type": "option"
|
|
1120
1192
|
},
|
|
1121
|
-
"
|
|
1122
|
-
"
|
|
1123
|
-
"
|
|
1124
|
-
"name": "output-dir",
|
|
1125
|
-
"summary": "Directory to write the agent test results into.",
|
|
1193
|
+
"authoring-bundle": {
|
|
1194
|
+
"name": "authoring-bundle",
|
|
1195
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1126
1196
|
"hasDynamicHelp": false,
|
|
1127
1197
|
"multiple": false,
|
|
1128
1198
|
"type": "option"
|
|
1129
1199
|
},
|
|
1130
|
-
"
|
|
1131
|
-
"
|
|
1132
|
-
"
|
|
1133
|
-
"summary": "Show generated data in the test results output.",
|
|
1200
|
+
"use-live-actions": {
|
|
1201
|
+
"name": "use-live-actions",
|
|
1202
|
+
"summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
|
|
1134
1203
|
"allowNo": false,
|
|
1135
1204
|
"type": "boolean"
|
|
1136
1205
|
}
|
|
1137
1206
|
},
|
|
1138
1207
|
"hasDynamicHelp": true,
|
|
1139
1208
|
"hiddenAliases": [],
|
|
1140
|
-
"id": "agent:
|
|
1209
|
+
"id": "agent:preview:start",
|
|
1141
1210
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1142
1211
|
"pluginName": "@salesforce/plugin-agent",
|
|
1143
1212
|
"pluginType": "core",
|
|
1213
|
+
"state": "beta",
|
|
1144
1214
|
"strict": true,
|
|
1145
|
-
"summary": "
|
|
1215
|
+
"summary": "Start a programmatic agent preview session.",
|
|
1146
1216
|
"enableJsonFlag": true,
|
|
1217
|
+
"requiresProject": true,
|
|
1147
1218
|
"isESM": true,
|
|
1148
1219
|
"relativePath": [
|
|
1149
1220
|
"lib",
|
|
1150
1221
|
"commands",
|
|
1151
1222
|
"agent",
|
|
1152
|
-
"
|
|
1153
|
-
"
|
|
1223
|
+
"preview",
|
|
1224
|
+
"start.js"
|
|
1154
1225
|
],
|
|
1155
1226
|
"aliasPermutations": [],
|
|
1156
1227
|
"permutations": [
|
|
1157
|
-
"agent:
|
|
1158
|
-
"
|
|
1159
|
-
"
|
|
1160
|
-
"agent:
|
|
1161
|
-
"
|
|
1162
|
-
"
|
|
1228
|
+
"agent:preview:start",
|
|
1229
|
+
"preview:agent:start",
|
|
1230
|
+
"preview:start:agent",
|
|
1231
|
+
"agent:start:preview",
|
|
1232
|
+
"start:agent:preview",
|
|
1233
|
+
"start:preview:agent"
|
|
1163
1234
|
]
|
|
1164
1235
|
},
|
|
1165
|
-
"agent:test:
|
|
1236
|
+
"agent:test:create": {
|
|
1166
1237
|
"aliases": [],
|
|
1167
1238
|
"args": {},
|
|
1168
|
-
"description": "
|
|
1239
|
+
"description": "To run this command, you must have an agent test spec file, which is a YAML file that lists the test cases for testing a specific agent. Use the \"agent generate test-spec\" CLI command to generate a test spec file. Then specify the file to this command with the --spec flag, or run this command with no flags to be prompted.\n\nWhen this command completes, your org contains the new agent test, which you can view and edit using the Testing Center UI. This command also retrieves the metadata component (AiEvaluationDefinition) associated with the new test to your local Salesforce DX project and displays its filename.\n\nAfter you've created the test in the org, use the \"agent test run\" command to run it.",
|
|
1169
1240
|
"examples": [
|
|
1170
|
-
"
|
|
1171
|
-
"
|
|
1172
|
-
"
|
|
1241
|
+
"Create an agent test interactively and be prompted for the test spec and API name of the test in the org; use the default org:\n<%= config.bin %> <%= command.id %>",
|
|
1242
|
+
"Create an agent test and use flags to specify all required information; if a test with same API name already exists in the org, overwrite it without confirmation. Use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --force-overwrite --target-org my-org",
|
|
1243
|
+
"Preview what the agent test metadata (AiEvaluationDefinition) looks like without deploying it to your default org:\n<%= config.bin %> <%= command.id %> --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview"
|
|
1173
1244
|
],
|
|
1174
1245
|
"flags": {
|
|
1175
1246
|
"json": {
|
|
@@ -1187,6 +1258,20 @@
|
|
|
1187
1258
|
"multiple": false,
|
|
1188
1259
|
"type": "option"
|
|
1189
1260
|
},
|
|
1261
|
+
"api-name": {
|
|
1262
|
+
"name": "api-name",
|
|
1263
|
+
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1264
|
+
"hasDynamicHelp": false,
|
|
1265
|
+
"multiple": false,
|
|
1266
|
+
"type": "option"
|
|
1267
|
+
},
|
|
1268
|
+
"spec": {
|
|
1269
|
+
"name": "spec",
|
|
1270
|
+
"summary": "Path to the test spec YAML file.",
|
|
1271
|
+
"hasDynamicHelp": false,
|
|
1272
|
+
"multiple": false,
|
|
1273
|
+
"type": "option"
|
|
1274
|
+
},
|
|
1190
1275
|
"target-org": {
|
|
1191
1276
|
"char": "o",
|
|
1192
1277
|
"name": "target-org",
|
|
@@ -1204,69 +1289,27 @@
|
|
|
1204
1289
|
"multiple": false,
|
|
1205
1290
|
"type": "option"
|
|
1206
1291
|
},
|
|
1207
|
-
"
|
|
1208
|
-
"
|
|
1209
|
-
"
|
|
1210
|
-
"
|
|
1211
|
-
"
|
|
1212
|
-
"multiple": false,
|
|
1213
|
-
"type": "option"
|
|
1214
|
-
},
|
|
1215
|
-
"use-most-recent": {
|
|
1216
|
-
"char": "r",
|
|
1217
|
-
"name": "use-most-recent",
|
|
1218
|
-
"summary": "Use the job ID of the most recent agent test run.",
|
|
1219
|
-
"allowNo": false,
|
|
1220
|
-
"type": "boolean"
|
|
1221
|
-
},
|
|
1222
|
-
"wait": {
|
|
1223
|
-
"char": "w",
|
|
1224
|
-
"name": "wait",
|
|
1225
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1226
|
-
"default": "5 minutes",
|
|
1227
|
-
"hasDynamicHelp": true,
|
|
1228
|
-
"multiple": false,
|
|
1229
|
-
"type": "option"
|
|
1230
|
-
},
|
|
1231
|
-
"result-format": {
|
|
1232
|
-
"name": "result-format",
|
|
1233
|
-
"summary": "Format of the agent test run results.",
|
|
1234
|
-
"default": "human",
|
|
1235
|
-
"hasDynamicHelp": false,
|
|
1236
|
-
"multiple": false,
|
|
1237
|
-
"options": [
|
|
1238
|
-
"json",
|
|
1239
|
-
"human",
|
|
1240
|
-
"junit",
|
|
1241
|
-
"tap"
|
|
1242
|
-
],
|
|
1243
|
-
"type": "option"
|
|
1244
|
-
},
|
|
1245
|
-
"output-dir": {
|
|
1246
|
-
"char": "d",
|
|
1247
|
-
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
1248
|
-
"name": "output-dir",
|
|
1249
|
-
"summary": "Directory to write the agent test results into.",
|
|
1250
|
-
"hasDynamicHelp": false,
|
|
1251
|
-
"multiple": false,
|
|
1252
|
-
"type": "option"
|
|
1292
|
+
"preview": {
|
|
1293
|
+
"name": "preview",
|
|
1294
|
+
"summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
|
|
1295
|
+
"allowNo": false,
|
|
1296
|
+
"type": "boolean"
|
|
1253
1297
|
},
|
|
1254
|
-
"
|
|
1255
|
-
"
|
|
1256
|
-
"
|
|
1257
|
-
"summary": "Show generated data in the test results output.",
|
|
1298
|
+
"force-overwrite": {
|
|
1299
|
+
"name": "force-overwrite",
|
|
1300
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
1258
1301
|
"allowNo": false,
|
|
1259
1302
|
"type": "boolean"
|
|
1260
1303
|
}
|
|
1261
1304
|
},
|
|
1262
1305
|
"hasDynamicHelp": true,
|
|
1263
1306
|
"hiddenAliases": [],
|
|
1264
|
-
"id": "agent:test:
|
|
1307
|
+
"id": "agent:test:create",
|
|
1265
1308
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1266
1309
|
"pluginName": "@salesforce/plugin-agent",
|
|
1267
1310
|
"pluginType": "core",
|
|
1268
1311
|
"strict": true,
|
|
1269
|
-
"summary": "
|
|
1312
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
1270
1313
|
"enableJsonFlag": true,
|
|
1271
1314
|
"isESM": true,
|
|
1272
1315
|
"relativePath": [
|
|
@@ -1274,29 +1317,25 @@
|
|
|
1274
1317
|
"commands",
|
|
1275
1318
|
"agent",
|
|
1276
1319
|
"test",
|
|
1277
|
-
"
|
|
1320
|
+
"create.js"
|
|
1278
1321
|
],
|
|
1279
1322
|
"aliasPermutations": [],
|
|
1280
1323
|
"permutations": [
|
|
1281
|
-
"agent:test:
|
|
1282
|
-
"test:agent:
|
|
1283
|
-
"test:
|
|
1284
|
-
"agent:
|
|
1285
|
-
"
|
|
1286
|
-
"
|
|
1324
|
+
"agent:test:create",
|
|
1325
|
+
"test:agent:create",
|
|
1326
|
+
"test:create:agent",
|
|
1327
|
+
"agent:create:test",
|
|
1328
|
+
"create:agent:test",
|
|
1329
|
+
"create:test:agent"
|
|
1287
1330
|
]
|
|
1288
1331
|
},
|
|
1289
|
-
"agent:test:
|
|
1332
|
+
"agent:test:list": {
|
|
1290
1333
|
"aliases": [],
|
|
1291
1334
|
"args": {},
|
|
1292
|
-
"description": "
|
|
1335
|
+
"description": "The command outputs a table with the name (API name) of each test along with its unique ID and the date it was created in the org.",
|
|
1293
1336
|
"examples": [
|
|
1294
|
-
"
|
|
1295
|
-
"
|
|
1296
|
-
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
|
|
1297
|
-
"Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --target-org my-org --result-format junit",
|
|
1298
|
-
"Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):\n<%= config.bin %> <%= command.id %> --spec tests/agent-with-context.yaml --target-org my-org",
|
|
1299
|
-
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1337
|
+
"List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1338
|
+
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
1300
1339
|
],
|
|
1301
1340
|
"flags": {
|
|
1302
1341
|
"json": {
|
|
@@ -1330,72 +1369,16 @@
|
|
|
1330
1369
|
"hasDynamicHelp": false,
|
|
1331
1370
|
"multiple": false,
|
|
1332
1371
|
"type": "option"
|
|
1333
|
-
},
|
|
1334
|
-
"spec": {
|
|
1335
|
-
"char": "s",
|
|
1336
|
-
"name": "spec",
|
|
1337
|
-
"required": true,
|
|
1338
|
-
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1339
|
-
"hasDynamicHelp": false,
|
|
1340
|
-
"multiple": false,
|
|
1341
|
-
"type": "option"
|
|
1342
|
-
},
|
|
1343
|
-
"api-name": {
|
|
1344
|
-
"char": "n",
|
|
1345
|
-
"name": "api-name",
|
|
1346
|
-
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1347
|
-
"hasDynamicHelp": false,
|
|
1348
|
-
"multiple": false,
|
|
1349
|
-
"type": "option"
|
|
1350
|
-
},
|
|
1351
|
-
"wait": {
|
|
1352
|
-
"char": "w",
|
|
1353
|
-
"name": "wait",
|
|
1354
|
-
"summary": "Number of minutes to wait for results.",
|
|
1355
|
-
"default": 10,
|
|
1356
|
-
"hasDynamicHelp": false,
|
|
1357
|
-
"multiple": false,
|
|
1358
|
-
"type": "option"
|
|
1359
|
-
},
|
|
1360
|
-
"result-format": {
|
|
1361
|
-
"name": "result-format",
|
|
1362
|
-
"summary": "Format of the agent test run results.",
|
|
1363
|
-
"default": "human",
|
|
1364
|
-
"hasDynamicHelp": false,
|
|
1365
|
-
"multiple": false,
|
|
1366
|
-
"options": [
|
|
1367
|
-
"json",
|
|
1368
|
-
"human",
|
|
1369
|
-
"junit",
|
|
1370
|
-
"tap"
|
|
1371
|
-
],
|
|
1372
|
-
"type": "option"
|
|
1373
|
-
},
|
|
1374
|
-
"batch-size": {
|
|
1375
|
-
"name": "batch-size",
|
|
1376
|
-
"summary": "Number of tests per API request (max 5).",
|
|
1377
|
-
"default": 5,
|
|
1378
|
-
"hasDynamicHelp": false,
|
|
1379
|
-
"multiple": false,
|
|
1380
|
-
"type": "option"
|
|
1381
|
-
},
|
|
1382
|
-
"no-normalize": {
|
|
1383
|
-
"name": "no-normalize",
|
|
1384
|
-
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1385
|
-
"allowNo": false,
|
|
1386
|
-
"type": "boolean"
|
|
1387
1372
|
}
|
|
1388
1373
|
},
|
|
1389
1374
|
"hasDynamicHelp": true,
|
|
1390
|
-
"hidden": true,
|
|
1391
1375
|
"hiddenAliases": [],
|
|
1392
|
-
"id": "agent:test:
|
|
1376
|
+
"id": "agent:test:list",
|
|
1393
1377
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1394
1378
|
"pluginName": "@salesforce/plugin-agent",
|
|
1395
1379
|
"pluginType": "core",
|
|
1396
|
-
"state": "beta",
|
|
1397
1380
|
"strict": true,
|
|
1398
|
-
"summary": "
|
|
1381
|
+
"summary": "List the available agent tests in your org.",
|
|
1399
1382
|
"enableJsonFlag": true,
|
|
1400
1383
|
"isESM": true,
|
|
1401
1384
|
"relativePath": [
|
|
@@ -1403,26 +1386,26 @@
|
|
|
1403
1386
|
"commands",
|
|
1404
1387
|
"agent",
|
|
1405
1388
|
"test",
|
|
1406
|
-
"
|
|
1389
|
+
"list.js"
|
|
1407
1390
|
],
|
|
1408
1391
|
"aliasPermutations": [],
|
|
1409
1392
|
"permutations": [
|
|
1410
|
-
"agent:test:
|
|
1411
|
-
"test:agent:
|
|
1412
|
-
"test:
|
|
1413
|
-
"agent:
|
|
1414
|
-
"
|
|
1415
|
-
"
|
|
1393
|
+
"agent:test:list",
|
|
1394
|
+
"test:agent:list",
|
|
1395
|
+
"test:list:agent",
|
|
1396
|
+
"agent:list:test",
|
|
1397
|
+
"list:agent:test",
|
|
1398
|
+
"list:test:agent"
|
|
1416
1399
|
]
|
|
1417
1400
|
},
|
|
1418
|
-
"agent:test:
|
|
1401
|
+
"agent:test:results": {
|
|
1419
1402
|
"aliases": [],
|
|
1420
1403
|
"args": {},
|
|
1421
|
-
"description": "
|
|
1404
|
+
"description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
|
|
1422
1405
|
"examples": [
|
|
1423
|
-
"
|
|
1424
|
-
"
|
|
1425
|
-
"
|
|
1406
|
+
"Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1407
|
+
"Get the results of the most recently run agent test in an org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --use-most-recent --target-org my-org",
|
|
1408
|
+
"Get the results of the most recently run agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
|
|
1426
1409
|
],
|
|
1427
1410
|
"flags": {
|
|
1428
1411
|
"json": {
|
|
@@ -1457,22 +1440,15 @@
|
|
|
1457
1440
|
"multiple": false,
|
|
1458
1441
|
"type": "option"
|
|
1459
1442
|
},
|
|
1460
|
-
"
|
|
1461
|
-
"char": "
|
|
1462
|
-
"name": "
|
|
1463
|
-
"
|
|
1443
|
+
"job-id": {
|
|
1444
|
+
"char": "i",
|
|
1445
|
+
"name": "job-id",
|
|
1446
|
+
"required": true,
|
|
1447
|
+
"summary": "Job ID of the completed agent test run.",
|
|
1464
1448
|
"hasDynamicHelp": false,
|
|
1465
1449
|
"multiple": false,
|
|
1466
1450
|
"type": "option"
|
|
1467
1451
|
},
|
|
1468
|
-
"wait": {
|
|
1469
|
-
"char": "w",
|
|
1470
|
-
"name": "wait",
|
|
1471
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1472
|
-
"hasDynamicHelp": true,
|
|
1473
|
-
"multiple": false,
|
|
1474
|
-
"type": "option"
|
|
1475
|
-
},
|
|
1476
1452
|
"result-format": {
|
|
1477
1453
|
"name": "result-format",
|
|
1478
1454
|
"summary": "Format of the agent test run results.",
|
|
@@ -1506,12 +1482,12 @@
|
|
|
1506
1482
|
},
|
|
1507
1483
|
"hasDynamicHelp": true,
|
|
1508
1484
|
"hiddenAliases": [],
|
|
1509
|
-
"id": "agent:test:
|
|
1485
|
+
"id": "agent:test:results",
|
|
1510
1486
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1511
1487
|
"pluginName": "@salesforce/plugin-agent",
|
|
1512
1488
|
"pluginType": "core",
|
|
1513
1489
|
"strict": true,
|
|
1514
|
-
"summary": "
|
|
1490
|
+
"summary": "Get the results of a completed agent test run.",
|
|
1515
1491
|
"enableJsonFlag": true,
|
|
1516
1492
|
"isESM": true,
|
|
1517
1493
|
"relativePath": [
|
|
@@ -1519,25 +1495,26 @@
|
|
|
1519
1495
|
"commands",
|
|
1520
1496
|
"agent",
|
|
1521
1497
|
"test",
|
|
1522
|
-
"
|
|
1498
|
+
"results.js"
|
|
1523
1499
|
],
|
|
1524
1500
|
"aliasPermutations": [],
|
|
1525
1501
|
"permutations": [
|
|
1526
|
-
"agent:test:
|
|
1527
|
-
"test:agent:
|
|
1528
|
-
"test:
|
|
1529
|
-
"agent:
|
|
1530
|
-
"
|
|
1531
|
-
"
|
|
1502
|
+
"agent:test:results",
|
|
1503
|
+
"test:agent:results",
|
|
1504
|
+
"test:results:agent",
|
|
1505
|
+
"agent:results:test",
|
|
1506
|
+
"results:agent:test",
|
|
1507
|
+
"results:test:agent"
|
|
1532
1508
|
]
|
|
1533
1509
|
},
|
|
1534
|
-
"agent:
|
|
1510
|
+
"agent:test:resume": {
|
|
1535
1511
|
"aliases": [],
|
|
1536
1512
|
"args": {},
|
|
1537
|
-
"description": "
|
|
1513
|
+
"description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.\n\nUse the --wait flag to specify the number of minutes for this command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, the CLI returns control of the terminal to you, and you must run \"agent test resume\" again.\n\nBy default, this command outputs test results in human-readable tables for each test case. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
|
|
1538
1514
|
"examples": [
|
|
1539
|
-
"
|
|
1540
|
-
"
|
|
1515
|
+
"Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1516
|
+
"Resume the most recently-run agent test in an org with alias \"my-org\" org; wait 10 minutes for the tests to finish:\n<%= config.bin %> <%= command.id %> --use-most-recent --wait 10 --target-org my-org",
|
|
1517
|
+
"Resume the most recent agent test in your default org, and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --use-most-recent --output-dir ./test-results --result-format json"
|
|
1541
1518
|
],
|
|
1542
1519
|
"flags": {
|
|
1543
1520
|
"json": {
|
|
@@ -1572,57 +1549,99 @@
|
|
|
1572
1549
|
"multiple": false,
|
|
1573
1550
|
"type": "option"
|
|
1574
1551
|
},
|
|
1575
|
-
"
|
|
1576
|
-
"char": "
|
|
1577
|
-
"name": "
|
|
1578
|
-
"summary": "
|
|
1552
|
+
"job-id": {
|
|
1553
|
+
"char": "i",
|
|
1554
|
+
"name": "job-id",
|
|
1555
|
+
"summary": "Job ID of the original agent test run.",
|
|
1556
|
+
"hasDynamicHelp": false,
|
|
1557
|
+
"multiple": false,
|
|
1558
|
+
"type": "option"
|
|
1559
|
+
},
|
|
1560
|
+
"use-most-recent": {
|
|
1561
|
+
"char": "r",
|
|
1562
|
+
"name": "use-most-recent",
|
|
1563
|
+
"summary": "Use the job ID of the most recent agent test run.",
|
|
1564
|
+
"allowNo": false,
|
|
1565
|
+
"type": "boolean"
|
|
1566
|
+
},
|
|
1567
|
+
"wait": {
|
|
1568
|
+
"char": "w",
|
|
1569
|
+
"name": "wait",
|
|
1570
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1571
|
+
"default": "5 minutes",
|
|
1572
|
+
"hasDynamicHelp": true,
|
|
1573
|
+
"multiple": false,
|
|
1574
|
+
"type": "option"
|
|
1575
|
+
},
|
|
1576
|
+
"result-format": {
|
|
1577
|
+
"name": "result-format",
|
|
1578
|
+
"summary": "Format of the agent test run results.",
|
|
1579
|
+
"default": "human",
|
|
1580
|
+
"hasDynamicHelp": false,
|
|
1581
|
+
"multiple": false,
|
|
1582
|
+
"options": [
|
|
1583
|
+
"json",
|
|
1584
|
+
"human",
|
|
1585
|
+
"junit",
|
|
1586
|
+
"tap"
|
|
1587
|
+
],
|
|
1588
|
+
"type": "option"
|
|
1589
|
+
},
|
|
1590
|
+
"output-dir": {
|
|
1591
|
+
"char": "d",
|
|
1592
|
+
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
1593
|
+
"name": "output-dir",
|
|
1594
|
+
"summary": "Directory to write the agent test results into.",
|
|
1579
1595
|
"hasDynamicHelp": false,
|
|
1580
1596
|
"multiple": false,
|
|
1581
1597
|
"type": "option"
|
|
1598
|
+
},
|
|
1599
|
+
"verbose": {
|
|
1600
|
+
"description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
|
|
1601
|
+
"name": "verbose",
|
|
1602
|
+
"summary": "Show generated data in the test results output.",
|
|
1603
|
+
"allowNo": false,
|
|
1604
|
+
"type": "boolean"
|
|
1582
1605
|
}
|
|
1583
1606
|
},
|
|
1584
1607
|
"hasDynamicHelp": true,
|
|
1585
1608
|
"hiddenAliases": [],
|
|
1586
|
-
"id": "agent:
|
|
1609
|
+
"id": "agent:test:resume",
|
|
1587
1610
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1588
1611
|
"pluginName": "@salesforce/plugin-agent",
|
|
1589
1612
|
"pluginType": "core",
|
|
1590
1613
|
"strict": true,
|
|
1591
|
-
"summary": "
|
|
1614
|
+
"summary": "Resume an agent test that you previously started in your org so you can view the test results.",
|
|
1592
1615
|
"enableJsonFlag": true,
|
|
1593
|
-
"requiresProject": true,
|
|
1594
|
-
"FLAGGABLE_PROMPTS": {
|
|
1595
|
-
"api-name": {
|
|
1596
|
-
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1597
|
-
"promptMessage": "API name of the authoring bundle to validate"
|
|
1598
|
-
}
|
|
1599
|
-
},
|
|
1600
1616
|
"isESM": true,
|
|
1601
1617
|
"relativePath": [
|
|
1602
1618
|
"lib",
|
|
1603
1619
|
"commands",
|
|
1604
1620
|
"agent",
|
|
1605
|
-
"
|
|
1606
|
-
"
|
|
1621
|
+
"test",
|
|
1622
|
+
"resume.js"
|
|
1607
1623
|
],
|
|
1608
1624
|
"aliasPermutations": [],
|
|
1609
1625
|
"permutations": [
|
|
1610
|
-
"agent:
|
|
1611
|
-
"
|
|
1612
|
-
"
|
|
1613
|
-
"agent:
|
|
1614
|
-
"
|
|
1615
|
-
"
|
|
1626
|
+
"agent:test:resume",
|
|
1627
|
+
"test:agent:resume",
|
|
1628
|
+
"test:resume:agent",
|
|
1629
|
+
"agent:resume:test",
|
|
1630
|
+
"resume:agent:test",
|
|
1631
|
+
"resume:test:agent"
|
|
1616
1632
|
]
|
|
1617
1633
|
},
|
|
1618
|
-
"agent:
|
|
1634
|
+
"agent:test:run-eval": {
|
|
1619
1635
|
"aliases": [],
|
|
1620
1636
|
"args": {},
|
|
1621
|
-
"description": "
|
|
1637
|
+
"description": "Execute rich evaluation tests against an Agentforce agent using the Einstein Evaluation API. Supports both YAML test specs (same format as `sf agent generate test-spec`) and JSON payloads.\n\nWhen you provide a YAML test spec, the command automatically translates test cases into Evaluation API calls and infers the agent name from the spec's `subjectName` field. This means you can use the same test spec with both `sf agent test run` and `sf agent test run-eval`. YAML test specs also support contextVariables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for testing with different contexts.\n\nWhen you provide a JSON payload, it's sent directly to the API with optional normalization. The normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults. Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on agent.create_session steps for the same contextual testing capabilities.\n\nSupports 8+ evaluator types, including topic routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
|
|
1622
1638
|
"examples": [
|
|
1623
|
-
"
|
|
1624
|
-
"
|
|
1625
|
-
"
|
|
1639
|
+
"Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --target-org my-org",
|
|
1640
|
+
"Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --api-name My_Agent --target-org my-org",
|
|
1641
|
+
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
|
|
1642
|
+
"Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --target-org my-org --result-format junit",
|
|
1643
|
+
"Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):\n<%= config.bin %> <%= command.id %> --spec tests/agent-with-context.yaml --target-org my-org",
|
|
1644
|
+
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1626
1645
|
],
|
|
1627
1646
|
"flags": {
|
|
1628
1647
|
"json": {
|
|
@@ -1657,10 +1676,11 @@
|
|
|
1657
1676
|
"multiple": false,
|
|
1658
1677
|
"type": "option"
|
|
1659
1678
|
},
|
|
1660
|
-
"
|
|
1661
|
-
"
|
|
1662
|
-
"
|
|
1663
|
-
"
|
|
1679
|
+
"spec": {
|
|
1680
|
+
"char": "s",
|
|
1681
|
+
"name": "spec",
|
|
1682
|
+
"required": true,
|
|
1683
|
+
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1664
1684
|
"hasDynamicHelp": false,
|
|
1665
1685
|
"multiple": false,
|
|
1666
1686
|
"type": "option"
|
|
@@ -1668,56 +1688,86 @@
|
|
|
1668
1688
|
"api-name": {
|
|
1669
1689
|
"char": "n",
|
|
1670
1690
|
"name": "api-name",
|
|
1671
|
-
"summary": "API name
|
|
1691
|
+
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1672
1692
|
"hasDynamicHelp": false,
|
|
1673
1693
|
"multiple": false,
|
|
1674
1694
|
"type": "option"
|
|
1675
1695
|
},
|
|
1676
|
-
"
|
|
1677
|
-
"
|
|
1678
|
-
"
|
|
1696
|
+
"wait": {
|
|
1697
|
+
"char": "w",
|
|
1698
|
+
"name": "wait",
|
|
1699
|
+
"summary": "Number of minutes to wait for results.",
|
|
1700
|
+
"default": 10,
|
|
1701
|
+
"hasDynamicHelp": false,
|
|
1702
|
+
"multiple": false,
|
|
1703
|
+
"type": "option"
|
|
1704
|
+
},
|
|
1705
|
+
"result-format": {
|
|
1706
|
+
"name": "result-format",
|
|
1707
|
+
"summary": "Format of the agent test run results.",
|
|
1708
|
+
"default": "human",
|
|
1709
|
+
"hasDynamicHelp": false,
|
|
1710
|
+
"multiple": false,
|
|
1711
|
+
"options": [
|
|
1712
|
+
"json",
|
|
1713
|
+
"human",
|
|
1714
|
+
"junit",
|
|
1715
|
+
"tap"
|
|
1716
|
+
],
|
|
1717
|
+
"type": "option"
|
|
1718
|
+
},
|
|
1719
|
+
"batch-size": {
|
|
1720
|
+
"name": "batch-size",
|
|
1721
|
+
"summary": "Number of tests per API request (max 5).",
|
|
1722
|
+
"default": 5,
|
|
1679
1723
|
"hasDynamicHelp": false,
|
|
1680
1724
|
"multiple": false,
|
|
1681
1725
|
"type": "option"
|
|
1726
|
+
},
|
|
1727
|
+
"no-normalize": {
|
|
1728
|
+
"name": "no-normalize",
|
|
1729
|
+
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1730
|
+
"allowNo": false,
|
|
1731
|
+
"type": "boolean"
|
|
1682
1732
|
}
|
|
1683
1733
|
},
|
|
1684
1734
|
"hasDynamicHelp": true,
|
|
1735
|
+
"hidden": true,
|
|
1685
1736
|
"hiddenAliases": [],
|
|
1686
|
-
"id": "agent:
|
|
1737
|
+
"id": "agent:test:run-eval",
|
|
1687
1738
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1688
1739
|
"pluginName": "@salesforce/plugin-agent",
|
|
1689
1740
|
"pluginType": "core",
|
|
1690
1741
|
"state": "beta",
|
|
1691
1742
|
"strict": true,
|
|
1692
|
-
"summary": "
|
|
1743
|
+
"summary": "Run evaluation tests against an Agentforce agent.",
|
|
1693
1744
|
"enableJsonFlag": true,
|
|
1694
|
-
"requiresProject": true,
|
|
1695
1745
|
"isESM": true,
|
|
1696
1746
|
"relativePath": [
|
|
1697
1747
|
"lib",
|
|
1698
1748
|
"commands",
|
|
1699
1749
|
"agent",
|
|
1700
|
-
"
|
|
1701
|
-
"
|
|
1750
|
+
"test",
|
|
1751
|
+
"run-eval.js"
|
|
1702
1752
|
],
|
|
1703
1753
|
"aliasPermutations": [],
|
|
1704
1754
|
"permutations": [
|
|
1705
|
-
"agent:
|
|
1706
|
-
"
|
|
1707
|
-
"
|
|
1708
|
-
"agent:
|
|
1709
|
-
"
|
|
1710
|
-
"
|
|
1755
|
+
"agent:test:run-eval",
|
|
1756
|
+
"test:agent:run-eval",
|
|
1757
|
+
"test:run-eval:agent",
|
|
1758
|
+
"agent:run-eval:test",
|
|
1759
|
+
"run-eval:agent:test",
|
|
1760
|
+
"run-eval:test:agent"
|
|
1711
1761
|
]
|
|
1712
1762
|
},
|
|
1713
|
-
"agent:
|
|
1763
|
+
"agent:test:run": {
|
|
1714
1764
|
"aliases": [],
|
|
1715
1765
|
"args": {},
|
|
1716
|
-
"description": "
|
|
1766
|
+
"description": "Use the --api-name flag to specify the name of the agent test you want to run. Use the output of the \"agent test list\" command to get the names of all the available agent tests in your org.\n\nBy default, this command starts the agent test in your org, but it doesn't wait for the test to finish. Instead, it displays the \"agent test resume\" command, with a job ID, that you execute to see the results of the test run, and then returns control of the terminal window to you. Use the --wait flag to specify the number of minutes for the command to wait for the agent test to complete; if the test completes by the end of the wait time, the command displays the test results. If not, run \"agent test resume\".\n\nBy default, this command outputs test results in human-readable tables for each test case, if the test completes in time. The tables show whether the test case passed, the expected and actual values, the test score, how long the test took, and more. Use the --result-format to display the test results in JSON or Junit format. Use the --output-dir flag to write the results to a file rather than to the terminal.",
|
|
1717
1767
|
"examples": [
|
|
1718
|
-
"
|
|
1719
|
-
"
|
|
1720
|
-
"
|
|
1768
|
+
"Start an agent test called Resort_Manager_Test for an agent in your default org, don't wait for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test",
|
|
1769
|
+
"Start an agent test for an agent in an org with alias \"my-org\" and wait for 10 minutes for the test to finish:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --target-org my-org",
|
|
1770
|
+
"Start an agent test and write the JSON-formatted results into a directory called \"test-results\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager_Test --wait 10 --output-dir ./test-results --result-format json"
|
|
1721
1771
|
],
|
|
1722
1772
|
"flags": {
|
|
1723
1773
|
"json": {
|
|
@@ -1752,129 +1802,87 @@
|
|
|
1752
1802
|
"multiple": false,
|
|
1753
1803
|
"type": "option"
|
|
1754
1804
|
},
|
|
1755
|
-
"
|
|
1756
|
-
"
|
|
1757
|
-
"
|
|
1758
|
-
"summary": "
|
|
1805
|
+
"api-name": {
|
|
1806
|
+
"char": "n",
|
|
1807
|
+
"name": "api-name",
|
|
1808
|
+
"summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
|
|
1759
1809
|
"hasDynamicHelp": false,
|
|
1760
1810
|
"multiple": false,
|
|
1761
1811
|
"type": "option"
|
|
1762
1812
|
},
|
|
1763
|
-
"
|
|
1764
|
-
"char": "
|
|
1765
|
-
"name": "
|
|
1766
|
-
"
|
|
1767
|
-
"
|
|
1768
|
-
"hasDynamicHelp": false,
|
|
1813
|
+
"wait": {
|
|
1814
|
+
"char": "w",
|
|
1815
|
+
"name": "wait",
|
|
1816
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1817
|
+
"hasDynamicHelp": true,
|
|
1769
1818
|
"multiple": false,
|
|
1770
1819
|
"type": "option"
|
|
1771
1820
|
},
|
|
1772
|
-
"
|
|
1773
|
-
"
|
|
1774
|
-
"
|
|
1775
|
-
"
|
|
1821
|
+
"result-format": {
|
|
1822
|
+
"name": "result-format",
|
|
1823
|
+
"summary": "Format of the agent test run results.",
|
|
1824
|
+
"default": "human",
|
|
1776
1825
|
"hasDynamicHelp": false,
|
|
1777
1826
|
"multiple": false,
|
|
1827
|
+
"options": [
|
|
1828
|
+
"json",
|
|
1829
|
+
"human",
|
|
1830
|
+
"junit",
|
|
1831
|
+
"tap"
|
|
1832
|
+
],
|
|
1778
1833
|
"type": "option"
|
|
1779
1834
|
},
|
|
1780
|
-
"
|
|
1781
|
-
"
|
|
1782
|
-
"
|
|
1835
|
+
"output-dir": {
|
|
1836
|
+
"char": "d",
|
|
1837
|
+
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
1838
|
+
"name": "output-dir",
|
|
1839
|
+
"summary": "Directory to write the agent test results into.",
|
|
1783
1840
|
"hasDynamicHelp": false,
|
|
1784
1841
|
"multiple": false,
|
|
1785
1842
|
"type": "option"
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1792
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1793
|
-
"pluginType": "core",
|
|
1794
|
-
"state": "beta",
|
|
1795
|
-
"strict": true,
|
|
1796
|
-
"summary": "Send a message to an existing agent preview session.",
|
|
1797
|
-
"enableJsonFlag": true,
|
|
1798
|
-
"requiresProject": true,
|
|
1799
|
-
"isESM": true,
|
|
1800
|
-
"relativePath": [
|
|
1801
|
-
"lib",
|
|
1802
|
-
"commands",
|
|
1803
|
-
"agent",
|
|
1804
|
-
"preview",
|
|
1805
|
-
"send.js"
|
|
1806
|
-
],
|
|
1807
|
-
"aliasPermutations": [],
|
|
1808
|
-
"permutations": [
|
|
1809
|
-
"agent:preview:send",
|
|
1810
|
-
"preview:agent:send",
|
|
1811
|
-
"preview:send:agent",
|
|
1812
|
-
"agent:send:preview",
|
|
1813
|
-
"send:agent:preview",
|
|
1814
|
-
"send:preview:agent"
|
|
1815
|
-
]
|
|
1816
|
-
},
|
|
1817
|
-
"agent:preview:sessions": {
|
|
1818
|
-
"aliases": [],
|
|
1819
|
-
"args": {},
|
|
1820
|
-
"description": "This command lists the agent preview sessions that were started with the \"agent preview start\" command and are still in the local cache. Use this command to discover specific session IDs that you can pass to the \"agent preview send\" or \"agent preview end\" commands with the --session-id flag.\n\nProgrammatic agent preview sessions can be started for both published activated agents and by using an agent's local authoring bundle, which contains its Agent Script file. In this command's output table, the Agent column contains either the API name of the authoring bundle or the published agent, whichever was used when starting the session. In the table, if the same API name has multiple rows with different session IDs, then it means that you previously started multiple preview sessions with the associated agent.",
|
|
1821
|
-
"examples": [
|
|
1822
|
-
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
1823
|
-
],
|
|
1824
|
-
"flags": {
|
|
1825
|
-
"json": {
|
|
1826
|
-
"description": "Format output as json.",
|
|
1827
|
-
"helpGroup": "GLOBAL",
|
|
1828
|
-
"name": "json",
|
|
1843
|
+
},
|
|
1844
|
+
"verbose": {
|
|
1845
|
+
"description": "When enabled, includes detailed generated data (such as invoked actions) in the human-readable test results output. This is useful for debugging test failures and understanding what actions were actually invoked during the test run.\n\nThe generated data is in JSON format and includes the Apex classes or Flows that were invoked, the Salesforce objects that were touched, and so on. Use the JSON structure of this information to build the test case JSONPath expression when using custom evaluations.",
|
|
1846
|
+
"name": "verbose",
|
|
1847
|
+
"summary": "Show generated data in the test results output.",
|
|
1829
1848
|
"allowNo": false,
|
|
1830
1849
|
"type": "boolean"
|
|
1831
|
-
},
|
|
1832
|
-
"flags-dir": {
|
|
1833
|
-
"helpGroup": "GLOBAL",
|
|
1834
|
-
"name": "flags-dir",
|
|
1835
|
-
"summary": "Import flag values from a directory.",
|
|
1836
|
-
"hasDynamicHelp": false,
|
|
1837
|
-
"multiple": false,
|
|
1838
|
-
"type": "option"
|
|
1839
1850
|
}
|
|
1840
1851
|
},
|
|
1841
|
-
"hasDynamicHelp":
|
|
1852
|
+
"hasDynamicHelp": true,
|
|
1842
1853
|
"hiddenAliases": [],
|
|
1843
|
-
"id": "agent:
|
|
1854
|
+
"id": "agent:test:run",
|
|
1844
1855
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1845
1856
|
"pluginName": "@salesforce/plugin-agent",
|
|
1846
1857
|
"pluginType": "core",
|
|
1847
|
-
"state": "beta",
|
|
1848
1858
|
"strict": true,
|
|
1849
|
-
"summary": "
|
|
1859
|
+
"summary": "Start an agent test in your org.",
|
|
1850
1860
|
"enableJsonFlag": true,
|
|
1851
|
-
"requiresProject": true,
|
|
1852
1861
|
"isESM": true,
|
|
1853
1862
|
"relativePath": [
|
|
1854
1863
|
"lib",
|
|
1855
1864
|
"commands",
|
|
1856
1865
|
"agent",
|
|
1857
|
-
"
|
|
1858
|
-
"
|
|
1866
|
+
"test",
|
|
1867
|
+
"run.js"
|
|
1859
1868
|
],
|
|
1860
1869
|
"aliasPermutations": [],
|
|
1861
1870
|
"permutations": [
|
|
1862
|
-
"agent:
|
|
1863
|
-
"
|
|
1864
|
-
"
|
|
1865
|
-
"agent:
|
|
1866
|
-
"
|
|
1867
|
-
"
|
|
1871
|
+
"agent:test:run",
|
|
1872
|
+
"test:agent:run",
|
|
1873
|
+
"test:run:agent",
|
|
1874
|
+
"agent:run:test",
|
|
1875
|
+
"run:agent:test",
|
|
1876
|
+
"run:test:agent"
|
|
1868
1877
|
]
|
|
1869
1878
|
},
|
|
1870
|
-
"agent:
|
|
1879
|
+
"agent:validate:authoring-bundle": {
|
|
1871
1880
|
"aliases": [],
|
|
1872
1881
|
"args": {},
|
|
1873
|
-
"description": "
|
|
1882
|
+
"description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
|
|
1874
1883
|
"examples": [
|
|
1875
|
-
"
|
|
1876
|
-
"
|
|
1877
|
-
"Start a preview session with an activated published agent:\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
1884
|
+
"Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1885
|
+
"Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
|
|
1878
1886
|
],
|
|
1879
1887
|
"flags": {
|
|
1880
1888
|
"json": {
|
|
@@ -1912,54 +1920,46 @@
|
|
|
1912
1920
|
"api-name": {
|
|
1913
1921
|
"char": "n",
|
|
1914
1922
|
"name": "api-name",
|
|
1915
|
-
"summary": "API name of the
|
|
1916
|
-
"hasDynamicHelp": false,
|
|
1917
|
-
"multiple": false,
|
|
1918
|
-
"type": "option"
|
|
1919
|
-
},
|
|
1920
|
-
"authoring-bundle": {
|
|
1921
|
-
"name": "authoring-bundle",
|
|
1922
|
-
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1923
|
+
"summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1923
1924
|
"hasDynamicHelp": false,
|
|
1924
1925
|
"multiple": false,
|
|
1925
1926
|
"type": "option"
|
|
1926
|
-
},
|
|
1927
|
-
"use-live-actions": {
|
|
1928
|
-
"name": "use-live-actions",
|
|
1929
|
-
"summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
|
|
1930
|
-
"allowNo": false,
|
|
1931
|
-
"type": "boolean"
|
|
1932
1927
|
}
|
|
1933
1928
|
},
|
|
1934
1929
|
"hasDynamicHelp": true,
|
|
1935
1930
|
"hiddenAliases": [],
|
|
1936
|
-
"id": "agent:
|
|
1931
|
+
"id": "agent:validate:authoring-bundle",
|
|
1937
1932
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1938
1933
|
"pluginName": "@salesforce/plugin-agent",
|
|
1939
1934
|
"pluginType": "core",
|
|
1940
|
-
"state": "beta",
|
|
1941
1935
|
"strict": true,
|
|
1942
|
-
"summary": "
|
|
1936
|
+
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
1943
1937
|
"enableJsonFlag": true,
|
|
1944
1938
|
"requiresProject": true,
|
|
1939
|
+
"FLAGGABLE_PROMPTS": {
|
|
1940
|
+
"api-name": {
|
|
1941
|
+
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1942
|
+
"promptMessage": "API name of the authoring bundle to validate"
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
1945
|
"isESM": true,
|
|
1946
1946
|
"relativePath": [
|
|
1947
1947
|
"lib",
|
|
1948
1948
|
"commands",
|
|
1949
1949
|
"agent",
|
|
1950
|
-
"
|
|
1951
|
-
"
|
|
1950
|
+
"validate",
|
|
1951
|
+
"authoring-bundle.js"
|
|
1952
1952
|
],
|
|
1953
1953
|
"aliasPermutations": [],
|
|
1954
1954
|
"permutations": [
|
|
1955
|
-
"agent:
|
|
1956
|
-
"
|
|
1957
|
-
"
|
|
1958
|
-
"agent:
|
|
1959
|
-
"
|
|
1960
|
-
"
|
|
1955
|
+
"agent:validate:authoring-bundle",
|
|
1956
|
+
"validate:agent:authoring-bundle",
|
|
1957
|
+
"validate:authoring-bundle:agent",
|
|
1958
|
+
"agent:authoring-bundle:validate",
|
|
1959
|
+
"authoring-bundle:agent:validate",
|
|
1960
|
+
"authoring-bundle:validate:agent"
|
|
1961
1961
|
]
|
|
1962
1962
|
}
|
|
1963
1963
|
},
|
|
1964
|
-
"version": "1.32.
|
|
1964
|
+
"version": "1.32.2"
|
|
1965
1965
|
}
|