@salesforce/plugin-agent 1.31.3 → 1.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -31
- package/lib/agentActivation.d.ts +15 -1
- package/lib/agentActivation.js +68 -13
- package/lib/agentActivation.js.map +1 -1
- package/lib/commands/agent/activate.d.ts +8 -2
- package/lib/commands/agent/activate.js +16 -4
- package/lib/commands/agent/activate.js.map +1 -1
- package/lib/commands/agent/deactivate.d.ts +4 -2
- package/lib/commands/agent/deactivate.js +5 -3
- package/lib/commands/agent/deactivate.js.map +1 -1
- package/lib/commands/agent/test/run-eval.d.ts +1 -0
- package/lib/commands/agent/test/run-eval.js +1 -0
- package/lib/commands/agent/test/run-eval.js.map +1 -1
- package/lib/evalNormalizer.js +11 -1
- package/lib/evalNormalizer.js.map +1 -1
- package/lib/yamlSpecTranslator.js +12 -2
- package/lib/yamlSpecTranslator.js.map +1 -1
- package/messages/agent.activate.md +12 -6
- package/messages/agent.activation.md +4 -0
- package/messages/agent.deactivate.md +2 -2
- package/messages/agent.generate.test-spec.md +2 -0
- package/messages/agent.test.run-eval.md +9 -5
- package/oclif.manifest.json +453 -445
- package/package.json +5 -5
- package/schemas/agent-activate.json +19 -0
- package/schemas/agent-deactivate.json +19 -0
- package/schemas/agent-test-run__eval.json +5 -1
package/oclif.manifest.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"agent:activate": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "Activating an agent makes it immediately available to your users.
|
|
6
|
+
"description": "Activating an agent makes it immediately available to your users. A published agent must be active before you can preview it with the \"agent preview\" CLI command or VS Code. Agents can have multiple versions; only one version can be active at a time.\n\nIf you run the command without the --api-name or --version flags, the command provides a list of agent API names and versions for you to choose from. Use the flags to specify the exact agent and version without being prompted. If you use the --json flag and not --version, then the latest agent version is automatically activated.\n\nThe value of the --version flag is always a number, corresponding to the \"vX\" part of the \"BotVersion\" metadata in your project. For example, if you have a force-app/main/default/bots/My_Agent/v4.botVersion-meta.xml file in your project, then you activate this version with the \"--version 4\" flag.",
|
|
7
7
|
"examples": [
|
|
8
|
-
"Activate an agent in your default target org by being prompted:\n<%= config.bin %> <%= command.id %>",
|
|
9
|
-
"Activate an agent with API name Resort_Manager in the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org"
|
|
8
|
+
"Activate an agent in your default target org by being prompted for both its API name and version:\n<%= config.bin %> <%= command.id %>",
|
|
9
|
+
"Activate version 2 of an agent with API name Resort_Manager in the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager --version 2 --target-org my-org"
|
|
10
10
|
],
|
|
11
11
|
"flags": {
|
|
12
12
|
"json": {
|
|
@@ -44,7 +44,14 @@
|
|
|
44
44
|
"api-name": {
|
|
45
45
|
"char": "n",
|
|
46
46
|
"name": "api-name",
|
|
47
|
-
"summary": "API name of the agent to activate.",
|
|
47
|
+
"summary": "API name of the agent to activate; if not specified, the command provides a list that you choose from.",
|
|
48
|
+
"hasDynamicHelp": false,
|
|
49
|
+
"multiple": false,
|
|
50
|
+
"type": "option"
|
|
51
|
+
},
|
|
52
|
+
"version": {
|
|
53
|
+
"name": "version",
|
|
54
|
+
"summary": "Version number of the agent to activate; if not specified, the command provides a list that you choose from.",
|
|
48
55
|
"hasDynamicHelp": false,
|
|
49
56
|
"multiple": false,
|
|
50
57
|
"type": "option"
|
|
@@ -176,7 +183,7 @@
|
|
|
176
183
|
"agent:deactivate": {
|
|
177
184
|
"aliases": [],
|
|
178
185
|
"args": {},
|
|
179
|
-
"description": "Deactivating an agent makes it unavailable to your users. To make changes to an agent, such as adding or removing topics or actions, you must deactivate it. You can't preview an agent with the \"agent preview\" CLI command or VS Code if it's deactivated.\n\
|
|
186
|
+
"description": "Deactivating an agent makes it unavailable to your users. To make changes to an agent, such as adding or removing topics or actions, you must deactivate it. You can't preview an agent with the \"agent preview\" CLI command or VS Code if it's deactivated.\n\nIf you run the command without the --api-name flag, the command provides a list of agent API names for you to choose from. Use the flag to specify the exact agent without being prompted.",
|
|
180
187
|
"examples": [
|
|
181
188
|
"Deactivate an agent in your default target org by being prompted:\n<%= config.bin %> <%= command.id %>",
|
|
182
189
|
"Deactivate the agent Resort_Manager in the org with alias \"my_org\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org"
|
|
@@ -217,7 +224,7 @@
|
|
|
217
224
|
"api-name": {
|
|
218
225
|
"char": "n",
|
|
219
226
|
"name": "api-name",
|
|
220
|
-
"summary": "API name of the agent to deactivate.",
|
|
227
|
+
"summary": "API name of the agent to deactivate; if not specified, the command provides a list that you choose from.",
|
|
221
228
|
"hasDynamicHelp": false,
|
|
222
229
|
"multiple": false,
|
|
223
230
|
"type": "option"
|
|
@@ -726,7 +733,7 @@
|
|
|
726
733
|
"agent:generate:test-spec": {
|
|
727
734
|
"aliases": [],
|
|
728
735
|
"args": {},
|
|
729
|
-
"description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n- (Optional) Custom evaluation: Test an agent's response for specific strings or numbers.\n- (Optional) Conversation history: Boilerplate for additional context you can add to the test in the form of a conversation history.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.\n\nIf you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag.",
|
|
736
|
+
"description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n- (Optional) Custom evaluation: Test an agent's response for specific strings or numbers.\n- (Optional) Conversation history: Boilerplate for additional context you can add to the test in the form of a conversation history.\n\nYou can manually add contextVariables to test cases in the generated YAML file to inject contextual data (such as CaseId or RoutableId) into agent sessions. This is useful for testing agent behavior with different contextual information.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.\n\nIf you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag.",
|
|
730
737
|
"examples": [
|
|
731
738
|
"Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
|
|
732
739
|
"Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without confirmation:\n<%= config.bin %> <%= command.id %> --output-file specs/Resort_Manager-new-version-testSpec.yaml --force-overwrite",
|
|
@@ -881,14 +888,14 @@
|
|
|
881
888
|
"authoring-bundle:publish:agent"
|
|
882
889
|
]
|
|
883
890
|
},
|
|
884
|
-
"agent:
|
|
891
|
+
"agent:test:create": {
|
|
885
892
|
"aliases": [],
|
|
886
893
|
"args": {},
|
|
887
|
-
"description": "
|
|
894
|
+
"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.",
|
|
888
895
|
"examples": [
|
|
889
|
-
"
|
|
890
|
-
"
|
|
891
|
-
"
|
|
896
|
+
"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 %>",
|
|
897
|
+
"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",
|
|
898
|
+
"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"
|
|
892
899
|
],
|
|
893
900
|
"flags": {
|
|
894
901
|
"json": {
|
|
@@ -906,6 +913,20 @@
|
|
|
906
913
|
"multiple": false,
|
|
907
914
|
"type": "option"
|
|
908
915
|
},
|
|
916
|
+
"api-name": {
|
|
917
|
+
"name": "api-name",
|
|
918
|
+
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
919
|
+
"hasDynamicHelp": false,
|
|
920
|
+
"multiple": false,
|
|
921
|
+
"type": "option"
|
|
922
|
+
},
|
|
923
|
+
"spec": {
|
|
924
|
+
"name": "spec",
|
|
925
|
+
"summary": "Path to the test spec YAML file.",
|
|
926
|
+
"hasDynamicHelp": false,
|
|
927
|
+
"multiple": false,
|
|
928
|
+
"type": "option"
|
|
929
|
+
},
|
|
909
930
|
"target-org": {
|
|
910
931
|
"char": "o",
|
|
911
932
|
"name": "target-org",
|
|
@@ -923,67 +944,53 @@
|
|
|
923
944
|
"multiple": false,
|
|
924
945
|
"type": "option"
|
|
925
946
|
},
|
|
926
|
-
"
|
|
927
|
-
"name": "
|
|
928
|
-
"
|
|
929
|
-
"
|
|
930
|
-
"
|
|
931
|
-
"multiple": false,
|
|
932
|
-
"type": "option"
|
|
933
|
-
},
|
|
934
|
-
"api-name": {
|
|
935
|
-
"char": "n",
|
|
936
|
-
"name": "api-name",
|
|
937
|
-
"summary": "API name of the activated published agent you want to preview.",
|
|
938
|
-
"hasDynamicHelp": false,
|
|
939
|
-
"multiple": false,
|
|
940
|
-
"type": "option"
|
|
947
|
+
"preview": {
|
|
948
|
+
"name": "preview",
|
|
949
|
+
"summary": "Preview the test metadata file (AiEvaluationDefinition) without deploying to your org.",
|
|
950
|
+
"allowNo": false,
|
|
951
|
+
"type": "boolean"
|
|
941
952
|
},
|
|
942
|
-
"
|
|
943
|
-
"name": "
|
|
944
|
-
"summary": "
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"type": "option"
|
|
953
|
+
"force-overwrite": {
|
|
954
|
+
"name": "force-overwrite",
|
|
955
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
956
|
+
"allowNo": false,
|
|
957
|
+
"type": "boolean"
|
|
948
958
|
}
|
|
949
959
|
},
|
|
950
960
|
"hasDynamicHelp": true,
|
|
951
961
|
"hiddenAliases": [],
|
|
952
|
-
"id": "agent:
|
|
962
|
+
"id": "agent:test:create",
|
|
953
963
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
954
964
|
"pluginName": "@salesforce/plugin-agent",
|
|
955
965
|
"pluginType": "core",
|
|
956
|
-
"state": "beta",
|
|
957
966
|
"strict": true,
|
|
958
|
-
"summary": "
|
|
967
|
+
"summary": "Create an agent test in your org using a local test spec YAML file.",
|
|
959
968
|
"enableJsonFlag": true,
|
|
960
|
-
"requiresProject": true,
|
|
961
969
|
"isESM": true,
|
|
962
970
|
"relativePath": [
|
|
963
971
|
"lib",
|
|
964
972
|
"commands",
|
|
965
973
|
"agent",
|
|
966
|
-
"
|
|
967
|
-
"
|
|
974
|
+
"test",
|
|
975
|
+
"create.js"
|
|
968
976
|
],
|
|
969
977
|
"aliasPermutations": [],
|
|
970
978
|
"permutations": [
|
|
971
|
-
"agent:
|
|
972
|
-
"
|
|
973
|
-
"
|
|
974
|
-
"agent:
|
|
975
|
-
"
|
|
976
|
-
"
|
|
979
|
+
"agent:test:create",
|
|
980
|
+
"test:agent:create",
|
|
981
|
+
"test:create:agent",
|
|
982
|
+
"agent:create:test",
|
|
983
|
+
"create:agent:test",
|
|
984
|
+
"create:test:agent"
|
|
977
985
|
]
|
|
978
986
|
},
|
|
979
|
-
"agent:
|
|
987
|
+
"agent:test:list": {
|
|
980
988
|
"aliases": [],
|
|
981
989
|
"args": {},
|
|
982
|
-
"description": "
|
|
990
|
+
"description": "The command outputs a table with the name (API name) of each test along with its unique ID and the date it was created in the org.",
|
|
983
991
|
"examples": [
|
|
984
|
-
"
|
|
985
|
-
"
|
|
986
|
-
"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"
|
|
992
|
+
"List the agent tests in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
993
|
+
"List the agent tests in an org with alias \"my-org\"\"\n<%= config.bin %> <%= command.id %> --target-org my-org"
|
|
987
994
|
],
|
|
988
995
|
"flags": {
|
|
989
996
|
"json": {
|
|
@@ -1017,75 +1024,43 @@
|
|
|
1017
1024
|
"hasDynamicHelp": false,
|
|
1018
1025
|
"multiple": false,
|
|
1019
1026
|
"type": "option"
|
|
1020
|
-
},
|
|
1021
|
-
"session-id": {
|
|
1022
|
-
"name": "session-id",
|
|
1023
|
-
"required": false,
|
|
1024
|
-
"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.",
|
|
1025
|
-
"hasDynamicHelp": false,
|
|
1026
|
-
"multiple": false,
|
|
1027
|
-
"type": "option"
|
|
1028
|
-
},
|
|
1029
|
-
"utterance": {
|
|
1030
|
-
"char": "u",
|
|
1031
|
-
"name": "utterance",
|
|
1032
|
-
"required": true,
|
|
1033
|
-
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1034
|
-
"hasDynamicHelp": false,
|
|
1035
|
-
"multiple": false,
|
|
1036
|
-
"type": "option"
|
|
1037
|
-
},
|
|
1038
|
-
"api-name": {
|
|
1039
|
-
"char": "n",
|
|
1040
|
-
"name": "api-name",
|
|
1041
|
-
"summary": "API name of the activated published agent you want to preview.",
|
|
1042
|
-
"hasDynamicHelp": false,
|
|
1043
|
-
"multiple": false,
|
|
1044
|
-
"type": "option"
|
|
1045
|
-
},
|
|
1046
|
-
"authoring-bundle": {
|
|
1047
|
-
"name": "authoring-bundle",
|
|
1048
|
-
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1049
|
-
"hasDynamicHelp": false,
|
|
1050
|
-
"multiple": false,
|
|
1051
|
-
"type": "option"
|
|
1052
1027
|
}
|
|
1053
1028
|
},
|
|
1054
1029
|
"hasDynamicHelp": true,
|
|
1055
1030
|
"hiddenAliases": [],
|
|
1056
|
-
"id": "agent:
|
|
1031
|
+
"id": "agent:test:list",
|
|
1057
1032
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1058
1033
|
"pluginName": "@salesforce/plugin-agent",
|
|
1059
1034
|
"pluginType": "core",
|
|
1060
|
-
"state": "beta",
|
|
1061
1035
|
"strict": true,
|
|
1062
|
-
"summary": "
|
|
1036
|
+
"summary": "List the available agent tests in your org.",
|
|
1063
1037
|
"enableJsonFlag": true,
|
|
1064
|
-
"requiresProject": true,
|
|
1065
1038
|
"isESM": true,
|
|
1066
1039
|
"relativePath": [
|
|
1067
1040
|
"lib",
|
|
1068
1041
|
"commands",
|
|
1069
1042
|
"agent",
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1043
|
+
"test",
|
|
1044
|
+
"list.js"
|
|
1072
1045
|
],
|
|
1073
1046
|
"aliasPermutations": [],
|
|
1074
1047
|
"permutations": [
|
|
1075
|
-
"agent:
|
|
1076
|
-
"
|
|
1077
|
-
"
|
|
1078
|
-
"agent:
|
|
1079
|
-
"
|
|
1080
|
-
"
|
|
1048
|
+
"agent:test:list",
|
|
1049
|
+
"test:agent:list",
|
|
1050
|
+
"test:list:agent",
|
|
1051
|
+
"agent:list:test",
|
|
1052
|
+
"list:agent:test",
|
|
1053
|
+
"list:test:agent"
|
|
1081
1054
|
]
|
|
1082
1055
|
},
|
|
1083
|
-
"agent:
|
|
1056
|
+
"agent:test:results": {
|
|
1084
1057
|
"aliases": [],
|
|
1085
1058
|
"args": {},
|
|
1086
|
-
"description": "This command
|
|
1059
|
+
"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.",
|
|
1087
1060
|
"examples": [
|
|
1088
|
-
"
|
|
1061
|
+
"Get the results of an agent test run in your default org using its job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1062
|
+
"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",
|
|
1063
|
+
"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"
|
|
1089
1064
|
],
|
|
1090
1065
|
"flags": {
|
|
1091
1066
|
"json": {
|
|
@@ -1102,45 +1077,99 @@
|
|
|
1102
1077
|
"hasDynamicHelp": false,
|
|
1103
1078
|
"multiple": false,
|
|
1104
1079
|
"type": "option"
|
|
1080
|
+
},
|
|
1081
|
+
"target-org": {
|
|
1082
|
+
"char": "o",
|
|
1083
|
+
"name": "target-org",
|
|
1084
|
+
"noCacheDefault": true,
|
|
1085
|
+
"required": true,
|
|
1086
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1087
|
+
"hasDynamicHelp": true,
|
|
1088
|
+
"multiple": false,
|
|
1089
|
+
"type": "option"
|
|
1090
|
+
},
|
|
1091
|
+
"api-version": {
|
|
1092
|
+
"description": "Override the api version used for api requests made by this command",
|
|
1093
|
+
"name": "api-version",
|
|
1094
|
+
"hasDynamicHelp": false,
|
|
1095
|
+
"multiple": false,
|
|
1096
|
+
"type": "option"
|
|
1097
|
+
},
|
|
1098
|
+
"job-id": {
|
|
1099
|
+
"char": "i",
|
|
1100
|
+
"name": "job-id",
|
|
1101
|
+
"required": true,
|
|
1102
|
+
"summary": "Job ID of the completed agent test run.",
|
|
1103
|
+
"hasDynamicHelp": false,
|
|
1104
|
+
"multiple": false,
|
|
1105
|
+
"type": "option"
|
|
1106
|
+
},
|
|
1107
|
+
"result-format": {
|
|
1108
|
+
"name": "result-format",
|
|
1109
|
+
"summary": "Format of the agent test run results.",
|
|
1110
|
+
"default": "human",
|
|
1111
|
+
"hasDynamicHelp": false,
|
|
1112
|
+
"multiple": false,
|
|
1113
|
+
"options": [
|
|
1114
|
+
"json",
|
|
1115
|
+
"human",
|
|
1116
|
+
"junit",
|
|
1117
|
+
"tap"
|
|
1118
|
+
],
|
|
1119
|
+
"type": "option"
|
|
1120
|
+
},
|
|
1121
|
+
"output-dir": {
|
|
1122
|
+
"char": "d",
|
|
1123
|
+
"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.",
|
|
1124
|
+
"name": "output-dir",
|
|
1125
|
+
"summary": "Directory to write the agent test results into.",
|
|
1126
|
+
"hasDynamicHelp": false,
|
|
1127
|
+
"multiple": false,
|
|
1128
|
+
"type": "option"
|
|
1129
|
+
},
|
|
1130
|
+
"verbose": {
|
|
1131
|
+
"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.",
|
|
1132
|
+
"name": "verbose",
|
|
1133
|
+
"summary": "Show generated data in the test results output.",
|
|
1134
|
+
"allowNo": false,
|
|
1135
|
+
"type": "boolean"
|
|
1105
1136
|
}
|
|
1106
1137
|
},
|
|
1107
|
-
"hasDynamicHelp":
|
|
1138
|
+
"hasDynamicHelp": true,
|
|
1108
1139
|
"hiddenAliases": [],
|
|
1109
|
-
"id": "agent:
|
|
1140
|
+
"id": "agent:test:results",
|
|
1110
1141
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1111
1142
|
"pluginName": "@salesforce/plugin-agent",
|
|
1112
1143
|
"pluginType": "core",
|
|
1113
|
-
"state": "beta",
|
|
1114
1144
|
"strict": true,
|
|
1115
|
-
"summary": "
|
|
1145
|
+
"summary": "Get the results of a completed agent test run.",
|
|
1116
1146
|
"enableJsonFlag": true,
|
|
1117
|
-
"requiresProject": true,
|
|
1118
1147
|
"isESM": true,
|
|
1119
1148
|
"relativePath": [
|
|
1120
1149
|
"lib",
|
|
1121
1150
|
"commands",
|
|
1122
1151
|
"agent",
|
|
1123
|
-
"
|
|
1124
|
-
"
|
|
1152
|
+
"test",
|
|
1153
|
+
"results.js"
|
|
1125
1154
|
],
|
|
1126
1155
|
"aliasPermutations": [],
|
|
1127
1156
|
"permutations": [
|
|
1128
|
-
"agent:
|
|
1129
|
-
"
|
|
1130
|
-
"
|
|
1131
|
-
"agent:
|
|
1132
|
-
"
|
|
1133
|
-
"
|
|
1157
|
+
"agent:test:results",
|
|
1158
|
+
"test:agent:results",
|
|
1159
|
+
"test:results:agent",
|
|
1160
|
+
"agent:results:test",
|
|
1161
|
+
"results:agent:test",
|
|
1162
|
+
"results:test:agent"
|
|
1134
1163
|
]
|
|
1135
1164
|
},
|
|
1136
|
-
"agent:
|
|
1165
|
+
"agent:test:resume": {
|
|
1137
1166
|
"aliases": [],
|
|
1138
1167
|
"args": {},
|
|
1139
|
-
"description": "This command
|
|
1168
|
+
"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.",
|
|
1140
1169
|
"examples": [
|
|
1141
|
-
"
|
|
1142
|
-
"
|
|
1143
|
-
"
|
|
1170
|
+
"Resume an agent test in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
1171
|
+
"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",
|
|
1172
|
+
"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"
|
|
1144
1173
|
],
|
|
1145
1174
|
"flags": {
|
|
1146
1175
|
"json": {
|
|
@@ -1175,134 +1204,69 @@
|
|
|
1175
1204
|
"multiple": false,
|
|
1176
1205
|
"type": "option"
|
|
1177
1206
|
},
|
|
1178
|
-
"
|
|
1179
|
-
"char": "
|
|
1180
|
-
"name": "
|
|
1181
|
-
"summary": "
|
|
1207
|
+
"job-id": {
|
|
1208
|
+
"char": "i",
|
|
1209
|
+
"name": "job-id",
|
|
1210
|
+
"summary": "Job ID of the original agent test run.",
|
|
1182
1211
|
"hasDynamicHelp": false,
|
|
1183
1212
|
"multiple": false,
|
|
1184
1213
|
"type": "option"
|
|
1185
1214
|
},
|
|
1186
|
-
"
|
|
1187
|
-
"
|
|
1188
|
-
"
|
|
1189
|
-
"
|
|
1190
|
-
"multiple": false,
|
|
1191
|
-
"type": "option"
|
|
1192
|
-
},
|
|
1193
|
-
"use-live-actions": {
|
|
1194
|
-
"name": "use-live-actions",
|
|
1195
|
-
"summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
|
|
1196
|
-
"allowNo": false,
|
|
1197
|
-
"type": "boolean"
|
|
1198
|
-
}
|
|
1199
|
-
},
|
|
1200
|
-
"hasDynamicHelp": true,
|
|
1201
|
-
"hiddenAliases": [],
|
|
1202
|
-
"id": "agent:preview:start",
|
|
1203
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1204
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1205
|
-
"pluginType": "core",
|
|
1206
|
-
"state": "beta",
|
|
1207
|
-
"strict": true,
|
|
1208
|
-
"summary": "Start a programmatic agent preview session.",
|
|
1209
|
-
"enableJsonFlag": true,
|
|
1210
|
-
"requiresProject": true,
|
|
1211
|
-
"isESM": true,
|
|
1212
|
-
"relativePath": [
|
|
1213
|
-
"lib",
|
|
1214
|
-
"commands",
|
|
1215
|
-
"agent",
|
|
1216
|
-
"preview",
|
|
1217
|
-
"start.js"
|
|
1218
|
-
],
|
|
1219
|
-
"aliasPermutations": [],
|
|
1220
|
-
"permutations": [
|
|
1221
|
-
"agent:preview:start",
|
|
1222
|
-
"preview:agent:start",
|
|
1223
|
-
"preview:start:agent",
|
|
1224
|
-
"agent:start:preview",
|
|
1225
|
-
"start:agent:preview",
|
|
1226
|
-
"start:preview:agent"
|
|
1227
|
-
]
|
|
1228
|
-
},
|
|
1229
|
-
"agent:test:create": {
|
|
1230
|
-
"aliases": [],
|
|
1231
|
-
"args": {},
|
|
1232
|
-
"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.",
|
|
1233
|
-
"examples": [
|
|
1234
|
-
"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 %>",
|
|
1235
|
-
"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",
|
|
1236
|
-
"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"
|
|
1237
|
-
],
|
|
1238
|
-
"flags": {
|
|
1239
|
-
"json": {
|
|
1240
|
-
"description": "Format output as json.",
|
|
1241
|
-
"helpGroup": "GLOBAL",
|
|
1242
|
-
"name": "json",
|
|
1215
|
+
"use-most-recent": {
|
|
1216
|
+
"char": "r",
|
|
1217
|
+
"name": "use-most-recent",
|
|
1218
|
+
"summary": "Use the job ID of the most recent agent test run.",
|
|
1243
1219
|
"allowNo": false,
|
|
1244
1220
|
"type": "boolean"
|
|
1245
1221
|
},
|
|
1246
|
-
"
|
|
1247
|
-
"
|
|
1248
|
-
"name": "
|
|
1249
|
-
"summary": "
|
|
1250
|
-
"
|
|
1251
|
-
"
|
|
1252
|
-
"type": "option"
|
|
1253
|
-
},
|
|
1254
|
-
"api-name": {
|
|
1255
|
-
"name": "api-name",
|
|
1256
|
-
"summary": "API name of the new test; the API name must not exist in the org.",
|
|
1257
|
-
"hasDynamicHelp": false,
|
|
1222
|
+
"wait": {
|
|
1223
|
+
"char": "w",
|
|
1224
|
+
"name": "wait",
|
|
1225
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1226
|
+
"default": "5 minutes",
|
|
1227
|
+
"hasDynamicHelp": true,
|
|
1258
1228
|
"multiple": false,
|
|
1259
1229
|
"type": "option"
|
|
1260
1230
|
},
|
|
1261
|
-
"
|
|
1262
|
-
"name": "
|
|
1263
|
-
"summary": "
|
|
1231
|
+
"result-format": {
|
|
1232
|
+
"name": "result-format",
|
|
1233
|
+
"summary": "Format of the agent test run results.",
|
|
1234
|
+
"default": "human",
|
|
1264
1235
|
"hasDynamicHelp": false,
|
|
1265
1236
|
"multiple": false,
|
|
1237
|
+
"options": [
|
|
1238
|
+
"json",
|
|
1239
|
+
"human",
|
|
1240
|
+
"junit",
|
|
1241
|
+
"tap"
|
|
1242
|
+
],
|
|
1266
1243
|
"type": "option"
|
|
1267
1244
|
},
|
|
1268
|
-
"
|
|
1269
|
-
"char": "
|
|
1270
|
-
"
|
|
1271
|
-
"
|
|
1272
|
-
"
|
|
1273
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1274
|
-
"hasDynamicHelp": true,
|
|
1275
|
-
"multiple": false,
|
|
1276
|
-
"type": "option"
|
|
1277
|
-
},
|
|
1278
|
-
"api-version": {
|
|
1279
|
-
"description": "Override the api version used for api requests made by this command",
|
|
1280
|
-
"name": "api-version",
|
|
1245
|
+
"output-dir": {
|
|
1246
|
+
"char": "d",
|
|
1247
|
+
"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.",
|
|
1248
|
+
"name": "output-dir",
|
|
1249
|
+
"summary": "Directory to write the agent test results into.",
|
|
1281
1250
|
"hasDynamicHelp": false,
|
|
1282
1251
|
"multiple": false,
|
|
1283
1252
|
"type": "option"
|
|
1284
1253
|
},
|
|
1285
|
-
"
|
|
1286
|
-
"
|
|
1287
|
-
"
|
|
1288
|
-
"
|
|
1289
|
-
"type": "boolean"
|
|
1290
|
-
},
|
|
1291
|
-
"force-overwrite": {
|
|
1292
|
-
"name": "force-overwrite",
|
|
1293
|
-
"summary": "Don't prompt for confirmation when overwriting an existing test (based on API name) in your org.",
|
|
1254
|
+
"verbose": {
|
|
1255
|
+
"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.",
|
|
1256
|
+
"name": "verbose",
|
|
1257
|
+
"summary": "Show generated data in the test results output.",
|
|
1294
1258
|
"allowNo": false,
|
|
1295
1259
|
"type": "boolean"
|
|
1296
1260
|
}
|
|
1297
1261
|
},
|
|
1298
1262
|
"hasDynamicHelp": true,
|
|
1299
1263
|
"hiddenAliases": [],
|
|
1300
|
-
"id": "agent:test:
|
|
1264
|
+
"id": "agent:test:resume",
|
|
1301
1265
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1302
1266
|
"pluginName": "@salesforce/plugin-agent",
|
|
1303
1267
|
"pluginType": "core",
|
|
1304
1268
|
"strict": true,
|
|
1305
|
-
"summary": "
|
|
1269
|
+
"summary": "Resume an agent test that you previously started in your org so you can view the test results.",
|
|
1306
1270
|
"enableJsonFlag": true,
|
|
1307
1271
|
"isESM": true,
|
|
1308
1272
|
"relativePath": [
|
|
@@ -1310,25 +1274,29 @@
|
|
|
1310
1274
|
"commands",
|
|
1311
1275
|
"agent",
|
|
1312
1276
|
"test",
|
|
1313
|
-
"
|
|
1277
|
+
"resume.js"
|
|
1314
1278
|
],
|
|
1315
1279
|
"aliasPermutations": [],
|
|
1316
1280
|
"permutations": [
|
|
1317
|
-
"agent:test:
|
|
1318
|
-
"test:agent:
|
|
1319
|
-
"test:
|
|
1320
|
-
"agent:
|
|
1321
|
-
"
|
|
1322
|
-
"
|
|
1281
|
+
"agent:test:resume",
|
|
1282
|
+
"test:agent:resume",
|
|
1283
|
+
"test:resume:agent",
|
|
1284
|
+
"agent:resume:test",
|
|
1285
|
+
"resume:agent:test",
|
|
1286
|
+
"resume:test:agent"
|
|
1323
1287
|
]
|
|
1324
1288
|
},
|
|
1325
|
-
"agent:test:
|
|
1289
|
+
"agent:test:run-eval": {
|
|
1326
1290
|
"aliases": [],
|
|
1327
1291
|
"args": {},
|
|
1328
|
-
"description": "
|
|
1292
|
+
"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.",
|
|
1329
1293
|
"examples": [
|
|
1330
|
-
"
|
|
1331
|
-
"
|
|
1294
|
+
"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",
|
|
1295
|
+
"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",
|
|
1296
|
+
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org",
|
|
1297
|
+
"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",
|
|
1298
|
+
"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",
|
|
1299
|
+
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
1332
1300
|
],
|
|
1333
1301
|
"flags": {
|
|
1334
1302
|
"json": {
|
|
@@ -1362,16 +1330,72 @@
|
|
|
1362
1330
|
"hasDynamicHelp": false,
|
|
1363
1331
|
"multiple": false,
|
|
1364
1332
|
"type": "option"
|
|
1333
|
+
},
|
|
1334
|
+
"spec": {
|
|
1335
|
+
"char": "s",
|
|
1336
|
+
"name": "spec",
|
|
1337
|
+
"required": true,
|
|
1338
|
+
"summary": "Path to test spec file (YAML or JSON). Supports reading from stdin when piping content.",
|
|
1339
|
+
"hasDynamicHelp": false,
|
|
1340
|
+
"multiple": false,
|
|
1341
|
+
"type": "option"
|
|
1342
|
+
},
|
|
1343
|
+
"api-name": {
|
|
1344
|
+
"char": "n",
|
|
1345
|
+
"name": "api-name",
|
|
1346
|
+
"summary": "Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
1347
|
+
"hasDynamicHelp": false,
|
|
1348
|
+
"multiple": false,
|
|
1349
|
+
"type": "option"
|
|
1350
|
+
},
|
|
1351
|
+
"wait": {
|
|
1352
|
+
"char": "w",
|
|
1353
|
+
"name": "wait",
|
|
1354
|
+
"summary": "Number of minutes to wait for results.",
|
|
1355
|
+
"default": 10,
|
|
1356
|
+
"hasDynamicHelp": false,
|
|
1357
|
+
"multiple": false,
|
|
1358
|
+
"type": "option"
|
|
1359
|
+
},
|
|
1360
|
+
"result-format": {
|
|
1361
|
+
"name": "result-format",
|
|
1362
|
+
"summary": "Format of the agent test run results.",
|
|
1363
|
+
"default": "human",
|
|
1364
|
+
"hasDynamicHelp": false,
|
|
1365
|
+
"multiple": false,
|
|
1366
|
+
"options": [
|
|
1367
|
+
"json",
|
|
1368
|
+
"human",
|
|
1369
|
+
"junit",
|
|
1370
|
+
"tap"
|
|
1371
|
+
],
|
|
1372
|
+
"type": "option"
|
|
1373
|
+
},
|
|
1374
|
+
"batch-size": {
|
|
1375
|
+
"name": "batch-size",
|
|
1376
|
+
"summary": "Number of tests per API request (max 5).",
|
|
1377
|
+
"default": 5,
|
|
1378
|
+
"hasDynamicHelp": false,
|
|
1379
|
+
"multiple": false,
|
|
1380
|
+
"type": "option"
|
|
1381
|
+
},
|
|
1382
|
+
"no-normalize": {
|
|
1383
|
+
"name": "no-normalize",
|
|
1384
|
+
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1385
|
+
"allowNo": false,
|
|
1386
|
+
"type": "boolean"
|
|
1365
1387
|
}
|
|
1366
1388
|
},
|
|
1367
1389
|
"hasDynamicHelp": true,
|
|
1390
|
+
"hidden": true,
|
|
1368
1391
|
"hiddenAliases": [],
|
|
1369
|
-
"id": "agent:test:
|
|
1392
|
+
"id": "agent:test:run-eval",
|
|
1370
1393
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1371
1394
|
"pluginName": "@salesforce/plugin-agent",
|
|
1372
1395
|
"pluginType": "core",
|
|
1396
|
+
"state": "beta",
|
|
1373
1397
|
"strict": true,
|
|
1374
|
-
"summary": "
|
|
1398
|
+
"summary": "Run evaluation tests against an Agentforce agent.",
|
|
1375
1399
|
"enableJsonFlag": true,
|
|
1376
1400
|
"isESM": true,
|
|
1377
1401
|
"relativePath": [
|
|
@@ -1379,26 +1403,26 @@
|
|
|
1379
1403
|
"commands",
|
|
1380
1404
|
"agent",
|
|
1381
1405
|
"test",
|
|
1382
|
-
"
|
|
1406
|
+
"run-eval.js"
|
|
1383
1407
|
],
|
|
1384
1408
|
"aliasPermutations": [],
|
|
1385
1409
|
"permutations": [
|
|
1386
|
-
"agent:test:
|
|
1387
|
-
"test:agent:
|
|
1388
|
-
"test:
|
|
1389
|
-
"agent:
|
|
1390
|
-
"
|
|
1391
|
-
"
|
|
1410
|
+
"agent:test:run-eval",
|
|
1411
|
+
"test:agent:run-eval",
|
|
1412
|
+
"test:run-eval:agent",
|
|
1413
|
+
"agent:run-eval:test",
|
|
1414
|
+
"run-eval:agent:test",
|
|
1415
|
+
"run-eval:test:agent"
|
|
1392
1416
|
]
|
|
1393
1417
|
},
|
|
1394
|
-
"agent:test:
|
|
1418
|
+
"agent:test:run": {
|
|
1395
1419
|
"aliases": [],
|
|
1396
1420
|
"args": {},
|
|
1397
|
-
"description": "
|
|
1421
|
+
"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.",
|
|
1398
1422
|
"examples": [
|
|
1399
|
-
"
|
|
1400
|
-
"
|
|
1401
|
-
"
|
|
1423
|
+
"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",
|
|
1424
|
+
"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",
|
|
1425
|
+
"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"
|
|
1402
1426
|
],
|
|
1403
1427
|
"flags": {
|
|
1404
1428
|
"json": {
|
|
@@ -1433,15 +1457,22 @@
|
|
|
1433
1457
|
"multiple": false,
|
|
1434
1458
|
"type": "option"
|
|
1435
1459
|
},
|
|
1436
|
-
"
|
|
1437
|
-
"char": "
|
|
1438
|
-
"name": "
|
|
1439
|
-
"
|
|
1440
|
-
"summary": "Job ID of the completed agent test run.",
|
|
1460
|
+
"api-name": {
|
|
1461
|
+
"char": "n",
|
|
1462
|
+
"name": "api-name",
|
|
1463
|
+
"summary": "API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.",
|
|
1441
1464
|
"hasDynamicHelp": false,
|
|
1442
1465
|
"multiple": false,
|
|
1443
1466
|
"type": "option"
|
|
1444
1467
|
},
|
|
1468
|
+
"wait": {
|
|
1469
|
+
"char": "w",
|
|
1470
|
+
"name": "wait",
|
|
1471
|
+
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1472
|
+
"hasDynamicHelp": true,
|
|
1473
|
+
"multiple": false,
|
|
1474
|
+
"type": "option"
|
|
1475
|
+
},
|
|
1445
1476
|
"result-format": {
|
|
1446
1477
|
"name": "result-format",
|
|
1447
1478
|
"summary": "Format of the agent test run results.",
|
|
@@ -1475,12 +1506,12 @@
|
|
|
1475
1506
|
},
|
|
1476
1507
|
"hasDynamicHelp": true,
|
|
1477
1508
|
"hiddenAliases": [],
|
|
1478
|
-
"id": "agent:test:
|
|
1509
|
+
"id": "agent:test:run",
|
|
1479
1510
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1480
1511
|
"pluginName": "@salesforce/plugin-agent",
|
|
1481
1512
|
"pluginType": "core",
|
|
1482
1513
|
"strict": true,
|
|
1483
|
-
"summary": "
|
|
1514
|
+
"summary": "Start an agent test in your org.",
|
|
1484
1515
|
"enableJsonFlag": true,
|
|
1485
1516
|
"isESM": true,
|
|
1486
1517
|
"relativePath": [
|
|
@@ -1488,26 +1519,25 @@
|
|
|
1488
1519
|
"commands",
|
|
1489
1520
|
"agent",
|
|
1490
1521
|
"test",
|
|
1491
|
-
"
|
|
1522
|
+
"run.js"
|
|
1492
1523
|
],
|
|
1493
1524
|
"aliasPermutations": [],
|
|
1494
1525
|
"permutations": [
|
|
1495
|
-
"agent:test:
|
|
1496
|
-
"test:agent:
|
|
1497
|
-
"test:
|
|
1498
|
-
"agent:
|
|
1499
|
-
"
|
|
1500
|
-
"
|
|
1526
|
+
"agent:test:run",
|
|
1527
|
+
"test:agent:run",
|
|
1528
|
+
"test:run:agent",
|
|
1529
|
+
"agent:run:test",
|
|
1530
|
+
"run:agent:test",
|
|
1531
|
+
"run:test:agent"
|
|
1501
1532
|
]
|
|
1502
1533
|
},
|
|
1503
|
-
"agent:
|
|
1534
|
+
"agent:validate:authoring-bundle": {
|
|
1504
1535
|
"aliases": [],
|
|
1505
1536
|
"args": {},
|
|
1506
|
-
"description": "
|
|
1537
|
+
"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.",
|
|
1507
1538
|
"examples": [
|
|
1508
|
-
"
|
|
1509
|
-
"
|
|
1510
|
-
"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"
|
|
1539
|
+
"Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1540
|
+
"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"
|
|
1511
1541
|
],
|
|
1512
1542
|
"flags": {
|
|
1513
1543
|
"json": {
|
|
@@ -1542,98 +1572,57 @@
|
|
|
1542
1572
|
"multiple": false,
|
|
1543
1573
|
"type": "option"
|
|
1544
1574
|
},
|
|
1545
|
-
"
|
|
1546
|
-
"char": "
|
|
1547
|
-
"name": "
|
|
1548
|
-
"summary": "
|
|
1549
|
-
"hasDynamicHelp": false,
|
|
1550
|
-
"multiple": false,
|
|
1551
|
-
"type": "option"
|
|
1552
|
-
},
|
|
1553
|
-
"use-most-recent": {
|
|
1554
|
-
"char": "r",
|
|
1555
|
-
"name": "use-most-recent",
|
|
1556
|
-
"summary": "Use the job ID of the most recent agent test run.",
|
|
1557
|
-
"allowNo": false,
|
|
1558
|
-
"type": "boolean"
|
|
1559
|
-
},
|
|
1560
|
-
"wait": {
|
|
1561
|
-
"char": "w",
|
|
1562
|
-
"name": "wait",
|
|
1563
|
-
"summary": "Number of minutes to wait for the command to complete and display results to the terminal window.",
|
|
1564
|
-
"default": "5 minutes",
|
|
1565
|
-
"hasDynamicHelp": true,
|
|
1566
|
-
"multiple": false,
|
|
1567
|
-
"type": "option"
|
|
1568
|
-
},
|
|
1569
|
-
"result-format": {
|
|
1570
|
-
"name": "result-format",
|
|
1571
|
-
"summary": "Format of the agent test run results.",
|
|
1572
|
-
"default": "human",
|
|
1573
|
-
"hasDynamicHelp": false,
|
|
1574
|
-
"multiple": false,
|
|
1575
|
-
"options": [
|
|
1576
|
-
"json",
|
|
1577
|
-
"human",
|
|
1578
|
-
"junit",
|
|
1579
|
-
"tap"
|
|
1580
|
-
],
|
|
1581
|
-
"type": "option"
|
|
1582
|
-
},
|
|
1583
|
-
"output-dir": {
|
|
1584
|
-
"char": "d",
|
|
1585
|
-
"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.",
|
|
1586
|
-
"name": "output-dir",
|
|
1587
|
-
"summary": "Directory to write the agent test results into.",
|
|
1575
|
+
"api-name": {
|
|
1576
|
+
"char": "n",
|
|
1577
|
+
"name": "api-name",
|
|
1578
|
+
"summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1588
1579
|
"hasDynamicHelp": false,
|
|
1589
1580
|
"multiple": false,
|
|
1590
1581
|
"type": "option"
|
|
1591
|
-
},
|
|
1592
|
-
"verbose": {
|
|
1593
|
-
"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.",
|
|
1594
|
-
"name": "verbose",
|
|
1595
|
-
"summary": "Show generated data in the test results output.",
|
|
1596
|
-
"allowNo": false,
|
|
1597
|
-
"type": "boolean"
|
|
1598
1582
|
}
|
|
1599
1583
|
},
|
|
1600
1584
|
"hasDynamicHelp": true,
|
|
1601
1585
|
"hiddenAliases": [],
|
|
1602
|
-
"id": "agent:
|
|
1586
|
+
"id": "agent:validate:authoring-bundle",
|
|
1603
1587
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1604
1588
|
"pluginName": "@salesforce/plugin-agent",
|
|
1605
1589
|
"pluginType": "core",
|
|
1606
1590
|
"strict": true,
|
|
1607
|
-
"summary": "
|
|
1591
|
+
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
1608
1592
|
"enableJsonFlag": true,
|
|
1593
|
+
"requiresProject": true,
|
|
1594
|
+
"FLAGGABLE_PROMPTS": {
|
|
1595
|
+
"api-name": {
|
|
1596
|
+
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1597
|
+
"promptMessage": "API name of the authoring bundle to validate"
|
|
1598
|
+
}
|
|
1599
|
+
},
|
|
1609
1600
|
"isESM": true,
|
|
1610
1601
|
"relativePath": [
|
|
1611
1602
|
"lib",
|
|
1612
1603
|
"commands",
|
|
1613
1604
|
"agent",
|
|
1614
|
-
"
|
|
1615
|
-
"
|
|
1605
|
+
"validate",
|
|
1606
|
+
"authoring-bundle.js"
|
|
1616
1607
|
],
|
|
1617
1608
|
"aliasPermutations": [],
|
|
1618
1609
|
"permutations": [
|
|
1619
|
-
"agent:
|
|
1620
|
-
"
|
|
1621
|
-
"
|
|
1622
|
-
"agent:
|
|
1623
|
-
"
|
|
1624
|
-
"
|
|
1610
|
+
"agent:validate:authoring-bundle",
|
|
1611
|
+
"validate:agent:authoring-bundle",
|
|
1612
|
+
"validate:authoring-bundle:agent",
|
|
1613
|
+
"agent:authoring-bundle:validate",
|
|
1614
|
+
"authoring-bundle:agent:validate",
|
|
1615
|
+
"authoring-bundle:validate:agent"
|
|
1625
1616
|
]
|
|
1626
1617
|
},
|
|
1627
|
-
"agent:
|
|
1618
|
+
"agent:preview:end": {
|
|
1628
1619
|
"aliases": [],
|
|
1629
|
-
"args": {},
|
|
1630
|
-
"description": "
|
|
1631
|
-
"examples": [
|
|
1632
|
-
"
|
|
1633
|
-
"
|
|
1634
|
-
"
|
|
1635
|
-
"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",
|
|
1636
|
-
"Pipe JSON payload from stdin:\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec - --target-org my-org"
|
|
1620
|
+
"args": {},
|
|
1621
|
+
"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.",
|
|
1622
|
+
"examples": [
|
|
1623
|
+
"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",
|
|
1624
|
+
"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",
|
|
1625
|
+
"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"
|
|
1637
1626
|
],
|
|
1638
1627
|
"flags": {
|
|
1639
1628
|
"json": {
|
|
@@ -1668,11 +1657,10 @@
|
|
|
1668
1657
|
"multiple": false,
|
|
1669
1658
|
"type": "option"
|
|
1670
1659
|
},
|
|
1671
|
-
"
|
|
1672
|
-
"
|
|
1673
|
-
"
|
|
1674
|
-
"
|
|
1675
|
-
"summary": "Path to test spec file (YAML or JSON). Use `-` for stdin.",
|
|
1660
|
+
"session-id": {
|
|
1661
|
+
"name": "session-id",
|
|
1662
|
+
"required": false,
|
|
1663
|
+
"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.",
|
|
1676
1664
|
"hasDynamicHelp": false,
|
|
1677
1665
|
"multiple": false,
|
|
1678
1666
|
"type": "option"
|
|
@@ -1680,86 +1668,56 @@
|
|
|
1680
1668
|
"api-name": {
|
|
1681
1669
|
"char": "n",
|
|
1682
1670
|
"name": "api-name",
|
|
1683
|
-
"summary": "
|
|
1684
|
-
"hasDynamicHelp": false,
|
|
1685
|
-
"multiple": false,
|
|
1686
|
-
"type": "option"
|
|
1687
|
-
},
|
|
1688
|
-
"wait": {
|
|
1689
|
-
"char": "w",
|
|
1690
|
-
"name": "wait",
|
|
1691
|
-
"summary": "Number of minutes to wait for results.",
|
|
1692
|
-
"default": 10,
|
|
1693
|
-
"hasDynamicHelp": false,
|
|
1694
|
-
"multiple": false,
|
|
1695
|
-
"type": "option"
|
|
1696
|
-
},
|
|
1697
|
-
"result-format": {
|
|
1698
|
-
"name": "result-format",
|
|
1699
|
-
"summary": "Format of the agent test run results.",
|
|
1700
|
-
"default": "human",
|
|
1671
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1701
1672
|
"hasDynamicHelp": false,
|
|
1702
1673
|
"multiple": false,
|
|
1703
|
-
"options": [
|
|
1704
|
-
"json",
|
|
1705
|
-
"human",
|
|
1706
|
-
"junit",
|
|
1707
|
-
"tap"
|
|
1708
|
-
],
|
|
1709
1674
|
"type": "option"
|
|
1710
1675
|
},
|
|
1711
|
-
"
|
|
1712
|
-
"name": "
|
|
1713
|
-
"summary": "
|
|
1714
|
-
"default": 5,
|
|
1676
|
+
"authoring-bundle": {
|
|
1677
|
+
"name": "authoring-bundle",
|
|
1678
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1715
1679
|
"hasDynamicHelp": false,
|
|
1716
1680
|
"multiple": false,
|
|
1717
1681
|
"type": "option"
|
|
1718
|
-
},
|
|
1719
|
-
"no-normalize": {
|
|
1720
|
-
"name": "no-normalize",
|
|
1721
|
-
"summary": "Disable auto-normalization of field names and shorthand references.",
|
|
1722
|
-
"allowNo": false,
|
|
1723
|
-
"type": "boolean"
|
|
1724
1682
|
}
|
|
1725
1683
|
},
|
|
1726
1684
|
"hasDynamicHelp": true,
|
|
1727
|
-
"hidden": true,
|
|
1728
1685
|
"hiddenAliases": [],
|
|
1729
|
-
"id": "agent:
|
|
1686
|
+
"id": "agent:preview:end",
|
|
1730
1687
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1731
1688
|
"pluginName": "@salesforce/plugin-agent",
|
|
1732
1689
|
"pluginType": "core",
|
|
1733
1690
|
"state": "beta",
|
|
1734
1691
|
"strict": true,
|
|
1735
|
-
"summary": "
|
|
1692
|
+
"summary": "End an existing programmatic agent preview session and get trace location.",
|
|
1736
1693
|
"enableJsonFlag": true,
|
|
1694
|
+
"requiresProject": true,
|
|
1737
1695
|
"isESM": true,
|
|
1738
1696
|
"relativePath": [
|
|
1739
1697
|
"lib",
|
|
1740
1698
|
"commands",
|
|
1741
1699
|
"agent",
|
|
1742
|
-
"
|
|
1743
|
-
"
|
|
1700
|
+
"preview",
|
|
1701
|
+
"end.js"
|
|
1744
1702
|
],
|
|
1745
1703
|
"aliasPermutations": [],
|
|
1746
1704
|
"permutations": [
|
|
1747
|
-
"agent:
|
|
1748
|
-
"
|
|
1749
|
-
"
|
|
1750
|
-
"agent:
|
|
1751
|
-
"
|
|
1752
|
-
"
|
|
1705
|
+
"agent:preview:end",
|
|
1706
|
+
"preview:agent:end",
|
|
1707
|
+
"preview:end:agent",
|
|
1708
|
+
"agent:end:preview",
|
|
1709
|
+
"end:agent:preview",
|
|
1710
|
+
"end:preview:agent"
|
|
1753
1711
|
]
|
|
1754
1712
|
},
|
|
1755
|
-
"agent:
|
|
1713
|
+
"agent:preview:send": {
|
|
1756
1714
|
"aliases": [],
|
|
1757
1715
|
"args": {},
|
|
1758
|
-
"description": "
|
|
1716
|
+
"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.",
|
|
1759
1717
|
"examples": [
|
|
1760
|
-
"
|
|
1761
|
-
"
|
|
1762
|
-
"
|
|
1718
|
+
"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>",
|
|
1719
|
+
"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",
|
|
1720
|
+
"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"
|
|
1763
1721
|
],
|
|
1764
1722
|
"flags": {
|
|
1765
1723
|
"json": {
|
|
@@ -1794,87 +1752,129 @@
|
|
|
1794
1752
|
"multiple": false,
|
|
1795
1753
|
"type": "option"
|
|
1796
1754
|
},
|
|
1797
|
-
"
|
|
1798
|
-
"
|
|
1799
|
-
"
|
|
1800
|
-
"summary": "
|
|
1755
|
+
"session-id": {
|
|
1756
|
+
"name": "session-id",
|
|
1757
|
+
"required": false,
|
|
1758
|
+
"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.",
|
|
1801
1759
|
"hasDynamicHelp": false,
|
|
1802
1760
|
"multiple": false,
|
|
1803
1761
|
"type": "option"
|
|
1804
1762
|
},
|
|
1805
|
-
"
|
|
1806
|
-
"char": "
|
|
1807
|
-
"name": "
|
|
1808
|
-
"
|
|
1809
|
-
"
|
|
1763
|
+
"utterance": {
|
|
1764
|
+
"char": "u",
|
|
1765
|
+
"name": "utterance",
|
|
1766
|
+
"required": true,
|
|
1767
|
+
"summary": "Utterance to send to the agent, enclosed in double quotes.",
|
|
1768
|
+
"hasDynamicHelp": false,
|
|
1810
1769
|
"multiple": false,
|
|
1811
1770
|
"type": "option"
|
|
1812
1771
|
},
|
|
1813
|
-
"
|
|
1814
|
-
"
|
|
1815
|
-
"
|
|
1816
|
-
"
|
|
1772
|
+
"api-name": {
|
|
1773
|
+
"char": "n",
|
|
1774
|
+
"name": "api-name",
|
|
1775
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1817
1776
|
"hasDynamicHelp": false,
|
|
1818
1777
|
"multiple": false,
|
|
1819
|
-
"options": [
|
|
1820
|
-
"json",
|
|
1821
|
-
"human",
|
|
1822
|
-
"junit",
|
|
1823
|
-
"tap"
|
|
1824
|
-
],
|
|
1825
1778
|
"type": "option"
|
|
1826
1779
|
},
|
|
1827
|
-
"
|
|
1828
|
-
"
|
|
1829
|
-
"
|
|
1830
|
-
"name": "output-dir",
|
|
1831
|
-
"summary": "Directory to write the agent test results into.",
|
|
1780
|
+
"authoring-bundle": {
|
|
1781
|
+
"name": "authoring-bundle",
|
|
1782
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1832
1783
|
"hasDynamicHelp": false,
|
|
1833
1784
|
"multiple": false,
|
|
1834
1785
|
"type": "option"
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
"hasDynamicHelp": true,
|
|
1789
|
+
"hiddenAliases": [],
|
|
1790
|
+
"id": "agent:preview:send",
|
|
1791
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
1792
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
1793
|
+
"pluginType": "core",
|
|
1794
|
+
"state": "beta",
|
|
1795
|
+
"strict": true,
|
|
1796
|
+
"summary": "Send a message to an existing agent preview session.",
|
|
1797
|
+
"enableJsonFlag": true,
|
|
1798
|
+
"requiresProject": true,
|
|
1799
|
+
"isESM": true,
|
|
1800
|
+
"relativePath": [
|
|
1801
|
+
"lib",
|
|
1802
|
+
"commands",
|
|
1803
|
+
"agent",
|
|
1804
|
+
"preview",
|
|
1805
|
+
"send.js"
|
|
1806
|
+
],
|
|
1807
|
+
"aliasPermutations": [],
|
|
1808
|
+
"permutations": [
|
|
1809
|
+
"agent:preview:send",
|
|
1810
|
+
"preview:agent:send",
|
|
1811
|
+
"preview:send:agent",
|
|
1812
|
+
"agent:send:preview",
|
|
1813
|
+
"send:agent:preview",
|
|
1814
|
+
"send:preview:agent"
|
|
1815
|
+
]
|
|
1816
|
+
},
|
|
1817
|
+
"agent:preview:sessions": {
|
|
1818
|
+
"aliases": [],
|
|
1819
|
+
"args": {},
|
|
1820
|
+
"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.",
|
|
1821
|
+
"examples": [
|
|
1822
|
+
"List all cached agent preview sessions:\n<%= config.bin %> <%= command.id %>"
|
|
1823
|
+
],
|
|
1824
|
+
"flags": {
|
|
1825
|
+
"json": {
|
|
1826
|
+
"description": "Format output as json.",
|
|
1827
|
+
"helpGroup": "GLOBAL",
|
|
1828
|
+
"name": "json",
|
|
1840
1829
|
"allowNo": false,
|
|
1841
1830
|
"type": "boolean"
|
|
1831
|
+
},
|
|
1832
|
+
"flags-dir": {
|
|
1833
|
+
"helpGroup": "GLOBAL",
|
|
1834
|
+
"name": "flags-dir",
|
|
1835
|
+
"summary": "Import flag values from a directory.",
|
|
1836
|
+
"hasDynamicHelp": false,
|
|
1837
|
+
"multiple": false,
|
|
1838
|
+
"type": "option"
|
|
1842
1839
|
}
|
|
1843
1840
|
},
|
|
1844
|
-
"hasDynamicHelp":
|
|
1841
|
+
"hasDynamicHelp": false,
|
|
1845
1842
|
"hiddenAliases": [],
|
|
1846
|
-
"id": "agent:
|
|
1843
|
+
"id": "agent:preview:sessions",
|
|
1847
1844
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1848
1845
|
"pluginName": "@salesforce/plugin-agent",
|
|
1849
1846
|
"pluginType": "core",
|
|
1847
|
+
"state": "beta",
|
|
1850
1848
|
"strict": true,
|
|
1851
|
-
"summary": "
|
|
1849
|
+
"summary": "List all known programmatic agent preview sessions.",
|
|
1852
1850
|
"enableJsonFlag": true,
|
|
1851
|
+
"requiresProject": true,
|
|
1853
1852
|
"isESM": true,
|
|
1854
1853
|
"relativePath": [
|
|
1855
1854
|
"lib",
|
|
1856
1855
|
"commands",
|
|
1857
1856
|
"agent",
|
|
1858
|
-
"
|
|
1859
|
-
"
|
|
1857
|
+
"preview",
|
|
1858
|
+
"sessions.js"
|
|
1860
1859
|
],
|
|
1861
1860
|
"aliasPermutations": [],
|
|
1862
1861
|
"permutations": [
|
|
1863
|
-
"agent:
|
|
1864
|
-
"
|
|
1865
|
-
"
|
|
1866
|
-
"agent:
|
|
1867
|
-
"
|
|
1868
|
-
"
|
|
1862
|
+
"agent:preview:sessions",
|
|
1863
|
+
"preview:agent:sessions",
|
|
1864
|
+
"preview:sessions:agent",
|
|
1865
|
+
"agent:sessions:preview",
|
|
1866
|
+
"sessions:agent:preview",
|
|
1867
|
+
"sessions:preview:agent"
|
|
1869
1868
|
]
|
|
1870
1869
|
},
|
|
1871
|
-
"agent:
|
|
1870
|
+
"agent:preview:start": {
|
|
1872
1871
|
"aliases": [],
|
|
1873
1872
|
"args": {},
|
|
1874
|
-
"description": "
|
|
1873
|
+
"description": "This command outputs a session ID that you then use with the \"agent preview send\" command to send an utterance to the agent. Use the \"agent preview sessions\" command to list all active sessions and the \"agent preview end\" command to end a specific session.\n\nIdentify the agent you want to start previewing with either the --authoring-bundle flag to specify a local authoring bundle's API name or --api-name to specify an activated published agent's API name. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the \"aiAuthoringBundles\" metadata directory. Similarly, the published agent's API name is the same as its directory name under the \"Bots\" metadata directory. \n\nWhen starting a preview session using the authoring bundle, which contains the agent's Agent Script file, the preview uses mocked actions by default. Specify --use-live-actions for live mode, which uses the real Apex classes, flows, etc, in the org for the actions.",
|
|
1875
1874
|
"examples": [
|
|
1876
|
-
"
|
|
1877
|
-
"
|
|
1875
|
+
"Start a programmatic agent preview session by specifying an authoring bundle; uses mocked actions by default. Use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org",
|
|
1876
|
+
"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",
|
|
1877
|
+
"Start a preview session with an activated published agent:\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent"
|
|
1878
1878
|
],
|
|
1879
1879
|
"flags": {
|
|
1880
1880
|
"json": {
|
|
@@ -1912,46 +1912,54 @@
|
|
|
1912
1912
|
"api-name": {
|
|
1913
1913
|
"char": "n",
|
|
1914
1914
|
"name": "api-name",
|
|
1915
|
-
"summary": "API name of the
|
|
1915
|
+
"summary": "API name of the activated published agent you want to preview.",
|
|
1916
1916
|
"hasDynamicHelp": false,
|
|
1917
1917
|
"multiple": false,
|
|
1918
1918
|
"type": "option"
|
|
1919
|
+
},
|
|
1920
|
+
"authoring-bundle": {
|
|
1921
|
+
"name": "authoring-bundle",
|
|
1922
|
+
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
1923
|
+
"hasDynamicHelp": false,
|
|
1924
|
+
"multiple": false,
|
|
1925
|
+
"type": "option"
|
|
1926
|
+
},
|
|
1927
|
+
"use-live-actions": {
|
|
1928
|
+
"name": "use-live-actions",
|
|
1929
|
+
"summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
|
|
1930
|
+
"allowNo": false,
|
|
1931
|
+
"type": "boolean"
|
|
1919
1932
|
}
|
|
1920
1933
|
},
|
|
1921
1934
|
"hasDynamicHelp": true,
|
|
1922
1935
|
"hiddenAliases": [],
|
|
1923
|
-
"id": "agent:
|
|
1936
|
+
"id": "agent:preview:start",
|
|
1924
1937
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
1925
1938
|
"pluginName": "@salesforce/plugin-agent",
|
|
1926
1939
|
"pluginType": "core",
|
|
1940
|
+
"state": "beta",
|
|
1927
1941
|
"strict": true,
|
|
1928
|
-
"summary": "
|
|
1942
|
+
"summary": "Start a programmatic agent preview session.",
|
|
1929
1943
|
"enableJsonFlag": true,
|
|
1930
1944
|
"requiresProject": true,
|
|
1931
|
-
"FLAGGABLE_PROMPTS": {
|
|
1932
|
-
"api-name": {
|
|
1933
|
-
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1934
|
-
"promptMessage": "API name of the authoring bundle to validate"
|
|
1935
|
-
}
|
|
1936
|
-
},
|
|
1937
1945
|
"isESM": true,
|
|
1938
1946
|
"relativePath": [
|
|
1939
1947
|
"lib",
|
|
1940
1948
|
"commands",
|
|
1941
1949
|
"agent",
|
|
1942
|
-
"
|
|
1943
|
-
"
|
|
1950
|
+
"preview",
|
|
1951
|
+
"start.js"
|
|
1944
1952
|
],
|
|
1945
1953
|
"aliasPermutations": [],
|
|
1946
1954
|
"permutations": [
|
|
1947
|
-
"agent:
|
|
1948
|
-
"
|
|
1949
|
-
"
|
|
1950
|
-
"agent:
|
|
1951
|
-
"
|
|
1952
|
-
"
|
|
1955
|
+
"agent:preview:start",
|
|
1956
|
+
"preview:agent:start",
|
|
1957
|
+
"preview:start:agent",
|
|
1958
|
+
"agent:start:preview",
|
|
1959
|
+
"start:agent:preview",
|
|
1960
|
+
"start:preview:agent"
|
|
1953
1961
|
]
|
|
1954
1962
|
}
|
|
1955
1963
|
},
|
|
1956
|
-
"version": "1.
|
|
1964
|
+
"version": "1.32.1"
|
|
1957
1965
|
}
|