@salesforce/plugin-agent 1.13.2 → 1.14.1-dev.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 +44 -10
- package/lib/agentTestCache.d.ts +5 -5
- package/lib/agentTestCache.js +16 -16
- package/lib/agentTestCache.js.map +1 -1
- package/lib/commands/agent/generate/template.d.ts +18 -0
- package/lib/commands/agent/generate/template.js +48 -0
- package/lib/commands/agent/generate/template.js.map +1 -0
- package/lib/commands/agent/test/cancel.d.ts +1 -1
- package/lib/commands/agent/test/cancel.js +5 -5
- package/lib/commands/agent/test/cancel.js.map +1 -1
- package/lib/commands/agent/test/create.js +0 -2
- package/lib/commands/agent/test/create.js.map +1 -1
- package/lib/commands/agent/test/resume.d.ts +1 -1
- package/lib/commands/agent/test/resume.js +7 -7
- package/lib/commands/agent/test/resume.js.map +1 -1
- package/lib/commands/agent/test/run.d.ts +5 -1
- package/lib/commands/agent/test/run.js +16 -11
- package/lib/commands/agent/test/run.js.map +1 -1
- package/messages/agent.generate.template.md +21 -0
- package/npm-shrinkwrap.json +530 -195
- package/oclif.lock +71 -36
- package/oclif.manifest.json +87 -1
- package/package.json +4 -4
- package/schemas/agent-generate-template.json +16 -0
- package/schemas/agent-test-cancel.json +3 -6
- package/schemas/agent-test-results.json +10 -17
- package/schemas/agent-test-resume.json +3 -6
- package/schemas/agent-test-run.json +3 -6
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 agent-spec`](#sf-agent-generate-agent-spec)
|
|
66
|
+
- [`sf agent generate template`](#sf-agent-generate-template)
|
|
66
67
|
- [`sf agent generate test-spec`](#sf-agent-generate-test-spec)
|
|
67
68
|
- [`sf agent preview`](#sf-agent-preview)
|
|
68
69
|
- [`sf agent test cancel`](#sf-agent-test-cancel)
|
|
@@ -131,7 +132,7 @@ EXAMPLES
|
|
|
131
132
|
$ sf agent create --agent-name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
132
133
|
```
|
|
133
134
|
|
|
134
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
135
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/create.ts)_
|
|
135
136
|
|
|
136
137
|
## `sf agent generate agent-spec`
|
|
137
138
|
|
|
@@ -235,7 +236,40 @@ EXAMPLES
|
|
|
235
236
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
236
237
|
```
|
|
237
238
|
|
|
238
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
239
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/generate/agent-spec.ts)_
|
|
240
|
+
|
|
241
|
+
## `sf agent generate template`
|
|
242
|
+
|
|
243
|
+
Generate an agent template for packaging.
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
USAGE
|
|
247
|
+
$ sf agent generate template -o <value> --agent-api-name <value> [--json] [--flags-dir <value>] [--api-version <value>] [-d
|
|
248
|
+
<value>]
|
|
249
|
+
|
|
250
|
+
FLAGS
|
|
251
|
+
-d, --output-dir=<value> Directory to write the agent template.
|
|
252
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
253
|
+
configuration variable is already set.
|
|
254
|
+
--agent-api-name=<value> (required) API name of an existing Bot.
|
|
255
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
256
|
+
|
|
257
|
+
GLOBAL FLAGS
|
|
258
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
259
|
+
--json Format output as json.
|
|
260
|
+
|
|
261
|
+
DESCRIPTION
|
|
262
|
+
Generate an agent template for packaging.
|
|
263
|
+
|
|
264
|
+
Generate agent template metadata to for packaging your agent.
|
|
265
|
+
|
|
266
|
+
EXAMPLES
|
|
267
|
+
Generate an agent template from a Bot API name in your default package dir:
|
|
268
|
+
|
|
269
|
+
$ sf agent generate template --agent-api-name My_Packaged_Agent
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/generate/template.ts)_
|
|
239
273
|
|
|
240
274
|
## `sf agent generate test-spec`
|
|
241
275
|
|
|
@@ -258,7 +292,7 @@ EXAMPLES
|
|
|
258
292
|
$ sf agent generate test-spec
|
|
259
293
|
```
|
|
260
294
|
|
|
261
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
295
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/generate/test-spec.ts)_
|
|
262
296
|
|
|
263
297
|
## `sf agent preview`
|
|
264
298
|
|
|
@@ -293,7 +327,7 @@ FLAG DESCRIPTIONS
|
|
|
293
327
|
the API name of the agent? (TBD based on agents library)
|
|
294
328
|
```
|
|
295
329
|
|
|
296
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
330
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/preview.ts)_
|
|
297
331
|
|
|
298
332
|
## `sf agent test cancel`
|
|
299
333
|
|
|
@@ -330,7 +364,7 @@ EXAMPLES
|
|
|
330
364
|
$ sf agent test cancel --job-id 4KBfake0000003F4AQ --target-org my-org
|
|
331
365
|
```
|
|
332
366
|
|
|
333
|
-
_See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
367
|
+
_See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/test/cancel.ts)_
|
|
334
368
|
|
|
335
369
|
## `sf agent test create`
|
|
336
370
|
|
|
@@ -366,7 +400,7 @@ FLAG DESCRIPTIONS
|
|
|
366
400
|
More information about a flag. Don't repeat the summary.
|
|
367
401
|
```
|
|
368
402
|
|
|
369
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
403
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/test/create.ts)_
|
|
370
404
|
|
|
371
405
|
## `sf agent test list`
|
|
372
406
|
|
|
@@ -395,7 +429,7 @@ EXAMPLES
|
|
|
395
429
|
$ sf agent test list
|
|
396
430
|
```
|
|
397
431
|
|
|
398
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
432
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/test/list.ts)_
|
|
399
433
|
|
|
400
434
|
## `sf agent test results`
|
|
401
435
|
|
|
@@ -451,7 +485,7 @@ FLAG DESCRIPTIONS
|
|
|
451
485
|
test results aren't written.
|
|
452
486
|
```
|
|
453
487
|
|
|
454
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
488
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/test/results.ts)_
|
|
455
489
|
|
|
456
490
|
## `sf agent test resume`
|
|
457
491
|
|
|
@@ -514,7 +548,7 @@ FLAG DESCRIPTIONS
|
|
|
514
548
|
test results aren't written.
|
|
515
549
|
```
|
|
516
550
|
|
|
517
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
551
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/test/resume.ts)_
|
|
518
552
|
|
|
519
553
|
## `sf agent test run`
|
|
520
554
|
|
|
@@ -577,6 +611,6 @@ FLAG DESCRIPTIONS
|
|
|
577
611
|
test results aren't written.
|
|
578
612
|
```
|
|
579
613
|
|
|
580
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
614
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.14.1-dev.0/src/commands/agent/test/run.ts)_
|
|
581
615
|
|
|
582
616
|
<!-- commandsstop -->
|
package/lib/agentTestCache.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { TTLConfig } from '@salesforce/core';
|
|
2
2
|
type CacheContents = {
|
|
3
|
-
|
|
3
|
+
runId: string;
|
|
4
4
|
name: string;
|
|
5
5
|
};
|
|
6
6
|
export declare class AgentTestCache extends TTLConfig<TTLConfig.Options, CacheContents> {
|
|
7
7
|
static getFileName(): string;
|
|
8
8
|
static getDefaultOptions(): TTLConfig.Options;
|
|
9
|
-
createCacheEntry(
|
|
10
|
-
removeCacheEntry(
|
|
9
|
+
createCacheEntry(runId: string, name: string): Promise<void>;
|
|
10
|
+
removeCacheEntry(runId: string): Promise<void>;
|
|
11
11
|
resolveFromCache(): CacheContents;
|
|
12
|
-
useIdOrMostRecent(
|
|
13
|
-
|
|
12
|
+
useIdOrMostRecent(runId: string | undefined, useMostRecent: boolean): {
|
|
13
|
+
runId: string;
|
|
14
14
|
name?: string;
|
|
15
15
|
};
|
|
16
16
|
}
|
package/lib/agentTestCache.js
CHANGED
|
@@ -19,33 +19,33 @@ export class AgentTestCache extends TTLConfig {
|
|
|
19
19
|
ttl: Duration.days(7),
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
async createCacheEntry(
|
|
23
|
-
if (!
|
|
24
|
-
throw new SfError('
|
|
25
|
-
this.set(
|
|
22
|
+
async createCacheEntry(runId, name) {
|
|
23
|
+
if (!runId)
|
|
24
|
+
throw new SfError('runId is required to create a cache entry');
|
|
25
|
+
this.set(runId, { runId, name });
|
|
26
26
|
await this.write();
|
|
27
27
|
}
|
|
28
|
-
async removeCacheEntry(
|
|
29
|
-
if (!
|
|
30
|
-
throw new SfError('
|
|
31
|
-
this.unset(
|
|
28
|
+
async removeCacheEntry(runId) {
|
|
29
|
+
if (!runId)
|
|
30
|
+
throw new SfError('runId is required to remove a cache entry');
|
|
31
|
+
this.unset(runId);
|
|
32
32
|
await this.write();
|
|
33
33
|
}
|
|
34
34
|
resolveFromCache() {
|
|
35
35
|
const key = this.getLatestKey();
|
|
36
36
|
if (!key)
|
|
37
|
-
throw new SfError('Could not find
|
|
37
|
+
throw new SfError('Could not find a runId to resume');
|
|
38
38
|
return this.get(key);
|
|
39
39
|
}
|
|
40
|
-
useIdOrMostRecent(
|
|
41
|
-
if (
|
|
42
|
-
throw new SfError('Cannot specify both
|
|
40
|
+
useIdOrMostRecent(runId, useMostRecent) {
|
|
41
|
+
if (runId && useMostRecent) {
|
|
42
|
+
throw new SfError('Cannot specify both a runId and use most recent flag');
|
|
43
43
|
}
|
|
44
|
-
if (!
|
|
45
|
-
throw new SfError('Must specify either
|
|
44
|
+
if (!runId && !useMostRecent) {
|
|
45
|
+
throw new SfError('Must specify either a runId or use most recent flag');
|
|
46
46
|
}
|
|
47
|
-
if (
|
|
48
|
-
return {
|
|
47
|
+
if (runId) {
|
|
48
|
+
return { runId };
|
|
49
49
|
}
|
|
50
50
|
return this.resolveFromCache();
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentTestCache.js","sourceRoot":"","sources":["../src/agentTestCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAO3C,MAAM,OAAO,cA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;QACzC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,OAAO,CAAC,2CAA2C,CAAC,CAAC;QAE3E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEM,gBAAgB;QACrB,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,OAAO,CAAC,kCAAkC,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAEM,iBAAiB,CAAC,KAAyB,EAAE,aAAsB;QACxE,IAAI,KAAK,IAAI,aAAa,EAAE,CAAC;YAC3B,MAAM,IAAI,OAAO,CAAC,sDAAsD,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,CAAC,KAAK,IAAI,CAAC,aAAa,EAAE,CAAC;YAC7B,MAAM,IAAI,OAAO,CAAC,qDAAqD,CAAC,CAAC;QAC3E,CAAC;QAED,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,EAAE,KAAK,EAAE,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type AgentGenerateTemplateResult = {
|
|
3
|
+
path: string;
|
|
4
|
+
};
|
|
5
|
+
export default class AgentGenerateTemplate extends SfCommand<AgentGenerateTemplateResult> {
|
|
6
|
+
static readonly summary: string;
|
|
7
|
+
static readonly description: string;
|
|
8
|
+
static readonly examples: string[];
|
|
9
|
+
static state: string;
|
|
10
|
+
static readonly requiresProject = true;
|
|
11
|
+
static readonly flags: {
|
|
12
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'agent-api-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<AgentGenerateTemplateResult>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { dirname, join, resolve } from 'node:path';
|
|
8
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
9
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
10
|
+
import { Messages } from '@salesforce/core';
|
|
11
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.template');
|
|
13
|
+
export default class AgentGenerateTemplate extends SfCommand {
|
|
14
|
+
static summary = messages.getMessage('summary');
|
|
15
|
+
static description = messages.getMessage('description');
|
|
16
|
+
static examples = messages.getMessages('examples');
|
|
17
|
+
static state = 'beta';
|
|
18
|
+
static requiresProject = true;
|
|
19
|
+
static flags = {
|
|
20
|
+
'target-org': Flags.requiredOrg(),
|
|
21
|
+
'api-version': Flags.orgApiVersion(),
|
|
22
|
+
'agent-api-name': Flags.string({
|
|
23
|
+
summary: messages.getMessage('flags.agent-api-name.summary'),
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
'output-dir': Flags.directory({
|
|
27
|
+
char: 'd',
|
|
28
|
+
exists: true,
|
|
29
|
+
summary: messages.getMessage('flags.output-dir.summary'),
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
async run() {
|
|
33
|
+
const { flags } = await this.parse(AgentGenerateTemplate);
|
|
34
|
+
// TODO: look for a Bot with the agent API name
|
|
35
|
+
const botName = flags['agent-api-name'];
|
|
36
|
+
const outputDir = flags['output-dir'] ? resolve(flags['output-dir']) : this.project?.getDefaultPackage().fullPath;
|
|
37
|
+
const agentTemplateFilePath = join(outputDir, 'agentTemplates', `${botName}.agentTemplate-meta.xml`);
|
|
38
|
+
mkdirSync(dirname(agentTemplateFilePath), { recursive: true });
|
|
39
|
+
writeFileSync(agentTemplateFilePath, xmlContent);
|
|
40
|
+
this.log(`\nSaved agent template: ${agentTemplateFilePath}`);
|
|
41
|
+
return { path: agentTemplateFilePath };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const xmlContent = `<?xml version="1.0" encoding="UTF-8"?>
|
|
45
|
+
<AgentTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
46
|
+
</AgentTemplate>
|
|
47
|
+
`;
|
|
48
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,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,yBAAyB,CAAC,CAAC;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,yBAAyB,CAAC,CAAC;QAC/G,SAAS,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAE/D,aAAa,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;QAEjD,IAAI,CAAC,GAAG,CAAC,2BAA2B,qBAAqB,EAAE,CAAC,CAAC;QAE7D,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;IACzC,CAAC;;AAGH,MAAM,UAAU,GAAG;;;CAGlB,CAAC"}
|
|
@@ -32,16 +32,16 @@ export default class AgentTestCancel extends SfCommand {
|
|
|
32
32
|
async run() {
|
|
33
33
|
const { flags } = await this.parse(AgentTestCancel);
|
|
34
34
|
const agentTestCache = await AgentTestCache.create();
|
|
35
|
-
const {
|
|
36
|
-
this.log(`Canceling tests for AiEvaluation Job: ${
|
|
35
|
+
const { runId } = agentTestCache.useIdOrMostRecent(flags['job-id'], flags['use-most-recent']);
|
|
36
|
+
this.log(`Canceling tests for AiEvaluation Job: ${runId}`);
|
|
37
37
|
const agentTester = new AgentTester(flags['target-org'].getConnection(flags['api-version']));
|
|
38
|
-
const result = await agentTester.cancel(
|
|
38
|
+
const result = await agentTester.cancel(runId);
|
|
39
39
|
if (result.success) {
|
|
40
|
-
await agentTestCache.removeCacheEntry(
|
|
40
|
+
await agentTestCache.removeCacheEntry(runId);
|
|
41
41
|
}
|
|
42
42
|
return {
|
|
43
43
|
success: result.success,
|
|
44
|
-
|
|
44
|
+
runId,
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../../src/commands/agent/test/cancel.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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QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;YAC7D,UAAU,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC;SAC1C,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAEpD,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,CAAC;QACrD,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAE9F,IAAI,CAAC,GAAG,CAAC,yCAAyC,KAAK,EAAE,CAAC,CAAC;QAE3D,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7F,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAE/C,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC/C,CAAC;QAED,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,KAAK;SACN,CAAC;IACJ,CAAC"}
|
|
@@ -76,8 +76,6 @@ export default class AgentTestCreate extends SfCommand {
|
|
|
76
76
|
this.mso?.skipTo(AgentTestCreateLifecycleStages.Done);
|
|
77
77
|
this.mso?.stop();
|
|
78
78
|
this.log(`Preview of AiEvaluationDefinition created at ${path}`);
|
|
79
|
-
this.log();
|
|
80
|
-
this.log(contents);
|
|
81
79
|
}
|
|
82
80
|
else {
|
|
83
81
|
this.log(`AiEvaluationDefinition created at ${path} and deployed to ${flags['target-org'].getUsername() ?? flags['target-org'].getOrgId()}`);
|
|
@@ -1 +1 @@
|
|
|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,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,yBAAyB,CAAC;YAC1E,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,oBAAoB;SACrB,CAAC,CAAC;QAEH,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAC;YACtD,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,gDAAgD,IAAI,EAAE,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CACN,qCAAqC,IAAI,oBACvC,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,EACnE,EAAE,CACH,CAAC;QACJ,CAAC;QAED,OAAO;YACL,IAAI;YACJ,QAAQ;SACT,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,KAAiC;QAC/C,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC"}
|
|
@@ -44,19 +44,19 @@ export default class AgentTestResume extends SfCommand {
|
|
|
44
44
|
async run() {
|
|
45
45
|
const { flags } = await this.parse(AgentTestResume);
|
|
46
46
|
const agentTestCache = await AgentTestCache.create();
|
|
47
|
-
const { name,
|
|
47
|
+
const { name, runId } = agentTestCache.useIdOrMostRecent(flags['job-id'], flags['use-most-recent']);
|
|
48
48
|
const mso = new TestStages({
|
|
49
|
-
title: `Agent Test Run: ${name ??
|
|
49
|
+
title: `Agent Test Run: ${name ?? runId}`,
|
|
50
50
|
jsonEnabled: this.jsonEnabled(),
|
|
51
51
|
});
|
|
52
|
-
mso.start({ id:
|
|
52
|
+
mso.start({ id: runId });
|
|
53
53
|
const agentTester = new AgentTester(flags['target-org'].getConnection(flags['api-version']));
|
|
54
|
-
const { completed, response } = await mso.poll(agentTester,
|
|
54
|
+
const { completed, response } = await mso.poll(agentTester, runId, flags.wait);
|
|
55
55
|
if (completed)
|
|
56
|
-
await agentTestCache.removeCacheEntry(
|
|
56
|
+
await agentTestCache.removeCacheEntry(runId);
|
|
57
57
|
mso.stop();
|
|
58
58
|
await handleTestResults({
|
|
59
|
-
id:
|
|
59
|
+
id: runId,
|
|
60
60
|
format: flags['result-format'],
|
|
61
61
|
results: response,
|
|
62
62
|
jsonEnabled: this.jsonEnabled(),
|
|
@@ -64,7 +64,7 @@ export default class AgentTestResume extends SfCommand {
|
|
|
64
64
|
});
|
|
65
65
|
return {
|
|
66
66
|
status: 'COMPLETED',
|
|
67
|
-
|
|
67
|
+
runId,
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -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,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,mBAAmB,CAAC,CAAC;AAOxF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ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,EAAE,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/E,IAAI,SAAS;YAAE,MAAM,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAE5D,GAAG,CAAC,IAAI,EAAE,CAAC;QAEX,MAAM,iBAAiB,CAAC;YACtB,EAAE,EAAE,KAAK;YACT,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,KAAK;SACN,CAAC;IACJ,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { SfError } from '@salesforce/core';
|
|
3
|
+
import { CLIError } from '@oclif/core/errors';
|
|
2
4
|
export type AgentTestRunResult = {
|
|
3
|
-
|
|
5
|
+
runId: string;
|
|
4
6
|
status: string;
|
|
5
7
|
};
|
|
6
8
|
export default class AgentTestRun extends SfCommand<AgentTestRunResult> {
|
|
@@ -16,5 +18,7 @@ export default class AgentTestRun extends SfCommand<AgentTestRunResult> {
|
|
|
16
18
|
'result-format': import("@oclif/core/interfaces").OptionFlag<"json" | "human" | "junit" | "tap", import("@oclif/core/interfaces").CustomOptions>;
|
|
17
19
|
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
20
|
};
|
|
21
|
+
private mso;
|
|
19
22
|
run(): Promise<AgentTestRunResult>;
|
|
23
|
+
protected catch(error: Error | SfError | CLIError): Promise<never>;
|
|
20
24
|
}
|
|
@@ -38,22 +38,23 @@ export default class AgentTestRun extends SfCommand {
|
|
|
38
38
|
'result-format': resultFormatFlag(),
|
|
39
39
|
'output-dir': testOutputDirFlag(),
|
|
40
40
|
};
|
|
41
|
+
mso;
|
|
41
42
|
async run() {
|
|
42
43
|
const { flags } = await this.parse(AgentTestRun);
|
|
43
|
-
|
|
44
|
-
mso.start();
|
|
44
|
+
this.mso = new TestStages({ title: `Agent Test Run: ${flags.name}`, jsonEnabled: this.jsonEnabled() });
|
|
45
|
+
this.mso.start();
|
|
45
46
|
const agentTester = new AgentTester(flags['target-org'].getConnection(flags['api-version']));
|
|
46
47
|
const response = await agentTester.start(flags.name);
|
|
47
|
-
mso.update({ id: response.
|
|
48
|
+
this.mso.update({ id: response.runId });
|
|
48
49
|
const agentTestCache = await AgentTestCache.create();
|
|
49
|
-
await agentTestCache.createCacheEntry(response.
|
|
50
|
+
await agentTestCache.createCacheEntry(response.runId, flags.name);
|
|
50
51
|
if (flags.wait?.minutes) {
|
|
51
|
-
const { completed, response: detailsResponse } = await mso.poll(agentTester, response.
|
|
52
|
+
const { completed, response: detailsResponse } = await this.mso.poll(agentTester, response.runId, flags.wait);
|
|
52
53
|
if (completed)
|
|
53
|
-
await agentTestCache.removeCacheEntry(response.
|
|
54
|
-
mso.stop();
|
|
54
|
+
await agentTestCache.removeCacheEntry(response.runId);
|
|
55
|
+
this.mso.stop();
|
|
55
56
|
await handleTestResults({
|
|
56
|
-
id: response.
|
|
57
|
+
id: response.runId,
|
|
57
58
|
format: flags['result-format'],
|
|
58
59
|
results: detailsResponse,
|
|
59
60
|
jsonEnabled: this.jsonEnabled(),
|
|
@@ -61,14 +62,18 @@ export default class AgentTestRun extends SfCommand {
|
|
|
61
62
|
});
|
|
62
63
|
return {
|
|
63
64
|
status: 'COMPLETED',
|
|
64
|
-
|
|
65
|
+
runId: response.runId,
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
68
|
else {
|
|
68
|
-
mso.stop();
|
|
69
|
-
this.log(`Run ${colorize('dim', `sf agent test resume --job-id ${response.
|
|
69
|
+
this.mso.stop();
|
|
70
|
+
this.log(`Run ${colorize('dim', `sf agent test resume --job-id ${response.runId}`)} to resuming watching this test.`);
|
|
70
71
|
}
|
|
71
72
|
return response;
|
|
72
73
|
}
|
|
74
|
+
catch(error) {
|
|
75
|
+
this.mso?.error();
|
|
76
|
+
return super.catch(error);
|
|
77
|
+
}
|
|
73
78
|
}
|
|
74
79
|
//# sourceMappingURL=run.js.map
|
|
@@ -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,
|
|
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,EAAW,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC;AAQrF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAA6B;IAC9D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UA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AC;QACJ,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAES,KAAK,CAAC,KAAiC;QAC/C,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate an agent template for packaging.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Generate agent template metadata to for packaging your agent.
|
|
8
|
+
|
|
9
|
+
# flags.agent-api-name.summary
|
|
10
|
+
|
|
11
|
+
API name of an existing Bot.
|
|
12
|
+
|
|
13
|
+
# flags.output-dir.summary
|
|
14
|
+
|
|
15
|
+
Directory to write the agent template.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Generate an agent template from a Bot API name in your default package dir:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --agent-api-name My_Packaged_Agent
|