@salesforce/plugin-agent 1.24.34 → 1.25.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.
Files changed (74) hide show
  1. package/LICENSE.txt +200 -6
  2. package/README.md +240 -55
  3. package/lib/agentActivation.js +13 -4
  4. package/lib/agentActivation.js.map +1 -1
  5. package/lib/agentTestCache.js +13 -4
  6. package/lib/agentTestCache.js.map +1 -1
  7. package/lib/commands/agent/activate.js +13 -4
  8. package/lib/commands/agent/activate.js.map +1 -1
  9. package/lib/commands/agent/create.js +13 -4
  10. package/lib/commands/agent/create.js.map +1 -1
  11. package/lib/commands/agent/deactivate.js +13 -4
  12. package/lib/commands/agent/deactivate.js.map +1 -1
  13. package/lib/commands/agent/generate/agent-spec.js +13 -4
  14. package/lib/commands/agent/generate/agent-spec.js.map +1 -1
  15. package/lib/commands/agent/generate/authoring-bundle.d.ts +23 -0
  16. package/lib/commands/agent/generate/authoring-bundle.js +140 -0
  17. package/lib/commands/agent/generate/authoring-bundle.js.map +1 -0
  18. package/lib/commands/agent/generate/template.js +13 -4
  19. package/lib/commands/agent/generate/template.js.map +1 -1
  20. package/lib/commands/agent/generate/test-spec.js +13 -4
  21. package/lib/commands/agent/generate/test-spec.js.map +1 -1
  22. package/lib/commands/agent/preview.d.ts +6 -12
  23. package/lib/commands/agent/preview.js +130 -67
  24. package/lib/commands/agent/preview.js.map +1 -1
  25. package/lib/commands/agent/publish/authoring-bundle.d.ts +20 -0
  26. package/lib/commands/agent/publish/authoring-bundle.js +154 -0
  27. package/lib/commands/agent/publish/authoring-bundle.js.map +1 -0
  28. package/lib/commands/agent/test/create.js +13 -4
  29. package/lib/commands/agent/test/create.js.map +1 -1
  30. package/lib/commands/agent/test/list.js +13 -4
  31. package/lib/commands/agent/test/list.js.map +1 -1
  32. package/lib/commands/agent/test/results.js +13 -4
  33. package/lib/commands/agent/test/results.js.map +1 -1
  34. package/lib/commands/agent/test/resume.js +13 -4
  35. package/lib/commands/agent/test/resume.js.map +1 -1
  36. package/lib/commands/agent/test/run.js +14 -4
  37. package/lib/commands/agent/test/run.js.map +1 -1
  38. package/lib/commands/agent/validate/authoring-bundle.d.ts +19 -0
  39. package/lib/commands/agent/validate/authoring-bundle.js +128 -0
  40. package/lib/commands/agent/validate/authoring-bundle.js.map +1 -0
  41. package/lib/common.d.ts +8 -0
  42. package/lib/common.js +39 -0
  43. package/lib/common.js.map +1 -0
  44. package/lib/components/agent-preview-react.d.ts +9 -2
  45. package/lib/components/agent-preview-react.js +188 -62
  46. package/lib/components/agent-preview-react.js.map +1 -1
  47. package/lib/flags.d.ts +6 -2
  48. package/lib/flags.js +55 -20
  49. package/lib/flags.js.map +1 -1
  50. package/lib/handleTestResults.js +13 -4
  51. package/lib/handleTestResults.js.map +1 -1
  52. package/lib/index.js +13 -4
  53. package/lib/index.js.map +1 -1
  54. package/lib/inquirer-theme.js +13 -4
  55. package/lib/inquirer-theme.js.map +1 -1
  56. package/lib/testStages.js +13 -4
  57. package/lib/testStages.js.map +1 -1
  58. package/lib/yes-no-cancel.js +13 -4
  59. package/lib/yes-no-cancel.js.map +1 -1
  60. package/messages/agent.create.md +2 -0
  61. package/messages/agent.generate.agent-spec.md +2 -2
  62. package/messages/agent.generate.authoring-bundle.md +69 -0
  63. package/messages/agent.preview.md +25 -12
  64. package/messages/agent.publish.authoring-bundle.md +50 -0
  65. package/messages/agent.test.run.md +4 -0
  66. package/messages/agent.validate.authoring-bundle.md +50 -0
  67. package/oclif.manifest.json +311 -10
  68. package/package.json +17 -10
  69. package/schemas/agent-generate-agent__spec.json +1 -1
  70. package/schemas/agent-generate-authoring__bundle.json +22 -0
  71. package/schemas/agent-publish-authoring__bundle.json +25 -0
  72. package/schemas/agent-validate-authoring__bundle.json +22 -0
  73. package/npm-shrinkwrap.json +0 -17457
  74. package/oclif.lock +0 -9156
