@salesforce/plugin-agent 1.24.14-nga.0 → 1.24.14-nga.2
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 +81 -60
- package/lib/commands/agent/generate/authoring-bundle.d.ts +1 -0
- package/lib/commands/agent/generate/authoring-bundle.js +1 -0
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -1
- package/lib/commands/agent/preview.d.ts +0 -1
- package/lib/commands/agent/preview.js +5 -25
- package/lib/commands/agent/preview.js.map +1 -1
- package/lib/commands/agent/publish/authoring-bundle.d.ts +1 -0
- package/lib/commands/agent/publish/authoring-bundle.js +1 -0
- package/lib/commands/agent/publish/authoring-bundle.js.map +1 -1
- package/lib/commands/agent/validate/authoring-bundle.d.ts +1 -0
- package/lib/commands/agent/validate/authoring-bundle.js +1 -0
- package/lib/commands/agent/validate/authoring-bundle.js.map +1 -1
- package/lib/components/agent-preview-react.d.ts +7 -1
- package/lib/components/agent-preview-react.js +109 -30
- package/lib/components/agent-preview-react.js.map +1 -1
- package/messages/agent.create.md +2 -0
- package/messages/agent.generate.agent-spec.md +2 -2
- package/messages/agent.generate.authoring-bundle.md +14 -8
- package/messages/agent.publish.authoring-bundle.md +8 -12
- package/messages/agent.validate.authoring-bundle.md +8 -8
- package/oclif.manifest.json +96 -93
- package/package.json +4 -4
package/oclif.manifest.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"agent:create": {
|
|
76
76
|
"aliases": [],
|
|
77
77
|
"args": {},
|
|
78
|
-
"description": "
|
|
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",
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
"agent:generate:agent-spec": {
|
|
354
354
|
"aliases": [],
|
|
355
355
|
"args": {},
|
|
356
|
-
"description": "
|
|
356
|
+
"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.)",
|
|
357
357
|
"examples": [
|
|
358
358
|
"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.\"",
|
|
359
359
|
"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",
|
|
@@ -546,10 +546,10 @@
|
|
|
546
546
|
"agent:generate:authoring-bundle": {
|
|
547
547
|
"aliases": [],
|
|
548
548
|
"args": {},
|
|
549
|
-
"description": "Authoring bundles are metadata
|
|
549
|
+
"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-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-name> directory. Use the --output-dir flag to generate them elsewhere.\n\nAfter you generate the initial authoring bundle, vibe code (modify using natural language) the Agent Script file so your agent behaves exactly as you want. The generated Agent Script file is just a first draft of your agent! 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.",
|
|
550
550
|
"examples": [
|
|
551
|
-
"Generate an authoring bundle from the \"specs/agentSpec.yaml\" agent spec YAML file and give it the label \"My Authoring Bundle\":\n<%= config.bin %> <%= command.id %> --spec
|
|
552
|
-
"Same as previous example, but generate the files in the other-package-dir/main/default
|
|
551
|
+
"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\"",
|
|
552
|
+
"Same as previous example, but generate the 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"
|
|
553
553
|
],
|
|
554
554
|
"flags": {
|
|
555
555
|
"json": {
|
|
@@ -622,8 +622,9 @@
|
|
|
622
622
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
623
623
|
"pluginName": "@salesforce/plugin-agent",
|
|
624
624
|
"pluginType": "core",
|
|
625
|
+
"state": "beta",
|
|
625
626
|
"strict": true,
|
|
626
|
-
"summary": "Generate
|
|
627
|
+
"summary": "Generate an authoring bundle from an existing agent spec YAML file.",
|
|
627
628
|
"enableJsonFlag": true,
|
|
628
629
|
"requiresProject": true,
|
|
629
630
|
"FLAGGABLE_PROMPTS": {
|
|
@@ -805,9 +806,9 @@
|
|
|
805
806
|
"agent:publish:authoring-bundle": {
|
|
806
807
|
"aliases": [],
|
|
807
808
|
"args": {},
|
|
808
|
-
"description": "
|
|
809
|
+
"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 the authoring bundle metadata component is deployed to the org, and all associated agent metadata components, such as the Bot, BotVersion, and GenAiXXX components, are either created or updated. The org then either creates a new agent based on the deployed authoring bundle, or creates a new version of the agent if it already existed. Finally, all the new or changed metadata components associated with the new agent are retrieved back to your local DX project.\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.",
|
|
809
810
|
"examples": [
|
|
810
|
-
"Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-org\"
|
|
811
|
+
"Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-org"
|
|
811
812
|
],
|
|
812
813
|
"flags": {
|
|
813
814
|
"json": {
|
|
@@ -857,8 +858,9 @@
|
|
|
857
858
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
858
859
|
"pluginName": "@salesforce/plugin-agent",
|
|
859
860
|
"pluginType": "core",
|
|
861
|
+
"state": "beta",
|
|
860
862
|
"strict": true,
|
|
861
|
-
"summary": "Publish an authoring bundle to your org, which results in a new
|
|
863
|
+
"summary": "Publish an authoring bundle to your org, which results in a new or updated agent.",
|
|
862
864
|
"enableJsonFlag": true,
|
|
863
865
|
"requiresProject": true,
|
|
864
866
|
"FLAGGABLE_PROMPTS": {
|
|
@@ -885,6 +887,90 @@
|
|
|
885
887
|
"authoring-bundle:publish:agent"
|
|
886
888
|
]
|
|
887
889
|
},
|
|
890
|
+
"agent:validate:authoring-bundle": {
|
|
891
|
+
"aliases": [],
|
|
892
|
+
"args": {},
|
|
893
|
+
"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 vibe code (modify with natural language) the Agent Script file to ensure that it's always 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.",
|
|
894
|
+
"examples": [
|
|
895
|
+
"Validate an authoring bundle with API name MyAuthoringBundle:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle"
|
|
896
|
+
],
|
|
897
|
+
"flags": {
|
|
898
|
+
"json": {
|
|
899
|
+
"description": "Format output as json.",
|
|
900
|
+
"helpGroup": "GLOBAL",
|
|
901
|
+
"name": "json",
|
|
902
|
+
"allowNo": false,
|
|
903
|
+
"type": "boolean"
|
|
904
|
+
},
|
|
905
|
+
"flags-dir": {
|
|
906
|
+
"helpGroup": "GLOBAL",
|
|
907
|
+
"name": "flags-dir",
|
|
908
|
+
"summary": "Import flag values from a directory.",
|
|
909
|
+
"hasDynamicHelp": false,
|
|
910
|
+
"multiple": false,
|
|
911
|
+
"type": "option"
|
|
912
|
+
},
|
|
913
|
+
"target-org": {
|
|
914
|
+
"char": "o",
|
|
915
|
+
"name": "target-org",
|
|
916
|
+
"noCacheDefault": true,
|
|
917
|
+
"required": true,
|
|
918
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
919
|
+
"hasDynamicHelp": true,
|
|
920
|
+
"multiple": false,
|
|
921
|
+
"type": "option"
|
|
922
|
+
},
|
|
923
|
+
"api-version": {
|
|
924
|
+
"description": "Override the api version used for api requests made by this command",
|
|
925
|
+
"name": "api-version",
|
|
926
|
+
"hasDynamicHelp": false,
|
|
927
|
+
"multiple": false,
|
|
928
|
+
"type": "option"
|
|
929
|
+
},
|
|
930
|
+
"api-name": {
|
|
931
|
+
"char": "n",
|
|
932
|
+
"name": "api-name",
|
|
933
|
+
"summary": "API name of the authoring bundle you want to validate.",
|
|
934
|
+
"hasDynamicHelp": false,
|
|
935
|
+
"multiple": false,
|
|
936
|
+
"type": "option"
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
"hasDynamicHelp": true,
|
|
940
|
+
"hiddenAliases": [],
|
|
941
|
+
"id": "agent:validate:authoring-bundle",
|
|
942
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
943
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
944
|
+
"pluginType": "core",
|
|
945
|
+
"state": "beta",
|
|
946
|
+
"strict": true,
|
|
947
|
+
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
948
|
+
"enableJsonFlag": true,
|
|
949
|
+
"requiresProject": true,
|
|
950
|
+
"FLAGGABLE_PROMPTS": {
|
|
951
|
+
"api-name": {
|
|
952
|
+
"message": "API name of the authoring bundle you want to validate.",
|
|
953
|
+
"promptMessage": "API name of the authoring bundle to validate"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
"isESM": true,
|
|
957
|
+
"relativePath": [
|
|
958
|
+
"lib",
|
|
959
|
+
"commands",
|
|
960
|
+
"agent",
|
|
961
|
+
"validate",
|
|
962
|
+
"authoring-bundle.js"
|
|
963
|
+
],
|
|
964
|
+
"aliasPermutations": [],
|
|
965
|
+
"permutations": [
|
|
966
|
+
"agent:validate:authoring-bundle",
|
|
967
|
+
"validate:agent:authoring-bundle",
|
|
968
|
+
"validate:authoring-bundle:agent",
|
|
969
|
+
"agent:authoring-bundle:validate",
|
|
970
|
+
"authoring-bundle:agent:validate",
|
|
971
|
+
"authoring-bundle:validate:agent"
|
|
972
|
+
]
|
|
973
|
+
},
|
|
888
974
|
"agent:test:create": {
|
|
889
975
|
"aliases": [],
|
|
890
976
|
"args": {},
|
|
@@ -1398,90 +1484,7 @@
|
|
|
1398
1484
|
"run:agent:test",
|
|
1399
1485
|
"run:test:agent"
|
|
1400
1486
|
]
|
|
1401
|
-
},
|
|
1402
|
-
"agent:validate:authoring-bundle": {
|
|
1403
|
-
"aliases": [],
|
|
1404
|
-
"args": {},
|
|
1405
|
-
"description": "Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is AiAuthoringBundle and they consist of a standard \"\\*-meta.xml\" metadata file and an agent file (with extension \".agent\") that fully describes the next-gen agent. Generate a local authoring bundle with the \"agent generate authoring-bundle\" command.\n\nThis command validates that the agent file (with extension \".agent\") that's part of the authoring bundle compiles without errors and can later be used to successfully create a next-gen agent.\n\nThis command requires the API name of the authoring bundle; if you don't provide it with the --api-name flag, the command prompts you for it.",
|
|
1406
|
-
"examples": [
|
|
1407
|
-
"Validate a local authoring bundle with API name MyAuthoringBundle:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle"
|
|
1408
|
-
],
|
|
1409
|
-
"flags": {
|
|
1410
|
-
"json": {
|
|
1411
|
-
"description": "Format output as json.",
|
|
1412
|
-
"helpGroup": "GLOBAL",
|
|
1413
|
-
"name": "json",
|
|
1414
|
-
"allowNo": false,
|
|
1415
|
-
"type": "boolean"
|
|
1416
|
-
},
|
|
1417
|
-
"flags-dir": {
|
|
1418
|
-
"helpGroup": "GLOBAL",
|
|
1419
|
-
"name": "flags-dir",
|
|
1420
|
-
"summary": "Import flag values from a directory.",
|
|
1421
|
-
"hasDynamicHelp": false,
|
|
1422
|
-
"multiple": false,
|
|
1423
|
-
"type": "option"
|
|
1424
|
-
},
|
|
1425
|
-
"target-org": {
|
|
1426
|
-
"char": "o",
|
|
1427
|
-
"name": "target-org",
|
|
1428
|
-
"noCacheDefault": true,
|
|
1429
|
-
"required": true,
|
|
1430
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1431
|
-
"hasDynamicHelp": true,
|
|
1432
|
-
"multiple": false,
|
|
1433
|
-
"type": "option"
|
|
1434
|
-
},
|
|
1435
|
-
"api-version": {
|
|
1436
|
-
"description": "Override the api version used for api requests made by this command",
|
|
1437
|
-
"name": "api-version",
|
|
1438
|
-
"hasDynamicHelp": false,
|
|
1439
|
-
"multiple": false,
|
|
1440
|
-
"type": "option"
|
|
1441
|
-
},
|
|
1442
|
-
"api-name": {
|
|
1443
|
-
"char": "n",
|
|
1444
|
-
"name": "api-name",
|
|
1445
|
-
"summary": "API name of the authoring bundle you want to validate.",
|
|
1446
|
-
"hasDynamicHelp": false,
|
|
1447
|
-
"multiple": false,
|
|
1448
|
-
"type": "option"
|
|
1449
|
-
}
|
|
1450
|
-
},
|
|
1451
|
-
"hasDynamicHelp": true,
|
|
1452
|
-
"hiddenAliases": [],
|
|
1453
|
-
"id": "agent:validate:authoring-bundle",
|
|
1454
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1455
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1456
|
-
"pluginType": "core",
|
|
1457
|
-
"strict": true,
|
|
1458
|
-
"summary": "Validate a local authoring bundle to ensure it compiles successfully and can be used to create a next-gen agent.",
|
|
1459
|
-
"enableJsonFlag": true,
|
|
1460
|
-
"requiresProject": true,
|
|
1461
|
-
"FLAGGABLE_PROMPTS": {
|
|
1462
|
-
"api-name": {
|
|
1463
|
-
"message": "API name of the authoring bundle you want to validate.",
|
|
1464
|
-
"promptMessage": "API name of the authoring bundle to validate"
|
|
1465
|
-
}
|
|
1466
|
-
},
|
|
1467
|
-
"isESM": true,
|
|
1468
|
-
"relativePath": [
|
|
1469
|
-
"lib",
|
|
1470
|
-
"commands",
|
|
1471
|
-
"agent",
|
|
1472
|
-
"validate",
|
|
1473
|
-
"authoring-bundle.js"
|
|
1474
|
-
],
|
|
1475
|
-
"aliasPermutations": [],
|
|
1476
|
-
"permutations": [
|
|
1477
|
-
"agent:validate:authoring-bundle",
|
|
1478
|
-
"validate:agent:authoring-bundle",
|
|
1479
|
-
"validate:authoring-bundle:agent",
|
|
1480
|
-
"agent:authoring-bundle:validate",
|
|
1481
|
-
"authoring-bundle:agent:validate",
|
|
1482
|
-
"authoring-bundle:validate:agent"
|
|
1483
|
-
]
|
|
1484
1487
|
}
|
|
1485
1488
|
},
|
|
1486
|
-
"version": "1.24.14-nga.
|
|
1489
|
+
"version": "1.24.14-nga.2"
|
|
1487
1490
|
}
|
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.24.14-nga.
|
|
4
|
+
"version": "1.24.14-nga.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@inquirer/prompts": "^7.8.6",
|
|
10
10
|
"@oclif/core": "^4",
|
|
11
11
|
"@oclif/multi-stage-output": "^0.8.23",
|
|
12
|
-
"@salesforce/agents": "nga",
|
|
12
|
+
"@salesforce/agents": "0.18.3-nga.6",
|
|
13
13
|
"@salesforce/core": "^8.23.1",
|
|
14
14
|
"@salesforce/kit": "^3.2.3",
|
|
15
15
|
"@salesforce/sf-plugins-core": "^12.2.4",
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
"exports": "./lib/index.js",
|
|
232
232
|
"type": "module",
|
|
233
233
|
"sfdx": {
|
|
234
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.14-nga.
|
|
235
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.14-nga.
|
|
234
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.14-nga.2.crt",
|
|
235
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.14-nga.2.sig"
|
|
236
236
|
}
|
|
237
237
|
}
|