@salesforce/plugin-agent 2.3.0 → 2.4.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 +111 -41
- package/lib/commands/agent/mcp/asset/afscript.d.ts +44 -0
- package/lib/commands/agent/mcp/asset/afscript.js +280 -0
- package/lib/commands/agent/mcp/asset/afscript.js.map +1 -0
- package/messages/agent.mcp.asset.afscript.md +107 -0
- package/oclif.manifest.json +990 -855
- package/package.json +4 -4
- package/schemas/agent-mcp-asset-afscript.json +88 -0
package/README.md
CHANGED
|
@@ -76,6 +76,7 @@ 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 afscript`](#sf-agent-mcp-asset-afscript)
|
|
79
80
|
- [`sf agent mcp asset list`](#sf-agent-mcp-asset-list)
|
|
80
81
|
- [`sf agent mcp asset replace`](#sf-agent-mcp-asset-replace)
|
|
81
82
|
- [`sf agent mcp create`](#sf-agent-mcp-create)
|
|
@@ -148,7 +149,7 @@ EXAMPLES
|
|
|
148
149
|
$ sf agent activate --api-name Resort_Manager --version 2 --target-org my-org
|
|
149
150
|
```
|
|
150
151
|
|
|
151
|
-
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
152
|
+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/activate.ts)_
|
|
152
153
|
|
|
153
154
|
## `sf agent adl create`
|
|
154
155
|
|
|
@@ -220,7 +221,7 @@ EXAMPLES
|
|
|
220
221
|
--source-type retriever --retriever-id 0ppXX0000000001
|
|
221
222
|
```
|
|
222
223
|
|
|
223
|
-
_See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
224
|
+
_See code: [src/commands/agent/adl/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/create.ts)_
|
|
224
225
|
|
|
225
226
|
## `sf agent adl delete`
|
|
226
227
|
|
|
@@ -251,7 +252,7 @@ EXAMPLES
|
|
|
251
252
|
$ sf agent adl delete --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
252
253
|
```
|
|
253
254
|
|
|
254
|
-
_See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
255
|
+
_See code: [src/commands/agent/adl/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/delete.ts)_
|
|
255
256
|
|
|
256
257
|
## `sf agent adl file add`
|
|
257
258
|
|
|
@@ -293,7 +294,7 @@ EXAMPLES
|
|
|
293
294
|
$ sf agent adl file add -i 1JDSG000007IbWX4A0 --path ./docs/guide.pdf --path ./docs/faq.txt --target-org myOrg
|
|
294
295
|
```
|
|
295
296
|
|
|
296
|
-
_See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
297
|
+
_See code: [src/commands/agent/adl/file/add.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/file/add.ts)_
|
|
297
298
|
|
|
298
299
|
## `sf agent adl file delete`
|
|
299
300
|
|
|
@@ -326,7 +327,7 @@ EXAMPLES
|
|
|
326
327
|
$ sf agent adl file delete --library-id 1JDSG000007IbWX4A0 --file-id a1B2C3D4E5F6G7H8I9 --target-org myOrg
|
|
327
328
|
```
|
|
328
329
|
|
|
329
|
-
_See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
330
|
+
_See code: [src/commands/agent/adl/file/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/file/delete.ts)_
|
|
330
331
|
|
|
331
332
|
## `sf agent adl file list`
|
|
332
333
|
|
|
@@ -366,7 +367,7 @@ EXAMPLES
|
|
|
366
367
|
$ sf agent adl file list --library-id 1JDSG000007IbWX4A0 --target-org myOrg --json
|
|
367
368
|
```
|
|
368
369
|
|
|
369
|
-
_See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
370
|
+
_See code: [src/commands/agent/adl/file/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/file/list.ts)_
|
|
370
371
|
|
|
371
372
|
## `sf agent adl get`
|
|
372
373
|
|
|
@@ -397,7 +398,7 @@ EXAMPLES
|
|
|
397
398
|
$ sf agent adl get --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
398
399
|
```
|
|
399
400
|
|
|
400
|
-
_See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
401
|
+
_See code: [src/commands/agent/adl/get.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/get.ts)_
|
|
401
402
|
|
|
402
403
|
## `sf agent adl list`
|
|
403
404
|
|
|
@@ -434,7 +435,7 @@ EXAMPLES
|
|
|
434
435
|
$ sf agent adl list --target-org myOrg --json
|
|
435
436
|
```
|
|
436
437
|
|
|
437
|
-
_See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
438
|
+
_See code: [src/commands/agent/adl/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/list.ts)_
|
|
438
439
|
|
|
439
440
|
## `sf agent adl status`
|
|
440
441
|
|
|
@@ -469,7 +470,7 @@ EXAMPLES
|
|
|
469
470
|
$ sf agent adl status --library-id 1JDSG000007IbWX4A0 --target-org myOrg
|
|
470
471
|
```
|
|
471
472
|
|
|
472
|
-
_See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
473
|
+
_See code: [src/commands/agent/adl/status.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/status.ts)_
|
|
473
474
|
|
|
474
475
|
## `sf agent adl update`
|
|
475
476
|
|
|
@@ -524,7 +525,7 @@ EXAMPLES
|
|
|
524
525
|
$ sf agent adl update --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg
|
|
525
526
|
```
|
|
526
527
|
|
|
527
|
-
_See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
528
|
+
_See code: [src/commands/agent/adl/update.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/update.ts)_
|
|
528
529
|
|
|
529
530
|
## `sf agent adl upload`
|
|
530
531
|
|
|
@@ -571,7 +572,7 @@ EXAMPLES
|
|
|
571
572
|
$ sf agent adl upload --library-id 1JDSG000007IbWX4A0 --file ./docs/guide.pdf --target-org myOrg
|
|
572
573
|
```
|
|
573
574
|
|
|
574
|
-
_See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
575
|
+
_See code: [src/commands/agent/adl/upload.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/adl/upload.ts)_
|
|
575
576
|
|
|
576
577
|
## `sf agent create`
|
|
577
578
|
|
|
@@ -638,7 +639,7 @@ EXAMPLES
|
|
|
638
639
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
639
640
|
```
|
|
640
641
|
|
|
641
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
642
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/create.ts)_
|
|
642
643
|
|
|
643
644
|
## `sf agent deactivate`
|
|
644
645
|
|
|
@@ -679,7 +680,7 @@ EXAMPLES
|
|
|
679
680
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
680
681
|
```
|
|
681
682
|
|
|
682
|
-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
683
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/deactivate.ts)_
|
|
683
684
|
|
|
684
685
|
## `sf agent generate agent-spec`
|
|
685
686
|
|
|
@@ -786,7 +787,7 @@ EXAMPLES
|
|
|
786
787
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
787
788
|
```
|
|
788
789
|
|
|
789
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
790
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/generate/agent-spec.ts)_
|
|
790
791
|
|
|
791
792
|
## `sf agent generate authoring-bundle`
|
|
792
793
|
|
|
@@ -863,7 +864,7 @@ EXAMPLES
|
|
|
863
864
|
other-package-dir/main/default --target-org my-dev-org
|
|
864
865
|
```
|
|
865
866
|
|
|
866
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
867
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/generate/authoring-bundle.ts)_
|
|
867
868
|
|
|
868
869
|
## `sf agent generate template`
|
|
869
870
|
|
|
@@ -925,7 +926,7 @@ EXAMPLES
|
|
|
925
926
|
my-package --source-org my-scratch-org
|
|
926
927
|
```
|
|
927
928
|
|
|
928
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
929
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/generate/template.ts)_
|
|
929
930
|
|
|
930
931
|
## `sf agent generate test-spec`
|
|
931
932
|
|
|
@@ -1014,7 +1015,76 @@ FLAG DESCRIPTIONS
|
|
|
1014
1015
|
metadata. 'testing-center' uses AiEvaluationDefinition metadata.
|
|
1015
1016
|
```
|
|
1016
1017
|
|
|
1017
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1018
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/generate/test-spec.ts)_
|
|
1019
|
+
|
|
1020
|
+
## `sf agent mcp asset afscript`
|
|
1021
|
+
|
|
1022
|
+
Print or add the Agent Script action blocks and reasoning actions for MCP tools of a server.
|
|
1023
|
+
|
|
1024
|
+
```
|
|
1025
|
+
USAGE
|
|
1026
|
+
$ sf agent mcp asset afscript -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [-t <value>...]
|
|
1027
|
+
[--asset-id <value>...] [--authoring-bundle <value> --subagent <value>...]
|
|
1028
|
+
|
|
1029
|
+
FLAGS
|
|
1030
|
+
-i, --mcp-server-id=<value> (required) The ID of the MCP server that owns the tools.
|
|
1031
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1032
|
+
configuration variable is already set.
|
|
1033
|
+
-t, --tool=<value>... Name of a tool on the server, with or without the `McpTool__` prefix. Repeat the flag
|
|
1034
|
+
for more tools.
|
|
1035
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1036
|
+
--asset-id=<value>... Asset ID (1XO...) of a tool on the server. Repeat the flag for more tools.
|
|
1037
|
+
--authoring-bundle=<value> API name of a local authoring bundle to update instead of printing the blocks.
|
|
1038
|
+
Requires --subagent.
|
|
1039
|
+
--subagent=<value>... Name of a subagent (or the start agent) in the authoring bundle to add the tools to.
|
|
1040
|
+
Repeat the flag for more subagents. Requires --authoring-bundle.
|
|
1041
|
+
|
|
1042
|
+
GLOBAL FLAGS
|
|
1043
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
1044
|
+
--json Format output as json.
|
|
1045
|
+
|
|
1046
|
+
DESCRIPTION
|
|
1047
|
+
Print or add the Agent Script action blocks and reasoning actions for MCP tools of a server.
|
|
1048
|
+
|
|
1049
|
+
Prints the same Agent Script blocks that Agentforce Builder writes when you add the tool to an agent: one action block
|
|
1050
|
+
for the subagent actions section and one reasoning action for the reasoning actions section, for each tool. The blocks
|
|
1051
|
+
are indented for a subagent: action blocks at 8 spaces (under `actions:`) and reasoning actions at 12 spaces (under
|
|
1052
|
+
`reasoning:` > `actions:`). Paste them as printed. With --json, the blocks are returned without indentation.
|
|
1053
|
+
|
|
1054
|
+
Select tools by name with --tool (with or without the `McpTool__` prefix) or by asset ID with --asset-id. You must use
|
|
1055
|
+
at least one of the two flags. Each tool must be allowlisted (active) on the MCP server; run "agent mcp asset replace"
|
|
1056
|
+
to allowlist a tool. The output follows the order of the flags: all --tool values first, then all --asset-id values.
|
|
1057
|
+
Duplicates are sent once.
|
|
1058
|
+
|
|
1059
|
+
To add the blocks to a local authoring bundle instead of printing them, use --authoring-bundle with one or more
|
|
1060
|
+
--subagent flags. The command adds each action block under the subagent's `actions:` and each reasoning action under
|
|
1061
|
+
its `reasoning:` > `actions:`, and creates a missing section. It skips an action that the subagent already has, so you
|
|
1062
|
+
can run it again safely. It does not compile the bundle; run "agent validate authoring-bundle" after it. Run the
|
|
1063
|
+
command from a Salesforce DX project.
|
|
1064
|
+
|
|
1065
|
+
The API call also assigns the MCP runtime permissions that Agentforce Builder assigns, so it is not read-only.
|
|
1066
|
+
|
|
1067
|
+
EXAMPLES
|
|
1068
|
+
Print the Agent Script for one tool of an MCP server:
|
|
1069
|
+
|
|
1070
|
+
$ sf agent mcp asset afscript --target-org myOrg --mcp-server-id 0XSxx0000000001 --tool hello_world
|
|
1071
|
+
|
|
1072
|
+
Print the Agent Script for two tools:
|
|
1073
|
+
|
|
1074
|
+
$ sf agent mcp asset afscript --target-org myOrg --mcp-server-id 0XSxx0000000001 --tool hello_world --tool add
|
|
1075
|
+
|
|
1076
|
+
Select a tool by its asset ID and output as JSON:
|
|
1077
|
+
|
|
1078
|
+
$ sf agent mcp asset afscript --target-org myOrg --mcp-server-id 0XSxx0000000001 --asset-id 1XOxx0000000001 \
|
|
1079
|
+
--json
|
|
1080
|
+
|
|
1081
|
+
Add two tools to the "order_status" and "returns" subagents of the "My_Agent" authoring bundle:
|
|
1082
|
+
|
|
1083
|
+
$ sf agent mcp asset afscript --target-org myOrg --mcp-server-id 0XSxx0000000001 --tool hello_world --tool add \
|
|
1084
|
+
--authoring-bundle My_Agent --subagent order_status --subagent returns
|
|
1085
|
+
```
|
|
1086
|
+
|
|
1087
|
+
_See code: [src/commands/agent/mcp/asset/afscript.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/asset/afscript.ts)_
|
|
1018
1088
|
|
|
1019
1089
|
## `sf agent mcp asset list`
|
|
1020
1090
|
|
|
@@ -1050,7 +1120,7 @@ EXAMPLES
|
|
|
1050
1120
|
$ sf agent mcp asset list --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
|
|
1051
1121
|
```
|
|
1052
1122
|
|
|
1053
|
-
_See code: [src/commands/agent/mcp/asset/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1123
|
+
_See code: [src/commands/agent/mcp/asset/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/asset/list.ts)_
|
|
1054
1124
|
|
|
1055
1125
|
## `sf agent mcp asset replace`
|
|
1056
1126
|
|
|
@@ -1099,7 +1169,7 @@ EXAMPLES
|
|
|
1099
1169
|
cat assets.json | sf agent mcp asset replace --mcp-server-id 0XSxx0000000001 --assets - --target-org myOrg
|
|
1100
1170
|
```
|
|
1101
1171
|
|
|
1102
|
-
_See code: [src/commands/agent/mcp/asset/replace.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1172
|
+
_See code: [src/commands/agent/mcp/asset/replace.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/asset/replace.ts)_
|
|
1103
1173
|
|
|
1104
1174
|
## `sf agent mcp create`
|
|
1105
1175
|
|
|
@@ -1147,7 +1217,7 @@ EXAMPLES
|
|
|
1147
1217
|
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
|
|
1148
1218
|
```
|
|
1149
1219
|
|
|
1150
|
-
_See code: [src/commands/agent/mcp/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1220
|
+
_See code: [src/commands/agent/mcp/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/create.ts)_
|
|
1151
1221
|
|
|
1152
1222
|
## `sf agent mcp delete`
|
|
1153
1223
|
|
|
@@ -1185,7 +1255,7 @@ EXAMPLES
|
|
|
1185
1255
|
$ sf agent mcp delete --mcp-server-id 0XSxx0000000001 --target-org myOrg --no-prompt
|
|
1186
1256
|
```
|
|
1187
1257
|
|
|
1188
|
-
_See code: [src/commands/agent/mcp/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1258
|
+
_See code: [src/commands/agent/mcp/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/delete.ts)_
|
|
1189
1259
|
|
|
1190
1260
|
## `sf agent mcp fetch`
|
|
1191
1261
|
|
|
@@ -1222,7 +1292,7 @@ EXAMPLES
|
|
|
1222
1292
|
$ sf agent mcp fetch --target-org myOrg --mcp-server-id 0XSxx0000000001 --json
|
|
1223
1293
|
```
|
|
1224
1294
|
|
|
1225
|
-
_See code: [src/commands/agent/mcp/fetch.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1295
|
+
_See code: [src/commands/agent/mcp/fetch.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/fetch.ts)_
|
|
1226
1296
|
|
|
1227
1297
|
## `sf agent mcp get`
|
|
1228
1298
|
|
|
@@ -1258,7 +1328,7 @@ EXAMPLES
|
|
|
1258
1328
|
$ sf agent mcp get --target-org myOrg --mcp-server-id 0Mx000000000001 --json
|
|
1259
1329
|
```
|
|
1260
1330
|
|
|
1261
|
-
_See code: [src/commands/agent/mcp/get.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1331
|
+
_See code: [src/commands/agent/mcp/get.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/get.ts)_
|
|
1262
1332
|
|
|
1263
1333
|
## `sf agent mcp list`
|
|
1264
1334
|
|
|
@@ -1300,7 +1370,7 @@ EXAMPLES
|
|
|
1300
1370
|
$ sf agent mcp list --target-org myOrg --type EXTERNAL --status ACTIVE --json
|
|
1301
1371
|
```
|
|
1302
1372
|
|
|
1303
|
-
_See code: [src/commands/agent/mcp/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1373
|
+
_See code: [src/commands/agent/mcp/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/list.ts)_
|
|
1304
1374
|
|
|
1305
1375
|
## `sf agent mcp update`
|
|
1306
1376
|
|
|
@@ -1351,7 +1421,7 @@ EXAMPLES
|
|
|
1351
1421
|
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
|
|
1352
1422
|
```
|
|
1353
1423
|
|
|
1354
|
-
_See code: [src/commands/agent/mcp/update.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1424
|
+
_See code: [src/commands/agent/mcp/update.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/mcp/update.ts)_
|
|
1355
1425
|
|
|
1356
1426
|
## `sf agent preview`
|
|
1357
1427
|
|
|
@@ -1467,7 +1537,7 @@ FLAG DESCRIPTIONS
|
|
|
1467
1537
|
and a bare name for state variables.
|
|
1468
1538
|
```
|
|
1469
1539
|
|
|
1470
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1540
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/preview.ts)_
|
|
1471
1541
|
|
|
1472
1542
|
## `sf agent preview end`
|
|
1473
1543
|
|
|
@@ -1539,7 +1609,7 @@ EXAMPLES
|
|
|
1539
1609
|
$ sf agent preview end --all --target-org <target_org>
|
|
1540
1610
|
```
|
|
1541
1611
|
|
|
1542
|
-
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1612
|
+
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/preview/end.ts)_
|
|
1543
1613
|
|
|
1544
1614
|
## `sf agent preview send`
|
|
1545
1615
|
|
|
@@ -1597,7 +1667,7 @@ EXAMPLES
|
|
|
1597
1667
|
$ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
|
|
1598
1668
|
```
|
|
1599
1669
|
|
|
1600
|
-
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1670
|
+
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/preview/send.ts)_
|
|
1601
1671
|
|
|
1602
1672
|
## `sf agent preview sessions`
|
|
1603
1673
|
|
|
@@ -1630,7 +1700,7 @@ EXAMPLES
|
|
|
1630
1700
|
$ sf agent preview sessions
|
|
1631
1701
|
```
|
|
1632
1702
|
|
|
1633
|
-
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1703
|
+
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/preview/sessions.ts)_
|
|
1634
1704
|
|
|
1635
1705
|
## `sf agent preview start`
|
|
1636
1706
|
|
|
@@ -1739,7 +1809,7 @@ FLAG DESCRIPTIONS
|
|
|
1739
1809
|
and a bare name for state variables.
|
|
1740
1810
|
```
|
|
1741
1811
|
|
|
1742
|
-
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1812
|
+
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/preview/start.ts)_
|
|
1743
1813
|
|
|
1744
1814
|
## `sf agent publish authoring-bundle`
|
|
1745
1815
|
|
|
@@ -1802,7 +1872,7 @@ EXAMPLES
|
|
|
1802
1872
|
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --concise
|
|
1803
1873
|
```
|
|
1804
1874
|
|
|
1805
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1875
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/publish/authoring-bundle.ts)_
|
|
1806
1876
|
|
|
1807
1877
|
## `sf agent test create`
|
|
1808
1878
|
|
|
@@ -1874,7 +1944,7 @@ FLAG DESCRIPTIONS
|
|
|
1874
1944
|
metadata. 'testing-center' uses AiEvaluationDefinition metadata.
|
|
1875
1945
|
```
|
|
1876
1946
|
|
|
1877
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1947
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/test/create.ts)_
|
|
1878
1948
|
|
|
1879
1949
|
## `sf agent test list`
|
|
1880
1950
|
|
|
@@ -1909,7 +1979,7 @@ EXAMPLES
|
|
|
1909
1979
|
$ sf agent test list --target-org my-org
|
|
1910
1980
|
```
|
|
1911
1981
|
|
|
1912
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
1982
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/test/list.ts)_
|
|
1913
1983
|
|
|
1914
1984
|
## `sf agent test results`
|
|
1915
1985
|
|
|
@@ -1985,7 +2055,7 @@ FLAG DESCRIPTIONS
|
|
|
1985
2055
|
expression when using custom evaluations.
|
|
1986
2056
|
```
|
|
1987
2057
|
|
|
1988
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2058
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/test/results.ts)_
|
|
1989
2059
|
|
|
1990
2060
|
## `sf agent test resume`
|
|
1991
2061
|
|
|
@@ -2069,7 +2139,7 @@ FLAG DESCRIPTIONS
|
|
|
2069
2139
|
expression when using custom evaluations.
|
|
2070
2140
|
```
|
|
2071
2141
|
|
|
2072
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2142
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/test/resume.ts)_
|
|
2073
2143
|
|
|
2074
2144
|
## `sf agent test run`
|
|
2075
2145
|
|
|
@@ -2153,7 +2223,7 @@ FLAG DESCRIPTIONS
|
|
|
2153
2223
|
expression when using custom evaluations.
|
|
2154
2224
|
```
|
|
2155
2225
|
|
|
2156
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2226
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/test/run.ts)_
|
|
2157
2227
|
|
|
2158
2228
|
## `sf agent test run-eval`
|
|
2159
2229
|
|
|
@@ -2229,7 +2299,7 @@ EXAMPLES
|
|
|
2229
2299
|
$ echo '{"tests":[...]}' | sf agent test run-eval --spec --target-org my-org
|
|
2230
2300
|
```
|
|
2231
2301
|
|
|
2232
|
-
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2302
|
+
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/test/run-eval.ts)_
|
|
2233
2303
|
|
|
2234
2304
|
## `sf agent trace delete`
|
|
2235
2305
|
|
|
@@ -2293,7 +2363,7 @@ EXAMPLES
|
|
|
2293
2363
|
$ sf agent trace delete --no-prompt
|
|
2294
2364
|
```
|
|
2295
2365
|
|
|
2296
|
-
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2366
|
+
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/trace/delete.ts)_
|
|
2297
2367
|
|
|
2298
2368
|
## `sf agent trace list`
|
|
2299
2369
|
|
|
@@ -2363,7 +2433,7 @@ FLAG DESCRIPTIONS
|
|
|
2363
2433
|
(2026-04-20T14:00:00.000Z). The "Recorded At" values shown in the table output are valid inputs.
|
|
2364
2434
|
```
|
|
2365
2435
|
|
|
2366
|
-
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2436
|
+
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/trace/list.ts)_
|
|
2367
2437
|
|
|
2368
2438
|
## `sf agent trace read`
|
|
2369
2439
|
|
|
@@ -2451,7 +2521,7 @@ EXAMPLES
|
|
|
2451
2521
|
$ sf agent trace read --session-id <SESSION_ID> --json
|
|
2452
2522
|
```
|
|
2453
2523
|
|
|
2454
|
-
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2524
|
+
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/trace/read.ts)_
|
|
2455
2525
|
|
|
2456
2526
|
## `sf agent validate authoring-bundle`
|
|
2457
2527
|
|
|
@@ -2498,6 +2568,6 @@ EXAMPLES
|
|
|
2498
2568
|
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
|
|
2499
2569
|
```
|
|
2500
2570
|
|
|
2501
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/2.
|
|
2571
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/2.4.0/src/commands/agent/validate/authoring-bundle.ts)_
|
|
2502
2572
|
|
|
2503
2573
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type McpAgentScriptActionOutput, type McpAgentScriptActionsOutput } from '@salesforce/agents';
|
|
3
|
+
export type SubagentUpdate = {
|
|
4
|
+
name: string;
|
|
5
|
+
added: string[];
|
|
6
|
+
skipped: string[];
|
|
7
|
+
};
|
|
8
|
+
export type ApiCatalogMcpServerAssetAfscriptResult = McpAgentScriptActionsOutput & {
|
|
9
|
+
bundle?: {
|
|
10
|
+
name: string;
|
|
11
|
+
file: string;
|
|
12
|
+
subagents: SubagentUpdate[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const idKey: (id: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Adds each action block under the subagent's `actions:` (8 spaces) and each reasoning reference under its
|
|
18
|
+
* `reasoning:` > `actions:` (12 spaces), the places Agentforce Builder uses. Creates a missing section. Skips an
|
|
19
|
+
* action whose key is already in the subagent's actions, so a second run changes nothing.
|
|
20
|
+
*/
|
|
21
|
+
export declare const addToSubagent: (content: string, subagent: string, actions: Array<Pick<McpAgentScriptActionOutput, "name" | "actionBlock" | "reasoningReference">>) => {
|
|
22
|
+
content: string;
|
|
23
|
+
added: string[];
|
|
24
|
+
skipped: string[];
|
|
25
|
+
};
|
|
26
|
+
export default class ApiCatalogMcpServerAssetAfscript extends SfCommand<ApiCatalogMcpServerAssetAfscriptResult> {
|
|
27
|
+
static readonly summary: string;
|
|
28
|
+
static readonly description: string;
|
|
29
|
+
static readonly examples: string[];
|
|
30
|
+
static readonly enableJsonFlag = true;
|
|
31
|
+
static readonly state = "preview";
|
|
32
|
+
static readonly flags: {
|
|
33
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
|
+
'mcp-server-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
|
+
tool: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
37
|
+
'asset-id': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
|
+
'authoring-bundle': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
39
|
+
subagent: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
40
|
+
};
|
|
41
|
+
run(): Promise<ApiCatalogMcpServerAssetAfscriptResult>;
|
|
42
|
+
/** Adds the actions to each subagent of the local bundle. Validate or deploy the bundle separately. */
|
|
43
|
+
private updateBundle;
|
|
44
|
+
}
|