@salesforce/plugin-agent 1.4.0 → 1.5.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 CHANGED
@@ -63,6 +63,7 @@ sf plugins
63
63
 
64
64
  - [`sf agent create`](#sf-agent-create)
65
65
  - [`sf agent generate spec`](#sf-agent-generate-spec)
66
+ - [`sf agent preview`](#sf-agent-preview)
66
67
  - [`sf agent test cancel`](#sf-agent-test-cancel)
67
68
  - [`sf agent test results`](#sf-agent-test-results)
68
69
  - [`sf agent test resume`](#sf-agent-test-resume)
@@ -104,7 +105,7 @@ FLAG DESCRIPTIONS
104
105
  spec` command.
105
106
  ```
106
107
 
107
- _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.4.0/src/commands/agent/create.ts)_
108
+ _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/create.ts)_
108
109
 
109
110
  ## `sf agent generate spec`
110
111
 
@@ -147,7 +148,42 @@ EXAMPLES
147
148
  --company-description "A meaningful description"
148
149
  ```
149
150
 
150
- _See code: [src/commands/agent/generate/spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.4.0/src/commands/agent/generate/spec.ts)_
151
+ _See code: [src/commands/agent/generate/spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/generate/spec.ts)_
152
+
153
+ ## `sf agent preview`
154
+
155
+ Interact with an active agent, as a user would, to preview responses
156
+
157
+ ```
158
+ USAGE
159
+ $ sf agent preview -o <value> -n <value> [--flags-dir <value>] [--api-version <value>]
160
+
161
+ FLAGS
162
+ -n, --name=<value> (required) The name of the agent you want to preview
163
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
164
+ configuration variable is already set.
165
+ --api-version=<value> Override the api version used for api requests made by this command
166
+
167
+ GLOBAL FLAGS
168
+ --flags-dir=<value> Import flag values from a directory.
169
+
170
+ DESCRIPTION
171
+ Interact with an active agent, as a user would, to preview responses
172
+
173
+ XXX
174
+
175
+ EXAMPLES
176
+ $ sf agent preview --agent HelpDeskAgent
177
+
178
+ $ sf agent preview --agent ConciergeAgent --target-org production
179
+
180
+ FLAG DESCRIPTIONS
181
+ -n, --name=<value> The name of the agent you want to preview
182
+
183
+ the API name of the agent? (TBD based on agents library)
184
+ ```
185
+
186
+ _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/preview.ts)_
151
187
 
152
188
  ## `sf agent test cancel`
153
189
 
@@ -179,7 +215,7 @@ EXAMPLES
179
215
  $ sf agent test cancel --job-id AiEvalId
180
216
  ```
181
217
 
182
- _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.4.0/src/commands/agent/test/cancel.ts)_
218
+ _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/cancel.ts)_
183
219
 
184
220
  ## `sf agent test results`
185
221
 
@@ -188,15 +224,16 @@ Get the results of a test evaluation.
188
224
  ```
189
225
  USAGE
190
226
  $ sf agent test results -o <value> -i <value> [--json] [--flags-dir <value>] [--api-version <value>] [--result-format
191
- json|human]
227
+ json|human|junit] [-f <value>]
192
228
 
193
229
  FLAGS
230
+ -f, --output-dir=<value> Directory to write the test results to.
194
231
  -i, --job-id=<value> (required) The AiEvaluation ID.
195
232
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
196
233
  configuration variable is already set.
197
234
  --api-version=<value> Override the api version used for api requests made by this command
198
235
  --result-format=<option> [default: human] Format of the test run results.
199
- <options: json|human>
236
+ <options: json|human|junit>
200
237
 
201
238
  GLOBAL FLAGS
202
239
  --flags-dir=<value> Import flag values from a directory.
@@ -209,9 +246,15 @@ DESCRIPTION
209
246
 
210
247
  EXAMPLES
211
248
  $ sf agent test results --job-id AiEvalId
249
+
250
+ FLAG DESCRIPTIONS
251
+ -f, --output-dir=<value> Directory to write the test results to.
252
+
253
+ If test run is complete, write the results to the specified directory. If the tests are still running, the test
254
+ results will not be written.
212
255
  ```
213
256
 
214
- _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.4.0/src/commands/agent/test/results.ts)_
257
+ _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/results.ts)_
215
258
 
