@salesforce/plugin-agent 1.32.20-tdx26.0 → 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/README.md +19 -19
- package/lib/commands/agent/publish/authoring-bundle.js +56 -71
- package/lib/commands/agent/publish/authoring-bundle.js.map +1 -1
- package/oclif.manifest.json +511 -511
- package/package.json +10 -10
package/oclif.manifest.json
CHANGED
|
@@ -868,14 +868,13 @@
|
|
|
868
868
|
"test-spec:generate:agent"
|
|
869
869
|
]
|
|
870
870
|
},
|
|
871
|
-
"agent:
|
|
871
|
+
"agent:publish:authoring-bundle": {
|
|
872
872
|
"aliases": [],
|
|
873
873
|
"args": {},
|
|
874
|
-
"description": "
|
|
874
|
+
"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\nWhen you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The new or updated metadata is retrieved back to your DX project; specify the --skip-retrieve flag to skip this step. Finally, the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.\n\nThis command uses the API name of the authoring bundle.",
|
|
875
875
|
"examples": [
|
|
876
|
-
"
|
|
877
|
-
"
|
|
878
|
-
"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"
|
|
876
|
+
"Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
877
|
+
"Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org"
|
|
879
878
|
],
|
|
880
879
|
"flags": {
|
|
881
880
|
"json": {
|
|
@@ -910,96 +909,63 @@
|
|
|
910
909
|
"multiple": false,
|
|
911
910
|
"type": "option"
|
|
912
911
|
},
|
|
913
|
-
"session-id": {
|
|
914
|
-
"name": "session-id",
|
|
915
|
-
"required": false,
|
|
916
|
-
"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.",
|
|
917
|
-
"hasDynamicHelp": false,
|
|
918
|
-
"multiple": false,
|
|
919
|
-
"type": "option"
|
|
920
|
-
},
|
|
921
912
|
"api-name": {
|
|
922
913
|
"char": "n",
|
|
923
914
|
"name": "api-name",
|
|
924
|
-
"summary": "API name of the
|
|
915
|
+
"summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
925
916
|
"hasDynamicHelp": false,
|
|
926
917
|
"multiple": false,
|
|
927
918
|
"type": "option"
|
|
928
919
|
},
|
|
929
|
-
"
|
|
930
|
-
"name": "
|
|
931
|
-
"summary": "
|
|
932
|
-
"
|
|
933
|
-
"
|
|
934
|
-
"type": "option"
|
|
920
|
+
"skip-retrieve": {
|
|
921
|
+
"name": "skip-retrieve",
|
|
922
|
+
"summary": "Don't retrieve the metadata associated with the agent to your DX project.",
|
|
923
|
+
"allowNo": false,
|
|
924
|
+
"type": "boolean"
|
|
935
925
|
}
|
|
936
926
|
},
|
|
937
927
|
"hasDynamicHelp": true,
|
|
938
928
|
"hiddenAliases": [],
|
|
939
|
-
"id": "agent:
|
|
929
|
+
"id": "agent:publish:authoring-bundle",
|
|
940
930
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
941
931
|
"pluginName": "@salesforce/plugin-agent",
|
|
942
932
|
"pluginType": "core",
|
|
943
933
|
"strict": true,
|
|
944
|
-
"summary": "
|
|
934
|
+
"summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
|
|
945
935
|
"enableJsonFlag": true,
|
|
946
936
|
"requiresProject": true,
|
|
947
|
-
"
|
|
948
|
-
"
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
953
|
-
}
|
|
954
|
-
]
|
|
955
|
-
},
|
|
956
|
-
"errorCodes": {
|
|
957
|
-
"header": "ERROR CODES",
|
|
958
|
-
"body": [
|
|
959
|
-
{
|
|
960
|
-
"name": "Succeeded (0)",
|
|
961
|
-
"description": "Preview session ended successfully and traces saved."
|
|
962
|
-
},
|
|
963
|
-
{
|
|
964
|
-
"name": "NotFound (2)",
|
|
965
|
-
"description": "Agent not found, or no preview session exists for this agent."
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
"name": "PreviewEndFailed (4)",
|
|
969
|
-
"description": "Failed to end the preview session."
|
|
970
|
-
},
|
|
971
|
-
{
|
|
972
|
-
"name": "SessionAmbiguous (5)",
|
|
973
|
-
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
974
|
-
}
|
|
975
|
-
]
|
|
937
|
+
"FLAGGABLE_PROMPTS": {
|
|
938
|
+
"api-name": {
|
|
939
|
+
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
940
|
+
"promptMessage": "API name of the authoring bundle to publish"
|
|
941
|
+
}
|
|
976
942
|
},
|
|
977
943
|
"isESM": true,
|
|
978
944
|
"relativePath": [
|
|
979
945
|
"lib",
|
|
980
946
|
"commands",
|
|
981
947
|
"agent",
|
|
982
|
-
"
|
|
983
|
-
"
|
|
948
|
+
"publish",
|
|
949
|
+
"authoring-bundle.js"
|
|
984
950
|
],
|
|
985
951
|
"aliasPermutations": [],
|
|
986
952
|
"permutations": [
|
|
987
|
-
"agent:
|
|
988
|
-
"
|
|
989
|
-
"
|
|
990
|
-
"agent:
|
|
991
|
-
"
|
|
992
|
-
"
|
|
953
|
+
"agent:publish:authoring-bundle",
|
|
954
|
+
"publish:agent:authoring-bundle",
|
|
955
|
+
"publish:authoring-bundle:agent",
|
|
956
|
+
"agent:authoring-bundle:publish",
|
|
957
|
+
"authoring-bundle:agent:publish",
|
|
958
|
+
"authoring-bundle:publish:agent"
|
|
993
959
|
]
|
|
994
960
|
},
|
|
995
|
-
"agent:
|
|
961
|
+
"agent:test:create": {
|
|
996
962
|
"aliases": [],
|
|
997
963
|
"args": {},
|
|
998
|
-
"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.",
|
|
999
965
|
"examples": [
|
|
1000
|
-
"
|
|
1001
|
-
"
|
|
1002
|
-
"
|
|
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"
|
|
1003
969
|
],
|
|
1004
970
|
"flags": {
|
|
1005
971
|
"json": {
|
|
@@ -1017,6 +983,20 @@
|
|
|
1017
983
|
"multiple": false,
|
|
1018
984
|
"type": "option"
|
|
1019
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
|
+
},
|
|
1020
1000
|
"target-org": {
|
|
1021
1001
|
"char": "o",
|
|
1022
1002
|
"name": "target-org",
|
|
@@ -1034,49 +1014,28 @@
|
|
|
1034
1014
|
"multiple": false,
|
|
1035
1015
|
"type": "option"
|
|
1036
1016
|
},
|
|
1037
|
-
"
|
|
1038
|
-
"name": "
|
|
1039
|
-
"
|
|
1040
|
-
"
|
|
1041
|
-
"
|
|
1042
|
-
"multiple": false,
|
|
1043
|
-
"type": "option"
|
|
1044
|
-
},
|
|
1045
|
-
"utterance": {
|
|
1046
|
-
"char": "u",
|
|
1047
|
-
"name": "utterance",
|
|
1048
|
-
"required": true,
|
|
1049
|
-
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1050
|
-
"hasDynamicHelp": false,
|
|
1051
|
-
"multiple": false,
|
|
1052
|
-
"type": "option"
|
|
1053
|
-
},
|
|
1054
|
-
"api-name": {
|
|
1055
|
-
"char": "n",
|
|
1056
|
-
"name": "api-name",
|
|
1057
|
-
"summary": "API name of the activated published agent you want to preview.",
|
|
1058
|
-
"hasDynamicHelp": false,
|
|
1059
|
-
"multiple": false,
|
|
1060
|
-
"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"
|
|
1061
1022
|
},
|
|
1062
|
-
"
|
|
1063
|
-
"name": "
|
|
1064
|
-
"summary": "
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1067
|
-
"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"
|
|
1068
1028
|
}
|
|
1069
1029
|
},
|
|
1070
1030
|
"hasDynamicHelp": true,
|
|
1071
1031
|
"hiddenAliases": [],
|
|
1072
|
-
"id": "agent:
|
|
1032
|
+
"id": "agent:test:create",
|
|
1073
1033
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1074
1034
|
"pluginName": "@salesforce/plugin-agent",
|
|
1075
1035
|
"pluginType": "core",
|
|
1076
1036
|
"strict": true,
|
|
1077
|
-
"summary": "
|
|
1037
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
1078
1038
|
"enableJsonFlag": true,
|
|
1079
|
-
"requiresProject": true,
|
|
1080
1039
|
"envVariablesSection": {
|
|
1081
1040
|
"header": "ENVIRONMENT VARIABLES",
|
|
1082
1041
|
"body": [
|
|
@@ -1091,19 +1050,19 @@
|
|
|
1091
1050
|
"body": [
|
|
1092
1051
|
{
|
|
1093
1052
|
"name": "Succeeded (0)",
|
|
1094
|
-
"description": "
|
|
1053
|
+
"description": "Test created and deployed successfully."
|
|
1095
1054
|
},
|
|
1096
1055
|
{
|
|
1097
|
-
"name": "
|
|
1098
|
-
"description": "
|
|
1056
|
+
"name": "Failed (1)",
|
|
1057
|
+
"description": "Test validation errors or metadata format issues."
|
|
1099
1058
|
},
|
|
1100
1059
|
{
|
|
1101
|
-
"name": "
|
|
1102
|
-
"description": "
|
|
1060
|
+
"name": "NotFound (2)",
|
|
1061
|
+
"description": "Test spec file not found or org connection failed."
|
|
1103
1062
|
},
|
|
1104
1063
|
{
|
|
1105
|
-
"name": "
|
|
1106
|
-
"description": "
|
|
1064
|
+
"name": "DeploymentFailed (4)",
|
|
1065
|
+
"description": "Deployment failed due to API or network errors."
|
|
1107
1066
|
}
|
|
1108
1067
|
]
|
|
1109
1068
|
},
|
|
@@ -1112,25 +1071,26 @@
|
|
|
1112
1071
|
"lib",
|
|
1113
1072
|
"commands",
|
|
1114
1073
|
"agent",
|
|
1115
|
-
"
|
|
1116
|
-
"
|
|
1074
|
+
"test",
|
|
1075
|
+
"create.js"
|
|
1117
1076
|
],
|
|
1118
1077
|
"aliasPermutations": [],
|
|
1119
1078
|
"permutations": [
|
|
1120
|
-
"agent:
|
|
1121
|
-
"
|
|
1122
|
-
"
|
|
1123
|
-
"agent:
|
|
1124
|
-
"
|
|
1125
|
-
"
|
|
1079
|
+
"agent:test:create",
|
|
1080
|
+
"test:agent:create",
|
|
1081
|
+
"test:create:agent",
|
|
1082
|
+
"agent:create:test",
|
|
1083
|
+
"create:agent:test",
|
|
1084
|
+
"create:test:agent"
|
|
1126
1085
|
]
|
|
1127
1086
|
},
|
|
1128
|
-
"agent:
|
|
1087
|
+
"agent:test:list": {
|
|
1129
1088
|
"aliases": [],
|
|
1130
1089
|
"args": {},
|
|
1131
|
-
"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.",
|
|
1132
1091
|
"examples": [
|
|
1133
|
-
"List
|
|
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"
|
|
1134
1094
|
],
|
|
1135
1095
|
"flags": {
|
|
1136
1096
|
"json": {
|
|
@@ -1147,24 +1107,53 @@
|
|
|
1147
1107
|
"hasDynamicHelp": false,
|
|
1148
1108
|
"multiple": false,
|
|
1149
1109
|
"type": "option"
|
|
1110
|
+
},
|
|
1111
|
+
"target-org": {
|
|
1112
|
+
"char": "o",
|
|
1113
|
+
"name": "target-org",
|
|
1114
|
+
"noCacheDefault": true,
|
|
1115
|
+
"required": true,
|
|
1116
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1117
|
+
"hasDynamicHelp": true,
|
|
1118
|
+
"multiple": false,
|
|
1119
|
+
"type": "option"
|
|
1120
|
+
},
|
|
1121
|
+
"api-version": {
|
|
1122
|
+
"description": "Override the api version used for api requests made by this command",
|
|
1123
|
+
"name": "api-version",
|
|
1124
|
+
"hasDynamicHelp": false,
|
|
1125
|
+
"multiple": false,
|
|
1126
|
+
"type": "option"
|
|
1150
1127
|
}
|
|
1151
1128
|
},
|
|
1152
|
-
"hasDynamicHelp":
|
|
1129
|
+
"hasDynamicHelp": true,
|
|
1153
1130
|
"hiddenAliases": [],
|
|
1154
|
-
"id": "agent:
|
|
1131
|
+
"id": "agent:test:list",
|
|
1155
1132
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1156
1133
|
"pluginName": "@salesforce/plugin-agent",
|
|
1157
1134
|
"pluginType": "core",
|
|
1158
1135
|
"strict": true,
|
|
1159
|
-
"summary": "List
|
|
1136
|
+
"summary": "List the available agent tests in your org.",
|
|
1160
1137
|
"enableJsonFlag": true,
|
|
1161
|
-
"
|
|
1138
|
+
"envVariablesSection": {
|
|
1139
|
+
"header": "ENVIRONMENT VARIABLES",
|
|
1140
|
+
"body": [
|
|
1141
|
+
{
|
|
1142
|
+
"name": "SF_TARGET_ORG",
|
|
1143
|
+
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
1144
|
+
}
|
|
1145
|
+
]
|
|
1146
|
+
},
|
|
1162
1147
|
"errorCodes": {
|
|
1163
1148
|
"header": "ERROR CODES",
|
|
1164
1149
|
"body": [
|
|
1165
1150
|
{
|
|
1166
1151
|
"name": "Succeeded (0)",
|
|
1167
|
-
"description": "
|
|
1152
|
+
"description": "Agent tests listed successfully."
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"name": "Failed (4)",
|
|
1156
|
+
"description": "Failed to retrieve agent tests due to API or network errors."
|
|
1168
1157
|
}
|
|
1169
1158
|
]
|
|
1170
1159
|
},
|
|
@@ -1173,27 +1162,27 @@
|
|
|
1173
1162
|
"lib",
|
|
1174
1163
|
"commands",
|
|
1175
1164
|
"agent",
|
|
1176
|
-
"
|
|
1177
|
-
"
|
|
1165
|
+
"test",
|
|
1166
|
+
"list.js"
|
|
1178
1167
|
],
|
|
1179
1168
|
"aliasPermutations": [],
|
|
1180
1169
|
"permutations": [
|
|
1181
|
-
"agent:
|
|
1182
|
-
"
|
|
1183
|
-
"
|
|
1184
|
-
"agent:
|
|
1185
|
-
"
|
|
1186
|
-
"
|
|
1170
|
+
"agent:test:list",
|
|
1171
|
+
"test:agent:list",
|
|
1172
|
+
"test:list:agent",
|
|
1173
|
+
"agent:list:test",
|
|
1174
|
+
"list:agent:test",
|
|
1175
|
+
"list:test:agent"
|
|
1187
1176
|
]
|
|
1188
1177
|
},
|
|
1189
|
-
"agent:
|
|
1178
|
+
"agent:test:results": {
|
|
1190
1179
|
"aliases": [],
|
|
1191
1180
|
"args": {},
|
|
1192
|
-
"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.",
|
|
1193
1182
|
"examples": [
|
|
1194
|
-
"
|
|
1195
|
-
"
|
|
1196
|
-
"
|
|
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"
|
|
1197
1186
|
],
|
|
1198
1187
|
"flags": {
|
|
1199
1188
|
"json": {
|
|
@@ -1228,50 +1217,55 @@
|
|
|
1228
1217
|
"multiple": false,
|
|
1229
1218
|
"type": "option"
|
|
1230
1219
|
},
|
|
1231
|
-
"
|
|
1232
|
-
"char": "
|
|
1233
|
-
"name": "
|
|
1234
|
-
"
|
|
1220
|
+
"job-id": {
|
|
1221
|
+
"char": "i",
|
|
1222
|
+
"name": "job-id",
|
|
1223
|
+
"required": true,
|
|
1224
|
+
"summary": "Job ID of the completed agent test run.",
|
|
1235
1225
|
"hasDynamicHelp": false,
|
|
1236
1226
|
"multiple": false,
|
|
1237
1227
|
"type": "option"
|
|
1238
1228
|
},
|
|
1239
|
-
"
|
|
1240
|
-
"name": "
|
|
1241
|
-
"summary": "
|
|
1229
|
+
"result-format": {
|
|
1230
|
+
"name": "result-format",
|
|
1231
|
+
"summary": "Format of the agent test run results.",
|
|
1232
|
+
"default": "human",
|
|
1242
1233
|
"hasDynamicHelp": false,
|
|
1243
1234
|
"multiple": false,
|
|
1235
|
+
"options": [
|
|
1236
|
+
"json",
|
|
1237
|
+
"human",
|
|
1238
|
+
"junit",
|
|
1239
|
+
"tap"
|
|
1240
|
+
],
|
|
1244
1241
|
"type": "option"
|
|
1245
1242
|
},
|
|
1246
|
-
"
|
|
1247
|
-
"
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
"
|
|
1251
|
-
"
|
|
1252
|
-
"
|
|
1253
|
-
"type": "
|
|
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"
|
|
1254
1251
|
},
|
|
1255
|
-
"
|
|
1256
|
-
"
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
"name": "simulate-actions",
|
|
1260
|
-
"summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
|
|
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.",
|
|
1261
1256
|
"allowNo": false,
|
|
1262
1257
|
"type": "boolean"
|
|
1263
1258
|
}
|
|
1264
1259
|
},
|
|
1265
1260
|
"hasDynamicHelp": true,
|
|
1266
1261
|
"hiddenAliases": [],
|
|
1267
|
-
"id": "agent:
|
|
1262
|
+
"id": "agent:test:results",
|
|
1268
1263
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1269
1264
|
"pluginName": "@salesforce/plugin-agent",
|
|
1270
1265
|
"pluginType": "core",
|
|
1271
1266
|
"strict": true,
|
|
1272
|
-
"summary": "
|
|
1267
|
+
"summary": "Get the results of a completed agent test run.",
|
|
1273
1268
|
"enableJsonFlag": true,
|
|
1274
|
-
"requiresProject": true,
|
|
1275
1269
|
"envVariablesSection": {
|
|
1276
1270
|
"header": "ENVIRONMENT VARIABLES",
|
|
1277
1271
|
"body": [
|
|
@@ -1286,23 +1280,15 @@
|
|
|
1286
1280
|
"body": [
|
|
1287
1281
|
{
|
|
1288
1282
|
"name": "Succeeded (0)",
|
|
1289
|
-
"description": "
|
|
1290
|
-
},
|
|
1291
|
-
{
|
|
1292
|
-
"name": "Failed (1)",
|
|
1293
|
-
"description": "Agent Script compilation failed (syntax errors in the script)."
|
|
1283
|
+
"description": "Results retrieved successfully. Test results (passed/failed) are in the output."
|
|
1294
1284
|
},
|
|
1295
1285
|
{
|
|
1296
1286
|
"name": "NotFound (2)",
|
|
1297
|
-
"description": "
|
|
1298
|
-
},
|
|
1299
|
-
{
|
|
1300
|
-
"name": "ServerError (3)",
|
|
1301
|
-
"description": "Compilation API returned HTTP 500 (server error during compilation)."
|
|
1287
|
+
"description": "Job ID not found or invalid."
|
|
1302
1288
|
},
|
|
1303
1289
|
{
|
|
1304
|
-
"name": "
|
|
1305
|
-
"description": "
|
|
1290
|
+
"name": "Failed (4)",
|
|
1291
|
+
"description": "Failed to retrieve results due to API or network errors."
|
|
1306
1292
|
}
|
|
1307
1293
|
]
|
|
1308
1294
|
},
|
|
@@ -1311,26 +1297,27 @@
|
|
|
1311
1297
|
"lib",
|
|
1312
1298
|
"commands",
|
|
1313
1299
|
"agent",
|
|
1314
|
-
"
|
|
1315
|
-
"
|
|
1300
|
+
"test",
|
|
1301
|
+
"results.js"
|
|
1316
1302
|
],
|
|
1317
1303
|
"aliasPermutations": [],
|
|
1318
1304
|
"permutations": [
|
|
1319
|
-
"agent:
|
|
1320
|
-
"
|
|
1321
|
-
"
|
|
1322
|
-
"agent:
|
|
1323
|
-
"
|
|
1324
|
-
"
|
|
1305
|
+
"agent:test:results",
|
|
1306
|
+
"test:agent:results",
|
|
1307
|
+
"test:results:agent",
|
|
1308
|
+
"agent:results:test",
|
|
1309
|
+
"results:agent:test",
|
|
1310
|
+
"results:test:agent"
|
|
1325
1311
|
]
|
|
1326
1312
|
},
|
|
1327
|
-
"agent:
|
|
1313
|
+
"agent:test:resume": {
|
|
1328
1314
|
"aliases": [],
|
|
1329
1315
|
"args": {},
|
|
1330
|
-
"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.",
|
|
1331
1317
|
"examples": [
|
|
1332
|
-
"
|
|
1333
|
-
"
|
|
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"
|
|
1334
1321
|
],
|
|
1335
1322
|
"flags": {
|
|
1336
1323
|
"json": {
|
|
@@ -1365,132 +1352,69 @@
|
|
|
1365
1352
|
"multiple": false,
|
|
1366
1353
|
"type": "option"
|
|
1367
1354
|
},
|
|
1368
|
-
"
|
|
1369
|
-
"char": "
|
|
1370
|
-
"name": "
|
|
1371
|
-
"summary": "
|
|
1355
|
+
"job-id": {
|
|
1356
|
+
"char": "i",
|
|
1357
|
+
"name": "job-id",
|
|
1358
|
+
"summary": "Job ID of the original agent test run.",
|
|
1372
1359
|
"hasDynamicHelp": false,
|
|
1373
1360
|
"multiple": false,
|
|
1374
1361
|
"type": "option"
|
|
1375
1362
|
},
|
|
1376
|
-
"
|
|
1377
|
-
"
|
|
1378
|
-
"
|
|
1379
|
-
"
|
|
1380
|
-
"type": "boolean"
|
|
1381
|
-
}
|
|
1382
|
-
},
|
|
1383
|
-
"hasDynamicHelp": true,
|
|
1384
|
-
"hiddenAliases": [],
|
|
1385
|
-
"id": "agent:publish:authoring-bundle",
|
|
1386
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1387
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1388
|
-
"pluginType": "core",
|
|
1389
|
-
"strict": true,
|
|
1390
|
-
"summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
|
|
1391
|
-
"enableJsonFlag": true,
|
|
1392
|
-
"requiresProject": true,
|
|
1393
|
-
"FLAGGABLE_PROMPTS": {
|
|
1394
|
-
"api-name": {
|
|
1395
|
-
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
1396
|
-
"promptMessage": "API name of the authoring bundle to publish"
|
|
1397
|
-
}
|
|
1398
|
-
},
|
|
1399
|
-
"isESM": true,
|
|
1400
|
-
"relativePath": [
|
|
1401
|
-
"lib",
|
|
1402
|
-
"commands",
|
|
1403
|
-
"agent",
|
|
1404
|
-
"publish",
|
|
1405
|
-
"authoring-bundle.js"
|
|
1406
|
-
],
|
|
1407
|
-
"aliasPermutations": [],
|
|
1408
|
-
"permutations": [
|
|
1409
|
-
"agent:publish:authoring-bundle",
|
|
1410
|
-
"publish:agent:authoring-bundle",
|
|
1411
|
-
"publish:authoring-bundle:agent",
|
|
1412
|
-
"agent:authoring-bundle:publish",
|
|
1413
|
-
"authoring-bundle:agent:publish",
|
|
1414
|
-
"authoring-bundle:publish:agent"
|
|
1415
|
-
]
|
|
1416
|
-
},
|
|
1417
|
-
"agent:test:create": {
|
|
1418
|
-
"aliases": [],
|
|
1419
|
-
"args": {},
|
|
1420
|
-
"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.",
|
|
1421
|
-
"examples": [
|
|
1422
|
-
"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 %>",
|
|
1423
|
-
"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",
|
|
1424
|
-
"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"
|
|
1425
|
-
],
|
|
1426
|
-
"flags": {
|
|
1427
|
-
"json": {
|
|
1428
|
-
"description": "Format output as json.",
|
|
1429
|
-
"helpGroup": "GLOBAL",
|
|
1430
|
-
"name": "json",
|
|
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.",
|
|
1431
1367
|
"allowNo": false,
|
|
1432
1368
|
"type": "boolean"
|
|
1433
1369
|
},
|
|
1434
|
-
"
|
|
1435
|
-
"
|
|
1436
|
-
"name": "
|
|
1437
|
-
"summary": "
|
|
1438
|
-
"
|
|
1439
|
-
"
|
|
1440
|
-
"type": "option"
|
|
1441
|
-
},
|
|
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,
|
|
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,
|
|
1446
1376
|
"multiple": false,
|
|
1447
1377
|
"type": "option"
|
|
1448
1378
|
},
|
|
1449
|
-
"
|
|
1450
|
-
"name": "
|
|
1451
|
-
"summary": "
|
|
1379
|
+
"result-format": {
|
|
1380
|
+
"name": "result-format",
|
|
1381
|
+
"summary": "Format of the agent test run results.",
|
|
1382
|
+
"default": "human",
|
|
1452
1383
|
"hasDynamicHelp": false,
|
|
1453
1384
|
"multiple": false,
|
|
1385
|
+
"options": [
|
|
1386
|
+
"json",
|
|
1387
|
+
"human",
|
|
1388
|
+
"junit",
|
|
1389
|
+
"tap"
|
|
1390
|
+
],
|
|
1454
1391
|
"type": "option"
|
|
1455
1392
|
},
|
|
1456
|
-
"
|
|
1457
|
-
"char": "
|
|
1458
|
-
"
|
|
1459
|
-
"
|
|
1460
|
-
"
|
|
1461
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1462
|
-
"hasDynamicHelp": true,
|
|
1463
|
-
"multiple": false,
|
|
1464
|
-
"type": "option"
|
|
1465
|
-
},
|
|
1466
|
-
"api-version": {
|
|
1467
|
-
"description": "Override the api version used for api requests made by this command",
|
|
1468
|
-
"name": "api-version",
|
|
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.",
|
|
1469
1398
|
"hasDynamicHelp": false,
|
|
1470
1399
|
"multiple": false,
|
|
1471
1400
|
"type": "option"
|
|
1472
1401
|
},
|
|
1473
|
-
"
|
|
1474
|
-
"
|
|
1475
|
-
"
|
|
1476
|
-
"
|
|
1477
|
-
"type": "boolean"
|
|
1478
|
-
},
|
|
1479
|
-
"force-overwrite": {
|
|
1480
|
-
"name": "force-overwrite",
|
|
1481
|
-
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
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,11 +1589,19 @@
|
|
|
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": "
|
|
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."
|
|
1613
1605
|
}
|
|
1614
1606
|
]
|
|
1615
1607
|
},
|
|
@@ -1619,26 +1611,26 @@
|
|
|
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
|
}
|