@salesforce/plugin-agent 1.13.1 → 1.14.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 +92 -40
- package/lib/commands/agent/generate/agent-spec.d.ts +1 -0
- package/lib/commands/agent/generate/agent-spec.js +1 -0
- package/lib/commands/agent/generate/agent-spec.js.map +1 -1
- package/lib/commands/agent/generate/template.d.ts +18 -0
- package/lib/commands/agent/generate/template.js +48 -0
- package/lib/commands/agent/generate/template.js.map +1 -0
- package/messages/agent.create.md +13 -9
- package/messages/agent.generate.agent-spec.md +18 -6
- package/messages/agent.generate.template.md +21 -0
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +97 -8
- package/package.json +3 -3
- package/schemas/agent-generate-template.json +16 -0
package/README.md
CHANGED
|
@@ -63,6 +63,7 @@ sf plugins
|
|
|
63
63
|
|
|
64
64
|
- [`sf agent create`](#sf-agent-create)
|
|
65
65
|
- [`sf agent generate agent-spec`](#sf-agent-generate-agent-spec)
|
|
66
|
+
- [`sf agent generate template`](#sf-agent-generate-template)
|
|
66
67
|
- [`sf agent generate test-spec`](#sf-agent-generate-test-spec)
|
|
67
68
|
- [`sf agent preview`](#sf-agent-preview)
|
|
68
69
|
- [`sf agent test cancel`](#sf-agent-test-cancel)
|
|
@@ -98,33 +99,40 @@ GLOBAL FLAGS
|
|
|
98
99
|
DESCRIPTION
|
|
99
100
|
Create an agent in your org using a local agent spec file.
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
with the name (label) of the new agent
|
|
102
|
+
To run this comand, you must have an agent spec file, which is a YAML file that define the agent properties and
|
|
103
|
+
contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the "agent generate
|
|
104
|
+
agent-spec" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag,
|
|
105
|
+
along with the name (label) of the new agent with the --agent-name flag. If you don't specify any of the required
|
|
106
|
+
flags, the command prompts you.
|
|
105
107
|
|
|
106
|
-
When this command
|
|
107
|
-
agent's topics are the same as the ones listed in the agent spec file. The agent might also have
|
|
108
|
-
actions. This command also retrieves all the metadata files associated with the
|
|
109
|
-
project.
|
|
108
|
+
When this command completes, your org contains the new agent, which you can then edit and customize in the Agent
|
|
109
|
+
Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have
|
|
110
|
+
some AI-generated actions, or you can add them. This command also retrieves all the metadata files associated with the
|
|
111
|
+
new agent to your local Salesforce DX project.
|
|
110
112
|
|
|
111
|
-
Use the --preview flag to review what the agent looks like without actually saving it in your org.
|
|
112
|
-
creates a JSON file with all the agent details
|
|
113
|
+
Use the --preview flag to review what the agent looks like without actually saving it in your org. When previewing,
|
|
114
|
+
the command creates a JSON file in the current directory with all the agent details.
|
|
113
115
|
|
|
114
|
-
To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name
|
|
115
|
-
<api-name-of-your-agent>".
|
|
116
|
+
To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name <agent-api-name>".
|
|
116
117
|
|
|
117
118
|
EXAMPLES
|
|
118
|
-
Create an agent
|
|
119
|
+
Create an agent by being prompted for the required information, such as the agent spec file, agent name, and agent
|
|
120
|
+
API name and then create it in your default org:
|
|
119
121
|
|
|
120
|
-
$ sf agent create
|
|
122
|
+
$ sf agent create
|
|
121
123
|
|
|
122
|
-
|
|
124
|
+
Create an agent by specifying the agent name, API name, and spec file with flags; use the org with alias "my-org";
|
|
125
|
+
the command fails if the API name is already being used in your org:
|
|
123
126
|
|
|
124
|
-
$ sf agent create --agent-name
|
|
127
|
+
$ sf agent create --agent-name "Resort Manager" --agent-api-name Resort_Manager --spec \
|
|
128
|
+
specs/resortManagerAgent.yaml --target-org my-org
|
|
129
|
+
|
|
130
|
+
Preview the creation of an agent named "Resort Manager" and use your default org:
|
|
131
|
+
|
|
132
|
+
$ sf agent create --agent-name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
125
133
|
```
|
|
126
134
|
|
|
127
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
135
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/create.ts)_
|
|
128
136
|
|
|
129
137
|
## `sf agent generate agent-spec`
|
|
130
138
|
|
|
@@ -140,7 +148,7 @@ USAGE
|
|
|
140
148
|
FLAGS
|
|
141
149
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
142
150
|
configuration variable is already set.
|
|
143
|
-
-p, --no-prompt Don't prompt the user to confirm spec file
|
|
151
|
+
-p, --no-prompt Don't prompt the user to confirm that an existing spec file will be overwritten.
|
|
144
152
|
--agent-user=<value> Username of a user in your org to assign to your agent; determines what your agent
|
|
145
153
|
can access and do.
|
|
146
154
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
@@ -163,7 +171,8 @@ FLAGS
|
|
|
163
171
|
--tone=<option> Conversational style of the agent, such as how it expresses your brand personality
|
|
164
172
|
in its messages through word choice, punctuation, and sentence structure.
|
|
165
173
|
<options: formal|casual|neutral>
|
|
166
|
-
--type=<option> Type of agent to create.
|
|
174
|
+
--type=<option> Type of agent to create. Internal types are copilots used internally by your
|
|
175
|
+
company and customer types are the agents you create for your customers.
|
|
167
176
|
<options: customer|internal>
|
|
168
177
|
|
|
169
178
|
GLOBAL FLAGS
|
|
@@ -173,25 +182,26 @@ GLOBAL FLAGS
|
|
|
173
182
|
DESCRIPTION
|
|
174
183
|
Generate an agent spec, which is a YAML file that captures what an agent can do.
|
|
175
184
|
|
|
176
|
-
|
|
185
|
+
The first step in creating an agent in your org with Salesforce CLI is to generate an agent spec using this command.
|
|
177
186
|
An agent spec is a YAML-formatted file that contains information about the agent, such as its role and company
|
|
178
187
|
description, and then an AI-generated list of topics based on this information. Topics define the range of jobs your
|
|
179
188
|
agent can handle.
|
|
180
189
|
|
|
181
190
|
Use flags, such as --role and --company-description, to provide details about your company and the role that the agent
|
|
182
|
-
plays in your company. If you prefer, you can also be prompted for the information
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
topic.
|
|
188
|
-
|
|
189
|
-
You can iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this
|
|
191
|
+
plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be
|
|
192
|
+
prompted for all required and optional properties. Upon command execution, the large language model (LLM) associated
|
|
193
|
+
with your org uses the provided information to generate a list of topics for the agent. Because the LLM uses the
|
|
194
|
+
company and role information to generate the topics, we recommend that you provide accurate, complete, and specific
|
|
195
|
+
details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for
|
|
196
|
+
example, you can remove topics that don't apply or change a topic's description.
|
|
197
|
+
|
|
198
|
+
You can also iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this
|
|
190
199
|
command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively
|
|
191
200
|
improving the description of your agent allows the LLM to generate progressively better topics.
|
|
192
201
|
|
|
193
|
-
You can also specify a custom prompt template
|
|
194
|
-
|
|
202
|
+
You can also specify other agent properties, such as a custom prompt template, how to ground the prompt template to
|
|
203
|
+
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
|
|
204
|
+
agent.
|
|
195
205
|
|
|
196
206
|
When your agent spec is ready, you then create the agent in your org by running the "agent create" CLI command and
|
|
197
207
|
specifying the spec with the --spec flag.
|
|
@@ -209,15 +219,57 @@ EXAMPLES
|
|
|
209
219
|
|
|
210
220
|
$ sf agent generate agent-spec --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org
|
|
211
221
|
|
|
222
|
+
Be prompted for all required and optional agent properties; use your default org:
|
|
223
|
+
|
|
224
|
+
$ sf agent generate agent-spec --full-interview
|
|
225
|
+
|
|
212
226
|
Specify an existing agent spec file called "specs/resortManagerAgent.yaml", and then overwrite it with a new version
|
|
213
227
|
that contains newly AI-generated topics based on the updated role information passed in with the --role flag:
|
|
214
228
|
|
|
215
229
|
$ sf agent generate agent-spec --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml \
|
|
216
230
|
--role "Field customer complaints, manage employee schedules, and ensure all resort operations are running \
|
|
217
|
-
smoothly"
|
|
231
|
+
smoothly"
|
|
232
|
+
|
|
233
|
+
Specify that the conversational tone of the agent is formal and to attach the "resortmanager@myorg.com" username to
|
|
234
|
+
it; be prompted for the required properties and use your default org:
|
|
235
|
+
|
|
236
|
+
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/generate/agent-spec.ts)_
|
|
240
|
+
|
|
241
|
+
## `sf agent generate template`
|
|
242
|
+
|
|
243
|
+
Generate an agent template for packaging.
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
USAGE
|
|
247
|
+
$ sf agent generate template -o <value> --agent-api-name <value> [--json] [--flags-dir <value>] [--api-version <value>] [-d
|
|
248
|
+
<value>]
|
|
249
|
+
|
|
250
|
+
FLAGS
|
|
251
|
+
-d, --output-dir=<value> Directory to write the agent template.
|
|
252
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
253
|
+
configuration variable is already set.
|
|
254
|
+
--agent-api-name=<value> (required) API name of an existing Bot.
|
|
255
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
256
|
+
|
|
257
|
+
GLOBAL FLAGS
|
|
258
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
259
|
+
--json Format output as json.
|
|
260
|
+
|
|
261
|
+
DESCRIPTION
|
|
262
|
+
Generate an agent template for packaging.
|
|
263
|
+
|
|
264
|
+
Generate agent template metadata to for packaging your agent.
|
|
265
|
+
|
|
266
|
+
EXAMPLES
|
|
267
|
+
Generate an agent template from a Bot API name in your default package dir:
|
|
268
|
+
|
|
269
|
+
$ sf agent generate template --agent-api-name My_Packaged_Agent
|
|
218
270
|
```
|
|
219
271
|
|
|
220
|
-
_See code: [src/commands/agent/generate/
|
|
272
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/generate/template.ts)_
|
|
221
273
|
|
|
222
274
|
## `sf agent generate test-spec`
|
|
223
275
|
|
|
@@ -240,7 +292,7 @@ EXAMPLES
|
|
|
240
292
|
$ sf agent generate test-spec
|
|
241
293
|
```
|
|
242
294
|
|
|
243
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
295
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/generate/test-spec.ts)_
|
|
244
296
|
|
|
245
297
|
## `sf agent preview`
|
|
246
298
|
|
|
@@ -275,7 +327,7 @@ FLAG DESCRIPTIONS
|
|
|
275
327
|
the API name of the agent? (TBD based on agents library)
|
|
276
328
|
```
|
|
277
329
|
|
|
278
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
330
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/preview.ts)_
|
|
279
331
|
|
|
280
332
|
## `sf agent test cancel`
|
|
281
333
|
|
|
@@ -312,7 +364,7 @@ EXAMPLES
|
|
|
312
364
|
$ sf agent test cancel --job-id 4KBfake0000003F4AQ --target-org my-org
|
|
313
365
|
```
|
|
314
366
|
|
|
315
|
-
_See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
367
|
+
_See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/test/cancel.ts)_
|
|
316
368
|
|
|
317
369
|
## `sf agent test create`
|
|
318
370
|
|
|
@@ -348,7 +400,7 @@ FLAG DESCRIPTIONS
|
|
|
348
400
|
More information about a flag. Don't repeat the summary.
|
|
349
401
|
```
|
|
350
402
|
|
|
351
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
403
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/test/create.ts)_
|
|
352
404
|
|
|
353
405
|
## `sf agent test list`
|
|
354
406
|
|
|
@@ -377,7 +429,7 @@ EXAMPLES
|
|
|
377
429
|
$ sf agent test list
|
|
378
430
|
```
|
|
379
431
|
|
|
380
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
432
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/test/list.ts)_
|
|
381
433
|
|
|
382
434
|
## `sf agent test results`
|
|
383
435
|
|
|
@@ -433,7 +485,7 @@ FLAG DESCRIPTIONS
|
|
|
433
485
|
test results aren't written.
|
|
434
486
|
```
|
|
435
487
|
|
|
436
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
488
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/test/results.ts)_
|
|
437
489
|
|
|
438
490
|
## `sf agent test resume`
|
|
439
491
|
|
|
@@ -496,7 +548,7 @@ FLAG DESCRIPTIONS
|
|
|
496
548
|
test results aren't written.
|
|
497
549
|
```
|
|
498
550
|
|
|
499
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
551
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/test/resume.ts)_
|
|
500
552
|
|
|
501
553
|
## `sf agent test run`
|
|
502
554
|
|
|
@@ -559,6 +611,6 @@ FLAG DESCRIPTIONS
|
|
|
559
611
|
test results aren't written.
|
|
560
612
|
```
|
|
561
613
|
|
|
562
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
614
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.0/src/commands/agent/test/run.ts)_
|
|
563
615
|
|
|
564
616
|
<!-- commandsstop -->
|
|
@@ -16,6 +16,7 @@ const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.genera
|
|
|
16
16
|
export const FLAGGABLE_PROMPTS = {
|
|
17
17
|
type: {
|
|
18
18
|
message: messages.getMessage('flags.type.summary'),
|
|
19
|
+
promptMessage: messages.getMessage('flags.type.prompt'),
|
|
19
20
|
validate: (d) => d.length > 0 || 'Type cannot be empty',
|
|
20
21
|
options: ['customer', 'internal'],
|
|
21
22
|
required: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-spec.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/agent-spec.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAA8C,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAEL,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAE3B,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,Q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AAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAEzD,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAkB,EAAE,QAAQ,GAAG,KAAK,EAAmB,EAAE;IACxF,IAAI,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IAAI,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAClF,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;gBAC1C,OAAO,iBAAiB,CACtB,MAAM,aAAa,CAAC;oBAClB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;oBACzD,QAAQ,EAAE,CAAC,CAAS,EAAoB,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,6BAA6B;iBACzF,CAAC,CACH,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1C,kBAAkB,GAAG,GAAG,kBAAkB,OAAO,CAAC;IACpD,CAAC;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type AgentGenerateTemplateResult = {
|
|
3
|
+
path: string;
|
|
4
|
+
};
|
|
5
|
+
export default class AgentGenerateTemplate extends SfCommand<AgentGenerateTemplateResult> {
|
|
6
|
+
static readonly summary: string;
|
|
7
|
+
static readonly description: string;
|
|
8
|
+
static readonly examples: string[];
|
|
9
|
+
static state: string;
|
|
10
|
+
static readonly requiresProject = true;
|
|
11
|
+
static readonly flags: {
|
|
12
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'agent-api-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<AgentGenerateTemplateResult>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { dirname, join, resolve } from 'node:path';
|
|
8
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
9
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
10
|
+
import { Messages } from '@salesforce/core';
|
|
11
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.template');
|
|
13
|
+
export default class AgentGenerateTemplate extends SfCommand {
|
|
14
|
+
static summary = messages.getMessage('summary');
|
|
15
|
+
static description = messages.getMessage('description');
|
|
16
|
+
static examples = messages.getMessages('examples');
|
|
17
|
+
static state = 'beta';
|
|
18
|
+
static requiresProject = true;
|
|
19
|
+
static flags = {
|
|
20
|
+
'target-org': Flags.requiredOrg(),
|
|
21
|
+
'api-version': Flags.orgApiVersion(),
|
|
22
|
+
'agent-api-name': Flags.string({
|
|
23
|
+
summary: messages.getMessage('flags.agent-api-name.summary'),
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
'output-dir': Flags.directory({
|
|
27
|
+
char: 'd',
|
|
28
|
+
exists: true,
|
|
29
|
+
summary: messages.getMessage('flags.output-dir.summary'),
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
async run() {
|
|
33
|
+
const { flags } = await this.parse(AgentGenerateTemplate);
|
|
34
|
+
// TODO: look for a Bot with the agent API name
|
|
35
|
+
const botName = flags['agent-api-name'];
|
|
36
|
+
const outputDir = flags['output-dir'] ? resolve(flags['output-dir']) : this.project?.getDefaultPackage().fullPath;
|
|
37
|
+
const agentTemplateFilePath = join(outputDir, 'agentTemplates', `${botName}.agentTemplate-meta.xml`);
|
|
38
|
+
mkdirSync(dirname(agentTemplateFilePath), { recursive: true });
|
|
39
|
+
writeFileSync(agentTemplateFilePath, xmlContent);
|
|
40
|
+
this.log(`\nSaved agent template: ${agentTemplateFilePath}`);
|
|
41
|
+
return { path: agentTemplateFilePath };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const xmlContent = `<?xml version="1.0" encoding="UTF-8"?>
|
|
45
|
+
<AgentTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
46
|
+
</AgentTemplate>
|
|
47
|
+
`;
|
|
48
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAA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CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC,QAAQ,CAAC;QAElH,MAAM,qBAAqB,GAAG,IAAI,CAAC,SAAmB,EAAE,gBAAgB,EAAE,GAAG,OAAO,yBAAyB,CAAC,CAAC;QAC/G,SAAS,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAE/D,aAAa,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;QAEjD,IAAI,CAAC,GAAG,CAAC,2BAA2B,qBAAqB,EAAE,CAAC,CAAC;QAE7D,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;IACzC,CAAC;;AAGH,MAAM,UAAU,GAAG;;;CAGlB,CAAC"}
|
package/messages/agent.create.md
CHANGED
|
@@ -4,13 +4,13 @@ Create an agent in your org using a local agent spec file.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
To run this comand, you must have an agent spec file, which is a YAML file that define the agent properties and contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the "agent generate agent-spec" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag, along with the name (label) of the new agent with the --agent-name flag. If you don't specify any of the required flags, the command prompts you.
|
|
8
8
|
|
|
9
|
-
When this command
|
|
9
|
+
When 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.
|
|
10
10
|
|
|
11
|
-
Use the --preview flag to review what the agent looks like without actually saving it in your org.
|
|
11
|
+
Use 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.
|
|
12
12
|
|
|
13
|
-
To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name <api-name
|
|
13
|
+
To open the new agent in your org's Agent Builder UI, run this command: "sf org open agent --name <agent-api-name>".
|
|
14
14
|
|
|
15
15
|
# flags.spec.summary
|
|
16
16
|
|
|
@@ -42,14 +42,18 @@ Missing required flags: %s
|
|
|
42
42
|
|
|
43
43
|
# error.missingRequiredSpecProperties
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Your agent spec file is missing these required properties: %s.
|
|
46
46
|
|
|
47
47
|
# examples
|
|
48
48
|
|
|
49
|
-
- Create an agent
|
|
49
|
+
- Create an agent by being prompted for the required information, such as the agent spec file, agent name, and agent API name and then create it in your default org:
|
|
50
50
|
|
|
51
|
-
<%= config.bin %> <%= command.id %>
|
|
51
|
+
<%= config.bin %> <%= command.id %>
|
|
52
52
|
|
|
53
|
-
-
|
|
53
|
+
- 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:
|
|
54
54
|
|
|
55
|
-
<%= config.bin %> <%= command.id %> --agent-name
|
|
55
|
+
<%= config.bin %> <%= command.id %> --agent-name "Resort Manager" --agent-api-name Resort_Manager --spec specs/resortManagerAgent.yaml --target-org my-org
|
|
56
|
+
|
|
57
|
+
- Preview the creation of an agent named "Resort Manager" and use your default org:
|
|
58
|
+
|
|
59
|
+
<%= config.bin %> <%= command.id %> --agent-name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
@@ -4,18 +4,22 @@ Generate an agent spec, which is a YAML file that captures what an agent can do.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
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.
|
|
8
8
|
|
|
9
|
-
Use 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 information. Upon command execution, the large language model (LLM) associated with your org uses the information
|
|
9
|
+
Use 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.
|
|
10
10
|
|
|
11
|
-
You can 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.
|
|
11
|
+
You 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.
|
|
12
12
|
|
|
13
|
-
You can also specify a custom prompt template
|
|
13
|
+
You 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.
|
|
14
14
|
|
|
15
15
|
When 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.
|
|
16
16
|
|
|
17
17
|
# flags.type.summary
|
|
18
18
|
|
|
19
|
+
Type of agent to create. Internal types are copilots used internally by your company and customer types are the agents you create for your customers.
|
|
20
|
+
|
|
21
|
+
# flags.type.prompt
|
|
22
|
+
|
|
19
23
|
Type of agent to create.
|
|
20
24
|
|
|
21
25
|
# flags.role.summary
|
|
@@ -92,7 +96,7 @@ Language the agent uses in conversations.
|
|
|
92
96
|
|
|
93
97
|
# flags.no-prompt.summary
|
|
94
98
|
|
|
95
|
-
Don't prompt the user to confirm spec file
|
|
99
|
+
Don't prompt the user to confirm that an existing spec file will be overwritten.
|
|
96
100
|
|
|
97
101
|
# examples
|
|
98
102
|
|
|
@@ -104,9 +108,17 @@ Don't prompt the user to confirm spec file overwrite.
|
|
|
104
108
|
|
|
105
109
|
<%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org
|
|
106
110
|
|
|
111
|
+
- Be prompted for all required and optional agent properties; use your default org:
|
|
112
|
+
|
|
113
|
+
<%= config.bin %> <%= command.id %> --full-interview
|
|
114
|
+
|
|
107
115
|
- Specify an existing agent spec file called "specs/resortManagerAgent.yaml", and then overwrite it with a new version that contains newly AI-generated topics based on the updated role information passed in with the --role flag:
|
|
108
116
|
|
|
109
|
-
<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role "Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly"
|
|
117
|
+
<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role "Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly"
|
|
118
|
+
|
|
119
|
+
- Specify that the conversational tone of the agent is formal and to attach the "resortmanager@myorg.com" username to it; be prompted for the required properties and use your default org:
|
|
120
|
+
|
|
121
|
+
<%= config.bin %> <%= command.id %> --tone formal --agent-user resortmanager@myorg.com
|
|
110
122
|
|
|
111
123
|
# error.missingRequiredFlags
|
|
112
124
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate an agent template for packaging.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Generate agent template metadata to for packaging your agent.
|
|
8
|
+
|
|
9
|
+
# flags.agent-api-name.summary
|
|
10
|
+
|
|
11
|
+
API name of an existing Bot.
|
|
12
|
+
|
|
13
|
+
# flags.output-dir.summary
|
|
14
|
+
|
|
15
|
+
Directory to write the agent template.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Generate an agent template from a Bot API name in your default package dir:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --agent-api-name My_Packaged_Agent
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/plugin-agent",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.14.0",
|
|
10
10
|
"license": "BSD-3-Clause",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@inquirer/figures": "^1.0.7",
|
package/oclif.manifest.json
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
"agent:create": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "To run this comand, you must have an agent spec file, which is a YAML file that define the agent properties and contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the \"agent generate agent-spec\" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag, along with the name (label) of the new agent with the --agent-name flag. If you don't specify any of the required flags, the command prompts you.\n\nWhen this command completes, your org contains the new agent, which you can then edit and customize in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions, or you can add them. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.\n\nUse the --preview flag to review what the agent looks like without actually saving it in your org. When previewing, the command creates a JSON file in the current directory with all the agent details.\n\nTo open the new agent in your org's Agent Builder UI, run this command: \"sf org open agent --name <agent-api-name>\".",
|
|
7
7
|
"examples": [
|
|
8
|
-
"Create an agent
|
|
9
|
-
"
|
|
8
|
+
"Create an agent by being prompted for the required information, such as the agent spec file, agent name, and agent API name and then create it in your default org:\n<%= config.bin %> <%= command.id %>",
|
|
9
|
+
"Create an agent by specifying the agent name, API name, and spec file with flags; use the org with alias \"my-org\"; the command fails if the API name is already being used in your org:\n<%= config.bin %> <%= command.id %> --agent-name \"Resort Manager\" --agent-api-name Resort_Manager --spec specs/resortManagerAgent.yaml --target-org my-org",
|
|
10
|
+
"Preview the creation of an agent named \"Resort Manager\" and use your default org:\n<%= config.bin %> <%= command.id %> --agent-name \"Resort Manager\" --spec specs/resortManagerAgent.yaml --preview"
|
|
10
11
|
],
|
|
11
12
|
"flags": {
|
|
12
13
|
"json": {
|
|
@@ -172,11 +173,13 @@
|
|
|
172
173
|
"agent:generate:agent-spec": {
|
|
173
174
|
"aliases": [],
|
|
174
175
|
"args": {},
|
|
175
|
-
"description": "
|
|
176
|
+
"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.",
|
|
176
177
|
"examples": [
|
|
177
178
|
"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.\"",
|
|
178
179
|
"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",
|
|
179
|
-
"
|
|
180
|
+
"Be prompted for all required and optional agent properties; use your default org:\n<%= config.bin %> <%= command.id %> --full-interview",
|
|
181
|
+
"Specify an existing agent spec file called \"specs/resortManagerAgent.yaml\", and then overwrite it with a new version that contains newly AI-generated topics based on the updated role information passed in with the --role flag:\n<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role \"Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly\"",
|
|
182
|
+
"Specify that the conversational tone of the agent is formal and to attach the \"resortmanager@myorg.com\" username to it; be prompted for the required properties and use your default org:\n<%= config.bin %> <%= command.id %> --tone formal --agent-user resortmanager@myorg.com"
|
|
180
183
|
],
|
|
181
184
|
"flags": {
|
|
182
185
|
"json": {
|
|
@@ -213,7 +216,7 @@
|
|
|
213
216
|
},
|
|
214
217
|
"type": {
|
|
215
218
|
"name": "type",
|
|
216
|
-
"summary": "Type of agent to create.",
|
|
219
|
+
"summary": "Type of agent to create. Internal types are copilots used internally by your company and customer types are the agents you create for your customers.",
|
|
217
220
|
"hasDynamicHelp": false,
|
|
218
221
|
"multiple": false,
|
|
219
222
|
"options": [
|
|
@@ -328,7 +331,7 @@
|
|
|
328
331
|
"no-prompt": {
|
|
329
332
|
"char": "p",
|
|
330
333
|
"name": "no-prompt",
|
|
331
|
-
"summary": "Don't prompt the user to confirm spec file
|
|
334
|
+
"summary": "Don't prompt the user to confirm that an existing spec file will be overwritten.",
|
|
332
335
|
"allowNo": false,
|
|
333
336
|
"type": "boolean"
|
|
334
337
|
}
|
|
@@ -362,6 +365,92 @@
|
|
|
362
365
|
"agent-spec:generate:agent"
|
|
363
366
|
]
|
|
364
367
|
},
|
|
368
|
+
"agent:generate:template": {
|
|
369
|
+
"aliases": [],
|
|
370
|
+
"args": {},
|
|
371
|
+
"description": "Generate agent template metadata to for packaging your agent.",
|
|
372
|
+
"examples": [
|
|
373
|
+
"Generate an agent template from a Bot API name in your default package dir:\n<%= config.bin %> <%= command.id %> --agent-api-name My_Packaged_Agent"
|
|
374
|
+
],
|
|
375
|
+
"flags": {
|
|
376
|
+
"json": {
|
|
377
|
+
"description": "Format output as json.",
|
|
378
|
+
"helpGroup": "GLOBAL",
|
|
379
|
+
"name": "json",
|
|
380
|
+
"allowNo": false,
|
|
381
|
+
"type": "boolean"
|
|
382
|
+
},
|
|
383
|
+
"flags-dir": {
|
|
384
|
+
"helpGroup": "GLOBAL",
|
|
385
|
+
"name": "flags-dir",
|
|
386
|
+
"summary": "Import flag values from a directory.",
|
|
387
|
+
"hasDynamicHelp": false,
|
|
388
|
+
"multiple": false,
|
|
389
|
+
"type": "option"
|
|
390
|
+
},
|
|
391
|
+
"target-org": {
|
|
392
|
+
"char": "o",
|
|
393
|
+
"name": "target-org",
|
|
394
|
+
"noCacheDefault": true,
|
|
395
|
+
"required": true,
|
|
396
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
397
|
+
"hasDynamicHelp": true,
|
|
398
|
+
"multiple": false,
|
|
399
|
+
"type": "option"
|
|
400
|
+
},
|
|
401
|
+
"api-version": {
|
|
402
|
+
"description": "Override the api version used for api requests made by this command",
|
|
403
|
+
"name": "api-version",
|
|
404
|
+
"hasDynamicHelp": false,
|
|
405
|
+
"multiple": false,
|
|
406
|
+
"type": "option"
|
|
407
|
+
},
|
|
408
|
+
"agent-api-name": {
|
|
409
|
+
"name": "agent-api-name",
|
|
410
|
+
"required": true,
|
|
411
|
+
"summary": "API name of an existing Bot.",
|
|
412
|
+
"hasDynamicHelp": false,
|
|
413
|
+
"multiple": false,
|
|
414
|
+
"type": "option"
|
|
415
|
+
},
|
|
416
|
+
"output-dir": {
|
|
417
|
+
"char": "d",
|
|
418
|
+
"name": "output-dir",
|
|
419
|
+
"summary": "Directory to write the agent template.",
|
|
420
|
+
"hasDynamicHelp": false,
|
|
421
|
+
"multiple": false,
|
|
422
|
+
"type": "option"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"hasDynamicHelp": true,
|
|
426
|
+
"hiddenAliases": [],
|
|
427
|
+
"id": "agent:generate:template",
|
|
428
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
429
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
430
|
+
"pluginType": "core",
|
|
431
|
+
"state": "beta",
|
|
432
|
+
"strict": true,
|
|
433
|
+
"summary": "Generate an agent template for packaging.",
|
|
434
|
+
"enableJsonFlag": true,
|
|
435
|
+
"requiresProject": true,
|
|
436
|
+
"isESM": true,
|
|
437
|
+
"relativePath": [
|
|
438
|
+
"lib",
|
|
439
|
+
"commands",
|
|
440
|
+
"agent",
|
|
441
|
+
"generate",
|
|
442
|
+
"template.js"
|
|
443
|
+
],
|
|
444
|
+
"aliasPermutations": [],
|
|
445
|
+
"permutations": [
|
|
446
|
+
"agent:generate:template",
|
|
447
|
+
"generate:agent:template",
|
|
448
|
+
"generate:template:agent",
|
|
449
|
+
"agent:template:generate",
|
|
450
|
+
"template:agent:generate",
|
|
451
|
+
"template:generate:agent"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
365
454
|
"agent:generate:test-spec": {
|
|
366
455
|
"aliases": [],
|
|
367
456
|
"args": {},
|
|
@@ -985,5 +1074,5 @@
|
|
|
985
1074
|
]
|
|
986
1075
|
}
|
|
987
1076
|
},
|
|
988
|
-
"version": "1.
|
|
1077
|
+
"version": "1.14.0"
|
|
989
1078
|
}
|
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.14.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"exports": "./lib/index.js",
|
|
227
227
|
"type": "module",
|
|
228
228
|
"sfdx": {
|
|
229
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
230
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
229
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.14.0.crt",
|
|
230
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.14.0.sig"
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/AgentGenerateTemplateResult",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AgentGenerateTemplateResult": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"path": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": ["path"],
|
|
13
|
+
"additionalProperties": false
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|