216
259
  ## `sf agent test resume`
217
260
 
@@ -220,9 +263,10 @@ Resume a running test for an Agent.
220
263
  ```
221
264
  USAGE
222
265
  $ sf agent test resume -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-i <value>] [-r] [-w
223
- <value>] [--result-format json|human]
266
+ <value>] [--result-format json|human|junit] [-f <value>]
224
267
 
225
268
  FLAGS
269
+ -f, --output-dir=<value> Directory to write the test results to.
226
270
  -i, --job-id=<value> The AiEvaluation ID.
227
271
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
228
272
  configuration variable is already set.
@@ -231,7 +275,7 @@ FLAGS
231
275
  results to the terminal window.
232
276
  --api-version=<value> Override the api version used for api requests made by this command
233
277
  --result-format=<option> [default: human] Format of the test run results.
234
- <options: json|human>
278
+ <options: json|human|junit>
235
279
 
236
280
  GLOBAL FLAGS
237
281
  --flags-dir=<value> Import flag values from a directory.
@@ -248,12 +292,17 @@ EXAMPLES
248
292
  $ sf agent test resume --job-id AiEvalId
249
293
 
250
294
  FLAG DESCRIPTIONS
295
+ -f, --output-dir=<value> Directory to write the test results to.
296
+
297
+ If test run is complete, write the results to the specified directory. If the tests are still running, the test
298
+ results will not be written.
299
+
251
300
  -w, --wait=<value> Number of minutes to wait for the command to complete and display results to the terminal window.
252
301
 
253
302
  If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
254
303
  ```
255
304
 
256
- _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.4.0/src/commands/agent/test/resume.ts)_
305
+ _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/resume.ts)_
257
306
 
258
307
  ## `sf agent test run`
259
308
 
@@ -262,9 +311,10 @@ Start a test for an Agent.
262
311
  ```
263
312
  USAGE
264
313
  $ sf agent test run -o <value> -n <value> [--json] [--flags-dir <value>] [--api-version <value>] [-w <value>]
265
- [--result-format json|human]
314
+ [--result-format json|human|junit] [-f <value>]
266
315
 
267
316
  FLAGS
317
+ -f, --output-dir=<value> Directory to write the test results to.
268
318
  -n, --name=<value> (required) The name of the AiEvaluationDefinition to start.
269
319
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
270
320
  configuration variable is already set.
@@ -272,7 +322,7 @@ FLAGS
272
322
  terminal window.
273
323
  --api-version=<value> Override the api version used for api requests made by this command
274
324
  --result-format=<option> [default: human] Format of the test run results.
275
- <options: json|human>
325
+ <options: json|human|junit>
276
326
 
277
327
  GLOBAL FLAGS
278
328
  --flags-dir=<value> Import flag values from a directory.
@@ -289,6 +339,11 @@ EXAMPLES
289
339
  $ sf agent test run --name AiEvalDefVerId
290
340
 
291
341
  FLAG DESCRIPTIONS
342
+ -f, --output-dir=<value> Directory to write the test results to.
343
+
344
+ If test run is complete, write the results to the specified directory. If the tests are still running, the test
345
+ results will not be written.
346
+
292
347
  -n, --name=<value> The name of the AiEvaluationDefinition to start.
293
348
 
294
349
  The name of the AiEvaluationDefinition to start.
@@ -298,6 +353,6 @@ FLAG DESCRIPTIONS
298
353
  If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
299
354
  ```
300
355
 
