@salesforce/plugin-agent 1.20.13 → 1.21.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.
Files changed (36) hide show
  1. package/README.md +40 -40
  2. package/lib/commands/agent/create.d.ts +2 -3
  3. package/lib/commands/agent/create.js +10 -11
  4. package/lib/commands/agent/create.js.map +1 -1
  5. package/lib/commands/agent/generate/agent-spec.d.ts +0 -1
  6. package/lib/commands/agent/generate/agent-spec.js +0 -1
  7. package/lib/commands/agent/generate/agent-spec.js.map +1 -1
  8. package/lib/commands/agent/generate/test-spec.d.ts +0 -1
  9. package/lib/commands/agent/generate/test-spec.js +0 -1
  10. package/lib/commands/agent/generate/test-spec.js.map +1 -1
  11. package/lib/commands/agent/preview.js +1 -1
  12. package/lib/commands/agent/preview.js.map +1 -1
  13. package/lib/commands/agent/test/create.d.ts +1 -2
  14. package/lib/commands/agent/test/create.js +9 -10
  15. package/lib/commands/agent/test/create.js.map +1 -1
  16. package/lib/commands/agent/test/list.d.ts +0 -1
  17. package/lib/commands/agent/test/list.js +0 -1
  18. package/lib/commands/agent/test/list.js.map +1 -1
  19. package/lib/commands/agent/test/results.d.ts +0 -1
  20. package/lib/commands/agent/test/results.js +0 -1
  21. package/lib/commands/agent/test/results.js.map +1 -1
  22. package/lib/commands/agent/test/resume.d.ts +0 -1
  23. package/lib/commands/agent/test/resume.js +0 -1
  24. package/lib/commands/agent/test/resume.js.map +1 -1
  25. package/lib/commands/agent/test/run.d.ts +0 -1
  26. package/lib/commands/agent/test/run.js +0 -1
  27. package/lib/commands/agent/test/run.js.map +1 -1
  28. package/lib/handleTestResults.js +44 -11
  29. package/lib/handleTestResults.js.map +1 -1
  30. package/messages/agent.create.md +7 -7
  31. package/messages/agent.preview.md +1 -1
  32. package/messages/agent.test.create.md +3 -3
  33. package/npm-shrinkwrap.json +402 -393
  34. package/oclif.lock +450 -442
  35. package/oclif.manifest.json +14 -22
  36. package/package.json +5 -5
@@ -3,11 +3,11 @@
3
3
  "agent:create": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "To run this comand, you must have an agent spec file, which is a YAML file that define the agent properties and contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the \"agent generate agent-spec\" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag, along with the name (label) of the new agent with the --agent-name flag. If you don't specify any of the required flags, the command prompts you.\n\nWhen this command completes, your org contains the new agent, which you can then edit and customize in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions, or you can add them. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.\n\nUse the --preview flag to review what the agent looks like without actually saving it in your org. When previewing, the command creates a JSON file in the current directory with all the agent details. The name of the JSON file is the agent's API name and a timestamp.\n\nTo open the new agent in your org's Agent Builder UI, run this command: \"sf org open agent --name <agent-api-name>\".",
6
+ "description": "To run this command, you must have an agent spec file, which is a YAML file that define the agent properties and contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the \"agent generate agent-spec\" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag, along with the name (label) of the new agent with the --name flag. If you don't specify any of the required flags, the command prompts you.\n\nWhen this command completes, your org contains the new agent, which you can then edit and customize in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions, or you can add them. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.\n\nUse the --preview flag to review what the agent looks like without actually saving it in your org. When previewing, the command creates a JSON file in the current directory with all the agent details. The name of the JSON file is the agent's API name and a timestamp.\n\nTo open the new agent in your org's Agent Builder UI, run this command: \"sf org open agent --api-name <api-name>\".",
7
7
  "examples": [
8
8
  "Create an agent by being prompted for the required information, such as the agent spec file and agent name, and then create it in your default org:\n<%= config.bin %> <%= command.id %>",
9
- "Create an agent by specifying the agent name, API name, and spec file with flags; use the org with alias \"my-org\"; the command fails if the API name is already being used in your org:\n<%= config.bin %> <%= command.id %> --agent-name \"Resort Manager\" --agent-api-name Resort_Manager --spec specs/resortManagerAgent.yaml --target-org my-org",
10
- "Preview the creation of an agent named \"Resort Manager\" and use your default org:\n<%= config.bin %> <%= command.id %> --agent-name \"Resort Manager\" --spec specs/resortManagerAgent.yaml --preview"
9
+ "Create an agent by specifying the agent name, API name, and spec file with flags; use the org with alias \"my-org\"; the command fails if the API name is already being used in your org:\n<%= config.bin %> <%= command.id %> --name \"Resort Manager\" --api-name Resort_Manager --spec specs/resortManagerAgent.yaml --target-org my-org",
10
+ "Preview the creation of an agent named \"Resort Manager\" and use your default org:\n<%= config.bin %> <%= command.id %> --name \"Resort Manager\" --spec specs/resortManagerAgent.yaml --preview"
11
11
  ],
