@salesforce/plugin-agent 1.40.0 → 1.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -44
- package/messages/agent.test.run-eval.md +14 -11
- package/oclif.manifest.json +133 -133
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -130,7 +130,7 @@ EXAMPLES
|
|
|
130
130
|
$ sf agent activate --api-name Resort_Manager --version 2 --target-org my-org
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
133
|
+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/activate.ts)_
|
|
134
134
|
|
|
135
135
|
## `sf agent create`
|
|
136
136
|
|
|
@@ -197,7 +197,7 @@ EXAMPLES
|
|
|
197
197
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
200
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/create.ts)_
|
|
201
201
|
|
|
202
202
|
## `sf agent deactivate`
|
|
203
203
|
|
|
@@ -238,7 +238,7 @@ EXAMPLES
|
|
|
238
238
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
241
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/deactivate.ts)_
|
|
242
242
|
|
|
243
243
|
## `sf agent generate agent-spec`
|
|
244
244
|
|
|
@@ -345,7 +345,7 @@ EXAMPLES
|
|
|
345
345
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
348
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/generate/agent-spec.ts)_
|
|
349
349
|
|
|
350
350
|
## `sf agent generate authoring-bundle`
|
|
351
351
|
|
|
@@ -422,7 +422,7 @@ EXAMPLES
|
|
|
422
422
|
other-package-dir/main/default --target-org my-dev-org
|
|
423
423
|
```
|
|
424
424
|
|
|
425
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
425
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/generate/authoring-bundle.ts)_
|
|
426
426
|
|
|
427
427
|
## `sf agent generate template`
|
|
428
428
|
|
|
@@ -484,7 +484,7 @@ EXAMPLES
|
|
|
484
484
|
my-package --source-org my-scratch-org
|
|
485
485
|
```
|
|
486
486
|
|
|
487
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
487
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/generate/template.ts)_
|
|
488
488
|
|
|
489
489
|
## `sf agent generate test-spec`
|
|
490
490
|
|
|
@@ -549,7 +549,7 @@ EXAMPLES
|
|
|
549
549
|
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
|
|
550
550
|
```
|
|
551
551
|
|
|
552
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
552
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/generate/test-spec.ts)_
|
|
553
553
|
|
|
554
554
|
## `sf agent preview`
|
|
555
555
|
|
|
@@ -622,7 +622,7 @@ EXAMPLES
|
|
|
622
622
|
$ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview
|
|
623
623
|
```
|
|
624
624
|
|
|
625
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
625
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/preview.ts)_
|
|
626
626
|
|
|
627
627
|
## `sf agent preview end`
|
|
628
628
|
|
|
@@ -694,7 +694,7 @@ EXAMPLES
|
|
|
694
694
|
$ sf agent preview end --all --target-org <target_org>
|
|
695
695
|
```
|
|
696
696
|
|
|
697
|
-
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
697
|
+
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/preview/end.ts)_
|
|
698
698
|
|
|
699
699
|
## `sf agent preview send`
|
|
700
700
|
|
|
@@ -752,7 +752,7 @@ EXAMPLES
|
|
|
752
752
|
$ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
|
|
753
753
|
```
|
|
754
754
|
|
|
755
|
-
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
755
|
+
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/preview/send.ts)_
|
|
756
756
|
|
|
757
757
|
## `sf agent preview sessions`
|
|
758
758
|
|
|
@@ -785,7 +785,7 @@ EXAMPLES
|
|
|
785
785
|
$ sf agent preview sessions
|
|
786
786
|
```
|
|
787
787
|
|
|
788
|
-
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
788
|
+
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/preview/sessions.ts)_
|
|
789
789
|
|
|
790
790
|
## `sf agent preview start`
|
|
791
791
|
|
|
@@ -850,7 +850,7 @@ EXAMPLES
|
|
|
850
850
|
$ sf agent preview start --api-name My_Published_Agent
|
|
851
851
|
```
|
|
852
852
|
|
|
853
|
-
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
853
|
+
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/preview/start.ts)_
|
|
854
854
|
|
|
855
855
|
## `sf agent publish authoring-bundle`
|
|
856
856
|
|
|
@@ -910,7 +910,7 @@ EXAMPLES
|
|
|
910
910
|
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --concise
|
|
911
911
|
```
|
|
912
912
|
|
|
913
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
913
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/publish/authoring-bundle.ts)_
|
|
914
914
|
|
|
915
915
|
## `sf agent test create`
|
|
916
916
|
|
|
@@ -965,7 +965,7 @@ EXAMPLES
|
|
|
965
965
|
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
|
|
966
966
|
```
|
|
967
967
|
|
|
968
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
968
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/test/create.ts)_
|
|
969
969
|
|
|
970
970
|
## `sf agent test list`
|
|
971
971
|
|
|
@@ -1000,7 +1000,7 @@ EXAMPLES
|
|
|
1000
1000
|
$ sf agent test list --target-org my-org
|
|
1001
1001
|
```
|
|
1002
1002
|
|
|
1003
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1003
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/test/list.ts)_
|
|
1004
1004
|
|
|
1005
1005
|
## `sf agent test results`
|
|
1006
1006
|
|
|
@@ -1076,7 +1076,7 @@ FLAG DESCRIPTIONS
|
|
|
1076
1076
|
expression when using custom evaluations.
|
|
1077
1077
|
```
|
|
1078
1078
|
|
|
1079
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1079
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/test/results.ts)_
|
|
1080
1080
|
|
|
1081
1081
|
## `sf agent test resume`
|
|
1082
1082
|
|
|
@@ -1160,7 +1160,7 @@ FLAG DESCRIPTIONS
|
|
|
1160
1160
|
expression when using custom evaluations.
|
|
1161
1161
|
```
|
|
1162
1162
|
|
|
1163
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1163
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/test/resume.ts)_
|
|
1164
1164
|
|
|
1165
1165
|
## `sf agent test run`
|
|
1166
1166
|
|
|
@@ -1244,11 +1244,11 @@ FLAG DESCRIPTIONS
|
|
|
1244
1244
|
expression when using custom evaluations.
|
|
1245
1245
|
```
|
|
1246
1246
|
|
|
1247
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1247
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/test/run.ts)_
|
|
1248
1248
|
|
|
1249
1249
|
## `sf agent test run-eval`
|
|
1250
1250
|
|
|
1251
|
-
Run evaluation tests against an Agentforce agent.
|
|
1251
|
+
Run rich evaluation tests against an Agentforce agent.
|
|
1252
1252
|
|
|
1253
1253
|
```
|
|
1254
1254
|
USAGE
|
|
@@ -1256,8 +1256,8 @@ USAGE
|
|
|
1256
1256
|
[--result-format json|human|junit|tap] [--batch-size <value>] [--no-normalize]
|
|
1257
1257
|
|
|
1258
1258
|
FLAGS
|
|
1259
|
-
-n, --api-name=<value> Agent
|
|
1260
|
-
Auto-inferred from the YAML spec's subjectName.
|
|
1259
|
+
-n, --api-name=<value> Agent API name (also called DeveloperName) used to resolve agent_id and
|
|
1260
|
+
agent_version_id. Auto-inferred from the YAML spec's subjectName.
|
|
1261
1261
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
1262
1262
|
configuration variable is already set.
|
|
1263
1263
|
-s, --spec=<value> (required) Path to test spec file (YAML or JSON). Supports reading from stdin when
|
|
@@ -1273,51 +1273,54 @@ GLOBAL FLAGS
|
|
|
1273
1273
|
--json Format output as json.
|
|
1274
1274
|
|
|
1275
1275
|
DESCRIPTION
|
|
1276
|
-
Run evaluation tests against an Agentforce agent.
|
|
1276
|
+
Run rich evaluation tests against an Agentforce agent.
|
|
1277
1277
|
|
|
1278
|
-
|
|
1279
|
-
specs (same format as `sf agent generate test-spec`) and JSON payloads.
|
|
1278
|
+
Specify the tests you want to run with one of these inputs to the --spec flag:
|
|
1280
1279
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
agent test run` and `sf agent test run-eval`. YAML test specs also support contextVariables, which allow you to inject
|
|
1284
|
-
contextual data (such as CaseId or RoutableId) into agent sessions for testing with different contexts.
|
|
1280
|
+
- YAML test spec generated by the `agent generate test-spec` CLI command
|
|
1281
|
+
- JSON payload
|
|
1285
1282
|
|
|
1286
|
-
When you provide a
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1283
|
+
When you provide a YAML test spec, this command automatically translates test cases into internal state-based
|
|
1284
|
+
evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can
|
|
1285
|
+
use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support
|
|
1286
|
+
context variables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for
|
|
1287
|
+
testing with different contexts.
|
|
1290
1288
|
|
|
1291
|
-
|
|
1292
|
-
|
|
1289
|
+
When you provide a JSON payload, it's sent directly to the evaluation framework with optional normalization. The
|
|
1290
|
+
normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults.
|
|
1291
|
+
Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on
|
|
1292
|
+
agent.create_session steps for the same contextual testing capabilities as when you use a YAML test spec.
|
|
1293
|
+
|
|
1294
|
+
This command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks,
|
|
1295
|
+
string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.
|
|
1293
1296
|
|
|
1294
1297
|
EXAMPLES
|
|
1295
1298
|
Run tests using a YAML test spec on the org with alias "my-org":
|
|
1296
1299
|
|
|
1297
|
-
$ sf agent test run-eval --spec
|
|
1300
|
+
$ sf agent test run-eval --spec specs/my-agent-testSpec.yaml --target-org my-org
|
|
1298
1301
|
|
|
1299
1302
|
Run tests using a YAML spec with explicit agent name override; use your default org:
|
|
1300
1303
|
|
|
1301
|
-
$ sf agent test run-eval --spec
|
|
1304
|
+
$ sf agent test run-eval --spec specs/my-agent-testSpec.yaml --api-name My_Agent
|
|
1302
1305
|
|
|
1303
1306
|
Run tests using a JSON payload:
|
|
1304
1307
|
|
|
1305
|
-
$ sf agent test run-eval --spec
|
|
1308
|
+
$ sf agent test run-eval --spec specs/eval-payload.json --target-org my-org
|
|
1306
1309
|
|
|
1307
1310
|
Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):
|
|
1308
1311
|
|
|
1309
|
-
$ sf agent test run-eval --spec
|
|
1312
|
+
$ sf agent test run-eval --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit
|
|
1310
1313
|
|
|
1311
1314
|
Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in
|
|
1312
1315
|
your YAML spec):
|
|
1313
1316
|
|
|
1314
|
-
$ sf agent test run-eval --spec
|
|
1317
|
+
$ sf agent test run-eval --spec specs/agent-with-context.yaml --target-org my-org
|
|
1315
1318
|
|
|
1316
1319
|
Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):
|
|
1317
1320
|
$ echo '{"tests":[...]}' | sf agent test run-eval --spec --target-org my-org
|
|
1318
1321
|
```
|
|
1319
1322
|
|
|
1320
|
-
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1323
|
+
_See code: [src/commands/agent/test/run-eval.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/test/run-eval.ts)_
|
|
1321
1324
|
|
|
1322
1325
|
## `sf agent trace delete`
|
|
1323
1326
|
|
|
@@ -1381,7 +1384,7 @@ EXAMPLES
|
|
|
1381
1384
|
$ sf agent trace delete --no-prompt
|
|
1382
1385
|
```
|
|
1383
1386
|
|
|
1384
|
-
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1387
|
+
_See code: [src/commands/agent/trace/delete.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/trace/delete.ts)_
|
|
1385
1388
|
|
|
1386
1389
|
## `sf agent trace list`
|
|
1387
1390
|
|
|
@@ -1451,7 +1454,7 @@ FLAG DESCRIPTIONS
|
|
|
1451
1454
|
(2026-04-20T14:00:00.000Z). The "Recorded At" values shown in the table output are valid inputs.
|
|
1452
1455
|
```
|
|
1453
1456
|
|
|
1454
|
-
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1457
|
+
_See code: [src/commands/agent/trace/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/trace/list.ts)_
|
|
1455
1458
|
|
|
1456
1459
|
## `sf agent trace read`
|
|
1457
1460
|
|
|
@@ -1539,7 +1542,7 @@ EXAMPLES
|
|
|
1539
1542
|
$ sf agent trace read --session-id <SESSION_ID> --json
|
|
1540
1543
|
```
|
|
1541
1544
|
|
|
1542
|
-
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1545
|
+
_See code: [src/commands/agent/trace/read.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/trace/read.ts)_
|
|
1543
1546
|
|
|
1544
1547
|
## `sf agent validate authoring-bundle`
|
|
1545
1548
|
|
|
@@ -1586,6 +1589,6 @@ EXAMPLES
|
|
|
1586
1589
|
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
|
|
1587
1590
|
```
|
|
1588
1591
|
|
|
1589
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.
|
|
1592
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.40.1/src/commands/agent/validate/authoring-bundle.ts)_
|
|
1590
1593
|
|
|
1591
1594
|
<!-- commandsstop -->
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# summary
|
|
2
2
|
|
|
3
|
-
Run evaluation tests against an Agentforce agent.
|
|
3
|
+
Run rich evaluation tests against an Agentforce agent.
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Specify the tests you want to run with one of these inputs to the --spec flag:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- YAML test spec generated by the `agent generate test-spec` CLI command
|
|
10
|
+
- JSON payload
|
|
10
11
|
|
|
11
|
-
When you provide a
|
|
12
|
+
When you provide a YAML test spec, this command automatically translates test cases into internal state-based evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support context variables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for testing with different contexts.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
When you provide a JSON payload, it's sent directly to the evaluation framework with optional normalization. The normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults. Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on agent.create_session steps for the same contextual testing capabilities as when you use a YAML test spec.
|
|
15
|
+
|
|
16
|
+
This command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.
|
|
14
17
|
|
|
15
18
|
# flags.spec.summary
|
|
16
19
|
|
|
@@ -18,7 +21,7 @@ Path to test spec file (YAML or JSON). Supports reading from stdin when piping c
|
|
|
18
21
|
|
|
19
22
|
# flags.api-name.summary
|
|
20
23
|
|
|
21
|
-
Agent
|
|
24
|
+
Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.
|
|
22
25
|
|
|
23
26
|
# flags.result-format.summary
|
|
24
27
|
|
|
@@ -36,23 +39,23 @@ Disable auto-normalization of field names and shorthand references.
|
|
|
36
39
|
|
|
37
40
|
- Run tests using a YAML test spec on the org with alias "my-org":
|
|
38
41
|
|
|
39
|
-
<%= config.bin %> <%= command.id %> --spec
|
|
42
|
+
<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org
|
|
40
43
|
|
|
41
44
|
- Run tests using a YAML spec with explicit agent name override; use your default org:
|
|
42
45
|
|
|
43
|
-
<%= config.bin %> <%= command.id %> --spec
|
|
46
|
+
<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --api-name My_Agent
|
|
44
47
|
|
|
45
48
|
- Run tests using a JSON payload:
|
|
46
49
|
|
|
47
|
-
<%= config.bin %> <%= command.id %> --spec
|
|
50
|
+
<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org
|
|
48
51
|
|
|
49
52
|
- Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):
|
|
50
53
|
|
|
51
|
-
<%= config.bin %> <%= command.id %> --spec
|
|
54
|
+
<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit
|
|
52
55
|
|
|
53
56
|
- Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):
|
|
54
57
|
|
|
55
|
-
<%= config.bin %> <%= command.id %> --spec
|
|
58
|
+
<%= config.bin %> <%= command.id %> --spec specs/agent-with-context.yaml --target-org my-org
|
|
56
59
|
|
|
57
60
|
- Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):
|
|
58
61
|
|
package/oclif.manifest.json
CHANGED
|
@@ -879,6 +879,130 @@
|
|
|
879
879
|
"test-spec:generate:agent"
|
|
880
880
|
]
|
|
881
881
|
},
|
|
882
|
+
"agent:publish:authoring-bundle": {
|
|
883
|
+
"aliases": [],
|
|
884
|
+
"args": {},
|
|
885
|
+
"description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nWhen you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The new or updated metadata is retrieved back to your DX project; specify the --skip-retrieve flag to skip this step. Finally, the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.\n\nThis command uses the API name of the authoring bundle.",
|
|
886
|
+
"examples": [
|
|
887
|
+
"Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
888
|
+
"Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org",
|
|
889
|
+
"Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
|
|
890
|
+
"Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
|
|
891
|
+
],
|
|
892
|
+
"flags": {
|
|
893
|
+
"json": {
|
|
894
|
+
"description": "Format output as json.",
|
|
895
|
+
"helpGroup": "GLOBAL",
|
|
896
|
+
"name": "json",
|
|
897
|
+
"allowNo": false,
|
|
898
|
+
"type": "boolean"
|
|
899
|
+
},
|
|
900
|
+
"flags-dir": {
|
|
901
|
+
"helpGroup": "GLOBAL",
|
|
902
|
+
"name": "flags-dir",
|
|
903
|
+
"summary": "Import flag values from a directory.",
|
|
904
|
+
"hasDynamicHelp": false,
|
|
905
|
+
"multiple": false,
|
|
906
|
+
"type": "option"
|
|
907
|
+
},
|
|
908
|
+
"target-org": {
|
|
909
|
+
"char": "o",
|
|
910
|
+
"name": "target-org",
|
|
911
|
+
"noCacheDefault": true,
|
|
912
|
+
"required": true,
|
|
913
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
914
|
+
"hasDynamicHelp": true,
|
|
915
|
+
"multiple": false,
|
|
916
|
+
"type": "option"
|
|
917
|
+
},
|
|
918
|
+
"api-version": {
|
|
919
|
+
"description": "Override the api version used for api requests made by this command",
|
|
920
|
+
"name": "api-version",
|
|
921
|
+
"hasDynamicHelp": false,
|
|
922
|
+
"multiple": false,
|
|
923
|
+
"type": "option"
|
|
924
|
+
},
|
|
925
|
+
"api-name": {
|
|
926
|
+
"char": "n",
|
|
927
|
+
"name": "api-name",
|
|
928
|
+
"summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
929
|
+
"hasDynamicHelp": false,
|
|
930
|
+
"multiple": false,
|
|
931
|
+
"type": "option"
|
|
932
|
+
},
|
|
933
|
+
"skip-retrieve": {
|
|
934
|
+
"name": "skip-retrieve",
|
|
935
|
+
"summary": "Don't retrieve the metadata associated with the agent to your DX project.",
|
|
936
|
+
"allowNo": false,
|
|
937
|
+
"type": "boolean"
|
|
938
|
+
},
|
|
939
|
+
"verbose": {
|
|
940
|
+
"char": "v",
|
|
941
|
+
"exclusive": [
|
|
942
|
+
"concise"
|
|
943
|
+
],
|
|
944
|
+
"name": "verbose",
|
|
945
|
+
"summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
|
|
946
|
+
"allowNo": false,
|
|
947
|
+
"type": "boolean"
|
|
948
|
+
},
|
|
949
|
+
"concise": {
|
|
950
|
+
"exclusive": [
|
|
951
|
+
"verbose"
|
|
952
|
+
],
|
|
953
|
+
"name": "concise",
|
|
954
|
+
"summary": "Display minimal output with only essential information about the publish operation.",
|
|
955
|
+
"allowNo": false,
|
|
956
|
+
"type": "boolean"
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"hasDynamicHelp": true,
|
|
960
|
+
"hiddenAliases": [],
|
|
961
|
+
"id": "agent:publish:authoring-bundle",
|
|
962
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
963
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
964
|
+
"pluginType": "core",
|
|
965
|
+
"strict": true,
|
|
966
|
+
"summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
|
|
967
|
+
"enableJsonFlag": true,
|
|
968
|
+
"requiresProject": true,
|
|
969
|
+
"errorCodes": {
|
|
970
|
+
"header": "ERROR CODES",
|
|
971
|
+
"body": [
|
|
972
|
+
{
|
|
973
|
+
"name": "Succeeded (0)",
|
|
974
|
+
"description": "Agent published successfully without errors."
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "Failed (1)",
|
|
978
|
+
"description": "Compilation errors found in the Agent Script file."
|
|
979
|
+
}
|
|
980
|
+
]
|
|
981
|
+
},
|
|
982
|
+
"FLAGGABLE_PROMPTS": {
|
|
983
|
+
"api-name": {
|
|
984
|
+
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
985
|
+
"promptMessage": "API name of the authoring bundle to publish"
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
"isESM": true,
|
|
989
|
+
"relativePath": [
|
|
990
|
+
"lib",
|
|
991
|
+
"commands",
|
|
992
|
+
"agent",
|
|
993
|
+
"publish",
|
|
994
|
+
"authoring-bundle.js"
|
|
995
|
+
],
|
|
996
|
+
"aliasPermutations": [],
|
|
997
|
+
"permutations": [
|
|
998
|
+
"agent:publish:authoring-bundle",
|
|
999
|
+
"publish:agent:authoring-bundle",
|
|
1000
|
+
"publish:authoring-bundle:agent",
|
|
1001
|
+
"agent:authoring-bundle:publish",
|
|
1002
|
+
"authoring-bundle:agent:publish",
|
|
1003
|
+
"authoring-bundle:publish:agent"
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
882
1006
|
"agent:preview:end": {
|
|
883
1007
|
"aliases": [],
|
|
884
1008
|
"args": {},
|
|
@@ -1381,130 +1505,6 @@
|
|
|
1381
1505
|
"start:preview:agent"
|
|
1382
1506
|
]
|
|
1383
1507
|
},
|
|
1384
|
-
"agent:publish:authoring-bundle": {
|
|
1385
|
-
"aliases": [],
|
|
1386
|
-
"args": {},
|
|
1387
|
-
"description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nWhen you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then it's published to the org, which in turn creates new associated metadata (Bot, BotVersion, GenAiX), or new versions of the metadata if the agent already exists. The new or updated metadata is retrieved back to your DX project; specify the --skip-retrieve flag to skip this step. Finally, the authoring bundle metadata (AiAuthoringBundle) is deployed to your org.\n\nThis command uses the API name of the authoring bundle.",
|
|
1388
|
-
"examples": [
|
|
1389
|
-
"Publish an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1390
|
-
"Publish an authoring bundle with API name MyAuthoringBundle to the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-dev-org",
|
|
1391
|
-
"Publish with verbose output to see all retrieved and deployed metadata components:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --verbose",
|
|
1392
|
-
"Publish with concise output showing only essential information:\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --concise"
|
|
1393
|
-
],
|
|
1394
|
-
"flags": {
|
|
1395
|
-
"json": {
|
|
1396
|
-
"description": "Format output as json.",
|
|
1397
|
-
"helpGroup": "GLOBAL",
|
|
1398
|
-
"name": "json",
|
|
1399
|
-
"allowNo": false,
|
|
1400
|
-
"type": "boolean"
|
|
1401
|
-
},
|
|
1402
|
-
"flags-dir": {
|
|
1403
|
-
"helpGroup": "GLOBAL",
|
|
1404
|
-
"name": "flags-dir",
|
|
1405
|
-
"summary": "Import flag values from a directory.",
|
|
1406
|
-
"hasDynamicHelp": false,
|
|
1407
|
-
"multiple": false,
|
|
1408
|
-
"type": "option"
|
|
1409
|
-
},
|
|
1410
|
-
"target-org": {
|
|
1411
|
-
"char": "o",
|
|
1412
|
-
"name": "target-org",
|
|
1413
|
-
"noCacheDefault": true,
|
|
1414
|
-
"required": true,
|
|
1415
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1416
|
-
"hasDynamicHelp": true,
|
|
1417
|
-
"multiple": false,
|
|
1418
|
-
"type": "option"
|
|
1419
|
-
},
|
|
1420
|
-
"api-version": {
|
|
1421
|
-
"description": "Override the api version used for api requests made by this command",
|
|
1422
|
-
"name": "api-version",
|
|
1423
|
-
"hasDynamicHelp": false,
|
|
1424
|
-
"multiple": false,
|
|
1425
|
-
"type": "option"
|
|
1426
|
-
},
|
|
1427
|
-
"api-name": {
|
|
1428
|
-
"char": "n",
|
|
1429
|
-
"name": "api-name",
|
|
1430
|
-
"summary": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
1431
|
-
"hasDynamicHelp": false,
|
|
1432
|
-
"multiple": false,
|
|
1433
|
-
"type": "option"
|
|
1434
|
-
},
|
|
1435
|
-
"skip-retrieve": {
|
|
1436
|
-
"name": "skip-retrieve",
|
|
1437
|
-
"summary": "Don't retrieve the metadata associated with the agent to your DX project.",
|
|
1438
|
-
"allowNo": false,
|
|
1439
|
-
"type": "boolean"
|
|
1440
|
-
},
|
|
1441
|
-
"verbose": {
|
|
1442
|
-
"char": "v",
|
|
1443
|
-
"exclusive": [
|
|
1444
|
-
"concise"
|
|
1445
|
-
],
|
|
1446
|
-
"name": "verbose",
|
|
1447
|
-
"summary": "Display detailed output showing all metadata components retrieved and deployed during the publish process.",
|
|
1448
|
-
"allowNo": false,
|
|
1449
|
-
"type": "boolean"
|
|
1450
|
-
},
|
|
1451
|
-
"concise": {
|
|
1452
|
-
"exclusive": [
|
|
1453
|
-
"verbose"
|
|
1454
|
-
],
|
|
1455
|
-
"name": "concise",
|
|
1456
|
-
"summary": "Display minimal output with only essential information about the publish operation.",
|
|
1457
|
-
"allowNo": false,
|
|
1458
|
-
"type": "boolean"
|
|
1459
|
-
}
|
|
1460
|
-
},
|
|
1461
|
-
"hasDynamicHelp": true,
|
|
1462
|
-
"hiddenAliases": [],
|
|
1463
|
-
"id": "agent:publish:authoring-bundle",
|
|
1464
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1465
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1466
|
-
"pluginType": "core",
|
|
1467
|
-
"strict": true,
|
|
1468
|
-
"summary": "Publish an authoring bundle to your org, which results in a new agent or a new version of an existing agent.",
|
|
1469
|
-
"enableJsonFlag": true,
|
|
1470
|
-
"requiresProject": true,
|
|
1471
|
-
"errorCodes": {
|
|
1472
|
-
"header": "ERROR CODES",
|
|
1473
|
-
"body": [
|
|
1474
|
-
{
|
|
1475
|
-
"name": "Succeeded (0)",
|
|
1476
|
-
"description": "Agent published successfully without errors."
|
|
1477
|
-
},
|
|
1478
|
-
{
|
|
1479
|
-
"name": "Failed (1)",
|
|
1480
|
-
"description": "Compilation errors found in the Agent Script file."
|
|
1481
|
-
}
|
|
1482
|
-
]
|
|
1483
|
-
},
|
|
1484
|
-
"FLAGGABLE_PROMPTS": {
|
|
1485
|
-
"api-name": {
|
|
1486
|
-
"message": "API name of the authoring bundle you want to publish; if not specified, the command provides a list that you can choose from.",
|
|
1487
|
-
"promptMessage": "API name of the authoring bundle to publish"
|
|
1488
|
-
}
|
|
1489
|
-
},
|
|
1490
|
-
"isESM": true,
|
|
1491
|
-
"relativePath": [
|
|
1492
|
-
"lib",
|
|
1493
|
-
"commands",
|
|
1494
|
-
"agent",
|
|
1495
|
-
"publish",
|
|
1496
|
-
"authoring-bundle.js"
|
|
1497
|
-
],
|
|
1498
|
-
"aliasPermutations": [],
|
|
1499
|
-
"permutations": [
|
|
1500
|
-
"agent:publish:authoring-bundle",
|
|
1501
|
-
"publish:agent:authoring-bundle",
|
|
1502
|
-
"publish:authoring-bundle:agent",
|
|
1503
|
-
"agent:authoring-bundle:publish",
|
|
1504
|
-
"authoring-bundle:agent:publish",
|
|
1505
|
-
"authoring-bundle:publish:agent"
|
|
1506
|
-
]
|
|
1507
|
-
},
|
|
1508
1508
|
"agent:test:create": {
|
|
1509
1509
|
"aliases": [],
|
|
1510
1510
|
"args": {},
|
|
@@ -2038,13 +2038,13 @@
|
|
|
2038
2038
|
"agent:test:run-eval": {
|
|
2039
2039
|
"aliases": [],
|
|
2040
2040
|
"args": {},
|
|
2041
|
-
"description": "
|
|
2041
|
+
"description": "Specify the tests you want to run with one of these inputs to the --spec flag:\n\n- YAML test spec generated by the `agent generate test-spec` CLI command\n- JSON payload\n\nWhen you provide a YAML test spec, this command automatically translates test cases into internal state-based evaluation framework calls and infers the agent name from the test spec's `subjectName` field. As a result, you can use the same test spec with both the `agent test run` and `agent test run-eval` commands. YAML test specs also support context variables, which allow you to inject contextual data (such as CaseId or RoutableId) into agent sessions for testing with different contexts.\n\nWhen you provide a JSON payload, it's sent directly to the evaluation framework with optional normalization. The normalizer auto-corrects common field name mistakes, converts shorthand references to JSONPath, and injects defaults. Use `--no-normalize` to disable this auto-normalization. JSON payloads can also include context_variables on agent.create_session steps for the same contextual testing capabilities as when you use a YAML test spec.\n\nThis command supports more than 8 evaluator types, including subagent routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.",
|
|
2042
2042
|
"examples": [
|
|
2043
|
-
"Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec
|
|
2044
|
-
"Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec
|
|
2045
|
-
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec
|
|
2046
|
-
"Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec
|
|
2047
|
-
"Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):\n<%= config.bin %> <%= command.id %> --spec
|
|
2043
|
+
"Run tests using a YAML test spec on the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org",
|
|
2044
|
+
"Run tests using a YAML spec with explicit agent name override; use your default org:\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --api-name My_Agent",
|
|
2045
|
+
"Run tests using a JSON payload:\n<%= config.bin %> <%= command.id %> --spec specs/eval-payload.json --target-org my-org",
|
|
2046
|
+
"Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):\n<%= config.bin %> <%= command.id %> --spec specs/my-agent-testSpec.yaml --target-org my-org --result-format junit",
|
|
2047
|
+
"Run tests with contextVariables to inject contextual data into agent sessions (add contextVariables to test cases in your YAML spec):\n<%= config.bin %> <%= command.id %> --spec specs/agent-with-context.yaml --target-org my-org",
|
|
2048
2048
|
"Pipe JSON payload from stdin (--spec flag is automatically populated from stdin):\n$ echo '{\"tests\":[...]}' | <%= config.bin %> <%= command.id %> --spec --target-org my-org"
|
|
2049
2049
|
],
|
|
2050
2050
|
"flags": {
|
|
@@ -2092,7 +2092,7 @@
|
|
|
2092
2092
|
"api-name": {
|
|
2093
2093
|
"char": "n",
|
|
2094
2094
|
"name": "api-name",
|
|
2095
|
-
"summary": "Agent
|
|
2095
|
+
"summary": "Agent API name (also called DeveloperName) used to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.",
|
|
2096
2096
|
"hasDynamicHelp": false,
|
|
2097
2097
|
"multiple": false,
|
|
2098
2098
|
"type": "option"
|
|
@@ -2134,7 +2134,7 @@
|
|
|
2134
2134
|
"pluginType": "core",
|
|
2135
2135
|
"state": "beta",
|
|
2136
2136
|
"strict": true,
|
|
2137
|
-
"summary": "Run evaluation tests against an Agentforce agent.",
|
|
2137
|
+
"summary": "Run rich evaluation tests against an Agentforce agent.",
|
|
2138
2138
|
"enableJsonFlag": true,
|
|
2139
2139
|
"envVariablesSection": {
|
|
2140
2140
|
"header": "ENVIRONMENT VARIABLES",
|
|
@@ -2744,5 +2744,5 @@
|
|
|
2744
2744
|
]
|
|
2745
2745
|
}
|
|
2746
2746
|
},
|
|
2747
|
-
"version": "1.40.
|
|
2747
|
+
"version": "1.40.1"
|
|
2748
2748
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-agent",
|
|
3
3
|
"description": "Commands to interact with Salesforce agents",
|
|
4
|
-
"version": "1.40.
|
|
4
|
+
"version": "1.40.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"enableO11y": true,
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
"exports": "./lib/index.js",
|
|
241
241
|
"type": "module",
|
|
242
242
|
"sfdx": {
|
|
243
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.40.
|
|
244
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.40.
|
|
243
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.40.1.crt",
|
|
244
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.40.1.sig"
|
|
245
245
|
}
|
|
246
246
|
}
|