301
- _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.4.0/src/commands/agent/test/run.ts)_
356
+ _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.5.0/src/commands/agent/test/run.ts)_
302
357
 
303
358
  <!-- commandsstop -->
@@ -0,0 +1,15 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type AgentPreviewResult = void;
3
+ export default class AgentPreview extends SfCommand<AgentPreviewResult> {
4
+ static readonly summary: string;
5
+ static readonly description: string;
6
+ static readonly examples: string[];
7
+ static readonly enableJsonFlag = false;
8
+ static readonly requiresProject = true;
9
+ static readonly flags: {
10
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
14
+ run(): Promise<AgentPreviewResult>;
15
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Copyright (c) 2024, salesforce.com, inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
8
+ import { Messages } from '@salesforce/core';
9
+ import React from 'react';
10
+ import { render } from 'ink';
11
+ import { AgentPreviewReact } from '../../components/agent-preview-react.js';
12
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
13
+ const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.preview');
14
+ export default class AgentPreview extends SfCommand {
15
+ static summary = messages.getMessage('summary');
16
+ static description = messages.getMessage('description');
17
+ static examples = messages.getMessages('examples');
18
+ static enableJsonFlag = false;
19
+ static requiresProject = true;
20
+ static flags = {
21
+ 'target-org': Flags.requiredOrg(),
22
+ 'api-version': Flags.orgApiVersion(),
23
+ name: Flags.string({
24
+ summary: messages.getMessage('flags.name.summary'),
25
+ description: messages.getMessage('flags.name.description'),
26
+ char: 'n',
27
+ required: true,
28
+ }),
29
+ };
30
+ async run() {
31
+ const { flags } = await this.parse(AgentPreview);
32
+ this.log(`previewing ${flags.name}`);
33
+ const instance = render(React.createElement(AgentPreviewReact, null));
34
+ await instance.waitUntilExit();
35
+ }
36
+ }
37
+ //# sourceMappingURL=preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/commands/agent/preview.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;AAIpF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAA6B;IAC9D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,cAAc,GAAG,KAAK,CAAC;IACvC,MAAM,CAAU,eAAe,GAAG,IAAI,CAAC;IAEvC,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;QACpC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;YAClD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;YAC1D,IAAI,EAAE,GAAG;YACT,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACjD,IAAI,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAErC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;QACtE,MAAM,QAAQ,CAAC,aAAa,EAAE,CAAC;IACjC,CAAC"}
@@ -10,7 +10,8 @@ export default class AgentTestResults extends SfCommand<AgentTestResultsResult>
10
10
  'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
11
11
  'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  'job-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
- 'result-format': import("@oclif/core/interfaces").OptionFlag<"json" | "human", import("@oclif/core/interfaces").CustomOptions>;
13
+ 'result-format': import("@oclif/core/interfaces").OptionFlag<"json" | "human" | "junit", import("@oclif/core/interfaces").CustomOptions>;
14
+ 'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
15
  };
15
16
  run(): Promise<AgentTestResultsResult>;
16
17
  }
@@ -6,8 +6,9 @@
6
6
  */
7
7
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
8
8
  import { Messages } from '@salesforce/core';
9
- import { AgentTester, humanFormat } from '@salesforce/agents';
10
- import { resultFormatFlag } from '../../../flags.js';
9
+ import { AgentTester } from '@salesforce/agents';
10
+ import { resultFormatFlag, testOutputDirFlag } from '../../../flags.js';
11
+ import { handleTestResults } from '../../../handleTestResults.js';
11
12
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
12
13
  const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.test.results');
13
14
  export default class AgentTestResults extends SfCommand {
@@ -24,14 +25,19 @@ export default class AgentTestResults extends SfCommand {
24
25
  required: true,
25
26
  }),
26
27
  'result-format': resultFormatFlag(),
28
+ 'output-dir': testOutputDirFlag(),
27
29
  };
