@salesforce/plugin-agent 1.43.0 → 1.44.4
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 +78 -46
- package/lib/adlUtils.d.ts +2 -0
- package/lib/adlUtils.js +31 -0
- package/lib/adlUtils.js.map +1 -0
- package/lib/commands/agent/adl/create.d.ts +6 -1
- package/lib/commands/agent/adl/create.js +83 -19
- package/lib/commands/agent/adl/create.js.map +1 -1
- package/lib/commands/agent/adl/delete.d.ts +0 -1
- package/lib/commands/agent/adl/delete.js +3 -2
- package/lib/commands/agent/adl/delete.js.map +1 -1
- package/lib/commands/agent/adl/file/add.d.ts +0 -1
- package/lib/commands/agent/adl/file/add.js +3 -2
- package/lib/commands/agent/adl/file/add.js.map +1 -1
- package/lib/commands/agent/adl/file/delete.d.ts +0 -1
- package/lib/commands/agent/adl/file/delete.js +4 -3
- package/lib/commands/agent/adl/file/delete.js.map +1 -1
- package/lib/commands/agent/adl/file/list.d.ts +5 -5
- package/lib/commands/agent/adl/file/list.js +31 -7
- package/lib/commands/agent/adl/file/list.js.map +1 -1
- package/lib/commands/agent/adl/get.d.ts +0 -1
- package/lib/commands/agent/adl/get.js +15 -3
- package/lib/commands/agent/adl/get.js.map +1 -1
- package/lib/commands/agent/adl/list.d.ts +0 -1
- package/lib/commands/agent/adl/list.js +3 -2
- package/lib/commands/agent/adl/list.js.map +1 -1
- package/lib/commands/agent/adl/status.d.ts +1 -1
- package/lib/commands/agent/adl/status.js +21 -4
- package/lib/commands/agent/adl/status.js.map +1 -1
- package/lib/commands/agent/adl/update.d.ts +1 -1
- package/lib/commands/agent/adl/update.js +18 -5
- package/lib/commands/agent/adl/update.js.map +1 -1
- package/lib/commands/agent/adl/upload.d.ts +0 -1
- package/lib/commands/agent/adl/upload.js +3 -2
- package/lib/commands/agent/adl/upload.js.map +1 -1
- package/messages/agent.adl.create.md +22 -0
- package/messages/agent.adl.file.add.md +2 -0
- package/messages/agent.adl.file.delete.md +4 -0
- package/messages/agent.adl.file.list.md +12 -0
- package/messages/agent.adl.status.md +5 -1
- package/messages/agent.adl.update.md +4 -0
- package/messages/agent.adl.upload.md +2 -0
- package/oclif.manifest.json +635 -573
- package/package.json +4 -4
- package/schemas/agent-adl-create.json +63 -3
- package/schemas/agent-adl-delete.json +5 -2
- package/schemas/agent-adl-file-add.json +7 -2
- package/schemas/agent-adl-file-delete.json +5 -2
- package/schemas/agent-adl-file-list.json +26 -3
- package/schemas/agent-adl-get.json +63 -3
- package/schemas/agent-adl-list.json +55 -3
- package/schemas/agent-adl-status.json +44 -4
- package/schemas/agent-adl-update.json +63 -3
- package/schemas/agent-adl-upload.json +5 -2
- package/schemas/agent-preview-end.json +8 -3
- package/schemas/agent-publish-authoring__bundle.json +8 -3
- package/schemas/agent-trace-delete.json +7 -2
- package/schemas/agent-trace-list.json +9 -2
- package/schemas/agent-trace-read.json +131 -21
package/README.md
CHANGED
|
@@ -148,7 +148,7 @@ EXAMPLES
|
|
|
148
148
|
$ sf agent activate --api-name Resort_Manager --version 2 --target-org my-org
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
_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.44.4/src/commands/agent/activate.ts)_
|
|
152
152
|
|
|
153
153
|
## `sf agent adl create`
|
|
154
154
|
|
|
@@ -158,13 +158,24 @@ Create an Agentforce Data Library.
|
|
|
158
158
|
USAGE
|
|
159
159
|
$ sf agent adl create -o <value> -n <value> --developer-name <value> --source-type sfdrive|knowledge|retriever
|
|
160
160
|
[--json] [--flags-dir <value>] [--api-version <value>] [--description <value>] [--index-mode basic|enhanced]
|
|
161
|
-
[--retriever-id <value>] [--primary-index-field1 <value>] [--primary-index-field2 <value>]
|
|
161
|
+
[--retriever-id <value>] [--primary-index-field1 <value>] [--primary-index-field2 <value>] [--content-fields
|
|
162
|
+
<value>] [--data-category-ids <value>] [--data-category-names <value>] [-w <value>]
|
|
162
163
|
|
|
163
164
|
FLAGS
|
|
164
165
|
-n, --name=<value> (required) Display name for the data library (max 80 characters).
|
|
165
166
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
166
167
|
configuration variable is already set.
|
|
168
|
+
-w, --wait=<value> Wait N minutes for indexing to complete (KNOWLEDGE libraries). SFDRIVE libraries
|
|
169
|
+
require upload before indexing; RETRIEVER libraries are ready immediately.
|
|
167
170
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
171
|
+
--content-fields=<value> Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable
|
|
172
|
+
after creation).
|
|
173
|
+
--data-category-ids=<value> Comma-separated list of data category selection IDs for KNOWLEDGE libraries.
|
|
174
|
+
Mutually exclusive with --data-category-names (provide one or the other, not
|
|
175
|
+
both).
|
|
176
|
+
--data-category-names=<value> Comma-separated list of data category names in qualified format (e.g.,
|
|
177
|
+
"Group_API_Name.Category"). Mutually exclusive with --data-category-ids (provide
|
|
178
|
+
one or the other, not both).
|
|
168
179
|
--description=<value> Description of the data library (max 255 characters).
|
|
169
180
|
--developer-name=<value> (required) API name for the data library (max 80 characters, alphanumeric and
|
|
170
181
|
underscores only, must start with a letter).
|
|
@@ -190,6 +201,9 @@ DESCRIPTION
|
|
|
190
201
|
Creates a new data library in the target org. The --source-type flag determines the type of library: SFDRIVE (file
|
|
191
202
|
upload), KNOWLEDGE (Salesforce Knowledge articles), or RETRIEVER (existing active Custom Retriever).
|
|
192
203
|
|
|
204
|
+
For SFDRIVE libraries, creation provisions the full Data Cloud pipeline (DLO → DMO → SearchIndex → Retriever). Upload
|
|
205
|
+
files with `sf agent adl upload` after creation.
|
|
206
|
+
|
|
193
207
|
EXAMPLES
|
|
194
208
|
Create an SFDRIVE library:
|
|
195
209
|
|
|
@@ -206,7 +220,7 @@ EXAMPLES
|
|
|
206
220
|
--source-type retriever --retriever-id 0ppXX0000000001
|
|
207
221
|
```
|
|
208
222
|
|
|
209
|
-
_See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
223
|
+
_See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/create.ts)_
|
|
210
224
|
|
|
211
225
|
## `sf agent adl delete`
|
|
212
226
|
|
|
@@ -237,7 +251,7 @@ EXAMPLES
|
|
|
237
251
|
$ sf agent adl delete --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
238
252
|
```
|
|
239
253
|
|
|
240
|
-
_See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
254
|
+
_See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/delete.ts)_
|
|
241
255
|
|
|
242
256
|
## `sf agent adl file add`
|
|
243
257
|
|
|
@@ -264,6 +278,9 @@ DESCRIPTION
|
|
|
264
278
|
Adds one or more files to an existing SFDRIVE data library and triggers SearchIndex re-hydration. This is the day-2
|
|
265
279
|
operation for adding files to an already-provisioned library.
|
|
266
280
|
|
|
281
|
+
Adds files to an existing READY library. Unlike `sf agent adl upload`, this does NOT create new downstream Data Cloud
|
|
282
|
+
assets — it appends files to the existing SearchIndex and triggers re-indexing.
|
|
283
|
+
|
|
267
284
|
Constraints: at least 1 file required, no duplicate file names in a batch, maximum 1000 files per library.
|
|
268
285
|
|
|
269
286
|
EXAMPLES
|
|
@@ -276,7 +293,7 @@ EXAMPLES
|
|
|
276
293
|
$ sf agent adl file add -i 1JDSG000007IbWX4A0 --path ./docs/guide.pdf --path ./docs/faq.txt --target-org myOrg
|
|
277
294
|
```
|
|
278
295
|
|
|
279
|
-
_See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
296
|
+
_See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/file/add.ts)_
|
|
280
297
|
|
|
281
298
|
## `sf agent adl file delete`
|
|
282
299
|
|
|
@@ -309,7 +326,7 @@ EXAMPLES
|
|
|
309
326
|
$ sf agent adl file delete --library-id 1JDSG000007IbWX4A0 --file-id a1B2C3D4E5F6G7H8I9 --target-org myOrg
|
|
310
327
|
```
|
|
311
328
|
|
|
312
|
-
_See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
329
|
+
_See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/file/delete.ts)_
|
|
313
330
|
|
|
314
331
|
## `sf agent adl file list`
|
|
315
332
|
|
|
@@ -317,13 +334,18 @@ List files in an Agentforce Data Library.
|
|
|
317
334
|
|
|
318
335
|
```
|
|
319
336
|
USAGE
|
|
320
|
-
$ sf agent adl file list -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
337
|
+
$ sf agent adl file list -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--page-size
|
|
338
|
+
<value>] [--offset <value>] [--status uploaded|indexing|indexed|index_failed|deleting|delete_failed]
|
|
321
339
|
|
|
322
340
|
FLAGS
|
|
323
341
|
-i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
|
|
324
342
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
325
343
|
configuration variable is already set.
|
|
326
344
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
345
|
+
--offset=<value> Number of files to skip before returning results (for pagination).
|
|
346
|
+
--page-size=<value> [default: 50] Number of files to return per page (1-200, default 50).
|
|
347
|
+
--status=<option> Filter files by indexing status.
|
|
348
|
+
<options: uploaded|indexing|indexed|index_failed|deleting|delete_failed>
|
|
327
349
|
|
|
328
350
|
GLOBAL FLAGS
|
|
329
351
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -344,7 +366,7 @@ EXAMPLES
|
|
|
344
366
|
$ sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json
|
|
345
367
|
```
|
|
346
368
|
|
|
347
|
-
_See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
369
|
+
_See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/file/list.ts)_
|
|
348
370
|
|
|
349
371
|
## `sf agent adl get`
|
|
350
372
|
|
|
@@ -375,7 +397,7 @@ EXAMPLES
|
|
|
375
397
|
$ sf agent adl get --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
376
398
|
```
|
|
377
399
|
|
|
378
|
-
_See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
400
|
+
_See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/get.ts)_
|
|
379
401
|
|
|
380
402
|
## `sf agent adl list`
|
|
381
403
|
|
|
@@ -412,7 +434,7 @@ EXAMPLES
|
|
|
412
434
|
$ sf agent adl list --target-org myOrg --json
|
|
413
435
|
```
|
|
414
436
|
|
|
415
|
-
_See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
437
|
+
_See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/list.ts)_
|
|
416
438
|
|
|
417
439
|
## `sf agent adl status`
|
|
418
440
|
|
|
@@ -421,12 +443,15 @@ Get indexing status of an Agentforce Data Library.
|
|
|
421
443
|
```
|
|
422
444
|
USAGE
|
|
423
445
|
$ sf agent adl status -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
446
|
+
[--include-artifacts]
|
|
424
447
|
|
|
425
448
|
FLAGS
|
|
426
449
|
-i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
|
|
427
450
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
428
451
|
configuration variable is already set.
|
|
429
452
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
453
|
+
--include-artifacts Resolve DC asset artifacts (DataStream, DLO, DMO, SearchIndex, Retriever) with entity IDs
|
|
454
|
+
and names on each stage. Slower — requires additional queries.
|
|
430
455
|
|
|
431
456
|
GLOBAL FLAGS
|
|
432
457
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -435,8 +460,8 @@ GLOBAL FLAGS
|
|
|
435
460
|
DESCRIPTION
|
|
436
461
|
Get indexing status of an Agentforce Data Library.
|
|
437
462
|
|
|
438
|
-
Returns the current indexing status including stage details (DATA_LAKE_OBJECT,
|
|
439
|
-
errors.
|
|
463
|
+
Returns the current indexing status including stage details (DATA_STREAM, DATA_LAKE_OBJECT, DATA_MODEL_OBJECT,
|
|
464
|
+
SEARCH_INDEX, RETRIEVER) and any errors.
|
|
440
465
|
|
|
441
466
|
EXAMPLES
|
|
442
467
|
Get status of a data library:
|
|
@@ -444,7 +469,7 @@ EXAMPLES
|
|
|
444
469
|
$ sf agent adl status --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
445
470
|
```
|
|
446
471
|
|
|
447
|
-
_See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
472
|
+
_See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/status.ts)_
|
|
448
473
|
|
|
449
474
|
## `sf agent adl update`
|
|
450
475
|
|
|
@@ -453,7 +478,8 @@ Update an Agentforce Data Library.
|
|
|
453
478
|
```
|
|
454
479
|
USAGE
|
|
455
480
|
$ sf agent adl update -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [-n <value>]
|
|
456
|
-
[--description <value>] [--content-fields <value>] [--restrict-to-public-articles] [--
|
|
481
|
+
[--description <value>] [--content-fields <value>] [--restrict-to-public-articles] [--data-category-rule]
|
|
482
|
+
[--retriever-id <value>]
|
|
457
483
|
|
|
458
484
|
FLAGS
|
|
459
485
|
-i, --library-id=<value> (required) Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).
|
|
@@ -463,6 +489,8 @@ FLAGS
|
|
|
463
489
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
464
490
|
--content-fields=<value> Comma-separated list of content fields for KNOWLEDGE libraries (triggers
|
|
465
491
|
re-indexing).
|
|
492
|
+
--[no-]data-category-rule Enable or disable data category filtering for KNOWLEDGE libraries. Use
|
|
493
|
+
--no-data-category-rule to disable.
|
|
466
494
|
--description=<value> New description for the data library (max 255 characters).
|
|
467
495
|
--[no-]restrict-to-public-articles Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers
|
|
468
496
|
re-indexing).
|
|
@@ -496,7 +524,7 @@ EXAMPLES
|
|
|
496
524
|
$ sf agent adl update --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg
|
|
497
525
|
```
|
|
498
526
|
|
|
499
|
-
_See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
527
|
+
_See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/update.ts)_
|
|
500
528
|
|
|
501
529
|
## `sf agent adl upload`
|
|
502
530
|
|
|
@@ -526,6 +554,10 @@ DESCRIPTION
|
|
|
526
554
|
Performs the multi-step upload workflow: checks upload readiness, obtains a pre-signed S3 URL, uploads the file,
|
|
527
555
|
triggers indexing, and optionally polls until the library is ready (retrieverId is populated).
|
|
528
556
|
|
|
557
|
+
Upload triggers the full Data Cloud provisioning pipeline, creating all downstream assets (DLO, DMO, SearchIndex,
|
|
558
|
+
Retriever). Use `sf agent adl status` to monitor progress. For adding files to an already-provisioned library, use `sf
|
|
559
|
+
agent adl file add` instead.
|
|
560
|
+
|
|
529
561
|
This command only works with SFDRIVE libraries. KNOWLEDGE libraries index automatically after creation, and RETRIEVER
|
|
530
562
|
libraries require no file upload.
|
|
531
563
|
|
|
@@ -539,7 +571,7 @@ EXAMPLES
|
|
|
539
571
|
$ sf agent adl upload --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg
|
|
540
572
|
```
|
|
541
573
|
|
|
542
|
-
_See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
574
|
+
_See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/adl/upload.ts)_
|
|
543
575
|
|
|
544
576
|
## `sf agent create`
|
|
545
577
|
|
|
@@ -606,7 +638,7 @@ EXAMPLES
|
|
|
606
638
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
607
639
|
```
|
|
608
640
|
|
|
609
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
641
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/create.ts)_
|
|
610
642
|
|
|
611
643
|
## `sf agent deactivate`
|
|
612
644
|
|
|
@@ -647,7 +679,7 @@ EXAMPLES
|
|
|
647
679
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
648
680
|
```
|
|
649
681
|
|
|
650
|
-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
682
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/deactivate.ts)_
|
|
651
683
|
|
|
652
684
|
## `sf agent generate agent-spec`
|
|
653
685
|
|
|
@@ -754,7 +786,7 @@ EXAMPLES
|
|
|
754
786
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
755
787
|
```
|
|
756
788
|
|
|
757
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
789
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/agent-spec.ts)_
|
|
758
790
|
|
|
759
791
|
## `sf agent generate authoring-bundle`
|
|
760
792
|
|
|
@@ -831,7 +863,7 @@ EXAMPLES
|
|
|
831
863
|
other-package-dir/main/default --target-org my-dev-org
|
|
832
864
|
```
|
|
833
865
|
|
|
834
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
866
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/authoring-bundle.ts)_
|
|
835
867
|
|
|
836
868
|
## `sf agent generate template`
|
|
837
869
|
|
|
@@ -893,7 +925,7 @@ EXAMPLES
|
|
|
893
925
|
my-package --source-org my-scratch-org
|
|
894
926
|
```
|
|
895
927
|
|
|
896
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
928
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/template.ts)_
|
|
897
929
|
|
|
898
930
|
## `sf agent generate test-spec`
|
|
899
931
|
|
|
@@ -982,7 +1014,7 @@ FLAG DESCRIPTIONS
|
|
|
982
1014
|
metadata. 'testing-center' uses AiEvaluationDefinition metadata.
|
|
983
1015
|
```
|
|
984
1016
|
|
|
985
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1017
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/generate/test-spec.ts)_
|
|
986
1018
|
|
|
987
1019
|
## `sf agent mcp asset list`
|
|
988
1020
|
|
|
@@ -1018,7 +1050,7 @@ EXAMPLES
|
|
|
1018
1050
|
$ sf agent mcp asset list --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
|
|
1019
1051
|
```
|
|
1020
1052
|
|
|
1021
|
-
_See code: [src/commands/agent/mcp/asset/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1053
|
+
_See code: [src/commands/agent/mcp/asset/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/asset/list.ts)_
|
|
1022
1054
|
|
|
1023
1055
|
## `sf agent mcp asset replace`
|
|
1024
1056
|
|
|
@@ -1067,7 +1099,7 @@ EXAMPLES
|
|
|
1067
1099
|
cat assets.json | sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets - --target-org myOrg
|
|
1068
1100
|
```
|
|
1069
1101
|
|
|
1070
|
-
_See code: [src/commands/agent/mcp/asset/replace.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1102
|
+
_See code: [src/commands/agent/mcp/asset/replace.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/asset/replace.ts)_
|
|
1071
1103
|
|
|
1072
1104
|
## `sf agent mcp create`
|
|
1073
1105
|
|
|
@@ -1115,7 +1147,7 @@ EXAMPLES
|
|
|
1115
1147
|
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
1148
|
```
|
|
1117
1149
|
|
|
1118
|
-
_See code: [src/commands/agent/mcp/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1150
|
+
_See code: [src/commands/agent/mcp/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/create.ts)_
|
|
1119
1151
|
|
|
1120
1152
|
## `sf agent mcp delete`
|
|
1121
1153
|
|
|
@@ -1153,7 +1185,7 @@ EXAMPLES
|
|
|
1153
1185
|
$ sf agent mcp delete --mcp-server-id 0XSxx0000000001 --target-org myOrg --no-prompt
|
|
1154
1186
|
```
|
|
1155
1187
|
|
|
1156
|
-
_See code: [src/commands/agent/mcp/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1188
|
+
_See code: [src/commands/agent/mcp/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/delete.ts)_
|
|
1157
1189
|
|
|
1158
1190
|
## `sf agent mcp fetch`
|
|
1159
1191
|
|
|
@@ -1190,7 +1222,7 @@ EXAMPLES
|
|
|
1190
1222
|
$ sf agent mcp fetch --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
|
|
1191
1223
|
```
|
|
1192
1224
|
|
|
1193
|
-
_See code: [src/commands/agent/mcp/fetch.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1225
|
+
_See code: [src/commands/agent/mcp/fetch.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/fetch.ts)_
|
|
1194
1226
|
|
|
1195
1227
|
## `sf agent mcp get`
|
|
1196
1228
|
|
|
@@ -1226,7 +1258,7 @@ EXAMPLES
|
|
|
1226
1258
|
$ sf agent mcp get --target-org myOrg --mcp-server-id 0Mx000000000001 --json
|
|
1227
1259
|
```
|
|
1228
1260
|
|
|
1229
|
-
_See code: [src/commands/agent/mcp/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1261
|
+
_See code: [src/commands/agent/mcp/get.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/get.ts)_
|
|
1230
1262
|
|
|
1231
1263
|
## `sf agent mcp list`
|
|
1232
1264
|
|
|
@@ -1268,7 +1300,7 @@ EXAMPLES
|
|
|
1268
1300
|
$ sf agent mcp list --target-org myOrg --type EXTERNAL --status ACTIVE --json
|
|
1269
1301
|
```
|
|
1270
1302
|
|
|
1271
|
-
_See code: [src/commands/agent/mcp/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1303
|
+
_See code: [src/commands/agent/mcp/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/list.ts)_
|
|
1272
1304
|
|
|
1273
1305
|
## `sf agent mcp update`
|
|
1274
1306
|
|
|
@@ -1319,7 +1351,7 @@ EXAMPLES
|
|
|
1319
1351
|
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
1352
|
```
|
|
1321
1353
|
|
|
1322
|
-
_See code: [src/commands/agent/mcp/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1354
|
+
_See code: [src/commands/agent/mcp/update.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/mcp/update.ts)_
|
|
1323
1355
|
|
|
1324
1356
|
## `sf agent preview`
|
|
1325
1357
|
|
|
@@ -1414,7 +1446,7 @@ FLAG DESCRIPTIONS
|
|
|
1414
1446
|
will see null. (3) Type defaults to Text.
|
|
1415
1447
|
```
|
|
1416
1448
|
|
|
1417
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1449
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview.ts)_
|
|
1418
1450
|
|
|
1419
1451
|
## `sf agent preview end`
|
|
1420
1452
|
|
|
@@ -1486,7 +1518,7 @@ EXAMPLES
|
|
|
1486
1518
|
$ sf agent preview end --all --target-org <target_org>
|
|
1487
1519
|
```
|
|
1488
1520
|
|
|
1489
|
-
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1521
|
+
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/end.ts)_
|
|
1490
1522
|
|
|
1491
1523
|
## `sf agent preview send`
|
|
1492
1524
|
|
|
@@ -1544,7 +1576,7 @@ EXAMPLES
|
|
|
1544
1576
|
$ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
|
|
1545
1577
|
```
|
|
1546
1578
|
|
|
1547
|
-
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1579
|
+
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/send.ts)_
|
|
1548
1580
|
|
|
1549
1581
|
## `sf agent preview sessions`
|
|
1550
1582
|
|
|
@@ -1577,7 +1609,7 @@ EXAMPLES
|
|
|
1577
1609
|
$ sf agent preview sessions
|
|
1578
1610
|
```
|
|
1579
1611
|
|
|
1580
|
-
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1612
|
+
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/sessions.ts)_
|
|
1581
1613
|
|
|
1582
1614
|
## `sf agent preview start`
|
|
1583
1615
|
|
|
@@ -1664,7 +1696,7 @@ FLAG DESCRIPTIONS
|
|
|
1664
1696
|
will see null. (3) Type defaults to Text.
|
|
1665
1697
|
```
|
|
1666
1698
|
|
|
1667
|
-
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1699
|
+
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/preview/start.ts)_
|
|
1668
1700
|
|
|
1669
1701
|
## `sf agent publish authoring-bundle`
|
|
1670
1702
|
|
|
@@ -1724,7 +1756,7 @@ EXAMPLES
|
|
|
1724
1756
|
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --concise
|
|
1725
1757
|
```
|
|
1726
1758
|
|
|
1727
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1759
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/publish/authoring-bundle.ts)_
|
|
1728
1760
|
|
|
1729
1761
|
## `sf agent test create`
|
|
1730
1762
|
|
|
@@ -1796,7 +1828,7 @@ FLAG DESCRIPTIONS
|
|
|
1796
1828
|
metadata. 'testing-center' uses AiEvaluationDefinition metadata.
|
|
1797
1829
|
```
|
|
1798
1830
|
|
|
1799
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1831
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/create.ts)_
|
|
1800
1832
|
|
|
1801
1833
|
## `sf agent test list`
|
|
1802
1834
|
|
|
@@ -1831,7 +1863,7 @@ EXAMPLES
|
|
|
1831
1863
|
$ sf agent test list --target-org my-org
|
|
1832
1864
|
```
|
|
1833
1865
|
|
|
1834
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1866
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/list.ts)_
|
|
1835
1867
|
|
|
1836
1868
|
## `sf agent test results`
|
|
1837
1869
|
|
|
@@ -1907,7 +1939,7 @@ FLAG DESCRIPTIONS
|
|
|
1907
1939
|
expression when using custom evaluations.
|
|
1908
1940
|
```
|
|
1909
1941
|
|
|
1910
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1942
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/results.ts)_
|
|
1911
1943
|
|
|
1912
1944
|
## `sf agent test resume`
|
|
1913
1945
|
|
|
@@ -1991,7 +2023,7 @@ FLAG DESCRIPTIONS
|
|
|
1991
2023
|
expression when using custom evaluations.
|
|
1992
2024
|
```
|
|
1993
2025
|
|
|
1994
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2026
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/resume.ts)_
|
|
1995
2027
|
|
|
1996
2028
|
## `sf agent test run`
|
|
1997
2029
|
|
|
@@ -2075,7 +2107,7 @@ FLAG DESCRIPTIONS
|
|
|
2075
2107
|
expression when using custom evaluations.
|
|
2076
2108
|
```
|
|
2077
2109
|
|
|
2078
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2110
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/run.ts)_
|
|
2079
2111
|
|
|
2080
2112
|
## `sf agent test run-eval`
|
|
2081
2113
|
|
|
@@ -2151,7 +2183,7 @@ EXAMPLES
|
|
|
2151
2183
|
$ echo '{"tests":[...]}' | sf agent test run-eval --spec --target-org my-org
|
|
2152
2184
|
```
|
|
2153
2185
|
|
|
2154
|
-
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2186
|
+
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/test/run-eval.ts)_
|
|
2155
2187
|
|
|
2156
2188
|
## `sf agent trace delete`
|
|
2157
2189
|
|
|
@@ -2215,7 +2247,7 @@ EXAMPLES
|
|
|
2215
2247
|
$ sf agent trace delete --no-prompt
|
|
2216
2248
|
```
|
|
2217
2249
|
|
|
2218
|
-
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2250
|
+
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/trace/delete.ts)_
|
|
2219
2251
|
|
|
2220
2252
|
## `sf agent trace list`
|
|
2221
2253
|
|
|
@@ -2285,7 +2317,7 @@ FLAG DESCRIPTIONS
|
|
|
2285
2317
|
(2026-04-20T14:00:00.000Z). The "Recorded At" values shown in the table output are valid inputs.
|
|
2286
2318
|
```
|
|
2287
2319
|
|
|
2288
|
-
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2320
|
+
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/trace/list.ts)_
|
|
2289
2321
|
|
|
2290
2322
|
## `sf agent trace read`
|
|
2291
2323
|
|
|
@@ -2373,7 +2405,7 @@ EXAMPLES
|
|
|
2373
2405
|
$ sf agent trace read --session-id <SESSION_ID> --json
|
|
2374
2406
|
```
|
|
2375
2407
|
|
|
2376
|
-
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2408
|
+
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/trace/read.ts)_
|
|
2377
2409
|
|
|
2378
2410
|
## `sf agent validate authoring-bundle`
|
|
2379
2411
|
|
|
@@ -2420,6 +2452,6 @@ EXAMPLES
|
|
|
2420
2452
|
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
|
|
2421
2453
|
```
|
|
2422
2454
|
|
|
2423
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
2455
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.44.4/src/commands/agent/validate/authoring-bundle.ts)_
|
|
2424
2456
|
|
|
2425
2457
|
<!-- commandsstop -->
|
package/lib/adlUtils.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function isApiErrorArray(value) {
|
|
2
|
+
return (Array.isArray(value) &&
|
|
3
|
+
value.length > 0 &&
|
|
4
|
+
typeof value[0].errorCode === 'string' &&
|
|
5
|
+
typeof value[0].message === 'string');
|
|
6
|
+
}
|
|
7
|
+
export function extractApiError(error) {
|
|
8
|
+
const errWithData = error;
|
|
9
|
+
const causeWithData = error.cause;
|
|
10
|
+
const body = errWithData.data ?? causeWithData?.data;
|
|
11
|
+
if (isApiErrorArray(body)) {
|
|
12
|
+
return `${body[0].errorCode}: ${body[0].message}`;
|
|
13
|
+
}
|
|
14
|
+
if (typeof body === 'string') {
|
|
15
|
+
try {
|
|
16
|
+
const parsed = JSON.parse(body);
|
|
17
|
+
if (isApiErrorArray(parsed)) {
|
|
18
|
+
return `${parsed[0].errorCode}: ${parsed[0].message}`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
/* not JSON */
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const msg = error.message;
|
|
26
|
+
const stackIdx = msg.indexOf('\n\tat ');
|
|
27
|
+
if (stackIdx > 0)
|
|
28
|
+
return msg.slice(0, stackIdx).trim();
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=adlUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adlUtils.js","sourceRoot":"","sources":["../src/adlUtils.ts"],"names":[],"mappings":"AAwBA,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACpB,KAAK,CAAC,MAAM,GAAG,CAAC;QAChB,OAAQ,KAAK,CAAC,CAAC,CAAmB,CAAC,SAAS,KAAK,QAAQ;QACzD,OAAQ,KAAK,CAAC,CAAC,CAAmB,CAAC,OAAO,KAAK,QAAQ,CACxD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,MAAM,WAAW,GAAG,KAAqC,CAAC;IAC1D,MAAM,aAAa,GAAG,KAAK,CAAC,KAAiD,CAAC;IAC9E,MAAM,IAAI,GAAY,WAAW,CAAC,IAAI,IAAI,aAAa,EAAE,IAAI,CAAC;IAE9D,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACpD,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,CAAC;YACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzC,IAAI,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC5B,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YACxD,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,cAAc;QAChB,CAAC;IACH,CAAC;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC;IAC1B,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAEvD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -6,7 +6,6 @@ export default class AgentAdlCreate extends SfCommand<AgentAdlCreateResult> {
|
|
|
6
6
|
static readonly description: string;
|
|
7
7
|
static readonly examples: string[];
|
|
8
8
|
static readonly enableJsonFlag = true;
|
|
9
|
-
static readonly state = "preview";
|
|
10
9
|
static readonly flags: {
|
|
11
10
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
11
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -18,6 +17,12 @@ export default class AgentAdlCreate extends SfCommand<AgentAdlCreateResult> {
|
|
|
18
17
|
'retriever-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
18
|
'primary-index-field1': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
19
|
'primary-index-field2': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'content-fields': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'data-category-ids': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
'data-category-names': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
wait: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/kit").Duration, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
24
|
};
|
|
22
25
|
run(): Promise<AgentAdlCreateResult>;
|
|
26
|
+
private validateFlags;
|
|
27
|
+
private buildGroundingSource;
|
|
23
28
|
}
|