@salesforce/plugin-agent 1.40.2 → 1.40.4
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 +23 -23
- package/oclif.manifest.json +582 -582
- package/package.json +4 -4
package/oclif.manifest.json
CHANGED
|
@@ -879,15 +879,16 @@
|
|
|
879
879
|
"test-spec:generate:agent"
|
|
880
880
|
]
|
|
881
881
|
},
|
|
882
|
-
"agent:
|
|
882
|
+
"agent:preview:end": {
|
|
883
883
|
"aliases": [],
|
|
884
884
|
"args": {},
|
|
885
|
-
"description": "
|
|
885
|
+
"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, respectively. 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\nUse the --all flag to end all active preview sessions at once. You can combine --all with --api-name or --authoring-bundle to end only sessions for a specific agent, or use --all on its own to end every session across all agents in the project.",
|
|
886
886
|
"examples": [
|
|
887
|
-
"
|
|
888
|
-
"
|
|
889
|
-
"
|
|
890
|
-
"
|
|
887
|
+
"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",
|
|
888
|
+
"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",
|
|
889
|
+
"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",
|
|
890
|
+
"End all active preview sessions for a specific agent without prompting:\n<%= config.bin %> <%= command.id %> --all --authoring-bundle My_Local_Agent --target-org <target_org> --no-prompt",
|
|
891
|
+
"End all active preview sessions across every agent in the local session cache for an org:\n<%= config.bin %> <%= command.id %> --all --target-org <target_org>"
|
|
891
892
|
],
|
|
892
893
|
"flags": {
|
|
893
894
|
"json": {
|
|
@@ -922,95 +923,129 @@
|
|
|
922
923
|
"multiple": false,
|
|
923
924
|
"type": "option"
|
|
924
925
|
},
|
|
926
|
+
"session-id": {
|
|
927
|
+
"exclusive": [
|
|
928
|
+
"all"
|
|
929
|
+
],
|
|
930
|
+
"name": "session-id",
|
|
931
|
+
"required": false,
|
|
932
|
+
"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.",
|
|
933
|
+
"hasDynamicHelp": false,
|
|
934
|
+
"multiple": false,
|
|
935
|
+
"type": "option"
|
|
936
|
+
},
|
|
925
937
|
"api-name": {
|
|
926
938
|
"char": "n",
|
|
939
|
+
"exclusive": [
|
|
940
|
+
"authoring-bundle"
|
|
941
|
+
],
|
|
927
942
|
"name": "api-name",
|
|
928
|
-
"summary": "API name of the
|
|
943
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
929
944
|
"hasDynamicHelp": false,
|
|
930
945
|
"multiple": false,
|
|
931
946
|
"type": "option"
|
|
932
947
|
},
|
|
933
|
-
"
|
|
934
|
-
"
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
"
|
|
948
|
+
"authoring-bundle": {
|
|
949
|
+
"exclusive": [
|
|
950
|
+
"api-name"
|
|
951
|
+
],
|
|
952
|
+
"name": "authoring-bundle",
|
|
953
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
954
|
+
"hasDynamicHelp": false,
|
|
955
|
+
"multiple": false,
|
|
956
|
+
"type": "option"
|
|
938
957
|
},
|
|
939
|
-
"
|
|
940
|
-
"char": "v",
|
|
958
|
+
"all": {
|
|
941
959
|
"exclusive": [
|
|
942
|
-
"
|
|
960
|
+
"session-id"
|
|
943
961
|
],
|
|
944
|
-
"name": "
|
|
945
|
-
"summary": "
|
|
962
|
+
"name": "all",
|
|
963
|
+
"summary": "End all active preview sessions. Combine with --api-name or --authoring-bundle to limit to a specific agent, or use with only --target-org to end sessions for all agents found in the local session cache. Requires --target-org.",
|
|
946
964
|
"allowNo": false,
|
|
947
965
|
"type": "boolean"
|
|
948
966
|
},
|
|
949
|
-
"
|
|
950
|
-
"
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
"name": "concise",
|
|
954
|
-
"summary": "Display minimal output with only essential information about the publish operation.",
|
|
967
|
+
"no-prompt": {
|
|
968
|
+
"char": "p",
|
|
969
|
+
"name": "no-prompt",
|
|
970
|
+
"summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
|
|
955
971
|
"allowNo": false,
|
|
956
972
|
"type": "boolean"
|
|
957
973
|
}
|
|
958
974
|
},
|
|
959
975
|
"hasDynamicHelp": true,
|
|
960
976
|
"hiddenAliases": [],
|
|
961
|
-
"id": "agent:
|
|
977
|
+
"id": "agent:preview:end",
|
|
962
978
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
963
979
|
"pluginName": "@salesforce/plugin-agent",
|
|
964
980
|
"pluginType": "core",
|
|
965
981
|
"strict": true,
|
|
966
|
-
"summary": "
|
|
982
|
+
"summary": "End an existing programmatic agent preview session and get trace location.",
|
|
967
983
|
"enableJsonFlag": true,
|
|
968
984
|
"requiresProject": true,
|
|
985
|
+
"envVariablesSection": {
|
|
986
|
+
"header": "ENVIRONMENT VARIABLES",
|
|
987
|
+
"body": [
|
|
988
|
+
{
|
|
989
|
+
"name": "SF_TARGET_ORG",
|
|
990
|
+
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
991
|
+
}
|
|
992
|
+
]
|
|
993
|
+
},
|
|
969
994
|
"errorCodes": {
|
|
970
995
|
"header": "ERROR CODES",
|
|
971
996
|
"body": [
|
|
972
997
|
{
|
|
973
998
|
"name": "Succeeded (0)",
|
|
974
|
-
"description": "
|
|
999
|
+
"description": "Preview session ended successfully and traces saved."
|
|
975
1000
|
},
|
|
976
1001
|
{
|
|
977
|
-
"name": "
|
|
978
|
-
"description": "
|
|
1002
|
+
"name": "ExactlyOneRequired (2)",
|
|
1003
|
+
"description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "NotFound (2)",
|
|
1007
|
+
"description": "Agent not found, or no preview session exists for this agent."
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"name": "PreviewEndFailed (4)",
|
|
1011
|
+
"description": "Failed to end the preview session."
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"name": "PreviewEndPartialFailure (68)",
|
|
1015
|
+
"description": "With --all, one or more sessions failed to end while others succeeded."
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"name": "SessionAmbiguous (5)",
|
|
1019
|
+
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
979
1020
|
}
|
|
980
1021
|
]
|
|
981
1022
|
},
|
|
982
|
-
"FLAGGABLE_PROMPTS": {
|
|
983
|
-
"api-name": {
|
|
984
|
-
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
985
|
-
"promptMessage": "API name of the authoring bundle to publish"
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
1023
|
"isESM": true,
|
|
989
1024
|
"relativePath": [
|
|
990
1025
|
"lib",
|
|
991
1026
|
"commands",
|
|
992
1027
|
"agent",
|
|
993
|
-
"
|
|
994
|
-
"
|
|
1028
|
+
"preview",
|
|
1029
|
+
"end.js"
|
|
995
1030
|
],
|
|
996
1031
|
"aliasPermutations": [],
|
|
997
1032
|
"permutations": [
|
|
998
|
-
"agent:
|
|
999
|
-
"
|
|
1000
|
-
"
|
|
1001
|
-
"agent:
|
|
1002
|
-
"
|
|
1003
|
-
"
|
|
1033
|
+
"agent:preview:end",
|
|
1034
|
+
"preview:agent:end",
|
|
1035
|
+
"preview:end:agent",
|
|
1036
|
+
"agent:end:preview",
|
|
1037
|
+
"end:agent:preview",
|
|
1038
|
+
"end:preview:agent"
|
|
1004
1039
|
]
|
|
1005
1040
|
},
|
|
1006
|
-
"agent:
|
|
1041
|
+
"agent:preview:send": {
|
|
1007
1042
|
"aliases": [],
|
|
1008
1043
|
"args": {},
|
|
1009
|
-
"description": "
|
|
1044
|
+
"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.",
|
|
1010
1045
|
"examples": [
|
|
1011
|
-
"
|
|
1012
|
-
"
|
|
1013
|
-
"
|
|
1046
|
+
"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>",
|
|
1047
|
+
"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",
|
|
1048
|
+
"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"
|
|
1014
1049
|
],
|
|
1015
1050
|
"flags": {
|
|
1016
1051
|
"json": {
|
|
@@ -1028,20 +1063,6 @@
|
|
|
1028
1063
|
"multiple": false,
|
|
1029
1064
|
"type": "option"
|
|
1030
1065
|
},
|
|
1031
|
-
"api-name": {
|
|
1032
|
-
"name": "api-name",
|
|
1033
|
-
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1034
|
-
"hasDynamicHelp": false,
|
|
1035
|
-
"multiple": false,
|
|
1036
|
-
"type": "option"
|
|
1037
|
-
},
|
|
1038
|
-
"spec": {
|
|
1039
|
-
"name": "spec",
|
|
1040
|
-
"summary": "Path to the test spec YAML file.",
|
|
1041
|
-
"hasDynamicHelp": false,
|
|
1042
|
-
"multiple": false,
|
|
1043
|
-
"type": "option"
|
|
1044
|
-
},
|
|
1045
1066
|
"target-org": {
|
|
1046
1067
|
"char": "o",
|
|
1047
1068
|
"name": "target-org",
|
|
@@ -1059,28 +1080,49 @@
|
|
|
1059
1080
|
"multiple": false,
|
|
1060
1081
|
"type": "option"
|
|
1061
1082
|
},
|
|
1062
|
-
"
|
|
1063
|
-
"name": "
|
|
1064
|
-
"
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1083
|
+
"session-id": {
|
|
1084
|
+
"name": "session-id",
|
|
1085
|
+
"required": false,
|
|
1086
|
+
"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.",
|
|
1087
|
+
"hasDynamicHelp": false,
|
|
1088
|
+
"multiple": false,
|
|
1089
|
+
"type": "option"
|
|
1067
1090
|
},
|
|
1068
|
-
"
|
|
1069
|
-
"
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1072
|
-
"
|
|
1091
|
+
"utterance": {
|
|
1092
|
+
"char": "u",
|
|
1093
|
+
"name": "utterance",
|
|
1094
|
+
"required": true,
|
|
1095
|
+
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1096
|
+
"hasDynamicHelp": false,
|
|
1097
|
+
"multiple": false,
|
|
1098
|
+
"type": "option"
|
|
1099
|
+
},
|
|
1100
|
+
"api-name": {
|
|
1101
|
+
"char": "n",
|
|
1102
|
+
"name": "api-name",
|
|
1103
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1104
|
+
"hasDynamicHelp": false,
|
|
1105
|
+
"multiple": false,
|
|
1106
|
+
"type": "option"
|
|
1107
|
+
},
|
|
1108
|
+
"authoring-bundle": {
|
|
1109
|
+
"name": "authoring-bundle",
|
|
1110
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1111
|
+
"hasDynamicHelp": false,
|
|
1112
|
+
"multiple": false,
|
|
1113
|
+
"type": "option"
|
|
1073
1114
|
}
|
|
1074
1115
|
},
|
|
1075
1116
|
"hasDynamicHelp": true,
|
|
1076
1117
|
"hiddenAliases": [],
|
|
1077
|
-
"id": "agent:
|
|
1118
|
+
"id": "agent:preview:send",
|
|
1078
1119
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1079
1120
|
"pluginName": "@salesforce/plugin-agent",
|
|
1080
1121
|
"pluginType": "core",
|
|
1081
1122
|
"strict": true,
|
|
1082
|
-
"summary": "
|
|
1123
|
+
"summary": "Send a message to an existing agent preview session.",
|
|
1083
1124
|
"enableJsonFlag": true,
|
|
1125
|
+
"requiresProject": true,
|
|
1084
1126
|
"envVariablesSection": {
|
|
1085
1127
|
"header": "ENVIRONMENT VARIABLES",
|
|
1086
1128
|
"body": [
|
|
@@ -1095,19 +1137,19 @@
|
|
|
1095
1137
|
"body": [
|
|
1096
1138
|
{
|
|
1097
1139
|
"name": "Succeeded (0)",
|
|
1098
|
-
"description": "
|
|
1140
|
+
"description": "Message sent successfully and agent response received."
|
|
1099
1141
|
},
|
|
1100
1142
|
{
|
|
1101
|
-
"name": "
|
|
1102
|
-
"description": "
|
|
1143
|
+
"name": "NotFound (2)",
|
|
1144
|
+
"description": "Agent not found, or no preview session exists for this agent."
|
|
1103
1145
|
},
|
|
1104
1146
|
{
|
|
1105
|
-
"name": "
|
|
1106
|
-
"description": "
|
|
1147
|
+
"name": "PreviewSendFailed (4)",
|
|
1148
|
+
"description": "Failed to send message or receive response from the preview session."
|
|
1107
1149
|
},
|
|
1108
1150
|
{
|
|
1109
|
-
"name": "
|
|
1110
|
-
"description": "
|
|
1151
|
+
"name": "SessionAmbiguous (5)",
|
|
1152
|
+
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
1111
1153
|
}
|
|
1112
1154
|
]
|
|
1113
1155
|
},
|
|
@@ -1116,26 +1158,25 @@
|
|
|
1116
1158
|
"lib",
|
|
1117
1159
|
"commands",
|
|
1118
1160
|
"agent",
|
|
1119
|
-
"
|
|
1120
|
-
"
|
|
1161
|
+
"preview",
|
|
1162
|
+
"send.js"
|
|
1121
1163
|
],
|
|
1122
1164
|
"aliasPermutations": [],
|
|
1123
1165
|
"permutations": [
|
|
1124
|
-
"agent:
|
|
1125
|
-
"
|
|
1126
|
-
"
|
|
1127
|
-
"agent:
|
|
1128
|
-
"
|
|
1129
|
-
"
|
|
1166
|
+
"agent:preview:send",
|
|
1167
|
+
"preview:agent:send",
|
|
1168
|
+
"preview:send:agent",
|
|
1169
|
+
"agent:send:preview",
|
|
1170
|
+
"send:agent:preview",
|
|
1171
|
+
"send:preview:agent"
|
|
1130
1172
|
]
|
|
1131
1173
|
},
|
|
1132
|
-
"agent:
|
|
1174
|
+
"agent:preview:sessions": {
|
|
1133
1175
|
"aliases": [],
|
|
1134
1176
|
"args": {},
|
|
1135
|
-
"description": "
|
|
1177
|
+
"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.",
|
|
1136
1178
|
"examples": [
|
|
1137
|
-
"List
|
|
1138
|
-
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
1179
|
+
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
1139
1180
|
],
|
|
1140
1181
|
"flags": {
|
|
1141
1182
|
"json": {
|
|
@@ -1152,53 +1193,24 @@
|
|
|
1152
1193
|
"hasDynamicHelp": false,
|
|
1153
1194
|
"multiple": false,
|
|
1154
1195
|
"type": "option"
|
|
1155
|
-
},
|
|
1156
|
-
"target-org": {
|
|
1157
|
-
"char": "o",
|
|
1158
|
-
"name": "target-org",
|
|
1159
|
-
"noCacheDefault": true,
|
|
1160
|
-
"required": true,
|
|
1161
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1162
|
-
"hasDynamicHelp": true,
|
|
1163
|
-
"multiple": false,
|
|
1164
|
-
"type": "option"
|
|
1165
|
-
},
|
|
1166
|
-
"api-version": {
|
|
1167
|
-
"description": "Override the api version used for api requests made by this command",
|
|
1168
|
-
"name": "api-version",
|
|
1169
|
-
"hasDynamicHelp": false,
|
|
1170
|
-
"multiple": false,
|
|
1171
|
-
"type": "option"
|
|
1172
1196
|
}
|
|
1173
1197
|
},
|
|
1174
|
-
"hasDynamicHelp":
|
|
1198
|
+
"hasDynamicHelp": false,
|
|
1175
1199
|
"hiddenAliases": [],
|
|
1176
|
-
"id": "agent:
|
|
1200
|
+
"id": "agent:preview:sessions",
|
|
1177
1201
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1178
1202
|
"pluginName": "@salesforce/plugin-agent",
|
|
1179
1203
|
"pluginType": "core",
|
|
1180
1204
|
"strict": true,
|
|
1181
|
-
"summary": "List
|
|
1205
|
+
"summary": "List all known programmatic agent preview sessions.",
|
|
1182
1206
|
"enableJsonFlag": true,
|
|
1183
|
-
"
|
|
1184
|
-
|
|
1185
|
-
"
|
|
1186
|
-
{
|
|
1187
|
-
"name": "SF_TARGET_ORG",
|
|
1188
|
-
"description": "Username or alias of your default org. Overrides the target-org configuration variable."
|
|
1189
|
-
}
|
|
1190
|
-
]
|
|
1191
|
-
},
|
|
1192
|
-
"errorCodes": {
|
|
1193
|
-
"header": "ERROR CODES",
|
|
1207
|
+
"requiresProject": true,
|
|
1208
|
+
"errorCodes": {
|
|
1209
|
+
"header": "ERROR CODES",
|
|
1194
1210
|
"body": [
|
|
1195
1211
|
{
|
|
1196
1212
|
"name": "Succeeded (0)",
|
|
1197
|
-
"description": "
|
|
1198
|
-
},
|
|
1199
|
-
{
|
|
1200
|
-
"name": "Failed (4)",
|
|
1201
|
-
"description": "Failed to retrieve agent tests due to API or network errors."
|
|
1213
|
+
"description": "Sessions listed successfully (or empty list if no active sessions)."
|
|
1202
1214
|
}
|
|
1203
1215
|
]
|
|
1204
1216
|
},
|
|
@@ -1207,27 +1219,27 @@
|
|
|
1207
1219
|
"lib",
|
|
1208
1220
|
"commands",
|
|
1209
1221
|
"agent",
|
|
1210
|
-
"
|
|
1211
|
-
"
|
|
1222
|
+
"preview",
|
|
1223
|
+
"sessions.js"
|
|
1212
1224
|
],
|
|
1213
1225
|
"aliasPermutations": [],
|
|
1214
1226
|
"permutations": [
|
|
1215
|
-
"agent:
|
|
1216
|
-
"
|
|
1217
|
-
"
|
|
1218
|
-
"agent:
|
|
1219
|
-
"
|
|
1220
|
-
"
|
|
1227
|
+
"agent:preview:sessions",
|
|
1228
|
+
"preview:agent:sessions",
|
|
1229
|
+
"preview:sessions:agent",
|
|
1230
|
+
"agent:sessions:preview",
|
|
1231
|
+
"sessions:agent:preview",
|
|
1232
|
+
"sessions:preview:agent"
|
|
1221
1233
|
]
|
|
1222
1234
|
},
|
|
1223
|
-
"agent:
|
|
1235
|
+
"agent:preview:start": {
|
|
1224
1236
|
"aliases": [],
|
|
1225
1237
|
"args": {},
|
|
1226
|
-
"description": "This command
|
|
1238
|
+
"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.",
|
|
1227
1239
|
"examples": [
|
|
1228
|
-
"
|
|
1229
|
-
"
|
|
1230
|
-
"
|
|
1240
|
+
"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",
|
|
1241
|
+
"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",
|
|
1242
|
+
"Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
1231
1243
|
],
|
|
1232
1244
|
"flags": {
|
|
1233
1245
|
"json": {
|
|
@@ -1262,67 +1274,61 @@
|
|
|
1262
1274
|
"multiple": false,
|
|
1263
1275
|
"type": "option"
|
|
1264
1276
|
},
|
|
1265
|
-
"
|
|
1266
|
-
"char": "
|
|
1267
|
-
"name": "
|
|
1268
|
-
"
|
|
1269
|
-
"summary": "Job ID of the completed agent test run.",
|
|
1270
|
-
"hasDynamicHelp": false,
|
|
1271
|
-
"multiple": false,
|
|
1272
|
-
"type": "option"
|
|
1273
|
-
},
|
|
1274
|
-
"result-format": {
|
|
1275
|
-
"name": "result-format",
|
|
1276
|
-
"summary": "Format of the agent test run results.",
|
|
1277
|
-
"default": "human",
|
|
1277
|
+
"api-name": {
|
|
1278
|
+
"char": "n",
|
|
1279
|
+
"name": "api-name",
|
|
1280
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1278
1281
|
"hasDynamicHelp": false,
|
|
1279
1282
|
"multiple": false,
|
|
1280
|
-
"options": [
|
|
1281
|
-
"json",
|
|
1282
|
-
"human",
|
|
1283
|
-
"junit",
|
|
1284
|
-
"tap"
|
|
1285
|
-
],
|
|
1286
1283
|
"type": "option"
|
|
1287
1284
|
},
|
|
1288
|
-
"
|
|
1289
|
-
"
|
|
1290
|
-
"
|
|
1291
|
-
"name": "output-dir",
|
|
1292
|
-
"summary": "Directory to write the agent test results into.",
|
|
1285
|
+
"authoring-bundle": {
|
|
1286
|
+
"name": "authoring-bundle",
|
|
1287
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1293
1288
|
"hasDynamicHelp": false,
|
|
1294
1289
|
"multiple": false,
|
|
1295
1290
|
"type": "option"
|
|
1296
1291
|
},
|
|
1297
|
-
"
|
|
1298
|
-
"
|
|
1299
|
-
|
|
1300
|
-
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
1301
|
-
"hasDynamicHelp": false,
|
|
1302
|
-
"multiple": false,
|
|
1303
|
-
"options": [
|
|
1304
|
-
"agentforce-studio",
|
|
1305
|
-
"testing-center"
|
|
1292
|
+
"use-live-actions": {
|
|
1293
|
+
"exclusive": [
|
|
1294
|
+
"simulate-actions"
|
|
1306
1295
|
],
|
|
1307
|
-
"
|
|
1296
|
+
"name": "use-live-actions",
|
|
1297
|
+
"summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
|
|
1298
|
+
"allowNo": false,
|
|
1299
|
+
"type": "boolean"
|
|
1308
1300
|
},
|
|
1309
|
-
"
|
|
1310
|
-
"
|
|
1311
|
-
|
|
1312
|
-
|
|
1301
|
+
"simulate-actions": {
|
|
1302
|
+
"exclusive": [
|
|
1303
|
+
"use-live-actions"
|
|
1304
|
+
],
|
|
1305
|
+
"name": "simulate-actions",
|
|
1306
|
+
"summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
|
|
1313
1307
|
"allowNo": false,
|
|
1314
1308
|
"type": "boolean"
|
|
1309
|
+
},
|
|
1310
|
+
"agent-json": {
|
|
1311
|
+
"dependsOn": [
|
|
1312
|
+
"authoring-bundle"
|
|
1313
|
+
],
|
|
1314
|
+
"hidden": true,
|
|
1315
|
+
"name": "agent-json",
|
|
1316
|
+
"summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
|
|
1317
|
+
"hasDynamicHelp": false,
|
|
1318
|
+
"multiple": false,
|
|
1319
|
+
"type": "option"
|
|
1315
1320
|
}
|
|
1316
1321
|
},
|
|
1317
1322
|
"hasDynamicHelp": true,
|
|
1318
1323
|
"hiddenAliases": [],
|
|
1319
|
-
"id": "agent:
|
|
1324
|
+
"id": "agent:preview:start",
|
|
1320
1325
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1321
1326
|
"pluginName": "@salesforce/plugin-agent",
|
|
1322
1327
|
"pluginType": "core",
|
|
1323
1328
|
"strict": true,
|
|
1324
|
-
"summary": "
|
|
1329
|
+
"summary": "Start a programmatic agent preview session.",
|
|
1325
1330
|
"enableJsonFlag": true,
|
|
1331
|
+
"requiresProject": true,
|
|
1326
1332
|
"envVariablesSection": {
|
|
1327
1333
|
"header": "ENVIRONMENT VARIABLES",
|
|
1328
1334
|
"body": [
|
|
@@ -1337,15 +1343,23 @@
|
|
|
1337
1343
|
"body": [
|
|
1338
1344
|
{
|
|
1339
1345
|
"name": "Succeeded (0)",
|
|
1340
|
-
"description": "
|
|
1346
|
+
"description": "Preview session started successfully."
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "Failed (1)",
|
|
1350
|
+
"description": "Agent Script compilation failed (syntax errors in the script)."
|
|
1341
1351
|
},
|
|
1342
1352
|
{
|
|
1343
1353
|
"name": "NotFound (2)",
|
|
1344
|
-
"description": "
|
|
1354
|
+
"description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
|
|
1345
1355
|
},
|
|
1346
1356
|
{
|
|
1347
|
-
"name": "
|
|
1348
|
-
"description": "
|
|
1357
|
+
"name": "ServerError (3)",
|
|
1358
|
+
"description": "Compilation API returned HTTP 500 (server error during compilation)."
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"name": "PreviewStartFailed (4)",
|
|
1362
|
+
"description": "Preview session failed to start due to API or network errors."
|
|
1349
1363
|
}
|
|
1350
1364
|
]
|
|
1351
1365
|
},
|
|
@@ -1354,27 +1368,28 @@
|
|
|
1354
1368
|
"lib",
|
|
1355
1369
|
"commands",
|
|
1356
1370
|
"agent",
|
|
1357
|
-
"
|
|
1358
|
-
"
|
|
1371
|
+
"preview",
|
|
1372
|
+
"start.js"
|
|
1359
1373
|
],
|
|
1360
1374
|
"aliasPermutations": [],
|
|
1361
1375
|
"permutations": [
|
|
1362
|
-
"agent:
|
|
1363
|
-
"
|
|
1364
|
-
"
|
|
1365
|
-
"agent:
|
|
1366
|
-
"
|
|
1367
|
-
"
|
|
1376
|
+
"agent:preview:start",
|
|
1377
|
+
"preview:agent:start",
|
|
1378
|
+
"preview:start:agent",
|
|
1379
|
+
"agent:start:preview",
|
|
1380
|
+
"start:agent:preview",
|
|
1381
|
+
"start:preview:agent"
|
|
1368
1382
|
]
|
|
1369
1383
|
},
|
|
1370
|
-
"agent:
|
|
1384
|
+
"agent:publish:authoring-bundle": {
|
|
1371
1385
|
"aliases": [],
|
|
1372
1386
|
"args": {},
|
|
1373
|
-
"description": "
|
|
1387
|
+
"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.",
|
|
1374
1388
|
"examples": [
|
|
1375
|
-
"
|
|
1376
|
-
"
|
|
1377
|
-
"
|
|
1389
|
+
"Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1390
|
+
"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",
|
|
1391
|
+
"Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
|
|
1392
|
+
"Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
|
|
1378
1393
|
],
|
|
1379
1394
|
"flags": {
|
|
1380
1395
|
"json": {
|
|
@@ -1409,81 +1424,164 @@
|
|
|
1409
1424
|
"multiple": false,
|
|
1410
1425
|
"type": "option"
|
|
1411
1426
|
},
|
|
1412
|
-
"
|
|
1413
|
-
"char": "
|
|
1414
|
-
"name": "
|
|
1415
|
-
"summary": "
|
|
1427
|
+
"api-name": {
|
|
1428
|
+
"char": "n",
|
|
1429
|
+
"name": "api-name",
|
|
1430
|
+
"summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
1416
1431
|
"hasDynamicHelp": false,
|
|
1417
1432
|
"multiple": false,
|
|
1418
1433
|
"type": "option"
|
|
1419
1434
|
},
|
|
1420
|
-
"
|
|
1421
|
-
"
|
|
1422
|
-
"
|
|
1423
|
-
"summary": "Use the job ID of the most recent agent test run.",
|
|
1435
|
+
"skip-retrieve": {
|
|
1436
|
+
"name": "skip-retrieve",
|
|
1437
|
+
"summary": "Don't retrieve the metadata associated with the agent to your DX project.",
|
|
1424
1438
|
"allowNo": false,
|
|
1425
1439
|
"type": "boolean"
|
|
1426
1440
|
},
|
|
1427
|
-
"
|
|
1428
|
-
"char": "
|
|
1429
|
-
"
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
"
|
|
1441
|
+
"verbose": {
|
|
1442
|
+
"char": "v",
|
|
1443
|
+
"exclusive": [
|
|
1444
|
+
"concise"
|
|
1445
|
+
],
|
|
1446
|
+
"name": "verbose",
|
|
1447
|
+
"summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
|
|
1448
|
+
"allowNo": false,
|
|
1449
|
+
"type": "boolean"
|
|
1450
|
+
},
|
|
1451
|
+
"concise": {
|
|
1452
|
+
"exclusive": [
|
|
1453
|
+
"verbose"
|
|
1454
|
+
],
|
|
1455
|
+
"name": "concise",
|
|
1456
|
+
"summary": "Display minimal output with only essential information about the publish operation.",
|
|
1457
|
+
"allowNo": false,
|
|
1458
|
+
"type": "boolean"
|
|
1459
|
+
}
|
|
1460
|
+
},
|
|
1461
|
+
"hasDynamicHelp": true,
|
|
1462
|
+
"hiddenAliases": [],
|
|
1463
|
+
"id": "agent:publish:authoring-bundle",
|
|
1464
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
1465
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
1466
|
+
"pluginType": "core",
|
|
1467
|
+
"strict": true,
|
|
1468
|
+
"summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
|
|
1469
|
+
"enableJsonFlag": true,
|
|
1470
|
+
"requiresProject": true,
|
|
1471
|
+
"errorCodes": {
|
|
1472
|
+
"header": "ERROR CODES",
|
|
1473
|
+
"body": [
|
|
1474
|
+
{
|
|
1475
|
+
"name": "Succeeded (0)",
|
|
1476
|
+
"description": "Agent published successfully without errors."
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "Failed (1)",
|
|
1480
|
+
"description": "Compilation errors found in the Agent Script file."
|
|
1481
|
+
}
|
|
1482
|
+
]
|
|
1483
|
+
},
|
|
1484
|
+
"FLAGGABLE_PROMPTS": {
|
|
1485
|
+
"api-name": {
|
|
1486
|
+
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
1487
|
+
"promptMessage": "API name of the authoring bundle to publish"
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
"isESM": true,
|
|
1491
|
+
"relativePath": [
|
|
1492
|
+
"lib",
|
|
1493
|
+
"commands",
|
|
1494
|
+
"agent",
|
|
1495
|
+
"publish",
|
|
1496
|
+
"authoring-bundle.js"
|
|
1497
|
+
],
|
|
1498
|
+
"aliasPermutations": [],
|
|
1499
|
+
"permutations": [
|
|
1500
|
+
"agent:publish:authoring-bundle",
|
|
1501
|
+
"publish:agent:authoring-bundle",
|
|
1502
|
+
"publish:authoring-bundle:agent",
|
|
1503
|
+
"agent:authoring-bundle:publish",
|
|
1504
|
+
"authoring-bundle:agent:publish",
|
|
1505
|
+
"authoring-bundle:publish:agent"
|
|
1506
|
+
]
|
|
1507
|
+
},
|
|
1508
|
+
"agent:test:create": {
|
|
1509
|
+
"aliases": [],
|
|
1510
|
+
"args": {},
|
|
1511
|
+
"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.",
|
|
1512
|
+
"examples": [
|
|
1513
|
+
"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 %>",
|
|
1514
|
+
"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",
|
|
1515
|
+
"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"
|
|
1516
|
+
],
|
|
1517
|
+
"flags": {
|
|
1518
|
+
"json": {
|
|
1519
|
+
"description": "Format output as json.",
|
|
1520
|
+
"helpGroup": "GLOBAL",
|
|
1521
|
+
"name": "json",
|
|
1522
|
+
"allowNo": false,
|
|
1523
|
+
"type": "boolean"
|
|
1524
|
+
},
|
|
1525
|
+
"flags-dir": {
|
|
1526
|
+
"helpGroup": "GLOBAL",
|
|
1527
|
+
"name": "flags-dir",
|
|
1528
|
+
"summary": "Import flag values from a directory.",
|
|
1529
|
+
"hasDynamicHelp": false,
|
|
1433
1530
|
"multiple": false,
|
|
1434
1531
|
"type": "option"
|
|
1435
1532
|
},
|
|
1436
|
-
"
|
|
1437
|
-
"name": "
|
|
1438
|
-
"summary": "
|
|
1439
|
-
"default": "human",
|
|
1533
|
+
"api-name": {
|
|
1534
|
+
"name": "api-name",
|
|
1535
|
+
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1440
1536
|
"hasDynamicHelp": false,
|
|
1441
1537
|
"multiple": false,
|
|
1442
|
-
"options": [
|
|
1443
|
-
"json",
|
|
1444
|
-
"human",
|
|
1445
|
-
"junit",
|
|
1446
|
-
"tap"
|
|
1447
|
-
],
|
|
1448
1538
|
"type": "option"
|
|
1449
1539
|
},
|
|
1450
|
-
"
|
|
1451
|
-
"
|
|
1452
|
-
"
|
|
1453
|
-
"name": "output-dir",
|
|
1454
|
-
"summary": "Directory to write the agent test results into.",
|
|
1540
|
+
"spec": {
|
|
1541
|
+
"name": "spec",
|
|
1542
|
+
"summary": "Path to the test spec YAML file.",
|
|
1455
1543
|
"hasDynamicHelp": false,
|
|
1456
1544
|
"multiple": false,
|
|
1457
1545
|
"type": "option"
|
|
1458
1546
|
},
|
|
1459
|
-
"
|
|
1460
|
-
"
|
|
1461
|
-
"name": "
|
|
1462
|
-
"
|
|
1547
|
+
"target-org": {
|
|
1548
|
+
"char": "o",
|
|
1549
|
+
"name": "target-org",
|
|
1550
|
+
"noCacheDefault": true,
|
|
1551
|
+
"required": true,
|
|
1552
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1553
|
+
"hasDynamicHelp": true,
|
|
1554
|
+
"multiple": false,
|
|
1555
|
+
"type": "option"
|
|
1556
|
+
},
|
|
1557
|
+
"api-version": {
|
|
1558
|
+
"description": "Override the api version used for api requests made by this command",
|
|
1559
|
+
"name": "api-version",
|
|
1463
1560
|
"hasDynamicHelp": false,
|
|
1464
1561
|
"multiple": false,
|
|
1465
|
-
"options": [
|
|
1466
|
-
"agentforce-studio",
|
|
1467
|
-
"testing-center"
|
|
1468
|
-
],
|
|
1469
1562
|
"type": "option"
|
|
1470
1563
|
},
|
|
1471
|
-
"
|
|
1472
|
-
"
|
|
1473
|
-
"
|
|
1474
|
-
"
|
|
1564
|
+
"preview": {
|
|
1565
|
+
"name": "preview",
|
|
1566
|
+
"summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
|
|
1567
|
+
"allowNo": false,
|
|
1568
|
+
"type": "boolean"
|
|
1569
|
+
},
|
|
1570
|
+
"force-overwrite": {
|
|
1571
|
+
"name": "force-overwrite",
|
|
1572
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
1475
1573
|
"allowNo": false,
|
|
1476
1574
|
"type": "boolean"
|
|
1477
1575
|
}
|
|
1478
1576
|
},
|
|
1479
1577
|
"hasDynamicHelp": true,
|
|
1480
1578
|
"hiddenAliases": [],
|
|
1481
|
-
"id": "agent:test:
|
|
1579
|
+
"id": "agent:test:create",
|
|
1482
1580
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1483
1581
|
"pluginName": "@salesforce/plugin-agent",
|
|
1484
1582
|
"pluginType": "core",
|
|
1485
1583
|
"strict": true,
|
|
1486
|
-
"summary": "
|
|
1584
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
1487
1585
|
"enableJsonFlag": true,
|
|
1488
1586
|
"envVariablesSection": {
|
|
1489
1587
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1499,19 +1597,19 @@
|
|
|
1499
1597
|
"body": [
|
|
1500
1598
|
{
|
|
1501
1599
|
"name": "Succeeded (0)",
|
|
1502
|
-
"description": "Test
|
|
1600
|
+
"description": "Test created and deployed successfully."
|
|
1503
1601
|
},
|
|
1504
1602
|
{
|
|
1505
1603
|
"name": "Failed (1)",
|
|
1506
|
-
"description": "
|
|
1604
|
+
"description": "Test validation errors or metadata format issues."
|
|
1507
1605
|
},
|
|
1508
1606
|
{
|
|
1509
1607
|
"name": "NotFound (2)",
|
|
1510
|
-
"description": "
|
|
1608
|
+
"description": "Test spec file not found or org connection failed."
|
|
1511
1609
|
},
|
|
1512
1610
|
{
|
|
1513
|
-
"name": "
|
|
1514
|
-
"description": "
|
|
1611
|
+
"name": "DeploymentFailed (4)",
|
|
1612
|
+
"description": "Deployment failed due to API or network errors."
|
|
1515
1613
|
}
|
|
1516
1614
|
]
|
|
1517
1615
|
},
|
|
@@ -1521,29 +1619,25 @@
|
|
|
1521
1619
|
"commands",
|
|
1522
1620
|
"agent",
|
|
1523
1621
|
"test",
|
|
1524
|
-
"
|
|
1622
|
+
"create.js"
|
|
1525
1623
|
],
|
|
1526
1624
|
"aliasPermutations": [],
|
|
1527
1625
|
"permutations": [
|
|
1528
|
-
"agent:test:
|
|
1529
|
-
"test:agent:
|
|
1530
|
-
"test:
|
|
1531
|
-
"agent:
|
|
1532
|
-
"
|
|
1533
|
-
"
|
|
1626
|
+
"agent:test:create",
|
|
1627
|
+
"test:agent:create",
|
|
1628
|
+
"test:create:agent",
|
|
1629
|
+
"agent:create:test",
|
|
1630
|
+
"create:agent:test",
|
|
1631
|
+
"create:test:agent"
|
|
1534
1632
|
]
|
|
1535
1633
|
},
|
|
1536
|
-
"agent:test:
|
|
1634
|
+
"agent:test:list": {
|
|
1537
1635
|
"aliases": [],
|
|
1538
1636
|
"args": {},
|
|
1539
|
-
"description": "
|
|
1637
|
+
"description": "The command outputs a table with the name (API name) of each test along with its unique ID, type ('agentforce-studio' or 'testing-center'), and the date it was created in the org.",
|
|
1540
1638
|
"examples": [
|
|
1541
|
-
"
|
|
1542
|
-
"
|
|
1543
|
-
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
|
|
1544
|
-
"Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit",
|
|
1545
|
-
"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 specs/agent-with-context.yaml --target-org my-org",
|
|
1546
|
-
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1639
|
+
"List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1640
|
+
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
1547
1641
|
],
|
|
1548
1642
|
"flags": {
|
|
1549
1643
|
"json": {
|
|
@@ -1566,73 +1660,27 @@
|
|
|
1566
1660
|
"name": "target-org",
|
|
1567
1661
|
"noCacheDefault": true,
|
|
1568
1662
|
"required": true,
|
|
1569
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1570
|
-
"hasDynamicHelp": true,
|
|
1571
|
-
"multiple": false,
|
|
1572
|
-
"type": "option"
|
|
1573
|
-
},
|
|
1574
|
-
"api-version": {
|
|
1575
|
-
"description": "Override the api version used for api requests made by this command",
|
|
1576
|
-
"name": "api-version",
|
|
1577
|
-
"hasDynamicHelp": false,
|
|
1578
|
-
"multiple": false,
|
|
1579
|
-
"type": "option"
|
|
1580
|
-
},
|
|
1581
|
-
"spec": {
|
|
1582
|
-
"char": "s",
|
|
1583
|
-
"name": "spec",
|
|
1584
|
-
"required": true,
|
|
1585
|
-
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1586
|
-
"hasDynamicHelp": false,
|
|
1587
|
-
"multiple": false,
|
|
1588
|
-
"type": "option"
|
|
1589
|
-
},
|
|
1590
|
-
"api-name": {
|
|
1591
|
-
"char": "n",
|
|
1592
|
-
"name": "api-name",
|
|
1593
|
-
"summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1594
|
-
"hasDynamicHelp": false,
|
|
1595
|
-
"multiple": false,
|
|
1596
|
-
"type": "option"
|
|
1597
|
-
},
|
|
1598
|
-
"result-format": {
|
|
1599
|
-
"name": "result-format",
|
|
1600
|
-
"summary": "Format of the agent test run results.",
|
|
1601
|
-
"default": "human",
|
|
1602
|
-
"hasDynamicHelp": false,
|
|
1663
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1664
|
+
"hasDynamicHelp": true,
|
|
1603
1665
|
"multiple": false,
|
|
1604
|
-
"options": [
|
|
1605
|
-
"json",
|
|
1606
|
-
"human",
|
|
1607
|
-
"junit",
|
|
1608
|
-
"tap"
|
|
1609
|
-
],
|
|
1610
1666
|
"type": "option"
|
|
1611
1667
|
},
|
|
1612
|
-
"
|
|
1613
|
-
"
|
|
1614
|
-
"
|
|
1615
|
-
"default": 5,
|
|
1668
|
+
"api-version": {
|
|
1669
|
+
"description": "Override the api version used for api requests made by this command",
|
|
1670
|
+
"name": "api-version",
|
|
1616
1671
|
"hasDynamicHelp": false,
|
|
1617
1672
|
"multiple": false,
|
|
1618
1673
|
"type": "option"
|
|
1619
|
-
},
|
|
1620
|
-
"no-normalize": {
|
|
1621
|
-
"name": "no-normalize",
|
|
1622
|
-
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1623
|
-
"allowNo": false,
|
|
1624
|
-
"type": "boolean"
|
|
1625
1674
|
}
|
|
1626
1675
|
},
|
|
1627
1676
|
"hasDynamicHelp": true,
|
|
1628
1677
|
"hiddenAliases": [],
|
|
1629
|
-
"id": "agent:test:
|
|
1678
|
+
"id": "agent:test:list",
|
|
1630
1679
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1631
1680
|
"pluginName": "@salesforce/plugin-agent",
|
|
1632
1681
|
"pluginType": "core",
|
|
1633
|
-
"state": "beta",
|
|
1634
1682
|
"strict": true,
|
|
1635
|
-
"summary": "
|
|
1683
|
+
"summary": "List the available agent tests in your org.",
|
|
1636
1684
|
"enableJsonFlag": true,
|
|
1637
1685
|
"envVariablesSection": {
|
|
1638
1686
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1648,19 +1696,11 @@
|
|
|
1648
1696
|
"body": [
|
|
1649
1697
|
{
|
|
1650
1698
|
"name": "Succeeded (0)",
|
|
1651
|
-
"description": "
|
|
1652
|
-
},
|
|
1653
|
-
{
|
|
1654
|
-
"name": "Failed (1)",
|
|
1655
|
-
"description": "Tests encountered execution errors (tests couldn't run properly)."
|
|
1656
|
-
},
|
|
1657
|
-
{
|
|
1658
|
-
"name": "NotFound (2)",
|
|
1659
|
-
"description": "Agent not found, spec file not found, or invalid agent name."
|
|
1699
|
+
"description": "Agent tests listed successfully."
|
|
1660
1700
|
},
|
|
1661
1701
|
{
|
|
1662
|
-
"name": "
|
|
1663
|
-
"description": "Failed to
|
|
1702
|
+
"name": "Failed (4)",
|
|
1703
|
+
"description": "Failed to retrieve agent tests due to API or network errors."
|
|
1664
1704
|
}
|
|
1665
1705
|
]
|
|
1666
1706
|
},
|
|
@@ -1670,26 +1710,26 @@
|
|
|
1670
1710
|
"commands",
|
|
1671
1711
|
"agent",
|
|
1672
1712
|
"test",
|
|
1673
|
-
"
|
|
1713
|
+
"list.js"
|
|
1674
1714
|
],
|
|
1675
1715
|
"aliasPermutations": [],
|
|
1676
1716
|
"permutations": [
|
|
1677
|
-
"agent:test:
|
|
1678
|
-
"test:agent:
|
|
1679
|
-
"test:
|
|
1680
|
-
"agent:
|
|
1681
|
-
"
|
|
1682
|
-
"
|
|
1717
|
+
"agent:test:list",
|
|
1718
|
+
"test:agent:list",
|
|
1719
|
+
"test:list:agent",
|
|
1720
|
+
"agent:list:test",
|
|
1721
|
+
"list:agent:test",
|
|
1722
|
+
"list:test:agent"
|
|
1683
1723
|
]
|
|
1684
1724
|
},
|
|
1685
|
-
"agent:test:
|
|
1725
|
+
"agent:test:results": {
|
|
1686
1726
|
"aliases": [],
|
|
1687
1727
|
"args": {},
|
|
1688
|
-
"description": "
|
|
1728
|
+
"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.",
|
|
1689
1729
|
"examples": [
|
|
1690
|
-
"
|
|
1691
|
-
"
|
|
1692
|
-
"
|
|
1730
|
+
"Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1731
|
+
"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",
|
|
1732
|
+
"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"
|
|
1693
1733
|
],
|
|
1694
1734
|
"flags": {
|
|
1695
1735
|
"json": {
|
|
@@ -1724,22 +1764,15 @@
|
|
|
1724
1764
|
"multiple": false,
|
|
1725
1765
|
"type": "option"
|
|
1726
1766
|
},
|
|
1727
|
-
"
|
|
1728
|
-
"char": "
|
|
1729
|
-
"name": "
|
|
1730
|
-
"
|
|
1767
|
+
"job-id": {
|
|
1768
|
+
"char": "i",
|
|
1769
|
+
"name": "job-id",
|
|
1770
|
+
"required": true,
|
|
1771
|
+
"summary": "Job ID of the completed agent test run.",
|
|
1731
1772
|
"hasDynamicHelp": false,
|
|
1732
1773
|
"multiple": false,
|
|
1733
1774
|
"type": "option"
|
|
1734
1775
|
},
|
|
1735
|
-
"wait": {
|
|
1736
|
-
"char": "w",
|
|
1737
|
-
"name": "wait",
|
|
1738
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1739
|
-
"hasDynamicHelp": true,
|
|
1740
|
-
"multiple": false,
|
|
1741
|
-
"type": "option"
|
|
1742
|
-
},
|
|
1743
1776
|
"result-format": {
|
|
1744
1777
|
"name": "result-format",
|
|
1745
1778
|
"summary": "Format of the agent test run results.",
|
|
@@ -1785,12 +1818,12 @@
|
|
|
1785
1818
|
},
|
|
1786
1819
|
"hasDynamicHelp": true,
|
|
1787
1820
|
"hiddenAliases": [],
|
|
1788
|
-
"id": "agent:test:
|
|
1821
|
+
"id": "agent:test:results",
|
|
1789
1822
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1790
1823
|
"pluginName": "@salesforce/plugin-agent",
|
|
1791
1824
|
"pluginType": "core",
|
|
1792
1825
|
"strict": true,
|
|
1793
|
-
"summary": "
|
|
1826
|
+
"summary": "Get the results of a completed agent test run.",
|
|
1794
1827
|
"enableJsonFlag": true,
|
|
1795
1828
|
"envVariablesSection": {
|
|
1796
1829
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -1806,19 +1839,15 @@
|
|
|
1806
1839
|
"body": [
|
|
1807
1840
|
{
|
|
1808
1841
|
"name": "Succeeded (0)",
|
|
1809
|
-
"description": "
|
|
1810
|
-
},
|
|
1811
|
-
{
|
|
1812
|
-
"name": "Failed (1)",
|
|
1813
|
-
"description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
|
|
1842
|
+
"description": "Results retrieved successfully. Test results (passed/failed) are in the output."
|
|
1814
1843
|
},
|
|
1815
1844
|
{
|
|
1816
1845
|
"name": "NotFound (2)",
|
|
1817
|
-
"description": "
|
|
1846
|
+
"description": "Job ID not found or invalid."
|
|
1818
1847
|
},
|
|
1819
1848
|
{
|
|
1820
|
-
"name": "
|
|
1821
|
-
"description": "Failed to
|
|
1849
|
+
"name": "Failed (4)",
|
|
1850
|
+
"description": "Failed to retrieve results due to API or network errors."
|
|
1822
1851
|
}
|
|
1823
1852
|
]
|
|
1824
1853
|
},
|
|
@@ -1828,28 +1857,26 @@
|
|
|
1828
1857
|
"commands",
|
|
1829
1858
|
"agent",
|
|
1830
1859
|
"test",
|
|
1831
|
-
"
|
|
1860
|
+
"results.js"
|
|
1832
1861
|
],
|
|
1833
1862
|
"aliasPermutations": [],
|
|
1834
1863
|
"permutations": [
|
|
1835
|
-
"agent:test:
|
|
1836
|
-
"test:agent:
|
|
1837
|
-
"test:
|
|
1838
|
-
"agent:
|
|
1839
|
-
"
|
|
1840
|
-
"
|
|
1864
|
+
"agent:test:results",
|
|
1865
|
+
"test:agent:results",
|
|
1866
|
+
"test:results:agent",
|
|
1867
|
+
"agent:results:test",
|
|
1868
|
+
"results:agent:test",
|
|
1869
|
+
"results:test:agent"
|
|
1841
1870
|
]
|
|
1842
1871
|
},
|
|
1843
|
-
"agent:
|
|
1872
|
+
"agent:test:resume": {
|
|
1844
1873
|
"aliases": [],
|
|
1845
1874
|
"args": {},
|
|
1846
|
-
"description": "
|
|
1875
|
+
"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.",
|
|
1847
1876
|
"examples": [
|
|
1848
|
-
"
|
|
1849
|
-
"
|
|
1850
|
-
"
|
|
1851
|
-
"End all active preview sessions for a specific agent without prompting:\n<%= config.bin %> <%= command.id %> --all --authoring-bundle My_Local_Agent --target-org <target_org> --no-prompt",
|
|
1852
|
-
"End all active preview sessions across every agent in the local session cache for an org:\n<%= config.bin %> <%= command.id %> --all --target-org <target_org>"
|
|
1877
|
+
"Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1878
|
+
"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",
|
|
1879
|
+
"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"
|
|
1853
1880
|
],
|
|
1854
1881
|
"flags": {
|
|
1855
1882
|
"json": {
|
|
@@ -1884,65 +1911,82 @@
|
|
|
1884
1911
|
"multiple": false,
|
|
1885
1912
|
"type": "option"
|
|
1886
1913
|
},
|
|
1887
|
-
"
|
|
1888
|
-
"
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
"name": "session-id",
|
|
1892
|
-
"required": false,
|
|
1893
|
-
"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.",
|
|
1914
|
+
"job-id": {
|
|
1915
|
+
"char": "i",
|
|
1916
|
+
"name": "job-id",
|
|
1917
|
+
"summary": "Job ID of the original agent test run.",
|
|
1894
1918
|
"hasDynamicHelp": false,
|
|
1895
1919
|
"multiple": false,
|
|
1896
1920
|
"type": "option"
|
|
1897
1921
|
},
|
|
1898
|
-
"
|
|
1899
|
-
"char": "
|
|
1900
|
-
"
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
"
|
|
1904
|
-
|
|
1905
|
-
|
|
1922
|
+
"use-most-recent": {
|
|
1923
|
+
"char": "r",
|
|
1924
|
+
"name": "use-most-recent",
|
|
1925
|
+
"summary": "Use the job ID of the most recent agent test run.",
|
|
1926
|
+
"allowNo": false,
|
|
1927
|
+
"type": "boolean"
|
|
1928
|
+
},
|
|
1929
|
+
"wait": {
|
|
1930
|
+
"char": "w",
|
|
1931
|
+
"name": "wait",
|
|
1932
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1933
|
+
"default": "5 minutes",
|
|
1934
|
+
"hasDynamicHelp": true,
|
|
1906
1935
|
"multiple": false,
|
|
1907
1936
|
"type": "option"
|
|
1908
1937
|
},
|
|
1909
|
-
"
|
|
1910
|
-
"
|
|
1911
|
-
|
|
1938
|
+
"result-format": {
|
|
1939
|
+
"name": "result-format",
|
|
1940
|
+
"summary": "Format of the agent test run results.",
|
|
1941
|
+
"default": "human",
|
|
1942
|
+
"hasDynamicHelp": false,
|
|
1943
|
+
"multiple": false,
|
|
1944
|
+
"options": [
|
|
1945
|
+
"json",
|
|
1946
|
+
"human",
|
|
1947
|
+
"junit",
|
|
1948
|
+
"tap"
|
|
1912
1949
|
],
|
|
1913
|
-
"
|
|
1914
|
-
|
|
1950
|
+
"type": "option"
|
|
1951
|
+
},
|
|
1952
|
+
"output-dir": {
|
|
1953
|
+
"char": "d",
|
|
1954
|
+
"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.",
|
|
1955
|
+
"name": "output-dir",
|
|
1956
|
+
"summary": "Directory to write the agent test results into.",
|
|
1915
1957
|
"hasDynamicHelp": false,
|
|
1916
1958
|
"multiple": false,
|
|
1917
1959
|
"type": "option"
|
|
1918
1960
|
},
|
|
1919
|
-
"
|
|
1920
|
-
"
|
|
1921
|
-
|
|
1961
|
+
"test-runner": {
|
|
1962
|
+
"description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
|
|
1963
|
+
"name": "test-runner",
|
|
1964
|
+
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
1965
|
+
"hasDynamicHelp": false,
|
|
1966
|
+
"multiple": false,
|
|
1967
|
+
"options": [
|
|
1968
|
+
"agentforce-studio",
|
|
1969
|
+
"testing-center"
|
|
1922
1970
|
],
|
|
1923
|
-
"
|
|
1924
|
-
"summary": "End all active preview sessions. Combine with --api-name or --authoring-bundle to limit to a specific agent, or use with only --target-org to end sessions for all agents found in the local session cache. Requires --target-org.",
|
|
1925
|
-
"allowNo": false,
|
|
1926
|
-
"type": "boolean"
|
|
1971
|
+
"type": "option"
|
|
1927
1972
|
},
|
|
1928
|
-
"
|
|
1929
|
-
"
|
|
1930
|
-
"name": "
|
|
1931
|
-
"summary": "
|
|
1973
|
+
"verbose": {
|
|
1974
|
+
"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.",
|
|
1975
|
+
"name": "verbose",
|
|
1976
|
+
"summary": "Show generated data in the test results output.",
|
|
1932
1977
|
"allowNo": false,
|
|
1933
1978
|
"type": "boolean"
|
|
1934
1979
|
}
|
|
1935
1980
|
},
|
|
1936
1981
|
"hasDynamicHelp": true,
|
|
1937
1982
|
"hiddenAliases": [],
|
|
1938
|
-
"id": "agent:
|
|
1983
|
+
"id": "agent:test:resume",
|
|
1939
1984
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1940
1985
|
"pluginName": "@salesforce/plugin-agent",
|
|
1941
1986
|
"pluginType": "core",
|
|
1942
1987
|
"strict": true,
|
|
1943
|
-
"summary": "
|
|
1988
|
+
"summary": "Resume an agent test that you previously started in your org so you can view the test results.",
|
|
1944
1989
|
"enableJsonFlag": true,
|
|
1945
|
-
"requiresProject": true,
|
|
1946
1990
|
"envVariablesSection": {
|
|
1947
1991
|
"header": "ENVIRONMENT VARIABLES",
|
|
1948
1992
|
"body": [
|
|
@@ -1957,27 +2001,19 @@
|
|
|
1957
2001
|
"body": [
|
|
1958
2002
|
{
|
|
1959
2003
|
"name": "Succeeded (0)",
|
|
1960
|
-
"description": "
|
|
2004
|
+
"description": "Test completed successfully (with test results in the output)."
|
|
1961
2005
|
},
|
|
1962
2006
|
{
|
|
1963
|
-
"name": "
|
|
1964
|
-
"description": "
|
|
2007
|
+
"name": "Failed (1)",
|
|
2008
|
+
"description": "Tests encountered execution errors (test cases with ERROR status)."
|
|
1965
2009
|
},
|
|
1966
2010
|
{
|
|
1967
2011
|
"name": "NotFound (2)",
|
|
1968
|
-
"description": "
|
|
1969
|
-
},
|
|
1970
|
-
{
|
|
1971
|
-
"name": "PreviewEndFailed (4)",
|
|
1972
|
-
"description": "Failed to end the preview session."
|
|
1973
|
-
},
|
|
1974
|
-
{
|
|
1975
|
-
"name": "PreviewEndPartialFailure (68)",
|
|
1976
|
-
"description": "With --all, one or more sessions failed to end while others succeeded."
|
|
2012
|
+
"description": "Job ID not found or invalid."
|
|
1977
2013
|
},
|
|
1978
2014
|
{
|
|
1979
|
-
"name": "
|
|
1980
|
-
"description": "
|
|
2015
|
+
"name": "OperationFailed (4)",
|
|
2016
|
+
"description": "Failed to poll test due to API or network errors."
|
|
1981
2017
|
}
|
|
1982
2018
|
]
|
|
1983
2019
|
},
|
|
@@ -1986,27 +2022,30 @@
|
|
|
1986
2022
|
"lib",
|
|
1987
2023
|
"commands",
|
|
1988
2024
|
"agent",
|
|
1989
|
-
"
|
|
1990
|
-
"
|
|
2025
|
+
"test",
|
|
2026
|
+
"resume.js"
|
|
1991
2027
|
],
|
|
1992
2028
|
"aliasPermutations": [],
|
|
1993
2029
|
"permutations": [
|
|
1994
|
-
"agent:
|
|
1995
|
-
"
|
|
1996
|
-
"
|
|
1997
|
-
"agent:
|
|
1998
|
-
"
|
|
1999
|
-
"
|
|
2030
|
+
"agent:test:resume",
|
|
2031
|
+
"test:agent:resume",
|
|
2032
|
+
"test:resume:agent",
|
|
2033
|
+
"agent:resume:test",
|
|
2034
|
+
"resume:agent:test",
|
|
2035
|
+
"resume:test:agent"
|
|
2000
2036
|
]
|
|
2001
2037
|
},
|
|
2002
|
-
"agent:
|
|
2038
|
+
"agent:test:run-eval": {
|
|
2003
2039
|
"aliases": [],
|
|
2004
2040
|
"args": {},
|
|
2005
|
-
"description": "
|
|
2041
|
+
"description": "Specify the tests you want to run with one of these inputs to the --spec flag:\n\n- YAML test spec generated by the `agent generate test-spec` CLI command\n- JSON payload\n\nWhen you provide a YAML test spec, this command automatically translates test cases into internal state-based evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support context variables, 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 evaluation framework 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 as when you use a YAML test spec.\n\nThis command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
|
|
2006
2042
|
"examples": [
|
|
2007
|
-
"
|
|
2008
|
-
"
|
|
2009
|
-
"
|
|
2043
|
+
"Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org",
|
|
2044
|
+
"Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --api-name My_Agent",
|
|
2045
|
+
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
|
|
2046
|
+
"Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit",
|
|
2047
|
+
"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 specs/agent-with-context.yaml --target-org my-org",
|
|
2048
|
+
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
2010
2049
|
],
|
|
2011
2050
|
"flags": {
|
|
2012
2051
|
"json": {
|
|
@@ -2041,19 +2080,11 @@
|
|
|
2041
2080
|
"multiple": false,
|
|
2042
2081
|
"type": "option"
|
|
2043
2082
|
},
|
|
2044
|
-
"
|
|
2045
|
-
"
|
|
2046
|
-
"
|
|
2047
|
-
"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.",
|
|
2048
|
-
"hasDynamicHelp": false,
|
|
2049
|
-
"multiple": false,
|
|
2050
|
-
"type": "option"
|
|
2051
|
-
},
|
|
2052
|
-
"utterance": {
|
|
2053
|
-
"char": "u",
|
|
2054
|
-
"name": "utterance",
|
|
2083
|
+
"spec": {
|
|
2084
|
+
"char": "s",
|
|
2085
|
+
"name": "spec",
|
|
2055
2086
|
"required": true,
|
|
2056
|
-
"summary": "
|
|
2087
|
+
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
2057
2088
|
"hasDynamicHelp": false,
|
|
2058
2089
|
"multiple": false,
|
|
2059
2090
|
"type": "option"
|
|
@@ -2061,29 +2092,50 @@
|
|
|
2061
2092
|
"api-name": {
|
|
2062
2093
|
"char": "n",
|
|
2063
2094
|
"name": "api-name",
|
|
2064
|
-
"summary": "API name
|
|
2095
|
+
"summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
2065
2096
|
"hasDynamicHelp": false,
|
|
2066
2097
|
"multiple": false,
|
|
2067
2098
|
"type": "option"
|
|
2068
2099
|
},
|
|
2069
|
-
"
|
|
2070
|
-
"name": "
|
|
2071
|
-
"summary": "
|
|
2100
|
+
"result-format": {
|
|
2101
|
+
"name": "result-format",
|
|
2102
|
+
"summary": "Format of the agent test run results.",
|
|
2103
|
+
"default": "human",
|
|
2104
|
+
"hasDynamicHelp": false,
|
|
2105
|
+
"multiple": false,
|
|
2106
|
+
"options": [
|
|
2107
|
+
"json",
|
|
2108
|
+
"human",
|
|
2109
|
+
"junit",
|
|
2110
|
+
"tap"
|
|
2111
|
+
],
|
|
2112
|
+
"type": "option"
|
|
2113
|
+
},
|
|
2114
|
+
"batch-size": {
|
|
2115
|
+
"name": "batch-size",
|
|
2116
|
+
"summary": "Number of tests per API request (max 5).",
|
|
2117
|
+
"default": 5,
|
|
2072
2118
|
"hasDynamicHelp": false,
|
|
2073
2119
|
"multiple": false,
|
|
2074
2120
|
"type": "option"
|
|
2121
|
+
},
|
|
2122
|
+
"no-normalize": {
|
|
2123
|
+
"name": "no-normalize",
|
|
2124
|
+
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
2125
|
+
"allowNo": false,
|
|
2126
|
+
"type": "boolean"
|
|
2075
2127
|
}
|
|
2076
2128
|
},
|
|
2077
2129
|
"hasDynamicHelp": true,
|
|
2078
2130
|
"hiddenAliases": [],
|
|
2079
|
-
"id": "agent:
|
|
2131
|
+
"id": "agent:test:run-eval",
|
|
2080
2132
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
2081
2133
|
"pluginName": "@salesforce/plugin-agent",
|
|
2082
2134
|
"pluginType": "core",
|
|
2135
|
+
"state": "beta",
|
|
2083
2136
|
"strict": true,
|
|
2084
|
-
"summary": "
|
|
2137
|
+
"summary": "Run rich evaluation tests against an Agentforce agent.",
|
|
2085
2138
|
"enableJsonFlag": true,
|
|
2086
|
-
"requiresProject": true,
|
|
2087
2139
|
"envVariablesSection": {
|
|
2088
2140
|
"header": "ENVIRONMENT VARIABLES",
|
|
2089
2141
|
"body": [
|
|
@@ -2098,80 +2150,19 @@
|
|
|
2098
2150
|
"body": [
|
|
2099
2151
|
{
|
|
2100
2152
|
"name": "Succeeded (0)",
|
|
2101
|
-
"description": "
|
|
2153
|
+
"description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
|
|
2102
2154
|
},
|
|
2103
2155
|
{
|
|
2104
|
-
"name": "
|
|
2105
|
-
"description": "
|
|
2156
|
+
"name": "Failed (1)",
|
|
2157
|
+
"description": "Tests encountered execution errors (tests couldn't run properly)."
|
|
2106
2158
|
},
|
|
2107
2159
|
{
|
|
2108
|
-
"name": "
|
|
2109
|
-
"description": "
|
|
2160
|
+
"name": "NotFound (2)",
|
|
2161
|
+
"description": "Agent not found, spec file not found, or invalid agent name."
|
|
2110
2162
|
},
|
|
2111
2163
|
{
|
|
2112
|
-
"name": "
|
|
2113
|
-
"description": "
|
|
2114
|
-
}
|
|
2115
|
-
]
|
|
2116
|
-
},
|
|
2117
|
-
"isESM": true,
|
|
2118
|
-
"relativePath": [
|
|
2119
|
-
"lib",
|
|
2120
|
-
"commands",
|
|
2121
|
-
"agent",
|
|
2122
|
-
"preview",
|
|
2123
|
-
"send.js"
|
|
2124
|
-
],
|
|
2125
|
-
"aliasPermutations": [],
|
|
2126
|
-
"permutations": [
|
|
2127
|
-
"agent:preview:send",
|
|
2128
|
-
"preview:agent:send",
|
|
2129
|
-
"preview:send:agent",
|
|
2130
|
-
"agent:send:preview",
|
|
2131
|
-
"send:agent:preview",
|
|
2132
|
-
"send:preview:agent"
|
|
2133
|
-
]
|
|
2134
|
-
},
|
|
2135
|
-
"agent:preview:sessions": {
|
|
2136
|
-
"aliases": [],
|
|
2137
|
-
"args": {},
|
|
2138
|
-
"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.",
|
|
2139
|
-
"examples": [
|
|
2140
|
-
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
2141
|
-
],
|
|
2142
|
-
"flags": {
|
|
2143
|
-
"json": {
|
|
2144
|
-
"description": "Format output as json.",
|
|
2145
|
-
"helpGroup": "GLOBAL",
|
|
2146
|
-
"name": "json",
|
|
2147
|
-
"allowNo": false,
|
|
2148
|
-
"type": "boolean"
|
|
2149
|
-
},
|
|
2150
|
-
"flags-dir": {
|
|
2151
|
-
"helpGroup": "GLOBAL",
|
|
2152
|
-
"name": "flags-dir",
|
|
2153
|
-
"summary": "Import flag values from a directory.",
|
|
2154
|
-
"hasDynamicHelp": false,
|
|
2155
|
-
"multiple": false,
|
|
2156
|
-
"type": "option"
|
|
2157
|
-
}
|
|
2158
|
-
},
|
|
2159
|
-
"hasDynamicHelp": false,
|
|
2160
|
-
"hiddenAliases": [],
|
|
2161
|
-
"id": "agent:preview:sessions",
|
|
2162
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
2163
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
2164
|
-
"pluginType": "core",
|
|
2165
|
-
"strict": true,
|
|
2166
|
-
"summary": "List all known programmatic agent preview sessions.",
|
|
2167
|
-
"enableJsonFlag": true,
|
|
2168
|
-
"requiresProject": true,
|
|
2169
|
-
"errorCodes": {
|
|
2170
|
-
"header": "ERROR CODES",
|
|
2171
|
-
"body": [
|
|
2172
|
-
{
|
|
2173
|
-
"name": "Succeeded (0)",
|
|
2174
|
-
"description": "Sessions listed successfully (or empty list if no active sessions)."
|
|
2164
|
+
"name": "OperationFailed (4)",
|
|
2165
|
+
"description": "Failed to execute tests due to API or network errors."
|
|
2175
2166
|
}
|
|
2176
2167
|
]
|
|
2177
2168
|
},
|
|
@@ -2180,27 +2171,27 @@
|
|
|
2180
2171
|
"lib",
|
|
2181
2172
|
"commands",
|
|
2182
2173
|
"agent",
|
|
2183
|
-
"
|
|
2184
|
-
"
|
|
2174
|
+
"test",
|
|
2175
|
+
"run-eval.js"
|
|
2185
2176
|
],
|
|
2186
2177
|
"aliasPermutations": [],
|
|
2187
2178
|
"permutations": [
|
|
2188
|
-
"agent:
|
|
2189
|
-
"
|
|
2190
|
-
"
|
|
2191
|
-
"agent:
|
|
2192
|
-
"
|
|
2193
|
-
"
|
|
2179
|
+
"agent:test:run-eval",
|
|
2180
|
+
"test:agent:run-eval",
|
|
2181
|
+
"test:run-eval:agent",
|
|
2182
|
+
"agent:run-eval:test",
|
|
2183
|
+
"run-eval:agent:test",
|
|
2184
|
+
"run-eval:test:agent"
|
|
2194
2185
|
]
|
|
2195
2186
|
},
|
|
2196
|
-
"agent:
|
|
2187
|
+
"agent:test:run": {
|
|
2197
2188
|
"aliases": [],
|
|
2198
2189
|
"args": {},
|
|
2199
|
-
"description": "
|
|
2190
|
+
"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.",
|
|
2200
2191
|
"examples": [
|
|
2201
|
-
"Start
|
|
2202
|
-
"
|
|
2203
|
-
"Start
|
|
2192
|
+
"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",
|
|
2193
|
+
"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",
|
|
2194
|
+
"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"
|
|
2204
2195
|
],
|
|
2205
2196
|
"flags": {
|
|
2206
2197
|
"json": {
|
|
@@ -2238,58 +2229,71 @@
|
|
|
2238
2229
|
"api-name": {
|
|
2239
2230
|
"char": "n",
|
|
2240
2231
|
"name": "api-name",
|
|
2241
|
-
"summary": "API name of the
|
|
2232
|
+
"summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
|
|
2242
2233
|
"hasDynamicHelp": false,
|
|
2243
2234
|
"multiple": false,
|
|
2244
2235
|
"type": "option"
|
|
2245
2236
|
},
|
|
2246
|
-
"
|
|
2247
|
-
"
|
|
2248
|
-
"
|
|
2249
|
-
"
|
|
2237
|
+
"wait": {
|
|
2238
|
+
"char": "w",
|
|
2239
|
+
"name": "wait",
|
|
2240
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
2241
|
+
"hasDynamicHelp": true,
|
|
2250
2242
|
"multiple": false,
|
|
2251
2243
|
"type": "option"
|
|
2252
2244
|
},
|
|
2253
|
-
"
|
|
2254
|
-
"
|
|
2255
|
-
|
|
2245
|
+
"result-format": {
|
|
2246
|
+
"name": "result-format",
|
|
2247
|
+
"summary": "Format of the agent test run results.",
|
|
2248
|
+
"default": "human",
|
|
2249
|
+
"hasDynamicHelp": false,
|
|
2250
|
+
"multiple": false,
|
|
2251
|
+
"options": [
|
|
2252
|
+
"json",
|
|
2253
|
+
"human",
|
|
2254
|
+
"junit",
|
|
2255
|
+
"tap"
|
|
2256
2256
|
],
|
|
2257
|
-
"
|
|
2258
|
-
"summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
|
|
2259
|
-
"allowNo": false,
|
|
2260
|
-
"type": "boolean"
|
|
2257
|
+
"type": "option"
|
|
2261
2258
|
},
|
|
2262
|
-
"
|
|
2263
|
-
"
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
"
|
|
2267
|
-
"
|
|
2268
|
-
"
|
|
2269
|
-
"type": "
|
|
2259
|
+
"output-dir": {
|
|
2260
|
+
"char": "d",
|
|
2261
|
+
"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.",
|
|
2262
|
+
"name": "output-dir",
|
|
2263
|
+
"summary": "Directory to write the agent test results into.",
|
|
2264
|
+
"hasDynamicHelp": false,
|
|
2265
|
+
"multiple": false,
|
|
2266
|
+
"type": "option"
|
|
2270
2267
|
},
|
|
2271
|
-
"
|
|
2272
|
-
"
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
"hidden": true,
|
|
2276
|
-
"name": "agent-json",
|
|
2277
|
-
"summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
|
|
2268
|
+
"test-runner": {
|
|
2269
|
+
"description": "By default, the command automatically detects which test runner to use based on the test definition metadata type in your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition metadata. 'testing-center' uses AiEvaluationDefinition metadata.",
|
|
2270
|
+
"name": "test-runner",
|
|
2271
|
+
"summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
|
|
2278
2272
|
"hasDynamicHelp": false,
|
|
2279
2273
|
"multiple": false,
|
|
2274
|
+
"options": [
|
|
2275
|
+
"agentforce-studio",
|
|
2276
|
+
"testing-center"
|
|
2277
|
+
],
|
|
2280
2278
|
"type": "option"
|
|
2279
|
+
},
|
|
2280
|
+
"verbose": {
|
|
2281
|
+
"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.",
|
|
2282
|
+
"name": "verbose",
|
|
2283
|
+
"summary": "Show generated data in the test results output.",
|
|
2284
|
+
"allowNo": false,
|
|
2285
|
+
"type": "boolean"
|
|
2281
2286
|
}
|
|
2282
2287
|
},
|
|
2283
2288
|
"hasDynamicHelp": true,
|
|
2284
2289
|
"hiddenAliases": [],
|
|
2285
|
-
"id": "agent:
|
|
2290
|
+
"id": "agent:test:run",
|
|
2286
2291
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
2287
2292
|
"pluginName": "@salesforce/plugin-agent",
|
|
2288
2293
|
"pluginType": "core",
|
|
2289
2294
|
"strict": true,
|
|
2290
|
-
"summary": "Start
|
|
2295
|
+
"summary": "Start an agent test in your org.",
|
|
2291
2296
|
"enableJsonFlag": true,
|
|
2292
|
-
"requiresProject": true,
|
|
2293
2297
|
"envVariablesSection": {
|
|
2294
2298
|
"header": "ENVIRONMENT VARIABLES",
|
|
2295
2299
|
"body": [
|
|
@@ -2304,23 +2308,19 @@
|
|
|
2304
2308
|
"body": [
|
|
2305
2309
|
{
|
|
2306
2310
|
"name": "Succeeded (0)",
|
|
2307
|
-
"description": "
|
|
2311
|
+
"description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
|
|
2308
2312
|
},
|
|
2309
2313
|
{
|
|
2310
2314
|
"name": "Failed (1)",
|
|
2311
|
-
"description": "
|
|
2315
|
+
"description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
|
|
2312
2316
|
},
|
|
2313
2317
|
{
|
|
2314
2318
|
"name": "NotFound (2)",
|
|
2315
|
-
"description": "
|
|
2316
|
-
},
|
|
2317
|
-
{
|
|
2318
|
-
"name": "ServerError (3)",
|
|
2319
|
-
"description": "Compilation API returned HTTP 500 (server error during compilation)."
|
|
2319
|
+
"description": "Test definition not found or invalid test name."
|
|
2320
2320
|
},
|
|
2321
2321
|
{
|
|
2322
|
-
"name": "
|
|
2323
|
-
"description": "
|
|
2322
|
+
"name": "OperationFailed (4)",
|
|
2323
|
+
"description": "Failed to start or poll test due to API or network errors."
|
|
2324
2324
|
}
|
|
2325
2325
|
]
|
|
2326
2326
|
},
|
|
@@ -2329,17 +2329,17 @@
|
|
|
2329
2329
|
"lib",
|
|
2330
2330
|
"commands",
|
|
2331
2331
|
"agent",
|
|
2332
|
-
"
|
|
2333
|
-
"
|
|
2332
|
+
"test",
|
|
2333
|
+
"run.js"
|
|
2334
2334
|
],
|
|
2335
2335
|
"aliasPermutations": [],
|
|
2336
2336
|
"permutations": [
|
|
2337
|
-
"agent:
|
|
2338
|
-
"
|
|
2339
|
-
"
|
|
2340
|
-
"agent:
|
|
2341
|
-
"
|
|
2342
|
-
"
|
|
2337
|
+
"agent:test:run",
|
|
2338
|
+
"test:agent:run",
|
|
2339
|
+
"test:run:agent",
|
|
2340
|
+
"agent:run:test",
|
|
2341
|
+
"run:agent:test",
|
|
2342
|
+
"run:test:agent"
|
|
2343
2343
|
]
|
|
2344
2344
|
},
|
|
2345
2345
|
"agent:trace:delete": {
|
|
@@ -2744,5 +2744,5 @@
|
|
|
2744
2744
|
]
|
|
2745
2745
|
}
|
|
2746
2746
|
},
|
|
2747
|
-
"version": "1.40.
|
|
2747
|
+
"version": "1.40.4"
|
|
2748
2748
|
}
|