Skip to content

Commit 35afe80

Browse files
Merge branch 'main' into wr/activateVersion
2 parents 3d42f66 + 4abebea commit 35afe80

19 files changed

+3188
-40
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
## [1.31.3](https://github.com/salesforcecli/plugin-agent/compare/1.31.2...1.31.3) (2026-03-08)
2+
3+
### Bug Fixes
4+
5+
- **deps:** bump fast-xml-parser from 5.4.1 to 5.4.2 ([91a1ff8](https://github.com/salesforcecli/plugin-agent/commit/91a1ff8124ed56b86c421077067d0e5f4a6ccee1))
6+
7+
## [1.31.2](https://github.com/salesforcecli/plugin-agent/compare/1.31.1...1.31.2) (2026-03-08)
8+
9+
### Bug Fixes
10+
11+
- **deps:** bump @salesforce/core from 8.26.2 to 8.26.3 ([033b12c](https://github.com/salesforcecli/plugin-agent/commit/033b12cc8fab8a94091f50b524cc02d70a165861))
12+
13+
## [1.31.1](https://github.com/salesforcecli/plugin-agent/compare/1.31.0...1.31.1) (2026-03-08)
14+
15+
### Bug Fixes
16+
17+
- **deps:** bump @salesforce/agents from 0.23.4 to 0.24.1 ([229e94c](https://github.com/salesforcecli/plugin-agent/commit/229e94cb85adb6bd910f4175a3c19a09c5610ce2))
18+
19+
# [1.31.0](https://github.com/salesforcecli/plugin-agent/compare/1.30.11...1.31.0) (2026-03-06)
20+
21+
### Bug Fixes
22+
23+
- initial updates, use Org/Connection, make beta/hidden ([2a0f283](https://github.com/salesforcecli/plugin-agent/commit/2a0f28396cd31ae9c8069a303501d77d5eac6bac))
24+
25+
### Features
26+
27+
- add `sf agent test run-eval` for Einstein Eval Labs API testing ([1699d51](https://github.com/salesforcecli/plugin-agent/commit/1699d5188a3e4b165c564680e65e5dc33b20bb6e))
28+
- add YAML test spec support for `sf agent test run-eval` ([e942e00](https://github.com/salesforcecli/plugin-agent/commit/e942e006e7892d34ae93e6f84a6c6673b8be0c9b))
29+
- normalize MCP shorthand format in evalNormalizer ([01bc87b](https://github.com/salesforcecli/plugin-agent/commit/01bc87be643b4901ba65d79b205a1977f750c81a))
30+
131
## [1.30.11](https://github.com/salesforcecli/plugin-agent/compare/1.30.10...1.30.11) (2026-03-01)
232

333
### Bug Fixes

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ EXAMPLES
116116
$ sf agent activate --api-name Resort_Manager --target-org my-org
117117
```
118118

119-
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/activate.ts)_
119+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/activate.ts)_
120120

121121
## `sf agent create`
122122

@@ -183,7 +183,7 @@ EXAMPLES
183183
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
184184
```
185185

186-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/create.ts)_
186+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/create.ts)_
187187

188188
## `sf agent deactivate`
189189

@@ -223,7 +223,7 @@ EXAMPLES
223223
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
224224
```
225225

226-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/deactivate.ts)_
226+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/deactivate.ts)_
227227

228228
## `sf agent generate agent-spec`
229229

@@ -330,7 +330,7 @@ EXAMPLES
330330
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
331331
```
332332

333-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/generate/agent-spec.ts)_
333+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/generate/agent-spec.ts)_
334334

335335
## `sf agent generate authoring-bundle`
336336

@@ -407,7 +407,7 @@ EXAMPLES
407407
other-package-dir/main/default --target-org my-dev-org
408408
```
409409

410-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/generate/authoring-bundle.ts)_
410+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/generate/authoring-bundle.ts)_
411411

412412
## `sf agent generate template`
413413

@@ -455,7 +455,7 @@ EXAMPLES
455455
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
456456
```
457457

458-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/generate/template.ts)_
458+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/generate/template.ts)_
459459

460460
## `sf agent generate test-spec`
461461

@@ -516,7 +516,7 @@ EXAMPLES
516516
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
517517
```
518518

519-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/generate/test-spec.ts)_
519+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/generate/test-spec.ts)_
520520

521521
## `sf agent preview`
522522

@@ -589,7 +589,7 @@ EXAMPLES
589589
$ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview
590590
```
591591

592-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/preview.ts)_
592+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/preview.ts)_
593593

594594
## `sf agent preview end`
595595

@@ -644,7 +644,7 @@ EXAMPLES
644644
$ sf agent preview end --authoring-bundle My_Local_Agent
645645
```
646646

647-
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/preview/end.ts)_
647+
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/preview/end.ts)_
648648

649649
## `sf agent preview send`
650650

@@ -702,7 +702,7 @@ EXAMPLES
702702
$ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
703703
```
704704

705-
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/preview/send.ts)_
705+
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/preview/send.ts)_
706706

707707
## `sf agent preview sessions`
708708

@@ -735,7 +735,7 @@ EXAMPLES
735735
$ sf agent preview sessions
736736
```
737737

738-
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/preview/sessions.ts)_
738+
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/preview/sessions.ts)_
739739

740740
## `sf agent preview start`
741741

@@ -792,7 +792,7 @@ EXAMPLES
792792
$ sf agent preview start --api-name My_Published_Agent
793793
```
794794

795-
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/preview/start.ts)_
795+
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/preview/start.ts)_
796796

797797
## `sf agent publish authoring-bundle`
798798

@@ -841,7 +841,7 @@ EXAMPLES
841841
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --target-org my-dev-org
842842
```
843843

844-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/publish/authoring-bundle.ts)_
844+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/publish/authoring-bundle.ts)_
845845

846846
## `sf agent test create`
847847

@@ -896,7 +896,7 @@ EXAMPLES
896896
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
897897
```
898898

899-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/test/create.ts)_
899+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/test/create.ts)_
900900

