@salesforce/plugin-agent 1.32.20 → 1.32.21
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/oclif.manifest.json
CHANGED
|
@@ -958,14 +958,14 @@
|
|
|
958
958
|
"authoring-bundle:publish:agent"
|
|
959
959
|
]
|
|
960
960
|
},
|
|
961
|
-
"agent:
|
|
961
|
+
"agent:test:create": {
|
|
962
962
|
"aliases": [],
|
|
963
963
|
"args": {},
|
|
964
|
-
"description": "
|
|
964
|
+
"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.",
|
|
965
965
|
"examples": [
|
|
966
|
-
"
|
|
967
|
-
"
|
|
968
|
-
"
|
|
966
|
+
"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 %>",
|
|
967
|
+
"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",
|
|
968
|
+
"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"
|
|
969
969
|
],
|
|
970
970
|
"flags": {
|
|
971
971
|
"json": {
|
|
@@ -983,6 +983,20 @@
|
|
|
983
983
|
"multiple": false,
|
|
984
984
|
"type": "option"
|
|
985
985
|
},
|
|
986
|
+
"api-name": {
|
|
987
|
+
"name": "api-name",
|
|
988
|
+
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
989
|
+
"hasDynamicHelp": false,
|
|
990
|
+
"multiple": false,
|
|
991
|
+
"type": "option"
|
|
992
|
+
},
|
|
993
|
+
"spec": {
|
|
994
|
+
"name": "spec",
|
|
995
|
+
"summary": "Path to the test spec YAML file.",
|
|
996
|
+
"hasDynamicHelp": false,
|
|
997
|
+
"multiple": false,
|
|
998
|
+
"type": "option"
|
|
999
|
+
},
|
|
986
1000
|
"target-org": {
|
|
987
1001
|
"char": "o",
|
|
988
1002
|
"name": "target-org",
|
|
@@ -1000,40 +1014,28 @@
|
|
|
1000
1014
|
"multiple": false,
|
|
1001
1015
|
"type": "option"
|
|
1002
1016
|
},
|
|
1003
|
-
"
|
|
1004
|
-
"name": "
|
|
1005
|
-
"
|
|
1006
|
-
"
|
|
1007
|
-
"
|
|
1008
|
-
"multiple": false,
|
|
1009
|
-
"type": "option"
|
|
1010
|
-
},
|
|
1011
|
-
"api-name": {
|
|
1012
|
-
"char": "n",
|
|
1013
|
-
"name": "api-name",
|
|
1014
|
-
"summary": "API name of the activated published agent you want to preview.",
|
|
1015
|
-
"hasDynamicHelp": false,
|
|
1016
|
-
"multiple": false,
|
|
1017
|
-
"type": "option"
|
|
1017
|
+
"preview": {
|
|
1018
|
+
"name": "preview",
|
|
1019
|
+
"summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
|
|
1020
|
+
"allowNo": false,
|
|
1021
|
+
"type": "boolean"
|
|
1018
1022
|
},
|
|
1019
|
-
"
|
|
1020
|
-
"name": "
|
|
1021
|
-
"summary": "
|
|
1022
|
-
"
|
|
1023
|
-
"
|
|
1024
|
-
"type": "option"
|
|
1023
|
+
"force-overwrite": {
|
|
1024
|
+
"name": "force-overwrite",
|
|
1025
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
1026
|
+
"allowNo": false,
|
|
1027
|
+
"type": "boolean"
|
|
1025
1028
|
}
|
|
1026
1029
|
},
|
|
1027
1030
|
"hasDynamicHelp": true,
|
|
1028
1031
|
"hiddenAliases": [],
|
|
1029
|
-
"id": "agent:
|
|
1032
|
+
"id": "agent:test:create",
|
|
1030
1033
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1031
1034
|
"pluginName": "@salesforce/plugin-agent",
|
|
1032
1035
|
"pluginType": "core",
|
|
1033
1036
|
"strict": true,
|
|
1034
|
-
"summary": "
|
|
1037
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
1035
1038
|
"enableJsonFlag": true,
|
|
1036
|
-
"requiresProject": true,
|
|
1037
1039
|
"envVariablesSection": {
|
|
1038
1040
|
"header": "ENVIRONMENT VARIABLES",
|
|
1039
1041
|
"body": [
|
|
@@ -1048,19 +1050,19 @@
|
|
|
1048
1050
|
"body": [
|
|
1049
1051
|
{
|
|
1050
1052
|
"name": "Succeeded (0)",
|
|
1051
|
-
"description": "
|
|
1053
|
+
"description": "Test created and deployed successfully."
|
|
1052
1054
|
},
|
|
1053
1055
|
{
|
|
1054
|
-
"name": "
|
|
1055
|
-
"description": "
|
|
1056
|
+
"name": "Failed (1)",
|
|
1057
|
+
"description": "Test validation errors or metadata format issues."
|
|
1056
1058
|
},
|
|
1057
1059
|
{
|
|
1058
|
-
"name": "
|
|
1059
|
-
"description": "
|
|
1060
|
+
"name": "NotFound (2)",
|
|
1061
|
+
"description": "Test spec file not found or org connection failed."
|
|
1060
1062
|
},
|
|
1061
1063
|
{
|
|
1062
|
-
"name": "
|
|
1063
|
-
"description": "
|
|
1064
|
+
"name": "DeploymentFailed (4)",
|
|
1065
|
+
"description": "Deployment failed due to API or network errors."
|
|
1064
1066
|
}
|
|
1065
1067
|
]
|
|
1066
1068
|
},
|
|
@@ -1069,27 +1071,26 @@
|
|
|
1069
1071
|
"lib",
|
|
1070
1072
|
"commands",
|
|
1071
1073
|
"agent",
|
|
1072
|
-
"
|
|
1073
|
-
"
|
|
1074
|
+
"test",
|
|
1075
|
+
"create.js"
|
|
1074
1076
|
],
|
|
1075
1077
|
"aliasPermutations": [],
|
|
1076
1078
|
"permutations": [
|
|
1077
|
-
"agent:
|
|
1078
|
-
"
|
|
1079
|
-
"
|
|
1080
|
-
"agent:
|
|
1081
|
-
"
|
|
1082
|
-
"
|
|
1079
|
+
"agent:test:create",
|
|
1080
|
+
"test:agent:create",
|
|
1081
|
+
"test:create:agent",
|
|
1082
|
+
"agent:create:test",
|
|
1083
|
+
"create:agent:test",
|
|
1084
|
+
"create:test:agent"
|
|
1083
1085
|
]
|
|
1084
1086
|
},
|
|
1085
|
-
"agent:
|
|
1087
|
+
"agent:test:list": {
|
|
1086
1088
|
"aliases": [],
|
|
1087
1089
|
"args": {},
|
|
1088
|
-
"description": "
|
|
1090
|
+
"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.",
|
|
1089
1091
|
"examples": [
|
|
1090
|
-
"
|
|
1091
|
-
"
|
|
1092
|
-
"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"
|
|
1092
|
+
"List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1093
|
+
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
1093
1094
|
],
|
|
1094
1095
|
"flags": {
|
|
1095
1096
|
"json": {
|
|
@@ -1123,50 +1124,17 @@
|
|
|
1123
1124
|
"hasDynamicHelp": false,
|
|
1124
1125
|
"multiple": false,
|
|
1125
1126
|
"type": "option"
|
|
1126
|
-
},
|
|
1127
|
-
"session-id": {
|
|
1128
|
-
"name": "session-id",
|
|
1129
|
-
"required": false,
|
|
1130
|
-
"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.",
|
|
1131
|
-
"hasDynamicHelp": false,
|
|
1132
|
-
"multiple": false,
|
|
1133
|
-
"type": "option"
|
|
1134
|
-
},
|
|
1135
|
-
"utterance": {
|
|
1136
|
-
"char": "u",
|
|
1137
|
-
"name": "utterance",
|
|
1138
|
-
"required": true,
|
|
1139
|
-
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1140
|
-
"hasDynamicHelp": false,
|
|
1141
|
-
"multiple": false,
|
|
1142
|
-
"type": "option"
|
|
1143
|
-
},
|
|
1144
|
-
"api-name": {
|
|
1145
|
-
"char": "n",
|
|
1146
|
-
"name": "api-name",
|
|
1147
|
-
"summary": "API name of the activated published agent you want to preview.",
|
|
1148
|
-
"hasDynamicHelp": false,
|
|
1149
|
-
"multiple": false,
|
|
1150
|
-
"type": "option"
|
|
1151
|
-
},
|
|
1152
|
-
"authoring-bundle": {
|
|
1153
|
-
"name": "authoring-bundle",
|
|
1154
|
-
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1155
|
-
"hasDynamicHelp": false,
|
|
1156
|
-
"multiple": false,
|
|
1157
|
-
"type": "option"
|
|
1158
1127
|
}
|
|
1159
1128
|
},
|
|
1160
1129
|
"hasDynamicHelp": true,
|
|
1161
1130
|
"hiddenAliases": [],
|
|
1162
|
-
"id": "agent:
|
|
1131
|
+
"id": "agent:test:list",
|
|
1163
1132
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1164
1133
|
"pluginName": "@salesforce/plugin-agent",
|
|
1165
1134
|
"pluginType": "core",
|
|
1166
1135
|
"strict": true,
|
|
1167
|
-
"summary": "
|
|
1136
|
+
"summary": "List the available agent tests in your org.",
|
|
1168
1137
|
"enableJsonFlag": true,
|
|
1169
|
-
"requiresProject": true,
|
|
1170
1138
|
"envVariablesSection": {
|
|
1171
1139
|
"header": "ENVIRONMENT VARIABLES",
|
|
1172
1140
|
"body": [
|
|
@@ -1181,80 +1149,11 @@
|
|
|
1181
1149
|
"body": [
|
|
1182
1150
|
{
|
|
1183
1151
|
"name": "Succeeded (0)",
|
|
1184
|
-
"description": "
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
"name": "NotFound (2)",
|
|
1188
|
-
"description": "Agent not found, or no preview session exists for this agent."
|
|
1189
|
-
},
|
|
1190
|
-
{
|
|
1191
|
-
"name": "PreviewSendFailed (4)",
|
|
1192
|
-
"description": "Failed to send message or receive response from the preview session."
|
|
1152
|
+
"description": "Agent tests listed successfully."
|
|
1193
1153
|
},
|
|
1194
1154
|
{
|
|
1195
|
-
"name": "
|
|
1196
|
-
"description": "
|
|
1197
|
-
}
|
|
1198
|
-
]
|
|
1199
|
-
},
|
|
1200
|
-
"isESM": true,
|
|
1201
|
-
"relativePath": [
|
|
1202
|
-
"lib",
|
|
1203
|
-
"commands",
|
|
1204
|
-
"agent",
|
|
1205
|
-
"preview",
|
|
1206
|
-
"send.js"
|
|
1207
|
-
],
|
|
1208
|
-
"aliasPermutations": [],
|
|
1209
|
-
"permutations": [
|
|
1210
|
-
"agent:preview:send",
|
|
1211
|
-
"preview:agent:send",
|
|
1212
|
-
"preview:send:agent",
|
|
1213
|
-
"agent:send:preview",
|
|
1214
|
-
"send:agent:preview",
|
|
1215
|
-
"send:preview:agent"
|
|
1216
|
-
]
|
|
1217
|
-
},
|
|
1218
|
-
"agent:preview:sessions": {
|
|
1219
|
-
"aliases": [],
|
|
1220
|
-
"args": {},
|
|
1221
|
-
"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.",
|
|
1222
|
-
"examples": [
|
|
1223
|
-
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
1224
|
-
],
|
|
1225
|
-
"flags": {
|
|
1226
|
-
"json": {
|
|
1227
|
-
"description": "Format output as json.",
|
|
1228
|
-
"helpGroup": "GLOBAL",
|
|
1229
|
-
"name": "json",
|
|
1230
|
-
"allowNo": false,
|
|
1231
|
-
"type": "boolean"
|
|
1232
|
-
},
|
|
1233
|
-
"flags-dir": {
|
|
1234
|
-
"helpGroup": "GLOBAL",
|
|
1235
|
-
"name": "flags-dir",
|
|
1236
|
-
"summary": "Import flag values from a directory.",
|
|
1237
|
-
"hasDynamicHelp": false,
|
|
1238
|
-
"multiple": false,
|
|
1239
|
-
"type": "option"
|
|
1240
|
-
}
|
|
1241
|
-
},
|
|
1242
|
-
"hasDynamicHelp": false,
|
|
1243
|
-
"hiddenAliases": [],
|
|
1244
|
-
"id": "agent:preview:sessions",
|
|
1245
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1246
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1247
|
-
"pluginType": "core",
|
|
1248
|
-
"strict": true,
|
|
1249
|
-
"summary": "List all known programmatic agent preview sessions.",
|
|
1250
|
-
"enableJsonFlag": true,
|
|
1251
|
-
"requiresProject": true,
|
|
1252
|
-
"errorCodes": {
|
|
1253
|
-
"header": "ERROR CODES",
|
|
1254
|
-
"body": [
|
|
1255
|
-
{
|
|
1256
|
-
"name": "Succeeded (0)",
|
|
1257
|
-
"description": "Sessions listed successfully (or empty list if no active sessions)."
|
|
1155
|
+
"name": "Failed (4)",
|
|
1156
|
+
"description": "Failed to retrieve agent tests due to API or network errors."
|
|
1258
1157
|
}
|
|
1259
1158
|
]
|
|
1260
1159
|
},
|
|
@@ -1263,27 +1162,27 @@
|
|
|
1263
1162
|
"lib",
|
|
1264
1163
|
"commands",
|
|
1265
1164
|
"agent",
|
|
1266
|
-
"
|
|
1267
|
-
"
|
|
1165
|
+
"test",
|
|
1166
|
+
"list.js"
|
|
1268
1167
|
],
|
|
1269
1168
|
"aliasPermutations": [],
|
|
1270
1169
|
"permutations": [
|
|
1271
|
-
"agent:
|
|
1272
|
-
"
|
|
1273
|
-
"
|
|
1274
|
-
"agent:
|
|
1275
|
-
"
|
|
1276
|
-
"
|
|
1170
|
+
"agent:test:list",
|
|
1171
|
+
"test:agent:list",
|
|
1172
|
+
"test:list:agent",
|
|
1173
|
+
"agent:list:test",
|
|
1174
|
+
"list:agent:test",
|
|
1175
|
+
"list:test:agent"
|
|
1277
1176
|
]
|
|
1278
1177
|
},
|
|
1279
|
-
"agent:
|
|
1178
|
+
"agent:test:results": {
|
|
1280
1179
|
"aliases": [],
|
|
1281
1180
|
"args": {},
|
|
1282
|
-
"description": "This command
|
|
1181
|
+
"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.",
|
|
1283
1182
|
"examples": [
|
|
1284
|
-
"
|
|
1285
|
-
"
|
|
1286
|
-
"
|
|
1183
|
+
"Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1184
|
+
"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",
|
|
1185
|
+
"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"
|
|
1287
1186
|
],
|
|
1288
1187
|
"flags": {
|
|
1289
1188
|
"json": {
|
|
@@ -1318,50 +1217,55 @@
|
|
|
1318
1217
|
"multiple": false,
|
|
1319
1218
|
"type": "option"
|
|
1320
1219
|
},
|
|
1321
|
-
"
|
|
1322
|
-
"char": "
|
|
1323
|
-
"name": "
|
|
1324
|
-
"
|
|
1220
|
+
"job-id": {
|
|
1221
|
+
"char": "i",
|
|
1222
|
+
"name": "job-id",
|
|
1223
|
+
"required": true,
|
|
1224
|
+
"summary": "Job ID of the completed agent test run.",
|
|
1325
1225
|
"hasDynamicHelp": false,
|
|
1326
1226
|
"multiple": false,
|
|
1327
1227
|
"type": "option"
|
|
1328
1228
|
},
|
|
1329
|
-
"
|
|
1330
|
-
"name": "
|
|
1331
|
-
"summary": "
|
|
1229
|
+
"result-format": {
|
|
1230
|
+
"name": "result-format",
|
|
1231
|
+
"summary": "Format of the agent test run results.",
|
|
1232
|
+
"default": "human",
|
|
1332
1233
|
"hasDynamicHelp": false,
|
|
1333
1234
|
"multiple": false,
|
|
1334
|
-
"
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
"
|
|
1235
|
+
"options": [
|
|
1236
|
+
"json",
|
|
1237
|
+
"human",
|
|
1238
|
+
"junit",
|
|
1239
|
+
"tap"
|
|
1339
1240
|
],
|
|
1340
|
-
"
|
|
1341
|
-
"summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
|
|
1342
|
-
"allowNo": false,
|
|
1343
|
-
"type": "boolean"
|
|
1241
|
+
"type": "option"
|
|
1344
1242
|
},
|
|
1345
|
-
"
|
|
1346
|
-
"
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
"
|
|
1350
|
-
"
|
|
1243
|
+
"output-dir": {
|
|
1244
|
+
"char": "d",
|
|
1245
|
+
"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.",
|
|
1246
|
+
"name": "output-dir",
|
|
1247
|
+
"summary": "Directory to write the agent test results into.",
|
|
1248
|
+
"hasDynamicHelp": false,
|
|
1249
|
+
"multiple": false,
|
|
1250
|
+
"type": "option"
|
|
1251
|
+
},
|
|
1252
|
+
"verbose": {
|
|
1253
|
+
"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.",
|
|
1254
|
+
"name": "verbose",
|
|
1255
|
+
"summary": "Show generated data in the test results output.",
|
|
1351
1256
|
"allowNo": false,
|
|
1352
1257
|
"type": "boolean"
|
|
1353
1258
|
}
|
|
1354
1259
|
},
|
|
1355
1260
|
"hasDynamicHelp": true,
|
|
1356
1261
|
"hiddenAliases": [],
|
|
1357
|
-
"id": "agent:
|
|
1262
|
+
"id": "agent:test:results",
|
|
1358
1263
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1359
1264
|
"pluginName": "@salesforce/plugin-agent",
|
|
1360
1265
|
"pluginType": "core",
|
|
1361
1266
|
"strict": true,
|
|
1362
|
-
"summary": "
|
|
1267
|
+
"summary": "Get the results of a completed agent test run.",
|
|
1363
1268
|
"enableJsonFlag": true,
|
|
1364
|
-
"requiresProject": true,
|
|
1365
1269
|
"envVariablesSection": {
|
|
1366
1270
|
"header": "ENVIRONMENT VARIABLES",
|
|
1367
1271
|
"body": [
|
|
@@ -1376,23 +1280,15 @@
|
|
|
1376
1280
|
"body": [
|
|
1377
1281
|
{
|
|
1378
1282
|
"name": "Succeeded (0)",
|
|
1379
|
-
"description": "
|
|
1380
|
-
},
|
|
1381
|
-
{
|
|
1382
|
-
"name": "Failed (1)",
|
|
1383
|
-
"description": "Agent Script compilation failed (syntax errors in the script)."
|
|
1283
|
+
"description": "Results retrieved successfully. Test results (passed/failed) are in the output."
|
|
1384
1284
|
},
|
|
1385
1285
|
{
|
|
1386
1286
|
"name": "NotFound (2)",
|
|
1387
|
-
"description": "
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
"name": "ServerError (3)",
|
|
1391
|
-
"description": "Compilation API returned HTTP 500 (server error during compilation)."
|
|
1287
|
+
"description": "Job ID not found or invalid."
|
|
1392
1288
|
},
|
|
1393
1289
|
{
|
|
1394
|
-
"name": "
|
|
1395
|
-
"description": "
|
|
1290
|
+
"name": "Failed (4)",
|
|
1291
|
+
"description": "Failed to retrieve results due to API or network errors."
|
|
1396
1292
|
}
|
|
1397
1293
|
]
|
|
1398
1294
|
},
|
|
@@ -1401,27 +1297,27 @@
|
|
|
1401
1297
|
"lib",
|
|
1402
1298
|
"commands",
|
|
1403
1299
|
"agent",
|
|
1404
|
-
"
|
|
1405
|
-
"
|
|
1300
|
+
"test",
|
|
1301
|
+
"results.js"
|
|
1406
1302
|
],
|
|
1407
1303
|
"aliasPermutations": [],
|
|
1408
1304
|
"permutations": [
|
|
1409
|
-
"agent:
|
|
1410
|
-
"
|
|
1411
|
-
"
|
|
1412
|
-
"agent:
|
|
1413
|
-
"
|
|
1414
|
-
"
|
|
1305
|
+
"agent:test:results",
|
|
1306
|
+
"test:agent:results",
|
|
1307
|
+
"test:results:agent",
|
|
1308
|
+
"agent:results:test",
|
|
1309
|
+
"results:agent:test",
|
|
1310
|
+
"results:test:agent"
|
|
1415
1311
|
]
|
|
1416
1312
|
},
|
|
1417
|
-
"agent:test:
|
|
1313
|
+
"agent:test:resume": {
|
|
1418
1314
|
"aliases": [],
|
|
1419
1315
|
"args": {},
|
|
1420
|
-
"description": "
|
|
1316
|
+
"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.",
|
|
1421
1317
|
"examples": [
|
|
1422
|
-
"
|
|
1423
|
-
"
|
|
1424
|
-
"
|
|
1318
|
+
"Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1319
|
+
"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",
|
|
1320
|
+
"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"
|
|
1425
1321
|
],
|
|
1426
1322
|
"flags": {
|
|
1427
1323
|
"json": {
|
|
@@ -1439,20 +1335,6 @@
|
|
|
1439
1335
|
"multiple": false,
|
|
1440
1336
|
"type": "option"
|
|
1441
1337
|
},
|
|
1442
|
-
"api-name": {
|
|
1443
|
-
"name": "api-name",
|
|
1444
|
-
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1445
|
-
"hasDynamicHelp": false,
|
|
1446
|
-
"multiple": false,
|
|
1447
|
-
"type": "option"
|
|
1448
|
-
},
|
|
1449
|
-
"spec": {
|
|
1450
|
-
"name": "spec",
|
|
1451
|
-
"summary": "Path to the test spec YAML file.",
|
|
1452
|
-
"hasDynamicHelp": false,
|
|
1453
|
-
"multiple": false,
|
|
1454
|
-
"type": "option"
|
|
1455
|
-
},
|
|
1456
1338
|
"target-org": {
|
|
1457
1339
|
"char": "o",
|
|
1458
1340
|
"name": "target-org",
|
|
@@ -1470,27 +1352,69 @@
|
|
|
1470
1352
|
"multiple": false,
|
|
1471
1353
|
"type": "option"
|
|
1472
1354
|
},
|
|
1473
|
-
"
|
|
1474
|
-
"
|
|
1475
|
-
"
|
|
1355
|
+
"job-id": {
|
|
1356
|
+
"char": "i",
|
|
1357
|
+
"name": "job-id",
|
|
1358
|
+
"summary": "Job ID of the original agent test run.",
|
|
1359
|
+
"hasDynamicHelp": false,
|
|
1360
|
+
"multiple": false,
|
|
1361
|
+
"type": "option"
|
|
1362
|
+
},
|
|
1363
|
+
"use-most-recent": {
|
|
1364
|
+
"char": "r",
|
|
1365
|
+
"name": "use-most-recent",
|
|
1366
|
+
"summary": "Use the job ID of the most recent agent test run.",
|
|
1476
1367
|
"allowNo": false,
|
|
1477
1368
|
"type": "boolean"
|
|
1478
1369
|
},
|
|
1479
|
-
"
|
|
1480
|
-
"
|
|
1481
|
-
"
|
|
1370
|
+
"wait": {
|
|
1371
|
+
"char": "w",
|
|
1372
|
+
"name": "wait",
|
|
1373
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1374
|
+
"default": "5 minutes",
|
|
1375
|
+
"hasDynamicHelp": true,
|
|
1376
|
+
"multiple": false,
|
|
1377
|
+
"type": "option"
|
|
1378
|
+
},
|
|
1379
|
+
"result-format": {
|
|
1380
|
+
"name": "result-format",
|
|
1381
|
+
"summary": "Format of the agent test run results.",
|
|
1382
|
+
"default": "human",
|
|
1383
|
+
"hasDynamicHelp": false,
|
|
1384
|
+
"multiple": false,
|
|
1385
|
+
"options": [
|
|
1386
|
+
"json",
|
|
1387
|
+
"human",
|
|
1388
|
+
"junit",
|
|
1389
|
+
"tap"
|
|
1390
|
+
],
|
|
1391
|
+
"type": "option"
|
|
1392
|
+
},
|
|
1393
|
+
"output-dir": {
|
|
1394
|
+
"char": "d",
|
|
1395
|
+
"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.",
|
|
1396
|
+
"name": "output-dir",
|
|
1397
|
+
"summary": "Directory to write the agent test results into.",
|
|
1398
|
+
"hasDynamicHelp": false,
|
|
1399
|
+
"multiple": false,
|
|
1400
|
+
"type": "option"
|
|
1401
|
+
},
|
|
1402
|
+
"verbose": {
|
|
1403
|
+
"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.",
|
|
1404
|
+
"name": "verbose",
|
|
1405
|
+
"summary": "Show generated data in the test results output.",
|
|
1482
1406
|
"allowNo": false,
|
|
1483
1407
|
"type": "boolean"
|
|
1484
1408
|
}
|
|
1485
1409
|
},
|
|
1486
1410
|
"hasDynamicHelp": true,
|
|
1487
1411
|
"hiddenAliases": [],
|
|
1488
|
-
"id": "agent:test:
|
|
1412
|
+
"id": "agent:test:resume",
|
|
1489
1413
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1490
1414
|
"pluginName": "@salesforce/plugin-agent",
|
|
1491
1415
|
"pluginType": "core",
|
|
1492
1416
|
"strict": true,
|
|
1493
|
-
"summary": "
|
|
1417
|
+
"summary": "Resume an agent test that you previously started in your org so you can view the test results.",
|
|
1494
1418
|
"enableJsonFlag": true,
|
|
1495
1419
|
"envVariablesSection": {
|
|
1496
1420
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1506,19 +1430,19 @@
|
|
|
1506
1430
|
"body": [
|
|
1507
1431
|
{
|
|
1508
1432
|
"name": "Succeeded (0)",
|
|
1509
|
-
"description": "Test
|
|
1433
|
+
"description": "Test completed successfully (with test results in the output)."
|
|
1510
1434
|
},
|
|
1511
1435
|
{
|
|
1512
1436
|
"name": "Failed (1)",
|
|
1513
|
-
"description": "
|
|
1437
|
+
"description": "Tests encountered execution errors (test cases with ERROR status)."
|
|
1514
1438
|
},
|
|
1515
1439
|
{
|
|
1516
1440
|
"name": "NotFound (2)",
|
|
1517
|
-
"description": "
|
|
1441
|
+
"description": "Job ID not found or invalid."
|
|
1518
1442
|
},
|
|
1519
1443
|
{
|
|
1520
|
-
"name": "
|
|
1521
|
-
"description": "
|
|
1444
|
+
"name": "OperationFailed (4)",
|
|
1445
|
+
"description": "Failed to poll test due to API or network errors."
|
|
1522
1446
|
}
|
|
1523
1447
|
]
|
|
1524
1448
|
},
|
|
@@ -1528,25 +1452,29 @@
|
|
|
1528
1452
|
"commands",
|
|
1529
1453
|
"agent",
|
|
1530
1454
|
"test",
|
|
1531
|
-
"
|
|
1455
|
+
"resume.js"
|
|
1532
1456
|
],
|
|
1533
1457
|
"aliasPermutations": [],
|
|
1534
1458
|
"permutations": [
|
|
1535
|
-
"agent:test:
|
|
1536
|
-
"test:agent:
|
|
1537
|
-
"test:
|
|
1538
|
-
"agent:
|
|
1539
|
-
"
|
|
1540
|
-
"
|
|
1459
|
+
"agent:test:resume",
|
|
1460
|
+
"test:agent:resume",
|
|
1461
|
+
"test:resume:agent",
|
|
1462
|
+
"agent:resume:test",
|
|
1463
|
+
"resume:agent:test",
|
|
1464
|
+
"resume:test:agent"
|
|
1541
1465
|
]
|
|
1542
1466
|
},
|
|
1543
|
-
"agent:test:
|
|
1467
|
+
"agent:test:run-eval": {
|
|
1544
1468
|
"aliases": [],
|
|
1545
1469
|
"args": {},
|
|
1546
|
-
"description": "
|
|
1470
|
+
"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.",
|
|
1547
1471
|
"examples": [
|
|
1548
|
-
"
|
|
1549
|
-
"
|
|
1472
|
+
"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",
|
|
1473
|
+
"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",
|
|
1474
|
+
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
|
|
1475
|
+
"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",
|
|
1476
|
+
"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",
|
|
1477
|
+
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1550
1478
|
],
|
|
1551
1479
|
"flags": {
|
|
1552
1480
|
"json": {
|
|
@@ -1580,16 +1508,72 @@
|
|
|
1580
1508
|
"hasDynamicHelp": false,
|
|
1581
1509
|
"multiple": false,
|
|
1582
1510
|
"type": "option"
|
|
1511
|
+
},
|
|
1512
|
+
"spec": {
|
|
1513
|
+
"char": "s",
|
|
1514
|
+
"name": "spec",
|
|
1515
|
+
"required": true,
|
|
1516
|
+
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1517
|
+
"hasDynamicHelp": false,
|
|
1518
|
+
"multiple": false,
|
|
1519
|
+
"type": "option"
|
|
1520
|
+
},
|
|
1521
|
+
"api-name": {
|
|
1522
|
+
"char": "n",
|
|
1523
|
+
"name": "api-name",
|
|
1524
|
+
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1525
|
+
"hasDynamicHelp": false,
|
|
1526
|
+
"multiple": false,
|
|
1527
|
+
"type": "option"
|
|
1528
|
+
},
|
|
1529
|
+
"wait": {
|
|
1530
|
+
"char": "w",
|
|
1531
|
+
"name": "wait",
|
|
1532
|
+
"summary": "Number of minutes to wait for results.",
|
|
1533
|
+
"default": 10,
|
|
1534
|
+
"hasDynamicHelp": false,
|
|
1535
|
+
"multiple": false,
|
|
1536
|
+
"type": "option"
|
|
1537
|
+
},
|
|
1538
|
+
"result-format": {
|
|
1539
|
+
"name": "result-format",
|
|
1540
|
+
"summary": "Format of the agent test run results.",
|
|
1541
|
+
"default": "human",
|
|
1542
|
+
"hasDynamicHelp": false,
|
|
1543
|
+
"multiple": false,
|
|
1544
|
+
"options": [
|
|
1545
|
+
"json",
|
|
1546
|
+
"human",
|
|
1547
|
+
"junit",
|
|
1548
|
+
"tap"
|
|
1549
|
+
],
|
|
1550
|
+
"type": "option"
|
|
1551
|
+
},
|
|
1552
|
+
"batch-size": {
|
|
1553
|
+
"name": "batch-size",
|
|
1554
|
+
"summary": "Number of tests per API request (max 5).",
|
|
1555
|
+
"default": 5,
|
|
1556
|
+
"hasDynamicHelp": false,
|
|
1557
|
+
"multiple": false,
|
|
1558
|
+
"type": "option"
|
|
1559
|
+
},
|
|
1560
|
+
"no-normalize": {
|
|
1561
|
+
"name": "no-normalize",
|
|
1562
|
+
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1563
|
+
"allowNo": false,
|
|
1564
|
+
"type": "boolean"
|
|
1583
1565
|
}
|
|
1584
1566
|
},
|
|
1585
1567
|
"hasDynamicHelp": true,
|
|
1568
|
+
"hidden": true,
|
|
1586
1569
|
"hiddenAliases": [],
|
|
1587
|
-
"id": "agent:test:
|
|
1570
|
+
"id": "agent:test:run-eval",
|
|
1588
1571
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1589
1572
|
"pluginName": "@salesforce/plugin-agent",
|
|
1590
1573
|
"pluginType": "core",
|
|
1574
|
+
"state": "beta",
|
|
1591
1575
|
"strict": true,
|
|
1592
|
-
"summary": "
|
|
1576
|
+
"summary": "Run evaluation tests against an Agentforce agent.",
|
|
1593
1577
|
"enableJsonFlag": true,
|
|
1594
1578
|
"envVariablesSection": {
|
|
1595
1579
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1605,40 +1589,48 @@
|
|
|
1605
1589
|
"body": [
|
|
1606
1590
|
{
|
|
1607
1591
|
"name": "Succeeded (0)",
|
|
1608
|
-
"description": "
|
|
1592
|
+
"description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
|
|
1609
1593
|
},
|
|
1610
1594
|
{
|
|
1611
|
-
"name": "Failed (
|
|
1612
|
-
"description": "
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1595
|
+
"name": "Failed (1)",
|
|
1596
|
+
"description": "Tests encountered execution errors (tests couldn't run properly)."
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"name": "NotFound (2)",
|
|
1600
|
+
"description": "Agent not found, spec file not found, or invalid agent name."
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
"name": "OperationFailed (4)",
|
|
1604
|
+
"description": "Failed to execute tests due to API or network errors."
|
|
1605
|
+
}
|
|
1606
|
+
]
|
|
1607
|
+
},
|
|
1608
|
+
"isESM": true,
|
|
1609
|
+
"relativePath": [
|
|
1610
|
+
"lib",
|
|
1619
1611
|
"commands",
|
|
1620
1612
|
"agent",
|
|
1621
1613
|
"test",
|
|
1622
|
-
"
|
|
1614
|
+
"run-eval.js"
|
|
1623
1615
|
],
|
|
1624
1616
|
"aliasPermutations": [],
|
|
1625
1617
|
"permutations": [
|
|
1626
|
-
"agent:test:
|
|
1627
|
-
"test:agent:
|
|
1628
|
-
"test:
|
|
1629
|
-
"agent:
|
|
1630
|
-
"
|
|
1631
|
-
"
|
|
1618
|
+
"agent:test:run-eval",
|
|
1619
|
+
"test:agent:run-eval",
|
|
1620
|
+
"test:run-eval:agent",
|
|
1621
|
+
"agent:run-eval:test",
|
|
1622
|
+
"run-eval:agent:test",
|
|
1623
|
+
"run-eval:test:agent"
|
|
1632
1624
|
]
|
|
1633
1625
|
},
|
|
1634
|
-
"agent:test:
|
|
1626
|
+
"agent:test:run": {
|
|
1635
1627
|
"aliases": [],
|
|
1636
1628
|
"args": {},
|
|
1637
|
-
"description": "
|
|
1629
|
+
"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.",
|
|
1638
1630
|
"examples": [
|
|
1639
|
-
"
|
|
1640
|
-
"
|
|
1641
|
-
"
|
|
1631
|
+
"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",
|
|
1632
|
+
"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",
|
|
1633
|
+
"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"
|
|
1642
1634
|
],
|
|
1643
1635
|
"flags": {
|
|
1644
1636
|
"json": {
|
|
@@ -1673,15 +1665,22 @@
|
|
|
1673
1665
|
"multiple": false,
|
|
1674
1666
|
"type": "option"
|
|
1675
1667
|
},
|
|
1676
|
-
"
|
|
1677
|
-
"char": "
|
|
1678
|
-
"name": "
|
|
1679
|
-
"
|
|
1680
|
-
"summary": "Job ID of the completed agent test run.",
|
|
1668
|
+
"api-name": {
|
|
1669
|
+
"char": "n",
|
|
1670
|
+
"name": "api-name",
|
|
1671
|
+
"summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
|
|
1681
1672
|
"hasDynamicHelp": false,
|
|
1682
1673
|
"multiple": false,
|
|
1683
1674
|
"type": "option"
|
|
1684
1675
|
},
|
|
1676
|
+
"wait": {
|
|
1677
|
+
"char": "w",
|
|
1678
|
+
"name": "wait",
|
|
1679
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1680
|
+
"hasDynamicHelp": true,
|
|
1681
|
+
"multiple": false,
|
|
1682
|
+
"type": "option"
|
|
1683
|
+
},
|
|
1685
1684
|
"result-format": {
|
|
1686
1685
|
"name": "result-format",
|
|
1687
1686
|
"summary": "Format of the agent test run results.",
|
|
@@ -1715,12 +1714,12 @@
|
|
|
1715
1714
|
},
|
|
1716
1715
|
"hasDynamicHelp": true,
|
|
1717
1716
|
"hiddenAliases": [],
|
|
1718
|
-
"id": "agent:test:
|
|
1717
|
+
"id": "agent:test:run",
|
|
1719
1718
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1720
1719
|
"pluginName": "@salesforce/plugin-agent",
|
|
1721
1720
|
"pluginType": "core",
|
|
1722
1721
|
"strict": true,
|
|
1723
|
-
"summary": "
|
|
1722
|
+
"summary": "Start an agent test in your org.",
|
|
1724
1723
|
"enableJsonFlag": true,
|
|
1725
1724
|
"envVariablesSection": {
|
|
1726
1725
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1736,15 +1735,19 @@
|
|
|
1736
1735
|
"body": [
|
|
1737
1736
|
{
|
|
1738
1737
|
"name": "Succeeded (0)",
|
|
1739
|
-
"description": "
|
|
1738
|
+
"description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"name": "Failed (1)",
|
|
1742
|
+
"description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
|
|
1740
1743
|
},
|
|
1741
1744
|
{
|
|
1742
1745
|
"name": "NotFound (2)",
|
|
1743
|
-
"description": "
|
|
1746
|
+
"description": "Test definition not found or invalid test name."
|
|
1744
1747
|
},
|
|
1745
1748
|
{
|
|
1746
|
-
"name": "
|
|
1747
|
-
"description": "Failed to
|
|
1749
|
+
"name": "OperationFailed (4)",
|
|
1750
|
+
"description": "Failed to start or poll test due to API or network errors."
|
|
1748
1751
|
}
|
|
1749
1752
|
]
|
|
1750
1753
|
},
|
|
@@ -1754,26 +1757,26 @@
|
|
|
1754
1757
|
"commands",
|
|
1755
1758
|
"agent",
|
|
1756
1759
|
"test",
|
|
1757
|
-
"
|
|
1760
|
+
"run.js"
|
|
1758
1761
|
],
|
|
1759
1762
|
"aliasPermutations": [],
|
|
1760
1763
|
"permutations": [
|
|
1761
|
-
"agent:test:
|
|
1762
|
-
"test:agent:
|
|
1763
|
-
"test:
|
|
1764
|
-
"agent:
|
|
1765
|
-
"
|
|
1766
|
-
"
|
|
1764
|
+
"agent:test:run",
|
|
1765
|
+
"test:agent:run",
|
|
1766
|
+
"test:run:agent",
|
|
1767
|
+
"agent:run:test",
|
|
1768
|
+
"run:agent:test",
|
|
1769
|
+
"run:test:agent"
|
|
1767
1770
|
]
|
|
1768
1771
|
},
|
|
1769
|
-
"agent:
|
|
1772
|
+
"agent:preview:end": {
|
|
1770
1773
|
"aliases": [],
|
|
1771
1774
|
"args": {},
|
|
1772
|
-
"description": "
|
|
1775
|
+
"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.",
|
|
1773
1776
|
"examples": [
|
|
1774
|
-
"
|
|
1775
|
-
"
|
|
1776
|
-
"
|
|
1777
|
+
"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",
|
|
1778
|
+
"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",
|
|
1779
|
+
"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"
|
|
1777
1780
|
],
|
|
1778
1781
|
"flags": {
|
|
1779
1782
|
"json": {
|
|
@@ -1808,70 +1811,40 @@
|
|
|
1808
1811
|
"multiple": false,
|
|
1809
1812
|
"type": "option"
|
|
1810
1813
|
},
|
|
1811
|
-
"
|
|
1812
|
-
"
|
|
1813
|
-
"
|
|
1814
|
-
"summary": "
|
|
1814
|
+
"session-id": {
|
|
1815
|
+
"name": "session-id",
|
|
1816
|
+
"required": false,
|
|
1817
|
+
"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.",
|
|
1815
1818
|
"hasDynamicHelp": false,
|
|
1816
1819
|
"multiple": false,
|
|
1817
1820
|
"type": "option"
|
|
1818
1821
|
},
|
|
1819
|
-
"
|
|
1820
|
-
"char": "
|
|
1821
|
-
"name": "
|
|
1822
|
-
"summary": "
|
|
1823
|
-
"allowNo": false,
|
|
1824
|
-
"type": "boolean"
|
|
1825
|
-
},
|
|
1826
|
-
"wait": {
|
|
1827
|
-
"char": "w",
|
|
1828
|
-
"name": "wait",
|
|
1829
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1830
|
-
"default": "5 minutes",
|
|
1831
|
-
"hasDynamicHelp": true,
|
|
1832
|
-
"multiple": false,
|
|
1833
|
-
"type": "option"
|
|
1834
|
-
},
|
|
1835
|
-
"result-format": {
|
|
1836
|
-
"name": "result-format",
|
|
1837
|
-
"summary": "Format of the agent test run results.",
|
|
1838
|
-
"default": "human",
|
|
1822
|
+
"api-name": {
|
|
1823
|
+
"char": "n",
|
|
1824
|
+
"name": "api-name",
|
|
1825
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1839
1826
|
"hasDynamicHelp": false,
|
|
1840
1827
|
"multiple": false,
|
|
1841
|
-
"options": [
|
|
1842
|
-
"json",
|
|
1843
|
-
"human",
|
|
1844
|
-
"junit",
|
|
1845
|
-
"tap"
|
|
1846
|
-
],
|
|
1847
1828
|
"type": "option"
|
|
1848
1829
|
},
|
|
1849
|
-
"
|
|
1850
|
-
"
|
|
1851
|
-
"
|
|
1852
|
-
"name": "output-dir",
|
|
1853
|
-
"summary": "Directory to write the agent test results into.",
|
|
1830
|
+
"authoring-bundle": {
|
|
1831
|
+
"name": "authoring-bundle",
|
|
1832
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1854
1833
|
"hasDynamicHelp": false,
|
|
1855
1834
|
"multiple": false,
|
|
1856
1835
|
"type": "option"
|
|
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.",
|
|
1862
|
-
"allowNo": false,
|
|
1863
|
-
"type": "boolean"
|
|
1864
1836
|
}
|
|
1865
1837
|
},
|
|
1866
1838
|
"hasDynamicHelp": true,
|
|
1867
1839
|
"hiddenAliases": [],
|
|
1868
|
-
"id": "agent:
|
|
1840
|
+
"id": "agent:preview:end",
|
|
1869
1841
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1870
1842
|
"pluginName": "@salesforce/plugin-agent",
|
|
1871
1843
|
"pluginType": "core",
|
|
1872
1844
|
"strict": true,
|
|
1873
|
-
"summary": "
|
|
1845
|
+
"summary": "End an existing programmatic agent preview session and get trace location.",
|
|
1874
1846
|
"enableJsonFlag": true,
|
|
1847
|
+
"requiresProject": true,
|
|
1875
1848
|
"envVariablesSection": {
|
|
1876
1849
|
"header": "ENVIRONMENT VARIABLES",
|
|
1877
1850
|
"body": [
|
|
@@ -1886,19 +1859,19 @@
|
|
|
1886
1859
|
"body": [
|
|
1887
1860
|
{
|
|
1888
1861
|
"name": "Succeeded (0)",
|
|
1889
|
-
"description": "
|
|
1862
|
+
"description": "Preview session ended successfully and traces saved."
|
|
1890
1863
|
},
|
|
1891
1864
|
{
|
|
1892
|
-
"name": "
|
|
1893
|
-
"description": "
|
|
1865
|
+
"name": "NotFound (2)",
|
|
1866
|
+
"description": "Agent not found, or no preview session exists for this agent."
|
|
1894
1867
|
},
|
|
1895
1868
|
{
|
|
1896
|
-
"name": "
|
|
1897
|
-
"description": "
|
|
1869
|
+
"name": "PreviewEndFailed (4)",
|
|
1870
|
+
"description": "Failed to end the preview session."
|
|
1898
1871
|
},
|
|
1899
1872
|
{
|
|
1900
|
-
"name": "
|
|
1901
|
-
"description": "
|
|
1873
|
+
"name": "SessionAmbiguous (5)",
|
|
1874
|
+
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
1902
1875
|
}
|
|
1903
1876
|
]
|
|
1904
1877
|
},
|
|
@@ -1907,30 +1880,27 @@
|
|
|
1907
1880
|
"lib",
|
|
1908
1881
|
"commands",
|
|
1909
1882
|
"agent",
|
|
1910
|
-
"
|
|
1911
|
-
"
|
|
1883
|
+
"preview",
|
|
1884
|
+
"end.js"
|
|
1912
1885
|
],
|
|
1913
1886
|
"aliasPermutations": [],
|
|
1914
1887
|
"permutations": [
|
|
1915
|
-
"agent:
|
|
1916
|
-
"
|
|
1917
|
-
"
|
|
1918
|
-
"agent:
|
|
1919
|
-
"
|
|
1920
|
-
"
|
|
1888
|
+
"agent:preview:end",
|
|
1889
|
+
"preview:agent:end",
|
|
1890
|
+
"preview:end:agent",
|
|
1891
|
+
"agent:end:preview",
|
|
1892
|
+
"end:agent:preview",
|
|
1893
|
+
"end:preview:agent"
|
|
1921
1894
|
]
|
|
1922
1895
|
},
|
|
1923
|
-
"agent:
|
|
1896
|
+
"agent:preview:send": {
|
|
1924
1897
|
"aliases": [],
|
|
1925
1898
|
"args": {},
|
|
1926
|
-
"description": "
|
|
1899
|
+
"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.",
|
|
1927
1900
|
"examples": [
|
|
1928
|
-
"
|
|
1929
|
-
"
|
|
1930
|
-
"
|
|
1931
|
-
"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",
|
|
1932
|
-
"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",
|
|
1933
|
-
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1901
|
+
"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>",
|
|
1902
|
+
"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",
|
|
1903
|
+
"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"
|
|
1934
1904
|
],
|
|
1935
1905
|
"flags": {
|
|
1936
1906
|
"json": {
|
|
@@ -1965,72 +1935,49 @@
|
|
|
1965
1935
|
"multiple": false,
|
|
1966
1936
|
"type": "option"
|
|
1967
1937
|
},
|
|
1968
|
-
"
|
|
1969
|
-
"
|
|
1970
|
-
"
|
|
1971
|
-
"
|
|
1972
|
-
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1973
|
-
"hasDynamicHelp": false,
|
|
1974
|
-
"multiple": false,
|
|
1975
|
-
"type": "option"
|
|
1976
|
-
},
|
|
1977
|
-
"api-name": {
|
|
1978
|
-
"char": "n",
|
|
1979
|
-
"name": "api-name",
|
|
1980
|
-
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1938
|
+
"session-id": {
|
|
1939
|
+
"name": "session-id",
|
|
1940
|
+
"required": false,
|
|
1941
|
+
"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.",
|
|
1981
1942
|
"hasDynamicHelp": false,
|
|
1982
1943
|
"multiple": false,
|
|
1983
1944
|
"type": "option"
|
|
1984
1945
|
},
|
|
1985
|
-
"
|
|
1986
|
-
"char": "
|
|
1987
|
-
"name": "
|
|
1988
|
-
"
|
|
1989
|
-
"
|
|
1946
|
+
"utterance": {
|
|
1947
|
+
"char": "u",
|
|
1948
|
+
"name": "utterance",
|
|
1949
|
+
"required": true,
|
|
1950
|
+
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1990
1951
|
"hasDynamicHelp": false,
|
|
1991
1952
|
"multiple": false,
|
|
1992
1953
|
"type": "option"
|
|
1993
1954
|
},
|
|
1994
|
-
"
|
|
1995
|
-
"
|
|
1996
|
-
"
|
|
1997
|
-
"
|
|
1955
|
+
"api-name": {
|
|
1956
|
+
"char": "n",
|
|
1957
|
+
"name": "api-name",
|
|
1958
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1998
1959
|
"hasDynamicHelp": false,
|
|
1999
1960
|
"multiple": false,
|
|
2000
|
-
"options": [
|
|
2001
|
-
"json",
|
|
2002
|
-
"human",
|
|
2003
|
-
"junit",
|
|
2004
|
-
"tap"
|
|
2005
|
-
],
|
|
2006
1961
|
"type": "option"
|
|
2007
1962
|
},
|
|
2008
|
-
"
|
|
2009
|
-
"name": "
|
|
2010
|
-
"summary": "
|
|
2011
|
-
"default": 5,
|
|
1963
|
+
"authoring-bundle": {
|
|
1964
|
+
"name": "authoring-bundle",
|
|
1965
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
2012
1966
|
"hasDynamicHelp": false,
|
|
2013
1967
|
"multiple": false,
|
|
2014
1968
|
"type": "option"
|
|
2015
|
-
},
|
|
2016
|
-
"no-normalize": {
|
|
2017
|
-
"name": "no-normalize",
|
|
2018
|
-
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
2019
|
-
"allowNo": false,
|
|
2020
|
-
"type": "boolean"
|
|
2021
1969
|
}
|
|
2022
1970
|
},
|
|
2023
1971
|
"hasDynamicHelp": true,
|
|
2024
|
-
"hidden": true,
|
|
2025
1972
|
"hiddenAliases": [],
|
|
2026
|
-
"id": "agent:
|
|
1973
|
+
"id": "agent:preview:send",
|
|
2027
1974
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
2028
1975
|
"pluginName": "@salesforce/plugin-agent",
|
|
2029
1976
|
"pluginType": "core",
|
|
2030
|
-
"state": "beta",
|
|
2031
1977
|
"strict": true,
|
|
2032
|
-
"summary": "
|
|
1978
|
+
"summary": "Send a message to an existing agent preview session.",
|
|
2033
1979
|
"enableJsonFlag": true,
|
|
1980
|
+
"requiresProject": true,
|
|
2034
1981
|
"envVariablesSection": {
|
|
2035
1982
|
"header": "ENVIRONMENT VARIABLES",
|
|
2036
1983
|
"body": [
|
|
@@ -2045,19 +1992,19 @@
|
|
|
2045
1992
|
"body": [
|
|
2046
1993
|
{
|
|
2047
1994
|
"name": "Succeeded (0)",
|
|
2048
|
-
"description": "
|
|
1995
|
+
"description": "Message sent successfully and agent response received."
|
|
2049
1996
|
},
|
|
2050
1997
|
{
|
|
2051
|
-
"name": "
|
|
2052
|
-
"description": "
|
|
1998
|
+
"name": "NotFound (2)",
|
|
1999
|
+
"description": "Agent not found, or no preview session exists for this agent."
|
|
2053
2000
|
},
|
|
2054
2001
|
{
|
|
2055
|
-
"name": "
|
|
2056
|
-
"description": "
|
|
2002
|
+
"name": "PreviewSendFailed (4)",
|
|
2003
|
+
"description": "Failed to send message or receive response from the preview session."
|
|
2057
2004
|
},
|
|
2058
2005
|
{
|
|
2059
|
-
"name": "
|
|
2060
|
-
"description": "
|
|
2006
|
+
"name": "SessionAmbiguous (5)",
|
|
2007
|
+
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
2061
2008
|
}
|
|
2062
2009
|
]
|
|
2063
2010
|
},
|
|
@@ -2066,27 +2013,88 @@
|
|
|
2066
2013
|
"lib",
|
|
2067
2014
|
"commands",
|
|
2068
2015
|
"agent",
|
|
2069
|
-
"
|
|
2070
|
-
"
|
|
2016
|
+
"preview",
|
|
2017
|
+
"send.js"
|
|
2071
2018
|
],
|
|
2072
2019
|
"aliasPermutations": [],
|
|
2073
2020
|
"permutations": [
|
|
2074
|
-
"agent:
|
|
2075
|
-
"
|
|
2076
|
-
"
|
|
2077
|
-
"agent:
|
|
2078
|
-
"
|
|
2079
|
-
"
|
|
2021
|
+
"agent:preview:send",
|
|
2022
|
+
"preview:agent:send",
|
|
2023
|
+
"preview:send:agent",
|
|
2024
|
+
"agent:send:preview",
|
|
2025
|
+
"send:agent:preview",
|
|
2026
|
+
"send:preview:agent"
|
|
2080
2027
|
]
|
|
2081
2028
|
},
|
|
2082
|
-
"agent:
|
|
2029
|
+
"agent:preview:sessions": {
|
|
2083
2030
|
"aliases": [],
|
|
2084
2031
|
"args": {},
|
|
2085
|
-
"description": "
|
|
2032
|
+
"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.",
|
|
2086
2033
|
"examples": [
|
|
2087
|
-
"
|
|
2088
|
-
|
|
2089
|
-
|
|
2034
|
+
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
2035
|
+
],
|
|
2036
|
+
"flags": {
|
|
2037
|
+
"json": {
|
|
2038
|
+
"description": "Format output as json.",
|
|
2039
|
+
"helpGroup": "GLOBAL",
|
|
2040
|
+
"name": "json",
|
|
2041
|
+
"allowNo": false,
|
|
2042
|
+
"type": "boolean"
|
|
2043
|
+
},
|
|
2044
|
+
"flags-dir": {
|
|
2045
|
+
"helpGroup": "GLOBAL",
|
|
2046
|
+
"name": "flags-dir",
|
|
2047
|
+
"summary": "Import flag values from a directory.",
|
|
2048
|
+
"hasDynamicHelp": false,
|
|
2049
|
+
"multiple": false,
|
|
2050
|
+
"type": "option"
|
|
2051
|
+
}
|
|
2052
|
+
},
|
|
2053
|
+
"hasDynamicHelp": false,
|
|
2054
|
+
"hiddenAliases": [],
|
|
2055
|
+
"id": "agent:preview:sessions",
|
|
2056
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
2057
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
2058
|
+
"pluginType": "core",
|
|
2059
|
+
"strict": true,
|
|
2060
|
+
"summary": "List all known programmatic agent preview sessions.",
|
|
2061
|
+
"enableJsonFlag": true,
|
|
2062
|
+
"requiresProject": true,
|
|
2063
|
+
"errorCodes": {
|
|
2064
|
+
"header": "ERROR CODES",
|
|
2065
|
+
"body": [
|
|
2066
|
+
{
|
|
2067
|
+
"name": "Succeeded (0)",
|
|
2068
|
+
"description": "Sessions listed successfully (or empty list if no active sessions)."
|
|
2069
|
+
}
|
|
2070
|
+
]
|
|
2071
|
+
},
|
|
2072
|
+
"isESM": true,
|
|
2073
|
+
"relativePath": [
|
|
2074
|
+
"lib",
|
|
2075
|
+
"commands",
|
|
2076
|
+
"agent",
|
|
2077
|
+
"preview",
|
|
2078
|
+
"sessions.js"
|
|
2079
|
+
],
|
|
2080
|
+
"aliasPermutations": [],
|
|
2081
|
+
"permutations": [
|
|
2082
|
+
"agent:preview:sessions",
|
|
2083
|
+
"preview:agent:sessions",
|
|
2084
|
+
"preview:sessions:agent",
|
|
2085
|
+
"agent:sessions:preview",
|
|
2086
|
+
"sessions:agent:preview",
|
|
2087
|
+
"sessions:preview:agent"
|
|
2088
|
+
]
|
|
2089
|
+
},
|
|
2090
|
+
"agent:preview:start": {
|
|
2091
|
+
"aliases": [],
|
|
2092
|
+
"args": {},
|
|
2093
|
+
"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 with --authoring-bundle, you must explicitly specify the execution mode using one of these flags:\n\n- --use-live-actions: Executes real Apex classes, flows, and other actions in the org. This surfaces compile and validation errors during preview.\n- --simulate-actions: Uses AI to simulate action execution without calling real implementations.\n\nPublished agents (--api-name) always use live actions. The mode flags are optional and have no effect for published agents.",
|
|
2094
|
+
"examples": [
|
|
2095
|
+
"Start a programmatic agent preview session by specifying an authoring bundle; use simulated actions. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org --simulate-actions",
|
|
2096
|
+
"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",
|
|
2097
|
+
"Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
2090
2098
|
],
|
|
2091
2099
|
"flags": {
|
|
2092
2100
|
"json": {
|
|
@@ -2124,59 +2132,47 @@
|
|
|
2124
2132
|
"api-name": {
|
|
2125
2133
|
"char": "n",
|
|
2126
2134
|
"name": "api-name",
|
|
2127
|
-
"summary": "API name of the
|
|
2135
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
2128
2136
|
"hasDynamicHelp": false,
|
|
2129
2137
|
"multiple": false,
|
|
2130
2138
|
"type": "option"
|
|
2131
2139
|
},
|
|
2132
|
-
"
|
|
2133
|
-
"
|
|
2134
|
-
"
|
|
2135
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
2136
|
-
"hasDynamicHelp": true,
|
|
2137
|
-
"multiple": false,
|
|
2138
|
-
"type": "option"
|
|
2139
|
-
},
|
|
2140
|
-
"result-format": {
|
|
2141
|
-
"name": "result-format",
|
|
2142
|
-
"summary": "Format of the agent test run results.",
|
|
2143
|
-
"default": "human",
|
|
2140
|
+
"authoring-bundle": {
|
|
2141
|
+
"name": "authoring-bundle",
|
|
2142
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
2144
2143
|
"hasDynamicHelp": false,
|
|
2145
2144
|
"multiple": false,
|
|
2146
|
-
"options": [
|
|
2147
|
-
"json",
|
|
2148
|
-
"human",
|
|
2149
|
-
"junit",
|
|
2150
|
-
"tap"
|
|
2151
|
-
],
|
|
2152
2145
|
"type": "option"
|
|
2153
2146
|
},
|
|
2154
|
-
"
|
|
2155
|
-
"
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
"
|
|
2159
|
-
"
|
|
2160
|
-
"
|
|
2161
|
-
"type": "
|
|
2147
|
+
"use-live-actions": {
|
|
2148
|
+
"exclusive": [
|
|
2149
|
+
"simulate-actions"
|
|
2150
|
+
],
|
|
2151
|
+
"name": "use-live-actions",
|
|
2152
|
+
"summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
|
|
2153
|
+
"allowNo": false,
|
|
2154
|
+
"type": "boolean"
|
|
2162
2155
|
},
|
|
2163
|
-
"
|
|
2164
|
-
"
|
|
2165
|
-
|
|
2166
|
-
|
|
2156
|
+
"simulate-actions": {
|
|
2157
|
+
"exclusive": [
|
|
2158
|
+
"use-live-actions"
|
|
2159
|
+
],
|
|
2160
|
+
"name": "simulate-actions",
|
|
2161
|
+
"summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
|
|
2167
2162
|
"allowNo": false,
|
|
2168
2163
|
"type": "boolean"
|
|
2169
2164
|
}
|
|
2170
2165
|
},
|
|
2171
2166
|
"hasDynamicHelp": true,
|
|
2172
2167
|
"hiddenAliases": [],
|
|
2173
|
-
"id": "agent:
|
|
2168
|
+
"id": "agent:preview:start",
|
|
2174
2169
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
2175
2170
|
"pluginName": "@salesforce/plugin-agent",
|
|
2176
2171
|
"pluginType": "core",
|
|
2177
2172
|
"strict": true,
|
|
2178
|
-
"summary": "Start
|
|
2173
|
+
"summary": "Start a programmatic agent preview session.",
|
|
2179
2174
|
"enableJsonFlag": true,
|
|
2175
|
+
"requiresProject": true,
|
|
2180
2176
|
"envVariablesSection": {
|
|
2181
2177
|
"header": "ENVIRONMENT VARIABLES",
|
|
2182
2178
|
"body": [
|
|
@@ -2191,19 +2187,23 @@
|
|
|
2191
2187
|
"body": [
|
|
2192
2188
|
{
|
|
2193
2189
|
"name": "Succeeded (0)",
|
|
2194
|
-
"description": "
|
|
2190
|
+
"description": "Preview session started successfully."
|
|
2195
2191
|
},
|
|
2196
2192
|
{
|
|
2197
2193
|
"name": "Failed (1)",
|
|
2198
|
-
"description": "
|
|
2194
|
+
"description": "Agent Script compilation failed (syntax errors in the script)."
|
|
2199
2195
|
},
|
|
2200
2196
|
{
|
|
2201
2197
|
"name": "NotFound (2)",
|
|
2202
|
-
"description": "
|
|
2198
|
+
"description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
|
|
2203
2199
|
},
|
|
2204
2200
|
{
|
|
2205
|
-
"name": "
|
|
2206
|
-
"description": "
|
|
2201
|
+
"name": "ServerError (3)",
|
|
2202
|
+
"description": "Compilation API returned HTTP 500 (server error during compilation)."
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
"name": "PreviewStartFailed (4)",
|
|
2206
|
+
"description": "Preview session failed to start due to API or network errors."
|
|
2207
2207
|
}
|
|
2208
2208
|
]
|
|
2209
2209
|
},
|
|
@@ -2212,17 +2212,17 @@
|
|
|
2212
2212
|
"lib",
|
|
2213
2213
|
"commands",
|
|
2214
2214
|
"agent",
|
|
2215
|
-
"
|
|
2216
|
-
"
|
|
2215
|
+
"preview",
|
|
2216
|
+
"start.js"
|
|
2217
2217
|
],
|
|
2218
2218
|
"aliasPermutations": [],
|
|
2219
2219
|
"permutations": [
|
|
2220
|
-
"agent:
|
|
2221
|
-
"
|
|
2222
|
-
"
|
|
2223
|
-
"agent:
|
|
2224
|
-
"
|
|
2225
|
-
"
|
|
2220
|
+
"agent:preview:start",
|
|
2221
|
+
"preview:agent:start",
|
|
2222
|
+
"preview:start:agent",
|
|
2223
|
+
"agent:start:preview",
|
|
2224
|
+
"start:agent:preview",
|
|
2225
|
+
"start:preview:agent"
|
|
2226
2226
|
]
|
|
2227
2227
|
},
|
|
2228
2228
|
"agent:validate:authoring-bundle": {
|
|
@@ -2340,5 +2340,5 @@
|
|
|
2340
2340
|
]
|
|
2341
2341
|
}
|
|
2342
2342
|
},
|
|
2343
|
-
"version": "1.32.
|
|
2343
|
+
"version": "1.32.21"
|
|
2344
2344
|
}
|