28
30
  async run() {
29
31
  const { flags } = await this.parse(AgentTestResults);
30
32
  const agentTester = new AgentTester(flags['target-org'].getConnection(flags['api-version']));
31
33
  const response = await agentTester.details(flags['job-id']);
32
- if (flags['result-format'] === 'human') {
33
- this.log(await humanFormat(flags['job-id'], response));
34
- }
34
+ await handleTestResults({
35
+ id: flags['job-id'],
36
+ format: flags['result-format'],
37
+ results: response,
38
+ jsonEnabled: this.jsonEnabled(),
39
+ outputDir: flags['output-dir'],
40
+ });
35
41
  return response;
36
42
  }
37
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"results.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/results.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAA4B,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,oBAAoB,CAAC,CAAC;AAIzF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,SAAiC;IACtE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CA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AAC;QAC7F,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5D,MAAM,iBAAiB,CAAC;YACtB,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC;YACnB,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC;YAC9B,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;YAC/B,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;SAC/B,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC"}
@@ -14,7 +14,8 @@ export default class AgentTestResume extends SfCommand<AgentTestResumeResult> {
14
14
  'job-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
15
  'use-most-recent': import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
16
  wait: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/kit").Duration, import("@oclif/core/interfaces").CustomOptions>;
17
- 'result-format': import("@oclif/core/interfaces").OptionFlag<"json" | "human", import("@oclif/core/interfaces").CustomOptions>;
17
+ 'result-format': import("@oclif/core/interfaces").OptionFlag<"json" | "human" | "junit", import("@oclif/core/interfaces").CustomOptions>;
18
+ 'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
19
  };
19
20
  run(): Promise<AgentTestResumeResult>;
20
21
  }
@@ -6,10 +6,11 @@
6
6
  */
7
7
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
8
8
  import { Messages } from '@salesforce/core';
9
- import { AgentTester, humanFormat } from '@salesforce/agents';
9
+ import { AgentTester } from '@salesforce/agents';
10
10
  import { AgentTestCache } from '../../../agentTestCache.js';
11
11
  import { TestStages } from '../../../testStages.js';
12
- import { resultFormatFlag } from '../../../flags.js';
12
+ import { resultFormatFlag, testOutputDirFlag } from '../../../flags.js';
13
+ import { handleTestResults } from '../../../handleTestResults.js';
13
14
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
14
15
  const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.test.resume');
15
16
  export default class AgentTestResume extends SfCommand {
@@ -39,6 +40,7 @@ export default class AgentTestResume extends SfCommand {
39
40
  description: messages.getMessage('flags.wait.description'),
40
41
  }),
41
42
  'result-format': resultFormatFlag(),
43
+ 'output-dir': testOutputDirFlag(),
42
44
  };