901901
## `sf agent test list`
902902

@@ -931,7 +931,7 @@ EXAMPLES
931931
$ sf agent test list --target-org my-org
932932
```
933933

934-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/test/list.ts)_
934+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/test/list.ts)_
935935

936936
## `sf agent test results`
937937

@@ -997,7 +997,7 @@ FLAG DESCRIPTIONS
997997
expression when using custom evaluations.
998998
```
999999

1000-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/test/results.ts)_
1000+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/test/results.ts)_
10011001

10021002
## `sf agent test resume`
10031003

@@ -1070,7 +1070,7 @@ FLAG DESCRIPTIONS
10701070
expression when using custom evaluations.
10711071
```
10721072

1073-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/test/resume.ts)_
1073+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/test/resume.ts)_
10741074

10751075
## `sf agent test run`
10761076

@@ -1144,7 +1144,7 @@ FLAG DESCRIPTIONS
11441144
expression when using custom evaluations.
11451145
```
11461146

1147-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/test/run.ts)_
1147+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/test/run.ts)_
11481148

11491149
## `sf agent validate authoring-bundle`
11501150

@@ -1191,6 +1191,6 @@ EXAMPLES
11911191
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
11921192
```
11931193

1194-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.11/src/commands/agent/validate/authoring-bundle.ts)_
1194+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.31.3/src/commands/agent/validate/authoring-bundle.ts)_
11951195

11961196
<!-- commandsstop -->

command-snapshot.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,25 @@
213213
],
214214
"plugin": "@salesforce/plugin-agent"
215215
},
216+
{
217+
"alias": [],
218+
"command": "agent:test:run-eval",
219+
"flagAliases": [],
220+
"flagChars": ["n", "o", "s", "w"],
221+
"flags": [
222+
"api-name",
223+
"api-version",
224+
"batch-size",
225+
"flags-dir",
226+
"json",
227+
"no-normalize",
228+
"result-format",
229+
"spec",
230+
"target-org",
231+
"wait"
232+
],
233+
"plugin": "@salesforce/plugin-agent"
234+
},
216235
{
217236
"alias": [],
218237
"command": "agent:validate:authoring-bundle",

messages/agent.test.run-eval.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# summary
2+
3+
Run evaluation tests against an Agentforce agent.
4+
5+
# description
6+
7+
Execute rich evaluation tests against an Agentforce agent using the Einstein Evaluation API. Supports both YAML test specs (same format as `sf agent generate test-spec`) and JSON payloads.
8+
9+
When you provide a YAML test spec, the command automatically translates test cases into Evaluation API calls and infers the agent name from the spec's `subjectName` field. This means you can use the same test spec with both `sf agent test run` and `sf agent test run-eval`.
10+
11+
When you provide a JSON payload, it's sent directly to the API 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.
12+
13+
Supports 8+ evaluator types, including topic routing assertions, action invocation checks, string/numeric assertions, semantic similarity scoring, and LLM-based quality ratings.
14+
15+
# flags.spec.summary
16+
17+
Path to test spec file (YAML or JSON). Use `-` for stdin.
18+
19+
# flags.api-name.summary
20+
21+
Agent DeveloperName (also called API name) to resolve agent_id and agent_version_id. Auto-inferred from the YAML spec's subjectName.
22+
23+
# flags.wait.summary
24+
25+
Number of minutes to wait for results.
26+
27+
# flags.result-format.summary
28+
29+
Format of the agent test results.
30+
31+
# flags.batch-size.summary
32+
33+
Number of tests per API request (max 5).
34+
35+
# flags.no-normalize.summary
36+
37+
Disable auto-normalization of field names and shorthand references.
38+
39+
# examples
40+
41+
- Run tests using a YAML test spec on the org with alias "my-org":
42+
43+
<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --target-org my-org
44+
45+
- Run tests using a YAML spec with explicit agent name override; use your default org:
46+
47+
<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --api-name My_Agent --target-org my-org
48+
49+
- Run tests using a JSON payload:
50+
51+
<%= config.bin %> <%= command.id %> --spec tests/eval-payload.json --target-org my-org
52+
53+
- Run tests and output results in JUnit format; useful for continuous integration and deployment (CI/CD):
54+
55+
<%= config.bin %> <%= command.id %> --spec tests/my-agent-testSpec.yaml --target-org my-org --result-format junit
56+
57+
- Pipe JSON payload from stdin:
58+
59+
$ echo '{"tests":[...]}' | <%= config.bin %> <%= command.id %> --spec - --target-org my-org
60+
61+
# info.batchProgress
62+
63+
Running batch %s of %s (%s tests)...
64+
65+
# info.testComplete
66+
67+
Test %s: %s.
68+
69+
# info.summary
70+
71+
Results: %s passed, %s failed, %s scored, %s errors.
72+
73+
# info.yamlDetected
74+
75+
Detected YAML test spec for agent '%s' with %s test case(s). Translating to Evaluation API format.
76+
77+
# error.invalidPayload
78+
79+
Invalid test payload: %s.
80+
81+
# error.apiError
82+
83+
Einstein Eval API error (HTTP %s): %s
84+
85+
# error.agentNotFound
86+
87+
No agent found with DeveloperName (also API name) '%s'. Verify that the agent exists in the target org.
88+
89+
# error.agentVersionNotFound
90+
91+
No published version found for agent '%s'. Make sure the agent has been published at least once.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/plugin-agent",
33
"description": "Commands to interact with Salesforce agents",
4-
"version": "1.30.11",
4+
"version": "1.31.3",
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"enableO11y": true,
@@ -12,14 +12,14 @@
1212
"@inquirer/prompts": "^7.10.1",
1313
"@oclif/core": "^4",
1414
"@oclif/multi-stage-output": "^0.8.29",
15-
"@salesforce/agents": "^0.23.4",
16-
"@salesforce/core": "^8.26.2",
15+
"@salesforce/agents": "^0.24.1",
16+
"@salesforce/core": "^8.26.3",
1717
"@salesforce/kit": "^3.2.4",
1818
"@salesforce/sf-plugins-core": "^12.2.6",
1919
"@salesforce/source-deploy-retrieve": "^12.31.14",
2020
"@salesforce/types": "^1.6.0",
2121
"ansis": "^3.3.2",
22-
"fast-xml-parser": "^5.4.1",
22+
"fast-xml-parser": "^5.4.2",
2323
"glob": "^11.0.3",
2424
"ink": "5.0.1",
2525
"ink-text-input": "^6.0.0",
@@ -28,7 +28,7 @@
2828
"yaml": "^2.8.2"
2929
},
3030
"devDependencies": {
31-
"@oclif/plugin-command-snapshot": "^5.3.10",
31+
"@oclif/plugin-command-snapshot": "^5.3.11",
3232
"@oclif/test": "^4.1.15",
3333
"@salesforce/cli-plugins-testkit": "^5.3.41",
3434
"@salesforce/dev-scripts": "^11.0.4",

0 commit comments

Comments
 (0)