@salesforce/plugin-agent 1.23.4 → 1.23.5

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
@@ -130,7 +130,7 @@ EXAMPLES
130
130
  $ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
131
131
  ```
132
132
 
133
- _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/create.ts)_
133
+ _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/create.ts)_
134
134
 
135
135
  ## `sf agent generate agent-spec`
136
136
 
@@ -235,7 +235,7 @@ EXAMPLES
235
235
  $ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
236
236
  ```
237
237
 
238
- _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/generate/agent-spec.ts)_
238
+ _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/generate/agent-spec.ts)_
239
239
 
240
240
  ## `sf agent generate template`
241
241
 
@@ -283,7 +283,7 @@ EXAMPLES
283
283
  force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
284
284
  ```
285
285
 
286
- _See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/generate/template.ts)_
286
+ _See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/generate/template.ts)_
287
287
 
288
288
  ## `sf agent generate test-spec`
289
289
 
@@ -341,7 +341,7 @@ EXAMPLES
341
341
  force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
342
342
  ```
343
343
 
344
- _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/generate/test-spec.ts)_
344
+ _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/generate/test-spec.ts)_
345
345
 
346
346
  ## `sf agent preview`
347
347
 
@@ -404,7 +404,7 @@ EXAMPLES
404
404
  transcripts/my-preview
405
405
  ```
406
406
 
407
- _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/preview.ts)_
407
+ _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/preview.ts)_
408
408
 
409
409
  ## `sf agent test create`
410
410
 
@@ -459,7 +459,7 @@ EXAMPLES
459
459
  $ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
460
460
  ```
461
461
 
462
- _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/test/create.ts)_
462
+ _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/test/create.ts)_
463
463
 
464
464
  ## `sf agent test list`
465
465
 
@@ -494,7 +494,7 @@ EXAMPLES
494
494
  $ sf agent test list --target-org my-org
495
495
  ```
496
496
 
497
- _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/test/list.ts)_
497
+ _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/test/list.ts)_
498
498
 
499
499
  ## `sf agent test results`
500
500
 
@@ -550,7 +550,7 @@ FLAG DESCRIPTIONS
550
550
  test results aren't written.
551
551
  ```
552
552
 
553
- _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/test/results.ts)_
553
+ _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/test/results.ts)_
554
554
 
555
555
  ## `sf agent test resume`
556
556
 
@@ -613,7 +613,7 @@ FLAG DESCRIPTIONS
613
613
  test results aren't written.
614
614
  ```
615
615
 
616
- _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/test/resume.ts)_
616
+ _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/test/resume.ts)_
617
617
 
618
618
  ## `sf agent test run`
619
619
 
@@ -677,6 +677,6 @@ FLAG DESCRIPTIONS
677
677
  test results aren't written.
678
678
  ```
679
679
 
680
- _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.4/src/commands/agent/test/run.ts)_
680
+ _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.23.5/src/commands/agent/test/run.ts)_
681
681
 
682
682
  <!-- commandsstop -->
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-agent",
3
- "version": "1.23.4",
3
+ "version": "1.23.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/plugin-agent",
9
- "version": "1.23.4",
9
+ "version": "1.23.5",
10
10
  "license": "BSD-3-Clause",
11
11
  "dependencies": {
12
12
  "@inquirer/core": "^10.1.6",
@@ -532,92 +532,6 @@
532
532
  "test-spec:generate:agent"
533
533
  ]
534
534
  },
535
- "agent:test:cancel": {
536
- "aliases": [],
537
- "args": {},
538
- "description": "This command requires a job ID, which the original \"agent test run\" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.",
539
- "examples": [
540
- "Cancel an agent test currently running in your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ",
541
- "Cancel the most recently run agent test in the org with alias \"my-org\":\n<%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ --target-org my-org"
542
- ],
543
- "flags": {
544
- "json": {
545
- "description": "Format output as json.",
546
- "helpGroup": "GLOBAL",
547
- "name": "json",
548
- "allowNo": false,
549
- "type": "boolean"
550
- },
551
- "flags-dir": {
552
- "helpGroup": "GLOBAL",
553
- "name": "flags-dir",
554
- "summary": "Import flag values from a directory.",
555
- "hasDynamicHelp": false,
556
- "multiple": false,
557
- "type": "option"
558
- },
559
- "target-org": {
560
- "char": "o",
561
- "name": "target-org",
562
- "noCacheDefault": true,
563
- "required": true,
564
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
565
- "hasDynamicHelp": true,
566
- "multiple": false,
567
- "type": "option"
568
- },
569
- "api-version": {
570
- "description": "Override the api version used for api requests made by this command",
571
- "name": "api-version",
572
- "hasDynamicHelp": false,
573
- "multiple": false,
574
- "type": "option"
575
- },
576
- "job-id": {
577
- "char": "i",
578
- "name": "job-id",
579
- "summary": "Job ID of the running agent test that you want to cancel.",
580
- "hasDynamicHelp": false,
581
- "multiple": false,
582
- "type": "option"
583
- },
584
- "use-most-recent": {
585
- "char": "r",
586
- "name": "use-most-recent",
587
- "summary": "Use the job ID of the most recently-run agent test.",
588
- "allowNo": false,
589
- "type": "boolean"
590
- }
591
- },
592
- "hasDynamicHelp": true,
593
- "hidden": true,
594
- "hiddenAliases": [],
595
- "id": "agent:test:cancel",
596
- "pluginAlias": "@salesforce/plugin-agent",
597
- "pluginName": "@salesforce/plugin-agent",
598
- "pluginType": "core",
599
- "state": "beta",
600
- "strict": true,
601
- "summary": "Cancel an agent test that's currently running in your org.",
602
- "enableJsonFlag": true,
603
- "isESM": true,
604
- "relativePath": [
605
- "lib",
606
- "commands",
607
- "agent",
608
- "test",
609
- "cancel.js"
610
- ],
611
- "aliasPermutations": [],
612
- "permutations": [
613
- "agent:test:cancel",
614
- "test:agent:cancel",
615
- "test:cancel:agent",
616
- "agent:cancel:test",
617
- "cancel:agent:test",
618
- "cancel:test:agent"
619
- ]
620
- },
621
535
  "agent:test:create": {
622
536
  "aliases": [],
623
537
  "args": {},
@@ -1112,5 +1026,5 @@
1112
1026
  ]