@@ -1,41 +1,54 @@
1
1
  # summary
2
2
 
3
- Interact with an active agent to preview how the agent responds to your statements, questions, and commands (utterances).
3
+ Interact with an agent to preview how it responds to your statements, questions, and commands (utterances).
4
4
 
5
5
  # description
6
6
 
7
- 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.
7
+ Use this command to have a natural language conversation with an agent while you code its Agent Script file. Previewing an agent works like an initial test to make sure it 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 Preview panel in your org's Agentforce Builder UI.
8
8
 
9
- This 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.
9
+ This command uses the agent's local authoring bundle, which contains its Agent Script file. You can let the command provide a list of authoring bundles (labeled "(Agent Script)") to choose from or use the --authoring-bundle flag to specify a bundle's API name.
10
10
 
11
- When 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.
11
+ You can use these two modes when previewing an agent from its Agent Script file:
12
12
 
13
- Find the agent's API name in its Agent Details page of your org's Agentforce Studio UI in Setup. If your agent is currently deactivated, use the "agent activate" CLI command to activate it.
13
+ - Simulated mode (Default): Uses only the Agent Script file to converse, and it simulates (mocks) all the actions. Use this mode if none of the Apex classes, flows, and prompt templates that implement your actions are available yet. The LLM uses the information about topics in the Agent Script file to simulate what the action does or how it responds.
14
+ - Live mode: Uses the actual Apex classes, flows, and prompt templates in your development org in the agent preview. If you've changed the Apex classe, flows, or prompt templates in your local DX project, then you must deploy them to your development org if you want to use them in your live preview. You can use the Apex Replay Debugger to debug your Apex classes when using live mode.
14
15
 
15
- IMPORTANT: Before you use this command, you must complete a number of configuration steps in your org and your DX project. The examples in this help assume you've completed the steps. See "Preview an Agent" in the "Agentforce Developer Guide" for complete documentation: https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.
16
+ 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.
17
+
18
+ When 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 with the --output-dir flag.
19
+
20
+ NOTE: You can also use this command to connect to a published and active agent, which are labeled "(Published)" if you let this command provide the list of agents to preview. That use case, however, requires additional security and configuration in both your org and your DX project. The examples in this help are for previewing an agent from its Agent Script file in your DX project and require only simple authorization of your org, such as with the "org login web" command. The --client-app and --api-name flags are used only for previewing published and active agents, they don't apply to Agent Script agents. See "Connect to a Published Agent" in the "Agentforce Developer Guide" for complete documentation: https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.
16
21
 
17
22
  # flags.api-name.summary
18
23
 
19
- API name of the agent you want to interact with.
24
+ API name of the published and active agent you want to interact with.
25
+
26
+ # flags.authoring-bundle.summary
27
+
28
+ API name of the authoring bundle metadata component that contains the agent's Agent Script file.
20
29
 
21
30
  # flags.client-app.summary
22
31
 
23
- Name of the linked client app to use for the agent connection. You must have previously created this link with "org login web --client-app". Run "org display" to see the available linked client apps.
32
+ Name of the linked client app to use for the connection to the published and active agent.
24
33
 
25
34
  # flags.output-dir.summary
26
35
 
27
36
  Directory where conversation transcripts are saved.
28
37
 
38
+ # flags.use-live-actions.summary
39
+
40
+ Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.
41
+
29
42
  # flags.apex-debug.summary
30
43
 
31
44
  Enable Apex debug logging during the agent preview conversation.
