@salesforce/plugin-agent 1.42.0 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +495 -73
- package/lib/commands/agent/adl/file/add.d.ts +1 -1
- package/lib/commands/agent/adl/file/add.js +9 -5
- package/lib/commands/agent/adl/file/add.js.map +1 -1
- package/lib/commands/agent/adl/file/list.js +14 -1
- package/lib/commands/agent/adl/file/list.js.map +1 -1
- package/lib/commands/agent/adl/get.js +16 -1
- package/lib/commands/agent/adl/get.js.map +1 -1
- package/lib/commands/agent/adl/list.d.ts +1 -0
- package/lib/commands/agent/adl/list.js +7 -1
- package/lib/commands/agent/adl/list.js.map +1 -1
- package/lib/commands/agent/adl/update.d.ts +1 -0
- package/lib/commands/agent/adl/update.js +12 -0
- package/lib/commands/agent/adl/update.js.map +1 -1
- package/lib/commands/agent/adl/upload.d.ts +1 -1
- package/lib/commands/agent/adl/upload.js +11 -4
- package/lib/commands/agent/adl/upload.js.map +1 -1
- package/lib/commands/agent/generate/test-spec.d.ts +9 -0
- package/lib/commands/agent/generate/test-spec.js +195 -12
- package/lib/commands/agent/generate/test-spec.js.map +1 -1
- package/lib/commands/agent/mcp/asset/list.d.ts +16 -0
- package/lib/commands/agent/mcp/asset/list.js +68 -0
- package/lib/commands/agent/mcp/asset/list.js.map +1 -0
- package/lib/commands/agent/mcp/asset/replace.d.ts +18 -0
- package/lib/commands/agent/mcp/asset/replace.js +95 -0
- package/lib/commands/agent/mcp/asset/replace.js.map +1 -0
- package/lib/commands/agent/mcp/create.d.ts +24 -0
- package/lib/commands/agent/mcp/create.js +112 -0
- package/lib/commands/agent/mcp/create.js.map +1 -0
- package/lib/commands/agent/mcp/delete.d.ts +19 -0
- package/lib/commands/agent/mcp/delete.js +65 -0
- package/lib/commands/agent/mcp/delete.js.map +1 -0
- package/lib/commands/agent/mcp/fetch.d.ts +16 -0
- package/lib/commands/agent/mcp/fetch.js +68 -0
- package/lib/commands/agent/mcp/fetch.js.map +1 -0
- package/lib/commands/agent/mcp/get.d.ts +16 -0
- package/lib/commands/agent/mcp/get.js +58 -0
- package/lib/commands/agent/mcp/get.js.map +1 -0
- package/lib/commands/agent/mcp/list.d.ts +18 -0
- package/lib/commands/agent/mcp/list.js +73 -0
- package/lib/commands/agent/mcp/list.js.map +1 -0
- package/lib/commands/agent/mcp/update.d.ts +24 -0
- package/lib/commands/agent/mcp/update.js +115 -0
- package/lib/commands/agent/mcp/update.js.map +1 -0
- package/lib/commands/agent/preview/start.d.ts +1 -0
- package/lib/commands/agent/preview/start.js +4 -1
- package/lib/commands/agent/preview/start.js.map +1 -1
- package/lib/commands/agent/preview.d.ts +1 -0
- package/lib/commands/agent/preview.js +4 -0
- package/lib/commands/agent/preview.js.map +1 -1
- package/lib/components/agent-preview-react.d.ts +2 -1
- package/lib/components/agent-preview-react.js +3 -3
- package/lib/components/agent-preview-react.js.map +1 -1
- package/lib/flags.d.ts +12 -1
- package/lib/flags.js +31 -0
- package/lib/flags.js.map +1 -1
- package/messages/agent.adl.file.add.md +7 -3
- package/messages/agent.adl.list.md +4 -0
- package/messages/agent.adl.update.md +4 -0
- package/messages/agent.generate.test-spec.md +33 -5
- package/messages/agent.mcp.asset.list.md +25 -0
- package/messages/agent.mcp.asset.replace.md +49 -0
- package/messages/agent.mcp.create.md +61 -0
- package/messages/agent.mcp.delete.md +37 -0
- package/messages/agent.mcp.fetch.md +25 -0
- package/messages/agent.mcp.get.md +25 -0
- package/messages/agent.mcp.list.md +33 -0
- package/messages/agent.mcp.update.md +65 -0
- package/messages/shared.md +16 -0
- package/oclif.manifest.json +1971 -1081
- package/package.json +14 -4
- package/schemas/agent-adl-file-add.json +7 -1
- package/schemas/agent-mcp-asset-list.json +65 -0
- package/schemas/agent-mcp-asset-replace.json +65 -0
- package/schemas/agent-mcp-create.json +144 -0
- package/schemas/agent-mcp-delete.json +22 -0
- package/schemas/agent-mcp-fetch.json +66 -0
- package/schemas/agent-mcp-get.json +86 -0
- package/schemas/agent-mcp-list.json +101 -0
- package/schemas/agent-mcp-update.json +86 -0
package/README.md
CHANGED
|
@@ -76,6 +76,14 @@ sf plugins
|
|
|
76
76
|
- [`sf agent generate authoring-bundle`](#sf-agent-generate-authoring-bundle)
|
|
77
77
|
- [`sf agent generate template`](#sf-agent-generate-template)
|
|
78
78
|
- [`sf agent generate test-spec`](#sf-agent-generate-test-spec)
|
|
79
|
+
- [`sf agent mcp asset list`](#sf-agent-mcp-asset-list)
|
|
80
|
+
- [`sf agent mcp asset replace`](#sf-agent-mcp-asset-replace)
|
|
81
|
+
- [`sf agent mcp create`](#sf-agent-mcp-create)
|
|
82
|
+
- [`sf agent mcp delete`](#sf-agent-mcp-delete)
|
|
83
|
+
- [`sf agent mcp fetch`](#sf-agent-mcp-fetch)
|
|
84
|
+
- [`sf agent mcp get`](#sf-agent-mcp-get)
|
|
85
|
+
- [`sf agent mcp list`](#sf-agent-mcp-list)
|
|
86
|
+
- [`sf agent mcp update`](#sf-agent-mcp-update)
|
|
79
87
|
- [`sf agent preview`](#sf-agent-preview)
|
|
80
88
|
- [`sf agent preview end`](#sf-agent-preview-end)
|
|
81
89
|
- [`sf agent preview send`](#sf-agent-preview-send)
|
|
@@ -140,7 +148,7 @@ EXAMPLES
|
|
|
140
148
|
$ sf agent activate --api-name Resort_Manager --version 2 --target-org my-org
|
|
141
149
|
```
|
|
142
150
|
|
|
143
|
-
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
151
|
+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/activate.ts)_
|
|
144
152
|
|
|
145
153
|
## `sf agent adl create`
|
|
146
154
|
|
|
@@ -198,7 +206,7 @@ EXAMPLES
|
|
|
198
206
|
--source-type retriever --retriever-id 0ppXX0000000001
|
|
199
207
|
```
|
|
200
208
|
|
|
201
|
-
_See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
209
|
+
_See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/create.ts)_
|
|
202
210
|
|
|
203
211
|
## `sf agent adl delete`
|
|
204
212
|
|
|
@@ -229,7 +237,7 @@ EXAMPLES
|
|
|
229
237
|
$ sf agent adl delete --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
230
238
|
```
|
|
231
239
|
|
|
232
|
-
_See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
240
|
+
_See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/delete.ts)_
|
|
233
241
|
|
|
234
242
|
## `sf agent adl file add`
|
|
235
243
|
|
|
@@ -237,10 +245,10 @@ Add files to an existing Agentforce Data Library.
|
|
|
237
245
|
|
|
238
246
|
```
|
|
239
247
|
USAGE
|
|
240
|
-
$ sf agent adl file add -o <value> -i <value> -f <value
|
|
248
|
+
$ sf agent adl file add -o <value> -i <value> -f <value>... [--json] [--flags-dir <value>] [--api-version <value>]
|
|
241
249
|
|
|
242
250
|
FLAGS
|
|
243
|
-
-f, --
|
|
251
|
+
-f, --path=<value>... (required) Path to file(s) to add. Specify multiple times for batch upload.
|
|
244
252
|
-i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
|
|
245
253
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
246
254
|
configuration variable is already set.
|
|
@@ -261,10 +269,14 @@ DESCRIPTION
|
|
|
261
269
|
EXAMPLES
|
|
262
270
|
Add a file to an existing library:
|
|
263
271
|
|
|
264
|
-
$ sf agent adl file add
|
|
272
|
+
$ sf agent adl file add -i 1JDSG000007IbWX4A0 --path ./docs/new-guide.pdf --target-org myOrg
|
|
273
|
+
|
|
274
|
+
Add multiple files:
|
|
275
|
+
|
|
276
|
+
$ sf agent adl file add -i 1JDSG000007IbWX4A0 --path ./docs/guide.pdf --path ./docs/faq.txt --target-org myOrg
|
|
265
277
|
```
|
|
266
278
|
|
|
267
|
-
_See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
279
|
+
_See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/file/add.ts)_
|
|
268
280
|
|
|
269
281
|
## `sf agent adl file delete`
|
|
270
282
|
|
|
@@ -297,7 +309,7 @@ EXAMPLES
|
|
|
297
309
|
$ sf agent adl file delete --library-id 1JDSG000007IbWX4A0 --file-id a1B2C3D4E5F6G7H8I9 --target-org myOrg
|
|
298
310
|
```
|
|
299
311
|
|
|
300
|
-
_See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
312
|
+
_See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/file/delete.ts)_
|
|
301
313
|
|
|
302
314
|
## `sf agent adl file list`
|
|
303
315
|
|
|
@@ -332,7 +344,7 @@ EXAMPLES
|
|
|
332
344
|
$ sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json
|
|
333
345
|
```
|
|
334
346
|
|
|
335
|
-
_See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
347
|
+
_See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/file/list.ts)_
|
|
336
348
|
|
|
337
349
|
## `sf agent adl get`
|
|
338
350
|
|
|
@@ -363,7 +375,7 @@ EXAMPLES
|
|
|
363
375
|
$ sf agent adl get --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
364
376
|
```
|
|
365
377
|
|
|
366
|
-
_See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
378
|
+
_See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/get.ts)_
|
|
367
379
|
|
|
368
380
|
## `sf agent adl list`
|
|
369
381
|
|
|
@@ -371,12 +383,15 @@ List Agentforce Data Libraries in an org.
|
|
|
371
383
|
|
|
372
384
|
```
|
|
373
385
|
USAGE
|
|
374
|
-
$ sf agent adl list -o <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
386
|
+
$ sf agent adl list -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--source-type
|
|
387
|
+
sfdrive|knowledge|retriever]
|
|
375
388
|
|
|
376
389
|
FLAGS
|
|
377
|
-
-o, --target-org=<value>
|
|
378
|
-
|
|
379
|
-
--api-version=<value>
|
|
390
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
391
|
+
configuration variable is already set.
|
|
392
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
393
|
+
--source-type=<option> Filter by source type: sfdrive, knowledge, or retriever.
|
|
394
|
+
<options: sfdrive|knowledge|retriever>
|
|
380
395
|
|
|
381
396
|
GLOBAL FLAGS
|
|
382
397
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -397,7 +412,7 @@ EXAMPLES
|
|
|
397
412
|
$ sf agent adl list --target-org myOrg --json
|
|
398
413
|
```
|
|
399
414
|
|
|
400
|
-
_See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
415
|
+
_See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/list.ts)_
|
|
401
416
|
|
|
402
417
|
## `sf agent adl status`
|
|
403
418
|
|
|
@@ -429,7 +444,7 @@ EXAMPLES
|
|
|
429
444
|
$ sf agent adl status --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
430
445
|
```
|
|
431
446
|
|
|
432
|
-
_See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
447
|
+
_See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/status.ts)_
|
|
433
448
|
|
|
434
449
|
## `sf agent adl update`
|
|
435
450
|
|
|
@@ -438,7 +453,7 @@ Update an Agentforce Data Library.
|
|
|
438
453
|
```
|
|
439
454
|
USAGE
|
|
440
455
|
$ sf agent adl update -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
|
|
441
|
-
[--description <value>] [--content-fields <value>] [--restrict-to-public-articles]
|
|
456
|
+
[--description <value>] [--content-fields <value>] [--restrict-to-public-articles] [--retriever-id <value>]
|
|
442
457
|
|
|
443
458
|
FLAGS
|
|
444
459
|
-i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
|
|
@@ -451,6 +466,8 @@ FLAGS
|
|
|
451
466
|
--description=<value> New description for the data library (max 255 characters).
|
|
452
467
|
--[no-]restrict-to-public-articles Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers
|
|
453
468
|
re-indexing).
|
|
469
|
+
--retriever-id=<value> Swap the retriever for a RETRIEVER library (must be an active Custom Retriever
|
|
470
|
+
ID).
|
|
454
471
|
|
|
455
472
|
GLOBAL FLAGS
|
|
456
473
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -479,7 +496,7 @@ EXAMPLES
|
|
|
479
496
|
$ sf agent adl update --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg
|
|
480
497
|
```
|
|
481
498
|
|
|
482
|
-
_See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
499
|
+
_See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/update.ts)_
|
|
483
500
|
|
|
484
501
|
## `sf agent adl upload`
|
|
485
502
|
|
|
@@ -487,11 +504,11 @@ Upload a file to an SFDRIVE Agentforce Data Library.
|
|
|
487
504
|
|
|
488
505
|
```
|
|
489
506
|
USAGE
|
|
490
|
-
$ sf agent adl upload -o <value> -i <value> -f <value
|
|
507
|
+
$ sf agent adl upload -o <value> -i <value> -f <value>... [--json] [--flags-dir <value>] [--api-version <value>] [-w
|
|
491
508
|
<value>]
|
|
492
509
|
|
|
493
510
|
FLAGS
|
|
494
|
-
-f, --file=<value
|
|
511
|
+
-f, --file=<value>... (required) Path to the file to upload.
|
|
495
512
|
-i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
|
|
496
513
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
497
514
|
configuration variable is already set.
|
|
@@ -522,7 +539,7 @@ EXAMPLES
|
|
|
522
539
|
$ sf agent adl upload --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg
|
|
523
540
|
```
|
|
524
541
|
|
|
525
|
-
_See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
542
|
+
_See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/adl/upload.ts)_
|
|
526
543
|
|
|
527
544
|
## `sf agent create`
|
|
528
545
|
|
|
@@ -589,7 +606,7 @@ EXAMPLES
|
|
|
589
606
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
590
607
|
```
|
|
591
608
|
|
|
592
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
609
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/create.ts)_
|
|
593
610
|
|
|
594
611
|
## `sf agent deactivate`
|
|
595
612
|
|
|
@@ -630,7 +647,7 @@ EXAMPLES
|
|
|
630
647
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
631
648
|
```
|
|
632
649
|
|
|
633
|
-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
650
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/deactivate.ts)_
|
|
634
651
|
|
|
635
652
|
## `sf agent generate agent-spec`
|
|
636
653
|
|
|
@@ -737,7 +754,7 @@ EXAMPLES
|
|
|
737
754
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
738
755
|
```
|
|
739
756
|
|
|
740
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
757
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/generate/agent-spec.ts)_
|
|
741
758
|
|
|
742
759
|
## `sf agent generate authoring-bundle`
|
|
743
760
|
|
|
@@ -814,7 +831,7 @@ EXAMPLES
|
|
|
814
831
|
other-package-dir/main/default --target-org my-dev-org
|
|
815
832
|
```
|
|
816
833
|
|
|
817
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
834
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/generate/authoring-bundle.ts)_
|
|
818
835
|
|
|
819
836
|
## `sf agent generate template`
|
|
820
837
|
|
|
@@ -876,7 +893,7 @@ EXAMPLES
|
|
|
876
893
|
my-package --source-org my-scratch-org
|
|
877
894
|
```
|
|
878
895
|
|
|
879
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
896
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/generate/template.ts)_
|
|
880
897
|
|
|
881
898
|
## `sf agent generate test-spec`
|
|
882
899
|
|
|
@@ -884,14 +901,18 @@ Generate an agent test spec, which is a YAML file that lists the test cases for
|
|
|
884
901
|
|
|
885
902
|
```
|
|
886
903
|
USAGE
|
|
887
|
-
$ sf agent generate test-spec [--flags-dir <value>] [-d <value>] [--force-overwrite] [-f <value>]
|
|
904
|
+
$ sf agent generate test-spec [--flags-dir <value>] [-d <value>] [--force-overwrite] [-f <value>] [--test-runner
|
|
905
|
+
agentforce-studio|testing-center]
|
|
888
906
|
|
|
889
907
|
FLAGS
|
|
890
|
-
-d, --from-definition=<value> Filepath to
|
|
891
|
-
want to convert to a test spec YAML file.
|
|
908
|
+
-d, --from-definition=<value> Filepath to an AiEvaluationDefinition or AiTestingDefinition metadata XML file in your
|
|
909
|
+
DX project that you want to convert to a test spec YAML file.
|
|
892
910
|
-f, --output-file=<value> Name of the generated test spec YAML file. Default value is
|
|
893
|
-
"specs/<AGENT_API_NAME>-testSpec.yaml"
|
|
911
|
+
"specs/<AGENT_API_NAME>-testSpec.yaml" (legacy) or
|
|
912
|
+
"specs/<AGENT_API_NAME>-ngtTestSpec.yaml" (Agentforce Studio).
|
|
894
913
|
--force-overwrite Don't prompt for confirmation when overwriting an existing test spec YAML file.
|
|
914
|
+
--test-runner=<option> Explicitly specify which test runner to use (agentforce-studio or testing-center).
|
|
915
|
+
<options: agentforce-studio|testing-center>
|
|
895
916
|
|
|
896
917
|
GLOBAL FLAGS
|
|
897
918
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -920,16 +941,22 @@ DESCRIPTION
|
|
|
920
941
|
information.
|
|
921
942
|
|
|
922
943
|
When your test spec is ready, you then run the "agent test create" command to actually create the test in your org and
|
|
923
|
-
synchronize the metadata with your DX project. The metadata type for an agent test is AiEvaluationDefinition
|
|
944
|
+
synchronize the metadata with your DX project. The metadata type for an agent test is `AiEvaluationDefinition` (legacy
|
|
945
|
+
testing-center) or `AiTestingDefinition` (Agentforce Studio / NGT), selected via --test-runner.
|
|
924
946
|
|
|
925
|
-
If you have an existing AiEvaluationDefinition metadata XML file in your DX project, you can
|
|
926
|
-
YAML test spec file with the --from-definition flag.
|
|
947
|
+
If you have an existing AiEvaluationDefinition or AiTestingDefinition metadata XML file in your DX project, you can
|
|
948
|
+
generate its equivalent YAML test spec file with the --from-definition flag. The runner is inferred from the file
|
|
949
|
+
extension; pass --test-runner to override.
|
|
927
950
|
|
|
928
951
|
EXAMPLES
|
|
929
952
|
Generate an agent test spec YAML file interactively:
|
|
930
953
|
|
|
931
954
|
$ sf agent generate test-spec
|
|
932
955
|
|
|
956
|
+
Generate an Agentforce Studio (NGT) test spec YAML file interactively:
|
|
957
|
+
|
|
958
|
+
$ sf agent generate test-spec --test-runner agentforce-studio
|
|
959
|
+
|
|
933
960
|
Generate an agent test spec YAML file and specify a name for the new file; if the file exists, overwrite it without
|
|
934
961
|
confirmation:
|
|
935
962
|
|
|
@@ -938,10 +965,361 @@ EXAMPLES
|
|
|
938
965
|
Generate an agent test spec YAML file from an existing AiEvaluationDefinition metadata XML file in your DX project:
|
|
939
966
|
|
|
940
967
|
$ sf agent generate test-spec --from-definition \
|
|
941
|
-
force-app
|
|
968
|
+
force-app/main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
|
|
969
|
+
|
|
970
|
+
Generate an Agentforce Studio (NGT) test spec YAML file from an existing AiTestingDefinition metadata XML file:
|
|
971
|
+
|
|
972
|
+
$ sf agent generate test-spec --from-definition \
|
|
973
|
+
force-app/main/default/aiTestingDefinitions/Returns_Checkout_Tests.aiTestingDefinition-meta.xml
|
|
974
|
+
|
|
975
|
+
FLAG DESCRIPTIONS
|
|
976
|
+
--test-runner=agentforce-studio|testing-center
|
|
977
|
+
|
|
978
|
+
Explicitly specify which test runner to use (agentforce-studio or testing-center).
|
|
979
|
+
|
|
980
|
+
By default, the command automatically detects which test runner to use based on the test definition metadata type in
|
|
981
|
+
your org. Use this flag to explicitly specify the runner type. 'agentforce-studio' uses AiTestingDefinition
|
|
982
|
+
metadata. 'testing-center' uses AiEvaluationDefinition metadata.
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/generate/test-spec.ts)_
|
|
986
|
+
|
|
987
|
+
## `sf agent mcp asset list`
|
|
988
|
+
|
|
989
|
+
List the assets (tools, prompts, and resources) for an MCP server in the catalog.
|
|
990
|
+
|
|
991
|
+
```
|
|
992
|
+
USAGE
|
|
993
|
+
$ sf agent mcp asset list -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
994
|
+
|
|
995
|
+
FLAGS
|
|
996
|
+
-i, --mcp-server-id=<value> (required) The ID of the MCP server whose assets you want to list.
|
|
997
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
998
|
+
configuration variable is already set.
|
|
999
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1000
|
+
|
|
1001
|
+
GLOBAL FLAGS
|
|
1002
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1003
|
+
--json Format output as json.
|
|
1004
|
+
|
|
1005
|
+
DESCRIPTION
|
|
1006
|
+
List the assets (tools, prompts, and resources) for an MCP server in the catalog.
|
|
1007
|
+
|
|
1008
|
+
Returns the assets discovered for the specified MCP server, including each asset's kind (MCP_TOOL, MCP_PROMPT, or
|
|
1009
|
+
MCP_RESOURCE), whether it is active, and whether it is available as an agent action.
|
|
1010
|
+
|
|
1011
|
+
EXAMPLES
|
|
1012
|
+
List the assets for an MCP server in the default target org:
|
|
1013
|
+
|
|
1014
|
+
$ sf agent mcp asset list --target-org myOrg --mcp-server-id 0XSxx0000000001
|
|
1015
|
+
|
|
1016
|
+
List the assets for an MCP server and output as JSON:
|
|
1017
|
+
|
|
1018
|
+
$ sf agent mcp asset list --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
_See code: [src/commands/agent/mcp/asset/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/asset/list.ts)_
|
|
1022
|
+
|
|
1023
|
+
## `sf agent mcp asset replace`
|
|
1024
|
+
|
|
1025
|
+
Replace the asset set of an MCP server in the API Catalog.
|
|
1026
|
+
|
|
1027
|
+
```
|
|
1028
|
+
USAGE
|
|
1029
|
+
$ sf agent mcp asset replace -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--assets <value>
|
|
1030
|
+
| --assets-file <value>]
|
|
1031
|
+
|
|
1032
|
+
FLAGS
|
|
1033
|
+
-i, --mcp-server-id=<value> (required) ID of the MCP server whose assets you want to replace.
|
|
1034
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1035
|
+
configuration variable is already set.
|
|
1036
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1037
|
+
--assets=<value> The desired asset allowlist as a JSON string (or "-" to read from stdin). Mutually
|
|
1038
|
+
exclusive with --assets-file.
|
|
1039
|
+
--assets-file=<value> Path to a JSON file containing the desired asset allowlist. Mutually exclusive with
|
|
1040
|
+
--assets.
|
|
1041
|
+
|
|
1042
|
+
GLOBAL FLAGS
|
|
1043
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1044
|
+
--json Format output as json.
|
|
1045
|
+
|
|
1046
|
+
DESCRIPTION
|
|
1047
|
+
Replace the asset set of an MCP server in the API Catalog.
|
|
1048
|
+
|
|
1049
|
+
Replaces the full set of assets (tools, prompts, resources) for an MCP server with the asset items you supply. Provide
|
|
1050
|
+
the assets either inline with `--assets` (a JSON string, or `-` to read from stdin) or from a file with
|
|
1051
|
+
`--assets-file`. The JSON must be either an array of asset items or an object of the form `{ "assets": [...] }`. Each
|
|
1052
|
+
asset item may include `id`, `name`, `label`, `description`, `active`, and `kind`. This is a full replacement:
|
|
1053
|
+
existing assets not present in the supplied set are removed, so provide the complete desired asset set (read the
|
|
1054
|
+
current set first with `agent mcp asset list` or `agent mcp fetch`).
|
|
1055
|
+
|
|
1056
|
+
EXAMPLES
|
|
1057
|
+
Replace the assets inline with a JSON string:
|
|
1058
|
+
|
|
1059
|
+
$ sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets \
|
|
1060
|
+
'{"assets":[{"name":"McpTool__add","active":true}]}' --target-org myOrg
|
|
1061
|
+
|
|
1062
|
+
Replace the assets from a JSON file:
|
|
1063
|
+
|
|
1064
|
+
$ sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets-file ./assets.json --target-org myOrg
|
|
1065
|
+
|
|
1066
|
+
Pipe the assets from stdin:
|
|
1067
|
+
cat assets.json | sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets - --target-org myOrg
|
|
1068
|
+
```
|
|
1069
|
+
|
|
1070
|
+
_See code: [src/commands/agent/mcp/asset/replace.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/asset/replace.ts)_
|
|
1071
|
+
|
|
1072
|
+
## `sf agent mcp create`
|
|
1073
|
+
|
|
1074
|
+
Create an MCP server in the API Catalog.
|
|
1075
|
+
|
|
1076
|
+
```
|
|
1077
|
+
USAGE
|
|
1078
|
+
$ sf agent mcp create -o <value> -n <value> --server-url <value> [--json] [--flags-dir <value>] [--api-version
|
|
1079
|
+
<value>] [--label <value>] [--description <value>] [--auth-type OAUTH|NO_AUTH] [--identity-provider <value>]
|
|
1080
|
+
[--client-id <value>] [--client-secret <value>] [--scope <value>]
|
|
1081
|
+
|
|
1082
|
+
FLAGS
|
|
1083
|
+
-n, --name=<value> (required) Unique name of the MCP server.
|
|
1084
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1085
|
+
configuration variable is already set.
|
|
1086
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1087
|
+
--auth-type=<option> [default: NO_AUTH] Authorization type to use when connecting to the MCP server.
|
|
1088
|
+
<options: OAUTH|NO_AUTH>
|
|
1089
|
+
--client-id=<value> OAuth client ID. Required when auth-type is OAUTH.
|
|
1090
|
+
--client-secret=<value> OAuth client secret. Required when auth-type is OAUTH. Pass "-" to read it from stdin
|
|
1091
|
+
(piped) and keep it out of shell history.
|
|
1092
|
+
--description=<value> Description of the MCP server.
|
|
1093
|
+
--identity-provider=<value> Identity provider to use for OAuth authorization. Required when auth-type is OAUTH.
|
|
1094
|
+
--label=<value> Human-readable label for the MCP server.
|
|
1095
|
+
--scope=<value> OAuth scope to request. Required when auth-type is OAUTH.
|
|
1096
|
+
--server-url=<value> (required) URL of the external MCP server.
|
|
1097
|
+
|
|
1098
|
+
GLOBAL FLAGS
|
|
1099
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1100
|
+
--json Format output as json.
|
|
1101
|
+
|
|
1102
|
+
DESCRIPTION
|
|
1103
|
+
Create an MCP server in the API Catalog.
|
|
1104
|
+
|
|
1105
|
+
Registers an external Model Context Protocol (MCP) server with the API Catalog and discovers its assets (tools,
|
|
1106
|
+
prompts, and resources). Provide the server URL and, when the server requires it, OAuth authorization details. When
|
|
1107
|
+
the authorization type is OAUTH you must supply the identity provider, client ID, client secret, and scope.
|
|
1108
|
+
|
|
1109
|
+
EXAMPLES
|
|
1110
|
+
Create an MCP server with no authentication:
|
|
1111
|
+
|
|
1112
|
+
$ sf agent mcp create --name myServer --server-url https://mcp.example.com --target-org myOrg
|
|
1113
|
+
|
|
1114
|
+
Create an MCP server that uses OAuth authentication, piping the client secret from stdin to keep it out of shell history:
|
|
1115
|
+
cat secret.txt | sf agent mcp create --name myServer --server-url https://mcp.example.com --auth-type OAUTH --identity-provider myIdp --client-id abc123 --client-secret - --scope "read write" --target-org myOrg
|
|
1116
|
+
```
|
|
1117
|
+
|
|
1118
|
+
_See code: [src/commands/agent/mcp/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/create.ts)_
|
|
1119
|
+
|
|
1120
|
+
## `sf agent mcp delete`
|
|
1121
|
+
|
|
1122
|
+
Delete an MCP server from the API Catalog.
|
|
1123
|
+
|
|
1124
|
+
```
|
|
1125
|
+
USAGE
|
|
1126
|
+
$ sf agent mcp delete -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--no-prompt]
|
|
1127
|
+
|
|
1128
|
+
FLAGS
|
|
1129
|
+
-i, --mcp-server-id=<value> (required) ID of the MCP server to delete.
|
|
1130
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1131
|
+
configuration variable is already set.
|
|
1132
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1133
|
+
--no-prompt Skip the confirmation prompt and delete the MCP server immediately.
|
|
1134
|
+
|
|
1135
|
+
GLOBAL FLAGS
|
|
1136
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1137
|
+
--json Format output as json.
|
|
1138
|
+
|
|
1139
|
+
DESCRIPTION
|
|
1140
|
+
Delete an MCP server from the API Catalog.
|
|
1141
|
+
|
|
1142
|
+
Permanently removes an MCP (Model Context Protocol) server registration from the API Catalog, identified by its ID. By
|
|
1143
|
+
default you are prompted to confirm the deletion; pass --no-prompt to skip the confirmation (for example in scripts
|
|
1144
|
+
and CI).
|
|
1145
|
+
|
|
1146
|
+
EXAMPLES
|
|
1147
|
+
Delete an MCP server, confirming interactively:
|
|
1148
|
+
|
|
1149
|
+
$ sf agent mcp delete --mcp-server-id 0XSxx0000000001 --target-org myOrg
|
|
1150
|
+
|
|
1151
|
+
Delete an MCP server without a confirmation prompt:
|
|
1152
|
+
|
|
1153
|
+
$ sf agent mcp delete --mcp-server-id 0XSxx0000000001 --target-org myOrg --no-prompt
|
|
1154
|
+
```
|
|
1155
|
+
|
|
1156
|
+
_See code: [src/commands/agent/mcp/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/delete.ts)_
|
|
1157
|
+
|
|
1158
|
+
## `sf agent mcp fetch`
|
|
1159
|
+
|
|
1160
|
+
Fetch the live assets (tools, prompts, resources) advertised by an MCP server.
|
|
1161
|
+
|
|
942
1162
|
```
|
|
1163
|
+
USAGE
|
|
1164
|
+
$ sf agent mcp fetch -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
1165
|
+
|
|
1166
|
+
FLAGS
|
|
1167
|
+
-i, --mcp-server-id=<value> (required) ID of the MCP server to fetch assets from.
|
|
1168
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1169
|
+
configuration variable is already set.
|
|
1170
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1171
|
+
|
|
1172
|
+
GLOBAL FLAGS
|
|
1173
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1174
|
+
--json Format output as json.
|
|
1175
|
+
|
|
1176
|
+
DESCRIPTION
|
|
1177
|
+
Fetch the live assets (tools, prompts, resources) advertised by an MCP server.
|
|
1178
|
+
|
|
1179
|
+
Performs a live fetch against the configured MCP server identified by its ID, returning the assets (MCP tools,
|
|
1180
|
+
prompts, and resources) it currently advertises along with their status and activation state. Use this to refresh the
|
|
1181
|
+
view of what an MCP server exposes before activating its assets as agent actions.
|
|
1182
|
+
|
|
1183
|
+
EXAMPLES
|
|
1184
|
+
Fetch the assets advertised by an MCP server in the default target org:
|
|
1185
|
+
|
|
1186
|
+
$ sf agent mcp fetch --target-org myOrg --mcp-server-id 0XSxx0000000001
|
|
1187
|
+
|
|
1188
|
+
Fetch MCP server assets and output as JSON:
|
|
1189
|
+
|
|
1190
|
+
$ sf agent mcp fetch --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
|
|
1191
|
+
```
|
|
1192
|
+
|
|
1193
|
+
_See code: [src/commands/agent/mcp/fetch.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/fetch.ts)_
|
|
1194
|
+
|
|
1195
|
+
## `sf agent mcp get`
|
|
1196
|
+
|
|
1197
|
+
Get a single MCP server registered in the API Catalog.
|
|
1198
|
+
|
|
1199
|
+
```
|
|
1200
|
+
USAGE
|
|
1201
|
+
$ sf agent mcp get -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
1202
|
+
|
|
1203
|
+
FLAGS
|
|
1204
|
+
-i, --mcp-server-id=<value> (required) The identifier of the MCP server to retrieve.
|
|
1205
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1206
|
+
configuration variable is already set.
|
|
1207
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1208
|
+
|
|
1209
|
+
GLOBAL FLAGS
|
|
1210
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1211
|
+
--json Format output as json.
|
|
1212
|
+
|
|
1213
|
+
DESCRIPTION
|
|
1214
|
+
Get a single MCP server registered in the API Catalog.
|
|
1215
|
+
|
|
1216
|
+
Retrieves the details of an MCP (Model Context Protocol) server by its identifier, including its name, label, type,
|
|
1217
|
+
status, and server URL.
|
|
1218
|
+
|
|
1219
|
+
EXAMPLES
|
|
1220
|
+
Get an MCP server by id in the default target org:
|
|
1221
|
+
|
|
1222
|
+
$ sf agent mcp get --target-org myOrg --mcp-server-id 0Mx000000000001
|
|
1223
|
+
|
|
1224
|
+
Get an MCP server and output as JSON:
|
|
1225
|
+
|
|
1226
|
+
$ sf agent mcp get --target-org myOrg --mcp-server-id 0Mx000000000001 --json
|
|
1227
|
+
```
|
|
1228
|
+
|
|
1229
|
+
_See code: [src/commands/agent/mcp/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/get.ts)_
|
|
1230
|
+
|
|
1231
|
+
## `sf agent mcp list`
|
|
1232
|
+
|
|
1233
|
+
List the MCP servers registered in the API Catalog.
|
|
1234
|
+
|
|
1235
|
+
```
|
|
1236
|
+
USAGE
|
|
1237
|
+
$ sf agent mcp list -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--label <value>] [--type
|
|
1238
|
+
EXTERNAL] [--status ACTIVE|DISCONNECTED]
|
|
1239
|
+
|
|
1240
|
+
FLAGS
|
|
1241
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1242
|
+
configuration variable is already set.
|
|
1243
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1244
|
+
--label=<value> Filter the MCP servers by label.
|
|
1245
|
+
--status=<option> Filter the MCP servers by connection status. Only ACTIVE and DISCONNECTED are supported as
|
|
1246
|
+
filters.
|
|
1247
|
+
<options: ACTIVE|DISCONNECTED>
|
|
1248
|
+
--type=<option> Filter the MCP servers by type.
|
|
1249
|
+
<options: EXTERNAL>
|
|
1250
|
+
|
|
1251
|
+
GLOBAL FLAGS
|
|
1252
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1253
|
+
--json Format output as json.
|
|
1254
|
+
|
|
1255
|
+
DESCRIPTION
|
|
1256
|
+
List the MCP servers registered in the API Catalog.
|
|
1257
|
+
|
|
1258
|
+
Returns the Model Context Protocol (MCP) servers registered in the API Catalog, optionally filtered by label, type, or
|
|
1259
|
+
status. Use this to discover which MCP servers are available and inspect their server URLs and current status.
|
|
943
1260
|
|
|
944
|
-
|
|
1261
|
+
EXAMPLES
|
|
1262
|
+
List all MCP servers in the default target org:
|
|
1263
|
+
|
|
1264
|
+
$ sf agent mcp list --target-org myOrg
|
|
1265
|
+
|
|
1266
|
+
List external MCP servers filtered by status and output as JSON:
|
|
1267
|
+
|
|
1268
|
+
$ sf agent mcp list --target-org myOrg --type EXTERNAL --status ACTIVE --json
|
|
1269
|
+
```
|
|
1270
|
+
|
|
1271
|
+
_See code: [src/commands/agent/mcp/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/list.ts)_
|
|
1272
|
+
|
|
1273
|
+
## `sf agent mcp update`
|
|
1274
|
+
|
|
1275
|
+
Update an MCP server registered in the API Catalog.
|
|
1276
|
+
|
|
1277
|
+
```
|
|
1278
|
+
USAGE
|
|
1279
|
+
$ sf agent mcp update -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--label <value>]
|
|
1280
|
+
[--description <value>] [--server-url <value>] [--auth-type OAUTH|NO_AUTH] [--identity-provider <value>]
|
|
1281
|
+
[--client-id <value>] [--client-secret <value>] [--scope <value>]
|
|
1282
|
+
|
|
1283
|
+
FLAGS
|
|
1284
|
+
-i, --mcp-server-id=<value> (required) ID of the MCP server to update.
|
|
1285
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1286
|
+
configuration variable is already set.
|
|
1287
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1288
|
+
--auth-type=<option> Authorization type to apply to the MCP server (OAUTH or NO_AUTH).
|
|
1289
|
+
<options: OAUTH|NO_AUTH>
|
|
1290
|
+
--client-id=<value> OAuth client ID (required when --auth-type is OAUTH).
|
|
1291
|
+
--client-secret=<value> OAuth client secret (required when --auth-type is OAUTH). Pass "-" to read it from
|
|
1292
|
+
stdin (piped) and keep it out of shell history.
|
|
1293
|
+
--description=<value> New description for the MCP server.
|
|
1294
|
+
--identity-provider=<value> Identity provider name for OAuth authorization (required when --auth-type is OAUTH).
|
|
1295
|
+
--label=<value> New display label for the MCP server.
|
|
1296
|
+
--scope=<value> OAuth scope (required when --auth-type is OAUTH).
|
|
1297
|
+
--server-url=<value> New endpoint URL of the MCP server.
|
|
1298
|
+
|
|
1299
|
+
GLOBAL FLAGS
|
|
1300
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1301
|
+
--json Format output as json.
|
|
1302
|
+
|
|
1303
|
+
DESCRIPTION
|
|
1304
|
+
Update an MCP server registered in the API Catalog.
|
|
1305
|
+
|
|
1306
|
+
Updates an existing MCP server in the API Catalog. Only the fields you provide are changed; omitted fields are left
|
|
1307
|
+
untouched. You can update the label, description, and server URL, and replace the authorization configuration. When
|
|
1308
|
+
setting `--auth-type OAUTH`, you must also provide `--identity-provider`, `--client-id`, `--client-secret`, and
|
|
1309
|
+
`--scope`. When setting `--auth-type NO_AUTH`, no authorization credentials are required. At least one updatable field
|
|
1310
|
+
must be supplied.
|
|
1311
|
+
|
|
1312
|
+
EXAMPLES
|
|
1313
|
+
Update the label and description of an MCP server in the default target org:
|
|
1314
|
+
|
|
1315
|
+
$ sf agent mcp update --mcp-server-id 0XSxx0000000001 --label "Orders MCP" --description "Order tooling" \
|
|
1316
|
+
--target-org myOrg
|
|
1317
|
+
|
|
1318
|
+
Update the server URL and switch the authorization to OAuth, piping the client secret from stdin and outputting as JSON:
|
|
1319
|
+
cat secret.txt | sf agent mcp update --mcp-server-id 0XSxx0000000001 --server-url https://mcp.example.com --auth-type OAUTH --identity-provider MyIdp --client-id abc --client-secret - --scope "read write" --target-org myOrg --json
|
|
1320
|
+
```
|
|
1321
|
+
|
|
1322
|
+
_See code: [src/commands/agent/mcp/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/mcp/update.ts)_
|
|
945
1323
|
|
|
946
1324
|
## `sf agent preview`
|
|
947
1325
|
|
|
@@ -950,19 +1328,20 @@ Interact with an agent to preview how it responds to your statements, questions,
|
|
|
950
1328
|
```
|
|
951
1329
|
USAGE
|
|
952
1330
|
$ sf agent preview -o <value> [--flags-dir <value>] [--api-version <value>] [-n <value>] [--authoring-bundle
|
|
953
|
-
<value>] [-d <value>] [-x] [--use-live-actions]
|
|
1331
|
+
<value>] [-d <value>] [-x] [--use-live-actions] [--context-variables <value>...]
|
|
954
1332
|
|
|
955
1333
|
FLAGS
|
|
956
|
-
-d, --output-dir=<value>
|
|
957
|
-
-n, --api-name=<value>
|
|
958
|
-
-o, --target-org=<value>
|
|
959
|
-
|
|
960
|
-
-x, --apex-debug
|
|
961
|
-
--api-version=<value>
|
|
962
|
-
--authoring-bundle=<value>
|
|
963
|
-
|
|
964
|
-
--
|
|
965
|
-
|
|
1334
|
+
-d, --output-dir=<value> Directory where conversation transcripts are saved.
|
|
1335
|
+
-n, --api-name=<value> API name of the activated published agent you want to interact with.
|
|
1336
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1337
|
+
configuration variable is already set.
|
|
1338
|
+
-x, --apex-debug Enable Apex debug logging during the agent preview conversation.
|
|
1339
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1340
|
+
--authoring-bundle=<value> API name of the authoring bundle metadata component that contains the agent's
|
|
1341
|
+
Agent Script file.
|
|
1342
|
+
--context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
|
|
1343
|
+
--use-live-actions Use real actions in the org; if not specified, preview uses AI to simulate (mock)
|
|
1344
|
+
actions.
|
|
966
1345
|
|
|
967
1346
|
GLOBAL FLAGS
|
|
968
1347
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -1012,9 +1391,30 @@ EXAMPLES
|
|
|
1012
1391
|
"./transcripts/my-preview" directory, enable the Apex debug logs, and use your default org:
|
|
1013
1392
|
|
|
1014
1393
|
$ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview
|
|
1394
|
+
|
|
1395
|
+
FLAG DESCRIPTIONS
|
|
1396
|
+
--context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
|
|
1397
|
+
|
|
1398
|
+
Sets variables on the agent preview session, mirroring what the in-org Agentforce Builder UI does when you override
|
|
1399
|
+
variables before sending a message. Specify this flag multiple times or use comma-separated values. Two namespaces
|
|
1400
|
+
are supported, distinguished by the name shape. Names pass through to the runtime verbatim — the CLI doesn't
|
|
1401
|
+
transform them.
|
|
1402
|
+
|
|
1403
|
+
Linked context variables use the "$Context." prefix. These map to externally-provided fields that the runtime
|
|
1404
|
+
resolves (declared in the bundle's globalConfiguration.contextVariables) and are read by live actions and
|
|
1405
|
+
topic-routing expressions via $Context.Name. Example: $Context.MyLinkedVar=some-value.
|
|
1406
|
+
|
|
1407
|
+
State variables use the bare developerName, no prefix. These seed mutable agent state declared in
|
|
1408
|
+
agentVersion.stateVariables. Example: MyStateVar=some-value.
|
|
1409
|
+
|
|
1410
|
+
Both namespaces can be mixed in one value. Example: --context-variables '$Context.MyLinkedVar=foo,MyStateVar=bar'.
|
|
1411
|
+
|
|
1412
|
+
Tips: (1) Quote the whole value in single quotes so $Context isn't shell-expanded. (2) Names are sent verbatim — a
|
|
1413
|
+
bare name is treated as a state variable, not a linked context variable, so live actions that bind via $Context.Name
|
|
1414
|
+
will see null. (3) Type defaults to Text.
|
|
1015
1415
|
```
|
|
1016
1416
|
|
|
1017
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1417
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/preview.ts)_
|
|
1018
1418
|
|
|
1019
1419
|
## `sf agent preview end`
|
|
1020
1420
|
|
|
@@ -1086,7 +1486,7 @@ EXAMPLES
|
|
|
1086
1486
|
$ sf agent preview end --all --target-org <target_org>
|
|
1087
1487
|
```
|
|
1088
1488
|
|
|
1089
|
-
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1489
|
+
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/preview/end.ts)_
|
|
1090
1490
|
|
|
1091
1491
|
## `sf agent preview send`
|
|
1092
1492
|
|
|
@@ -1144,7 +1544,7 @@ EXAMPLES
|
|
|
1144
1544
|
$ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
|
|
1145
1545
|
```
|
|
1146
1546
|
|
|
1147
|
-
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1547
|
+
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/preview/send.ts)_
|
|
1148
1548
|
|
|
1149
1549
|
## `sf agent preview sessions`
|
|
1150
1550
|
|
|
@@ -1177,7 +1577,7 @@ EXAMPLES
|
|
|
1177
1577
|
$ sf agent preview sessions
|
|
1178
1578
|
```
|
|
1179
1579
|
|
|
1180
|
-
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1580
|
+
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/preview/sessions.ts)_
|
|
1181
1581
|
|
|
1182
1582
|
## `sf agent preview start`
|
|
1183
1583
|
|
|
@@ -1186,19 +1586,20 @@ Start a programmatic agent preview session.
|
|
|
1186
1586
|
```
|
|
1187
1587
|
USAGE
|
|
1188
1588
|
$ sf agent preview start -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
|
|
1189
|
-
[--authoring-bundle <value>] [--use-live-actions | --simulate-actions]
|
|
1589
|
+
[--authoring-bundle <value>] [--use-live-actions | --simulate-actions] [--context-variables <value>...]
|
|
1190
1590
|
|
|
1191
1591
|
FLAGS
|
|
1192
|
-
-n, --api-name=<value>
|
|
1193
|
-
-o, --target-org=<value>
|
|
1194
|
-
|
|
1195
|
-
--api-version=<value>
|
|
1196
|
-
--authoring-bundle=<value>
|
|
1197
|
-
|
|
1198
|
-
--
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1592
|
+
-n, --api-name=<value> API name of the activated published agent you want to preview.
|
|
1593
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1594
|
+
configuration variable is already set.
|
|
1595
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1596
|
+
--authoring-bundle=<value> API name of the authoring bundle metadata component that contains the agent's
|
|
1597
|
+
Agent Script file.
|
|
1598
|
+
--context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
|
|
1599
|
+
--simulate-actions Use AI to simulate action execution instead of calling real actions. Required with
|
|
1600
|
+
--authoring-bundle.
|
|
1601
|
+
--use-live-actions Execute real actions in the org (Apex classes, flows, etc.). Required with
|
|
1602
|
+
--authoring-bundle.
|
|
1202
1603
|
|
|
1203
1604
|
GLOBAL FLAGS
|
|
1204
1605
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -1240,9 +1641,30 @@ EXAMPLES
|
|
|
1240
1641
|
Start a preview session with an activated published agent (always uses live actions):
|
|
1241
1642
|
|
|
1242
1643
|
$ sf agent preview start --api-name My_Published_Agent
|
|
1644
|
+
|
|
1645
|
+
FLAG DESCRIPTIONS
|
|
1646
|
+
--context-variables=<value>... Session variables for the agent preview session, in the form Name=Value.
|
|
1647
|
+
|
|
1648
|
+
Sets variables on the agent preview session, mirroring what the in-org Agentforce Builder UI does when you override
|
|
1649
|
+
variables before sending a message. Specify this flag multiple times or use comma-separated values. Two namespaces
|
|
1650
|
+
are supported, distinguished by the name shape. Names pass through to the runtime verbatim — the CLI doesn't
|
|
1651
|
+
transform them.
|
|
1652
|
+
|
|
1653
|
+
Linked context variables use the "$Context." prefix. These map to externally-provided fields that the runtime
|
|
1654
|
+
resolves (declared in the bundle's globalConfiguration.contextVariables) and are read by live actions and
|
|
1655
|
+
topic-routing expressions via $Context.Name. Example: $Context.MyLinkedVar=some-value.
|
|
1656
|
+
|
|
1657
|
+
State variables use the bare developerName, no prefix. These seed mutable agent state declared in
|
|
1658
|
+
agentVersion.stateVariables. Example: MyStateVar=some-value.
|
|
1659
|
+
|
|
1660
|
+
Both namespaces can be mixed in one value. Example: --context-variables '$Context.MyLinkedVar=foo,MyStateVar=bar'.
|
|
1661
|
+
|
|
1662
|
+
Tips: (1) Quote the whole value in single quotes so $Context isn't shell-expanded. (2) Names are sent verbatim — a
|
|
1663
|
+
bare name is treated as a state variable, not a linked context variable, so live actions that bind via $Context.Name
|
|
1664
|
+
will see null. (3) Type defaults to Text.
|
|
1243
1665
|
```
|
|
1244
1666
|
|
|
1245
|
-
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1667
|
+
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/preview/start.ts)_
|
|
1246
1668
|
|
|
1247
1669
|
## `sf agent publish authoring-bundle`
|
|
1248
1670
|
|
|
@@ -1302,7 +1724,7 @@ EXAMPLES
|
|
|
1302
1724
|
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --concise
|
|
1303
1725
|
```
|
|
1304
1726
|
|
|
1305
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1727
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/publish/authoring-bundle.ts)_
|
|
1306
1728
|
|
|
1307
1729
|
## `sf agent test create`
|
|
1308
1730
|
|
|
@@ -1374,7 +1796,7 @@ FLAG DESCRIPTIONS
|
|
|
1374
1796
|
metadata. 'testing-center' uses AiEvaluationDefinition metadata.
|
|
1375
1797
|
```
|
|
1376
1798
|
|
|
1377
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1799
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/test/create.ts)_
|
|
1378
1800
|
|
|
1379
1801
|
## `sf agent test list`
|
|
1380
1802
|
|
|
@@ -1409,7 +1831,7 @@ EXAMPLES
|
|
|
1409
1831
|
$ sf agent test list --target-org my-org
|
|
1410
1832
|
```
|
|
1411
1833
|
|
|
1412
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1834
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/test/list.ts)_
|
|
1413
1835
|
|
|
1414
1836
|
## `sf agent test results`
|
|
1415
1837
|
|
|
@@ -1485,7 +1907,7 @@ FLAG DESCRIPTIONS
|
|
|
1485
1907
|
expression when using custom evaluations.
|
|
1486
1908
|
```
|
|
1487
1909
|
|
|
1488
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1910
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/test/results.ts)_
|
|
1489
1911
|
|
|
1490
1912
|
## `sf agent test resume`
|
|
1491
1913
|
|
|
@@ -1569,7 +1991,7 @@ FLAG DESCRIPTIONS
|
|
|
1569
1991
|
expression when using custom evaluations.
|
|
1570
1992
|
```
|
|
1571
1993
|
|
|
1572
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1994
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/test/resume.ts)_
|
|
1573
1995
|
|
|
1574
1996
|
## `sf agent test run`
|
|
1575
1997
|
|
|
@@ -1653,7 +2075,7 @@ FLAG DESCRIPTIONS
|
|
|
1653
2075
|
expression when using custom evaluations.
|
|
1654
2076
|
```
|
|
1655
2077
|
|
|
1656
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2078
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/test/run.ts)_
|
|
1657
2079
|
|
|
1658
2080
|
## `sf agent test run-eval`
|
|
1659
2081
|
|
|
@@ -1729,7 +2151,7 @@ EXAMPLES
|
|
|
1729
2151
|
$ echo '{"tests":[...]}' | sf agent test run-eval --spec --target-org my-org
|
|
1730
2152
|
```
|
|
1731
2153
|
|
|
1732
|
-
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2154
|
+
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/test/run-eval.ts)_
|
|
1733
2155
|
|
|
1734
2156
|
## `sf agent trace delete`
|
|
1735
2157
|
|
|
@@ -1793,7 +2215,7 @@ EXAMPLES
|
|
|
1793
2215
|
$ sf agent trace delete --no-prompt
|
|
1794
2216
|
```
|
|
1795
2217
|
|
|
1796
|
-
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2218
|
+
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/trace/delete.ts)_
|
|
1797
2219
|
|
|
1798
2220
|
## `sf agent trace list`
|
|
1799
2221
|
|
|
@@ -1863,7 +2285,7 @@ FLAG DESCRIPTIONS
|
|
|
1863
2285
|
(2026-04-20T14:00:00.000Z). The "Recorded At" values shown in the table output are valid inputs.
|
|
1864
2286
|
```
|
|
1865
2287
|
|
|
1866
|
-
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2288
|
+
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/trace/list.ts)_
|
|
1867
2289
|
|
|
1868
2290
|
## `sf agent trace read`
|
|
1869
2291
|
|
|
@@ -1951,7 +2373,7 @@ EXAMPLES
|
|
|
1951
2373
|
$ sf agent trace read --session-id <SESSION_ID> --json
|
|
1952
2374
|
```
|
|
1953
2375
|
|
|
1954
|
-
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2376
|
+
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/trace/read.ts)_
|
|
1955
2377
|
|
|
1956
2378
|
## `sf agent validate authoring-bundle`
|
|
1957
2379
|
|
|
@@ -1998,6 +2420,6 @@ EXAMPLES
|
|
|
1998
2420
|
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
|
|
1999
2421
|
```
|
|
2000
2422
|
|
|
2001
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2423
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.43.0/src/commands/agent/validate/authoring-bundle.ts)_
|
|
2002
2424
|
|
|
2003
2425
|
<!-- commandsstop -->
|