@salesforce/plugin-agent 1.23.8 → 1.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -12
- package/lib/agentActivation.d.ts +22 -0
- package/lib/agentActivation.js +74 -0
- package/lib/agentActivation.js.map +1 -0
- package/lib/commands/agent/activate.d.ts +12 -0
- package/lib/commands/agent/activate.js +38 -0
- package/lib/commands/agent/activate.js.map +1 -0
- package/lib/commands/agent/create.d.ts +1 -1
- package/lib/commands/agent/deactivate.d.ts +12 -0
- package/lib/commands/agent/deactivate.js +38 -0
- package/lib/commands/agent/deactivate.js.map +1 -0
- package/lib/commands/agent/test/create.d.ts +1 -1
- package/messages/agent.activate.md +27 -0
- package/messages/agent.activation.md +15 -0
- package/messages/agent.deactivate.md +27 -0
- package/messages/agent.generate.test-spec.md +2 -0
- package/messages/agent.preview.md +2 -2
- package/npm-shrinkwrap.json +259 -257
- package/oclif.lock +242 -243
- package/oclif.manifest.json +148 -4
- package/package.json +5 -5
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
+
"agent:activate": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "Activating an agent makes it immediately available to your users. An agent must be active before you can preview it with the \"agent preview\" CLI command or VS Code.\n\nYou must know the agent's API name to activate it; you can either be prompted for it or you can specify it with the --api-name flag. Find the agent's API name in its Agent Details page of your org's Agentforce Studio UI in Setup.",
|
|
7
|
+
"examples": [
|
|
8
|
+
"Activate an agent in your default target org by being prompted:\n<%= config.bin %> <%= command.id %>",
|
|
9
|
+
"Activate an agent with API name Resort_Manager in the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org"
|
|
10
|
+
],
|
|
11
|
+
"flags": {
|
|
12
|
+
"json": {
|
|
13
|
+
"description": "Format output as json.",
|
|
14
|
+
"helpGroup": "GLOBAL",
|
|
15
|
+
"name": "json",
|
|
16
|
+
"allowNo": false,
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
|
+
"flags-dir": {
|
|
20
|
+
"helpGroup": "GLOBAL",
|
|
21
|
+
"name": "flags-dir",
|
|
22
|
+
"summary": "Import flag values from a directory.",
|
|
23
|
+
"hasDynamicHelp": false,
|
|
24
|
+
"multiple": false,
|
|
25
|
+
"type": "option"
|
|
26
|
+
},
|
|
27
|
+
"target-org": {
|
|
28
|
+
"char": "o",
|
|
29
|
+
"name": "target-org",
|
|
30
|
+
"noCacheDefault": true,
|
|
31
|
+
"required": true,
|
|
32
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
33
|
+
"hasDynamicHelp": true,
|
|
34
|
+
"multiple": false,
|
|
35
|
+
"type": "option"
|
|
36
|
+
},
|
|
37
|
+
"api-version": {
|
|
38
|
+
"description": "Override the api version used for api requests made by this command",
|
|
39
|
+
"name": "api-version",
|
|
40
|
+
"hasDynamicHelp": false,
|
|
41
|
+
"multiple": false,
|
|
42
|
+
"type": "option"
|
|
43
|
+
},
|
|
44
|
+
"api-name": {
|
|
45
|
+
"char": "n",
|
|
46
|
+
"name": "api-name",
|
|
47
|
+
"summary": "API name of the agent to activate.",
|
|
48
|
+
"hasDynamicHelp": false,
|
|
49
|
+
"multiple": false,
|
|
50
|
+
"type": "option"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"hasDynamicHelp": true,
|
|
54
|
+
"hiddenAliases": [],
|
|
55
|
+
"id": "agent:activate",
|
|
56
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
57
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
58
|
+
"pluginType": "core",
|
|
59
|
+
"strict": true,
|
|
60
|
+
"summary": "Activate an agent in an org.",
|
|
61
|
+
"enableJsonFlag": true,
|
|
62
|
+
"isESM": true,
|
|
63
|
+
"relativePath": [
|
|
64
|
+
"lib",
|
|
65
|
+
"commands",
|
|
66
|
+
"agent",
|
|
67
|
+
"activate.js"
|
|
68
|
+
],
|
|
69
|
+
"aliasPermutations": [],
|
|
70
|
+
"permutations": [
|
|
71
|
+
"agent:activate",
|
|
72
|
+
"activate:agent"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
3
75
|
"agent:create": {
|
|
4
76
|
"aliases": [],
|
|
5
77
|
"args": {},
|
|
@@ -101,12 +173,84 @@
|
|
|
101
173
|
"create:agent"
|
|
102
174
|
]
|
|
103
175
|
},
|
|
176
|
+
"agent:deactivate": {
|
|
177
|
+
"aliases": [],
|
|
178
|
+
"args": {},
|
|
179
|
+
"description": "Deactivating an agent makes it unavailable to your users. To make changes to an agent, such as adding or removing topics or actions, you must deactivate it. You can't preview an agent with the \"agent preview\" CLI command or VS Code if it's deactivated.\n\nYou must know the agent's API name to deactivate it; you can either be prompted for it or you can specify it with the --api-name flag. Find the agent's API name in its Agent Details page of your org's Agentforce Studio UI in Setup.",
|
|
180
|
+
"examples": [
|
|
181
|
+
"Deactivate an agent in your default target org by being prompted:\n<%= config.bin %> <%= command.id %>",
|
|
182
|
+
"Deactivate the agent Resort_Manager in the org with alias \"my_org\":\n<%= config.bin %> <%= command.id %> --api-name Resort_Manager --target-org my-org"
|
|
183
|
+
],
|
|
184
|
+
"flags": {
|
|
185
|
+
"json": {
|
|
186
|
+
"description": "Format output as json.",
|
|
187
|
+
"helpGroup": "GLOBAL",
|
|
188
|
+
"name": "json",
|
|
189
|
+
"allowNo": false,
|
|
190
|
+
"type": "boolean"
|
|
191
|
+
},
|
|
192
|
+
"flags-dir": {
|
|
193
|
+
"helpGroup": "GLOBAL",
|
|
194
|
+
"name": "flags-dir",
|
|
195
|
+
"summary": "Import flag values from a directory.",
|
|
196
|
+
"hasDynamicHelp": false,
|
|
197
|
+
"multiple": false,
|
|
198
|
+
"type": "option"
|
|
199
|
+
},
|
|
200
|
+
"target-org": {
|
|
201
|
+
"char": "o",
|
|
202
|
+
"name": "target-org",
|
|
203
|
+
"noCacheDefault": true,
|
|
204
|
+
"required": true,
|
|
205
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
206
|
+
"hasDynamicHelp": true,
|
|
207
|
+
"multiple": false,
|
|
208
|
+
"type": "option"
|
|
209
|
+
},
|
|
210
|
+
"api-version": {
|
|
211
|
+
"description": "Override the api version used for api requests made by this command",
|
|
212
|
+
"name": "api-version",
|
|
213
|
+
"hasDynamicHelp": false,
|
|
214
|
+
"multiple": false,
|
|
215
|
+
"type": "option"
|
|
216
|
+
},
|
|
217
|
+
"api-name": {
|
|
218
|
+
"char": "n",
|
|
219
|
+
"name": "api-name",
|
|
220
|
+
"summary": "API name of the agent to deactivate.",
|
|
221
|
+
"hasDynamicHelp": false,
|
|
222
|
+
"multiple": false,
|
|
223
|
+
"type": "option"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"hasDynamicHelp": true,
|
|
227
|
+
"hiddenAliases": [],
|
|
228
|
+
"id": "agent:deactivate",
|
|
229
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
230
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
231
|
+
"pluginType": "core",
|
|
232
|
+
"strict": true,
|
|
233
|
+
"summary": "Deactivate an agent in an org.",
|
|
234
|
+
"enableJsonFlag": true,
|
|
235
|
+
"isESM": true,
|
|
236
|
+
"relativePath": [
|
|
237
|
+
"lib",
|
|
238
|
+
"commands",
|
|
239
|
+
"agent",
|
|
240
|
+
"deactivate.js"
|
|
241
|
+
],
|
|
242
|
+
"aliasPermutations": [],
|
|
243
|
+
"permutations": [
|
|
244
|
+
"agent:deactivate",
|
|
245
|
+
"deactivate:agent"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
104
248
|
"agent:preview": {
|
|
105
249
|
"aliases": [],
|
|
106
250
|
"args": {},
|
|
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
|
|
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.",
|
|
108
252
|
"examples": [
|
|
109
|
-
"Interact with an agent with API name
|
|
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",
|
|
110
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"
|
|
111
255
|
],
|
|
112
256
|
"flags": {
|
|
@@ -467,7 +611,7 @@
|
|
|
467
611
|
"agent:generate:test-spec": {
|
|
468
612
|
"aliases": [],
|
|
469
613
|
"args": {},
|
|
470
|
-
"description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.\n\nIf you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag.",
|
|
614
|
+
"description": "The first step when using Salesforce CLI to create an agent test in your org is to use this interactive command to generate a local YAML-formatted test spec file. The test spec YAML file contains information about the agent being tested, such as its API name, and then one or more test cases. This command uses the metadata components in your DX project when prompting for information, such as the agent API name; it doesn't look in your org.\n\nTo generate a specific agent test case, this command prompts you for this information; when possible, the command provides a list of options for you to choose from:\n\n- Utterance: Natural language statement, question, or command used to test the agent.\n- Expected topic: API name of the topic you expect the agent to use when responding to the utterance.\n- Expected actions: One or more API names of the expection actions the agent takes.\n- Expected outcome: Natural language description of the outcome you expect.\n- (Optional) Custom evaluation: Test an agent's response for specific strings or numbers.\n- (Optional) Conversation history: Boilerplate for additional context you can add to the test in the form of a conversation history.\n\nWhen your test spec is ready, you then run the \"agent test create\" command to actually create the test in your org and synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition.\n\nIf you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can generate its equivalent YAML test spec file with the --from-definition flag.",
|
|
471
615
|
"examples": [
|
|
472
616
|
"Generate an agent test spec YAML file interactively:\n<%= config.bin %> <%= command.id %>",
|
|
473
617
|
"Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without confirmation:\n<%= config.bin %> <%= command.id %> --output-file specs/Resort_Manager-new-version-testSpec.yaml --force-overwrite",
|
|
@@ -1026,5 +1170,5 @@
|
|
|
1026
1170
|
]
|
|
1027
1171
|
}
|
|
1028
1172
|
},
|
|
1029
|
-
"version": "1.
|
|
1173
|
+
"version": "1.24.1"
|
|
1030
1174
|
}
|
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.
|
|
4
|
+
"version": "1.24.1",
|
|
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.2.0",
|
|
10
10
|
"@oclif/core": "^4",
|
|
11
11
|
"@oclif/multi-stage-output": "^0.8.20",
|
|
12
|
-
"@salesforce/agents": "
|
|
12
|
+
"@salesforce/agents": "0.17.0",
|
|
13
13
|
"@salesforce/core": "^8.18.5",
|
|
14
14
|
"@salesforce/kit": "^3.2.3",
|
|
15
15
|
"@salesforce/sf-plugins-core": "^12.2.3",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"prepack": "sf-prepack",
|
|
106
106
|
"prepare": "sf-install",
|
|
107
107
|
"test": "wireit",
|
|
108
|
-
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --
|
|
108
|
+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --reporter-options maxDiffSize=15000",
|
|
109
109
|
"test:only": "wireit",
|
|
110
110
|
"version": "oclif readme"
|
|
111
111
|
},
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"exports": "./lib/index.js",
|
|
231
231
|
"type": "module",
|
|
232
232
|
"sfdx": {
|
|
233
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
234
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
233
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.1.crt",
|
|
234
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.1.sig"
|
|
235
235
|
}
|
|
236
236
|
}
|