32
45
 
33
46
  # examples
34
47
 
35
- - Interact with an agent with API name Resort_Manager in the org with alias "my-org" and the linked "agent-app" connected app:
48
+ - Preview an agent in simulated mode by choosing from a list of authoring bundles provided by the command; use the org with alias "my-dev-org":
36
49
 
37
- <%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org --client-app agent-app
50
+ <%= config.bin %> <%= command.id %> --target-org my-dev-org
38
51
 
39
- - 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":
52
+ - Preview an agent in live mode by choosing from a list of authoring bundles. Save the conversation transcripts to the "./transcripts/my-preview" directory, enable the Apex debug logs, and use your default org:
40
53
 
41
- <%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org --client-app agent-app --output-dir transcripts/my-preview
54
+ <%= config.bin %> <%= command.id %> --use-live-actions --apex-debug --output-dir transcripts/my-preview
@@ -0,0 +1,50 @@
1
+ # summary
2
+
3
+ Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.
4
+
5
+ # description
6
+
7
+ 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.
8
+
9
+ When 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, and then the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.
10
+
11
+ This command uses the API name of the authoring bundle.
12
+
13
+ # examples
14
+
15
+ - Publish an authoring bundle by being prompted for its API name; use your default org:
16
+
17
+ <%= config.bin %> <%= command.id %>
18
+
19
+ - Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-dev-org":
20
+
21
+ <%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org
22
+
23
+ # flags.api-name.summary
24
+
25
+ API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.
26
+
27
+ # flags.api-name.prompt
28
+
29
+ API name of the authoring bundle to publish
30
+
31
+ # error.missingRequiredFlags
32
+
33
+ Required flag(s) missing: %s.
34
+
35
+ # error.invalidBundlePath
36
+
37
+ Invalid authoring bundle path. Provide a valid directory path to an authoring bundle.
38
+
39
+ # error.publishFailed
40
+
41
+ Failed to publish agent with the following errors:
42
+ %s
43
+
44
+ # error.agentNotFound
45
+
46
+ Couldn't find a ".bundle-meta.xml" file with API name '%s' in the DX project.
47
+
48
+ # error.agentNotFoundAction
49
+
50
+ Check that the API name is correct and that the ".agent" file exists in your DX project directory.
@@ -14,6 +14,10 @@ By default, this command outputs test results in human-readable tables for each
14
14
 
15
15
  API name of the agent test to run; corresponds to the name of the AiEvaluationDefinition metadata component that implements the agent test.
16
16
 
17
+ # flags.api-name.prompt
18
+
19
+ API name of the agent test to run
20
+
17
21
  # flags.wait.summary
18
22
 
19
23
  Number of minutes to wait for the command to complete and display results to the terminal window.
