@salesforce/plugin-agent 1.10.0 → 1.11.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 +122 -82
- package/lib/commands/agent/generate/{test-definition.d.ts → test-spec.d.ts} +1 -1
- package/lib/commands/agent/generate/{test-cases.js → test-spec.js} +50 -51
- package/lib/commands/agent/generate/test-spec.js.map +1 -0
- package/lib/commands/agent/test/create.d.ts +23 -0
- package/lib/commands/agent/test/create.js +95 -0
- package/lib/commands/agent/test/create.js.map +1 -0
- package/messages/agent.create-v2.md +17 -11
- package/messages/agent.generate.spec-v2.md +21 -13
- package/messages/agent.generate.test-spec.md +11 -0
- package/messages/agent.test.create.md +27 -0
- package/npm-shrinkwrap.json +210 -207
- package/oclif.lock +44 -17
- package/oclif.manifest.json +118 -69
- package/package.json +8 -4
- package/schemas/agent-test-create.json +19 -0
- package/schemas/agent-test-results.json +14 -17
- package/lib/commands/agent/generate/test-cases.d.ts +0 -16
- package/lib/commands/agent/generate/test-cases.js.map +0 -1
- package/lib/commands/agent/generate/test-definition.js +0 -76
- package/lib/commands/agent/generate/test-definition.js.map +0 -1
- package/messages/agent.generate.test-cases.md +0 -11
- package/messages/agent.generate.test-definition.md +0 -13
package/oclif.lock
CHANGED
|
@@ -1462,18 +1462,19 @@
|
|
|
1462
1462
|
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
|
|
1463
1463
|
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
|
|
1464
1464
|
|
|
1465
|
-
"@salesforce/agents@^0.
|
|
1466
|
-
version "0.
|
|
1467
|
-
resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.
|
|
1468
|
-
integrity sha512-
|
|
1465
|
+
"@salesforce/agents@^0.9.0":
|
|
1466
|
+
version "0.9.0"
|
|
1467
|
+
resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.9.0.tgz#a1292c7b678451d40c71c0b9e2fd657083616ad8"
|
|
1468
|
+
integrity sha512-VOoJejtY+tFTUUZhx958IcuZ936hwpoua1G/1wHsJTWHg+gcpsYigSF6oF2T0SD8ZuTxzHiG6l/fopMJZiyutg==
|
|
1469
1469
|
dependencies:
|
|
1470
1470
|
"@salesforce/core" "^8.8.2"
|
|
1471
1471
|
"@salesforce/kit" "^3.2.3"
|
|
1472
1472
|
"@salesforce/sf-plugins-core" "^12.1.2"
|
|
1473
|
-
"@salesforce/source-deploy-retrieve" "^12.
|
|
1473
|
+
"@salesforce/source-deploy-retrieve" "^12.14.0"
|
|
1474
1474
|
ansis "^3.9.0"
|
|
1475
|
-
fast-xml-parser "^4"
|
|
1475
|
+
fast-xml-parser "^4.5.1"
|
|
1476
1476
|
nock "^13.5.6"
|
|
1477
|
+
yaml "^2.7.0"
|
|
1477
1478
|
|
|
1478
1479
|
"@salesforce/cli-plugins-testkit@^5.3.35":
|
|
1479
1480
|
version "5.3.35"
|
|
@@ -1617,13 +1618,13 @@
|
|
|
1617
1618
|
cli-progress "^3.12.0"
|
|
1618
1619
|
terminal-link "^3.0.0"
|
|
1619
1620
|
|
|
1620
|
-
"@salesforce/source-deploy-retrieve@^12.
|
|
1621
|
-
version "12.
|
|
1622
|
-
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.
|
|
1623
|
-
integrity sha512-
|
|
1621
|
+
"@salesforce/source-deploy-retrieve@^12.14.0":
|
|
1622
|
+
version "12.14.0"
|
|
1623
|
+
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.14.0.tgz#04036f76301071b2188c92f70d77a138bc0d72cf"
|
|
1624
|
+
integrity sha512-3WOQCUY0a8cNYx5/NVtaubLEgxo/vHS/7k4Kw/FEZY3ysALpPCqWk2psJQP56xsp/SDAI3lV0VpMZadrL+ryMw==
|
|
1624
1625
|
dependencies:
|
|
1625
|
-
"@salesforce/core" "^8.8.
|
|
1626
|
-
"@salesforce/kit" "^3.2.
|
|
1626
|
+
"@salesforce/core" "^8.8.2"
|
|
1627
|
+
"@salesforce/kit" "^3.2.3"
|
|
1627
1628
|
"@salesforce/ts-types" "^2.0.12"
|
|
1628
1629
|
fast-levenshtein "^3.0.0"
|
|
1629
1630
|
fast-xml-parser "^4.5.1"
|
|
@@ -1635,6 +1636,7 @@
|
|
|
1635
1636
|
mime "2.6.0"
|
|
1636
1637
|
minimatch "^9.0.5"
|
|
1637
1638
|
proxy-agent "^6.4.0"
|
|
1639
|
+
yaml "^2.6.1"
|
|
1638
1640
|
|
|
1639
1641
|
"@salesforce/ts-types@^2.0.10", "@salesforce/ts-types@^2.0.11", "@salesforce/ts-types@^2.0.12":
|
|
1640
1642
|
version "2.0.12"
|
|
@@ -4247,7 +4249,7 @@ fast-xml-parser@4.4.1:
|
|
|
4247
4249
|
dependencies:
|
|
4248
4250
|
strnum "^1.0.5"
|
|
4249
4251
|
|
|
4250
|
-
fast-xml-parser@^4
|
|
4252
|
+
fast-xml-parser@^4.5.1:
|
|
4251
4253
|
version "4.5.1"
|
|
4252
4254
|
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz#a7e665ff79b7919100a5202f23984b6150f9b31e"
|
|
4253
4255
|
integrity sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==
|
|
@@ -7477,7 +7479,16 @@ stack-utils@^2.0.6:
|
|
|
7477
7479
|
dependencies:
|
|
7478
7480
|
escape-string-regexp "^2.0.0"
|
|
7479
7481
|
|
|
7480
|
-
"string-width-cjs@npm:string-width@^4.2.0"
|
|
7482
|
+
"string-width-cjs@npm:string-width@^4.2.0":
|
|
7483
|
+
version "4.2.3"
|
|
7484
|
+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
|
7485
|
+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
|
7486
|
+
dependencies:
|
|
7487
|
+
emoji-regex "^8.0.0"
|
|
7488
|
+
is-fullwidth-code-point "^3.0.0"
|
|
7489
|
+
strip-ansi "^6.0.1"
|
|
7490
|
+
|
|
7491
|
+
string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
|
7481
7492
|
version "4.2.3"
|
|
7482
7493
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
|
7483
7494
|
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
|
@@ -7572,7 +7583,14 @@ string_decoder@~1.1.1:
|
|
|
7572
7583
|
dependencies:
|
|
7573
7584
|
safe-buffer "~5.1.0"
|
|
7574
7585
|
|
|
7575
|
-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1"
|
|
7586
|
+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
|
|
7587
|
+
version "6.0.1"
|
|
7588
|
+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
|
7589
|
+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
|
7590
|
+
dependencies:
|
|
7591
|
+
ansi-regex "^5.0.1"
|
|
7592
|
+
|
|
7593
|
+
strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
|
7576
7594
|
version "6.0.1"
|
|
7577
7595
|
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
|
7578
7596
|
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
|
@@ -8181,7 +8199,7 @@ workerpool@^6.5.1:
|
|
|
8181
8199
|
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
|
|
8182
8200
|
integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==
|
|
8183
8201
|
|
|
8184
|
-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"
|
|
8202
|
+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
|
|
8185
8203
|
version "7.0.0"
|
|
8186
8204
|
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
|
8187
8205
|
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
|
@@ -8199,6 +8217,15 @@ wrap-ansi@^6.2.0:
|
|
|
8199
8217
|
string-width "^4.1.0"
|
|
8200
8218
|
strip-ansi "^6.0.0"
|
|
8201
8219
|
|
|
8220
|
+
wrap-ansi@^7.0.0:
|
|
8221
|
+
version "7.0.0"
|
|
8222
|
+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
|
8223
|
+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
|
8224
|
+
dependencies:
|
|
8225
|
+
ansi-styles "^4.0.0"
|
|
8226
|
+
string-width "^4.1.0"
|
|
8227
|
+
strip-ansi "^6.0.0"
|
|
8228
|
+
|
|
8202
8229
|
wrap-ansi@^8.1.0:
|
|
8203
8230
|
version "8.1.0"
|
|
8204
8231
|
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
|
|
@@ -8275,7 +8302,7 @@ yallist@^4.0.0:
|
|
|
8275
8302
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
|
8276
8303
|
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
|
8277
8304
|
|
|
8278
|
-
yaml@^2.4.5, yaml@^2.7.0:
|
|
8305
|
+
yaml@^2.4.5, yaml@^2.6.1, yaml@^2.7.0:
|
|
8279
8306
|
version "2.7.0"
|
|
8280
8307
|
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.0.tgz#aef9bb617a64c937a9a748803786ad8d3ffe1e98"
|
|
8281
8308
|
integrity sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==
|
package/oclif.manifest.json
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
"agent:create-v2": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Before you run this command, you must first generate an agent spec file by running the \"agent generate spec\" CLI command, which outputs a YAML file with the agent properties and list of AI-generated topics. Topics define the range of jobs the agent can handle. Then specify the generated agent spec file to this command using the --spec flag, along with the name (label) of the new agent using the --agent-name flag.\n\nWhen this command finishes, your org contains the new agent, which you can then edit in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.\n\nUse the --preview flag to review what the agent looks like without actually saving it in your org. Rather, the command creates a JSON file with all the agent details in the current directory.\n\nTo open the new agent in your org's Agent Builder UI, run this command: \"sf org open agent --name <api-name-of-your-agent>\".",
|
|
7
7
|
"examples": [
|
|
8
|
-
"Create an agent called \"
|
|
8
|
+
"Create an agent called \"ResortManager\" in an org with alias \"my-org\" using the specified agent spec file:\n<%= config.bin %> <%= command.id %> --agent-name ResortManager --spec specs/resortManagerAgent.yaml --target-org my-org",
|
|
9
|
+
"Preview the creation of an agent called \"ResortManager\" and use your default org:\n<%= config.bin %> <%= command.id %> --agent-name ResortManager --spec specs/resortManagerAgent.yaml --preview"
|
|
9
10
|
],
|
|
10
11
|
"flags": {
|
|
11
12
|
"json": {
|
|
@@ -42,21 +43,21 @@
|
|
|
42
43
|
},
|
|
43
44
|
"agent-name": {
|
|
44
45
|
"name": "agent-name",
|
|
45
|
-
"summary": "Name
|
|
46
|
+
"summary": "Name (label) of the new agent.",
|
|
46
47
|
"hasDynamicHelp": false,
|
|
47
48
|
"multiple": false,
|
|
48
49
|
"type": "option"
|
|
49
50
|
},
|
|
50
51
|
"user-id": {
|
|
51
52
|
"name": "user-id",
|
|
52
|
-
"summary": "
|
|
53
|
+
"summary": "ID of a user in your org that is assigned to your agent; determines what your agent can access and do.",
|
|
53
54
|
"hasDynamicHelp": false,
|
|
54
55
|
"multiple": false,
|
|
55
56
|
"type": "option"
|
|
56
57
|
},
|
|
57
58
|
"enrich-logs": {
|
|
58
59
|
"name": "enrich-logs",
|
|
59
|
-
"summary": "Adds agent conversation data to event logs.",
|
|
60
|
+
"summary": "Adds agent conversation data to event logs so you can view all agent session activity in one place.",
|
|
60
61
|
"hasDynamicHelp": false,
|
|
61
62
|
"multiple": false,
|
|
62
63
|
"options": [
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
},
|
|
68
69
|
"tone": {
|
|
69
70
|
"name": "tone",
|
|
70
|
-
"summary": "Conversational style of agent
|
|
71
|
+
"summary": "Conversational style of the agent, such as how it expresses your brand personality in its messages through word choice, punctuation, and sentence structure.",
|
|
71
72
|
"hasDynamicHelp": false,
|
|
72
73
|
"multiple": false,
|
|
73
74
|
"options": [
|
|
@@ -87,14 +88,14 @@
|
|
|
87
88
|
},
|
|
88
89
|
"preview": {
|
|
89
90
|
"name": "preview",
|
|
90
|
-
"summary": "Preview the agent without saving in your org.",
|
|
91
|
+
"summary": "Preview the agent without saving it in your org.",
|
|
91
92
|
"allowNo": false,
|
|
92
93
|
"type": "boolean"
|
|
93
94
|
},
|
|
94
95
|
"agent-api-name": {
|
|
95
96
|
"hidden": true,
|
|
96
97
|
"name": "agent-api-name",
|
|
97
|
-
"summary": "API name
|
|
98
|
+
"summary": "API name of the new agent; if not specified, the API name is derived from the agent name (label); the API name must not exist in the org.",
|
|
98
99
|
"hasDynamicHelp": false,
|
|
99
100
|
"multiple": false,
|
|
100
101
|
"type": "option"
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
"pluginType": "core",
|
|
128
129
|
"state": "beta",
|
|
129
130
|
"strict": true,
|
|
130
|
-
"summary": "Create an agent in your org
|
|
131
|
+
"summary": "Create an agent in your org using a local agent spec file.",
|
|
131
132
|
"enableJsonFlag": true,
|
|
132
133
|
"requiresProject": true,
|
|
133
134
|
"isESM": true,
|
|
@@ -297,10 +298,11 @@
|
|
|
297
298
|
"agent:generate:spec-v2": {
|
|
298
299
|
"aliases": [],
|
|
299
300
|
"args": {},
|
|
300
|
-
"description": "
|
|
301
|
+
"description": "Before you use Salesforce CLI to create an agent in your org, you must first generate an agent spec with this command. An agent spec is a YAML-formatted file that contains information about the agent, such as its role and company description, and then an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.\n\nUse flags, such as --role and --company-description, to provide details about your company and the role that the agent plays in your company. If you prefer, you can also be prompted for the information. Upon command execution, the large language model (LLM) associated with your org uses the information you provided to generate a list of topics for the agent. Because the LLM uses the company and role information to generate the topics, we recommend that you provide accurate and specific details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for example, you can remove topics that don't apply to your agent or change the description of a particular topic.\n\nYou can iterate the spec generation process by using the --spec flag to pass an existing agent spec file to this command, and then using the --role, --company-description, etc, flags to refine your agent properties. Iteratively improving the description of your agent allows the LLM to generate progressively better topics.\n\nYou can also specify a custom prompt template that the agent uses, and ground the prompt template to add context and personalization to the agent's prompts.\n\nWhen your agent spec is ready, you then create the agent in your org by running the \"agent create\" CLI command and specifying the spec with the --spec flag.",
|
|
301
302
|
"examples": [
|
|
302
|
-
"
|
|
303
|
-
"
|
|
303
|
+
"Generate an agent spec in the default location and use flags to specify the agent properties, such as its role and your company details; use your default org:\n<%= config.bin %> <%= command.id %> --type customer --role \"Field customer complaints and manage employee schedules.\" --company-name \"Coral Cloud Resorts\" --company-description \"Provide customers with exceptional destination activities, unforgettable experiences, and reservation services.\"",
|
|
304
|
+
"Generate an agent spec by being prompted for the required agent properties and generate a maxiumum of 5 topics; write the generated file to the \"specs/resortManagerSpec.yaml\" file and use the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --max-topics 5 --output-file specs/resortManagerAgent.yaml --target-org my-org",
|
|
305
|
+
"Specify an existing agent spec file called \"specs/resortManagerAgent.yaml\", and then overwrite it with a new version that contains newly AI-generated topics based on the updated role information passed in with the --role flag:\n<%= config.bin %> <%= command.id %> --spec specs/resortManagerAgent.yaml --output-file specs/resortManagerAgent.yaml --role \"Field customer complaints, manage employee schedules, and ensure all resort operations are running smoothly\" --target-org my-org"
|
|
304
306
|
],
|
|
305
307
|
"flags": {
|
|
306
308
|
"json": {
|
|
@@ -377,14 +379,14 @@
|
|
|
377
379
|
},
|
|
378
380
|
"spec": {
|
|
379
381
|
"name": "spec",
|
|
380
|
-
"summary": "
|
|
382
|
+
"summary": "Agent spec file, in YAML format, to use as input to the command.",
|
|
381
383
|
"hasDynamicHelp": false,
|
|
382
384
|
"multiple": false,
|
|
383
385
|
"type": "option"
|
|
384
386
|
},
|
|
385
387
|
"output-file": {
|
|
386
388
|
"name": "output-file",
|
|
387
|
-
"summary": "Path for the generated agent spec file
|
|
389
|
+
"summary": "Path for the generated YAML agent spec file; can be an absolute or relative path.",
|
|
388
390
|
"default": "config/agentSpec.yaml",
|
|
389
391
|
"hasDynamicHelp": false,
|
|
390
392
|
"multiple": false,
|
|
@@ -392,14 +394,14 @@
|
|
|
392
394
|
},
|
|
393
395
|
"max-topics": {
|
|
394
396
|
"name": "max-topics",
|
|
395
|
-
"summary": "Maximum number of
|
|
397
|
+
"summary": "Maximum number of topics to generate in the agent spec; default is 10.",
|
|
396
398
|
"hasDynamicHelp": false,
|
|
397
399
|
"multiple": false,
|
|
398
400
|
"type": "option"
|
|
399
401
|
},
|
|
400
402
|
"prompt-template": {
|
|
401
403
|
"name": "prompt-template",
|
|
402
|
-
"summary": "
|
|
404
|
+
"summary": "API name of a customized prompt template to use instead of the default prompt template.",
|
|
403
405
|
"hasDynamicHelp": false,
|
|
404
406
|
"multiple": false,
|
|
405
407
|
"type": "option"
|
|
@@ -409,7 +411,7 @@
|
|
|
409
411
|
"prompt-template"
|
|
410
412
|
],
|
|
411
413
|
"name": "grounding-context",
|
|
412
|
-
"summary": "Context information to
|
|
414
|
+
"summary": "Context information and personalization that's added to your prompts when using a custom prompt template.",
|
|
413
415
|
"hasDynamicHelp": false,
|
|
414
416
|
"multiple": false,
|
|
415
417
|
"type": "option"
|
|
@@ -423,7 +425,7 @@
|
|
|
423
425
|
"pluginType": "core",
|
|
424
426
|
"state": "beta",
|
|
425
427
|
"strict": true,
|
|
426
|
-
"summary": "Generate an agent spec, which is
|
|
428
|
+
"summary": "Generate an agent spec, which is a YAML file that captures what an agent can do.",
|
|
427
429
|
"enableJsonFlag": true,
|
|
428
430
|
"requiresProject": true,
|
|
429
431
|
"isESM": true,
|
|
@@ -573,10 +575,10 @@
|
|
|
573
575
|
"spec:generate:agent"
|
|
574
576
|
]
|
|
575
577
|
},
|
|
576
|
-
"agent:generate:test-
|
|
578
|
+
"agent:generate:test-spec": {
|
|
577
579
|
"aliases": [],
|
|
578
580
|
"args": {},
|
|
579
|
-
"description": "
|
|
581
|
+
"description": "This command will prompt you for the necessary information to create a new spec file (in yaml format). You can then create a new AI evaluation using \"sf agent test create --spec <spec-file>\".",
|
|
580
582
|
"examples": [
|
|
581
583
|
"<%= config.bin %> <%= command.id %>"
|
|
582
584
|
],
|
|
@@ -592,13 +594,13 @@
|
|
|
592
594
|
},
|
|
593
595
|
"hasDynamicHelp": false,
|
|
594
596
|
"hiddenAliases": [],
|
|
595
|
-
"id": "agent:generate:test-
|
|
597
|
+
"id": "agent:generate:test-spec",
|
|
596
598
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
597
599
|
"pluginName": "@salesforce/plugin-agent",
|
|
598
600
|
"pluginType": "core",
|
|
599
601
|
"state": "beta",
|
|
600
602
|
"strict": true,
|
|
601
|
-
"summary": "Interactively generate a
|
|
603
|
+
"summary": "Interactively generate a specification file for a AI evaluation test.",
|
|
602
604
|
"enableJsonFlag": false,
|
|
603
605
|
"isESM": true,
|
|
604
606
|
"relativePath": [
|
|
@@ -606,26 +608,34 @@
|
|
|
606
608
|
"commands",
|
|
607
609
|
"agent",
|
|
608
610
|
"generate",
|
|
609
|
-
"test-
|
|
611
|
+
"test-spec.js"
|
|
610
612
|
],
|
|
611
613
|
"aliasPermutations": [],
|
|
612
614
|
"permutations": [
|
|
613
|
-
"agent:generate:test-
|
|
614
|
-
"generate:agent:test-
|
|
615
|
-
"generate:test-
|
|
616
|
-
"agent:test-
|
|
617
|
-
"test-
|
|
618
|
-
"test-
|
|
615
|
+
"agent:generate:test-spec",
|
|
616
|
+
"generate:agent:test-spec",
|
|
617
|
+
"generate:test-spec:agent",
|
|
618
|
+
"agent:test-spec:generate",
|
|
619
|
+
"test-spec:agent:generate",
|
|
620
|
+
"test-spec:generate:agent"
|
|
619
621
|
]
|
|
620
622
|
},
|
|
621
|
-
"agent:
|
|
623
|
+
"agent:test:cancel": {
|
|
622
624
|
"aliases": [],
|
|
623
625
|
"args": {},
|
|
624
|
-
"description": "This command
|
|
626
|
+
"description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.",
|
|
625
627
|
"examples": [
|
|
626
|
-
"<%= config.bin %> <%= command.id %>"
|
|
628
|
+
"Cancel an agent test currently running in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
|
|
629
|
+
"Cancel the most recently run agent test in the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ --target-org my-org"
|
|
627
630
|
],
|
|
628
631
|
"flags": {
|
|
632
|
+
"json": {
|
|
633
|
+
"description": "Format output as json.",
|
|
634
|
+
"helpGroup": "GLOBAL",
|
|
635
|
+
"name": "json",
|
|
636
|
+
"allowNo": false,
|
|
637
|
+
"type": "boolean"
|
|
638
|
+
},
|
|
629
639
|
"flags-dir": {
|
|
630
640
|
"helpGroup": "GLOBAL",
|
|
631
641
|
"name": "flags-dir",
|
|
@@ -633,43 +643,74 @@
|
|
|
633
643
|
"hasDynamicHelp": false,
|
|
634
644
|
"multiple": false,
|
|
635
645
|
"type": "option"
|
|
646
|
+
},
|
|
647
|
+
"target-org": {
|
|
648
|
+
"char": "o",
|
|
649
|
+
"name": "target-org",
|
|
650
|
+
"noCacheDefault": true,
|
|
651
|
+
"required": true,
|
|
652
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
653
|
+
"hasDynamicHelp": true,
|
|
654
|
+
"multiple": false,
|
|
655
|
+
"type": "option"
|
|
656
|
+
},
|
|
657
|
+
"api-version": {
|
|
658
|
+
"description": "Override the api version used for api requests made by this command",
|
|
659
|
+
"name": "api-version",
|
|
660
|
+
"hasDynamicHelp": false,
|
|
661
|
+
"multiple": false,
|
|
662
|
+
"type": "option"
|
|
663
|
+
},
|
|
664
|
+
"job-id": {
|
|
665
|
+
"char": "i",
|
|
666
|
+
"name": "job-id",
|
|
667
|
+
"summary": "Job ID of the running agent test that you want to cancel.",
|
|
668
|
+
"hasDynamicHelp": false,
|
|
669
|
+
"multiple": false,
|
|
670
|
+
"type": "option"
|
|
671
|
+
},
|
|
672
|
+
"use-most-recent": {
|
|
673
|
+
"char": "r",
|
|
674
|
+
"name": "use-most-recent",
|
|
675
|
+
"summary": "Use the job ID of the most recently-run agent test.",
|
|
676
|
+
"allowNo": false,
|
|
677
|
+
"type": "boolean"
|
|
636
678
|
}
|
|
637
679
|
},
|
|
638
|
-
"hasDynamicHelp":
|
|
680
|
+
"hasDynamicHelp": true,
|
|
639
681
|
"hiddenAliases": [],
|
|
640
|
-
"id": "agent:
|
|
682
|
+
"id": "agent:test:cancel",
|
|
641
683
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
642
684
|
"pluginName": "@salesforce/plugin-agent",
|
|
643
685
|
"pluginType": "core",
|
|
644
686
|
"state": "beta",
|
|
645
687
|
"strict": true,
|
|
646
|
-
"summary": "
|
|
647
|
-
"enableJsonFlag":
|
|
688
|
+
"summary": "Cancel an agent test that's currently running in your org.",
|
|
689
|
+
"enableJsonFlag": true,
|
|
648
690
|
"isESM": true,
|
|
649
691
|
"relativePath": [
|
|
650
692
|
"lib",
|
|
651
693
|
"commands",
|
|
652
694
|
"agent",
|
|
653
|
-
"
|
|
654
|
-
"
|
|
695
|
+
"test",
|
|
696
|
+
"cancel.js"
|
|
655
697
|
],
|
|
656
698
|
"aliasPermutations": [],
|
|
657
699
|
"permutations": [
|
|
658
|
-
"agent:
|
|
659
|
-
"
|
|
660
|
-
"
|
|
661
|
-
"agent:test
|
|
662
|
-
"
|
|
663
|
-
"test
|
|
700
|
+
"agent:test:cancel",
|
|
701
|
+
"test:agent:cancel",
|
|
702
|
+
"test:cancel:agent",
|
|
703
|
+
"agent:cancel:test",
|
|
704
|
+
"cancel:agent:test",
|
|
705
|
+
"cancel:test:agent"
|
|
664
706
|
]
|
|
665
707
|
},
|
|
666
|
-
"agent:test:
|
|
708
|
+
"agent:test:create": {
|
|
667
709
|
"aliases": [],
|
|
668
710
|
"args": {},
|
|
669
|
-
"description": "
|
|
711
|
+
"description": "More information about a command. Don't repeat the summary.",
|
|
670
712
|
"examples": [
|
|
671
|
-
"
|
|
672
|
-
"Cancel the most recently run agent test in the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ --target-org my-org"
|
|
713
|
+
"<%= config.bin %> <%= command.id %>"
|
|
673
714
|
],
|
|
674
715
|
"flags": {
|
|
675
716
|
"json": {
|
|
@@ -687,6 +728,16 @@
|
|
|
687
728
|
"multiple": false,
|
|
688
729
|
"type": "option"
|
|
689
730
|
},
|
|
731
|
+
"spec": {
|
|
732
|
+
"char": "s",
|
|
733
|
+
"description": "More information about a flag. Don't repeat the summary.",
|
|
734
|
+
"name": "spec",
|
|
735
|
+
"required": true,
|
|
736
|
+
"summary": "Description of a flag.",
|
|
737
|
+
"hasDynamicHelp": false,
|
|
738
|
+
"multiple": false,
|
|
739
|
+
"type": "option"
|
|
740
|
+
},
|
|
690
741
|
"target-org": {
|
|
691
742
|
"char": "o",
|
|
692
743
|
"name": "target-org",
|
|
@@ -704,31 +755,29 @@
|
|
|
704
755
|
"multiple": false,
|
|
705
756
|
"type": "option"
|
|
706
757
|
},
|
|
707
|
-
"
|
|
708
|
-
"
|
|
709
|
-
"
|
|
710
|
-
"
|
|
711
|
-
"
|
|
712
|
-
"multiple": false,
|
|
713
|
-
"type": "option"
|
|
758
|
+
"preview": {
|
|
759
|
+
"name": "preview",
|
|
760
|
+
"summary": "Preview the test metadata without deploying to your org.",
|
|
761
|
+
"allowNo": false,
|
|
762
|
+
"type": "boolean"
|
|
714
763
|
},
|
|
715
|
-
"
|
|
716
|
-
"char": "
|
|
717
|
-
"name": "
|
|
718
|
-
"summary": "
|
|
764
|
+
"no-prompt": {
|
|
765
|
+
"char": "p",
|
|
766
|
+
"name": "no-prompt",
|
|
767
|
+
"summary": "Don't prompt for confirmation when overwriting an existing test.",
|
|
719
768
|
"allowNo": false,
|
|
720
769
|
"type": "boolean"
|
|
721
770
|
}
|
|
722
771
|
},
|
|
723
772
|
"hasDynamicHelp": true,
|
|
724
773
|
"hiddenAliases": [],
|
|
725
|
-
"id": "agent:test:
|
|
774
|
+
"id": "agent:test:create",
|
|
726
775
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
727
776
|
"pluginName": "@salesforce/plugin-agent",
|
|
728
777
|
"pluginType": "core",
|
|
729
778
|
"state": "beta",
|
|
730
779
|
"strict": true,
|
|
731
|
-
"summary": "
|
|
780
|
+
"summary": "Summary of a command.",
|
|
732
781
|
"enableJsonFlag": true,
|
|
733
782
|
"isESM": true,
|
|
734
783
|
"relativePath": [
|
|
@@ -736,16 +785,16 @@
|
|
|
736
785
|
"commands",
|
|
737
786
|
"agent",
|
|
738
787
|
"test",
|
|
739
|
-
"
|
|
788
|
+
"create.js"
|
|
740
789
|
],
|
|
741
790
|
"aliasPermutations": [],
|
|
742
791
|
"permutations": [
|
|
743
|
-
"agent:test:
|
|
744
|
-
"test:agent:
|
|
745
|
-
"test:
|
|
746
|
-
"agent:
|
|
747
|
-
"
|
|
748
|
-
"
|
|
792
|
+
"agent:test:create",
|
|
793
|
+
"test:agent:create",
|
|
794
|
+
"test:create:agent",
|
|
795
|
+
"agent:create:test",
|
|
796
|
+
"create:agent:test",
|
|
797
|
+
"create:test:agent"
|
|
749
798
|
]
|
|
750
799
|
},
|
|
751
800
|
"agent:test:list": {
|
|
@@ -1149,5 +1198,5 @@
|
|
|
1149
1198
|
]
|
|
1150
1199
|
}
|
|
1151
1200
|
},
|
|
1152
|
-
"version": "1.
|
|
1201
|
+
"version": "1.11.0"
|
|
1153
1202
|
}
|
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.
|
|
4
|
+
"version": "1.11.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
"@inquirer/prompts": "^7.2.0",
|
|
10
10
|
"@oclif/core": "^4",
|
|
11
11
|
"@oclif/multi-stage-output": "^0.7.12",
|
|
12
|
-
"@salesforce/agents": "^0.
|
|
12
|
+
"@salesforce/agents": "^0.9.0",
|
|
13
13
|
"@salesforce/core": "^8.8.0",
|
|
14
14
|
"@salesforce/kit": "^3.2.1",
|
|
15
15
|
"@salesforce/sf-plugins-core": "^12.1.0",
|
|
16
|
+
"@salesforce/source-deploy-retrieve": "^12.14.0",
|
|
16
17
|
"ansis": "^3.3.2",
|
|
17
18
|
"fast-xml-parser": "^4.5.1",
|
|
18
19
|
"ink": "^5.0.1",
|
|
@@ -77,6 +78,9 @@
|
|
|
77
78
|
},
|
|
78
79
|
"generate": {
|
|
79
80
|
"external": true
|
|
81
|
+
},
|
|
82
|
+
"create": {
|
|
83
|
+
"external": true
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
}
|
|
@@ -222,7 +226,7 @@
|
|
|
222
226
|
"exports": "./lib/index.js",
|
|
223
227
|
"type": "module",
|
|
224
228
|
"sfdx": {
|
|
225
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
226
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
229
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.11.0.crt",
|
|
230
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.11.0.sig"
|
|
227
231
|
}
|
|
228
232
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/AgentTestCreateResult",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AgentTestCreateResult": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"path": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"contents": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": ["path", "contents"],
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|