@salesforce/plugin-agent 1.24.14-nga.1 → 1.24.14-nga.3
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 +81 -60
- package/lib/commands/agent/generate/authoring-bundle.d.ts +1 -0
- package/lib/commands/agent/generate/authoring-bundle.js +1 -0
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -1
- package/lib/commands/agent/preview.d.ts +0 -1
- package/lib/commands/agent/preview.js +5 -25
- package/lib/commands/agent/preview.js.map +1 -1
- package/lib/commands/agent/publish/authoring-bundle.d.ts +1 -0
- package/lib/commands/agent/publish/authoring-bundle.js +3 -5
- package/lib/commands/agent/publish/authoring-bundle.js.map +1 -1
- package/lib/commands/agent/validate/authoring-bundle.d.ts +1 -0
- package/lib/commands/agent/validate/authoring-bundle.js +2 -1
- package/lib/commands/agent/validate/authoring-bundle.js.map +1 -1
- package/lib/components/agent-preview-react.d.ts +7 -1
- package/lib/components/agent-preview-react.js +109 -30
- package/lib/components/agent-preview-react.js.map +1 -1
- package/messages/agent.create.md +2 -0
- package/messages/agent.generate.agent-spec.md +2 -2
- package/messages/agent.generate.authoring-bundle.md +14 -8
- package/messages/agent.publish.authoring-bundle.md +8 -12
- package/messages/agent.validate.authoring-bundle.md +8 -8
- package/oclif.manifest.json +40 -37
- package/package.json +4 -4
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-nga.
|
|
115
|
+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/activate.ts)_
|
|
116
116
|
|
|
117
117
|
## `sf agent create`
|
|
118
118
|
|
|
@@ -140,6 +140,11 @@ GLOBAL FLAGS
|
|
|
140
140
|
DESCRIPTION
|
|
141
141
|
Create an agent in your org using a local agent spec file.
|
|
142
142
|
|
|
143
|
+
NOTE: This command creates an agent that doesn't use Agent Script as its blueprint. We generally don't recommend you
|
|
144
|
+
use this workflow to create an agent. Rather, use the "agent generate|validate|publish authoring-bundle" commands to
|
|
145
|
+
author agents that use the Agent Script language. See "Author an Agent"
|
|
146
|
+
(https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-nga-author-agent.html) for details.
|
|
147
|
+
|
|
143
148
|
To run this command, you must have an agent spec file, which is a YAML file that define the agent properties and
|
|
144
149
|
contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the "agent generate
|
|
145
150
|
agent-spec" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag,
|
|
@@ -174,7 +179,7 @@ EXAMPLES
|
|
|
174
179
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
175
180
|
```
|
|
176
181
|
|
|
177
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
182
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/create.ts)_
|
|
178
183
|
|
|
179
184
|
## `sf agent deactivate`
|
|
180
185
|
|
|
@@ -214,7 +219,7 @@ EXAMPLES
|
|
|
214
219
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
215
220
|
```
|
|
216
221
|
|
|
217
|
-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
222
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/deactivate.ts)_
|
|
218
223
|
|
|
219
224
|
## `sf agent generate agent-spec`
|
|
220
225
|
|
|
@@ -265,10 +270,9 @@ GLOBAL FLAGS
|
|
|
265
270
|
DESCRIPTION
|
|
266
271
|
Generate an agent spec, which is a YAML file that captures what an agent can do.
|
|
267
272
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
agent can handle.
|
|
273
|
+
An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company
|
|
274
|
+
description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent
|
|
275
|
+
can handle.
|
|
272
276
|
|
|
273
277
|
Use flags, such as --role and --company-description, to provide details about your company and the role that the agent
|
|
274
278
|
plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be
|
|
@@ -286,8 +290,11 @@ DESCRIPTION
|
|
|
286
290
|
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
|
|
287
291
|
agent.
|
|
288
292
|
|
|
289
|
-
When your agent spec is ready,
|
|
290
|
-
|
|
293
|
+
When your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the
|
|
294
|
+
"agent generate authoring-bundle" CLI command. An authoring bundle is a metadata type that contains an Agent Script
|
|
295
|
+
file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately
|
|
296
|
+
create an agent with the "agent create" command. We don't recommend this workflow because these types of agents don't
|
|
297
|
+
use Agent Script, and are thus less flexible and more difficult to maintain.)
|
|
291
298
|
|
|
292
299
|
EXAMPLES
|
|
293
300
|
Generate an agent spec in the default location and use flags to specify the agent properties, such as its role and
|
|
@@ -319,11 +326,11 @@ EXAMPLES
|
|
|
319
326
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
320
327
|
```
|
|
321
328
|
|
|
322
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
329
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/generate/agent-spec.ts)_
|
|
323
330
|
|
|
324
331
|
## `sf agent generate authoring-bundle`
|
|
325
332
|
|
|
326
|
-
Generate
|
|
333
|
+
Generate an authoring bundle from an existing agent spec YAML file.
|
|
327
334
|
|
|
328
335
|
```
|
|
329
336
|
USAGE
|
|
@@ -345,29 +352,40 @@ GLOBAL FLAGS
|
|
|
345
352
|
--json Format output as json.
|
|
346
353
|
|
|
347
354
|
DESCRIPTION
|
|
348
|
-
Generate
|
|
355
|
+
Generate an authoring bundle from an existing agent spec YAML file.
|
|
356
|
+
|
|
357
|
+
Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the
|
|
358
|
+
agent's blueprint; it fully describes what the agent can do using the Agent Script language.
|
|
359
|
+
|
|
360
|
+
Use this command to generate a new authoring bundle based on an agent spec YAML file, which you create with the "agent
|
|
361
|
+
generate agent-spec" command. The agent spec YAML file is a high-level description of the agent; it describes its
|
|
362
|
+
essence rather than exactly what it can do.
|
|
363
|
+
|
|
364
|
+
The metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard
|
|
365
|
+
"<bundle-name>.bundle-meta.xml" metadata file and the Agent Script file (with extension ".agent"). When you run this
|
|
366
|
+
command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/<bundle-name>
|
|
367
|
+
directory. Use the --output-dir flag to generate them elsewhere.
|
|
349
368
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
spec YAML file, which you create with the "agent create agent-spec" command.
|
|
369
|
+
After you generate the initial authoring bundle, vibe code (modify using natural language) the Agent Script file so
|
|
370
|
+
your agent behaves exactly as you want. The generated Agent Script file is just a first draft of your agent! Then
|
|
371
|
+
publish the agent to your org with the "agent publish authoring-bundle" command.
|
|
354
372
|
|
|
355
|
-
|
|
356
|
-
the --output-dir to generate them elsewhere.
|
|
373
|
+
This command requires an org because it uses it to access an LLM for generating the Agent Script file.
|
|
357
374
|
|
|
358
375
|
EXAMPLES
|
|
359
376
|
Generate an authoring bundle from the "specs/agentSpec.yaml" agent spec YAML file and give it the label "My
|
|
360
|
-
Authoring Bundle":
|
|
377
|
+
Authoring Bundle"; use your default org:
|
|
361
378
|
|
|
362
|
-
$ sf agent generate authoring-bundle --spec
|
|
379
|
+
$ sf agent generate authoring-bundle --spec specs/agentSpec.yaml --name "My Authoring Bundle"
|
|
363
380
|
|
|
364
|
-
Same as previous example, but generate the files in the other-package-dir/main/default
|
|
381
|
+
Same as previous example, but generate the files in the "other-package-dir/main/default" package directory; use the
|
|
382
|
+
org with alias "my-dev-org":
|
|
365
383
|
|
|
366
|
-
$ sf agent generate authoring-bundle --spec
|
|
367
|
-
other-package-dir/main/default
|
|
384
|
+
$ sf agent generate authoring-bundle --spec specs/agentSpec.yaml --name "My Authoring Bundle" --output-dir \
|
|
385
|
+
other-package-dir/main/default --target-org my-dev-org
|
|
368
386
|
```
|
|
369
387
|
|
|
370
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
388
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/generate/authoring-bundle.ts)_
|
|
371
389
|
|
|
372
390
|
## `sf agent generate template`
|
|
373
391
|
|
|
@@ -415,7 +433,7 @@ EXAMPLES
|
|
|
415
433
|
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
|
|
416
434
|
```
|
|
417
435
|
|
|
418
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
436
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/generate/template.ts)_
|
|
419
437
|
|
|
420
438
|
## `sf agent generate test-spec`
|
|
421
439
|
|
|
@@ -476,7 +494,7 @@ EXAMPLES
|
|
|
476
494
|
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
|
|
477
495
|
```
|
|
478
496
|
|
|
479
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
497
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/generate/test-spec.ts)_
|
|
480
498
|
|
|
481
499
|
## `sf agent preview`
|
|
482
500
|
|
|
@@ -542,11 +560,11 @@ EXAMPLES
|
|
|
542
560
|
transcripts/my-preview
|
|
543
561
|
```
|
|
544
562
|
|
|
545
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
563
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/preview.ts)_
|
|
546
564
|
|
|
547
565
|
## `sf agent publish authoring-bundle`
|
|
548
566
|
|
|
549
|
-
Publish an authoring bundle to your org, which results in a new
|
|
567
|
+
Publish an authoring bundle to your org, which results in a new or updated agent.
|
|
550
568
|
|
|
551
569
|
```
|
|
552
570
|
USAGE
|
|
@@ -563,29 +581,30 @@ GLOBAL FLAGS
|
|
|
563
581
|
--json Format output as json.
|
|
564
582
|
|
|
565
583
|
DESCRIPTION
|
|
566
|
-
Publish an authoring bundle to your org, which results in a new
|
|
584
|
+
Publish an authoring bundle to your org, which results in a new or updated agent.
|
|
567
585
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
created or updated. The org then creates a new next-gen agent based on the deployed authoring bundle and associated
|
|
572
|
-
metadata. Finally, all the metadata associated with the new agent is retrieved back to your local DX project.
|
|
586
|
+
An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The
|
|
587
|
+
metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that
|
|
588
|
+
fully describes the agent using the Agent Script language.
|
|
573
589
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
590
|
+
When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the
|
|
591
|
+
Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent
|
|
592
|
+
Script file to continue. Once the Agent Script file compiles, then the authoring bundle metadata component is deployed
|
|
593
|
+
to the org, and all associated agent metadata components, such as the Bot, BotVersion, and GenAiXXX components, are
|
|
594
|
+
either created or updated. The org then either creates a new agent based on the deployed authoring bundle, or creates
|
|
595
|
+
a new version of the agent if it already existed. Finally, all the new or changed metadata components associated with
|
|
596
|
+
the new agent are retrieved back to your local DX project.
|
|
577
597
|
|
|
578
|
-
This command
|
|
579
|
-
command
|
|
598
|
+
This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the
|
|
599
|
+
command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.
|
|
580
600
|
|
|
581
601
|
EXAMPLES
|
|
582
|
-
Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-org"
|
|
583
|
-
named "My Fab Agent"::
|
|
602
|
+
Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-org":
|
|
584
603
|
|
|
585
|
-
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --
|
|
604
|
+
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --target-org my-org
|
|
586
605
|
```
|
|
587
606
|
|
|
588
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
607
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/publish/authoring-bundle.ts)_
|
|
589
608
|
|
|
590
609
|
## `sf agent test create`
|
|
591
610
|
|
|
@@ -640,7 +659,7 @@ EXAMPLES
|
|
|
640
659
|
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
|
|
641
660
|
```
|
|
642
661
|
|
|
643
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
662
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/test/create.ts)_
|
|
644
663
|
|
|
645
664
|
## `sf agent test list`
|
|
646
665
|
|
|
@@ -675,7 +694,7 @@ EXAMPLES
|
|
|
675
694
|
$ sf agent test list --target-org my-org
|
|
676
695
|
```
|
|
677
696
|
|
|
678
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
697
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/test/list.ts)_
|
|
679
698
|
|
|
680
699
|
## `sf agent test results`
|
|
681
700
|
|
|
@@ -741,7 +760,7 @@ FLAG DESCRIPTIONS
|
|
|
741
760
|
expression when using custom evaluations.
|
|
742
761
|
```
|
|
743
762
|
|
|
744
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
763
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/test/results.ts)_
|
|
745
764
|
|
|
746
765
|
## `sf agent test resume`
|
|
747
766
|
|
|
@@ -814,7 +833,7 @@ FLAG DESCRIPTIONS
|
|
|
814
833
|
expression when using custom evaluations.
|
|
815
834
|
```
|
|
816
835
|
|
|
817
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
836
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/test/resume.ts)_
|
|
818
837
|
|
|
819
838
|
## `sf agent test run`
|
|
820
839
|
|
|
@@ -888,11 +907,11 @@ FLAG DESCRIPTIONS
|
|
|
888
907
|
expression when using custom evaluations.
|
|
889
908
|
```
|
|
890
909
|
|
|
891
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
910
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/test/run.ts)_
|
|
892
911
|
|
|
893
912
|
## `sf agent validate authoring-bundle`
|
|
894
913
|
|
|
895
|
-
Validate
|
|
914
|
+
Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.
|
|
896
915
|
|
|
897
916
|
```
|
|
898
917
|
USAGE
|
|
@@ -909,25 +928,27 @@ GLOBAL FLAGS
|
|
|
909
928
|
--json Format output as json.
|
|
910
929
|
|
|
911
930
|
DESCRIPTION
|
|
912
|
-
Validate
|
|
931
|
+
Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an
|
|
932
|
+
agent.
|
|
913
933
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
authoring-bundle" command.
|
|
934
|
+
An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The
|
|
935
|
+
metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that
|
|
936
|
+
fully describes the agent using the Agent Script language.
|
|
918
937
|
|
|
919
|
-
This command validates that the
|
|
920
|
-
|
|
938
|
+
This command validates that the Agent Script file in the authoring bundle compiles without errors so that you can
|
|
939
|
+
later publish the bundle to your org. Use this command while you vibe code (modify with natural language) the Agent
|
|
940
|
+
Script file to ensure that it's always valid. If the validation fails, the command outputs the list of syntax errors,
|
|
941
|
+
a brief description of the error, and the location in the Agent Script file where the error occurred.
|
|
921
942
|
|
|
922
|
-
This command
|
|
923
|
-
command
|
|
943
|
+
This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the
|
|
944
|
+
command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.
|
|
924
945
|
|
|
925
946
|
EXAMPLES
|
|
926
|
-
Validate
|
|
947
|
+
Validate an authoring bundle with API name MyAuthoringBundle:
|
|
927
948
|
|
|
928
949
|
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle
|
|
929
950
|
```
|
|
930
951
|
|
|
931
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.
|
|
952
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.24.14-nga.3/src/commands/agent/validate/authoring-bundle.ts)_
|
|
932
953
|
|
|
933
954
|
<!-- commandsstop -->
|
|
@@ -9,6 +9,7 @@ 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;
|
|
12
13
|
static readonly flags: {
|
|
13
14
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -29,6 +29,7 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
29
29
|
static description = messages.getMessage('description');
|
|
30
30
|
static examples = messages.getMessages('examples');
|
|
31
31
|
static requiresProject = true;
|
|
32
|
+
static state = 'beta';
|
|
32
33
|
static flags = {
|
|
33
34
|
'target-org': Flags.requiredOrg(),
|
|
34
35
|
'api-name': Flags.string({
|
|
@@ -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,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,O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AAC,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"}
|
|
@@ -35,5 +35,4 @@ export declare const agentIsUnsupported: (devName: string) => boolean;
|
|
|
35
35
|
export declare const agentIsInactive: (agent: AgentData) => boolean;
|
|
36
36
|
export declare const validateAgent: (agent: AgentData) => boolean;
|
|
37
37
|
export declare const getClientAppsFromAuth: (authInfo: AuthInfo) => string[];
|
|
38
|
-
export declare const resolveOutputDir: (outputDir: string | undefined, apexDebug: boolean | undefined) => Promise<string | undefined>;
|
|
39
38
|
export {};
|
|
@@ -20,9 +20,8 @@ import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
|
20
20
|
import { AuthInfo, Connection, Lifecycle, Messages, SfError } from '@salesforce/core';
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { render } from 'ink';
|
|
23
|
-
import { env } from '@salesforce/kit';
|
|
24
23
|
import { AgentPreview as Preview, AgentSimulate, AgentSource, findAuthoringBundle, } from '@salesforce/agents';
|
|
25
|
-
import {
|
|
24
|
+
import { select } from '@inquirer/prompts';
|
|
26
25
|
import { AgentPreviewReact } from '../../components/agent-preview-react.js';
|
|
27
26
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
28
27
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.preview');
|
|
@@ -135,7 +134,9 @@ export default class AgentPreview extends SfCommand {
|
|
|
135
134
|
clientApp,
|
|
136
135
|
})
|
|
137
136
|
: await Connection.create({ authInfo });
|
|
138
|
-
|
|
137
|
+
// Only resolve outputDir if explicitly provided via flag
|
|
138
|
+
// Otherwise, let user decide when exiting
|
|
139
|
+
const outputDir = flags['output-dir'] ? resolve(flags['output-dir']) : undefined;
|
|
139
140
|
// Both classes share the same interface for the methods we need
|
|
140
141
|
const agentPreview = selectedAgent.source === AgentSource.PUBLISHED
|
|
141
142
|
? new Preview(jwtConn, selectedAgent.Id)
|
|
@@ -147,6 +148,7 @@ export default class AgentPreview extends SfCommand {
|
|
|
147
148
|
name: selectedAgent.DeveloperName,
|
|
148
149
|
outputDir,
|
|
149
150
|
isLocalAgent: selectedAgent.source === AgentSource.SCRIPT,
|
|
151
|
+
apexDebug: flags['apex-debug'],
|
|
150
152
|
}), { exitOnCtrlC: false });
|
|
151
153
|
await instance.waitUntilExit();
|
|
152
154
|
}
|
|
@@ -200,26 +202,4 @@ export const validateAgent = (agent) => {
|
|
|
200
202
|
return true;
|
|
201
203
|
};
|
|
202
204
|
export const getClientAppsFromAuth = (authInfo) => Object.keys(authInfo.getFields().clientApps ?? {});
|
|
203
|
-
export const resolveOutputDir = async (outputDir, apexDebug) => {
|
|
204
|
-
if (!outputDir) {
|
|
205
|
-
const response = apexDebug
|
|
206
|
-
? true
|
|
207
|
-
: await confirm({
|
|
208
|
-
message: 'Save transcripts to an output directory?',
|
|
209
|
-
default: true,
|
|
210
|
-
});
|
|
211
|
-
const outputTypes = apexDebug ? 'debug logs and transcripts' : 'transcripts';
|
|
212
|
-
if (response) {
|
|
213
|
-
const getDir = await input({
|
|
214
|
-
message: `Enter the output directory for ${outputTypes}`,
|
|
215
|
-
default: env.getString('SF_AGENT_PREVIEW_OUTPUT_DIR', join('temp', 'agent-preview')),
|
|
216
|
-
required: true,
|
|
217
|
-
});
|
|
218
|
-
return resolve(getDir);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
else {
|
|
222
|
-
return resolve(outputDir);
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
205
|
//# sourceMappingURL=preview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/commands/agent/preview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAA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MAAM;oBAC1B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAQ,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC;iBACpD;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAW,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAErG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAgB,EAAW,EAAE;AAC3D,qGAAqG;AACrG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;AAEpF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAgB,EAAW,EAAE;IACzD,yCAAyC;IACzC,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,OAAO,CAAC,SAAS,KAAK,CAAC,aAAa,eAAe,CAAC,CAAC;IACjE,CAAC;IACD,qCAAqC;IACrC,IAAI,kBAAkB,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,OAAO,CAAC,SAAS,KAAK,CAAC,aAAa,oBAAoB,EAAE,0BAA0B,EAAE;YAC9F,yGAAyG;SAC1G,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAkB,EAAY,EAAE,CACpE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC"}
|
|
@@ -9,6 +9,7 @@ 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;
|
|
12
13
|
static readonly flags: {
|
|
13
14
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -31,6 +31,7 @@ export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
|
31
31
|
static description = messages.getMessage('description');
|
|
32
32
|
static examples = messages.getMessages('examples');
|
|
33
33
|
static requiresProject = true;
|
|
34
|
+
static state = 'beta';
|
|
34
35
|
static flags = {
|
|
35
36
|
'target-org': Flags.requiredOrg(),
|
|
36
37
|
'api-version': Flags.orgApiVersion(),
|
|
@@ -86,8 +87,6 @@ export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
|
86
87
|
mso.goto('Validate Bundle');
|
|
87
88
|
const targetOrg = flags['target-org'];
|
|
88
89
|
const conn = targetOrg.getConnection(flags['api-version']);
|
|
89
|
-
// Preserve the original accessToken by storing its value
|
|
90
|
-
const originalAccessToken = conn.accessToken;
|
|
91
90
|
// First compile the .agent file to get the Agent JSON
|
|
92
91
|
const compileResponse = await Agent.compileAgentScript(conn, readFileSync(join(authoringBundleDir, `${apiName}.agent`), 'utf8'));
|
|
93
92
|
if (compileResponse.status === 'success') {
|
|
@@ -115,8 +114,6 @@ export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
|
115
114
|
}
|
|
116
115
|
return Promise.resolve();
|
|
117
116
|
});
|
|
118
|
-
// Restore the original accessToken after compilation
|
|
119
|
-
conn.accessToken = originalAccessToken;
|
|
120
117
|
const result = await Agent.publishAgentJson(conn, this.project, compileResponse.compiledArtifact);
|
|
121
118
|
mso.stop();
|
|
122
119
|
return {
|
|
@@ -127,7 +124,8 @@ export default class AgentPublishAuthoringBundle extends SfCommand {
|
|
|
127
124
|
catch (error) {
|
|
128
125
|
// Handle validation errors
|
|
129
126
|
const err = SfError.wrap(error);
|
|
130
|
-
const
|
|
127
|
+
const message = err.message ? err.message : err.name;
|
|
128
|
+
const errorMessage = messages.getMessage('error.publishFailed', [message]);
|
|
131
129
|
// Stop the multi-stage output on error
|
|
132
130
|
mso.error();
|
|
133
131
|
this.error(errorMessage);
|
|
@@ -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;AAC9C,OAAO,EAAmB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,gCAAgC,CAAC,CAAC;AAQrG,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,SAA4C;IAC5F,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,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AQ,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;YACnG,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,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;YACrD,MAAM,YAAY,GAAG,QAAQ,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;YAE3E,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,6 +8,7 @@ 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;
|
|
11
12
|
static readonly flags: {
|
|
12
13
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -29,6 +29,7 @@ export default class AgentValidateAuthoringBundle extends SfCommand {
|
|
|
29
29
|
static description = messages.getMessage('description');
|
|
30
30
|
static examples = messages.getMessages('examples');
|
|
31
31
|
static requiresProject = true;
|
|
32
|
+
static state = 'beta';
|
|
32
33
|
static flags = {
|
|
33
34
|
'target-org': Flags.requiredOrg(),
|
|
34
35
|
'api-version': Flags.orgApiVersion(),
|
|
@@ -116,7 +117,7 @@ export default class AgentValidateAuthoringBundle extends SfCommand {
|
|
|
116
117
|
.join('\n');
|
|
117
118
|
mso.updateData({ errors: count.toString(), status: 'ERROR' });
|
|
118
119
|
mso.error();
|
|
119
|
-
this.
|
|
120
|
+
this.error(messages.getMessage('error.compilationFailed', [formattedError]));
|
|
120
121
|
return {
|
|
121
122
|
success: false,
|
|
122
123
|
errors: err.message.split('\n'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/validate/authoring-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAmB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,iCAAiC,CAAC,CAAC;AAOtG,MAAM,CAAC,OAAO,OAAO,4BAA6B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AK,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;YAC7C,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC,CAAC;YAEd,GAAG,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;YAC9D,GAAG,CAAC,KAAK,EAAE,CAAC;YAEZ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;YAC7E,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;aAChC,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Connection } from '@salesforce/core';
|
|
3
|
-
import { AgentPreviewBase } from '@salesforce/agents';
|
|
3
|
+
import { AgentPreviewBase, AgentPreviewSendResponse } from '@salesforce/agents';
|
|
4
|
+
export declare const saveTranscriptsToFile: (outputDir: string, messages: Array<{
|
|
5
|
+
timestamp: Date;
|
|
6
|
+
role: string;
|
|
7
|
+
content: string;
|
|
8
|
+
}>, responses: AgentPreviewSendResponse[]) => void;
|
|
4
9
|
/**
|
|
5
10
|
* Ideas:
|
|
6
11
|
* - Limit height based on terminal height
|
|
@@ -14,4 +19,5 @@ export declare function AgentPreviewReact(props: {
|
|
|
14
19
|
readonly name: string;
|
|
15
20
|
readonly outputDir: string | undefined;
|
|
16
21
|
readonly isLocalAgent: boolean;
|
|
22
|
+
readonly apexDebug: boolean | undefined;
|
|
17
23
|
}): React.ReactNode;
|