@@ -0,0 +1,50 @@
1
+ # summary
2
+
3
+ Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.
4
+
5
+ # description
6
+
7
+ 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.
8
+
9
+ This 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.
10
+
11
+ This 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.
12
+
13
+ # examples
14
+
15
+ - Validate an authoring bundle by being prompted for its API name; use your default org:
16
+
17
+ <%= config.bin %> <%= command.id %>
18
+
19
+ - Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias "my-dev-org":
20
+
21
+ <%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org
22
+
23
+ # flags.api-name.summary
24
+
25
+ API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.
26
+
27
+ # flags.api-name.prompt
28
+
29
+ API name of the authoring bundle to validate
30
+
31
+ # error.missingRequiredFlags
32
+
33
+ Required flag(s) missing: %s.
34
+
35
+ # error.invalidBundlePath
36
+
37
+ Invalid authoring bundle path. Provide a valid directory path to the authoring bundle you want to validate.
38
+
39
+ # error.compilationFailed
40
+
41
+ Compilation of the Agent Script file failed with the following errors:
42
+ %s
43
+
44
+ # error.agentNotFound
45
+
46
+ Couldn't find a ".bundle-meta.xml" file with API name '%s' in the DX project.
47
+
48
+ # error.agentNotFoundAction
49
+
50
+ Check that the API name is correct and that the ".agent" file exists in your DX project directory.
@@ -75,7 +75,7 @@
75
75
  "agent:create": {
76
76
  "aliases": [],
77
77
  "args": {},
78
- "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>\".",
78
+ "description": "NOTE: This command creates an agent that doesn't use Agent Script as its blueprint. We generally don't recommend you use this workflow to create an agent. Rather, use the \"agent generate|validate|publish authoring-bundle\" commands to author agents that use the Agent Script language. See \"Author an Agent\" (https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-nga-author-agent.html) for details.\n\nTo 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>\".",
79
79
  "examples": [
80
80
  "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 %>",
81
81
  "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",
@@ -248,10 +248,10 @@
248
248
  "agent:preview": {
249
249
  "aliases": [],
250
250
  "args": {},
251
- "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 Agent Details page of your org's Agentforce Studio UI in Setup. If your agent is currently deactivated, use the \"agent activate\" CLI command to activate it.\n\nIMPORTANT: Before you use this command, you must complete a number of configuration steps in your org and your DX project. The examples in this help assume you've completed the steps. See \"Preview an Agent\" in the \"Agentforce Developer Guide\" for complete documentation: https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.",
251
+ "description": "Use this command to have a natural language conversation with an agent while you code its Agent Script file. Previewing an agent works like an initial test to make sure it 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 Preview panel in your org's Agentforce Builder UI.\n\nThis command uses the agent's local authoring bundle, which contains its Agent Script file. You can let the command provide a list of authoring bundles (labeled \"(Agent Script)\") to choose from or use the --authoring-bundle flag to specify a bundle's API name.\n\nYou can use these two modes when previewing an agent from its Agent Script file:\n\n- Simulated mode (Default): Uses only the Agent Script file to converse, and it simulates (mocks) all the actions. Use this mode if none of the Apex classes, flows, and prompt templates that implement your actions are available yet. The LLM uses the information about topics in the Agent Script file to simulate what the action does or how it responds.\n- Live mode: Uses the actual Apex classes, flows, and prompt templates in your development org in the agent preview. If you've changed the Apex classe, flows, or prompt templates in your local DX project, then you must deploy them to your development org if you want to use them in your live preview. You can use the Apex Replay Debugger to debug your Apex classes when using live mode.\n\nThe 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\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 with the --output-dir flag.\n\nNOTE: You can also use this command to connect to a published and active agent, which are labeled \"(Published)\" if you let this command provide the list of agents to preview. That use case, however, requires additional security and configuration in both your org and your DX project. The examples in this help are for previewing an agent from its Agent Script file in your DX project and require only simple authorization of your org, such as with the \"org login web\" command. The --client-app and --api-name flags are used only for previewing published and active agents, they don't apply to Agent Script agents. See \"Connect to a Published Agent\" in the \"Agentforce Developer Guide\" for complete documentation: https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-preview.html.",
252
252
  "examples": [
253
- "Interact with an agent with API name Resort_Manager in the org with alias \"my-org\" and the linked \"agent-app\" connected app:\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org --client-app agent-app",
254
- "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 --client-app agent-app --output-dir transcripts/my-preview"
253
+ "Preview an agent in simulated mode by choosing from a list of authoring bundles provided by the command; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --target-org my-dev-org",
254
+ "Preview an agent in live mode by choosing from a list of authoring bundles. Save the conversation transcripts to the \"./transcripts/my-preview\" directory, enable the Apex debug logs, and use your default org:\n<%= config.bin %> <%= command.id %> --use-live-actions --apex-debug --output-dir transcripts/my-preview"
255
255
  ],
256
256
  "flags": {
257
257
  "flags-dir": {
@@ -285,8 +285,7 @@
285
285
  "target-org"
286
286
  ],
287
287
  "name": "client-app",
288
- "required": true,
289
- "summary": "Name of the linked client app to use for the agent connection. You must have previously created this link with \"org login web --client-app\". Run \"org display\" to see the available linked client apps.",
288
+ "summary": "Name of the linked client app to use for the connection to the published and active agent.",
290
289
  "hasDynamicHelp": false,
291
290
  "multiple": false,
292
291
  "type": "option"
@@ -294,7 +293,14 @@
294
293
  "api-name": {
295
294
  "char": "n",
296
295
  "name": "api-name",
297
- "summary": "API name of the agent you want to interact with.",
296
+ "summary": "API name of the published and active agent you want to interact with.",
297
+ "hasDynamicHelp": false,
298
+ "multiple": false,
299
+ "type": "option"
300
+ },
301
+ "authoring-bundle": {
302
+ "name": "authoring-bundle",
303
+ "summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
298
304
  "hasDynamicHelp": false,
299
305
  "multiple": false,
300
306
  "type": "option"
@@ -313,6 +319,12 @@
313
319
  "summary": "Enable Apex debug logging during the agent preview conversation.",
314
320
  "allowNo": false,
315
321
  "type": "boolean"
322
+ },
323
+ "use-live-actions": {
324
+ "name": "use-live-actions",
325
+ "summary": "Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.",
326
+ "allowNo": false,
327
+ "type": "boolean"
316
328
  }
317
329
  },
318
330
  "hasDynamicHelp": true,
@@ -323,7 +335,7 @@
323
335
  "pluginType": "core",
324
336
  "state": "beta",
325
337
  "strict": true,
326
- "summary": "Interact with an active agent to preview how the agent responds to your statements, questions, and commands (utterances).",
338
+ "summary": "Interact with an agent to preview how it responds to your statements, questions, and commands (utterances).",
327
339
  "enableJsonFlag": false,
328
340
  "requiresProject": true,
329
341
  "isESM": true,
@@ -342,7 +354,7 @@
342
354
  "agent:generate:agent-spec": {
343
355
  "aliases": [],
344
356
  "args": {},
345
- "description": "The first step in creating an agent in your org with Salesforce CLI is to generate an agent spec using this command. An agent spec is a YAML-formatted file that contains information about the agent, such as its role and company description, and then an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.\n\nUse flags, such as --role and --company-description, to provide details about your company and the role that the agent plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be prompted for all required and optional properties. Upon command execution, the large language model (LLM) associated with your org uses the provided information to generate a list of topics for the agent. Because the LLM uses the company and role information to generate the topics, we recommend that you provide accurate, complete, and specific details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for example, you can remove topics that don't apply or change a topic's description.\n\nYou can also iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively improving the description of your agent allows the LLM to generate progressively better topics.\n\nYou can also specify other agent properties, such as a custom prompt template, how to ground the prompt template to add context to the agent's prompts, the tone of the prompts, and the username of a user in the org to assign to the agent.\n\nWhen your agent spec is ready, you then create the agent in your org by running the \"agent create\" CLI command and specifying the spec with the --spec flag.",
357
+ "description": "An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.\n\nUse flags, such as --role and --company-description, to provide details about your company and the role that the agent plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be prompted for all required and optional properties. Upon command execution, the large language model (LLM) associated with your org uses the provided information to generate a list of topics for the agent. Because the LLM uses the company and role information to generate the topics, we recommend that you provide accurate, complete, and specific details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for example, you can remove topics that don't apply or change a topic's description.\n\nYou can also iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively improving the description of your agent allows the LLM to generate progressively better topics.\n\nYou can also specify other agent properties, such as a custom prompt template, how to ground the prompt template to add context to the agent's prompts, the tone of the prompts, and the username of a user in the org to assign to the agent.\n\nWhen your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the \"agent generate authoring-bundle\" CLI command. An authoring bundle is a metadata type that contains an Agent Script file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately create an agent with the \"agent create\" command. We don't recommend this workflow because these types of agents don't use Agent Script, and are thus less flexible and more difficult to maintain.)",
346
358
  "examples": [
347
359
  "Generate an agent spec in the default location and use flags to specify the agent properties, such as its role and your company details; use your default org:\n<%= config.bin %> <%= command.id %> --type customer --role \"Field customer complaints and manage employee schedules.\" --company-name \"Coral Cloud Resorts\" --company-description \"Provide customers with exceptional destination activities, unforgettable experiences, and reservation services.\"",
348
360
  "Generate an agent spec by being prompted for the required agent properties and generate a maxiumum of 5 topics; write the generated file to the \"specs/resortManagerSpec.yaml\" file and use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org",
@@ -532,6 +544,125 @@
532
544
  "agent-spec:generate:agent"
533
545
  ]
534
546
  },
547
+ "agent:generate:authoring-bundle": {
548
+ "aliases": [],
549
+ "args": {},
550
+ "description": "Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the agent's blueprint; it fully describes what the agent can do using the Agent Script language.\n\nUse this command to generate a new authoring bundle based on an agent spec YAML file, which you create with the \"agent generate agent-spec\" command. The agent spec YAML file is a high-level description of the agent; it describes its essence rather than exactly what it can do.\n\nThe metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard \"<bundle-api-name>.bundle-meta.xml\" metadata file and the Agent Script file (with extension \".agent\"). When you run this command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/<bundle-api-name> directory. Use the --output-dir flag to generate them elsewhere.\n\nAfter you generate the initial authoring bundle, code the Agent Script file so your agent behaves exactly as you want. The Agent Script file generated by this command is just a first draft of your agent! Interactively test the agent by conversing with it using the \"agent preview\" command. Then publish the agent to your org with the \"agent publish authoring-bundle\" command.\n\nThis command requires an org because it uses it to access an LLM for generating the Agent Script file.",
551
+ "examples": [
552
+ "Generate an authoring bundle by being prompted for all required values, such as the agent spec YAML file, the bundle name, and the API name; use your default org:\n<%= config.bin %> <%= command.id %>",
553
+ "Generate an authoring bundle from the \"specs/agentSpec.yaml\" agent spec YAML file and give it the label \"My Authoring Bundle\"; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\"",
554
+ "Similar to previous example, but generate the authoring bundle files in the \"other-package-dir/main/default\" package directory; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name \"My Authoring Bundle\" --output-dir other-package-dir/main/default --target-org my-dev-org"
555
+ ],
556
+ "flags": {
557
+ "json": {
558
+ "description": "Format output as json.",
559
+ "helpGroup": "GLOBAL",
560
+ "name": "json",
561
+ "allowNo": false,
562
+ "type": "boolean"
563
+ },
564
+ "flags-dir": {
565
+ "helpGroup": "GLOBAL",
566
+ "name": "flags-dir",
567
+ "summary": "Import flag values from a directory.",
568
+ "hasDynamicHelp": false,
569
+ "multiple": false,
570
+ "type": "option"
571
+ },
572
+ "target-org": {
573
+ "char": "o",
574
+ "name": "target-org",
575
+ "noCacheDefault": true,
576
+ "required": true,
577
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
578
+ "hasDynamicHelp": true,
579
+ "multiple": false,
580
+ "type": "option"
581
+ },
582
+ "api-name": {
583
+ "name": "api-name",
584
+ "summary": "API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.",
585
+ "hasDynamicHelp": false,
586
+ "multiple": false,
587
+ "type": "option"
588
+ },
589
+ "api-version": {
590
+ "description": "Override the api version used for api requests made by this command",
591
+ "name": "api-version",
592
+ "hasDynamicHelp": false,
593
+ "multiple": false,
594
+ "type": "option"
595
+ },
596
+ "spec": {
597
+ "char": "f",
598
+ "name": "spec",
599
+ "summary": "Path to the agent spec YAML file; if not specified, the command provides a list that you can choose from.",
600
+ "hasDynamicHelp": false,
601
+ "multiple": false,
602
+ "type": "option"
603
+ },
604
+ "output-dir": {
605
+ "char": "d",
606
+ "name": "output-dir",
607
+ "summary": "Directory where the authoring bundle files are generated.",
608
+ "hasDynamicHelp": false,
609
+ "multiple": false,
610
+ "type": "option"
611
+ },
612
+ "name": {
613
+ "char": "n",
614
+ "name": "name",
615
+ "summary": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
616
+ "hasDynamicHelp": false,
617
+ "multiple": false,
618
+ "type": "option"
619
+ }
620
+ },
621
+ "hasDynamicHelp": true,
622
+ "hiddenAliases": [],
623
+ "id": "agent:generate:authoring-bundle",
624
+ "pluginAlias": "@salesforce/plugin-agent",
625
+ "pluginName": "@salesforce/plugin-agent",
626
+ "pluginType": "core",
627
+ "state": "beta",
628
+ "strict": true,
629
+ "summary": "Generate an authoring bundle from an existing agent spec YAML file.",
630
+ "enableJsonFlag": true,
631
+ "requiresProject": true,
632
+ "FLAGGABLE_PROMPTS": {
633
+ "name": {
634
+ "message": "Name (label) of the authoring bundle; if not specified, you're prompted for the name.",
635
+ "promptMessage": "Name (label) of the authoring bundle",
636
+ "required": true
637
+ },
638
+ "api-name": {
639
+ "message": "API name of the new authoring bundle; if not specified, the API name is derived from the authoring bundle name (label); the API name can't exist in the org.",
640
+ "promptMessage": "API name of the new authoring bundle"
641
+ },
642
+ "spec": {
643
+ "message": "Path to the agent spec YAML file; if not specified, the command provides a list that you can choose from.",
644
+ "promptMessage": "Path to the agent spec YAML file",
645
+ "required": true
646
+ }
647
+ },
648
+ "isESM": true,
649
+ "relativePath": [
650
+ "lib",
651
+ "commands",
652
+ "agent",
653
+ "generate",
654
+ "authoring-bundle.js"
655
+ ],
656
+ "aliasPermutations": [],
657
+ "permutations": [
658
+ "agent:generate:authoring-bundle",
659
+ "generate:agent:authoring-bundle",
660
+ "generate:authoring-bundle:agent",
661
+ "agent:authoring-bundle:generate",
662
+ "authoring-bundle:agent:generate",
663
+ "authoring-bundle:generate:agent"
664
+ ]
665
+ },
535
666
  "agent:generate:template": {
536
667
  "aliases": [],
537
668
  "args": {},
@@ -1189,7 +1320,177 @@
1189
1320
  "run:agent:test",
1190
1321
  "run:test:agent"
1191
1322
  ]
1323
+ },
1324
+ "agent:publish:authoring-bundle": {
1325
+ "aliases": [],
1326
+ "args": {},
1327
+ "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, and then the authoring bundle metadata (AiAuthoringBundle) is deployed to your org. \n\nThis command uses the API name of the authoring bundle.",
1328
+ "examples": [
1329
+ "Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
1330
+ "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"
1331
+ ],
1332
+ "flags": {
1333
+ "json": {
1334
+ "description": "Format output as json.",
1335
+ "helpGroup": "GLOBAL",
1336
+ "name": "json",
1337
+ "allowNo": false,
1338
+ "type": "boolean"
1339
+ },
1340
+ "flags-dir": {
1341
+ "helpGroup": "GLOBAL",
1342
+ "name": "flags-dir",
1343
+ "summary": "Import flag values from a directory.",
1344
+ "hasDynamicHelp": false,
1345
+ "multiple": false,
1346
+ "type": "option"
1347
+ },
1348
+ "target-org": {
1349
+ "char": "o",
1350
+ "name": "target-org",
1351
+ "noCacheDefault": true,
1352
+ "required": true,
1353
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1354
+ "hasDynamicHelp": true,
1355
+ "multiple": false,
1356
+ "type": "option"
1357
+ },
1358
+ "api-version": {
1359
+ "description": "Override the api version used for api requests made by this command",
1360
+ "name": "api-version",
1361
+ "hasDynamicHelp": false,
1362
+ "multiple": false,
1363
+ "type": "option"
1364
+ },
1365
+ "api-name": {
1366
+ "char": "n",
1367
+ "name": "api-name",
1368
+ "summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1369
+ "hasDynamicHelp": false,
1370
+ "multiple": false,
1371
+ "type": "option"
1372
+ }
1373
+ },
1374
+ "hasDynamicHelp": true,
1375
+ "hiddenAliases": [],
1376
+ "id": "agent:publish:authoring-bundle",
1377
+ "pluginAlias": "@salesforce/plugin-agent",
1378
+ "pluginName": "@salesforce/plugin-agent",
1379
+ "pluginType": "core",
1380
+ "state": "beta",
1381
+ "strict": true,
1382
+ "summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
1383
+ "enableJsonFlag": true,
1384
+ "requiresProject": true,
1385
+ "FLAGGABLE_PROMPTS": {
1386
+ "api-name": {
1387
+ "message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
1388
+ "promptMessage": "API name of the authoring bundle to publish"
1389
+ }
1390
+ },
1391
+ "isESM": true,
1392
+ "relativePath": [
1393
+ "lib",
1394
+ "commands",
1395
+ "agent",
1396
+ "publish",
1397
+ "authoring-bundle.js"
1398
+ ],
1399
+ "aliasPermutations": [],
1400
+ "permutations": [
1401
+ "agent:publish:authoring-bundle",
1402
+ "publish:agent:authoring-bundle",
1403
+ "publish:authoring-bundle:agent",
1404
+ "agent:authoring-bundle:publish",
1405
+ "authoring-bundle:agent:publish",
1406
+ "authoring-bundle:publish:agent"
1407
+ ]
1408
+ },
1409
+ "agent:validate:authoring-bundle": {
1410
+ "aliases": [],
1411
+ "args": {},
1412
+ "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.",
1413
+ "examples": [
1414
+ "Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
1415
+ "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"
1416
+ ],
1417
+ "flags": {
1418
+ "json": {
1419
+ "description": "Format output as json.",
1420
+ "helpGroup": "GLOBAL",
1421
+ "name": "json",
1422
+ "allowNo": false,
1423
+ "type": "boolean"
1424
+ },
1425
+ "flags-dir": {
1426
+ "helpGroup": "GLOBAL",
1427
+ "name": "flags-dir",
1428
+ "summary": "Import flag values from a directory.",
1429
+ "hasDynamicHelp": false,
1430
+ "multiple": false,
1431
+ "type": "option"
1432
+ },
1433
+ "target-org": {
1434
+ "char": "o",
1435
+ "name": "target-org",
1436
+ "noCacheDefault": true,
1437
+ "required": true,
1438
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1439
+ "hasDynamicHelp": true,
1440
+ "multiple": false,
1441
+ "type": "option"
1442
+ },
1443
+ "api-version": {
1444
+ "description": "Override the api version used for api requests made by this command",
1445
+ "name": "api-version",
1446
+ "hasDynamicHelp": false,
1447
+ "multiple": false,
1448
+ "type": "option"
1449
+ },
1450
+ "api-name": {
1451
+ "char": "n",
1452
+ "name": "api-name",
1453
+ "summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
1454
+ "hasDynamicHelp": false,
1455
+ "multiple": false,
1456
+ "type": "option"
1457
+ }
1458
+ },
1459
+ "hasDynamicHelp": true,
1460
+ "hiddenAliases": [],
1461
+ "id": "agent:validate:authoring-bundle",
1462
+ "pluginAlias": "@salesforce/plugin-agent",
1463
+ "pluginName": "@salesforce/plugin-agent",
1464
+ "pluginType": "core",
1465
+ "state": "beta",
1466
+ "strict": true,
1467
+ "summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
1468
+ "enableJsonFlag": true,
1469
+ "requiresProject": true,
1470
+ "FLAGGABLE_PROMPTS": {
1471
+ "api-name": {
1472
+ "message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
1473
+ "promptMessage": "API name of the authoring bundle to validate"
1474
+ }
1475
+ },
1476
+ "isESM": true,
1477
+ "relativePath": [
1478
+ "lib",
1479
+ "commands",
1480
+ "agent",
1481
+ "validate",
1482
+ "authoring-bundle.js"
1483
+ ],
1484
+ "aliasPermutations": [],
1485
+ "permutations": [
1486
+ "agent:validate:authoring-bundle",
1487
+ "validate:agent:authoring-bundle",
1488
+ "validate:authoring-bundle:agent",
1489
+ "agent:authoring-bundle:validate",
1490
+ "authoring-bundle:agent:validate",
1491
+ "authoring-bundle:validate:agent"
1492
+ ]
1192
1493
  }
1193
1494
  },
1194
- "version": "1.24.34"
1495
+ "version": "1.25.0"
1195
1496
  }