12
12
  "flags": {
13
13
  "json": {
@@ -42,15 +42,15 @@
42
42
  "multiple": false,
43
43
  "type": "option"
44
44
  },
45
- "agent-name": {
46
- "name": "agent-name",
45
+ "name": {
46
+ "name": "name",
47
47
  "summary": "Name (label) of the new agent.",
48
48
  "hasDynamicHelp": false,
49
49
  "multiple": false,
50
50
  "type": "option"
51
51
  },
52
- "agent-api-name": {
53
- "name": "agent-api-name",
52
+ "api-name": {
53
+ "name": "api-name",
54
54
  "summary": "API name of the new agent; if not specified, the API name is derived from the agent name (label); the API name must not exist in the org.",
55
55
  "hasDynamicHelp": false,
56
56
  "multiple": false,
@@ -84,7 +84,6 @@
84
84
  "pluginAlias": "@salesforce/plugin-agent",
85
85
  "pluginName": "@salesforce/plugin-agent",
86
86
  "pluginType": "core",
87
- "state": "beta",
88
87
  "strict": true,
89
88
  "summary": "Create an agent in your org using a local agent spec file.",
90
89
  "enableJsonFlag": true,
@@ -105,7 +104,7 @@
105
104
  "agent:preview": {
106
105
  "aliases": [],
107
106
  "args": {},
108
- "description": "Use this command to have a natural language conversation with an active agent in your org, as if you were an actual user. The interface is simple: in the \"Start typing...\" prompt, enter a statement, question, or command; when you're done, enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left. To exit the conversation, hit ESC or Control+C.\n\nThis command is useful to test if the agent responds to your utterances as you expect. For example, you can test that the agent uses a particular topic when asked a question, and then whether it invokes the correct action associated with that topic. This command is the CLI-equivalent of the Conversation Preview panel in your org's Agent Builder UI.\n\nWhen the session concludes, the command asks if you want to save the API responses and chat transcripts. By default, the files are saved to the \"./temp/agent-preview\" directory. Specify a new default directory by setting the environment variable \"SF_AGENT_PREVIEW_OUTPUT_DIR\" to the directory. Or you can pass the directory to the --output-dir flag.\n\nFind the agent's API name in its main details page in your org's Agent page in Setup.\n\nBefore you use this command, you must complete these steps:\n-----------------------------------------------------------\n\n1. Create a connected app in your org as described in the \"Create a Connected App\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#create-a-connected-app. Do these four additional steps:\n\n a. When specifying the connected app's Callback URL, add this second callback URL on a new line: \"http://localhost:1717/OauthRedirect\".\n\n b. When adding the scopes to the connected app, add \"Manage user data via Web browsers (web)\".\n\n c. Ensure that the \"Require Secret for Web Server Flow\" option is not selected.\n\n d. Make note of the user that you specified as the \"Run As\" user when updating the Client Credentials Flow section.\n\n2. Add the connected app to your agent as described in the \"Add Connected App to Agent\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#add-connected-app-to-agent.\n\n3. Copy the consumer key from your connected app as described in the \"Obtain Credentials\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#obtain-credentials.\n\n4. Set the \"SFDX_AUTH_SCOPES\" environment variable to \"refresh_token sfap_api chatbot_api web api\". This step ensures that you get the specific OAuth scopes required by this command.\n\n5. Using the username of the user you specified as the \"Run As\" user above, authorize your org using the web server flow, as described in this document: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm.\n\n IMPORTANT: You must use the \"--client-id <CONNECTED-APP-CONSUMER-KEY>\" flag of \"org login web\", where CONNECTED-APP-CONSUMER-KEY is the consumer key you previously copied. This step ensures that the \"org login web\" command uses your custom connected app, and not the default CLI connected app.\n\n Press Enter to skip sharing the client secret.\n\n6. When you run this command to interact with an agent, specify the username you authorized in the preceding step with the --connected-app-user (-a) flag.",
107
+ "description": "Use this command to have a natural language conversation with an active agent in your org, as if you were an actual user. The interface is simple: in the \"Start typing...\" prompt, enter a statement, question, or command; when you're done, enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left. To exit the conversation, hit ESC or Control+C.\n\nThis command is useful to test if the agent responds to your utterances as you expect. For example, you can test that the agent uses a particular topic when asked a question, and then whether it invokes the correct action associated with that topic. This command is the CLI-equivalent of the Conversation Preview panel in your org's Agent Builder UI.\n\nWhen the session concludes, the command asks if you want to save the API responses and chat transcripts. By default, the files are saved to the \"./temp/agent-preview\" directory. Specify a new default directory by setting the environment variable \"SF_AGENT_PREVIEW_OUTPUT_DIR\" to the directory. Or you can pass the directory to the --output-dir flag.\n\nFind the agent's API name in its main details page in your org's Agent page in Setup.\n\nBefore you use this command, you must complete these steps:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. Create a connected app in your org as described in the \"Create a Connected App\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#create-a-connected-app. Do these four additional steps:\n\n a. When specifying the connected app's Callback URL, add this second callback URL on a new line: \"http://localhost:1717/OauthRedirect\".\n\n b. When adding the scopes to the connected app, add \"Manage user data via Web browsers (web)\".\n\n c. Ensure that the \"Require Secret for Web Server Flow\" option is not selected.\n\n d. Make note of the user that you specified as the \"Run As\" user when updating the Client Credentials Flow section.\n\n2. Add the connected app to your agent as described in the \"Add Connected App to Agent\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#add-connected-app-to-agent.\n\n3. Copy the consumer key from your connected app as described in the \"Obtain Credentials\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#obtain-credentials.\n\n4. Set the \"SFDX_AUTH_SCOPES\" environment variable to \"refresh_token sfap_api chatbot_api web api\". This step ensures that you get the specific OAuth scopes required by this command.\n\n5. Using the username of the user you specified as the \"Run As\" user above, authorize your org using the web server flow, as described in this document: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm.\n\n IMPORTANT: You must use the \"--client-id <CONNECTED-APP-CONSUMER-KEY>\" flag of \"org login web\", where CONNECTED-APP-CONSUMER-KEY is the consumer key you previously copied. This step ensures that the \"org login web\" command uses your custom connected app, and not the default CLI connected app.\n\n Press Enter to skip sharing the client secret.\n\n6. When you run this command to interact with an agent, specify the username you authorized in the preceding step with the --connected-app-user (-a) flag.",
109
108
  "examples": [
110
109
  "Interact with an agent with API name \"Resort_Manager\" in the org with alias \"my-org\". Connect to your agent using the alias \"my-agent-user\"; this alias must point to the username who is authorized using the Web server flow:\n<%= config.bin %> <%= command.id %> --api-name \"Resort_Manager\" --target-org my-org --connected-app-user my-agent-user",
111
110
  "Same as the preceding example, but this time save the conversation transcripts to the \"./transcripts/my-preview\" directory rather than the default \"./temp/agent-preview\":\n<%= config.bin %> <%= command.id %> --api-name \"Resort_Manager\" --target-org my-org --connected-app-user my-agent-user --output-dir \"transcripts/my-preview\""
@@ -169,7 +168,7 @@
169
168
  "pluginAlias": "@salesforce/plugin-agent",
170
169
  "pluginName": "@salesforce/plugin-agent",
171
170
  "pluginType": "core",
172
- "state": "preview",
171
+ "state": "beta",
173
172
  "strict": true,
174
173
  "summary": "Interact with an active agent to preview how the agent responds to your statements, questions, and commands (utterances).",
175
174
  "enableJsonFlag": false,
@@ -358,7 +357,6 @@
358
357
  "pluginAlias": "@salesforce/plugin-agent",
359
358
  "pluginName": "@salesforce/plugin-agent",
360
359
  "pluginType": "core",
361
- "state": "beta",
362
360
  "strict": true,
363
361
  "summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
364
362
  "enableJsonFlag": true,
@@ -505,7 +503,6 @@
505
503
  "pluginAlias": "@salesforce/plugin-agent",
506
504
  "pluginName": "@salesforce/plugin-agent",
507
505
  "pluginType": "core",
508
- "state": "beta",
509
506
  "strict": true,
510
507
  "summary": "Generate an agent test spec, which is a YAML file that lists the test cases for testing a specific agent.",
511
508
  "enableJsonFlag": false,
@@ -619,8 +616,8 @@
619
616
  "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.",
620
617
  "examples": [
621
618
  "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 %>",
622
- "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 --test-api-name Resort_Manager_Test --force-overwrite --target-org my-org",
623
- "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 --test-api-name Resort_Manager_Test --preview"
619
+ "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",
620
+ "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"
624
621
  ],
625
622
  "flags": {
626
623
  "json": {
@@ -638,8 +635,8 @@
638
635
  "multiple": false,
639
636
  "type": "option"
640
637
  },
641
- "test-api-name": {
642
- "name": "test-api-name",
638
+ "api-name": {
639
+ "name": "api-name",
643
640
  "summary": "API name of the new test; the API name must not exist in the org.",
644
641
  "hasDynamicHelp": false,
645
642
  "multiple": false,
@@ -688,7 +685,6 @@
688
685
  "pluginAlias": "@salesforce/plugin-agent",
689
686
  "pluginName": "@salesforce/plugin-agent",
690
687
  "pluginType": "core",
691
- "state": "beta",
692
688
  "strict": true,
693
689
  "summary": "Create an agent test in your org using a local test spec YAML file.",
694
690
  "enableJsonFlag": true,
@@ -758,7 +754,6 @@
758
754
  "pluginAlias": "@salesforce/plugin-agent",
759
755
  "pluginName": "@salesforce/plugin-agent",
760
756
  "pluginType": "core",
761
- "state": "beta",
762
757
  "strict": true,
763
758
  "summary": "List the available agent tests in your org.",
764
759
  "enableJsonFlag": true,
@@ -861,7 +856,6 @@
861
856
  "pluginAlias": "@salesforce/plugin-agent",
862
857
  "pluginName": "@salesforce/plugin-agent",
863
858
  "pluginType": "core",
864
- "state": "beta",
865
859
  "strict": true,
866
860
  "summary": "Get the results of a completed agent test run.",
867
861
  "enableJsonFlag": true,
@@ -979,7 +973,6 @@
979
973
  "pluginAlias": "@salesforce/plugin-agent",
980
974
  "pluginName": "@salesforce/plugin-agent",
981
975
  "pluginType": "core",
982
- "state": "beta",
983
976
  "strict": true,
984
977
  "summary": "Resume an agent test that you previously started in your org so you can view the test results.",
985
978
  "enableJsonFlag": true,
@@ -1089,7 +1082,6 @@
1089
1082
  "pluginAlias": "@salesforce/plugin-agent",
1090
1083
  "pluginName": "@salesforce/plugin-agent",
1091
1084
  "pluginType": "core",
1092
- "state": "beta",
1093
1085
  "strict": true,
1094
1086
  "summary": "Start an agent test in your org.",
1095
1087
  "enableJsonFlag": true,
@@ -1112,5 +1104,5 @@
1112
1104
  ]
1113
1105
  }
1114
1106
  },
1115
- "version": "1.20.13"
1107
+ "version": "1.21.1"
1116
1108
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-agent",
3
3
  "description": "Commands to interact with Salesforce agents",
4
- "version": "1.20.13",
4
+ "version": "1.21.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -9,8 +9,8 @@
9
9
  "@inquirer/prompts": "^7.2.0",
10
10
  "@oclif/core": "^4",
11
11
  "@oclif/multi-stage-output": "^0.7.12",
12
- "@salesforce/agents": "^0.14.9",
13
- "@salesforce/core": "^8.10.1",
12
+ "@salesforce/agents": "0.14.11",
13
+ "@salesforce/core": "^8.10.2",
14
14
  "@salesforce/kit": "^3.2.3",
15
15
  "@salesforce/sf-plugins-core": "^12.2.0",
16
16
  "@salesforce/source-deploy-retrieve": "^12.19.3",
@@ -229,7 +229,7 @@
229
229
  "exports": "./lib/index.js",
230
230
  "type": "module",
231
231
  "sfdx": {
232
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.20.13.crt",
233
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.20.13.sig"
232
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.21.1.crt",
233
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.21.1.sig"
234
234
  }
235
235
  }