@salesforce/plugin-agent 1.32.11 → 1.32.13
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/lib/commands/agent/generate/template.d.ts +1 -1
- package/oclif.manifest.json +423 -423
- package/package.json +4 -4
package/oclif.manifest.json
CHANGED
|
@@ -906,14 +906,14 @@
|
|
|
906
906
|
"authoring-bundle:publish:agent"
|
|
907
907
|
]
|
|
908
908
|
},
|
|
909
|
-
"agent:
|
|
909
|
+
"agent:preview:end": {
|
|
910
910
|
"aliases": [],
|
|
911
911
|
"args": {},
|
|
912
|
-
"description": "
|
|
912
|
+
"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.",
|
|
913
913
|
"examples": [
|
|
914
|
-
"
|
|
915
|
-
"
|
|
916
|
-
"
|
|
914
|
+
"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",
|
|
915
|
+
"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",
|
|
916
|
+
"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"
|
|
917
917
|
],
|
|
918
918
|
"flags": {
|
|
919
919
|
"json": {
|
|
@@ -931,20 +931,6 @@
|
|
|
931
931
|
"multiple": false,
|
|
932
932
|
"type": "option"
|
|
933
933
|
},
|
|
934
|
-
"api-name": {
|
|
935
|
-
"name": "api-name",
|
|
936
|
-
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
937
|
-
"hasDynamicHelp": false,
|
|
938
|
-
"multiple": false,
|
|
939
|
-
"type": "option"
|
|
940
|
-
},
|
|
941
|
-
"spec": {
|
|
942
|
-
"name": "spec",
|
|
943
|
-
"summary": "Path to the test spec YAML file.",
|
|
944
|
-
"hasDynamicHelp": false,
|
|
945
|
-
"multiple": false,
|
|
946
|
-
"type": "option"
|
|
947
|
-
},
|
|
948
934
|
"target-org": {
|
|
949
935
|
"char": "o",
|
|
950
936
|
"name": "target-org",
|
|
@@ -962,53 +948,66 @@
|
|
|
962
948
|
"multiple": false,
|
|
963
949
|
"type": "option"
|
|
964
950
|
},
|
|
965
|
-
"
|
|
966
|
-
"name": "
|
|
967
|
-
"
|
|
968
|
-
"
|
|
969
|
-
"
|
|
951
|
+
"session-id": {
|
|
952
|
+
"name": "session-id",
|
|
953
|
+
"required": false,
|
|
954
|
+
"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.",
|
|
955
|
+
"hasDynamicHelp": false,
|
|
956
|
+
"multiple": false,
|
|
957
|
+
"type": "option"
|
|
970
958
|
},
|
|
971
|
-
"
|
|
972
|
-
"
|
|
973
|
-
"
|
|
974
|
-
"
|
|
975
|
-
"
|
|
959
|
+
"api-name": {
|
|
960
|
+
"char": "n",
|
|
961
|
+
"name": "api-name",
|
|
962
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
963
|
+
"hasDynamicHelp": false,
|
|
964
|
+
"multiple": false,
|
|
965
|
+
"type": "option"
|
|
966
|
+
},
|
|
967
|
+
"authoring-bundle": {
|
|
968
|
+
"name": "authoring-bundle",
|
|
969
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
970
|
+
"hasDynamicHelp": false,
|
|
971
|
+
"multiple": false,
|
|
972
|
+
"type": "option"
|
|
976
973
|
}
|
|
977
974
|
},
|
|
978
975
|
"hasDynamicHelp": true,
|
|
979
976
|
"hiddenAliases": [],
|
|
980
|
-
"id": "agent:
|
|
977
|
+
"id": "agent:preview:end",
|
|
981
978
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
982
979
|
"pluginName": "@salesforce/plugin-agent",
|
|
983
980
|
"pluginType": "core",
|
|
984
981
|
"strict": true,
|
|
985
|
-
"summary": "
|
|
982
|
+
"summary": "End an existing programmatic agent preview session and get trace location.",
|
|
986
983
|
"enableJsonFlag": true,
|
|
984
|
+
"requiresProject": true,
|
|
987
985
|
"isESM": true,
|
|
988
986
|
"relativePath": [
|
|
989
987
|
"lib",
|
|
990
988
|
"commands",
|
|
991
989
|
"agent",
|
|
992
|
-
"
|
|
993
|
-
"
|
|
990
|
+
"preview",
|
|
991
|
+
"end.js"
|
|
994
992
|
],
|
|
995
993
|
"aliasPermutations": [],
|
|
996
994
|
"permutations": [
|
|
997
|
-
"agent:
|
|
998
|
-
"
|
|
999
|
-
"
|
|
1000
|
-
"agent:
|
|
1001
|
-
"
|
|
1002
|
-
"
|
|
995
|
+
"agent:preview:end",
|
|
996
|
+
"preview:agent:end",
|
|
997
|
+
"preview:end:agent",
|
|
998
|
+
"agent:end:preview",
|
|
999
|
+
"end:agent:preview",
|
|
1000
|
+
"end:preview:agent"
|
|
1003
1001
|
]
|
|
1004
1002
|
},
|
|
1005
|
-
"agent:
|
|
1003
|
+
"agent:preview:send": {
|
|
1006
1004
|
"aliases": [],
|
|
1007
1005
|
"args": {},
|
|
1008
|
-
"description": "
|
|
1006
|
+
"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.",
|
|
1009
1007
|
"examples": [
|
|
1010
|
-
"
|
|
1011
|
-
"
|
|
1008
|
+
"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>",
|
|
1009
|
+
"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",
|
|
1010
|
+
"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"
|
|
1012
1011
|
],
|
|
1013
1012
|
"flags": {
|
|
1014
1013
|
"json": {
|
|
@@ -1042,43 +1041,128 @@
|
|
|
1042
1041
|
"hasDynamicHelp": false,
|
|
1043
1042
|
"multiple": false,
|
|
1044
1043
|
"type": "option"
|
|
1044
|
+
},
|
|
1045
|
+
"session-id": {
|
|
1046
|
+
"name": "session-id",
|
|
1047
|
+
"required": false,
|
|
1048
|
+
"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.",
|
|
1049
|
+
"hasDynamicHelp": false,
|
|
1050
|
+
"multiple": false,
|
|
1051
|
+
"type": "option"
|
|
1052
|
+
},
|
|
1053
|
+
"utterance": {
|
|
1054
|
+
"char": "u",
|
|
1055
|
+
"name": "utterance",
|
|
1056
|
+
"required": true,
|
|
1057
|
+
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1058
|
+
"hasDynamicHelp": false,
|
|
1059
|
+
"multiple": false,
|
|
1060
|
+
"type": "option"
|
|
1061
|
+
},
|
|
1062
|
+
"api-name": {
|
|
1063
|
+
"char": "n",
|
|
1064
|
+
"name": "api-name",
|
|
1065
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1066
|
+
"hasDynamicHelp": false,
|
|
1067
|
+
"multiple": false,
|
|
1068
|
+
"type": "option"
|
|
1069
|
+
},
|
|
1070
|
+
"authoring-bundle": {
|
|
1071
|
+
"name": "authoring-bundle",
|
|
1072
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1073
|
+
"hasDynamicHelp": false,
|
|
1074
|
+
"multiple": false,
|
|
1075
|
+
"type": "option"
|
|
1045
1076
|
}
|
|
1046
1077
|
},
|
|
1047
1078
|
"hasDynamicHelp": true,
|
|
1048
1079
|
"hiddenAliases": [],
|
|
1049
|
-
"id": "agent:
|
|
1080
|
+
"id": "agent:preview:send",
|
|
1050
1081
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1051
1082
|
"pluginName": "@salesforce/plugin-agent",
|
|
1052
1083
|
"pluginType": "core",
|
|
1053
1084
|
"strict": true,
|
|
1054
|
-
"summary": "
|
|
1085
|
+
"summary": "Send a message to an existing agent preview session.",
|
|
1055
1086
|
"enableJsonFlag": true,
|
|
1087
|
+
"requiresProject": true,
|
|
1056
1088
|
"isESM": true,
|
|
1057
1089
|
"relativePath": [
|
|
1058
1090
|
"lib",
|
|
1059
1091
|
"commands",
|
|
1060
1092
|
"agent",
|
|
1061
|
-
"
|
|
1062
|
-
"
|
|
1093
|
+
"preview",
|
|
1094
|
+
"send.js"
|
|
1063
1095
|
],
|
|
1064
1096
|
"aliasPermutations": [],
|
|
1065
1097
|
"permutations": [
|
|
1066
|
-
"agent:
|
|
1067
|
-
"
|
|
1068
|
-
"
|
|
1069
|
-
"agent:
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1098
|
+
"agent:preview:send",
|
|
1099
|
+
"preview:agent:send",
|
|
1100
|
+
"preview:send:agent",
|
|
1101
|
+
"agent:send:preview",
|
|
1102
|
+
"send:agent:preview",
|
|
1103
|
+
"send:preview:agent"
|
|
1072
1104
|
]
|
|
1073
1105
|
},
|
|
1074
|
-
"agent:
|
|
1106
|
+
"agent:preview:sessions": {
|
|
1075
1107
|
"aliases": [],
|
|
1076
1108
|
"args": {},
|
|
1077
|
-
"description": "This command
|
|
1109
|
+
"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.",
|
|
1078
1110
|
"examples": [
|
|
1079
|
-
"
|
|
1080
|
-
|
|
1081
|
-
|
|
1111
|
+
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
1112
|
+
],
|
|
1113
|
+
"flags": {
|
|
1114
|
+
"json": {
|
|
1115
|
+
"description": "Format output as json.",
|
|
1116
|
+
"helpGroup": "GLOBAL",
|
|
1117
|
+
"name": "json",
|
|
1118
|
+
"allowNo": false,
|
|
1119
|
+
"type": "boolean"
|
|
1120
|
+
},
|
|
1121
|
+
"flags-dir": {
|
|
1122
|
+
"helpGroup": "GLOBAL",
|
|
1123
|
+
"name": "flags-dir",
|
|
1124
|
+
"summary": "Import flag values from a directory.",
|
|
1125
|
+
"hasDynamicHelp": false,
|
|
1126
|
+
"multiple": false,
|
|
1127
|
+
"type": "option"
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
"hasDynamicHelp": false,
|
|
1131
|
+
"hiddenAliases": [],
|
|
1132
|
+
"id": "agent:preview:sessions",
|
|
1133
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
1134
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
1135
|
+
"pluginType": "core",
|
|
1136
|
+
"strict": true,
|
|
1137
|
+
"summary": "List all known programmatic agent preview sessions.",
|
|
1138
|
+
"enableJsonFlag": true,
|
|
1139
|
+
"requiresProject": true,
|
|
1140
|
+
"isESM": true,
|
|
1141
|
+
"relativePath": [
|
|
1142
|
+
"lib",
|
|
1143
|
+
"commands",
|
|
1144
|
+
"agent",
|
|
1145
|
+
"preview",
|
|
1146
|
+
"sessions.js"
|
|
1147
|
+
],
|
|
1148
|
+
"aliasPermutations": [],
|
|
1149
|
+
"permutations": [
|
|
1150
|
+
"agent:preview:sessions",
|
|
1151
|
+
"preview:agent:sessions",
|
|
1152
|
+
"preview:sessions:agent",
|
|
1153
|
+
"agent:sessions:preview",
|
|
1154
|
+
"sessions:agent:preview",
|
|
1155
|
+
"sessions:preview:agent"
|
|
1156
|
+
]
|
|
1157
|
+
},
|
|
1158
|
+
"agent:preview:start": {
|
|
1159
|
+
"aliases": [],
|
|
1160
|
+
"args": {},
|
|
1161
|
+
"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.",
|
|
1162
|
+
"examples": [
|
|
1163
|
+
"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",
|
|
1164
|
+
"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",
|
|
1165
|
+
"Start a preview session with an activated published agent:\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
1082
1166
|
],
|
|
1083
1167
|
"flags": {
|
|
1084
1168
|
"json": {
|
|
@@ -1113,81 +1197,64 @@
|
|
|
1113
1197
|
"multiple": false,
|
|
1114
1198
|
"type": "option"
|
|
1115
1199
|
},
|
|
1116
|
-
"
|
|
1117
|
-
"char": "
|
|
1118
|
-
"name": "
|
|
1119
|
-
"
|
|
1120
|
-
"summary": "Job ID of the completed agent test run.",
|
|
1121
|
-
"hasDynamicHelp": false,
|
|
1122
|
-
"multiple": false,
|
|
1123
|
-
"type": "option"
|
|
1124
|
-
},
|
|
1125
|
-
"result-format": {
|
|
1126
|
-
"name": "result-format",
|
|
1127
|
-
"summary": "Format of the agent test run results.",
|
|
1128
|
-
"default": "human",
|
|
1200
|
+
"api-name": {
|
|
1201
|
+
"char": "n",
|
|
1202
|
+
"name": "api-name",
|
|
1203
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1129
1204
|
"hasDynamicHelp": false,
|
|
1130
1205
|
"multiple": false,
|
|
1131
|
-
"options": [
|
|
1132
|
-
"json",
|
|
1133
|
-
"human",
|
|
1134
|
-
"junit",
|
|
1135
|
-
"tap"
|
|
1136
|
-
],
|
|
1137
1206
|
"type": "option"
|
|
1138
1207
|
},
|
|
1139
|
-
"
|
|
1140
|
-
"
|
|
1141
|
-
"
|
|
1142
|
-
"name": "output-dir",
|
|
1143
|
-
"summary": "Directory to write the agent test results into.",
|
|
1208
|
+
"authoring-bundle": {
|
|
1209
|
+
"name": "authoring-bundle",
|
|
1210
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1144
1211
|
"hasDynamicHelp": false,
|
|
1145
1212
|
"multiple": false,
|
|
1146
1213
|
"type": "option"
|
|
1147
1214
|
},
|
|
1148
|
-
"
|
|
1149
|
-
"
|
|
1150
|
-
"
|
|
1151
|
-
"summary": "Show generated data in the test results output.",
|
|
1215
|
+
"use-live-actions": {
|
|
1216
|
+
"name": "use-live-actions",
|
|
1217
|
+
"summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
|
|
1152
1218
|
"allowNo": false,
|
|
1153
1219
|
"type": "boolean"
|
|
1154
1220
|
}
|
|
1155
1221
|
},
|
|
1156
1222
|
"hasDynamicHelp": true,
|
|
1157
1223
|
"hiddenAliases": [],
|
|
1158
|
-
"id": "agent:
|
|
1224
|
+
"id": "agent:preview:start",
|
|
1159
1225
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1160
1226
|
"pluginName": "@salesforce/plugin-agent",
|
|
1161
1227
|
"pluginType": "core",
|
|
1162
1228
|
"strict": true,
|
|
1163
|
-
"summary": "
|
|
1229
|
+
"summary": "Start a programmatic agent preview session.",
|
|
1164
1230
|
"enableJsonFlag": true,
|
|
1231
|
+
"requiresProject": true,
|
|
1165
1232
|
"isESM": true,
|
|
1166
1233
|
"relativePath": [
|
|
1167
1234
|
"lib",
|
|
1168
1235
|
"commands",
|
|
1169
1236
|
"agent",
|
|
1170
|
-
"
|
|
1171
|
-
"
|
|
1237
|
+
"preview",
|
|
1238
|
+
"start.js"
|
|
1172
1239
|
],
|
|
1173
1240
|
"aliasPermutations": [],
|
|
1174
1241
|
"permutations": [
|
|
1175
|
-
"agent:
|
|
1176
|
-
"
|
|
1177
|
-
"
|
|
1178
|
-
"agent:
|
|
1179
|
-
"
|
|
1180
|
-
"
|
|
1242
|
+
"agent:preview:start",
|
|
1243
|
+
"preview:agent:start",
|
|
1244
|
+
"preview:start:agent",
|
|
1245
|
+
"agent:start:preview",
|
|
1246
|
+
"start:agent:preview",
|
|
1247
|
+
"start:preview:agent"
|
|
1181
1248
|
]
|
|
1182
1249
|
},
|
|
1183
|
-
"agent:test:
|
|
1250
|
+
"agent:test:create": {
|
|
1184
1251
|
"aliases": [],
|
|
1185
1252
|
"args": {},
|
|
1186
|
-
"description": "
|
|
1253
|
+
"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.",
|
|
1187
1254
|
"examples": [
|
|
1188
|
-
"
|
|
1189
|
-
"
|
|
1190
|
-
"
|
|
1255
|
+
"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 %>",
|
|
1256
|
+
"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",
|
|
1257
|
+
"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"
|
|
1191
1258
|
],
|
|
1192
1259
|
"flags": {
|
|
1193
1260
|
"json": {
|
|
@@ -1205,6 +1272,20 @@
|
|
|
1205
1272
|
"multiple": false,
|
|
1206
1273
|
"type": "option"
|
|
1207
1274
|
},
|
|
1275
|
+
"api-name": {
|
|
1276
|
+
"name": "api-name",
|
|
1277
|
+
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1278
|
+
"hasDynamicHelp": false,
|
|
1279
|
+
"multiple": false,
|
|
1280
|
+
"type": "option"
|
|
1281
|
+
},
|
|
1282
|
+
"spec": {
|
|
1283
|
+
"name": "spec",
|
|
1284
|
+
"summary": "Path to the test spec YAML file.",
|
|
1285
|
+
"hasDynamicHelp": false,
|
|
1286
|
+
"multiple": false,
|
|
1287
|
+
"type": "option"
|
|
1288
|
+
},
|
|
1208
1289
|
"target-org": {
|
|
1209
1290
|
"char": "o",
|
|
1210
1291
|
"name": "target-org",
|
|
@@ -1222,69 +1303,27 @@
|
|
|
1222
1303
|
"multiple": false,
|
|
1223
1304
|
"type": "option"
|
|
1224
1305
|
},
|
|
1225
|
-
"
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1228
|
-
"
|
|
1229
|
-
"
|
|
1230
|
-
"multiple": false,
|
|
1231
|
-
"type": "option"
|
|
1232
|
-
},
|
|
1233
|
-
"use-most-recent": {
|
|
1234
|
-
"char": "r",
|
|
1235
|
-
"name": "use-most-recent",
|
|
1236
|
-
"summary": "Use the job ID of the most recent agent test run.",
|
|
1237
|
-
"allowNo": false,
|
|
1238
|
-
"type": "boolean"
|
|
1239
|
-
},
|
|
1240
|
-
"wait": {
|
|
1241
|
-
"char": "w",
|
|
1242
|
-
"name": "wait",
|
|
1243
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1244
|
-
"default": "5 minutes",
|
|
1245
|
-
"hasDynamicHelp": true,
|
|
1246
|
-
"multiple": false,
|
|
1247
|
-
"type": "option"
|
|
1248
|
-
},
|
|
1249
|
-
"result-format": {
|
|
1250
|
-
"name": "result-format",
|
|
1251
|
-
"summary": "Format of the agent test run results.",
|
|
1252
|
-
"default": "human",
|
|
1253
|
-
"hasDynamicHelp": false,
|
|
1254
|
-
"multiple": false,
|
|
1255
|
-
"options": [
|
|
1256
|
-
"json",
|
|
1257
|
-
"human",
|
|
1258
|
-
"junit",
|
|
1259
|
-
"tap"
|
|
1260
|
-
],
|
|
1261
|
-
"type": "option"
|
|
1262
|
-
},
|
|
1263
|
-
"output-dir": {
|
|
1264
|
-
"char": "d",
|
|
1265
|
-
"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.",
|
|
1266
|
-
"name": "output-dir",
|
|
1267
|
-
"summary": "Directory to write the agent test results into.",
|
|
1268
|
-
"hasDynamicHelp": false,
|
|
1269
|
-
"multiple": false,
|
|
1270
|
-
"type": "option"
|
|
1306
|
+
"preview": {
|
|
1307
|
+
"name": "preview",
|
|
1308
|
+
"summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
|
|
1309
|
+
"allowNo": false,
|
|
1310
|
+
"type": "boolean"
|
|
1271
1311
|
},
|
|
1272
|
-
"
|
|
1273
|
-
"
|
|
1274
|
-
"
|
|
1275
|
-
"summary": "Show generated data in the test results output.",
|
|
1312
|
+
"force-overwrite": {
|
|
1313
|
+
"name": "force-overwrite",
|
|
1314
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
1276
1315
|
"allowNo": false,
|
|
1277
1316
|
"type": "boolean"
|
|
1278
1317
|
}
|
|
1279
1318
|
},
|
|
1280
1319
|
"hasDynamicHelp": true,
|
|
1281
1320
|
"hiddenAliases": [],
|
|
1282
|
-
"id": "agent:test:
|
|
1321
|
+
"id": "agent:test:create",
|
|
1283
1322
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1284
1323
|
"pluginName": "@salesforce/plugin-agent",
|
|
1285
1324
|
"pluginType": "core",
|
|
1286
1325
|
"strict": true,
|
|
1287
|
-
"summary": "
|
|
1326
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
1288
1327
|
"enableJsonFlag": true,
|
|
1289
1328
|
"isESM": true,
|
|
1290
1329
|
"relativePath": [
|
|
@@ -1292,29 +1331,25 @@
|
|
|
1292
1331
|
"commands",
|
|
1293
1332
|
"agent",
|
|
1294
1333
|
"test",
|
|
1295
|
-
"
|
|
1334
|
+
"create.js"
|
|
1296
1335
|
],
|
|
1297
1336
|
"aliasPermutations": [],
|
|
1298
1337
|
"permutations": [
|
|
1299
|
-
"agent:test:
|
|
1300
|
-
"test:agent:
|
|
1301
|
-
"test:
|
|
1302
|
-
"agent:
|
|
1303
|
-
"
|
|
1304
|
-
"
|
|
1338
|
+
"agent:test:create",
|
|
1339
|
+
"test:agent:create",
|
|
1340
|
+
"test:create:agent",
|
|
1341
|
+
"agent:create:test",
|
|
1342
|
+
"create:agent:test",
|
|
1343
|
+
"create:test:agent"
|
|
1305
1344
|
]
|
|
1306
1345
|
},
|
|
1307
|
-
"agent:test:
|
|
1346
|
+
"agent:test:list": {
|
|
1308
1347
|
"aliases": [],
|
|
1309
1348
|
"args": {},
|
|
1310
|
-
"description": "
|
|
1349
|
+
"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.",
|
|
1311
1350
|
"examples": [
|
|
1312
|
-
"
|
|
1313
|
-
"
|
|
1314
|
-
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
|
|
1315
|
-
"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",
|
|
1316
|
-
"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",
|
|
1317
|
-
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1351
|
+
"List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1352
|
+
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
1318
1353
|
],
|
|
1319
1354
|
"flags": {
|
|
1320
1355
|
"json": {
|
|
@@ -1348,72 +1383,16 @@
|
|
|
1348
1383
|
"hasDynamicHelp": false,
|
|
1349
1384
|
"multiple": false,
|
|
1350
1385
|
"type": "option"
|
|
1351
|
-
},
|
|
1352
|
-
"spec": {
|
|
1353
|
-
"char": "s",
|
|
1354
|
-
"name": "spec",
|
|
1355
|
-
"required": true,
|
|
1356
|
-
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1357
|
-
"hasDynamicHelp": false,
|
|
1358
|
-
"multiple": false,
|
|
1359
|
-
"type": "option"
|
|
1360
|
-
},
|
|
1361
|
-
"api-name": {
|
|
1362
|
-
"char": "n",
|
|
1363
|
-
"name": "api-name",
|
|
1364
|
-
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1365
|
-
"hasDynamicHelp": false,
|
|
1366
|
-
"multiple": false,
|
|
1367
|
-
"type": "option"
|
|
1368
|
-
},
|
|
1369
|
-
"wait": {
|
|
1370
|
-
"char": "w",
|
|
1371
|
-
"name": "wait",
|
|
1372
|
-
"summary": "Number of minutes to wait for results.",
|
|
1373
|
-
"default": 10,
|
|
1374
|
-
"hasDynamicHelp": false,
|
|
1375
|
-
"multiple": false,
|
|
1376
|
-
"type": "option"
|
|
1377
|
-
},
|
|
1378
|
-
"result-format": {
|
|
1379
|
-
"name": "result-format",
|
|
1380
|
-
"summary": "Format of the agent test run results.",
|
|
1381
|
-
"default": "human",
|
|
1382
|
-
"hasDynamicHelp": false,
|
|
1383
|
-
"multiple": false,
|
|
1384
|
-
"options": [
|
|
1385
|
-
"json",
|
|
1386
|
-
"human",
|
|
1387
|
-
"junit",
|
|
1388
|
-
"tap"
|
|
1389
|
-
],
|
|
1390
|
-
"type": "option"
|
|
1391
|
-
},
|
|
1392
|
-
"batch-size": {
|
|
1393
|
-
"name": "batch-size",
|
|
1394
|
-
"summary": "Number of tests per API request (max 5).",
|
|
1395
|
-
"default": 5,
|
|
1396
|
-
"hasDynamicHelp": false,
|
|
1397
|
-
"multiple": false,
|
|
1398
|
-
"type": "option"
|
|
1399
|
-
},
|
|
1400
|
-
"no-normalize": {
|
|
1401
|
-
"name": "no-normalize",
|
|
1402
|
-
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1403
|
-
"allowNo": false,
|
|
1404
|
-
"type": "boolean"
|
|
1405
1386
|
}
|
|
1406
1387
|
},
|
|
1407
1388
|
"hasDynamicHelp": true,
|
|
1408
|
-
"hidden": true,
|
|
1409
1389
|
"hiddenAliases": [],
|
|
1410
|
-
"id": "agent:test:
|
|
1390
|
+
"id": "agent:test:list",
|
|
1411
1391
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1412
1392
|
"pluginName": "@salesforce/plugin-agent",
|
|
1413
1393
|
"pluginType": "core",
|
|
1414
|
-
"state": "beta",
|
|
1415
1394
|
"strict": true,
|
|
1416
|
-
"summary": "
|
|
1395
|
+
"summary": "List the available agent tests in your org.",
|
|
1417
1396
|
"enableJsonFlag": true,
|
|
1418
1397
|
"isESM": true,
|
|
1419
1398
|
"relativePath": [
|
|
@@ -1421,26 +1400,26 @@
|
|
|
1421
1400
|
"commands",
|
|
1422
1401
|
"agent",
|
|
1423
1402
|
"test",
|
|
1424
|
-
"
|
|
1403
|
+
"list.js"
|
|
1425
1404
|
],
|
|
1426
1405
|
"aliasPermutations": [],
|
|
1427
1406
|
"permutations": [
|
|
1428
|
-
"agent:test:
|
|
1429
|
-
"test:agent:
|
|
1430
|
-
"test:
|
|
1431
|
-
"agent:
|
|
1432
|
-
"
|
|
1433
|
-
"
|
|
1407
|
+
"agent:test:list",
|
|
1408
|
+
"test:agent:list",
|
|
1409
|
+
"test:list:agent",
|
|
1410
|
+
"agent:list:test",
|
|
1411
|
+
"list:agent:test",
|
|
1412
|
+
"list:test:agent"
|
|
1434
1413
|
]
|
|
1435
1414
|
},
|
|
1436
|
-
"agent:test:
|
|
1415
|
+
"agent:test:results": {
|
|
1437
1416
|
"aliases": [],
|
|
1438
1417
|
"args": {},
|
|
1439
|
-
"description": "
|
|
1418
|
+
"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.",
|
|
1440
1419
|
"examples": [
|
|
1441
|
-
"
|
|
1442
|
-
"
|
|
1443
|
-
"
|
|
1420
|
+
"Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1421
|
+
"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",
|
|
1422
|
+
"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"
|
|
1444
1423
|
],
|
|
1445
1424
|
"flags": {
|
|
1446
1425
|
"json": {
|
|
@@ -1475,22 +1454,15 @@
|
|
|
1475
1454
|
"multiple": false,
|
|
1476
1455
|
"type": "option"
|
|
1477
1456
|
},
|
|
1478
|
-
"
|
|
1479
|
-
"char": "
|
|
1480
|
-
"name": "
|
|
1481
|
-
"
|
|
1457
|
+
"job-id": {
|
|
1458
|
+
"char": "i",
|
|
1459
|
+
"name": "job-id",
|
|
1460
|
+
"required": true,
|
|
1461
|
+
"summary": "Job ID of the completed agent test run.",
|
|
1482
1462
|
"hasDynamicHelp": false,
|
|
1483
1463
|
"multiple": false,
|
|
1484
1464
|
"type": "option"
|
|
1485
1465
|
},
|
|
1486
|
-
"wait": {
|
|
1487
|
-
"char": "w",
|
|
1488
|
-
"name": "wait",
|
|
1489
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1490
|
-
"hasDynamicHelp": true,
|
|
1491
|
-
"multiple": false,
|
|
1492
|
-
"type": "option"
|
|
1493
|
-
},
|
|
1494
1466
|
"result-format": {
|
|
1495
1467
|
"name": "result-format",
|
|
1496
1468
|
"summary": "Format of the agent test run results.",
|
|
@@ -1524,12 +1496,12 @@
|
|
|
1524
1496
|
},
|
|
1525
1497
|
"hasDynamicHelp": true,
|
|
1526
1498
|
"hiddenAliases": [],
|
|
1527
|
-
"id": "agent:test:
|
|
1499
|
+
"id": "agent:test:results",
|
|
1528
1500
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1529
1501
|
"pluginName": "@salesforce/plugin-agent",
|
|
1530
1502
|
"pluginType": "core",
|
|
1531
1503
|
"strict": true,
|
|
1532
|
-
"summary": "
|
|
1504
|
+
"summary": "Get the results of a completed agent test run.",
|
|
1533
1505
|
"enableJsonFlag": true,
|
|
1534
1506
|
"isESM": true,
|
|
1535
1507
|
"relativePath": [
|
|
@@ -1537,25 +1509,26 @@
|
|
|
1537
1509
|
"commands",
|
|
1538
1510
|
"agent",
|
|
1539
1511
|
"test",
|
|
1540
|
-
"
|
|
1512
|
+
"results.js"
|
|
1541
1513
|
],
|
|
1542
1514
|
"aliasPermutations": [],
|
|
1543
1515
|
"permutations": [
|
|
1544
|
-
"agent:test:
|
|
1545
|
-
"test:agent:
|
|
1546
|
-
"test:
|
|
1547
|
-
"agent:
|
|
1548
|
-
"
|
|
1549
|
-
"
|
|
1516
|
+
"agent:test:results",
|
|
1517
|
+
"test:agent:results",
|
|
1518
|
+
"test:results:agent",
|
|
1519
|
+
"agent:results:test",
|
|
1520
|
+
"results:agent:test",
|
|
1521
|
+
"results:test:agent"
|
|
1550
1522
|
]
|
|
1551
1523
|
},
|
|
1552
|
-
"agent:
|
|
1524
|
+
"agent:test:resume": {
|
|
1553
1525
|
"aliases": [],
|
|
1554
1526
|
"args": {},
|
|
1555
|
-
"description": "
|
|
1527
|
+
"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.",
|
|
1556
1528
|
"examples": [
|
|
1557
|
-
"
|
|
1558
|
-
"
|
|
1529
|
+
"Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1530
|
+
"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",
|
|
1531
|
+
"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"
|
|
1559
1532
|
],
|
|
1560
1533
|
"flags": {
|
|
1561
1534
|
"json": {
|
|
@@ -1590,57 +1563,99 @@
|
|
|
1590
1563
|
"multiple": false,
|
|
1591
1564
|
"type": "option"
|
|
1592
1565
|
},
|
|
1593
|
-
"
|
|
1594
|
-
"char": "
|
|
1595
|
-
"name": "
|
|
1596
|
-
"summary": "
|
|
1566
|
+
"job-id": {
|
|
1567
|
+
"char": "i",
|
|
1568
|
+
"name": "job-id",
|
|
1569
|
+
"summary": "Job ID of the original agent test run.",
|
|
1570
|
+
"hasDynamicHelp": false,
|
|
1571
|
+
"multiple": false,
|
|
1572
|
+
"type": "option"
|
|
1573
|
+
},
|
|
1574
|
+
"use-most-recent": {
|
|
1575
|
+
"char": "r",
|
|
1576
|
+
"name": "use-most-recent",
|
|
1577
|
+
"summary": "Use the job ID of the most recent agent test run.",
|
|
1578
|
+
"allowNo": false,
|
|
1579
|
+
"type": "boolean"
|
|
1580
|
+
},
|
|
1581
|
+
"wait": {
|
|
1582
|
+
"char": "w",
|
|
1583
|
+
"name": "wait",
|
|
1584
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1585
|
+
"default": "5 minutes",
|
|
1586
|
+
"hasDynamicHelp": true,
|
|
1587
|
+
"multiple": false,
|
|
1588
|
+
"type": "option"
|
|
1589
|
+
},
|
|
1590
|
+
"result-format": {
|
|
1591
|
+
"name": "result-format",
|
|
1592
|
+
"summary": "Format of the agent test run results.",
|
|
1593
|
+
"default": "human",
|
|
1594
|
+
"hasDynamicHelp": false,
|
|
1595
|
+
"multiple": false,
|
|
1596
|
+
"options": [
|
|
1597
|
+
"json",
|
|
1598
|
+
"human",
|
|
1599
|
+
"junit",
|
|
1600
|
+
"tap"
|
|
1601
|
+
],
|
|
1602
|
+
"type": "option"
|
|
1603
|
+
},
|
|
1604
|
+
"output-dir": {
|
|
1605
|
+
"char": "d",
|
|
1606
|
+
"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.",
|
|
1607
|
+
"name": "output-dir",
|
|
1608
|
+
"summary": "Directory to write the agent test results into.",
|
|
1597
1609
|
"hasDynamicHelp": false,
|
|
1598
1610
|
"multiple": false,
|
|
1599
1611
|
"type": "option"
|
|
1612
|
+
},
|
|
1613
|
+
"verbose": {
|
|
1614
|
+
"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.",
|
|
1615
|
+
"name": "verbose",
|
|
1616
|
+
"summary": "Show generated data in the test results output.",
|
|
1617
|
+
"allowNo": false,
|
|
1618
|
+
"type": "boolean"
|
|
1600
1619
|
}
|
|
1601
1620
|
},
|
|
1602
1621
|
"hasDynamicHelp": true,
|
|
1603
1622
|
"hiddenAliases": [],
|
|
1604
|
-
"id": "agent:
|
|
1623
|
+
"id": "agent:test:resume",
|
|
1605
1624
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1606
1625
|
"pluginName": "@salesforce/plugin-agent",
|
|
1607
1626
|
"pluginType": "core",
|
|
1608
1627
|
"strict": true,
|
|
1609
|
-
"summary": "
|
|
1628
|
+
"summary": "Resume an agent test that you previously started in your org so you can view the test results.",
|
|
1610
1629
|
"enableJsonFlag": true,
|
|
1611
|
-
"requiresProject": true,
|
|
1612
|
-
"FLAGGABLE_PROMPTS": {
|
|
1613
|
-
"api-name": {
|
|
1614
|
-
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1615
|
-
"promptMessage": "API name of the authoring bundle to validate"
|
|
1616
|
-
}
|
|
1617
|
-
},
|
|
1618
1630
|
"isESM": true,
|
|
1619
1631
|
"relativePath": [
|
|
1620
1632
|
"lib",
|
|
1621
1633
|
"commands",
|
|
1622
1634
|
"agent",
|
|
1623
|
-
"
|
|
1624
|
-
"
|
|
1635
|
+
"test",
|
|
1636
|
+
"resume.js"
|
|
1625
1637
|
],
|
|
1626
1638
|
"aliasPermutations": [],
|
|
1627
1639
|
"permutations": [
|
|
1628
|
-
"agent:
|
|
1629
|
-
"
|
|
1630
|
-
"
|
|
1631
|
-
"agent:
|
|
1632
|
-
"
|
|
1633
|
-
"
|
|
1640
|
+
"agent:test:resume",
|
|
1641
|
+
"test:agent:resume",
|
|
1642
|
+
"test:resume:agent",
|
|
1643
|
+
"agent:resume:test",
|
|
1644
|
+
"resume:agent:test",
|
|
1645
|
+
"resume:test:agent"
|
|
1634
1646
|
]
|
|
1635
1647
|
},
|
|
1636
|
-
"agent:
|
|
1648
|
+
"agent:test:run-eval": {
|
|
1637
1649
|
"aliases": [],
|
|
1638
1650
|
"args": {},
|
|
1639
|
-
"description": "
|
|
1640
|
-
"examples": [
|
|
1641
|
-
"
|
|
1642
|
-
"
|
|
1643
|
-
"
|
|
1651
|
+
"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.",
|
|
1652
|
+
"examples": [
|
|
1653
|
+
"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",
|
|
1654
|
+
"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",
|
|
1655
|
+
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
|
|
1656
|
+
"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",
|
|
1657
|
+
"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",
|
|
1658
|
+
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1644
1659
|
],
|
|
1645
1660
|
"flags": {
|
|
1646
1661
|
"json": {
|
|
@@ -1675,10 +1690,11 @@
|
|
|
1675
1690
|
"multiple": false,
|
|
1676
1691
|
"type": "option"
|
|
1677
1692
|
},
|
|
1678
|
-
"
|
|
1679
|
-
"
|
|
1680
|
-
"
|
|
1681
|
-
"
|
|
1693
|
+
"spec": {
|
|
1694
|
+
"char": "s",
|
|
1695
|
+
"name": "spec",
|
|
1696
|
+
"required": true,
|
|
1697
|
+
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1682
1698
|
"hasDynamicHelp": false,
|
|
1683
1699
|
"multiple": false,
|
|
1684
1700
|
"type": "option"
|
|
@@ -1686,55 +1702,86 @@
|
|
|
1686
1702
|
"api-name": {
|
|
1687
1703
|
"char": "n",
|
|
1688
1704
|
"name": "api-name",
|
|
1689
|
-
"summary": "API name
|
|
1705
|
+
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1690
1706
|
"hasDynamicHelp": false,
|
|
1691
1707
|
"multiple": false,
|
|
1692
1708
|
"type": "option"
|
|
1693
1709
|
},
|
|
1694
|
-
"
|
|
1695
|
-
"
|
|
1696
|
-
"
|
|
1710
|
+
"wait": {
|
|
1711
|
+
"char": "w",
|
|
1712
|
+
"name": "wait",
|
|
1713
|
+
"summary": "Number of minutes to wait for results.",
|
|
1714
|
+
"default": 10,
|
|
1715
|
+
"hasDynamicHelp": false,
|
|
1716
|
+
"multiple": false,
|
|
1717
|
+
"type": "option"
|
|
1718
|
+
},
|
|
1719
|
+
"result-format": {
|
|
1720
|
+
"name": "result-format",
|
|
1721
|
+
"summary": "Format of the agent test run results.",
|
|
1722
|
+
"default": "human",
|
|
1723
|
+
"hasDynamicHelp": false,
|
|
1724
|
+
"multiple": false,
|
|
1725
|
+
"options": [
|
|
1726
|
+
"json",
|
|
1727
|
+
"human",
|
|
1728
|
+
"junit",
|
|
1729
|
+
"tap"
|
|
1730
|
+
],
|
|
1731
|
+
"type": "option"
|
|
1732
|
+
},
|
|
1733
|
+
"batch-size": {
|
|
1734
|
+
"name": "batch-size",
|
|
1735
|
+
"summary": "Number of tests per API request (max 5).",
|
|
1736
|
+
"default": 5,
|
|
1697
1737
|
"hasDynamicHelp": false,
|
|
1698
1738
|
"multiple": false,
|
|
1699
1739
|
"type": "option"
|
|
1740
|
+
},
|
|
1741
|
+
"no-normalize": {
|
|
1742
|
+
"name": "no-normalize",
|
|
1743
|
+
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1744
|
+
"allowNo": false,
|
|
1745
|
+
"type": "boolean"
|
|
1700
1746
|
}
|
|
1701
1747
|
},
|
|
1702
1748
|
"hasDynamicHelp": true,
|
|
1749
|
+
"hidden": true,
|
|
1703
1750
|
"hiddenAliases": [],
|
|
1704
|
-
"id": "agent:
|
|
1751
|
+
"id": "agent:test:run-eval",
|
|
1705
1752
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1706
1753
|
"pluginName": "@salesforce/plugin-agent",
|
|
1707
1754
|
"pluginType": "core",
|
|
1755
|
+
"state": "beta",
|
|
1708
1756
|
"strict": true,
|
|
1709
|
-
"summary": "
|
|
1757
|
+
"summary": "Run evaluation tests against an Agentforce agent.",
|
|
1710
1758
|
"enableJsonFlag": true,
|
|
1711
|
-
"requiresProject": true,
|
|
1712
1759
|
"isESM": true,
|
|
1713
1760
|
"relativePath": [
|
|
1714
1761
|
"lib",
|
|
1715
1762
|
"commands",
|
|
1716
1763
|
"agent",
|
|
1717
|
-
"
|
|
1718
|
-
"
|
|
1764
|
+
"test",
|
|
1765
|
+
"run-eval.js"
|
|
1719
1766
|
],
|
|
1720
1767
|
"aliasPermutations": [],
|
|
1721
1768
|
"permutations": [
|
|
1722
|
-
"agent:
|
|
1723
|
-
"
|
|
1724
|
-
"
|
|
1725
|
-
"agent:
|
|
1726
|
-
"
|
|
1727
|
-
"
|
|
1769
|
+
"agent:test:run-eval",
|
|
1770
|
+
"test:agent:run-eval",
|
|
1771
|
+
"test:run-eval:agent",
|
|
1772
|
+
"agent:run-eval:test",
|
|
1773
|
+
"run-eval:agent:test",
|
|
1774
|
+
"run-eval:test:agent"
|
|
1728
1775
|
]
|
|
1729
1776
|
},
|
|
1730
|
-
"agent:
|
|
1777
|
+
"agent:test:run": {
|
|
1731
1778
|
"aliases": [],
|
|
1732
1779
|
"args": {},
|
|
1733
|
-
"description": "
|
|
1780
|
+
"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.",
|
|
1734
1781
|
"examples": [
|
|
1735
|
-
"
|
|
1736
|
-
"
|
|
1737
|
-
"
|
|
1782
|
+
"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",
|
|
1783
|
+
"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",
|
|
1784
|
+
"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"
|
|
1738
1785
|
],
|
|
1739
1786
|
"flags": {
|
|
1740
1787
|
"json": {
|
|
@@ -1769,127 +1816,87 @@
|
|
|
1769
1816
|
"multiple": false,
|
|
1770
1817
|
"type": "option"
|
|
1771
1818
|
},
|
|
1772
|
-
"
|
|
1773
|
-
"
|
|
1774
|
-
"
|
|
1775
|
-
"summary": "
|
|
1819
|
+
"api-name": {
|
|
1820
|
+
"char": "n",
|
|
1821
|
+
"name": "api-name",
|
|
1822
|
+
"summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
|
|
1776
1823
|
"hasDynamicHelp": false,
|
|
1777
1824
|
"multiple": false,
|
|
1778
1825
|
"type": "option"
|
|
1779
1826
|
},
|
|
1780
|
-
"
|
|
1781
|
-
"char": "
|
|
1782
|
-
"name": "
|
|
1783
|
-
"
|
|
1784
|
-
"
|
|
1785
|
-
"hasDynamicHelp": false,
|
|
1827
|
+
"wait": {
|
|
1828
|
+
"char": "w",
|
|
1829
|
+
"name": "wait",
|
|
1830
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1831
|
+
"hasDynamicHelp": true,
|
|
1786
1832
|
"multiple": false,
|
|
1787
1833
|
"type": "option"
|
|
1788
1834
|
},
|
|
1789
|
-
"
|
|
1790
|
-
"
|
|
1791
|
-
"
|
|
1792
|
-
"
|
|
1835
|
+
"result-format": {
|
|
1836
|
+
"name": "result-format",
|
|
1837
|
+
"summary": "Format of the agent test run results.",
|
|
1838
|
+
"default": "human",
|
|
1793
1839
|
"hasDynamicHelp": false,
|
|
1794
1840
|
"multiple": false,
|
|
1841
|
+
"options": [
|
|
1842
|
+
"json",
|
|
1843
|
+
"human",
|
|
1844
|
+
"junit",
|
|
1845
|
+
"tap"
|
|
1846
|
+
],
|
|
1795
1847
|
"type": "option"
|
|
1796
1848
|
},
|
|
1797
|
-
"
|
|
1798
|
-
"
|
|
1799
|
-
"
|
|
1849
|
+
"output-dir": {
|
|
1850
|
+
"char": "d",
|
|
1851
|
+
"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.",
|
|
1852
|
+
"name": "output-dir",
|
|
1853
|
+
"summary": "Directory to write the agent test results into.",
|
|
1800
1854
|
"hasDynamicHelp": false,
|
|
1801
1855
|
"multiple": false,
|
|
1802
1856
|
"type": "option"
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1809
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1810
|
-
"pluginType": "core",
|
|
1811
|
-
"strict": true,
|
|
1812
|
-
"summary": "Send a message to an existing agent preview session.",
|
|
1813
|
-
"enableJsonFlag": true,
|
|
1814
|
-
"requiresProject": true,
|
|
1815
|
-
"isESM": true,
|
|
1816
|
-
"relativePath": [
|
|
1817
|
-
"lib",
|
|
1818
|
-
"commands",
|
|
1819
|
-
"agent",
|
|
1820
|
-
"preview",
|
|
1821
|
-
"send.js"
|
|
1822
|
-
],
|
|
1823
|
-
"aliasPermutations": [],
|
|
1824
|
-
"permutations": [
|
|
1825
|
-
"agent:preview:send",
|
|
1826
|
-
"preview:agent:send",
|
|
1827
|
-
"preview:send:agent",
|
|
1828
|
-
"agent:send:preview",
|
|
1829
|
-
"send:agent:preview",
|
|
1830
|
-
"send:preview:agent"
|
|
1831
|
-
]
|
|
1832
|
-
},
|
|
1833
|
-
"agent:preview:sessions": {
|
|
1834
|
-
"aliases": [],
|
|
1835
|
-
"args": {},
|
|
1836
|
-
"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.",
|
|
1837
|
-
"examples": [
|
|
1838
|
-
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
1839
|
-
],
|
|
1840
|
-
"flags": {
|
|
1841
|
-
"json": {
|
|
1842
|
-
"description": "Format output as json.",
|
|
1843
|
-
"helpGroup": "GLOBAL",
|
|
1844
|
-
"name": "json",
|
|
1857
|
+
},
|
|
1858
|
+
"verbose": {
|
|
1859
|
+
"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.",
|
|
1860
|
+
"name": "verbose",
|
|
1861
|
+
"summary": "Show generated data in the test results output.",
|
|
1845
1862
|
"allowNo": false,
|
|
1846
1863
|
"type": "boolean"
|
|
1847
|
-
},
|
|
1848
|
-
"flags-dir": {
|
|
1849
|
-
"helpGroup": "GLOBAL",
|
|
1850
|
-
"name": "flags-dir",
|
|
1851
|
-
"summary": "Import flag values from a directory.",
|
|
1852
|
-
"hasDynamicHelp": false,
|
|
1853
|
-
"multiple": false,
|
|
1854
|
-
"type": "option"
|
|
1855
1864
|
}
|
|
1856
1865
|
},
|
|
1857
|
-
"hasDynamicHelp":
|
|
1866
|
+
"hasDynamicHelp": true,
|
|
1858
1867
|
"hiddenAliases": [],
|
|
1859
|
-
"id": "agent:
|
|
1868
|
+
"id": "agent:test:run",
|
|
1860
1869
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1861
1870
|
"pluginName": "@salesforce/plugin-agent",
|
|
1862
1871
|
"pluginType": "core",
|
|
1863
1872
|
"strict": true,
|
|
1864
|
-
"summary": "
|
|
1873
|
+
"summary": "Start an agent test in your org.",
|
|
1865
1874
|
"enableJsonFlag": true,
|
|
1866
|
-
"requiresProject": true,
|
|
1867
1875
|
"isESM": true,
|
|
1868
1876
|
"relativePath": [
|
|
1869
1877
|
"lib",
|
|
1870
1878
|
"commands",
|
|
1871
1879
|
"agent",
|
|
1872
|
-
"
|
|
1873
|
-
"
|
|
1880
|
+
"test",
|
|
1881
|
+
"run.js"
|
|
1874
1882
|
],
|
|
1875
1883
|
"aliasPermutations": [],
|
|
1876
1884
|
"permutations": [
|
|
1877
|
-
"agent:
|
|
1878
|
-
"
|
|
1879
|
-
"
|
|
1880
|
-
"agent:
|
|
1881
|
-
"
|
|
1882
|
-
"
|
|
1885
|
+
"agent:test:run",
|
|
1886
|
+
"test:agent:run",
|
|
1887
|
+
"test:run:agent",
|
|
1888
|
+
"agent:run:test",
|
|
1889
|
+
"run:agent:test",
|
|
1890
|
+
"run:test:agent"
|
|
1883
1891
|
]
|
|
1884
1892
|
},
|
|
1885
|
-
"agent:
|
|
1893
|
+
"agent:validate:authoring-bundle": {
|
|
1886
1894
|
"aliases": [],
|
|
1887
1895
|
"args": {},
|
|
1888
|
-
"description": "
|
|
1896
|
+
"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.",
|
|
1889
1897
|
"examples": [
|
|
1890
|
-
"
|
|
1891
|
-
"
|
|
1892
|
-
"Start a preview session with an activated published agent:\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
1898
|
+
"Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1899
|
+
"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"
|
|
1893
1900
|
],
|
|
1894
1901
|
"flags": {
|
|
1895
1902
|
"json": {
|
|
@@ -1927,53 +1934,46 @@
|
|
|
1927
1934
|
"api-name": {
|
|
1928
1935
|
"char": "n",
|
|
1929
1936
|
"name": "api-name",
|
|
1930
|
-
"summary": "API name of the
|
|
1931
|
-
"hasDynamicHelp": false,
|
|
1932
|
-
"multiple": false,
|
|
1933
|
-
"type": "option"
|
|
1934
|
-
},
|
|
1935
|
-
"authoring-bundle": {
|
|
1936
|
-
"name": "authoring-bundle",
|
|
1937
|
-
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1937
|
+
"summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1938
1938
|
"hasDynamicHelp": false,
|
|
1939
1939
|
"multiple": false,
|
|
1940
1940
|
"type": "option"
|
|
1941
|
-
},
|
|
1942
|
-
"use-live-actions": {
|
|
1943
|
-
"name": "use-live-actions",
|
|
1944
|
-
"summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
|
|
1945
|
-
"allowNo": false,
|
|
1946
|
-
"type": "boolean"
|
|
1947
1941
|
}
|
|
1948
1942
|
},
|
|
1949
1943
|
"hasDynamicHelp": true,
|
|
1950
1944
|
"hiddenAliases": [],
|
|
1951
|
-
"id": "agent:
|
|
1945
|
+
"id": "agent:validate:authoring-bundle",
|
|
1952
1946
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1953
1947
|
"pluginName": "@salesforce/plugin-agent",
|
|
1954
1948
|
"pluginType": "core",
|
|
1955
1949
|
"strict": true,
|
|
1956
|
-
"summary": "
|
|
1950
|
+
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
1957
1951
|
"enableJsonFlag": true,
|
|
1958
1952
|
"requiresProject": true,
|
|
1953
|
+
"FLAGGABLE_PROMPTS": {
|
|
1954
|
+
"api-name": {
|
|
1955
|
+
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1956
|
+
"promptMessage": "API name of the authoring bundle to validate"
|
|
1957
|
+
}
|
|
1958
|
+
},
|
|
1959
1959
|
"isESM": true,
|
|
1960
1960
|
"relativePath": [
|
|
1961
1961
|
"lib",
|
|
1962
1962
|
"commands",
|
|
1963
1963
|
"agent",
|
|
1964
|
-
"
|
|
1965
|
-
"
|
|
1964
|
+
"validate",
|
|
1965
|
+
"authoring-bundle.js"
|
|
1966
1966
|
],
|
|
1967
1967
|
"aliasPermutations": [],
|
|
1968
1968
|
"permutations": [
|
|
1969
|
-
"agent:
|
|
1970
|
-
"
|
|
1971
|
-
"
|
|
1972
|
-
"agent:
|
|
1973
|
-
"
|
|
1974
|
-
"
|
|
1969
|
+
"agent:validate:authoring-bundle",
|
|
1970
|
+
"validate:agent:authoring-bundle",
|
|
1971
|
+
"validate:authoring-bundle:agent",
|
|
1972
|
+
"agent:authoring-bundle:validate",
|
|
1973
|
+
"authoring-bundle:agent:validate",
|
|
1974
|
+
"authoring-bundle:validate:agent"
|
|
1975
1975
|
]
|
|
1976
1976
|
}
|
|
1977
1977
|
},
|
|
1978
|
-
"version": "1.32.
|
|
1978
|
+
"version": "1.32.13"
|
|
1979
1979
|
}
|