@salesforce/plugin-agent 1.7.3-dev.0 → 1.7.3-dev.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 CHANGED
@@ -62,9 +62,9 @@ sf plugins
62
62
  <!-- commands -->
63
63
 
64
64
  - [`sf agent create`](#sf-agent-create)
65
- - [`sf agent generate definition`](#sf-agent-generate-definition)
66
65
  - [`sf agent generate spec`](#sf-agent-generate-spec)
67
- - [`sf agent generate testset`](#sf-agent-generate-testset)
66
+ - [`sf agent generate test-definition`](#sf-agent-generate-test-definition)
67
+ - [`sf agent generate test-set`](#sf-agent-generate-test-set)
68
68
  - [`sf agent preview`](#sf-agent-preview)
69
69
  - [`sf agent test cancel`](#sf-agent-test-cancel)
70
70
  - [`sf agent test results`](#sf-agent-test-results)
@@ -111,32 +111,7 @@ EXAMPLES
111
111
  $ sf agent create --name CustomerSupportAgent --spec ./config/agentSpec.json --target-org my-org
112
112
  ```
113
113
 
114
- _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/create.ts)_
115
-
116
- ## `sf agent generate definition`
117
-
118
- Interactively generate a new AiEvaluationDefinition.
119
-
120
- ```
121
- USAGE
122
- $ sf agent generate definition [--flags-dir <value>]
123
-
124
- GLOBAL FLAGS
125
- --flags-dir=<value> Import flag values from a directory.
126
-
127
- DESCRIPTION
128
- Interactively generate a new AiEvaluationDefinition.
129
-
130
- This command will prompt you for the necessary information to create a new AiEvaluationDefinition. The definition will
131
- be saved to the `aiEvaluationDefinitions` directory in the project.
132
-
133
- You must have the `Bots` and `AiEvaluationTestSets` metadata types present in your project to use this command.
134
-
135
- EXAMPLES
136
- $ sf agent generate definition
137
- ```
138
-
139
- _See code: [src/commands/agent/generate/definition.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/generate/definition.ts)_
114
+ _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/create.ts)_
140
115
 
141
116
  ## `sf agent generate spec`
142
117
 
@@ -197,30 +172,55 @@ EXAMPLES
197
172
  $ sf agent generate spec --output-dir specs --target-org my-org
198
173
  ```
199
174
 
200
- _See code: [src/commands/agent/generate/spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/generate/spec.ts)_
175
+ _See code: [src/commands/agent/generate/spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/generate/spec.ts)_
176
+
177
+ ## `sf agent generate test-definition`
178
+
179
+ Interactively generate a new AI Evaluation Test Definition.
180
+
181
+ ```
182
+ USAGE
183
+ $ sf agent generate test-definition [--flags-dir <value>]
184
+
185
+ GLOBAL FLAGS
186
+ --flags-dir=<value> Import flag values from a directory.
187
+
188
+ DESCRIPTION
189
+ Interactively generate a new AI Evaluation Test Definition.
190
+
191
+ This command will prompt you for the necessary information to create a new AiEvaluationDefinition. The definition will
192
+ be saved to the `aiEvaluationDefinitions` directory in the project.
193
+
194
+ You must have the `Bots` and `AiEvaluationTestSets` metadata types present in your project to use this command.
195
+
196
+ EXAMPLES
197
+ $ sf agent generate test-definition
198
+ ```
199
+
200
+ _See code: [src/commands/agent/generate/test-definition.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/generate/test-definition.ts)_
201
201
 
202
- ## `sf agent generate testset`
202
+ ## `sf agent generate test-set`
203
203
 
204
- Interactively generate an AiEvaluationTestSet.
204
+ Interactively generate a new Set of AI Evaluation test cases.
205
205
 
206
206
  ```
207
207
  USAGE
208
- $ sf agent generate testset [--flags-dir <value>]
208
+ $ sf agent generate test-set [--flags-dir <value>]
209
209
 
210
210
  GLOBAL FLAGS
211
211
  --flags-dir=<value> Import flag values from a directory.
212
212
 
213
213
  DESCRIPTION
214
- Interactively generate an AiEvaluationTestSet.
214
+ Interactively generate a new Set of AI Evaluation test cases.
215
215
 
216
216
  Answer the prompts to generate an AiEvaluationTestSet that will be written to a file. You can then run "sf agent
217
217
  generate definition" to generate the AiEvaluationDefinition that can be used to evaluate the test set.
218
218
 
219
219
  EXAMPLES
220
- $ sf agent generate testset
220
+ $ sf agent generate test-set
221
221
  ```
222
222
 
223
- _See code: [src/commands/agent/generate/testset.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/generate/testset.ts)_
223
+ _See code: [src/commands/agent/generate/test-set.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/generate/test-set.ts)_
224
224
 
225
225
  ## `sf agent preview`
226
226
 
@@ -255,7 +255,7 @@ FLAG DESCRIPTIONS
255
255
  the API name of the agent? (TBD based on agents library)
256
256
  ```
257
257
 
258
- _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/preview.ts)_
258
+ _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/preview.ts)_
259
259
 
260
260
  ## `sf agent test cancel`
261
261
 
@@ -292,7 +292,7 @@ EXAMPLES
292
292
  $ sf agent test cancel --job-id 4KBfake0000003F4AQ --target-org my-org
293
293
  ```
294
294
 
295
- _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/test/cancel.ts)_
295
+ _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/test/cancel.ts)_
296
296
 
297
297
  ## `sf agent test results`
298
298
 
@@ -301,10 +301,10 @@ Get the results of a completed agent test run.
301
301
  ```
302
302
  USAGE
303
303
  $ sf agent test results -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--result-format
304
- json|human|junit|tap] [-f <value>]
304
+ json|human|junit|tap] [-d <value>]
305
305
 
306
306
  FLAGS
307
- -f, --output-dir=<value> Directory to write the agent test results into.
307
+ -d, --output-dir=<value> Directory to write the agent test results into.
308
308
  -i, --job-id=<value> (required) Job ID of the completed agent test run.
309
309
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
310
310
  configuration variable is already set.
@@ -342,13 +342,13 @@ EXAMPLES
342
342
  $ sf agent test results --use-most-recent --output-dir ./test-results --result-format json
343
343
 
344
344
  FLAG DESCRIPTIONS
345
- -f, --output-dir=<value> Directory to write the agent test results into.
345
+ -d, --output-dir=<value> Directory to write the agent test results into.
346
346
 
347
347
  If the agent test run completes, write the results to the specified directory. If the test is still running, the
348
348
  test results aren't written.
349
349
  ```
350
350
 
351
- _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/test/results.ts)_
351
+ _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/test/results.ts)_
352
352
 
353
353
  ## `sf agent test resume`
354
354
 
@@ -357,10 +357,10 @@ Resume an agent test that you previously started in your org so you can view the
357
357
  ```
358
358
  USAGE
359
359
  $ sf agent test resume -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-i <value>] [-r] [-w
360
- <value>] [--result-format json|human|junit|tap] [-f <value>]
360
+ <value>] [--result-format json|human|junit|tap] [-d <value>]
361
361
 
362
362
  FLAGS
363
- -f, --output-dir=<value> Directory to write the agent test results into.
363
+ -d, --output-dir=<value> Directory to write the agent test results into.
364
364
  -i, --job-id=<value> Job ID of the original agent test run.
365
365
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
366
366
  configuration variable is already set.
@@ -405,13 +405,13 @@ EXAMPLES
405
405
  $ sf agent test resume --use-most-recent --output-dir ./test-results --result-format json
406
406
 
407
407
  FLAG DESCRIPTIONS
408
- -f, --output-dir=<value> Directory to write the agent test results into.
408
+ -d, --output-dir=<value> Directory to write the agent test results into.
409
409
 
410
410
  If the agent test run completes, write the results to the specified directory. If the test is still running, the
411
411
  test results aren't written.
412
412
  ```
413
413
 
414
- _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/test/resume.ts)_
414
+ _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/test/resume.ts)_
415
415
 
416
416
  ## `sf agent test run`
417
417
 
@@ -420,10 +420,10 @@ Start an agent test in your org.
420
420
  ```
421
421
  USAGE
422
422
  $ sf agent test run -o <value> -n <value> [--json] [--flags-dir <value>] [--api-version <value>] [-w <value>]
423
- [--result-format json|human|junit|tap] [-f <value>]
423
+ [--result-format json|human|junit|tap] [-d <value>]
424
424
 
425
425
  FLAGS
426
- -f, --output-dir=<value> Directory to write the agent test results into.
426
+ -d, --output-dir=<value> Directory to write the agent test results into.
427
427
  -n, --name=<value> (required) Name of the agent test to start.
428
428
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
429
429
  configuration variable is already set.
@@ -468,12 +468,12 @@ EXAMPLES
468
468
  $ sf agent test run --name MyAgentTest --wait 10 --output-dir ./test-results --result-format json
469
469
 
470
470
  FLAG DESCRIPTIONS
471
- -f, --output-dir=<value> Directory to write the agent test results into.
471
+ -d, --output-dir=<value> Directory to write the agent test results into.
472
472
 
473
473
  If the agent test run completes, write the results to the specified directory. If the test is still running, the
474
474
  test results aren't written.
475
475
  ```
476
476
 
477
- _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.0/src/commands/agent/test/run.ts)_
477
+ _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.7.3-dev.1/src/commands/agent/test/run.ts)_
478
478
 
479
479
  <!-- commandsstop -->
@@ -1,5 +1,5 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
- export default class AgentGenerateDefinition extends SfCommand<void> {
2
+ export default class AgentGenerateTestDefinition extends SfCommand<void> {
3
3
  static readonly summary: string;
4
4
  static readonly description: string;
5
5
  static readonly examples: string[];
@@ -12,8 +12,8 @@ import { input, select } from '@inquirer/prompts';
12
12
  import { theme } from '../../../inquirer-theme.js';
13
13
  import { readDir } from '../../../read-dir.js';
14
14
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
15
- const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.definition');
16
- export default class AgentGenerateDefinition extends SfCommand {
15
+ const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.test-definition');
16
+ export default class AgentGenerateTestDefinition extends SfCommand {
17
17
  static summary = messages.getMessage('summary');
18
18
  static description = messages.getMessage('description');
19
19
  static examples = messages.getMessages('examples');
@@ -73,4 +73,4 @@ export default class AgentGenerateDefinition extends SfCommand {
73
73
  await writeFile(definitionPath, cleanedXml);
74
74
  }
75
75
  }
76
- //# sourceMappingURL=definition.js.map
76
+ //# sourceMappingURL=test-definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-definition.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/test-definition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA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c,EAAE,UAAU,CAAC,CAAC;IAC9C,CAAC"}
@@ -1,6 +1,4 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
- export declare const FORTY_CHAR_API_NAME_REGEX: RegExp;
3
- export declare const EIGHTY_CHAR_API_NAME_REGEX: RegExp;
4
2
  export type TestSetInputs = {
5
3
  utterance: string;
6
4
  actionSequenceExpectedValue: string[];
@@ -5,40 +5,72 @@
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
7
  import { dirname, join } from 'node:path';
8
- import { mkdir, writeFile } from 'node:fs/promises';
8
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
9
9
  import { SfCommand } from '@salesforce/sf-plugins-core';
10
10
  import { Messages } from '@salesforce/core';
11
11
  import { select, input, confirm, checkbox } from '@inquirer/prompts';
12
+ import { XMLParser } from 'fast-xml-parser';
12
13
  import { theme } from '../../../inquirer-theme.js';
13
14
  import { readDir } from '../../../read-dir.js';
14
15
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
15
- const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.testset');
16
- export const FORTY_CHAR_API_NAME_REGEX = /^(?=.{1,57}$)[a-zA-Z]([a-zA-Z0-9]|_(?!_)){0,14}(__[a-zA-Z]([a-zA-Z0-9]|_(?!_)){0,39})?$/;
17
- export const EIGHTY_CHAR_API_NAME_REGEX = /^(?=.{1,97}$)[a-zA-Z]([a-zA-Z0-9]|_(?!_)){0,14}(__[a-zA-Z]([a-zA-Z0-9]|_(?!_)){0,79})?$/;
18
- async function promptForTestCase({ topics, actions }) {
16
+ const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.test-set');
17
+ async function promptForTestCase(genAiPlugins) {
19
18
  const utterance = await input({
20
19
  message: 'Utterance',
21
20
  validate: (d) => d.length > 0 || 'utterance cannot be empty',
22
21
  theme,
23
22
  });
24
23
  const customKey = '<OTHER>';
25
- let topicSequenceExpectedValue = await select({
24
+ const topics = Object.keys(genAiPlugins);
25
+ const askForOtherActions = async () => (await input({
26
+ message: 'Expected action(s)',
27
+ validate: (d) => {
28
+ if (!d.length) {
29
+ return 'expected value cannot be empty';
30
+ }
31
+ return true;
32
+ },
33
+ theme,
34
+ }))
35
+ .split(',')
36
+ .map((a) => a.trim());
37
+ const askForBotRating = async () => input({
38
+ message: 'Expected response',
39
+ validate: (d) => {
40
+ if (!d.length) {
41
+ return 'expected value cannot be empty';
42
+ }
43
+ return true;
44
+ },
45
+ theme,
46
+ });
47
+ const topicSequenceExpectedValue = await select({
26
48
  message: 'Expected topic',
27
49
  choices: [...topics, customKey],
28
50
  theme,
29
51
  });
30
52
  if (topicSequenceExpectedValue === customKey) {
31
- topicSequenceExpectedValue = await input({
32
- message: 'Expected topic',
33
- validate: (d) => {
34
- if (!d.length) {
35
- return 'expected value cannot be empty';
36
- }
37
- return true;
38
- },
39
- theme,
40
- });
53
+ return {
54
+ utterance,
55
+ topicSequenceExpectedValue: await input({
56
+ message: 'Expected topic',
57
+ validate: (d) => {
58
+ if (!d.length) {
59
+ return 'expected value cannot be empty';
60
+ }
61
+ return true;
62
+ },
63
+ theme,
64
+ }),
65
+ // If the user selects OTHER for the topic, then we don't have a genAiPlugin to get actions from so we ask for them for custom input
66
+ actionSequenceExpectedValue: await askForOtherActions(),
67
+ botRatingExpectedValue: await askForBotRating(),
68
+ };
41
69
  }
70
+ const genAiPluginXml = await readFile(genAiPlugins[topicSequenceExpectedValue], 'utf-8');
71
+ const parser = new XMLParser();
72
+ const parsed = parser.parse(genAiPluginXml);
73
+ const actions = parsed.GenAiPlugin.genAiFunctions.map((f) => f.functionName);
42
74
  let actionSequenceExpectedValue = await checkbox({
43
75
  message: 'Expected action(s)',
44
76
  choices: [...actions, customKey],
@@ -46,30 +78,10 @@ async function promptForTestCase({ topics, actions }) {
46
78
  required: true,
47
79
  });
48
80
  if (actionSequenceExpectedValue.includes(customKey)) {
49
- const additional = (await input({
50
- message: 'Expected action(s)',
51
- validate: (d) => {
52
- if (!d.length) {
53
- return 'expected value cannot be empty';
54
- }
55
- return true;
56
- },
57
- theme,
58
- }))
59
- .split(',')
60
- .map((a) => a.trim());
81
+ const additional = await askForOtherActions();
61
82
  actionSequenceExpectedValue = [...actionSequenceExpectedValue.filter((a) => a !== customKey), ...additional];
62
83
  }
63
- const botRatingExpectedValue = await input({
64
- message: 'Expected response',
65
- validate: (d) => {
66
- if (!d.length) {
67
- return 'expected value cannot be empty';
68
- }
69
- return true;
70
- },
71
- theme,
72
- });
84
+ const botRatingExpectedValue = await askForBotRating();
73
85
  return {
74
86
  utterance,
75
87
  actionSequenceExpectedValue,
@@ -113,25 +125,27 @@ export default class AgentGenerateTestset extends SfCommand {
113
125
  static state = 'beta';
114
126
  async run() {
115
127
  const testSetName = await input({
116
- message: 'What is the name of the test set',
117
- validate(d) {
118
- // check against FORTY_CHAR_API_NAME_REGEX
119
- if (!FORTY_CHAR_API_NAME_REGEX.test(d)) {
120
- return 'The non-namespaced portion an API name must begin with a letter, contain only letters, numbers, and underscores, not contain consecutive underscores, and not end with an underscore.';
121
- }
122
- return true;
123
- },
128
+ message: 'What is the name of this set of test cases',
129
+ // TODO: add back validation once we refine the regex
130
+ // validate(d: string): boolean | string {
131
+ // // check against FORTY_CHAR_API_NAME_REGEX
132
+ // if (!FORTY_CHAR_API_NAME_REGEX.test(d)) {
133
+ // return 'The non-namespaced portion an API name must begin with a letter, contain only letters, numbers, and underscores, not contain consecutive underscores, and not end with an underscore.';
134
+ // }
135
+ // return true;
136
+ // },
124
137
  });
125
138
  const genAiPluginDir = join('force-app', 'main', 'default', 'genAiPlugins');
126
- const genAiPlugins = (await readDir(genAiPluginDir)).map((genAiPlugin) => genAiPlugin.replace('.genAiPlugin-meta.xml', ''));
127
- const genAiFunctionsDir = join('force-app', 'main', 'default', 'genAiFunctions');
128
- const genAiFunctions = (await readDir(genAiFunctionsDir)).map((genAiFunction) => genAiFunction.replace('.genAiFunction-meta.xml', ''));
139
+ const genAiPlugins = Object.fromEntries((await readDir(genAiPluginDir)).map((genAiPlugin) => [
140
+ genAiPlugin.replace('.genAiPlugin-meta.xml', ''),
141
+ join(genAiPluginDir, genAiPlugin),
142
+ ]));
129
143
  const testCases = [];
130
144
  do {
131
145
  this.log();
132
146
  this.styledHeader(`Adding test case #${testCases.length + 1}`);
133
147
  // eslint-disable-next-line no-await-in-loop
134
- testCases.push(await promptForTestCase({ topics: genAiPlugins, actions: genAiFunctions }));
148
+ testCases.push(await promptForTestCase(genAiPlugins));
135
149
  } while ( // eslint-disable-next-line no-await-in-loop
136
150
  await confirm({
137
151
  message: 'Would you like to add another test case',
@@ -144,4 +158,4 @@ export default class AgentGenerateTestset extends SfCommand {
144
158
  await writeFile(testSetPath, constructTestSetXML(testCases));
145
159
  }
146
160
  }
147
- //# sourceMappingURL=testset.js.map
161
+ //# sourceMappingURL=test-set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-set.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/test-set.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;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AAC;IAC/D,CAAC"}
package/lib/flags.js CHANGED
@@ -14,7 +14,7 @@ export const resultFormatFlag = Flags.option({
14
14
  summary: messages.getMessage('flags.result-format.summary'),
15
15
  });
16
16
  export const testOutputDirFlag = Flags.custom({
17
- char: 'f',
17
+ char: 'd',
18
18
  description: messages.getMessage('flags.output-dir.description'),
19
19
  summary: messages.getMessage('flags.output-dir.summary'),
20
20
  });
@@ -21,30 +21,46 @@ export async function handleTestResults({ id, format, results, jsonEnabled, outp
21
21
  const ux = new Ux({ jsonEnabled });
22
22
  if (format === 'human') {
23
23
  const formatted = await humanFormat(results);
24
- ux.log(formatted);
25
24
  if (outputDir) {
26
- await writeFileToDir(outputDir, `test-result-${id}.txt`, formatted);
25
+ const file = `test-result-${id}.txt`;
26
+ await writeFileToDir(outputDir, file, formatted);
27
+ ux.log(`Created human-readable file at ${join(outputDir, file)}`);
28
+ }
29
+ else {
30
+ ux.log(formatted);
27
31
  }
28
32
  }
29
33
  if (format === 'json') {
30
34
  const formatted = await jsonFormat(results);
31
- ux.log(formatted);
32
35
  if (outputDir) {
33
- await writeFileToDir(outputDir, `test-result-${id}.json`, formatted);
36
+ const file = `test-result-${id}.json`;
37
+ await writeFileToDir(outputDir, file, formatted);
38
+ ux.log(`Created JSON file at ${join(outputDir, file)}`);
39
+ }
40
+ else {
41
+ ux.log(formatted);
34
42
  }
35
43
  }
36
44
  if (format === 'junit') {
37
45
  const formatted = await junitFormat(results);
38
- ux.log(formatted);
39
46
  if (outputDir) {
40
- await writeFileToDir(outputDir, `test-result-${id}.xml`, formatted);
47
+ const file = `test-result-${id}.xml`;
48
+ await writeFileToDir(outputDir, file, formatted);
49
+ ux.log(`Created JUnit file at ${join(outputDir, file)}`);
50
+ }
51
+ else {
52
+ ux.log(formatted);
41
53
  }
42
54
  }
43
55
  if (format === 'tap') {
44
56
  const formatted = await tapFormat(results);
45
- ux.log(formatted);
46
57
  if (outputDir) {
47
- await writeFileToDir(outputDir, `test-result-${id}.txt`, formatted);
58
+ const file = `test-result-${id}.txt`;
59
+ await writeFileToDir(outputDir, file, formatted);
60
+ ux.log(`Created TAP file at ${join(outputDir, file)}`);
61
+ }
62
+ else {
63
+ ux.log(formatted);
48
64
  }
49
65
  }
50
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"handleTestResults.js","sourceRoot":"","sources":["../src/handleTestResults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAA4B,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/G,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,KAAK,UAAU,cAAc,CAAC,SAAiB,EAAE,QAAgB,EAAE,OAAe;IAChF,wCAAwC;IACxC,MAAM,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5C,MAAM,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,EAAE,EACF,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,GAOV;IACC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,kDAAkD;QAClD,OAAO;IACT,CAAC;IAED,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAEnC,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;QAC7C,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAClB,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,cAAc,CAAC,SAAS,EAAE,eAAe,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wBAAwB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1D,CAAC;aAAM,CAAC;YACN,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,IAAI,GAAG,eAAe,EAAE,MAAM,CAAC;YACrC,MAAM,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;YACjD,EAAE,CAAC,GAAG,CAAC,yBAAyB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;QAC3C,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,IAAI,GAAG,eAAe,EAAE,MAAM,CAAC;YACrC,MAAM,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;YACjD,EAAE,CAAC,GAAG,CAAC,uBAAuB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  # summary
2
2
 
3
- Interactively generate a new AiEvaluationDefinition.
3
+ Interactively generate a new AI Evaluation Test Definition.
4
4
 
5
5
  # description
6
6
 
@@ -1,6 +1,6 @@
1
1
  # summary
2
2
 
3
- Interactively generate an AiEvaluationTestSet.
3
+ Interactively generate a new Set of AI Evaluation test cases.
4
4
 
5
5
  # description
6
6
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-agent",
3
- "version": "1.7.3-dev.0",
3
+ "version": "1.7.3-dev.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/plugin-agent",
9
- "version": "1.7.3-dev.0",
9
+ "version": "1.7.3-dev.1",
10
10
  "license": "BSD-3-Clause",
11
11
  "dependencies": {
12
12
  "@inquirer/figures": "^1.0.7",
@@ -18,6 +18,7 @@
18
18
  "@salesforce/kit": "^3.2.1",
19
19
  "@salesforce/sf-plugins-core": "^12.1.0",
20
20
  "ansis": "^3.3.2",
21
+ "fast-xml-parser": "^4.5.1",
21
22
  "ink": "^5.0.1",
22
23
  "ink-text-input": "^6.0.0",
23
24
  "react": "^18.3.1"
@@ -3529,6 +3530,28 @@
3529
3530
  "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==",
3530
3531
  "license": "MIT"
3531
3532
  },
3533
+ "node_modules/@salesforce/agents/node_modules/fast-xml-parser": {
3534
+ "version": "4.5.0",
3535
+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz",
3536
+ "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==",
3537
+ "funding": [
3538
+ {
3539
+ "type": "github",
3540
+ "url": "https://github.com/sponsors/NaturalIntelligence"
3541
+ },
3542
+ {
3543
+ "type": "paypal",
3544
+ "url": "https://paypal.me/naturalintelligence"
3545
+ }
3546
+ ],
3547
+ "license": "MIT",
3548
+ "dependencies": {
3549
+ "strnum": "^1.0.5"
3550
+ },
3551
+ "bin": {
3552
+ "fxparser": "src/cli/cli.js"
3553
+ }
3554
+ },
3532
3555
  "node_modules/@salesforce/agents/node_modules/indent-string": {
3533
3556
  "version": "5.0.0",
3534
3557
  "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
@@ -4092,6 +4115,28 @@
4092
4115
  "node": ">=8"
4093
4116
  }
4094
4117
  },
4118
+ "node_modules/@salesforce/source-deploy-retrieve/node_modules/fast-xml-parser": {
4119
+ "version": "4.5.0",
4120
+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz",
4121
+ "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==",
4122
+ "funding": [
4123
+ {
4124
+ "type": "github",
4125
+ "url": "https://github.com/sponsors/NaturalIntelligence"
4126
+ },
4127
+ {
4128
+ "type": "paypal",
4129
+ "url": "https://paypal.me/naturalintelligence"
4130
+ }
4131
+ ],
4132
+ "license": "MIT",
4133
+ "dependencies": {
4134
+ "strnum": "^1.0.5"
4135
+ },
4136
+ "bin": {
4137
+ "fxparser": "src/cli/cli.js"
4138
+ }
4139
+ },
4095
4140
  "node_modules/@salesforce/source-deploy-retrieve/node_modules/get-stream": {
4096
4141
  "version": "5.2.0",
4097
4142
  "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
@@ -11550,9 +11595,9 @@
11550
11595
  "license": "MIT"
11551
11596
  },
11552
11597
  "node_modules/fast-xml-parser": {
11553
- "version": "4.5.0",
11554
- "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz",
11555
- "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==",
11598
+ "version": "4.5.1",
11599
+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz",
11600
+ "integrity": "sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==",
11556
11601
  "funding": [
11557
11602
  {
11558
11603
  "type": "github",
package/oclif.lock CHANGED
@@ -4417,6 +4417,13 @@ fast-xml-parser@^4, fast-xml-parser@^4.5.0:
4417
4417
  dependencies:
4418
4418
  strnum "^1.0.5"
4419
4419
 
4420
+ fast-xml-parser@^4.5.1:
4421
+ version "4.5.1"
4422
+ resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz#a7e665ff79b7919100a5202f23984b6150f9b31e"
4423
+ integrity sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==
4424
+ dependencies:
4425
+ strnum "^1.0.5"
4426
+
4420
4427
  fastest-levenshtein@^1.0.7:
4421
4428
  version "1.0.16"
4422
4429
  resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
@@ -7872,16 +7879,7 @@ stack-utils@^2.0.6:
7872
7879
  dependencies:
7873
7880
  escape-string-regexp "^2.0.0"
7874
7881
 
7875
- "string-width-cjs@npm:string-width@^4.2.0":
7876
- version "4.2.3"
7877
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
7878
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
7879
- dependencies:
7880
- emoji-regex "^8.0.0"
7881
- is-fullwidth-code-point "^3.0.0"
7882
- strip-ansi "^6.0.1"
7883
-
7884
- string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
7882
+ "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
7885
7883
  version "4.2.3"
7886
7884
  resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
7887
7885
  integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -8003,14 +8001,7 @@ string_decoder@~1.1.1:
8003
8001
  dependencies:
8004
8002
  safe-buffer "~5.1.0"
8005
8003
 
8006
- "strip-ansi-cjs@npm:strip-ansi@^6.0.1":
8007
- version "6.0.1"
8008
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
8009
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
8010
- dependencies:
8011
- ansi-regex "^5.0.1"
8012
-
8013
- strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
8004
+ "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
8014
8005
  version "6.0.1"
8015
8006
  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
8016
8007
  integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -8684,7 +8675,7 @@ workerpool@^6.5.1:
8684
8675
  resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
8685
8676
  integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==
8686
8677
 
8687
- "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
8678
+ "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
8688
8679
  version "7.0.0"
8689
8680
  resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
8690
8681
  integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -8702,15 +8693,6 @@ wrap-ansi@^6.2.0:
8702
8693
  string-width "^4.1.0"
8703
8694
  strip-ansi "^6.0.0"
8704
8695
 
8705
- wrap-ansi@^7.0.0:
8706
- version "7.0.0"
8707
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
8708
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
8709
- dependencies:
8710
- ansi-styles "^4.0.0"
8711
- string-width "^4.1.0"
8712
- strip-ansi "^6.0.0"
8713
-
8714
8696
  wrap-ansi@^8.1.0:
8715
8697
  version "8.1.0"
8716
8698
  resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
@@ -151,51 +151,6 @@
151
151
  "preview:agent"
152
152
  ]
153
153
  },
154
- "agent:generate:definition": {
155
- "aliases": [],
156
- "args": {},
157
- "description": "This command will prompt you for the necessary information to create a new AiEvaluationDefinition. The definition will be saved to the `aiEvaluationDefinitions` directory in the project.\n\nYou must have the `Bots` and `AiEvaluationTestSets` metadata types present in your project to use this command.",
158
- "examples": [
159
- "<%= config.bin %> <%= command.id %>"
160
- ],
161
- "flags": {
162
- "flags-dir": {
163
- "helpGroup": "GLOBAL",
164
- "name": "flags-dir",
165
- "summary": "Import flag values from a directory.",
166
- "hasDynamicHelp": false,
167
- "multiple": false,
168
- "type": "option"
169
- }
170
- },
171
- "hasDynamicHelp": false,
172
- "hiddenAliases": [],
173
- "id": "agent:generate:definition",
174
- "pluginAlias": "@salesforce/plugin-agent",
175
- "pluginName": "@salesforce/plugin-agent",
176
- "pluginType": "core",
177
- "state": "beta",
178
- "strict": true,
179
- "summary": "Interactively generate a new AiEvaluationDefinition.",
180
- "enableJsonFlag": false,
181
- "isESM": true,
182
- "relativePath": [
183
- "lib",
184
- "commands",
185
- "agent",
186
- "generate",
187
- "definition.js"
188
- ],
189
- "aliasPermutations": [],
190
- "permutations": [
191
- "agent:generate:definition",
192
- "generate:agent:definition",
193
- "generate:definition:agent",
194
- "agent:definition:generate",
195
- "definition:agent:generate",
196
- "definition:generate:agent"
197
- ]
198
- },
199
154
  "agent:generate:spec": {
200
155
  "aliases": [],
201
156
  "args": {},
@@ -325,7 +280,52 @@
325
280
  "spec:generate:agent"
326
281
  ]
327
282
  },
328
- "agent:generate:testset": {
283
+ "agent:generate:test-definition": {
284
+ "aliases": [],
285
+ "args": {},
286
+ "description": "This command will prompt you for the necessary information to create a new AiEvaluationDefinition. The definition will be saved to the `aiEvaluationDefinitions` directory in the project.\n\nYou must have the `Bots` and `AiEvaluationTestSets` metadata types present in your project to use this command.",
287
+ "examples": [
288
+ "<%= config.bin %> <%= command.id %>"
289
+ ],
290
+ "flags": {
291
+ "flags-dir": {
292
+ "helpGroup": "GLOBAL",
293
+ "name": "flags-dir",
294
+ "summary": "Import flag values from a directory.",
295
+ "hasDynamicHelp": false,
296
+ "multiple": false,
297
+ "type": "option"
298
+ }
299
+ },
300
+ "hasDynamicHelp": false,
301
+ "hiddenAliases": [],
302
+ "id": "agent:generate:test-definition",
303
+ "pluginAlias": "@salesforce/plugin-agent",
304
+ "pluginName": "@salesforce/plugin-agent",
305
+ "pluginType": "core",
306
+ "state": "beta",
307
+ "strict": true,
308
+ "summary": "Interactively generate a new AI Evaluation Test Definition.",
309
+ "enableJsonFlag": false,
310
+ "isESM": true,
311
+ "relativePath": [
312
+ "lib",
313
+ "commands",
314
+ "agent",
315
+ "generate",
316
+ "test-definition.js"
317
+ ],
318
+ "aliasPermutations": [],
319
+ "permutations": [
320
+ "agent:generate:test-definition",
321
+ "generate:agent:test-definition",
322
+ "generate:test-definition:agent",
323
+ "agent:test-definition:generate",
324
+ "test-definition:agent:generate",
325
+ "test-definition:generate:agent"
326
+ ]
327
+ },
328
+ "agent:generate:test-set": {
329
329
  "aliases": [],
330
330
  "args": {},
331
331
  "description": "Answer the prompts to generate an AiEvaluationTestSet that will be written to a file. You can then run \"sf agent generate definition\" to generate the AiEvaluationDefinition that can be used to evaluate the test set.",
@@ -344,13 +344,13 @@
344
344
  },
345
345
  "hasDynamicHelp": false,
346
346
  "hiddenAliases": [],
347
- "id": "agent:generate:testset",
347
+ "id": "agent:generate:test-set",
348
348
  "pluginAlias": "@salesforce/plugin-agent",
349
349
  "pluginName": "@salesforce/plugin-agent",
350
350
  "pluginType": "core",
351
351
  "state": "beta",
352
352
  "strict": true,
353
- "summary": "Interactively generate an AiEvaluationTestSet.",
353
+ "summary": "Interactively generate a new Set of AI Evaluation test cases.",
354
354
  "enableJsonFlag": false,
355
355
  "isESM": true,
356
356
  "relativePath": [
@@ -358,16 +358,16 @@
358
358
  "commands",
359
359
  "agent",
360
360
  "generate",
361
- "testset.js"
361
+ "test-set.js"
362
362
  ],
363
363
  "aliasPermutations": [],
364
364
  "permutations": [
365
- "agent:generate:testset",
366
- "generate:agent:testset",
367
- "generate:testset:agent",
368
- "agent:testset:generate",
369
- "testset:agent:generate",
370
- "testset:generate:agent"
365
+ "agent:generate:test-set",
366
+ "generate:agent:test-set",
367
+ "generate:test-set:agent",
368
+ "agent:test-set:generate",
369
+ "test-set:agent:generate",
370
+ "test-set:generate:agent"
371
371
  ]
372
372
  },
373
373
  "agent:test:cancel": {
@@ -521,7 +521,7 @@
521
521
  "type": "option"
522
522
  },
523
523
  "output-dir": {
524
- "char": "f",
524
+ "char": "d",
525
525
  "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
526
526
  "name": "output-dir",
527
527
  "summary": "Directory to write the agent test results into.",
@@ -639,7 +639,7 @@
639
639
  "type": "option"
640
640
  },
641
641
  "output-dir": {
642
- "char": "f",
642
+ "char": "d",
643
643
  "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
644
644
  "name": "output-dir",
645
645
  "summary": "Directory to write the agent test results into.",
@@ -750,7 +750,7 @@
750
750
  "type": "option"
751
751
  },
752
752
  "output-dir": {
753
- "char": "f",
753
+ "char": "d",
754
754
  "description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
755
755
  "name": "output-dir",
756
756
  "summary": "Directory to write the agent test results into.",
@@ -788,5 +788,5 @@
788
788
  ]
789
789
  }
790
790
  },
791
- "version": "1.7.3-dev.0"
791
+ "version": "1.7.3-dev.1"
792
792
  }
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.7.3-dev.0",
4
+ "version": "1.7.3-dev.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -14,6 +14,7 @@
14
14
  "@salesforce/kit": "^3.2.1",
15
15
  "@salesforce/sf-plugins-core": "^12.1.0",
16
16
  "ansis": "^3.3.2",
17
+ "fast-xml-parser": "^4.5.1",
17
18
  "ink": "^5.0.1",
18
19
  "ink-text-input": "^6.0.0",
19
20
  "react": "^18.3.1"
@@ -220,7 +221,7 @@
220
221
  "exports": "./lib/index.js",
221
222
  "type": "module",
222
223
  "sfdx": {
223
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.3-dev.0.crt",
224
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.3-dev.0.sig"
224
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.3-dev.1.crt",
225
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.3-dev.1.sig"
225
226
  }
226
227
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/definition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,CAAC;AAEhG,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,SAAe;IAC3D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAA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