43
45
  async run() {
44
46
  const { flags } = await this.parse(AgentTestResume);
@@ -54,9 +56,13 @@ export default class AgentTestResume extends SfCommand {
54
56
  if (completed)
55
57
  await agentTestCache.removeCacheEntry(aiEvaluationId);
56
58
  mso.stop();
57
- if (response && flags['result-format'] === 'human') {
58
- this.log(await humanFormat(name ?? aiEvaluationId, response));
59
- }
59
+ await handleTestResults({
60
+ id: aiEvaluationId,
61
+ format: flags['result-format'],
62
+ results: response,
63
+ jsonEnabled: this.jsonEnabled(),
64
+ outputDir: flags['output-dir'],
65
+ });
60
66
  return {
61
67
  status: 'COMPLETED',
62
68
  aiEvaluationId,
@@ -1 +1 @@
1
- {"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/resume.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAA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F,IAAI,SAAS;YAAE,MAAM,cAAc,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAErE,GAAG,CAAC,IAAI,EAAE,CAAC;QAEX,MAAM,iBAAiB,CAAC;YACtB,EAAE,EAAE,cAAc;YAClB,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC;YAC9B,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;YAC/B,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;SAC/B,CAAC,CAAC;QAEH,OAAO;YACL,MAAM,EAAE,WAAW;YACnB,cAAc;SACf,CAAC;IACJ,CAAC"}
@@ -13,7 +13,8 @@ export default class AgentTestRun extends SfCommand<AgentTestRunResult> {
13
13
  'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
14
  name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
15
  wait: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/kit").Duration, import("@oclif/core/interfaces").CustomOptions>;
16
- 'result-format': import("@oclif/core/interfaces").OptionFlag<"json" | "human", import("@oclif/core/interfaces").CustomOptions>;
16
+ 'result-format': import("@oclif/core/interfaces").OptionFlag<"json" | "human" | "junit", import("@oclif/core/interfaces").CustomOptions>;
17
+ 'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
18
  };
18
19
  run(): Promise<AgentTestRunResult>;
19
20
  }
@@ -6,11 +6,12 @@
6
6
  */
7
7
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
8
8
  import { Messages } from '@salesforce/core';
9
- import { AgentTester, humanFormat } from '@salesforce/agents';
9
+ import { AgentTester } from '@salesforce/agents';
10
10
  import { colorize } from '@oclif/core/ux';
11
- import { resultFormatFlag } from '../../../flags.js';
11
+ import { resultFormatFlag, testOutputDirFlag } from '../../../flags.js';
12
12
  import { AgentTestCache } from '../../../agentTestCache.js';
13
13
  import { TestStages } from '../../../testStages.js';
14
+ import { handleTestResults } from '../../../handleTestResults.js';
14
15
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
15
16
  const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.test.run');
16
17
  export default class AgentTestRun extends SfCommand {
@@ -37,6 +38,7 @@ export default class AgentTestRun extends SfCommand {
37
38
  description: messages.getMessage('flags.wait.description'),
38
39
  }),
39
40
  'result-format': resultFormatFlag(),
41
+ 'output-dir': testOutputDirFlag(),
40
42
  };
41
43
  async run() {
42
44
  const { flags } = await this.parse(AgentTestRun);
@@ -52,9 +54,13 @@ export default class AgentTestRun extends SfCommand {
52
54
  if (completed)
53
55
  await agentTestCache.removeCacheEntry(response.aiEvaluationId);
54
56
  mso.stop();
55
- if (detailsResponse && flags['result-format'] === 'human') {
56
- this.log(await humanFormat(flags.name, detailsResponse));
57
- }
57
+ await handleTestResults({
58
+ id: response.aiEvaluationId,
59
+ format: flags['result-format'],
60
+ results: detailsResponse,
61
+ jsonEnabled: this.jsonEnabled(),
62
+ outputDir: flags['output-dir'],
63
+ });
58
64
  return {
59
65
  status: 'COMPLETED',
60
66
  aiEvaluationId: response.aiEvaluationId,
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/run.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,M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 * - Add keystroke to clear chat
6
+ * - Add keystroke to scroll up
7
+ * - Add keystroke to scroll down
8
+ */
9
+ export declare function AgentPreviewReact(): React.ReactNode;
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Copyright (c) 2024, salesforce.com, inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ import React from 'react';
8
+ import { Box, Text } from 'ink';
9
+ import figures from '@inquirer/figures';
10
+ import TextInput from 'ink-text-input';
11
+ import { sleep } from '@salesforce/kit';
12
+ /**
13
+ * Ideas:
14
+ * - Limit height based on terminal height
15
+ * - Add keystroke to clear chat
16
+ * - Add keystroke to scroll up
17
+ * - Add keystroke to scroll down
18
+ */
19
+ export function AgentPreviewReact() {
20
+ const [comments, setComments] = React.useState([]);
21
+ const [query, setQuery] = React.useState('');
22
+ return (React.createElement(Box, { flexDirection: "column" },
23
+ comments.length > 0 && (React.createElement(Box, { flexDirection: "column" },
24
+ comments.map(({ timestamp, role, content }, idx) => (React.createElement(Box, { key: role + '__' + timestamp.toISOString() + '__' + idx.toString(), alignItems: role === 'user' ? 'flex-end' : 'flex-start', flexDirection: "column" },
25
+ React.createElement(Box, { flexDirection: "row", columnGap: 1 },
26
+ React.createElement(Text, null, role === 'user' ? 'You' : role),
27
+ React.createElement(Text, { color: "gray" }, timestamp.toLocaleString())),
28
+ React.createElement(Box, { width: Math.min(process.stdout.columns - 4, content.length + 4), borderStyle: "round", paddingLeft: 1, paddingRight: 1 },
29
+ React.createElement(Text, null, content))))),
30
+ React.createElement(Box, { paddingLeft: 1, paddingRight: 1 },
31
+ React.createElement(Text, { dimColor: true }, '─'.repeat(process.stdout.columns - 2))))),
32
+ React.createElement(Box, null,
33
+ React.createElement(Text, null,
34
+ figures.pointer,
35
+ " "),
36
+ React.createElement(TextInput, { showCursor: true, value: query, placeholder: "Start typing\u2026", onChange: setQuery,
37
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
38
+ onSubmit: async (content) => {
39
+ if (!content)
40
+ return;
41
+ setQuery('');
42
+ setComments((prev) => [...prev, { role: 'user', content, timestamp: new Date() }]);
43
+ await sleep(1000);
44
+ setComments((prev) => {
45
+ const lastComment = prev[prev.length - 1];
46
+ // TODO - use agents library for generations
47
+ return (Math.random() * 2) % 2 > 1
48
+ ? [
49
+ ...prev,
50
+ { role: 'system', content: "I'm sorry, I can't help with this request", timestamp: new Date() },
51
+ ]
52
+ : [...prev, { ...lastComment, role: 'system', content: 'We have a scuba class at 9:30 AM' }];
53
+ });
54
+ } }))));
55
+ }
56
+ //# sourceMappingURL=agent-preview-react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-preview-react.js","sourceRoot":"","sources":["../../src/components/agent-preview-react.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC5C,EAAE,CACH,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7C,OAAO,CACL,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;QACxB,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACxB,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,GAAG,E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E;oBAC1B,IAAI,CAAC,OAAO;wBAAE,OAAO;oBACrB,QAAQ,CAAC,EAAE,CAAC,CAAC;oBAEb,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;oBACnF,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;oBAElB,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;wBACnB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;wBAC1C,4CAA4C;wBAC5C,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;4BAChC,CAAC,CAAC;gCACE,GAAG,IAAI;gCACP,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,2CAA2C,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE;6BAChG;4BACH,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,GAAG,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,kCAAkC,EAAE,CAAC,CAAC;oBACjG,CAAC,CAAC,CAAC;gBACL,CAAC,GACD,CACE,CACF,CACP,CAAC;AACJ,CAAC"}
package/lib/flags.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- export declare const resultFormatFlag: import("@oclif/core/interfaces").FlagDefinition<"json" | "human", import("@oclif/core/interfaces").CustomOptions, {
1
+ export declare const resultFormatFlag: import("@oclif/core/interfaces").FlagDefinition<"json" | "human" | "junit", import("@oclif/core/interfaces").CustomOptions, {
2
2
  multiple: false;
3
3
  requiredOrDefaulted: true;
4
4
  }>;
5
+ export declare const testOutputDirFlag: import("@oclif/core/interfaces").FlagDefinition<string, import("@oclif/core/interfaces").CustomOptions, {
6
+ multiple: false;
7
+ requiredOrDefaulted: false;
8
+ }>;
package/lib/flags.js CHANGED
@@ -12,10 +12,15 @@ export const resultFormatFlag = Flags.option({
12
12
  options: [
13
13
  'json',
14
14
  'human',
15
+ 'junit',
15
16
  // 'tap',
16
- // 'junit'
17
17
  ],
18
18
  default: 'human',
19
19
  summary: messages.getMessage('flags.result-format.summary'),
20
20
  });
21
+ export const testOutputDirFlag = Flags.custom({
22
+ char: 'f',
23
+ description: messages.getMessage('flags.output-dir.description'),
24
+ summary: messages.getMessage('flags.output-dir.summary'),
25
+ });
21
26
  //# sourceMappingURL=flags.js.map
package/lib/flags.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"flags.js","sourceRoot":"","sources":["../src/flags.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE;QACP,MAAM;QACN,OAAO;QACP,SAAS;QACT,UAAU;KACF;IACV,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAC5D,CAAC,CAAC"}
1
+ {"version":3,"file":"flags.js","sourceRoot":"","sources":["../src/flags.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE;QACP,MAAM;QACN,OAAO;QACP,OAAO;QACP,SAAS;KACD;IACV,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAC5D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAS;IACpD,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC;IAChE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;CACzD,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { AgentTestDetailsResponse } from '@salesforce/agents';
2
+ export declare function handleTestResults({ id, format, results, jsonEnabled, outputDir, }: {
3
+ id: string;
4
+ format: 'human' | 'json' | 'junit';
5
+ results: AgentTestDetailsResponse | undefined;
6
+ jsonEnabled: boolean;
7
+ outputDir?: string;
8
+ }): Promise<void>;
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Copyright (c) 2024, salesforce.com, inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ import { join } from 'node:path';
8
+ import { writeFile, mkdir } from 'node:fs/promises';
9
+ import { jsonFormat, humanFormat, junitFormat } from '@salesforce/agents';
10
+ import { Ux } from '@salesforce/sf-plugins-core/Ux';
11
+ async function writeFileToDir(outputDir, fileName, content) {
12
+ // if directory doesn't exist, create it
13
+ await mkdir(outputDir, { recursive: true });
14
+ await writeFile(join(outputDir, fileName), content);
15
+ }
16
+ export async function handleTestResults({ id, format, results, jsonEnabled, outputDir, }) {
17
+ if (!results) {
18
+ // do nothing since there are no results to handle
19
+ return;
20
+ }
21
+ const ux = new Ux({ jsonEnabled });
22
+ if (format === 'human') {
23
+ const formatted = await humanFormat(results);
24
+ ux.log(formatted);
25
+ if (outputDir) {
26
+ await writeFileToDir(outputDir, `test-result-${id}.txt`, formatted);
27
+ }
28
+ }
29
+ if (format === 'json') {
30
+ const formatted = await jsonFormat(results);
31
+ ux.log(formatted);
32
+ if (outputDir) {
33
+ await writeFileToDir(outputDir, `test-result-${id}.json`, formatted);
34
+ }
35
+ }
36
+ if (format === 'junit') {
37
+ const formatted = await junitFormat(results);
38
+ ux.log(formatted);
39
+ if (outputDir) {
40
+ await writeFileToDir(outputDir, `test-result-${id}.xml`, formatted);
41
+ }
42
+ }
43
+ }
44
+ //# sourceMappingURL=handleTestResults.js.map
@@ -0,0 +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,MAAM,oBAAoB,CAAC;AACpG,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,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;QAC5C,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAClB,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,cAAc,CAAC,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAED,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,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,20 @@
1
+ # summary
2
+
3
+ Interact with an active agent, as a user would, to preview responses
4
+
5
+ # description
6
+
7
+ XXX
8
+
9
+ # flags.name.summary
10
+
11
+ The name of the agent you want to preview
12
+
13
+ # flags.name.description
14
+
15
+ the API name of the agent? (TBD based on agents library)
16
+
17
+ # examples
18
+
19
+ - <%= config.bin %> <%= command.id %> --agent HelpDeskAgent
20
+ - <%= config.bin %> <%= command.id %> --agent ConciergeAgent --target-org production