1113
1027
  }
1114
1028
  },
1115
- "version": "1.23.4"
1029
+ "version": "1.23.5"
1116
1030
  }
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.23.4",
4
+ "version": "1.23.5",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -229,7 +229,7 @@
229
229
  "exports": "./lib/index.js",
230
230
  "type": "module",
231
231
  "sfdx": {
232
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.23.4.crt",
233
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.23.4.sig"
232
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.23.5.crt",
233
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.23.5.sig"
234
234
  }
235
235
  }
@@ -1,21 +0,0 @@
1
- import { SfCommand } from '@salesforce/sf-plugins-core';
2
- export type AgentTestCancelResult = {
3
- runId: string;
4
- success: boolean;
5
- errorCode?: string;
6
- message?: string;
7
- };
8
- export default class AgentTestCancel extends SfCommand<AgentTestCancelResult> {
9
- static readonly summary: string;
10
- static readonly description: string;
11
- static readonly examples: string[];
12
- static readonly state = "beta";
13
- static readonly hidden = true;
14
- static readonly flags: {
15
- 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
16
- 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
- 'job-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
- 'use-most-recent': import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
- };
20
- run(): Promise<AgentTestCancelResult>;
21
- }
@@ -1,49 +0,0 @@
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 { AgentTester } from '@salesforce/agents';
10
- import { AgentTestCache } from '../../../agentTestCache.js';
11
- Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
12
- const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.test.cancel');
13
- export default class AgentTestCancel 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 hidden = true;
19
- static flags = {
20
- 'target-org': Flags.requiredOrg(),
21
- 'api-version': Flags.orgApiVersion(),
22
- 'job-id': Flags.string({
23
- char: 'i',
24
- summary: messages.getMessage('flags.job-id.summary'),
25
- exactlyOne: ['use-most-recent', 'job-id'],
26
- }),
27
- 'use-most-recent': Flags.boolean({
28
- char: 'r',
29
- summary: messages.getMessage('flags.use-most-recent.summary'),
30
- exactlyOne: ['use-most-recent', 'job-id'],
31
- }),
32
- };
33
- async run() {
34
- const { flags } = await this.parse(AgentTestCancel);
35
- const agentTestCache = await AgentTestCache.create();
36
- const { runId } = agentTestCache.useIdOrMostRecent(flags['job-id'], flags['use-most-recent']);
37
- this.log(`Canceling tests for AiEvaluation Job: ${runId}`);
38
- const agentTester = new AgentTester(flags['target-org'].getConnection(flags['api-version']));
39
- const result = await agentTester.cancel(runId);
40
- if (result.success) {
41
- await agentTestCache.removeCacheEntry(runId);
42
- }
43
- return {
44
- success: result.success,
45
- runId,
46
- };
47
- }
48
- }
49
- //# sourceMappingURL=cancel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cancel.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+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"}
@@ -1,25 +0,0 @@
1
- # summary
2
-
3
- Cancel an agent test that's currently running in your org.
4
-
5
- # description
6
-
7
- This command requires a job ID, which the original "agent test run" command displays when it completes. You can also use the --use-most-recent flag to see results for the most recently run agent test.
8
-
9
- # flags.job-id.summary
10
-
11
- Job ID of the running agent test that you want to cancel.
12
-
13
- # flags.use-most-recent.summary
14
-
15
- Use the job ID of the most recently-run agent test.
16
-
17
- # examples
18
-
19
- - Cancel an agent test currently running in your default org using a job ID:
20
-
21
- <%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ
22
-
23
- - Cancel the most recently run agent test in the org with alias "my-org":
24
-
25
- <%= config.bin %> <%= command.id %> --job-id 4KBfake0000003F4AQ --target-org my-org
@@ -1,25 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/AgentTestCancelResult",
4
- "definitions": {
5
- "AgentTestCancelResult": {
6
- "type": "object",
7
- "properties": {
8
- "runId": {
9
- "type": "string"
10
- },
11
- "success": {
12
- "type": "boolean"
13
- },
14
- "errorCode": {
15
- "type": "string"
16
- },
17
- "message": {
18
- "type": "string"
19
- }
20
- },
21
- "required": ["runId", "success"],
22
- "additionalProperties": false
23
- }
24
- }
25
- }