@salesforce/plugin-agent 1.24.14-demo.0 → 1.24.14-demo.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 +67 -25
- package/lib/commands/agent/generate/authoring-bundle.d.ts +22 -0
- package/lib/commands/agent/generate/authoring-bundle.js +107 -0
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -0
- package/lib/commands/agent/preview.d.ts +1 -0
- package/lib/commands/agent/preview.js +11 -1
- package/lib/commands/agent/preview.js.map +1 -1
- package/messages/agent.generate.authoring-bundle.md +39 -0
- package/messages/agent.preview.md +4 -0
- package/oclif.manifest.json +113 -1
- package/package.json +3 -3
- package/schemas/agent-generate-authoring__bundle.json +22 -0
package/README.md
CHANGED
|
@@ -63,6 +63,7 @@ sf plugins
|
|
|
63
63
|
- [`sf agent create`](#sf-agent-create)
|
|
64
64
|
- [`sf agent deactivate`](#sf-agent-deactivate)
|
|
65
65
|
- [`sf agent generate agent-spec`](#sf-agent-generate-agent-spec)
|
|
66
|
+
- [`sf agent generate authoring-bundle`](#sf-agent-generate-authoring-bundle)
|
|
66
67
|
- [`sf agent generate template`](#sf-agent-generate-template)
|
|
67
68
|
- [`sf agent generate test-spec`](#sf-agent-generate-test-spec)
|
|
68
69
|
- [`sf agent preview`](#sf-agent-preview)
|
|
@@ -111,7 +112,7 @@ EXAMPLES
|
|
|
111
112
|
$ sf agent activate --api-name Resort_Manager --target-org my-org
|
|
112
113
|
```
|
|
113
114
|
|
|
114
|
-
_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.1/src/commands/agent/activate.ts)_
|
|
115
116
|
|
|
116
117
|
## `sf agent create`
|
|
117
118
|
|
|
@@ -173,7 +174,7 @@ EXAMPLES
|
|
|
173
174
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
174
175
|
```
|
|
175
176
|
|
|
176
|
-
_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.1/src/commands/agent/create.ts)_
|
|
177
178
|
|
|
178
179
|
## `sf agent deactivate`
|
|
179
180
|
|
|
@@ -213,7 +214,7 @@ EXAMPLES
|
|
|
213
214
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
214
215
|
```
|
|
215
216
|
|
|
216
|
-
_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.1/src/commands/agent/deactivate.ts)_
|
|
217
218
|
|
|
218
219
|
## `sf agent generate agent-spec`
|
|
219
220
|
|
|
@@ -318,7 +319,46 @@ EXAMPLES
|
|
|
318
319
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
319
320
|
```
|
|
320
321
|
|
|
321
|
-
_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.1/src/commands/agent/generate/agent-spec.ts)_
|
|
323
|
+
|
|
324
|
+
## `sf agent generate authoring-bundle`
|
|
325
|
+
|
|
326
|
+
Generate an authoring bundle from an agent specification.
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
USAGE
|
|
330
|
+
$ sf agent generate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-f <value>] [-d <value>]
|
|
331
|
+
[-n <value>]
|
|
332
|
+
|
|
333
|
+
FLAGS
|
|
334
|
+
-d, --output-dir=<value> Directory where the authoring bundle files will be generated.
|
|
335
|
+
-f, --spec=<value> Path to the agent specification file.
|
|
336
|
+
-n, --name=<value> Name (label) of the authoring bundle. If not provided, you will be prompted for it.
|
|
337
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
338
|
+
configuration variable is already set.
|
|
339
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
340
|
+
|
|
341
|
+
GLOBAL FLAGS
|
|
342
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
343
|
+
--json Format output as json.
|
|
344
|
+
|
|
345
|
+
DESCRIPTION
|
|
346
|
+
Generate an authoring bundle from an agent specification.
|
|
347
|
+
|
|
348
|
+
Generates an authoring bundle containing AFScript and its meta.xml file from an agent specification file.
|
|
349
|
+
|
|
350
|
+
EXAMPLES
|
|
351
|
+
Generate an authoring bundle from a specification file:
|
|
352
|
+
|
|
353
|
+
$ sf agent generate authoring-bundle --spec-file path/to/spec.yaml --name "My Authoring Bundle"
|
|
354
|
+
|
|
355
|
+
Generate an authoring bundle with a custom output directory:
|
|
356
|
+
|
|
357
|
+
$ sf agent generate authoring-bundle --spec-file path/to/spec.yaml --name "My Authoring Bundle" --output-dir \
|
|
358
|
+
path/to/output
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/generate/authoring-bundle.ts)_
|
|
322
362
|
|
|
323
363
|
## `sf agent generate template`
|
|
324
364
|
|
|
@@ -366,7 +406,7 @@ EXAMPLES
|
|
|
366
406
|
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
|
|
367
407
|
```
|
|
368
408
|
|
|
369
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
409
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/generate/template.ts)_
|
|
370
410
|
|
|
371
411
|
## `sf agent generate test-spec`
|
|
372
412
|
|
|
@@ -427,7 +467,7 @@ EXAMPLES
|
|
|
427
467
|
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
|
|
428
468
|
```
|
|
429
469
|
|
|
430
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
470
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/generate/test-spec.ts)_
|
|
431
471
|
|
|
432
472
|
## `sf agent preview`
|
|
433
473
|
|
|
@@ -435,19 +475,21 @@ Interact with an active agent to preview how the agent responds to your statemen
|
|
|
435
475
|
|
|
436
476
|
```
|
|
437
477
|
USAGE
|
|
438
|
-
$ sf agent preview (-c <value> -o <value>) [--flags-dir <value>] [--api-version <value>] [-n <value>]
|
|
439
|
-
<value>] [-x]
|
|
478
|
+
$ sf agent preview (-c <value> -o <value>) [--flags-dir <value>] [--api-version <value>] [-n <value>]
|
|
479
|
+
[--authoring-bundle <value>] [-d <value>] [-x]
|
|
440
480
|
|
|
441
481
|
FLAGS
|
|
442
|
-
-c, --client-app=<value>
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
-d, --output-dir=<value>
|
|
446
|
-
-n, --api-name=<value>
|
|
447
|
-
-o, --target-org=<value>
|
|
448
|
-
|
|
449
|
-
-x, --apex-debug
|
|
450
|
-
--api-version=<value>
|
|
482
|
+
-c, --client-app=<value> (required) Name of the linked client app to use for the agent connection. You must
|
|
483
|
+
have previously created this link with "org login web --client-app". Run "org display"
|
|
484
|
+
to see the available linked client apps.
|
|
485
|
+
-d, --output-dir=<value> Directory where conversation transcripts are saved.
|
|
486
|
+
-n, --api-name=<value> API name of the agent you want to interact with.
|
|
487
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
488
|
+
configuration variable is already set.
|
|
489
|
+
-x, --apex-debug Enable Apex debug logging during the agent preview conversation.
|
|
490
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
491
|
+
--authoring-bundle=<value> Preview an ephemeral afscript agent by specifying the API name of the Authoring Bundle
|
|
492
|
+
metadata
|
|
451
493
|
|
|
452
494
|
GLOBAL FLAGS
|
|
453
495
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -491,7 +533,7 @@ EXAMPLES
|
|
|
491
533
|
transcripts/my-preview
|
|
492
534
|
```
|
|
493
535
|
|
|
494
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
536
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/preview.ts)_
|
|
495
537
|
|
|
496
538
|
## `sf agent publish authoring-bundle`
|
|
497
539
|
|
|
@@ -523,7 +565,7 @@ EXAMPLES
|
|
|
523
565
|
myorg@example.com
|
|
524
566
|
```
|
|
525
567
|
|
|
526
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
568
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/publish/authoring-bundle.ts)_
|
|
527
569
|
|
|
528
570
|
## `sf agent test create`
|
|
529
571
|
|
|
@@ -578,7 +620,7 @@ EXAMPLES
|
|
|
578
620
|
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
|
|
579
621
|
```
|
|
580
622
|
|
|
581
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
623
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/test/create.ts)_
|
|
582
624
|
|
|
583
625
|
## `sf agent test list`
|
|
584
626
|
|
|
@@ -613,7 +655,7 @@ EXAMPLES
|
|
|
613
655
|
$ sf agent test list --target-org my-org
|
|
614
656
|
```
|
|
615
657
|
|
|
616
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
658
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/test/list.ts)_
|
|
617
659
|
|
|
618
660
|
## `sf agent test results`
|
|
619
661
|
|
|
@@ -679,7 +721,7 @@ FLAG DESCRIPTIONS
|
|
|
679
721
|
expression when using custom evaluations.
|
|
680
722
|
```
|
|
681
723
|
|
|
682
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
724
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/test/results.ts)_
|
|
683
725
|
|
|
684
726
|
## `sf agent test resume`
|
|
685
727
|
|
|
@@ -752,7 +794,7 @@ FLAG DESCRIPTIONS
|
|
|
752
794
|
expression when using custom evaluations.
|
|
753
795
|
```
|
|
754
796
|
|
|
755
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
797
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/test/resume.ts)_
|
|
756
798
|
|
|
757
799
|
## `sf agent test run`
|
|
758
800
|
|
|
@@ -826,7 +868,7 @@ FLAG DESCRIPTIONS
|
|
|
826
868
|
expression when using custom evaluations.
|
|
827
869
|
```
|
|
828
870
|
|
|
829
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
871
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/test/run.ts)_
|
|
830
872
|
|
|
831
873
|
## `sf agent validate authoring-bundle`
|
|
832
874
|
|
|
@@ -857,6 +899,6 @@ EXAMPLES
|
|
|
857
899
|
$ sf agent validate authoring-bundle --api-name path/to/bundle
|
|
858
900
|
```
|
|
859
901
|
|
|
860
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.
|
|
902
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-demo.1/src/commands/agent/validate/authoring-bundle.ts)_
|
|
861
903
|
|
|
862
904
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type AgentGenerateAuthoringBundleResult = {
|
|
3
|
+
afScriptPath: string;
|
|
4
|
+
metaXmlPath: string;
|
|
5
|
+
outputDir: string;
|
|
6
|
+
};
|
|
7
|
+
export default class AgentGenerateAuthoringBundle extends SfCommand<AgentGenerateAuthoringBundleResult> {
|
|
8
|
+
static readonly summary: string;
|
|
9
|
+
static readonly description: string;
|
|
10
|
+
static readonly examples: string[];
|
|
11
|
+
static readonly requiresProject = true;
|
|
12
|
+
static state: string;
|
|
13
|
+
static readonly flags: {
|
|
14
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
private static readonly FLAGGABLE_PROMPTS;
|
|
21
|
+
run(): Promise<AgentGenerateAuthoringBundleResult>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { join } from 'node:path';
|
|
17
|
+
import { mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
18
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
19
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
20
|
+
import { Agent } from '@salesforce/agents';
|
|
21
|
+
import YAML from 'yaml';
|
|
22
|
+
import { promptForFlag } from '../../../flags.js';
|
|
23
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
24
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.authoring-bundle');
|
|
25
|
+
export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
26
|
+
static summary = messages.getMessage('summary');
|
|
27
|
+
static description = messages.getMessage('description');
|
|
28
|
+
static examples = messages.getMessages('examples');
|
|
29
|
+
static requiresProject = true;
|
|
30
|
+
static state = 'beta';
|
|
31
|
+
static flags = {
|
|
32
|
+
'target-org': Flags.requiredOrg(),
|
|
33
|
+
'api-version': Flags.orgApiVersion(),
|
|
34
|
+
spec: Flags.file({
|
|
35
|
+
summary: messages.getMessage('flags.spec.summary'),
|
|
36
|
+
char: 'f',
|
|
37
|
+
exists: true,
|
|
38
|
+
}),
|
|
39
|
+
'output-dir': Flags.directory({
|
|
40
|
+
summary: messages.getMessage('flags.output-dir.summary'),
|
|
41
|
+
char: 'd',
|
|
42
|
+
}),
|
|
43
|
+
name: Flags.string({
|
|
44
|
+
summary: messages.getMessage('flags.name.summary'),
|
|
45
|
+
char: 'n',
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
static FLAGGABLE_PROMPTS = {
|
|
49
|
+
name: {
|
|
50
|
+
message: messages.getMessage('flags.name.summary'),
|
|
51
|
+
validate: (d) => d.length > 0 || 'Name cannot be empty',
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
spec: {
|
|
55
|
+
message: messages.getMessage('flags.spec.summary'),
|
|
56
|
+
validate: (d) => d.length > 0 || 'Spec file path cannot be empty',
|
|
57
|
+
required: true,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
async run() {
|
|
61
|
+
const { flags } = await this.parse(AgentGenerateAuthoringBundle);
|
|
62
|
+
const { 'output-dir': outputDir, 'target-org': targetOrg } = flags;
|
|
63
|
+
// If we don't have a spec yet, prompt for it
|
|
64
|
+
const spec = flags['spec'] ?? (await promptForFlag(AgentGenerateAuthoringBundle.FLAGGABLE_PROMPTS['spec']));
|
|
65
|
+
// If we don't have a name yet, prompt for it
|
|
66
|
+
const name = (flags['name'] ?? (await promptForFlag(AgentGenerateAuthoringBundle.FLAGGABLE_PROMPTS['name']))).replaceAll(' ', '_');
|
|
67
|
+
try {
|
|
68
|
+
// Get default output directory if not specified
|
|
69
|
+
const defaultOutputDir = join(this.project.getDefaultPackage().fullPath, 'main', 'default');
|
|
70
|
+
const targetOutputDir = join(outputDir ?? defaultOutputDir, 'aiAuthoringBundle', name);
|
|
71
|
+
// Generate file paths
|
|
72
|
+
const afScriptPath = join(targetOutputDir, `${name}.afscript`);
|
|
73
|
+
const metaXmlPath = join(targetOutputDir, `${name}.authoring-bundle-meta.xml`);
|
|
74
|
+
// Write AFScript file
|
|
75
|
+
const conn = targetOrg.getConnection(flags['api-version']);
|
|
76
|
+
const specContents = YAML.parse(readFileSync(spec, 'utf8'));
|
|
77
|
+
const afScript = await Agent.createAfScript(conn, specContents);
|
|
78
|
+
// Create output directory if it doesn't exist
|
|
79
|
+
mkdirSync(targetOutputDir, { recursive: true });
|
|
80
|
+
writeFileSync(afScriptPath, afScript);
|
|
81
|
+
// Write meta.xml file
|
|
82
|
+
const metaXml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
83
|
+
<aiAuthoringBundle>
|
|
84
|
+
<Label>${specContents.role}</Label>
|
|
85
|
+
<BundleType>${specContents.agentType}</BundleType>
|
|
86
|
+
<VersionTag>Spring2026</VersionTag>
|
|
87
|
+
<VersionDescription>Initial release for ${name}</VersionDescription>
|
|
88
|
+
<SourceBundleVersion></SourceBundleVersion>
|
|
89
|
+
<Target></Target>
|
|
90
|
+
</aiAuthoringBundle>`;
|
|
91
|
+
writeFileSync(metaXmlPath, metaXml);
|
|
92
|
+
this.logSuccess(`Successfully generated ${name} Authoring Bundle`);
|
|
93
|
+
return {
|
|
94
|
+
afScriptPath,
|
|
95
|
+
metaXmlPath,
|
|
96
|
+
outputDir: targetOutputDir,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
const err = SfError.wrap(error);
|
|
101
|
+
throw new SfError(messages.getMessage('error.failed-to-create-afscript'), 'AfScriptGenerationError', [
|
|
102
|
+
err.message,
|
|
103
|
+
]);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=authoring-bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/authoring-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,O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O,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,iCAAiC,CAAC,EAAE,yBAAyB,EAAE;gBACnG,GAAG,CAAC,OAAO;aACZ,CAAC,CAAC;QACL,CAAC;IACH,CAAC"}
|
|
@@ -32,6 +32,7 @@ export default class AgentPreview extends SfCommand<AgentPreviewResult> {
|
|
|
32
32
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
33
33
|
'client-app': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
34
|
'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
|
+
'authoring-bundle': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
36
|
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
37
|
'apex-debug': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
37
38
|
};
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { resolve, join } from 'node:path';
|
|
17
|
+
import * as process from 'node:process';
|
|
17
18
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
18
19
|
import { AuthInfo, Connection, Messages, SfError } from '@salesforce/core';
|
|
19
20
|
import React from 'react';
|
|
@@ -46,6 +47,9 @@ export default class AgentPreview extends SfCommand {
|
|
|
46
47
|
summary: messages.getMessage('flags.api-name.summary'),
|
|
47
48
|
char: 'n',
|
|
48
49
|
}),
|
|
50
|
+
'authoring-bundle': Flags.string({
|
|
51
|
+
summary: messages.getMessage('flags.authoring-bundle.summary'),
|
|
52
|
+
}),
|
|
49
53
|
'output-dir': Flags.directory({
|
|
50
54
|
summary: messages.getMessage('flags.output-dir.summary'),
|
|
51
55
|
char: 'd',
|
|
@@ -71,7 +75,13 @@ export default class AgentPreview extends SfCommand {
|
|
|
71
75
|
throw new SfError('No Agents found in the org');
|
|
72
76
|
const agentsInOrg = agentsQuery.records;
|
|
73
77
|
let selectedAgent;
|
|
74
|
-
if (
|
|
78
|
+
if (flags['authoring-bundle']) {
|
|
79
|
+
selectedAgent = {
|
|
80
|
+
Id: process.env.SF_DEMO_AGENT_ID ?? 'SF_DEMO_AGENT_ID is unset',
|
|
81
|
+
DeveloperName: flags['authoring-bundle'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
else if (apiNameFlag) {
|
|
75
85
|
selectedAgent = agentsInOrg.find((agent) => agent.DeveloperName === apiNameFlag);
|
|
76
86
|
if (!selectedAgent)
|
|
77
87
|
throw new Error(`No valid Agents were found with the Api Name ${apiNameFlag}.`);
|
|
@@ -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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C;IAE1E,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,aAAa;QACzB,KAAK,EAAE;YACL,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,aAAa,EAAE,KAAK,CAAC,aAAa;SACnC;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"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate an authoring bundle from an agent specification.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Generates an authoring bundle containing AFScript and its meta.xml file from an agent specification file.
|
|
8
|
+
|
|
9
|
+
# flags.spec.summary
|
|
10
|
+
|
|
11
|
+
Path to the agent specification file.
|
|
12
|
+
|
|
13
|
+
# flags.output-dir.summary
|
|
14
|
+
|
|
15
|
+
Directory where the authoring bundle files will be generated.
|
|
16
|
+
|
|
17
|
+
# flags.name.summary
|
|
18
|
+
|
|
19
|
+
Name (label) of the authoring bundle. If not provided, you will be prompted for it.
|
|
20
|
+
|
|
21
|
+
# examples
|
|
22
|
+
|
|
23
|
+
- Generate an authoring bundle from a specification file:
|
|
24
|
+
<%= config.bin %> <%= command.id %> --spec-file path/to/spec.yaml --name "My Authoring Bundle"
|
|
25
|
+
|
|
26
|
+
- Generate an authoring bundle with a custom output directory:
|
|
27
|
+
<%= config.bin %> <%= command.id %> --spec-file path/to/spec.yaml --name "My Authoring Bundle" --output-dir path/to/output
|
|
28
|
+
|
|
29
|
+
# error.no-spec-file
|
|
30
|
+
|
|
31
|
+
No agent specification file found at the specified path.
|
|
32
|
+
|
|
33
|
+
# error.invalid-spec-file
|
|
34
|
+
|
|
35
|
+
The specified file is not a valid agent specification file.
|
|
36
|
+
|
|
37
|
+
# error.failed-to-create-afscript
|
|
38
|
+
|
|
39
|
+
Failed to create AFScript from the agent specification.
|
|
@@ -18,6 +18,10 @@ IMPORTANT: Before you use this command, you must complete a number of configurat
|
|
|
18
18
|
|
|
19
19
|
API name of the agent you want to interact with.
|
|
20
20
|
|
|
21
|
+
# flags.authoring-bundle.summary
|
|
22
|
+
|
|
23
|
+
Preview an ephemeral afscript agent by specifying the API name of the Authoring Bundle metadata
|
|
24
|
+
|
|
21
25
|
# flags.client-app.summary
|
|
22
26
|
|
|
23
27
|
Name of the linked client app to use for the agent connection. You must have previously created this link with "org login web --client-app". Run "org display" to see the available linked client apps.
|
package/oclif.manifest.json
CHANGED
|
@@ -299,6 +299,13 @@
|
|
|
299
299
|
"multiple": false,
|
|
300
300
|
"type": "option"
|
|
301
301
|
},
|
|
302
|
+
"authoring-bundle": {
|
|
303
|
+
"name": "authoring-bundle",
|
|
304
|
+
"summary": "Preview an ephemeral afscript agent by specifying the API name of the Authoring Bundle metadata",
|
|
305
|
+
"hasDynamicHelp": false,
|
|
306
|
+
"multiple": false,
|
|
307
|
+
"type": "option"
|
|
308
|
+
},
|
|
302
309
|
"output-dir": {
|
|
303
310
|
"char": "d",
|
|
304
311
|
"name": "output-dir",
|
|
@@ -532,6 +539,111 @@
|
|
|
532
539
|
"agent-spec:generate:agent"
|
|
533
540
|
]
|
|
534
541
|
},
|
|
542
|
+
"agent:generate:authoring-bundle": {
|
|
543
|
+
"aliases": [],
|
|
544
|
+
"args": {},
|
|
545
|
+
"description": "Generates an authoring bundle containing AFScript and its meta.xml file from an agent specification file.",
|
|
546
|
+
"examples": [
|
|
547
|
+
"Generate an authoring bundle from a specification file:\n<%= config.bin %> <%= command.id %> --spec-file path/to/spec.yaml --name \"My Authoring Bundle\"",
|
|
548
|
+
"Generate an authoring bundle with a custom output directory:\n<%= config.bin %> <%= command.id %> --spec-file path/to/spec.yaml --name \"My Authoring Bundle\" --output-dir path/to/output"
|
|
549
|
+
],
|
|
550
|
+
"flags": {
|
|
551
|
+
"json": {
|
|
552
|
+
"description": "Format output as json.",
|
|
553
|
+
"helpGroup": "GLOBAL",
|
|
554
|
+
"name": "json",
|
|
555
|
+
"allowNo": false,
|
|
556
|
+
"type": "boolean"
|
|
557
|
+
},
|
|
558
|
+
"flags-dir": {
|
|
559
|
+
"helpGroup": "GLOBAL",
|
|
560
|
+
"name": "flags-dir",
|
|
561
|
+
"summary": "Import flag values from a directory.",
|
|
562
|
+
"hasDynamicHelp": false,
|
|
563
|
+
"multiple": false,
|
|
564
|
+
"type": "option"
|
|
565
|
+
},
|
|
566
|
+
"target-org": {
|
|
567
|
+
"char": "o",
|
|
568
|
+
"name": "target-org",
|
|
569
|
+
"noCacheDefault": true,
|
|
570
|
+
"required": true,
|
|
571
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
572
|
+
"hasDynamicHelp": true,
|
|
573
|
+
"multiple": false,
|
|
574
|
+
"type": "option"
|
|
575
|
+
},
|
|
576
|
+
"api-version": {
|
|
577
|
+
"description": "Override the api version used for api requests made by this command",
|
|
578
|
+
"name": "api-version",
|
|
579
|
+
"hasDynamicHelp": false,
|
|
580
|
+
"multiple": false,
|
|
581
|
+
"type": "option"
|
|
582
|
+
},
|
|
583
|
+
"spec": {
|
|
584
|
+
"char": "f",
|
|
585
|
+
"name": "spec",
|
|
586
|
+
"summary": "Path to the agent specification file.",
|
|
587
|
+
"hasDynamicHelp": false,
|
|
588
|
+
"multiple": false,
|
|
589
|
+
"type": "option"
|
|
590
|
+
},
|
|
591
|
+
"output-dir": {
|
|
592
|
+
"char": "d",
|
|
593
|
+
"name": "output-dir",
|
|
594
|
+
"summary": "Directory where the authoring bundle files will be generated.",
|
|
595
|
+
"hasDynamicHelp": false,
|
|
596
|
+
"multiple": false,
|
|
597
|
+
"type": "option"
|
|
598
|
+
},
|
|
599
|
+
"name": {
|
|
600
|
+
"char": "n",
|
|
601
|
+
"name": "name",
|
|
602
|
+
"summary": "Name (label) of the authoring bundle. If not provided, you will be prompted for it.",
|
|
603
|
+
"hasDynamicHelp": false,
|
|
604
|
+
"multiple": false,
|
|
605
|
+
"type": "option"
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"hasDynamicHelp": true,
|
|
609
|
+
"hiddenAliases": [],
|
|
610
|
+
"id": "agent:generate:authoring-bundle",
|
|
611
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
612
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
613
|
+
"pluginType": "core",
|
|
614
|
+
"state": "beta",
|
|
615
|
+
"strict": true,
|
|
616
|
+
"summary": "Generate an authoring bundle from an agent specification.",
|
|
617
|
+
"enableJsonFlag": true,
|
|
618
|
+
"requiresProject": true,
|
|
619
|
+
"FLAGGABLE_PROMPTS": {
|
|
620
|
+
"name": {
|
|
621
|
+
"message": "Name (label) of the authoring bundle. If not provided, you will be prompted for it.",
|
|
622
|
+
"required": true
|
|
623
|
+
},
|
|
624
|
+
"spec": {
|
|
625
|
+
"message": "Path to the agent specification file.",
|
|
626
|
+
"required": true
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"isESM": true,
|
|
630
|
+
"relativePath": [
|
|
631
|
+
"lib",
|
|
632
|
+
"commands",
|
|
633
|
+
"agent",
|
|
634
|
+
"generate",
|
|
635
|
+
"authoring-bundle.js"
|
|
636
|
+
],
|
|
637
|
+
"aliasPermutations": [],
|
|
638
|
+
"permutations": [
|
|
639
|
+
"agent:generate:authoring-bundle",
|
|
640
|
+
"generate:agent:authoring-bundle",
|
|
641
|
+
"generate:authoring-bundle:agent",
|
|
642
|
+
"agent:authoring-bundle:generate",
|
|
643
|
+
"authoring-bundle:agent:generate",
|
|
644
|
+
"authoring-bundle:generate:agent"
|
|
645
|
+
]
|
|
646
|
+
},
|
|
535
647
|
"agent:generate:template": {
|
|
536
648
|
"aliases": [],
|
|
537
649
|
"args": {},
|
|
@@ -1349,5 +1461,5 @@
|
|
|
1349
1461
|
]
|
|
1350
1462
|
}
|
|
1351
1463
|
},
|
|
1352
|
-
"version": "1.24.14-demo.
|
|
1464
|
+
"version": "1.24.14-demo.1"
|
|
1353
1465
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-agent",
|
|
3
3
|
"description": "Commands to interact with Salesforce agents",
|
|
4
|
-
"version": "1.24.14-demo.
|
|
4
|
+
"version": "1.24.14-demo.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -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.24.14-demo.
|
|
233
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.14-demo.
|
|
232
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.14-demo.1.crt",
|
|
233
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.24.14-demo.1.sig"
|
|
234
234
|
}
|
|
235
235
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/AgentGenerateAuthoringBundleResult",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AgentGenerateAuthoringBundleResult": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"afScriptPath": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"metaXmlPath": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"outputDir": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["afScriptPath", "metaXmlPath", "outputDir"],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|