@salesforce/plugin-agent 1.19.5 → 1.20.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.
- package/README.md +64 -23
- package/lib/commands/agent/preview.d.ts +30 -1
- package/lib/commands/agent/preview.js +98 -7
- package/lib/commands/agent/preview.js.map +1 -1
- package/lib/components/agent-preview-react.d.ts +7 -1
- package/lib/components/agent-preview-react.js +124 -30
- package/lib/components/agent-preview-react.js.map +1 -1
- package/messages/agent.preview.md +37 -8
- package/npm-shrinkwrap.json +3696 -2907
- package/oclif.lock +2788 -2404
- package/oclif.manifest.json +27 -10
- package/package.json +9 -9
package/oclif.manifest.json
CHANGED
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
"agent:preview": {
|
|
106
106
|
"aliases": [],
|
|
107
107
|
"args": {},
|
|
108
|
-
"description": "
|
|
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\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 additional steps:\n\n 1. When specifying the connected app's Callback URL, add this second callback URL on a new line: http://localhost:1717/OauthRedirect\n\n 2. 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. Using the username of the user you specified as the \"Run As\" user above, authorize your org using the JWT flow, as described in this document: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm.\n\n4. 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
109
|
"examples": [
|
|
110
|
-
"<%= config.bin %> <%= command.id %> --name
|
|
111
|
-
"<%= config.bin %> <%= command.id %> --name
|
|
110
|
+
"Interact with an agent with API name \"Resort_Manager\" in the org with alias \"my-org\". Connect to your agent using the alias \"my-jwt-user\"; this alias must point to the username who is authorized using JWT:\n<%= config.bin %> <%= command.id %> --api-name \"Resort_Manager\" --target-org my-org --connected-app-user my-jwt-user",
|
|
111
|
+
"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-jwt-user --output-dir \"transcripts/my-preview\""
|
|
112
112
|
],
|
|
113
113
|
"flags": {
|
|
114
114
|
"flags-dir": {
|
|
@@ -136,12 +136,28 @@
|
|
|
136
136
|
"multiple": false,
|
|
137
137
|
"type": "option"
|
|
138
138
|
},
|
|
139
|
-
"
|
|
140
|
-
"char": "
|
|
141
|
-
"
|
|
142
|
-
"
|
|
139
|
+
"connected-app-user": {
|
|
140
|
+
"char": "a",
|
|
141
|
+
"name": "connected-app-user",
|
|
142
|
+
"noCacheDefault": true,
|
|
143
143
|
"required": true,
|
|
144
|
-
"summary": "
|
|
144
|
+
"summary": "Username or alias of the connected app user that's configured with JWT-based access tokens to the agent.",
|
|
145
|
+
"hasDynamicHelp": true,
|
|
146
|
+
"multiple": false,
|
|
147
|
+
"type": "option"
|
|
148
|
+
},
|
|
149
|
+
"api-name": {
|
|
150
|
+
"char": "n",
|
|
151
|
+
"name": "api-name",
|
|
152
|
+
"summary": "API name of the agent you want to interact with.",
|
|
153
|
+
"hasDynamicHelp": false,
|
|
154
|
+
"multiple": false,
|
|
155
|
+
"type": "option"
|
|
156
|
+
},
|
|
157
|
+
"output-dir": {
|
|
158
|
+
"char": "d",
|
|
159
|
+
"name": "output-dir",
|
|
160
|
+
"summary": "Directory where conversation transcripts are saved.",
|
|
145
161
|
"hasDynamicHelp": false,
|
|
146
162
|
"multiple": false,
|
|
147
163
|
"type": "option"
|
|
@@ -153,8 +169,9 @@
|
|
|
153
169
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
154
170
|
"pluginName": "@salesforce/plugin-agent",
|
|
155
171
|
"pluginType": "core",
|
|
172
|
+
"state": "preview",
|
|
156
173
|
"strict": true,
|
|
157
|
-
"summary": "Interact with an active agent
|
|
174
|
+
"summary": "Interact with an active agent to preview how the agent responds to your statements, questions, and commands (utterances).",
|
|
158
175
|
"enableJsonFlag": false,
|
|
159
176
|
"requiresProject": true,
|
|
160
177
|
"isESM": true,
|
|
@@ -1095,5 +1112,5 @@
|
|
|
1095
1112
|
]
|
|
1096
1113
|
}
|
|
1097
1114
|
},
|
|
1098
|
-
"version": "1.
|
|
1115
|
+
"version": "1.20.0"
|
|
1099
1116
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-agent",
|
|
3
3
|
"description": "Commands to interact with Salesforce agents",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.20.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@inquirer/core": "^10.1.6",
|
|
9
|
-
"@inquirer/figures": "^1.0.7",
|
|
10
9
|
"@inquirer/prompts": "^7.2.0",
|
|
11
10
|
"@oclif/core": "^4",
|
|
12
11
|
"@oclif/multi-stage-output": "^0.7.12",
|
|
13
|
-
"@salesforce/agents": "0.12.
|
|
14
|
-
"@salesforce/core": "^8.8.
|
|
12
|
+
"@salesforce/agents": "0.12.9",
|
|
13
|
+
"@salesforce/core": "^8.8.3",
|
|
15
14
|
"@salesforce/kit": "^3.2.1",
|
|
16
|
-
"@salesforce/sf-plugins-core": "^12.
|
|
15
|
+
"@salesforce/sf-plugins-core": "^12.2.0",
|
|
17
16
|
"@salesforce/source-deploy-retrieve": "^12.14.0",
|
|
18
17
|
"@salesforce/types": "^1.3.0",
|
|
19
18
|
"ansis": "^3.3.2",
|
|
@@ -28,8 +27,9 @@
|
|
|
28
27
|
"@oclif/plugin-command-snapshot": "^5.2.19",
|
|
29
28
|
"@oclif/test": "^4.1.0",
|
|
30
29
|
"@salesforce/cli-plugins-testkit": "^5.3.35",
|
|
31
|
-
"@salesforce/dev-scripts": "^10.2.
|
|
30
|
+
"@salesforce/dev-scripts": "^10.2.12",
|
|
32
31
|
"@salesforce/plugin-command-reference": "^3.1.29",
|
|
32
|
+
"@types/inquirer": "^9.0.7",
|
|
33
33
|
"@types/react": "^18.3.3",
|
|
34
34
|
"eslint-config-xo": "^0.45.0",
|
|
35
35
|
"eslint-config-xo-react": "^0.27.0",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"output": []
|
|
218
218
|
},
|
|
219
219
|
"link-check": {
|
|
220
|
-
"command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|%s\" --markdown --retry --directory-listing --verbosity error",
|
|
220
|
+
"command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|localhost|%s\" --markdown --retry --directory-listing --verbosity error",
|
|
221
221
|
"files": [
|
|
222
222
|
"./*.md",
|
|
223
223
|
"./!(CHANGELOG).md",
|
|
@@ -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.
|
|
233
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
232
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.20.0.crt",
|
|
233
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.20.0.sig"
|
|
234
234
|
}
|
|
235
235
|
}
|