@salesforce/plugin-agent 1.38.1 → 1.39.0

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.
@@ -879,14 +879,15 @@
879
879
  "test-spec:generate:agent"
880
880
  ]
881
881
  },
882
- "agent:preview:end": {
882
+ "agent:publish:authoring-bundle": {
883
883
  "aliases": [],
884
884
  "args": {},
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, 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.",
885
+ "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.",
886
886
  "examples": [
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"
887
+ "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
888
+ "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",
889
+ "Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
890
+ "Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
890
891
  ],
891
892
  "flags": {
892
893
  "json": {
@@ -921,96 +922,95 @@
921
922
  "multiple": false,
922
923
  "type": "option"
923
924
  },
924
- "session-id": {
925
- "name": "session-id",
926
- "required": false,
927
- "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.",
928
- "hasDynamicHelp": false,
929
- "multiple": false,
930
- "type": "option"
931
- },
932
925
  "api-name": {
933
926
  "char": "n",
934
927
  "name": "api-name",
935
- "summary": "API name of the activated published agent you want to preview.",
928
+ "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
936
929
  "hasDynamicHelp": false,
937
930
  "multiple": false,
938
931
  "type": "option"
939
932
  },
940
- "authoring-bundle": {
941
- "name": "authoring-bundle",
942
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
943
- "hasDynamicHelp": false,
944
- "multiple": false,
945
- "type": "option"
933
+ "skip-retrieve": {
934
+ "name": "skip-retrieve",
935
+ "summary": "Don't retrieve the metadata associated with the agent to your DX project.",
936
+ "allowNo": false,
937
+ "type": "boolean"
938
+ },
939
+ "verbose": {
940
+ "char": "v",
941
+ "exclusive": [
942
+ "concise"
943
+ ],
944
+ "name": "verbose",
945
+ "summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
946
+ "allowNo": false,
947
+ "type": "boolean"
948
+ },
949
+ "concise": {
950
+ "exclusive": [
951
+ "verbose"
952
+ ],
953
+ "name": "concise",
954
+ "summary": "Display minimal output with only essential information about the publish operation.",
955
+ "allowNo": false,
956
+ "type": "boolean"
946
957
  }
947
958
  },
948
959
  "hasDynamicHelp": true,
949
960
  "hiddenAliases": [],
950
- "id": "agent:preview:end",
961
+ "id": "agent:publish:authoring-bundle",
951
962
  "pluginAlias": "@salesforce/plugin-agent",
952
963
  "pluginName": "@salesforce/plugin-agent",
953
964
  "pluginType": "core",
954
965
  "strict": true,
955
- "summary": "End an existing programmatic agent preview session and get trace location.",
966
+ "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
956
967
  "enableJsonFlag": true,
957
968
  "requiresProject": true,
958
- "envVariablesSection": {
959
- "header": "ENVIRONMENT VARIABLES",
960
- "body": [
961
- {
962
- "name": "SF_TARGET_ORG",
963
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
964
- }
965
- ]
966
- },
967
969
  "errorCodes": {
968
970
  "header": "ERROR CODES",
969
971
  "body": [
970
972
  {
971
973
  "name": "Succeeded (0)",
972
- "description": "Preview session ended successfully and traces saved."
973
- },
974
- {
975
- "name": "NotFound (2)",
976
- "description": "Agent not found, or no preview session exists for this agent."
977
- },
978
- {
979
- "name": "PreviewEndFailed (4)",
980
- "description": "Failed to end the preview session."
974
+ "description": "Agent published successfully without errors."
981
975
  },
982
976
  {
983
- "name": "SessionAmbiguous (5)",
984
- "description": "Multiple preview sessions found; specify --session-id to choose one."
977
+ "name": "Failed (1)",
978
+ "description": "Compilation errors found in the Agent Script file."
985
979
  }
986
980
  ]
987
981
  },
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
988
  "isESM": true,
989
989
  "relativePath": [
990
990
  "lib",
991
991
  "commands",
992
992
  "agent",
993
- "preview",
994
- "end.js"
993
+ "publish",
994
+ "authoring-bundle.js"
995
995
  ],
996
996
  "aliasPermutations": [],
997
997
  "permutations": [
998
- "agent:preview:end",
999
- "preview:agent:end",
1000
- "preview:end:agent",
1001
- "agent:end:preview",
1002
- "end:agent:preview",
1003
- "end:preview:agent"
998
+ "agent:publish:authoring-bundle",
999
+ "publish:agent:authoring-bundle",
1000
+ "publish:authoring-bundle:agent",
1001
+ "agent:authoring-bundle:publish",
1002
+ "authoring-bundle:agent:publish",
1003
+ "authoring-bundle:publish:agent"
1004
1004
  ]
1005
1005
  },
1006
- "agent:preview:send": {
1006
+ "agent:test:create": {
1007
1007
  "aliases": [],
1008
1008
  "args": {},
1009
- "description": "You must have previously started a programmatic agent preview session with the \"agent preview start\" command to then use this command to send the agent a message (utterance). This command then displays the agent's response.\n\nThe original \"agent preview start\" command outputs a session ID which you then use with the --session-id flag of this command to send a message. You don't have to specify the --session-id flag if an agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respecitvely. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory.",
1009
+ "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.",
1010
1010
  "examples": [
1011
- "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>",
1012
- "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",
1013
- "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"
1011
+ "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 %>",
1012
+ "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",
1013
+ "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"
1014
1014
  ],
1015
1015
  "flags": {
1016
1016
  "json": {
@@ -1028,6 +1028,20 @@
1028
1028
  "multiple": false,
1029
1029
  "type": "option"
1030
1030
  },
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
+ },
1031
1045
  "target-org": {
1032
1046
  "char": "o",
1033
1047
  "name": "target-org",
@@ -1045,49 +1059,28 @@
1045
1059
  "multiple": false,
1046
1060
  "type": "option"
1047
1061
  },
1048
- "session-id": {
1049
- "name": "session-id",
1050
- "required": false,
1051
- "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.",
1052
- "hasDynamicHelp": false,
1053
- "multiple": false,
1054
- "type": "option"
1055
- },
1056
- "utterance": {
1057
- "char": "u",
1058
- "name": "utterance",
1059
- "required": true,
1060
- "summary": "Utterance to send to the agent, enclosed in double quotes.",
1061
- "hasDynamicHelp": false,
1062
- "multiple": false,
1063
- "type": "option"
1064
- },
1065
- "api-name": {
1066
- "char": "n",
1067
- "name": "api-name",
1068
- "summary": "API name of the activated published agent you want to preview.",
1069
- "hasDynamicHelp": false,
1070
- "multiple": false,
1071
- "type": "option"
1062
+ "preview": {
1063
+ "name": "preview",
1064
+ "summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
1065
+ "allowNo": false,
1066
+ "type": "boolean"
1072
1067
  },
1073
- "authoring-bundle": {
1074
- "name": "authoring-bundle",
1075
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1076
- "hasDynamicHelp": false,
1077
- "multiple": false,
1078
- "type": "option"
1068
+ "force-overwrite": {
1069
+ "name": "force-overwrite",
1070
+ "summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
1071
+ "allowNo": false,
1072
+ "type": "boolean"
1079
1073
  }
1080
1074
  },
1081
1075
  "hasDynamicHelp": true,
1082
1076
  "hiddenAliases": [],
1083
- "id": "agent:preview:send",
1077
+ "id": "agent:test:create",
1084
1078
  "pluginAlias": "@salesforce/plugin-agent",
1085
1079
  "pluginName": "@salesforce/plugin-agent",
1086
1080
  "pluginType": "core",
1087
1081
  "strict": true,
1088
- "summary": "Send a message to an existing agent preview session.",
1082
+ "summary": "Create an agent test in your org using a local test spec YAML file.",
1089
1083
  "enableJsonFlag": true,
1090
- "requiresProject": true,
1091
1084
  "envVariablesSection": {
1092
1085
  "header": "ENVIRONMENT VARIABLES",
1093
1086
  "body": [
@@ -1102,19 +1095,19 @@
1102
1095
  "body": [
1103
1096
  {
1104
1097
  "name": "Succeeded (0)",
1105
- "description": "Message sent successfully and agent response received."
1098
+ "description": "Test created and deployed successfully."
1106
1099
  },
1107
1100
  {
1108
- "name": "NotFound (2)",
1109
- "description": "Agent not found, or no preview session exists for this agent."
1101
+ "name": "Failed (1)",
1102
+ "description": "Test validation errors or metadata format issues."
1110
1103
  },
1111
1104
  {
1112
- "name": "PreviewSendFailed (4)",
1113
- "description": "Failed to send message or receive response from the preview session."
1105
+ "name": "NotFound (2)",
1106
+ "description": "Test spec file not found or org connection failed."
1114
1107
  },
1115
1108
  {
1116
- "name": "SessionAmbiguous (5)",
1117
- "description": "Multiple preview sessions found; specify --session-id to choose one."
1109
+ "name": "DeploymentFailed (4)",
1110
+ "description": "Deployment failed due to API or network errors."
1118
1111
  }
1119
1112
  ]
1120
1113
  },
@@ -1123,25 +1116,26 @@
1123
1116
  "lib",
1124
1117
  "commands",
1125
1118
  "agent",
1126
- "preview",
1127
- "send.js"
1119
+ "test",
1120
+ "create.js"
1128
1121
  ],
1129
1122
  "aliasPermutations": [],
1130
1123
  "permutations": [
1131
- "agent:preview:send",
1132
- "preview:agent:send",
1133
- "preview:send:agent",
1134
- "agent:send:preview",
1135
- "send:agent:preview",
1136
- "send:preview:agent"
1124
+ "agent:test:create",
1125
+ "test:agent:create",
1126
+ "test:create:agent",
1127
+ "agent:create:test",
1128
+ "create:agent:test",
1129
+ "create:test:agent"
1137
1130
  ]
1138
1131
  },
1139
- "agent:preview:sessions": {
1132
+ "agent:test:list": {
1140
1133
  "aliases": [],
1141
1134
  "args": {},
1142
- "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.",
1135
+ "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.",
1143
1136
  "examples": [
1144
- "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
1137
+ "List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
1138
+ "List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
1145
1139
  ],
1146
1140
  "flags": {
1147
1141
  "json": {
@@ -1158,24 +1152,53 @@
1158
1152
  "hasDynamicHelp": false,
1159
1153
  "multiple": false,
1160
1154
  "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"
1161
1172
  }
1162
1173
  },
1163
- "hasDynamicHelp": false,
1174
+ "hasDynamicHelp": true,
1164
1175
  "hiddenAliases": [],
1165
- "id": "agent:preview:sessions",
1176
+ "id": "agent:test:list",
1166
1177
  "pluginAlias": "@salesforce/plugin-agent",
1167
1178
  "pluginName": "@salesforce/plugin-agent",
1168
1179
  "pluginType": "core",
1169
1180
  "strict": true,
1170
- "summary": "List all known programmatic agent preview sessions.",
1181
+ "summary": "List the available agent tests in your org.",
1171
1182
  "enableJsonFlag": true,
1172
- "requiresProject": true,
1183
+ "envVariablesSection": {
1184
+ "header": "ENVIRONMENT VARIABLES",
1185
+ "body": [
1186
+ {
1187
+ "name": "SF_TARGET_ORG",
1188
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1189
+ }
1190
+ ]
1191
+ },
1173
1192
  "errorCodes": {
1174
1193
  "header": "ERROR CODES",
1175
1194
  "body": [
1176
1195
  {
1177
1196
  "name": "Succeeded (0)",
1178
- "description": "Sessions listed successfully (or empty list if no active sessions)."
1197
+ "description": "Agent tests listed successfully."
1198
+ },
1199
+ {
1200
+ "name": "Failed (4)",
1201
+ "description": "Failed to retrieve agent tests due to API or network errors."
1179
1202
  }
1180
1203
  ]
1181
1204
  },
@@ -1184,27 +1207,27 @@
1184
1207
  "lib",
1185
1208
  "commands",
1186
1209
  "agent",
1187
- "preview",
1188
- "sessions.js"
1210
+ "test",
1211
+ "list.js"
1189
1212
  ],
1190
1213
  "aliasPermutations": [],
1191
1214
  "permutations": [
1192
- "agent:preview:sessions",
1193
- "preview:agent:sessions",
1194
- "preview:sessions:agent",
1195
- "agent:sessions:preview",
1196
- "sessions:agent:preview",
1197
- "sessions:preview:agent"
1198
- ]
1199
- },
1200
- "agent:preview:start": {
1201
- "aliases": [],
1215
+ "agent:test:list",
1216
+ "test:agent:list",
1217
+ "test:list:agent",
1218
+ "agent:list:test",
1219
+ "list:agent:test",
1220
+ "list:test:agent"
1221
+ ]
1222
+ },
1223
+ "agent:test:results": {
1224
+ "aliases": [],
1202
1225
  "args": {},
1203
- "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.",
1226
+ "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.",
1204
1227
  "examples": [
1205
- "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",
1206
- "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",
1207
- "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
1228
+ "Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1229
+ "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",
1230
+ "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"
1208
1231
  ],
1209
1232
  "flags": {
1210
1233
  "json": {
@@ -1239,61 +1262,67 @@
1239
1262
  "multiple": false,
1240
1263
  "type": "option"
1241
1264
  },
1242
- "api-name": {
1243
- "char": "n",
1244
- "name": "api-name",
1245
- "summary": "API name of the activated published agent you want to preview.",
1265
+ "job-id": {
1266
+ "char": "i",
1267
+ "name": "job-id",
1268
+ "required": true,
1269
+ "summary": "Job ID of the completed agent test run.",
1246
1270
  "hasDynamicHelp": false,
1247
1271
  "multiple": false,
1248
1272
  "type": "option"
1249
1273
  },
1250
- "authoring-bundle": {
1251
- "name": "authoring-bundle",
1252
- "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1274
+ "result-format": {
1275
+ "name": "result-format",
1276
+ "summary": "Format of the agent test run results.",
1277
+ "default": "human",
1253
1278
  "hasDynamicHelp": false,
1254
1279
  "multiple": false,
1255
- "type": "option"
1256
- },
1257
- "use-live-actions": {
1258
- "exclusive": [
1259
- "simulate-actions"
1280
+ "options": [
1281
+ "json",
1282
+ "human",
1283
+ "junit",
1284
+ "tap"
1260
1285
  ],
1261
- "name": "use-live-actions",
1262
- "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
1263
- "allowNo": false,
1264
- "type": "boolean"
1286
+ "type": "option"
1265
1287
  },
1266
- "simulate-actions": {
1267
- "exclusive": [
1268
- "use-live-actions"
1269
- ],
1270
- "name": "simulate-actions",
1271
- "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
1272
- "allowNo": false,
1273
- "type": "boolean"
1288
+ "output-dir": {
1289
+ "char": "d",
1290
+ "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.",
1291
+ "name": "output-dir",
1292
+ "summary": "Directory to write the agent test results into.",
1293
+ "hasDynamicHelp": false,
1294
+ "multiple": false,
1295
+ "type": "option"
1274
1296
  },
1275
- "agent-json": {
1276
- "dependsOn": [
1277
- "authoring-bundle"
1278
- ],
1279
- "hidden": true,
1280
- "name": "agent-json",
1281
- "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
1297
+ "test-runner": {
1298
+ "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.",
1299
+ "name": "test-runner",
1300
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
1282
1301
  "hasDynamicHelp": false,
1283
1302
  "multiple": false,
1303
+ "options": [
1304
+ "agentforce-studio",
1305
+ "testing-center"
1306
+ ],
1284
1307
  "type": "option"
1308
+ },
1309
+ "verbose": {
1310
+ "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.",
1311
+ "name": "verbose",
1312
+ "summary": "Show generated data in the test results output.",
1313
+ "allowNo": false,
1314
+ "type": "boolean"
1285
1315
  }
1286
1316
  },
1287
1317
  "hasDynamicHelp": true,
1288
1318
  "hiddenAliases": [],
1289
- "id": "agent:preview:start",
1319
+ "id": "agent:test:results",
1290
1320
  "pluginAlias": "@salesforce/plugin-agent",
1291
1321
  "pluginName": "@salesforce/plugin-agent",
1292
1322
  "pluginType": "core",
1293
1323
  "strict": true,
1294
- "summary": "Start a programmatic agent preview session.",
1324
+ "summary": "Get the results of a completed agent test run.",
1295
1325
  "enableJsonFlag": true,
1296
- "requiresProject": true,
1297
1326
  "envVariablesSection": {
1298
1327
  "header": "ENVIRONMENT VARIABLES",
1299
1328
  "body": [
@@ -1308,23 +1337,15 @@
1308
1337
  "body": [
1309
1338
  {
1310
1339
  "name": "Succeeded (0)",
1311
- "description": "Preview session started successfully."
1312
- },
1313
- {
1314
- "name": "Failed (1)",
1315
- "description": "Agent Script compilation failed (syntax errors in the script)."
1340
+ "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
1316
1341
  },
1317
1342
  {
1318
1343
  "name": "NotFound (2)",
1319
- "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
1320
- },
1321
- {
1322
- "name": "ServerError (3)",
1323
- "description": "Compilation API returned HTTP 500 (server error during compilation)."
1344
+ "description": "Job ID not found or invalid."
1324
1345
  },
1325
1346
  {
1326
- "name": "PreviewStartFailed (4)",
1327
- "description": "Preview session failed to start due to API or network errors."
1347
+ "name": "Failed (4)",
1348
+ "description": "Failed to retrieve results due to API or network errors."
1328
1349
  }
1329
1350
  ]
1330
1351
  },
@@ -1333,28 +1354,27 @@
1333
1354
  "lib",
1334
1355
  "commands",
1335
1356
  "agent",
1336
- "preview",
1337
- "start.js"
1357
+ "test",
1358
+ "results.js"
1338
1359
  ],
1339
1360
  "aliasPermutations": [],
1340
1361
  "permutations": [
1341
- "agent:preview:start",
1342
- "preview:agent:start",
1343
- "preview:start:agent",
1344
- "agent:start:preview",
1345
- "start:agent:preview",
1346
- "start:preview:agent"
1362
+ "agent:test:results",
1363
+ "test:agent:results",
1364
+ "test:results:agent",
1365
+ "agent:results:test",
1366
+ "results:agent:test",
1367
+ "results:test:agent"
1347
1368
  ]
1348
1369
  },
1349
- "agent:publish:authoring-bundle": {
1370
+ "agent:test:resume": {
1350
1371
  "aliases": [],
1351
1372
  "args": {},
1352
- "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.",
1373
+ "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.",
1353
1374
  "examples": [
1354
- "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
1355
- "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",
1356
- "Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
1357
- "Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
1375
+ "Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1376
+ "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",
1377
+ "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"
1358
1378
  ],
1359
1379
  "flags": {
1360
1380
  "json": {
@@ -1389,95 +1409,141 @@
1389
1409
  "multiple": false,
1390
1410
  "type": "option"
1391
1411
  },
1392
- "api-name": {
1393
- "char": "n",
1394
- "name": "api-name",
1395
- "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1412
+ "job-id": {
1413
+ "char": "i",
1414
+ "name": "job-id",
1415
+ "summary": "Job ID of the original agent test run.",
1396
1416
  "hasDynamicHelp": false,
1397
1417
  "multiple": false,
1398
1418
  "type": "option"
1399
1419
  },
1400
- "skip-retrieve": {
1401
- "name": "skip-retrieve",
1402
- "summary": "Don't retrieve the metadata associated with the agent to your DX project.",
1420
+ "use-most-recent": {
1421
+ "char": "r",
1422
+ "name": "use-most-recent",
1423
+ "summary": "Use the job ID of the most recent agent test run.",
1403
1424
  "allowNo": false,
1404
1425
  "type": "boolean"
1405
1426
  },
1406
- "verbose": {
1407
- "char": "v",
1408
- "exclusive": [
1409
- "concise"
1427
+ "wait": {
1428
+ "char": "w",
1429
+ "name": "wait",
1430
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
1431
+ "default": "5 minutes",
1432
+ "hasDynamicHelp": true,
1433
+ "multiple": false,
1434
+ "type": "option"
1435
+ },
1436
+ "result-format": {
1437
+ "name": "result-format",
1438
+ "summary": "Format of the agent test run results.",
1439
+ "default": "human",
1440
+ "hasDynamicHelp": false,
1441
+ "multiple": false,
1442
+ "options": [
1443
+ "json",
1444
+ "human",
1445
+ "junit",
1446
+ "tap"
1410
1447
  ],
1411
- "name": "verbose",
1412
- "summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
1413
- "allowNo": false,
1414
- "type": "boolean"
1448
+ "type": "option"
1415
1449
  },
1416
- "concise": {
1417
- "exclusive": [
1418
- "verbose"
1450
+ "output-dir": {
1451
+ "char": "d",
1452
+ "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.",
1453
+ "name": "output-dir",
1454
+ "summary": "Directory to write the agent test results into.",
1455
+ "hasDynamicHelp": false,
1456
+ "multiple": false,
1457
+ "type": "option"
1458
+ },
1459
+ "test-runner": {
1460
+ "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.",
1461
+ "name": "test-runner",
1462
+ "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
1463
+ "hasDynamicHelp": false,
1464
+ "multiple": false,
1465
+ "options": [
1466
+ "agentforce-studio",
1467
+ "testing-center"
1419
1468
  ],
1420
- "name": "concise",
1421
- "summary": "Display minimal output with only essential information about the publish operation.",
1469
+ "type": "option"
1470
+ },
1471
+ "verbose": {
1472
+ "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.",
1473
+ "name": "verbose",
1474
+ "summary": "Show generated data in the test results output.",
1422
1475
  "allowNo": false,
1423
1476
  "type": "boolean"
1424
1477
  }
1425
1478
  },
1426
1479
  "hasDynamicHelp": true,
1427
1480
  "hiddenAliases": [],
1428
- "id": "agent:publish:authoring-bundle",
1481
+ "id": "agent:test:resume",
1429
1482
  "pluginAlias": "@salesforce/plugin-agent",
1430
1483
  "pluginName": "@salesforce/plugin-agent",
1431
1484
  "pluginType": "core",
1432
1485
  "strict": true,
1433
- "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
1486
+ "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
1434
1487
  "enableJsonFlag": true,
1435
- "requiresProject": true,
1488
+ "envVariablesSection": {
1489
+ "header": "ENVIRONMENT VARIABLES",
1490
+ "body": [
1491
+ {
1492
+ "name": "SF_TARGET_ORG",
1493
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1494
+ }
1495
+ ]
1496
+ },
1436
1497
  "errorCodes": {
1437
1498
  "header": "ERROR CODES",
1438
1499
  "body": [
1439
1500
  {
1440
1501
  "name": "Succeeded (0)",
1441
- "description": "Agent published successfully without errors."
1502
+ "description": "Test completed successfully (with test results in the output)."
1442
1503
  },
1443
1504
  {
1444
1505
  "name": "Failed (1)",
1445
- "description": "Compilation errors found in the Agent Script file."
1506
+ "description": "Tests encountered execution errors (test cases with ERROR status)."
1507
+ },
1508
+ {
1509
+ "name": "NotFound (2)",
1510
+ "description": "Job ID not found or invalid."
1511
+ },
1512
+ {
1513
+ "name": "OperationFailed (4)",
1514
+ "description": "Failed to poll test due to API or network errors."
1446
1515
  }
1447
1516
  ]
1448
1517
  },
1449
- "FLAGGABLE_PROMPTS": {
1450
- "api-name": {
1451
- "message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1452
- "promptMessage": "API name of the authoring bundle to publish"
1453
- }
1454
- },
1455
1518
  "isESM": true,
1456
1519
  "relativePath": [
1457
1520
  "lib",
1458
1521
  "commands",
1459
1522
  "agent",
1460
- "publish",
1461
- "authoring-bundle.js"
1523
+ "test",
1524
+ "resume.js"
1462
1525
  ],
1463
1526
  "aliasPermutations": [],
1464
1527
  "permutations": [
1465
- "agent:publish:authoring-bundle",
1466
- "publish:agent:authoring-bundle",
1467
- "publish:authoring-bundle:agent",
1468
- "agent:authoring-bundle:publish",
1469
- "authoring-bundle:agent:publish",
1470
- "authoring-bundle:publish:agent"
1528
+ "agent:test:resume",
1529
+ "test:agent:resume",
1530
+ "test:resume:agent",
1531
+ "agent:resume:test",
1532
+ "resume:agent:test",
1533
+ "resume:test:agent"
1471
1534
  ]
1472
1535
  },
1473
- "agent:test:create": {
1536
+ "agent:test:run-eval": {
1474
1537
  "aliases": [],
1475
1538
  "args": {},
1476
- "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.",
1539
+ "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.",
1477
1540
  "examples": [
1478
- "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 %>",
1479
- "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",
1480
- "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"
1541
+ "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",
1542
+ "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",
1543
+ "Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/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 tests/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 tests/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"
1481
1547
  ],
1482
1548
  "flags": {
1483
1549
  "json": {
@@ -1495,20 +1561,6 @@
1495
1561
  "multiple": false,
1496
1562
  "type": "option"
1497
1563
  },
1498
- "api-name": {
1499
- "name": "api-name",
1500
- "summary": "API name of the new test; the API name must not exist in the org.",
1501
- "hasDynamicHelp": false,
1502
- "multiple": false,
1503
- "type": "option"
1504
- },
1505
- "spec": {
1506
- "name": "spec",
1507
- "summary": "Path to the test spec YAML file.",
1508
- "hasDynamicHelp": false,
1509
- "multiple": false,
1510
- "type": "option"
1511
- },
1512
1564
  "target-org": {
1513
1565
  "char": "o",
1514
1566
  "name": "target-org",
@@ -1526,27 +1578,60 @@
1526
1578
  "multiple": false,
1527
1579
  "type": "option"
1528
1580
  },
1529
- "preview": {
1530
- "name": "preview",
1531
- "summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
1532
- "allowNo": false,
1533
- "type": "boolean"
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"
1534
1589
  },
1535
- "force-overwrite": {
1536
- "name": "force-overwrite",
1537
- "summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
1590
+ "api-name": {
1591
+ "char": "n",
1592
+ "name": "api-name",
1593
+ "summary": "Agent DeveloperName (also called API name) 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,
1603
+ "multiple": false,
1604
+ "options": [
1605
+ "json",
1606
+ "human",
1607
+ "junit",
1608
+ "tap"
1609
+ ],
1610
+ "type": "option"
1611
+ },
1612
+ "batch-size": {
1613
+ "name": "batch-size",
1614
+ "summary": "Number of tests per API request (max 5).",
1615
+ "default": 5,
1616
+ "hasDynamicHelp": false,
1617
+ "multiple": false,
1618
+ "type": "option"
1619
+ },
1620
+ "no-normalize": {
1621
+ "name": "no-normalize",
1622
+ "summary": "Disable auto-normalization of field names and shorthand references.",
1538
1623
  "allowNo": false,
1539
1624
  "type": "boolean"
1540
1625
  }
1541
1626
  },
1542
1627
  "hasDynamicHelp": true,
1543
1628
  "hiddenAliases": [],
1544
- "id": "agent:test:create",
1629
+ "id": "agent:test:run-eval",
1545
1630
  "pluginAlias": "@salesforce/plugin-agent",
1546
1631
  "pluginName": "@salesforce/plugin-agent",
1547
1632
  "pluginType": "core",
1548
1633
  "strict": true,
1549
- "summary": "Create an agent test in your org using a local test spec YAML file.",
1634
+ "summary": "Run evaluation tests against an Agentforce agent.",
1550
1635
  "enableJsonFlag": true,
1551
1636
  "envVariablesSection": {
1552
1637
  "header": "ENVIRONMENT VARIABLES",
@@ -1562,19 +1647,19 @@
1562
1647
  "body": [
1563
1648
  {
1564
1649
  "name": "Succeeded (0)",
1565
- "description": "Test created and deployed successfully."
1650
+ "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
1566
1651
  },
1567
1652
  {
1568
1653
  "name": "Failed (1)",
1569
- "description": "Test validation errors or metadata format issues."
1654
+ "description": "Tests encountered execution errors (tests couldn't run properly)."
1570
1655
  },
1571
1656
  {
1572
1657
  "name": "NotFound (2)",
1573
- "description": "Test spec file not found or org connection failed."
1658
+ "description": "Agent not found, spec file not found, or invalid agent name."
1574
1659
  },
1575
1660
  {
1576
- "name": "DeploymentFailed (4)",
1577
- "description": "Deployment failed due to API or network errors."
1661
+ "name": "OperationFailed (4)",
1662
+ "description": "Failed to execute tests due to API or network errors."
1578
1663
  }
1579
1664
  ]
1580
1665
  },
@@ -1584,25 +1669,26 @@
1584
1669
  "commands",
1585
1670
  "agent",
1586
1671
  "test",
1587
- "create.js"
1672
+ "run-eval.js"
1588
1673
  ],
1589
1674
  "aliasPermutations": [],
1590
1675
  "permutations": [
1591
- "agent:test:create",
1592
- "test:agent:create",
1593
- "test:create:agent",
1594
- "agent:create:test",
1595
- "create:agent:test",
1596
- "create:test:agent"
1676
+ "agent:test:run-eval",
1677
+ "test:agent:run-eval",
1678
+ "test:run-eval:agent",
1679
+ "agent:run-eval:test",
1680
+ "run-eval:agent:test",
1681
+ "run-eval:test:agent"
1597
1682
  ]
1598
1683
  },
1599
- "agent:test:list": {
1684
+ "agent:test:run": {
1600
1685
  "aliases": [],
1601
1686
  "args": {},
1602
- "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.",
1687
+ "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.",
1603
1688
  "examples": [
1604
- "List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
1605
- "List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
1689
+ "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",
1690
+ "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",
1691
+ "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"
1606
1692
  ],
1607
1693
  "flags": {
1608
1694
  "json": {
@@ -1636,108 +1722,23 @@
1636
1722
  "hasDynamicHelp": false,
1637
1723
  "multiple": false,
1638
1724
  "type": "option"
1639
- }
1640
- },
1641
- "hasDynamicHelp": true,
1642
- "hiddenAliases": [],
1643
- "id": "agent:test:list",
1644
- "pluginAlias": "@salesforce/plugin-agent",
1645
- "pluginName": "@salesforce/plugin-agent",
1646
- "pluginType": "core",
1647
- "strict": true,
1648
- "summary": "List the available agent tests in your org.",
1649
- "enableJsonFlag": true,
1650
- "envVariablesSection": {
1651
- "header": "ENVIRONMENT VARIABLES",
1652
- "body": [
1653
- {
1654
- "name": "SF_TARGET_ORG",
1655
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1656
- }
1657
- ]
1658
- },
1659
- "errorCodes": {
1660
- "header": "ERROR CODES",
1661
- "body": [
1662
- {
1663
- "name": "Succeeded (0)",
1664
- "description": "Agent tests listed successfully."
1665
- },
1666
- {
1667
- "name": "Failed (4)",
1668
- "description": "Failed to retrieve agent tests due to API or network errors."
1669
- }
1670
- ]
1671
- },
1672
- "isESM": true,
1673
- "relativePath": [
1674
- "lib",
1675
- "commands",
1676
- "agent",
1677
- "test",
1678
- "list.js"
1679
- ],
1680
- "aliasPermutations": [],
1681
- "permutations": [
1682
- "agent:test:list",
1683
- "test:agent:list",
1684
- "test:list:agent",
1685
- "agent:list:test",
1686
- "list:agent:test",
1687
- "list:test:agent"
1688
- ]
1689
- },
1690
- "agent:test:results": {
1691
- "aliases": [],
1692
- "args": {},
1693
- "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.",
1694
- "examples": [
1695
- "Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1696
- "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",
1697
- "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"
1698
- ],
1699
- "flags": {
1700
- "json": {
1701
- "description": "Format output as json.",
1702
- "helpGroup": "GLOBAL",
1703
- "name": "json",
1704
- "allowNo": false,
1705
- "type": "boolean"
1706
1725
  },
1707
- "flags-dir": {
1708
- "helpGroup": "GLOBAL",
1709
- "name": "flags-dir",
1710
- "summary": "Import flag values from a directory.",
1726
+ "api-name": {
1727
+ "char": "n",
1728
+ "name": "api-name",
1729
+ "summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
1711
1730
  "hasDynamicHelp": false,
1712
1731
  "multiple": false,
1713
1732
  "type": "option"
1714
1733
  },
1715
- "target-org": {
1716
- "char": "o",
1717
- "name": "target-org",
1718
- "noCacheDefault": true,
1719
- "required": true,
1720
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1734
+ "wait": {
1735
+ "char": "w",
1736
+ "name": "wait",
1737
+ "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
1721
1738
  "hasDynamicHelp": true,
1722
1739
  "multiple": false,
1723
1740
  "type": "option"
1724
1741
  },
1725
- "api-version": {
1726
- "description": "Override the api version used for api requests made by this command",
1727
- "name": "api-version",
1728
- "hasDynamicHelp": false,
1729
- "multiple": false,
1730
- "type": "option"
1731
- },
1732
- "job-id": {
1733
- "char": "i",
1734
- "name": "job-id",
1735
- "required": true,
1736
- "summary": "Job ID of the completed agent test run.",
1737
- "hasDynamicHelp": false,
1738
- "multiple": false,
1739
- "type": "option"
1740
- },
1741
1742
  "result-format": {
1742
1743
  "name": "result-format",
1743
1744
  "summary": "Format of the agent test run results.",
@@ -1783,12 +1784,12 @@
1783
1784
  },
1784
1785
  "hasDynamicHelp": true,
1785
1786
  "hiddenAliases": [],
1786
- "id": "agent:test:results",
1787
+ "id": "agent:test:run",
1787
1788
  "pluginAlias": "@salesforce/plugin-agent",
1788
1789
  "pluginName": "@salesforce/plugin-agent",
1789
1790
  "pluginType": "core",
1790
1791
  "strict": true,
1791
- "summary": "Get the results of a completed agent test run.",
1792
+ "summary": "Start an agent test in your org.",
1792
1793
  "enableJsonFlag": true,
1793
1794
  "envVariablesSection": {
1794
1795
  "header": "ENVIRONMENT VARIABLES",
@@ -1804,15 +1805,19 @@
1804
1805
  "body": [
1805
1806
  {
1806
1807
  "name": "Succeeded (0)",
1807
- "description": "Results retrieved successfully. Test results (passed/failed) are in the output."
1808
+ "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
1809
+ },
1810
+ {
1811
+ "name": "Failed (1)",
1812
+ "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
1808
1813
  },
1809
1814
  {
1810
1815
  "name": "NotFound (2)",
1811
- "description": "Job ID not found or invalid."
1816
+ "description": "Test definition not found or invalid test name."
1812
1817
  },
1813
1818
  {
1814
- "name": "Failed (4)",
1815
- "description": "Failed to retrieve results due to API or network errors."
1819
+ "name": "OperationFailed (4)",
1820
+ "description": "Failed to start or poll test due to API or network errors."
1816
1821
  }
1817
1822
  ]
1818
1823
  },
@@ -1822,26 +1827,28 @@
1822
1827
  "commands",
1823
1828
  "agent",
1824
1829
  "test",
1825
- "results.js"
1830
+ "run.js"
1826
1831
  ],
1827
1832
  "aliasPermutations": [],
1828
1833
  "permutations": [
1829
- "agent:test:results",
1830
- "test:agent:results",
1831
- "test:results:agent",
1832
- "agent:results:test",
1833
- "results:agent:test",
1834
- "results:test:agent"
1834
+ "agent:test:run",
1835
+ "test:agent:run",
1836
+ "test:run:agent",
1837
+ "agent:run:test",
1838
+ "run:agent:test",
1839
+ "run:test:agent"
1835
1840
  ]
1836
1841
  },
1837
- "agent:test:resume": {
1842
+ "agent:preview:end": {
1838
1843
  "aliases": [],
1839
1844
  "args": {},
1840
- "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.",
1845
+ "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.",
1841
1846
  "examples": [
1842
- "Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
1843
- "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",
1844
- "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"
1847
+ "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",
1848
+ "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",
1849
+ "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",
1850
+ "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",
1851
+ "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>"
1845
1852
  ],
1846
1853
  "flags": {
1847
1854
  "json": {
@@ -1876,82 +1883,206 @@
1876
1883
  "multiple": false,
1877
1884
  "type": "option"
1878
1885
  },
1879
- "job-id": {
1880
- "char": "i",
1881
- "name": "job-id",
1882
- "summary": "Job ID of the original agent test run.",
1883
- "hasDynamicHelp": false,
1886
+ "session-id": {
1887
+ "exclusive": [
1888
+ "all"
1889
+ ],
1890
+ "name": "session-id",
1891
+ "required": false,
1892
+ "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.",
1893
+ "hasDynamicHelp": false,
1884
1894
  "multiple": false,
1885
1895
  "type": "option"
1886
1896
  },
1887
- "use-most-recent": {
1888
- "char": "r",
1889
- "name": "use-most-recent",
1890
- "summary": "Use the job ID of the most recent agent test run.",
1897
+ "api-name": {
1898
+ "char": "n",
1899
+ "exclusive": [
1900
+ "authoring-bundle"
1901
+ ],
1902
+ "name": "api-name",
1903
+ "summary": "API name of the activated published agent you want to preview.",
1904
+ "hasDynamicHelp": false,
1905
+ "multiple": false,
1906
+ "type": "option"
1907
+ },
1908
+ "authoring-bundle": {
1909
+ "exclusive": [
1910
+ "api-name"
1911
+ ],
1912
+ "name": "authoring-bundle",
1913
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
1914
+ "hasDynamicHelp": false,
1915
+ "multiple": false,
1916
+ "type": "option"
1917
+ },
1918
+ "all": {
1919
+ "exclusive": [
1920
+ "session-id"
1921
+ ],
1922
+ "name": "all",
1923
+ "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.",
1891
1924
  "allowNo": false,
1892
1925
  "type": "boolean"
1893
1926
  },
1894
- "wait": {
1895
- "char": "w",
1896
- "name": "wait",
1897
- "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
1898
- "default": "5 minutes",
1927
+ "no-prompt": {
1928
+ "char": "p",
1929
+ "name": "no-prompt",
1930
+ "summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
1931
+ "allowNo": false,
1932
+ "type": "boolean"
1933
+ }
1934
+ },
1935
+ "hasDynamicHelp": true,
1936
+ "hiddenAliases": [],
1937
+ "id": "agent:preview:end",
1938
+ "pluginAlias": "@salesforce/plugin-agent",
1939
+ "pluginName": "@salesforce/plugin-agent",
1940
+ "pluginType": "core",
1941
+ "strict": true,
1942
+ "summary": "End an existing programmatic agent preview session and get trace location.",
1943
+ "enableJsonFlag": true,
1944
+ "requiresProject": true,
1945
+ "envVariablesSection": {
1946
+ "header": "ENVIRONMENT VARIABLES",
1947
+ "body": [
1948
+ {
1949
+ "name": "SF_TARGET_ORG",
1950
+ "description": "Username or alias of your default org. Overrides the target-org configuration variable."
1951
+ }
1952
+ ]
1953
+ },
1954
+ "errorCodes": {
1955
+ "header": "ERROR CODES",
1956
+ "body": [
1957
+ {
1958
+ "name": "Succeeded (0)",
1959
+ "description": "Preview session ended successfully and traces saved."
1960
+ },
1961
+ {
1962
+ "name": "ExactlyOneRequired (2)",
1963
+ "description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
1964
+ },
1965
+ {
1966
+ "name": "NotFound (2)",
1967
+ "description": "Agent not found, or no preview session exists for this agent."
1968
+ },
1969
+ {
1970
+ "name": "PreviewEndFailed (4)",
1971
+ "description": "Failed to end the preview session."
1972
+ },
1973
+ {
1974
+ "name": "PreviewEndPartialFailure (68)",
1975
+ "description": "With --all, one or more sessions failed to end while others succeeded."
1976
+ },
1977
+ {
1978
+ "name": "SessionAmbiguous (5)",
1979
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
1980
+ }
1981
+ ]
1982
+ },
1983
+ "isESM": true,
1984
+ "relativePath": [
1985
+ "lib",
1986
+ "commands",
1987
+ "agent",
1988
+ "preview",
1989
+ "end.js"
1990
+ ],
1991
+ "aliasPermutations": [],
1992
+ "permutations": [
1993
+ "agent:preview:end",
1994
+ "preview:agent:end",
1995
+ "preview:end:agent",
1996
+ "agent:end:preview",
1997
+ "end:agent:preview",
1998
+ "end:preview:agent"
1999
+ ]
2000
+ },
2001
+ "agent:preview:send": {
2002
+ "aliases": [],
2003
+ "args": {},
2004
+ "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.",
2005
+ "examples": [
2006
+ "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>",
2007
+ "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",
2008
+ "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"
2009
+ ],
2010
+ "flags": {
2011
+ "json": {
2012
+ "description": "Format output as json.",
2013
+ "helpGroup": "GLOBAL",
2014
+ "name": "json",
2015
+ "allowNo": false,
2016
+ "type": "boolean"
2017
+ },
2018
+ "flags-dir": {
2019
+ "helpGroup": "GLOBAL",
2020
+ "name": "flags-dir",
2021
+ "summary": "Import flag values from a directory.",
2022
+ "hasDynamicHelp": false,
2023
+ "multiple": false,
2024
+ "type": "option"
2025
+ },
2026
+ "target-org": {
2027
+ "char": "o",
2028
+ "name": "target-org",
2029
+ "noCacheDefault": true,
2030
+ "required": true,
2031
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1899
2032
  "hasDynamicHelp": true,
1900
2033
  "multiple": false,
1901
2034
  "type": "option"
1902
2035
  },
1903
- "result-format": {
1904
- "name": "result-format",
1905
- "summary": "Format of the agent test run results.",
1906
- "default": "human",
2036
+ "api-version": {
2037
+ "description": "Override the api version used for api requests made by this command",
2038
+ "name": "api-version",
1907
2039
  "hasDynamicHelp": false,
1908
2040
  "multiple": false,
1909
- "options": [
1910
- "json",
1911
- "human",
1912
- "junit",
1913
- "tap"
1914
- ],
1915
2041
  "type": "option"
1916
2042
  },
1917
- "output-dir": {
1918
- "char": "d",
1919
- "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.",
1920
- "name": "output-dir",
1921
- "summary": "Directory to write the agent test results into.",
2043
+ "session-id": {
2044
+ "name": "session-id",
2045
+ "required": false,
2046
+ "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.",
1922
2047
  "hasDynamicHelp": false,
1923
2048
  "multiple": false,
1924
2049
  "type": "option"
1925
2050
  },
1926
- "test-runner": {
1927
- "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.",
1928
- "name": "test-runner",
1929
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2051
+ "utterance": {
2052
+ "char": "u",
2053
+ "name": "utterance",
2054
+ "required": true,
2055
+ "summary": "Utterance to send to the agent, enclosed in double quotes.",
1930
2056
  "hasDynamicHelp": false,
1931
2057
  "multiple": false,
1932
- "options": [
1933
- "agentforce-studio",
1934
- "testing-center"
1935
- ],
1936
2058
  "type": "option"
1937
2059
  },
1938
- "verbose": {
1939
- "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.",
1940
- "name": "verbose",
1941
- "summary": "Show generated data in the test results output.",
1942
- "allowNo": false,
1943
- "type": "boolean"
2060
+ "api-name": {
2061
+ "char": "n",
2062
+ "name": "api-name",
2063
+ "summary": "API name of the activated published agent you want to preview.",
2064
+ "hasDynamicHelp": false,
2065
+ "multiple": false,
2066
+ "type": "option"
2067
+ },
2068
+ "authoring-bundle": {
2069
+ "name": "authoring-bundle",
2070
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2071
+ "hasDynamicHelp": false,
2072
+ "multiple": false,
2073
+ "type": "option"
1944
2074
  }
1945
2075
  },
1946
2076
  "hasDynamicHelp": true,
1947
2077
  "hiddenAliases": [],
1948
- "id": "agent:test:resume",
2078
+ "id": "agent:preview:send",
1949
2079
  "pluginAlias": "@salesforce/plugin-agent",
1950
2080
  "pluginName": "@salesforce/plugin-agent",
1951
2081
  "pluginType": "core",
1952
2082
  "strict": true,
1953
- "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
2083
+ "summary": "Send a message to an existing agent preview session.",
1954
2084
  "enableJsonFlag": true,
2085
+ "requiresProject": true,
1955
2086
  "envVariablesSection": {
1956
2087
  "header": "ENVIRONMENT VARIABLES",
1957
2088
  "body": [
@@ -1966,19 +2097,19 @@
1966
2097
  "body": [
1967
2098
  {
1968
2099
  "name": "Succeeded (0)",
1969
- "description": "Test completed successfully (with test results in the output)."
2100
+ "description": "Message sent successfully and agent response received."
1970
2101
  },
1971
2102
  {
1972
- "name": "Failed (1)",
1973
- "description": "Tests encountered execution errors (test cases with ERROR status)."
2103
+ "name": "NotFound (2)",
2104
+ "description": "Agent not found, or no preview session exists for this agent."
1974
2105
  },
1975
2106
  {
1976
- "name": "NotFound (2)",
1977
- "description": "Job ID not found or invalid."
2107
+ "name": "PreviewSendFailed (4)",
2108
+ "description": "Failed to send message or receive response from the preview session."
1978
2109
  },
1979
2110
  {
1980
- "name": "OperationFailed (4)",
1981
- "description": "Failed to poll test due to API or network errors."
2111
+ "name": "SessionAmbiguous (5)",
2112
+ "description": "Multiple preview sessions found; specify --session-id to choose one."
1982
2113
  }
1983
2114
  ]
1984
2115
  },
@@ -1987,30 +2118,88 @@
1987
2118
  "lib",
1988
2119
  "commands",
1989
2120
  "agent",
1990
- "test",
1991
- "resume.js"
2121
+ "preview",
2122
+ "send.js"
1992
2123
  ],
1993
2124
  "aliasPermutations": [],
1994
2125
  "permutations": [
1995
- "agent:test:resume",
1996
- "test:agent:resume",
1997
- "test:resume:agent",
1998
- "agent:resume:test",
1999
- "resume:agent:test",
2000
- "resume:test:agent"
2126
+ "agent:preview:send",
2127
+ "preview:agent:send",
2128
+ "preview:send:agent",
2129
+ "agent:send:preview",
2130
+ "send:agent:preview",
2131
+ "send:preview:agent"
2001
2132
  ]
2002
2133
  },
2003
- "agent:test:run-eval": {
2134
+ "agent:preview:sessions": {
2004
2135
  "aliases": [],
2005
2136
  "args": {},
2006
- "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.",
2137
+ "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.",
2007
2138
  "examples": [
2008
- "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",
2009
- "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",
2010
- "Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
2011
- "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",
2012
- "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",
2013
- "Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
2139
+ "List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
2140
+ ],
2141
+ "flags": {
2142
+ "json": {
2143
+ "description": "Format output as json.",
2144
+ "helpGroup": "GLOBAL",
2145
+ "name": "json",
2146
+ "allowNo": false,
2147
+ "type": "boolean"
2148
+ },
2149
+ "flags-dir": {
2150
+ "helpGroup": "GLOBAL",
2151
+ "name": "flags-dir",
2152
+ "summary": "Import flag values from a directory.",
2153
+ "hasDynamicHelp": false,
2154
+ "multiple": false,
2155
+ "type": "option"
2156
+ }
2157
+ },
2158
+ "hasDynamicHelp": false,
2159
+ "hiddenAliases": [],
2160
+ "id": "agent:preview:sessions",
2161
+ "pluginAlias": "@salesforce/plugin-agent",
2162
+ "pluginName": "@salesforce/plugin-agent",
2163
+ "pluginType": "core",
2164
+ "strict": true,
2165
+ "summary": "List all known programmatic agent preview sessions.",
2166
+ "enableJsonFlag": true,
2167
+ "requiresProject": true,
2168
+ "errorCodes": {
2169
+ "header": "ERROR CODES",
2170
+ "body": [
2171
+ {
2172
+ "name": "Succeeded (0)",
2173
+ "description": "Sessions listed successfully (or empty list if no active sessions)."
2174
+ }
2175
+ ]
2176
+ },
2177
+ "isESM": true,
2178
+ "relativePath": [
2179
+ "lib",
2180
+ "commands",
2181
+ "agent",
2182
+ "preview",
2183
+ "sessions.js"
2184
+ ],
2185
+ "aliasPermutations": [],
2186
+ "permutations": [
2187
+ "agent:preview:sessions",
2188
+ "preview:agent:sessions",
2189
+ "preview:sessions:agent",
2190
+ "agent:sessions:preview",
2191
+ "sessions:agent:preview",
2192
+ "sessions:preview:agent"
2193
+ ]
2194
+ },
2195
+ "agent:preview:start": {
2196
+ "aliases": [],
2197
+ "args": {},
2198
+ "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.",
2199
+ "examples": [
2200
+ "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",
2201
+ "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",
2202
+ "Start a preview session with an activated published agent (always uses live actions):\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
2014
2203
  ],
2015
2204
  "flags": {
2016
2205
  "json": {
@@ -2045,61 +2234,61 @@
2045
2234
  "multiple": false,
2046
2235
  "type": "option"
2047
2236
  },
2048
- "spec": {
2049
- "char": "s",
2050
- "name": "spec",
2051
- "required": true,
2052
- "summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
2053
- "hasDynamicHelp": false,
2054
- "multiple": false,
2055
- "type": "option"
2056
- },
2057
2237
  "api-name": {
2058
2238
  "char": "n",
2059
2239
  "name": "api-name",
2060
- "summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
2240
+ "summary": "API name of the activated published agent you want to preview.",
2061
2241
  "hasDynamicHelp": false,
2062
2242
  "multiple": false,
2063
2243
  "type": "option"
2064
2244
  },
2065
- "result-format": {
2066
- "name": "result-format",
2067
- "summary": "Format of the agent test run results.",
2068
- "default": "human",
2245
+ "authoring-bundle": {
2246
+ "name": "authoring-bundle",
2247
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
2069
2248
  "hasDynamicHelp": false,
2070
2249
  "multiple": false,
2071
- "options": [
2072
- "json",
2073
- "human",
2074
- "junit",
2075
- "tap"
2076
- ],
2077
2250
  "type": "option"
2078
2251
  },
2079
- "batch-size": {
2080
- "name": "batch-size",
2081
- "summary": "Number of tests per API request (max 5).",
2082
- "default": 5,
2252
+ "use-live-actions": {
2253
+ "exclusive": [
2254
+ "simulate-actions"
2255
+ ],
2256
+ "name": "use-live-actions",
2257
+ "summary": "Execute real actions in the org (Apex classes, flows, etc.). Required with --authoring-bundle.",
2258
+ "allowNo": false,
2259
+ "type": "boolean"
2260
+ },
2261
+ "simulate-actions": {
2262
+ "exclusive": [
2263
+ "use-live-actions"
2264
+ ],
2265
+ "name": "simulate-actions",
2266
+ "summary": "Use AI to simulate action execution instead of calling real actions. Required with --authoring-bundle.",
2267
+ "allowNo": false,
2268
+ "type": "boolean"
2269
+ },
2270
+ "agent-json": {
2271
+ "dependsOn": [
2272
+ "authoring-bundle"
2273
+ ],
2274
+ "hidden": true,
2275
+ "name": "agent-json",
2276
+ "summary": "Path to a pre-compiled AgentJSON file to use instead of compiling the Agent Script file. Intended for internal use and testing.",
2083
2277
  "hasDynamicHelp": false,
2084
2278
  "multiple": false,
2085
2279
  "type": "option"
2086
- },
2087
- "no-normalize": {
2088
- "name": "no-normalize",
2089
- "summary": "Disable auto-normalization of field names and shorthand references.",
2090
- "allowNo": false,
2091
- "type": "boolean"
2092
2280
  }
2093
2281
  },
2094
2282
  "hasDynamicHelp": true,
2095
2283
  "hiddenAliases": [],
2096
- "id": "agent:test:run-eval",
2284
+ "id": "agent:preview:start",
2097
2285
  "pluginAlias": "@salesforce/plugin-agent",
2098
2286
  "pluginName": "@salesforce/plugin-agent",
2099
2287
  "pluginType": "core",
2100
2288
  "strict": true,
2101
- "summary": "Run evaluation tests against an Agentforce agent.",
2289
+ "summary": "Start a programmatic agent preview session.",
2102
2290
  "enableJsonFlag": true,
2291
+ "requiresProject": true,
2103
2292
  "envVariablesSection": {
2104
2293
  "header": "ENVIRONMENT VARIABLES",
2105
2294
  "body": [
@@ -2114,19 +2303,23 @@
2114
2303
  "body": [
2115
2304
  {
2116
2305
  "name": "Succeeded (0)",
2117
- "description": "Tests completed successfully. Test results (passed/failed) are in the JSON output."
2306
+ "description": "Preview session started successfully."
2118
2307
  },
2119
2308
  {
2120
2309
  "name": "Failed (1)",
2121
- "description": "Tests encountered execution errors (tests couldn't run properly)."
2310
+ "description": "Agent Script compilation failed (syntax errors in the script)."
2122
2311
  },
2123
2312
  {
2124
2313
  "name": "NotFound (2)",
2125
- "description": "Agent not found, spec file not found, or invalid agent name."
2314
+ "description": "Agent not found, or compilation API returned HTTP 404 (endpoint may not be available in your org or region)."
2126
2315
  },
2127
2316
  {
2128
- "name": "OperationFailed (4)",
2129
- "description": "Failed to execute tests due to API or network errors."
2317
+ "name": "ServerError (3)",
2318
+ "description": "Compilation API returned HTTP 500 (server error during compilation)."
2319
+ },
2320
+ {
2321
+ "name": "PreviewStartFailed (4)",
2322
+ "description": "Preview session failed to start due to API or network errors."
2130
2323
  }
2131
2324
  ]
2132
2325
  },
@@ -2135,27 +2328,26 @@
2135
2328
  "lib",
2136
2329
  "commands",
2137
2330
  "agent",
2138
- "test",
2139
- "run-eval.js"
2331
+ "preview",
2332
+ "start.js"
2140
2333
  ],
2141
2334
  "aliasPermutations": [],
2142
2335
  "permutations": [
2143
- "agent:test:run-eval",
2144
- "test:agent:run-eval",
2145
- "test:run-eval:agent",
2146
- "agent:run-eval:test",
2147
- "run-eval:agent:test",
2148
- "run-eval:test:agent"
2336
+ "agent:preview:start",
2337
+ "preview:agent:start",
2338
+ "preview:start:agent",
2339
+ "agent:start:preview",
2340
+ "start:agent:preview",
2341
+ "start:preview:agent"
2149
2342
  ]
2150
2343
  },
2151
- "agent:test:run": {
2344
+ "agent:validate:authoring-bundle": {
2152
2345
  "aliases": [],
2153
2346
  "args": {},
2154
- "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.",
2347
+ "description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
2155
2348
  "examples": [
2156
- "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",
2157
- "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",
2158
- "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"
2349
+ "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
2350
+ "Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
2159
2351
  ],
2160
2352
  "flags": {
2161
2353
  "json": {
@@ -2193,71 +2385,22 @@
2193
2385
  "api-name": {
2194
2386
  "char": "n",
2195
2387
  "name": "api-name",
2196
- "summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
2197
- "hasDynamicHelp": false,
2198
- "multiple": false,
2199
- "type": "option"
2200
- },
2201
- "wait": {
2202
- "char": "w",
2203
- "name": "wait",
2204
- "summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
2205
- "hasDynamicHelp": true,
2206
- "multiple": false,
2207
- "type": "option"
2208
- },
2209
- "result-format": {
2210
- "name": "result-format",
2211
- "summary": "Format of the agent test run results.",
2212
- "default": "human",
2213
- "hasDynamicHelp": false,
2214
- "multiple": false,
2215
- "options": [
2216
- "json",
2217
- "human",
2218
- "junit",
2219
- "tap"
2220
- ],
2221
- "type": "option"
2222
- },
2223
- "output-dir": {
2224
- "char": "d",
2225
- "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.",
2226
- "name": "output-dir",
2227
- "summary": "Directory to write the agent test results into.",
2228
- "hasDynamicHelp": false,
2229
- "multiple": false,
2230
- "type": "option"
2231
- },
2232
- "test-runner": {
2233
- "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.",
2234
- "name": "test-runner",
2235
- "summary": "Explicitly specify which test runner to use (agentforce-studio or testing-center).",
2388
+ "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
2236
2389
  "hasDynamicHelp": false,
2237
2390
  "multiple": false,
2238
- "options": [
2239
- "agentforce-studio",
2240
- "testing-center"
2241
- ],
2242
2391
  "type": "option"
2243
- },
2244
- "verbose": {
2245
- "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.",
2246
- "name": "verbose",
2247
- "summary": "Show generated data in the test results output.",
2248
- "allowNo": false,
2249
- "type": "boolean"
2250
2392
  }
2251
2393
  },
2252
2394
  "hasDynamicHelp": true,
2253
2395
  "hiddenAliases": [],
2254
- "id": "agent:test:run",
2396
+ "id": "agent:validate:authoring-bundle",
2255
2397
  "pluginAlias": "@salesforce/plugin-agent",
2256
2398
  "pluginName": "@salesforce/plugin-agent",
2257
2399
  "pluginType": "core",
2258
2400
  "strict": true,
2259
- "summary": "Start an agent test in your org.",
2401
+ "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
2260
2402
  "enableJsonFlag": true,
2403
+ "requiresProject": true,
2261
2404
  "envVariablesSection": {
2262
2405
  "header": "ENVIRONMENT VARIABLES",
2263
2406
  "body": [
@@ -2272,38 +2415,44 @@
2272
2415
  "body": [
2273
2416
  {
2274
2417
  "name": "Succeeded (0)",
2275
- "description": "Test started successfully (without --wait), or test completed successfully (with --wait)."
2418
+ "description": "Agent Script file compiled successfully without errors."
2276
2419
  },
2277
2420
  {
2278
2421
  "name": "Failed (1)",
2279
- "description": "Tests encountered execution errors (test cases with ERROR status when using --wait)."
2422
+ "description": "Compilation errors found in the Agent Script file."
2280
2423
  },
2281
2424
  {
2282
2425
  "name": "NotFound (2)",
2283
- "description": "Test definition not found or invalid test name."
2426
+ "description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
2284
2427
  },
2285
2428
  {
2286
- "name": "OperationFailed (4)",
2287
- "description": "Failed to start or poll test due to API or network errors."
2429
+ "name": "ServerError (3)",
2430
+ "description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
2288
2431
  }
2289
2432
  ]
2290
2433
  },
2434
+ "FLAGGABLE_PROMPTS": {
2435
+ "api-name": {
2436
+ "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
2437
+ "promptMessage": "API name of the authoring bundle to validate"
2438
+ }
2439
+ },
2291
2440
  "isESM": true,
2292
2441
  "relativePath": [
2293
2442
  "lib",
2294
2443
  "commands",
2295
2444
  "agent",
2296
- "test",
2297
- "run.js"
2445
+ "validate",
2446
+ "authoring-bundle.js"
2298
2447
  ],
2299
2448
  "aliasPermutations": [],
2300
2449
  "permutations": [
2301
- "agent:test:run",
2302
- "test:agent:run",
2303
- "test:run:agent",
2304
- "agent:run:test",
2305
- "run:agent:test",
2306
- "run:test:agent"
2450
+ "agent:validate:authoring-bundle",
2451
+ "validate:agent:authoring-bundle",
2452
+ "validate:authoring-bundle:agent",
2453
+ "agent:authoring-bundle:validate",
2454
+ "authoring-bundle:agent:validate",
2455
+ "authoring-bundle:validate:agent"
2307
2456
  ]
2308
2457
  },
2309
2458
  "agent:trace:delete": {
@@ -2592,121 +2741,7 @@
2592
2741
  "read:agent:trace",
2593
2742
  "read:trace:agent"
2594
2743
  ]
2595
- },
2596
- "agent:validate:authoring-bundle": {
2597
- "aliases": [],
2598
- "args": {},
2599
- "description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
2600
- "examples": [
2601
- "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
2602
- "Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
2603
- ],
2604
- "flags": {
2605
- "json": {
2606
- "description": "Format output as json.",
2607
- "helpGroup": "GLOBAL",
2608
- "name": "json",
2609
- "allowNo": false,
2610
- "type": "boolean"
2611
- },
2612
- "flags-dir": {
2613
- "helpGroup": "GLOBAL",
2614
- "name": "flags-dir",
2615
- "summary": "Import flag values from a directory.",
2616
- "hasDynamicHelp": false,
2617
- "multiple": false,
2618
- "type": "option"
2619
- },
2620
- "target-org": {
2621
- "char": "o",
2622
- "name": "target-org",
2623
- "noCacheDefault": true,
2624
- "required": true,
2625
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
2626
- "hasDynamicHelp": true,
2627
- "multiple": false,
2628
- "type": "option"
2629
- },
2630
- "api-version": {
2631
- "description": "Override the api version used for api requests made by this command",
2632
- "name": "api-version",
2633
- "hasDynamicHelp": false,
2634
- "multiple": false,
2635
- "type": "option"
2636
- },
2637
- "api-name": {
2638
- "char": "n",
2639
- "name": "api-name",
2640
- "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
2641
- "hasDynamicHelp": false,
2642
- "multiple": false,
2643
- "type": "option"
2644
- }
2645
- },
2646
- "hasDynamicHelp": true,
2647
- "hiddenAliases": [],
2648
- "id": "agent:validate:authoring-bundle",
2649
- "pluginAlias": "@salesforce/plugin-agent",
2650
- "pluginName": "@salesforce/plugin-agent",
2651
- "pluginType": "core",
2652
- "strict": true,
2653
- "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
2654
- "enableJsonFlag": true,
2655
- "requiresProject": true,
2656
- "envVariablesSection": {
2657
- "header": "ENVIRONMENT VARIABLES",
2658
- "body": [
2659
- {
2660
- "name": "SF_TARGET_ORG",
2661
- "description": "Username or alias of your default org. Overrides the target-org configuration variable."
2662
- }
2663
- ]
2664
- },
2665
- "errorCodes": {
2666
- "header": "ERROR CODES",
2667
- "body": [
2668
- {
2669
- "name": "Succeeded (0)",
2670
- "description": "Agent Script file compiled successfully without errors."
2671
- },
2672
- {
2673
- "name": "Failed (1)",
2674
- "description": "Compilation errors found in the Agent Script file."
2675
- },
2676
- {
2677
- "name": "NotFound (2)",
2678
- "description": "Validation/compilation API returned HTTP 404. The API endpoint may not be available in your org or region."
2679
- },
2680
- {
2681
- "name": "ServerError (3)",
2682
- "description": "Validation/compilation API returned HTTP 500. A server error occurred during compilation."
2683
- }
2684
- ]
2685
- },
2686
- "FLAGGABLE_PROMPTS": {
2687
- "api-name": {
2688
- "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
2689
- "promptMessage": "API name of the authoring bundle to validate"
2690
- }
2691
- },
2692
- "isESM": true,
2693
- "relativePath": [
2694
- "lib",
2695
- "commands",
2696
- "agent",
2697
- "validate",
2698
- "authoring-bundle.js"
2699
- ],
2700
- "aliasPermutations": [],
2701
- "permutations": [
2702
- "agent:validate:authoring-bundle",
2703
- "validate:agent:authoring-bundle",
2704
- "validate:authoring-bundle:agent",
2705
- "agent:authoring-bundle:validate",
2706
- "authoring-bundle:agent:validate",
2707
- "authoring-bundle:validate:agent"
2708
- ]
2709
2744
  }
2710
2745
  },
2711
- "version": "1.38.1"
2746
+ "version": "1.39.0"
2712
2747
  }