@salesforce/plugin-agent 1.24.14-demo.2 → 1.24.14-demo.6
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 +30 -29
- package/lib/commands/agent/generate/authoring-bundle.d.ts +2 -2
- package/lib/commands/agent/generate/authoring-bundle.js +60 -21
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -1
- package/lib/commands/agent/preview.d.ts +1 -2
- package/lib/commands/agent/preview.js +4 -3
- package/lib/commands/agent/preview.js.map +1 -1
- package/lib/commands/agent/publish/authoring-bundle.d.ts +2 -2
- package/lib/commands/agent/publish/authoring-bundle.js +25 -7
- package/lib/commands/agent/publish/authoring-bundle.js.map +1 -1
- package/lib/commands/agent/validate/authoring-bundle.d.ts +2 -2
- package/lib/commands/agent/validate/authoring-bundle.js +61 -11
- package/lib/commands/agent/validate/authoring-bundle.js.map +1 -1
- package/lib/flags.d.ts +2 -0
- package/lib/flags.js +23 -5
- package/lib/flags.js.map +1 -1
- package/messages/agent.generate.authoring-bundle.md +12 -4
- package/messages/agent.preview.md +1 -1
- package/messages/agent.publish.authoring-bundle.md +8 -4
- package/messages/agent.validate.authoring-bundle.md +8 -4
- package/oclif.manifest.json +105 -89
- package/package.json +7 -7
- package/schemas/agent-generate-authoring__bundle.json +2 -2
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ EXAMPLES
|
|
|
112
112
|
$ sf agent activate --api-name Resort_Manager --target-org my-org
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
115
|
+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/activate.ts)_
|
|
116
116
|
|
|
117
117
|
## `sf agent create`
|
|
118
118
|
|
|
@@ -174,7 +174,7 @@ EXAMPLES
|
|
|
174
174
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
175
175
|
```
|
|
176
176
|
|
|
177
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
177
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/create.ts)_
|
|
178
178
|
|
|
179
179
|
## `sf agent deactivate`
|
|
180
180
|
|
|
@@ -214,7 +214,7 @@ EXAMPLES
|
|
|
214
214
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
217
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/deactivate.ts)_
|
|
218
218
|
|
|
219
219
|
## `sf agent generate agent-spec`
|
|
220
220
|
|
|
@@ -319,7 +319,7 @@ EXAMPLES
|
|
|
319
319
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
322
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/generate/agent-spec.ts)_
|
|
323
323
|
|
|
324
324
|
## `sf agent generate authoring-bundle`
|
|
325
325
|
|
|
@@ -327,15 +327,17 @@ Generate an authoring bundle from an agent specification.
|
|
|
327
327
|
|
|
328
328
|
```
|
|
329
329
|
USAGE
|
|
330
|
-
$ sf agent generate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-
|
|
331
|
-
[-n <value>]
|
|
330
|
+
$ sf agent generate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-name <value>] [--api-version <value>] [-f
|
|
331
|
+
<value>] [-d <value>] [-n <value>]
|
|
332
332
|
|
|
333
333
|
FLAGS
|
|
334
334
|
-d, --output-dir=<value> Directory where the authoring bundle files will be generated.
|
|
335
335
|
-f, --spec=<value> Path to the agent specification file.
|
|
336
|
-
-n, --name=<value> Name (label) of the authoring bundle.
|
|
336
|
+
-n, --name=<value> Name (label) of the authoring bundle.
|
|
337
337
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
338
338
|
configuration variable is already set.
|
|
339
|
+
--api-name=<value> API name of the new authoring bundle; if not specified, the API name is derived from the
|
|
340
|
+
authoring bundle name (label); the API name must not exist in the org.
|
|
339
341
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
340
342
|
|
|
341
343
|
GLOBAL FLAGS
|
|
@@ -345,7 +347,7 @@ GLOBAL FLAGS
|
|
|
345
347
|
DESCRIPTION
|
|
346
348
|
Generate an authoring bundle from an agent specification.
|
|
347
349
|
|
|
348
|
-
Generates an authoring bundle containing
|
|
350
|
+
Generates an authoring bundle containing Agent and its meta.xml file from an agent specification file.
|
|
349
351
|
|
|
350
352
|
EXAMPLES
|
|
351
353
|
Generate an authoring bundle from a specification file:
|
|
@@ -358,7 +360,7 @@ EXAMPLES
|
|
|
358
360
|
path/to/output
|
|
359
361
|
```
|
|
360
362
|
|
|
361
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
363
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/generate/authoring-bundle.ts)_
|
|
362
364
|
|
|
363
365
|
## `sf agent generate template`
|
|
364
366
|
|
|
@@ -406,7 +408,7 @@ EXAMPLES
|
|
|
406
408
|
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
|
|
407
409
|
```
|
|
408
410
|
|
|
409
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
411
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/generate/template.ts)_
|
|
410
412
|
|
|
411
413
|
## `sf agent generate test-spec`
|
|
412
414
|
|
|
@@ -467,7 +469,7 @@ EXAMPLES
|
|
|
467
469
|
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
|
|
468
470
|
```
|
|
469
471
|
|
|
470
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
472
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/generate/test-spec.ts)_
|
|
471
473
|
|
|
472
474
|
## `sf agent preview`
|
|
473
475
|
|
|
@@ -475,21 +477,20 @@ Interact with an active agent to preview how the agent responds to your statemen
|
|
|
475
477
|
|
|
476
478
|
```
|
|
477
479
|
USAGE
|
|
478
|
-
$ sf agent preview
|
|
480
|
+
$ sf agent preview [--flags-dir <value>] [--api-version <value>] (-c <value> -o <value>) [-n <value>]
|
|
479
481
|
[--authoring-bundle <value>] [-d <value>] [-x]
|
|
480
482
|
|
|
481
483
|
FLAGS
|
|
482
|
-
-c, --client-app=<value>
|
|
483
|
-
|
|
484
|
-
|
|
484
|
+
-c, --client-app=<value> Name of the linked client app to use for the agent connection. You must have
|
|
485
|
+
previously created this link with "org login web --client-app". Run "org display" to
|
|
486
|
+
see the available linked client apps.
|
|
485
487
|
-d, --output-dir=<value> Directory where conversation transcripts are saved.
|
|
486
488
|
-n, --api-name=<value> API name of the agent you want to interact with.
|
|
487
489
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
488
490
|
configuration variable is already set.
|
|
489
491
|
-x, --apex-debug Enable Apex debug logging during the agent preview conversation.
|
|
490
492
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
491
|
-
--authoring-bundle=<value> Preview an ephemeral
|
|
492
|
-
metadata
|
|
493
|
+
--authoring-bundle=<value> Preview an ephemeral agent by specifying the API name of the Authoring Bundle metadata
|
|
493
494
|
|
|
494
495
|
GLOBAL FLAGS
|
|
495
496
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -533,7 +534,7 @@ EXAMPLES
|
|
|
533
534
|
transcripts/my-preview
|
|
534
535
|
```
|
|
535
536
|
|
|
536
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
537
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/preview.ts)_
|
|
537
538
|
|
|
538
539
|
## `sf agent publish authoring-bundle`
|
|
539
540
|
|
|
@@ -541,10 +542,10 @@ Publish an Agent Authoring Bundle as a new agent
|
|
|
541
542
|
|
|
542
543
|
```
|
|
543
544
|
USAGE
|
|
544
|
-
$ sf agent publish authoring-bundle -o <value>
|
|
545
|
+
$ sf agent publish authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
|
|
545
546
|
|
|
546
547
|
FLAGS
|
|
547
|
-
-n, --api-name=<value>
|
|
548
|
+
-n, --api-name=<value> API name of the Agent Authoring Bundle to publish
|
|
548
549
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
549
550
|
configuration variable is already set.
|
|
550
551
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
@@ -565,7 +566,7 @@ EXAMPLES
|
|
|
565
566
|
myorg@example.com
|
|
566
567
|
```
|
|
567
568
|
|
|
568
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
569
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/publish/authoring-bundle.ts)_
|
|
569
570
|
|
|
570
571
|
## `sf agent test create`
|
|
571
572
|
|
|
@@ -620,7 +621,7 @@ EXAMPLES
|
|
|
620
621
|
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
|
|
621
622
|
```
|
|
622
623
|
|
|
623
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
624
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/test/create.ts)_
|
|
624
625
|
|
|
625
626
|
## `sf agent test list`
|
|
626
627
|
|
|
@@ -655,7 +656,7 @@ EXAMPLES
|
|
|
655
656
|
$ sf agent test list --target-org my-org
|
|
656
657
|
```
|
|
657
658
|
|
|
658
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
659
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/test/list.ts)_
|
|
659
660
|
|
|
660
661
|
## `sf agent test results`
|
|
661
662
|
|
|
@@ -721,7 +722,7 @@ FLAG DESCRIPTIONS
|
|
|
721
722
|
expression when using custom evaluations.
|
|
722
723
|
```
|
|
723
724
|
|
|
724
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
725
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/test/results.ts)_
|
|
725
726
|
|
|
726
727
|
## `sf agent test resume`
|
|
727
728
|
|
|
@@ -794,7 +795,7 @@ FLAG DESCRIPTIONS
|
|
|
794
795
|
expression when using custom evaluations.
|
|
795
796
|
```
|
|
796
797
|
|
|
797
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
798
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/test/resume.ts)_
|
|
798
799
|
|
|
799
800
|
## `sf agent test run`
|
|
800
801
|
|
|
@@ -868,7 +869,7 @@ FLAG DESCRIPTIONS
|
|
|
868
869
|
expression when using custom evaluations.
|
|
869
870
|
```
|
|
870
871
|
|
|
871
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
872
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/test/run.ts)_
|
|
872
873
|
|
|
873
874
|
## `sf agent validate authoring-bundle`
|
|
874
875
|
|
|
@@ -876,10 +877,10 @@ Validate an Agent Authoring Bundle
|
|
|
876
877
|
|
|
877
878
|
```
|
|
878
879
|
USAGE
|
|
879
|
-
$ sf agent validate authoring-bundle -o <value>
|
|
880
|
+
$ sf agent validate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
|
|
880
881
|
|
|
881
882
|
FLAGS
|
|
882
|
-
-n, --api-name=<value>
|
|
883
|
+
-n, --api-name=<value> Path to the Agent Authoring Bundle to validate
|
|
883
884
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
884
885
|
configuration variable is already set.
|
|
885
886
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
@@ -899,6 +900,6 @@ EXAMPLES
|
|
|
899
900
|
$ sf agent validate authoring-bundle --api-name path/to/bundle
|
|
900
901
|
```
|
|
901
902
|
|
|
902
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
903
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.5/src/commands/agent/validate/authoring-bundle.ts)_
|
|
903
904
|
|
|
904
905
|
<!-- commandsstop -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
2
|
export type AgentGenerateAuthoringBundleResult = {
|
|
3
|
-
|
|
3
|
+
agentPath: string;
|
|
4
4
|
metaXmlPath: string;
|
|
5
5
|
outputDir: string;
|
|
6
6
|
};
|
|
@@ -9,9 +9,9 @@ export default class AgentGenerateAuthoringBundle extends SfCommand<AgentGenerat
|
|
|
9
9
|
static readonly description: string;
|
|
10
10
|
static readonly examples: string[];
|
|
11
11
|
static readonly requiresProject = true;
|
|
12
|
-
static state: string;
|
|
13
12
|
static readonly flags: {
|
|
14
13
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -13,13 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { join } from 'node:path';
|
|
17
|
-
import { mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
16
|
+
import { join, resolve } from 'node:path';
|
|
17
|
+
import { mkdirSync, writeFileSync, readFileSync, existsSync } from 'node:fs';
|
|
18
18
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
19
|
-
import { Messages, SfError } from '@salesforce/core';
|
|
19
|
+
import { generateApiName, Messages, SfError } from '@salesforce/core';
|
|
20
20
|
import { Agent } from '@salesforce/agents';
|
|
21
21
|
import YAML from 'yaml';
|
|
22
|
-
import {
|
|
22
|
+
import { input as inquirerInput } from '@inquirer/prompts';
|
|
23
|
+
import { theme } from '../../../inquirer-theme.js';
|
|
24
|
+
import { promptForFlag, promptForYamlFile } from '../../../flags.js';
|
|
23
25
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
24
26
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.authoring-bundle');
|
|
25
27
|
export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
@@ -27,9 +29,11 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
27
29
|
static description = messages.getMessage('description');
|
|
28
30
|
static examples = messages.getMessages('examples');
|
|
29
31
|
static requiresProject = true;
|
|
30
|
-
static state = 'beta';
|
|
31
32
|
static flags = {
|
|
32
33
|
'target-org': Flags.requiredOrg(),
|
|
34
|
+
'api-name': Flags.string({
|
|
35
|
+
summary: messages.getMessage('flags.api-name.summary'),
|
|
36
|
+
}),
|
|
33
37
|
'api-version': Flags.orgApiVersion(),
|
|
34
38
|
spec: Flags.file({
|
|
35
39
|
summary: messages.getMessage('flags.spec.summary'),
|
|
@@ -48,12 +52,35 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
48
52
|
static FLAGGABLE_PROMPTS = {
|
|
49
53
|
name: {
|
|
50
54
|
message: messages.getMessage('flags.name.summary'),
|
|
51
|
-
validate: (d) => d.length > 0 || 'Name cannot be empty',
|
|
55
|
+
validate: (d) => d.trim().length > 0 || 'Name cannot be empty or contain only whitespace',
|
|
52
56
|
required: true,
|
|
53
57
|
},
|
|
58
|
+
'api-name': {
|
|
59
|
+
message: messages.getMessage('flags.api-name.summary'),
|
|
60
|
+
promptMessage: messages.getMessage('flags.api-name.prompt'),
|
|
61
|
+
validate: (d) => {
|
|
62
|
+
if (d.length === 0) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (d.length > 80) {
|
|
66
|
+
return 'API name cannot be over 80 characters.';
|
|
67
|
+
}
|
|
68
|
+
const regex = /^[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]+$/;
|
|
69
|
+
if (!regex.test(d)) {
|
|
70
|
+
return 'Invalid API name.';
|
|
71
|
+
}
|
|
72
|
+
return true;
|
|
73
|
+
},
|
|
74
|
+
},
|
|
54
75
|
spec: {
|
|
55
76
|
message: messages.getMessage('flags.spec.summary'),
|
|
56
|
-
validate: (d) =>
|
|
77
|
+
validate: (d) => {
|
|
78
|
+
const specPath = resolve(d);
|
|
79
|
+
if (!existsSync(specPath)) {
|
|
80
|
+
return 'Please enter an existing agent spec (yaml) file';
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
},
|
|
57
84
|
required: true,
|
|
58
85
|
},
|
|
59
86
|
};
|
|
@@ -61,46 +88,58 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
61
88
|
const { flags } = await this.parse(AgentGenerateAuthoringBundle);
|
|
62
89
|
const { 'output-dir': outputDir, 'target-org': targetOrg } = flags;
|
|
63
90
|
// If we don't have a spec yet, prompt for it
|
|
64
|
-
const spec = flags
|
|
91
|
+
const spec = flags.spec ?? (await promptForYamlFile(AgentGenerateAuthoringBundle.FLAGGABLE_PROMPTS['spec']));
|
|
65
92
|
// If we don't have a name yet, prompt for it
|
|
66
|
-
const name =
|
|
93
|
+
const name = flags['name'] ?? (await promptForFlag(AgentGenerateAuthoringBundle.FLAGGABLE_PROMPTS['name']));
|
|
94
|
+
// If we don't have an api name yet, prompt for it
|
|
95
|
+
let bundleApiName = flags['api-name'];
|
|
96
|
+
if (!bundleApiName) {
|
|
97
|
+
bundleApiName = generateApiName(name);
|
|
98
|
+
const promptedValue = await inquirerInput({
|
|
99
|
+
message: messages.getMessage('flags.api-name.prompt'),
|
|
100
|
+
validate: AgentGenerateAuthoringBundle.FLAGGABLE_PROMPTS['api-name'].validate,
|
|
101
|
+
default: bundleApiName,
|
|
102
|
+
theme,
|
|
103
|
+
});
|
|
104
|
+
if (promptedValue?.length) {
|
|
105
|
+
bundleApiName = promptedValue;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
67
108
|
try {
|
|
68
109
|
// Get default output directory if not specified
|
|
69
110
|
const defaultOutputDir = join(this.project.getDefaultPackage().fullPath, 'main', 'default');
|
|
70
|
-
const targetOutputDir = join(outputDir ?? defaultOutputDir, '
|
|
111
|
+
const targetOutputDir = join(outputDir ?? defaultOutputDir, 'aiAuthoringBundles', bundleApiName);
|
|
71
112
|
// Generate file paths
|
|
72
|
-
const
|
|
73
|
-
const metaXmlPath = join(targetOutputDir, `${
|
|
74
|
-
// Write
|
|
113
|
+
const agentPath = join(targetOutputDir, `${bundleApiName}.agent`);
|
|
114
|
+
const metaXmlPath = join(targetOutputDir, `${bundleApiName}.bundle-meta.xml`);
|
|
115
|
+
// Write Agent file
|
|
75
116
|
const conn = targetOrg.getConnection(flags['api-version']);
|
|
76
117
|
const specContents = YAML.parse(readFileSync(spec, 'utf8'));
|
|
77
|
-
const
|
|
118
|
+
const agent = await Agent.createAfScript(conn, specContents);
|
|
78
119
|
// Create output directory if it doesn't exist
|
|
79
120
|
mkdirSync(targetOutputDir, { recursive: true });
|
|
80
|
-
writeFileSync(
|
|
121
|
+
writeFileSync(agentPath, agent);
|
|
81
122
|
// Write meta.xml file
|
|
82
123
|
const metaXml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
83
124
|
<aiAuthoringBundle>
|
|
84
125
|
<Label>${specContents.role}</Label>
|
|
85
126
|
<BundleType>${specContents.agentType}</BundleType>
|
|
86
127
|
<VersionTag>Spring2026</VersionTag>
|
|
87
|
-
<VersionDescription>Initial release for ${
|
|
128
|
+
<VersionDescription>Initial release for ${bundleApiName}</VersionDescription>
|
|
88
129
|
<SourceBundleVersion></SourceBundleVersion>
|
|
89
130
|
<Target></Target>
|
|
90
131
|
</aiAuthoringBundle>`;
|
|
91
132
|
writeFileSync(metaXmlPath, metaXml);
|
|
92
|
-
this.logSuccess(`Successfully generated ${
|
|
133
|
+
this.logSuccess(`Successfully generated ${bundleApiName} Authoring Bundle`);
|
|
93
134
|
return {
|
|
94
|
-
|
|
135
|
+
agentPath,
|
|
95
136
|
metaXmlPath,
|
|
96
137
|
outputDir: targetOutputDir,
|
|
97
138
|
};
|
|
98
139
|
}
|
|
99
140
|
catch (error) {
|
|
100
141
|
const err = SfError.wrap(error);
|
|
101
|
-
throw new SfError(messages.getMessage('error.failed-to-create-
|
|
102
|
-
err.message,
|
|
103
|
-
]);
|
|
142
|
+
throw new SfError(messages.getMessage('error.failed-to-create-agent'), 'AgentGenerationError', [err.message]);
|
|
104
143
|
}
|
|
105
144
|
}
|
|
106
145
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/authoring-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/authoring-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAgB,MAAM,oBAAoB,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAmB,a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W,GAAG,IAAI,CAAC,eAAe,EAAE,GAAG,aAAa,kBAAkB,CAAC,CAAC;YAE9E,mBAAmB;YACnB,MAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;YAC3D,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAiB,CAAC;YAC5E,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC7D,8CAA8C;YAC9C,SAAS,CAAC,eAAe,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAChD,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAEhC,sBAAsB;YACtB,MAAM,OAAO,GAAG;;WAEX,YAAY,CAAC,IAAI;gBACZ,YAAY,CAAC,SAAS;;4CAEM,aAAa;;;qBAGpC,CAAC;YAChB,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YAEpC,IAAI,CAAC,UAAU,CAAC,0BAA0B,aAAa,mBAAmB,CAAC,CAAC;YAE5E,OAAO;gBACL,SAAS;gBACT,WAAW;gBACX,SAAS,EAAE,eAAe;aAC3B,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC,EAAE,sBAAsB,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QAChH,CAAC;IACH,CAAC"}
|
|
@@ -26,11 +26,10 @@ export default class AgentPreview extends SfCommand<AgentPreviewResult> {
|
|
|
26
26
|
static readonly examples: string[];
|
|
27
27
|
static readonly enableJsonFlag = false;
|
|
28
28
|
static readonly requiresProject = true;
|
|
29
|
-
static state: string;
|
|
30
29
|
static readonly flags: {
|
|
31
30
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
32
31
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
33
|
-
'client-app': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
32
|
+
'client-app': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
33
|
'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
34
|
'authoring-bundle': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
35
|
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -32,14 +32,12 @@ export default class AgentPreview extends SfCommand {
|
|
|
32
32
|
static examples = messages.getMessages('examples');
|
|
33
33
|
static enableJsonFlag = false;
|
|
34
34
|
static requiresProject = true;
|
|
35
|
-
static state = 'beta';
|
|
36
35
|
static flags = {
|
|
37
36
|
'target-org': Flags.requiredOrg(),
|
|
38
37
|
'api-version': Flags.orgApiVersion(),
|
|
39
38
|
'client-app': Flags.string({
|
|
40
39
|
char: 'c',
|
|
41
40
|
summary: messages.getMessage('flags.client-app.summary'),
|
|
42
|
-
required: true,
|
|
43
41
|
dependsOn: ['target-org'],
|
|
44
42
|
}),
|
|
45
43
|
'api-name': Flags.string({
|
|
@@ -65,9 +63,12 @@ export default class AgentPreview extends SfCommand {
|
|
|
65
63
|
const authInfo = await AuthInfo.create({
|
|
66
64
|
username: flags['target-org'].getUsername(),
|
|
67
65
|
});
|
|
66
|
+
if (!(flags['client-app'] ?? env.getString('SF_DEMO_AGENT_CLIENT_APP'))) {
|
|
67
|
+
throw new SfError('SF_DEMO_AGENT_CLIENT_APP is unset!');
|
|
68
|
+
}
|
|
68
69
|
const jwtConn = await Connection.create({
|
|
69
70
|
authInfo,
|
|
70
|
-
clientApp: flags['client-app'],
|
|
71
|
+
clientApp: env.getString('SF_DEMO_AGENT_CLIENT_APP') ?? flags['client-app'],
|
|
71
72
|
});
|
|
72
73
|
const agentsQuery = await conn.query('SELECT Id, DeveloperName, (SELECT Status FROM BotVersions) FROM BotDefinition WHERE IsDeleted = false');
|
|
73
74
|
if (agentsQuery.totalSize === 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/commands/agent/preview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;AAuBpF,sGAAsG;AACtG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,wBAAwB,CAAC,CAAC;AAG7D,M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ACnC;QACD,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACnC,SAA6B,EAC7B,SAA8B,EACD,EAAE;IAC/B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,QAAQ,GAAG,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,MAAM,OAAO,CAAC;gBACZ,OAAO,EAAE,0CAA0C;gBACnD,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;QAEP,MAAM,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,aAAa,CAAC;QAC7E,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC;gBACzB,OAAO,EAAE,kCAAkC,WAAW,EAAE;gBACxD,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,6BAA6B,EAAE,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;gBACpF,QAAQ,EAAE,IAAI;aACf,CAAC,CAAC;YAEH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -9,11 +9,11 @@ export default class AgentPublishAuthoringBundle extends SfCommand<AgentPublishA
|
|
|
9
9
|
static readonly description: string;
|
|
10
10
|
static readonly examples: string[];
|
|
11
11
|
static readonly requiresProject = true;
|
|
12
|
-
static state: string;
|
|
13
12
|
static readonly flags: {
|
|
14
13
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
14
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
-
'api-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
16
|
};
|
|
17
|
+
private static readonly FLAGGABLE_PROMPTS;
|
|
18
18
|
run(): Promise<AgentPublishAuthoringBundleResult>;
|
|
19
19
|
}
|
|
@@ -22,6 +22,7 @@ import { Messages, Lifecycle, SfError } from '@salesforce/core';
|
|
|
22
22
|
import { Agent, findAuthoringBundle } from '@salesforce/agents';
|
|
23
23
|
import { RequestStatus } from '@salesforce/source-deploy-retrieve';
|
|
24
24
|
import { ensureArray } from '@salesforce/kit';
|
|
25
|
+
import { promptForFileByExtensions } from '../../../flags.js';
|
|
25
26
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
26
27
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.publish.authoring-bundle');
|
|
27
28
|
export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
@@ -29,31 +30,48 @@ export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
|
29
30
|
static description = messages.getMessage('description');
|
|
30
31
|
static examples = messages.getMessages('examples');
|
|
31
32
|
static requiresProject = true;
|
|
32
|
-
static state = 'beta';
|
|
33
33
|
static flags = {
|
|
34
34
|
'target-org': Flags.requiredOrg(),
|
|
35
35
|
'api-version': Flags.orgApiVersion(),
|
|
36
36
|
'api-name': Flags.string({
|
|
37
37
|
char: 'n',
|
|
38
38
|
summary: messages.getMessage('flags.api-name.summary'),
|
|
39
|
-
required: true,
|
|
40
39
|
}),
|
|
41
40
|
};
|
|
41
|
+
static FLAGGABLE_PROMPTS = {
|
|
42
|
+
'api-name': {
|
|
43
|
+
message: messages.getMessage('flags.api-name.summary'),
|
|
44
|
+
promptMessage: messages.getMessage('flags.api-name.prompt'),
|
|
45
|
+
validate: (d) => {
|
|
46
|
+
if (d.length > 80) {
|
|
47
|
+
return 'API name cannot be over 80 characters.';
|
|
48
|
+
}
|
|
49
|
+
const regex = /^[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]+$/;
|
|
50
|
+
if (d.length === 0 || !regex.test(d)) {
|
|
51
|
+
return 'Invalid API name.';
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
42
57
|
async run() {
|
|
43
58
|
const { flags } = await this.parse(AgentPublishAuthoringBundle);
|
|
59
|
+
// If api-name is not provided, prompt user to select an .agent file from the project and extract the API name from it
|
|
60
|
+
const apiName = flags['api-name'] ??
|
|
61
|
+
(await promptForFileByExtensions(AgentPublishAuthoringBundle.FLAGGABLE_PROMPTS['api-name'], ['.agent'], true));
|
|
44
62
|
// todo: this eslint warning can be removed once published
|
|
45
63
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
46
|
-
const authoringBundleDir = findAuthoringBundle(this.project.getPath(),
|
|
64
|
+
const authoringBundleDir = findAuthoringBundle(this.project.getPath(), apiName);
|
|
47
65
|
if (!authoringBundleDir) {
|
|
48
|
-
throw new SfError(messages.getMessage('error.
|
|
49
|
-
messages.getMessage('error.
|
|
66
|
+
throw new SfError(messages.getMessage('error.agentNotFound', [apiName]), 'AgentNotFoundError', [
|
|
67
|
+
messages.getMessage('error.agentNotFoundAction'),
|
|
50
68
|
]);
|
|
51
69
|
}
|
|
52
70
|
// Create multi-stage output
|
|
53
71
|
const mso = new MultiStageOutput({
|
|
54
72
|
stages: ['Validate Bundle', 'Publish Agent', 'Retrieve Metadata'],
|
|
55
73
|
title: 'Publishing Agent',
|
|
56
|
-
data: { agentName:
|
|
74
|
+
data: { agentName: apiName },
|
|
57
75
|
jsonEnabled: this.jsonEnabled(),
|
|
58
76
|
postStagesBlock: [
|
|
59
77
|
{
|
|
@@ -70,7 +88,7 @@ export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
|
70
88
|
const targetOrg = flags['target-org'];
|
|
71
89
|
const conn = targetOrg.getConnection(flags['api-version']);
|
|
72
90
|
// First compile the AF script to get the Agent JSON
|
|
73
|
-
const agentJson = await Agent.compileAfScript(conn, readFileSync(join(authoringBundleDir, `${
|
|
91
|
+
const agentJson = await Agent.compileAfScript(conn, readFileSync(join(authoringBundleDir, `${apiName}.agent`), 'utf8'));
|
|
74
92
|
mso.skipTo('Publish Agent');
|
|
75
93
|
// Then publish the Agent JSON to create the agent
|
|
76
94
|
// Set up lifecycle listeners for retrieve events
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/publish/authoring-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,aAAa,EAA2B,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/publish/authoring-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC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G,8BAA8B,WAAW;oBAC5D,wFAAwF;oBACxF,MAAM,EAAE,cAAc,CAAC,QAAQ,EAAE,QAAQ,IAAI,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,CAC5F,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;oBACd,GAAG,CAAC,KAAK,EAAE,CAAC;oBACZ,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;gBAClC,CAAC;gBACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAQ,EAAE,SAAS,CAAC,CAAC;YAC5E,GAAG,CAAC,IAAI,EAAE,CAAC;YAEX,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,gBAAgB,EAAE,MAAM,CAAC,aAAa;aACvC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,2BAA2B;YAC3B,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,MAAM,YAAY,GAAG,QAAQ,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YAE/E,uCAAuC;YACvC,GAAG,CAAC,KAAK,EAAE,CAAC;YAEZ,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAEzB,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;aAChC,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -8,11 +8,11 @@ export default class AgentValidateAuthoringBundle extends SfCommand<AgentValidat
|
|
|
8
8
|
static readonly description: string;
|
|
9
9
|
static readonly examples: string[];
|
|
10
10
|
static readonly requiresProject = true;
|
|
11
|
-
static state: string;
|
|
12
11
|
static readonly flags: {
|
|
13
12
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
13
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
-
'api-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
15
|
};
|
|
16
|
+
private static readonly FLAGGABLE_PROMPTS;
|
|
17
17
|
run(): Promise<AgentValidateAuthoringBundleResult>;
|
|
18
18
|
}
|