@salesforce/plugin-agent 1.30.0 → 1.30.2
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 +22 -20
- package/lib/commands/agent/generate/authoring-bundle.d.ts +1 -0
- package/lib/commands/agent/generate/authoring-bundle.js +72 -43
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -1
- package/messages/agent.generate.authoring-bundle.md +12 -0
- package/oclif.manifest.json +91 -85
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ EXAMPLES
|
|
|
116
116
|
$ sf agent activate --api-name Resort_Manager --target-org my-org
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
119
|
+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/activate.ts)_
|
|
120
120
|
|
|
121
121
|
## `sf agent create`
|
|
122
122
|
|
|
@@ -183,7 +183,7 @@ EXAMPLES
|
|
|
183
183
|
$ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
186
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/create.ts)_
|
|
187
187
|
|
|
188
188
|
## `sf agent deactivate`
|
|
189
189
|
|
|
@@ -223,7 +223,7 @@ EXAMPLES
|
|
|
223
223
|
$ sf agent deactivate --api-name Resort_Manager --target-org my-org
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
-
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
226
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/deactivate.ts)_
|
|
227
227
|
|
|
228
228
|
## `sf agent generate agent-spec`
|
|
229
229
|
|
|
@@ -330,7 +330,7 @@ EXAMPLES
|
|
|
330
330
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
331
331
|
```
|
|
332
332
|
|
|
333
|
-
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
333
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/generate/agent-spec.ts)_
|
|
334
334
|
|
|
335
335
|
## `sf agent generate authoring-bundle`
|
|
336
336
|
|
|
@@ -339,7 +339,7 @@ Generate an authoring bundle from an existing agent spec YAML file.
|
|
|
339
339
|
```
|
|
340
340
|
USAGE
|
|
341
341
|
$ sf agent generate authoring-bundle -o <value> [--json] [--flags-dir <value>] [--api-name <value>] [--api-version <value>] [-f
|
|
342
|
-
<value>] [--no-spec] [-d <value>] [-n <value>]
|
|
342
|
+
<value>] [--no-spec] [-d <value>] [-n <value>] [--force-overwrite]
|
|
343
343
|
|
|
344
344
|
FLAGS
|
|
345
345
|
-d, --output-dir=<value> Directory where the authoring bundle files are generated.
|
|
@@ -351,6 +351,8 @@ FLAGS
|
|
|
351
351
|
--api-name=<value> API name of the new authoring bundle; if not specified, the API name is derived from the
|
|
352
352
|
authoring bundle name (label); the API name can't exist in the org.
|
|
353
353
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
354
|
+
--force-overwrite Overwrite the existing authoring bundle if one with the same API name already exists
|
|
355
|
+
locally.
|
|
354
356
|
--no-spec Skip prompting for an agent spec and use the default Agent Script boilerplate in the
|
|
355
357
|
generated authoring bundle.
|
|
356
358
|
|
|
@@ -405,7 +407,7 @@ EXAMPLES
|
|
|
405
407
|
other-package-dir/main/default --target-org my-dev-org
|
|
406
408
|
```
|
|
407
409
|
|
|
408
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
410
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/generate/authoring-bundle.ts)_
|
|
409
411
|
|
|
410
412
|
## `sf agent generate template`
|
|
411
413
|
|
|
@@ -453,7 +455,7 @@ EXAMPLES
|
|
|
453
455
|
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
|
|
454
456
|
```
|
|
455
457
|
|
|
456
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
458
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/generate/template.ts)_
|
|
457
459
|
|
|
458
460
|
## `sf agent generate test-spec`
|
|
459
461
|
|
|
@@ -514,7 +516,7 @@ EXAMPLES
|
|
|
514
516
|
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
|
|
515
517
|
```
|
|
516
518
|
|
|
517
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
519
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/generate/test-spec.ts)_
|
|
518
520
|
|
|
519
521
|
## `sf agent preview`
|
|
520
522
|
|
|
@@ -587,7 +589,7 @@ EXAMPLES
|
|
|
587
589
|
$ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview
|
|
588
590
|
```
|
|
589
591
|
|
|
590
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
592
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/preview.ts)_
|
|
591
593
|
|
|
592
594
|
## `sf agent preview end`
|
|
593
595
|
|
|
@@ -642,7 +644,7 @@ EXAMPLES
|
|
|
642
644
|
$ sf agent preview end --authoring-bundle My_Local_Agent
|
|
643
645
|
```
|
|
644
646
|
|
|
645
|
-
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
647
|
+
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/preview/end.ts)_
|
|
646
648
|
|
|
647
649
|
## `sf agent preview send`
|
|
648
650
|
|
|
@@ -700,7 +702,7 @@ EXAMPLES
|
|
|
700
702
|
$ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
|
|
701
703
|
```
|
|
702
704
|
|
|
703
|
-
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
705
|
+
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/preview/send.ts)_
|
|
704
706
|
|
|
705
707
|
## `sf agent preview sessions`
|
|
706
708
|
|
|
@@ -733,7 +735,7 @@ EXAMPLES
|
|
|
733
735
|
$ sf agent preview sessions
|
|
734
736
|
```
|
|
735
737
|
|
|
736
|
-
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
738
|
+
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/preview/sessions.ts)_
|
|
737
739
|
|
|
738
740
|
## `sf agent preview start`
|
|
739
741
|
|
|
@@ -790,7 +792,7 @@ EXAMPLES
|
|
|
790
792
|
$ sf agent preview start --api-name My_Published_Agent
|
|
791
793
|
```
|
|
792
794
|
|
|
793
|
-
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
795
|
+
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/preview/start.ts)_
|
|
794
796
|
|
|
795
797
|
## `sf agent publish authoring-bundle`
|
|
796
798
|
|
|
@@ -839,7 +841,7 @@ EXAMPLES
|
|
|
839
841
|
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --target-org my-dev-org
|
|
840
842
|
```
|
|
841
843
|
|
|
842
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
844
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/publish/authoring-bundle.ts)_
|
|
843
845
|
|
|
844
846
|
## `sf agent test create`
|
|
845
847
|
|
|
@@ -894,7 +896,7 @@ EXAMPLES
|
|
|
894
896
|
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
|
|
895
897
|
```
|
|
896
898
|
|
|
897
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
899
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/test/create.ts)_
|
|
898
900
|
|
|
899
901
|
## `sf agent test list`
|
|
900
902
|
|
|
@@ -929,7 +931,7 @@ EXAMPLES
|
|
|
929
931
|
$ sf agent test list --target-org my-org
|
|
930
932
|
```
|
|
931
933
|
|
|
932
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
934
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/test/list.ts)_
|
|
933
935
|
|
|
934
936
|
## `sf agent test results`
|
|
935
937
|
|
|
@@ -995,7 +997,7 @@ FLAG DESCRIPTIONS
|
|
|
995
997
|
expression when using custom evaluations.
|
|
996
998
|
```
|
|
997
999
|
|
|
998
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
1000
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/test/results.ts)_
|
|
999
1001
|
|
|
1000
1002
|
## `sf agent test resume`
|
|
1001
1003
|
|
|
@@ -1068,7 +1070,7 @@ FLAG DESCRIPTIONS
|
|
|
1068
1070
|
expression when using custom evaluations.
|
|
1069
1071
|
```
|
|
1070
1072
|
|
|
1071
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
1073
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/test/resume.ts)_
|
|
1072
1074
|
|
|
1073
1075
|
## `sf agent test run`
|
|
1074
1076
|
|
|
@@ -1142,7 +1144,7 @@ FLAG DESCRIPTIONS
|
|
|
1142
1144
|
expression when using custom evaluations.
|
|
1143
1145
|
```
|
|
1144
1146
|
|
|
1145
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
1147
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/test/run.ts)_
|
|
1146
1148
|
|
|
1147
1149
|
## `sf agent validate authoring-bundle`
|
|
1148
1150
|
|
|
@@ -1189,6 +1191,6 @@ EXAMPLES
|
|
|
1189
1191
|
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
|
|
1190
1192
|
```
|
|
1191
1193
|
|
|
1192
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.
|
|
1194
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.30.2/src/commands/agent/validate/authoring-bundle.ts)_
|
|
1193
1195
|
|
|
1194
1196
|
<!-- commandsstop -->
|
|
@@ -17,6 +17,7 @@ export default class AgentGenerateAuthoringBundle extends SfCommand<AgentGenerat
|
|
|
17
17
|
'no-spec': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
18
|
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
19
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'force-overwrite': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
21
|
};
|
|
21
22
|
run(): Promise<AgentGenerateAuthoringBundleResult>;
|
|
22
23
|
}
|
|
@@ -21,8 +21,69 @@ import { ScriptAgent } from '@salesforce/agents';
|
|
|
21
21
|
import YAML from 'yaml';
|
|
22
22
|
import { select, input as inquirerInput } from '@inquirer/prompts';
|
|
23
23
|
import { theme } from '../../../inquirer-theme.js';
|
|
24
|
+
import yesNoOrCancel from '../../../yes-no-cancel.js';
|
|
24
25
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
25
26
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.authoring-bundle');
|
|
27
|
+
async function resolveUniqueBundle(baseOutputDir, forceOverwrite, flagName, flagApiName) {
|
|
28
|
+
const name = flagName ??
|
|
29
|
+
(await inquirerInput({
|
|
30
|
+
message: messages.getMessage('wizard.name.prompt'),
|
|
31
|
+
validate: (d) => {
|
|
32
|
+
if (d.length === 0) {
|
|
33
|
+
return messages.getMessage('wizard.name.validation.required');
|
|
34
|
+
}
|
|
35
|
+
if (d.trim().length === 0) {
|
|
36
|
+
return messages.getMessage('wizard.name.validation.empty');
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
},
|
|
40
|
+
theme,
|
|
41
|
+
}));
|
|
42
|
+
let apiName = flagApiName ?? '';
|
|
43
|
+
if (!apiName) {
|
|
44
|
+
apiName = generateApiName(name);
|
|
45
|
+
const promptedValue = await inquirerInput({
|
|
46
|
+
message: messages.getMessage('flags.api-name.prompt'),
|
|
47
|
+
validate: (d) => {
|
|
48
|
+
if (d.length === 0) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
if (d.length > 80) {
|
|
52
|
+
return 'API name cannot be over 80 characters.';
|
|
53
|
+
}
|
|
54
|
+
const regex = /^[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]+$/;
|
|
55
|
+
if (!regex.test(d)) {
|
|
56
|
+
return 'Invalid API name.';
|
|
57
|
+
}
|
|
58
|
+
return true;
|
|
59
|
+
},
|
|
60
|
+
default: apiName,
|
|
61
|
+
theme,
|
|
62
|
+
});
|
|
63
|
+
if (promptedValue?.length) {
|
|
64
|
+
apiName = promptedValue;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (forceOverwrite) {
|
|
68
|
+
return { name, apiName };
|
|
69
|
+
}
|
|
70
|
+
const bundleDir = join(baseOutputDir, 'aiAuthoringBundles', apiName);
|
|
71
|
+
if (!existsSync(bundleDir)) {
|
|
72
|
+
return { name, apiName };
|
|
73
|
+
}
|
|
74
|
+
const confirmation = await yesNoOrCancel({
|
|
75
|
+
message: messages.getMessage('prompt.overwrite', [apiName]),
|
|
76
|
+
default: false,
|
|
77
|
+
});
|
|
78
|
+
if (confirmation === 'cancel') {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
if (confirmation) {
|
|
82
|
+
return { name, apiName };
|
|
83
|
+
}
|
|
84
|
+
// User chose "no" — restart from the beginning without flag values
|
|
85
|
+
return resolveUniqueBundle(baseOutputDir, false);
|
|
86
|
+
}
|
|
26
87
|
export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
27
88
|
static summary = messages.getMessage('summary');
|
|
28
89
|
static description = messages.getMessage('description');
|
|
@@ -49,6 +110,9 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
49
110
|
summary: messages.getMessage('flags.name.summary'),
|
|
50
111
|
char: 'n',
|
|
51
112
|
}),
|
|
113
|
+
'force-overwrite': Flags.boolean({
|
|
114
|
+
summary: messages.getMessage('flags.force-overwrite.summary'),
|
|
115
|
+
}),
|
|
52
116
|
};
|
|
53
117
|
async run() {
|
|
54
118
|
const { flags } = await this.parse(AgentGenerateAuthoringBundle);
|
|
@@ -110,51 +174,16 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
110
174
|
spec = undefined;
|
|
111
175
|
}
|
|
112
176
|
}
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return messages.getMessage('wizard.name.validation.required');
|
|
120
|
-
}
|
|
121
|
-
if (d.trim().length === 0) {
|
|
122
|
-
return messages.getMessage('wizard.name.validation.empty');
|
|
123
|
-
}
|
|
124
|
-
return true;
|
|
125
|
-
},
|
|
126
|
-
theme,
|
|
127
|
-
}));
|
|
128
|
-
// Resolve API name: --api-name flag or auto-generate from name with prompt to confirm
|
|
129
|
-
let bundleApiName = flags['api-name'];
|
|
130
|
-
if (!bundleApiName) {
|
|
131
|
-
bundleApiName = generateApiName(name);
|
|
132
|
-
const promptedValue = await inquirerInput({
|
|
133
|
-
message: messages.getMessage('flags.api-name.prompt'),
|
|
134
|
-
validate: (d) => {
|
|
135
|
-
if (d.length === 0) {
|
|
136
|
-
return true;
|
|
137
|
-
}
|
|
138
|
-
if (d.length > 80) {
|
|
139
|
-
return 'API name cannot be over 80 characters.';
|
|
140
|
-
}
|
|
141
|
-
const regex = /^[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]+$/;
|
|
142
|
-
if (!regex.test(d)) {
|
|
143
|
-
return 'Invalid API name.';
|
|
144
|
-
}
|
|
145
|
-
return true;
|
|
146
|
-
},
|
|
147
|
-
default: bundleApiName,
|
|
148
|
-
theme,
|
|
149
|
-
});
|
|
150
|
-
if (promptedValue?.length) {
|
|
151
|
-
bundleApiName = promptedValue;
|
|
152
|
-
}
|
|
177
|
+
const defaultOutputDir = join(this.project.getDefaultPackage().fullPath, 'main', 'default');
|
|
178
|
+
const baseOutputDir = outputDir ?? defaultOutputDir;
|
|
179
|
+
const resolved = await resolveUniqueBundle(baseOutputDir, flags['force-overwrite'] ?? false, flags['name'], flags['api-name']);
|
|
180
|
+
if (!resolved) {
|
|
181
|
+
this.log(messages.getMessage('info.cancel'));
|
|
182
|
+
return { agentPath: '', metaXmlPath: '', outputDir: '' };
|
|
153
183
|
}
|
|
184
|
+
const { name, apiName: bundleApiName } = resolved;
|
|
154
185
|
try {
|
|
155
|
-
|
|
156
|
-
const defaultOutputDir = join(this.project.getDefaultPackage().fullPath, 'main', 'default');
|
|
157
|
-
const targetOutputDir = join(outputDir ?? defaultOutputDir, 'aiAuthoringBundles', bundleApiName);
|
|
186
|
+
const targetOutputDir = join(baseOutputDir, 'aiAuthoringBundles', bundleApiName);
|
|
158
187
|
// Generate file paths
|
|
159
188
|
const agentPath = join(targetOutputDir, `${bundleApiName}.agent`);
|
|
160
189
|
const metaXmlPath = join(targetOutputDir, `${bundleApiName}.bundle-meta.xml`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/authoring-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAgB,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
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.
|
|
126
126
|
|
|
127
|
+
# flags.force-overwrite.summary
|
|
128
|
+
|
|
129
|
+
Overwrite the existing authoring bundle if one with the same API name already exists locally.
|
|
130
|
+
|
|
131
|
+
# prompt.overwrite
|
|
132
|
+
|
|
133
|
+
An authoring bundle with the API name "%s" already exists. Overwrite it?
|
|
134
|
+
|
|
135
|
+
# info.cancel
|
|
136
|
+
|
|
137
|
+
Canceled authoring bundle generation.
|
|
138
|
+
|
|
127
139
|
# warning.noSpecDir
|
|
128
140
|
|
|
129
141
|
No agent spec directory found at %s.
|
package/oclif.manifest.json
CHANGED
|
@@ -611,6 +611,12 @@
|
|
|
611
611
|
"hasDynamicHelp": false,
|
|
612
612
|
"multiple": false,
|
|
613
613
|
"type": "option"
|
|
614
|
+
},
|
|
615
|
+
"force-overwrite": {
|
|
616
|
+
"name": "force-overwrite",
|
|
617
|
+
"summary": "Overwrite the existing authoring bundle if one with the same API name already exists locally.",
|
|
618
|
+
"allowNo": false,
|
|
619
|
+
"type": "boolean"
|
|
614
620
|
}
|
|
615
621
|
},
|
|
616
622
|
"hasDynamicHelp": true,
|
|
@@ -1220,6 +1226,90 @@
|
|
|
1220
1226
|
"start:preview:agent"
|
|
1221
1227
|
]
|
|
1222
1228
|
},
|
|
1229
|
+
"agent:validate:authoring-bundle": {
|
|
1230
|
+
"aliases": [],
|
|
1231
|
+
"args": {},
|
|
1232
|
+
"description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
|
|
1233
|
+
"examples": [
|
|
1234
|
+
"Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1235
|
+
"Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
|
|
1236
|
+
],
|
|
1237
|
+
"flags": {
|
|
1238
|
+
"json": {
|
|
1239
|
+
"description": "Format output as json.",
|
|
1240
|
+
"helpGroup": "GLOBAL",
|
|
1241
|
+
"name": "json",
|
|
1242
|
+
"allowNo": false,
|
|
1243
|
+
"type": "boolean"
|
|
1244
|
+
},
|
|
1245
|
+
"flags-dir": {
|
|
1246
|
+
"helpGroup": "GLOBAL",
|
|
1247
|
+
"name": "flags-dir",
|
|
1248
|
+
"summary": "Import flag values from a directory.",
|
|
1249
|
+
"hasDynamicHelp": false,
|
|
1250
|
+
"multiple": false,
|
|
1251
|
+
"type": "option"
|
|
1252
|
+
},
|
|
1253
|
+
"target-org": {
|
|
1254
|
+
"char": "o",
|
|
1255
|
+
"name": "target-org",
|
|
1256
|
+
"noCacheDefault": true,
|
|
1257
|
+
"required": true,
|
|
1258
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1259
|
+
"hasDynamicHelp": true,
|
|
1260
|
+
"multiple": false,
|
|
1261
|
+
"type": "option"
|
|
1262
|
+
},
|
|
1263
|
+
"api-version": {
|
|
1264
|
+
"description": "Override the api version used for api requests made by this command",
|
|
1265
|
+
"name": "api-version",
|
|
1266
|
+
"hasDynamicHelp": false,
|
|
1267
|
+
"multiple": false,
|
|
1268
|
+
"type": "option"
|
|
1269
|
+
},
|
|
1270
|
+
"api-name": {
|
|
1271
|
+
"char": "n",
|
|
1272
|
+
"name": "api-name",
|
|
1273
|
+
"summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1274
|
+
"hasDynamicHelp": false,
|
|
1275
|
+
"multiple": false,
|
|
1276
|
+
"type": "option"
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
"hasDynamicHelp": true,
|
|
1280
|
+
"hiddenAliases": [],
|
|
1281
|
+
"id": "agent:validate:authoring-bundle",
|
|
1282
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
1283
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
1284
|
+
"pluginType": "core",
|
|
1285
|
+
"strict": true,
|
|
1286
|
+
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
1287
|
+
"enableJsonFlag": true,
|
|
1288
|
+
"requiresProject": true,
|
|
1289
|
+
"FLAGGABLE_PROMPTS": {
|
|
1290
|
+
"api-name": {
|
|
1291
|
+
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1292
|
+
"promptMessage": "API name of the authoring bundle to validate"
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"isESM": true,
|
|
1296
|
+
"relativePath": [
|
|
1297
|
+
"lib",
|
|
1298
|
+
"commands",
|
|
1299
|
+
"agent",
|
|
1300
|
+
"validate",
|
|
1301
|
+
"authoring-bundle.js"
|
|
1302
|
+
],
|
|
1303
|
+
"aliasPermutations": [],
|
|
1304
|
+
"permutations": [
|
|
1305
|
+
"agent:validate:authoring-bundle",
|
|
1306
|
+
"validate:agent:authoring-bundle",
|
|
1307
|
+
"validate:authoring-bundle:agent",
|
|
1308
|
+
"agent:authoring-bundle:validate",
|
|
1309
|
+
"authoring-bundle:agent:validate",
|
|
1310
|
+
"authoring-bundle:validate:agent"
|
|
1311
|
+
]
|
|
1312
|
+
},
|
|
1223
1313
|
"agent:test:create": {
|
|
1224
1314
|
"aliases": [],
|
|
1225
1315
|
"args": {},
|
|
@@ -1733,91 +1823,7 @@
|
|
|
1733
1823
|
"run:agent:test",
|
|
1734
1824
|
"run:test:agent"
|
|
1735
1825
|
]
|
|
1736
|
-
},
|
|
1737
|
-
"agent:validate:authoring-bundle": {
|
|
1738
|
-
"aliases": [],
|
|
1739
|
-
"args": {},
|
|
1740
|
-
"description": "An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension \".agent\") that fully describes the agent using the Agent Script language.\n\nThis command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.\n\nThis command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.",
|
|
1741
|
-
"examples": [
|
|
1742
|
-
"Validate an authoring bundle by being prompted for its API name; use your default org:\n<%= config.bin %> <%= command.id %>",
|
|
1743
|
-
"Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias \"my-dev-org\":\n<%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle --target-org my-dev-org"
|
|
1744
|
-
],
|
|
1745
|
-
"flags": {
|
|
1746
|
-
"json": {
|
|
1747
|
-
"description": "Format output as json.",
|
|
1748
|
-
"helpGroup": "GLOBAL",
|
|
1749
|
-
"name": "json",
|
|
1750
|
-
"allowNo": false,
|
|
1751
|
-
"type": "boolean"
|
|
1752
|
-
},
|
|
1753
|
-
"flags-dir": {
|
|
1754
|
-
"helpGroup": "GLOBAL",
|
|
1755
|
-
"name": "flags-dir",
|
|
1756
|
-
"summary": "Import flag values from a directory.",
|
|
1757
|
-
"hasDynamicHelp": false,
|
|
1758
|
-
"multiple": false,
|
|
1759
|
-
"type": "option"
|
|
1760
|
-
},
|
|
1761
|
-
"target-org": {
|
|
1762
|
-
"char": "o",
|
|
1763
|
-
"name": "target-org",
|
|
1764
|
-
"noCacheDefault": true,
|
|
1765
|
-
"required": true,
|
|
1766
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1767
|
-
"hasDynamicHelp": true,
|
|
1768
|
-
"multiple": false,
|
|
1769
|
-
"type": "option"
|
|
1770
|
-
},
|
|
1771
|
-
"api-version": {
|
|
1772
|
-
"description": "Override the api version used for api requests made by this command",
|
|
1773
|
-
"name": "api-version",
|
|
1774
|
-
"hasDynamicHelp": false,
|
|
1775
|
-
"multiple": false,
|
|
1776
|
-
"type": "option"
|
|
1777
|
-
},
|
|
1778
|
-
"api-name": {
|
|
1779
|
-
"char": "n",
|
|
1780
|
-
"name": "api-name",
|
|
1781
|
-
"summary": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1782
|
-
"hasDynamicHelp": false,
|
|
1783
|
-
"multiple": false,
|
|
1784
|
-
"type": "option"
|
|
1785
|
-
}
|
|
1786
|
-
},
|
|
1787
|
-
"hasDynamicHelp": true,
|
|
1788
|
-
"hiddenAliases": [],
|
|
1789
|
-
"id": "agent:validate:authoring-bundle",
|
|
1790
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
1791
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
1792
|
-
"pluginType": "core",
|
|
1793
|
-
"strict": true,
|
|
1794
|
-
"summary": "Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.",
|
|
1795
|
-
"enableJsonFlag": true,
|
|
1796
|
-
"requiresProject": true,
|
|
1797
|
-
"FLAGGABLE_PROMPTS": {
|
|
1798
|
-
"api-name": {
|
|
1799
|
-
"message": "API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from.",
|
|
1800
|
-
"promptMessage": "API name of the authoring bundle to validate"
|
|
1801
|
-
}
|
|
1802
|
-
},
|
|
1803
|
-
"isESM": true,
|
|
1804
|
-
"relativePath": [
|
|
1805
|
-
"lib",
|
|
1806
|
-
"commands",
|
|
1807
|
-
"agent",
|
|
1808
|
-
"validate",
|
|
1809
|
-
"authoring-bundle.js"
|
|
1810
|
-
],
|
|
1811
|
-
"aliasPermutations": [],
|
|
1812
|
-
"permutations": [
|
|
1813
|
-
"agent:validate:authoring-bundle",
|
|
1814
|
-
"validate:agent:authoring-bundle",
|
|
1815
|
-
"validate:authoring-bundle:agent",
|
|
1816
|
-
"agent:authoring-bundle:validate",
|
|
1817
|
-
"authoring-bundle:agent:validate",
|
|
1818
|
-
"authoring-bundle:validate:agent"
|
|
1819
|
-
]
|
|
1820
1826
|
}
|
|
1821
1827
|
},
|
|
1822
|
-
"version": "1.30.
|
|
1828
|
+
"version": "1.30.2"
|
|
1823
1829
|
}
|
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.30.
|
|
4
|
+
"version": "1.30.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"enableO11y": true,
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@inquirer/prompts": "^7.10.1",
|
|
12
12
|
"@oclif/core": "^4",
|
|
13
13
|
"@oclif/multi-stage-output": "^0.8.29",
|
|
14
|
-
"@salesforce/agents": "^0.
|
|
15
|
-
"@salesforce/core": "^8.
|
|
14
|
+
"@salesforce/agents": "^0.23.1",
|
|
15
|
+
"@salesforce/core": "^8.26.2",
|
|
16
16
|
"@salesforce/kit": "^3.2.4",
|
|
17
17
|
"@salesforce/sf-plugins-core": "^12.2.6",
|
|
18
18
|
"@salesforce/source-deploy-retrieve": "^12.31.11",
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"exports": "./lib/index.js",
|
|
240
240
|
"type": "module",
|
|
241
241
|
"sfdx": {
|
|
242
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.30.
|
|
243
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.30.
|
|
242
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.30.2.crt",
|
|
243
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.30.2.sig"
|
|
244
244
|
}
|
|
245
245
|
}
|