@salesforce/plugin-agent 1.28.0 → 1.29.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 +19 -19
- package/lib/commands/agent/generate/authoring-bundle.d.ts +0 -1
- package/lib/commands/agent/generate/authoring-bundle.js +77 -49
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -1
- package/messages/agent.generate.authoring-bundle.md +51 -3
- package/oclif.manifest.json +356 -372
- package/package.json +3 -3
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.
|
|
119
|
+
_See code: [src/commands/agent/activate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/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.
|
|
186
|
+
_See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/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.
|
|
226
|
+
_See code: [src/commands/agent/deactivate.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/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.
|
|
333
|
+
_See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/generate/agent-spec.ts)_
|
|
334
334
|
|
|
335
335
|
## `sf agent generate authoring-bundle`
|
|
336
336
|
|
|
@@ -405,7 +405,7 @@ EXAMPLES
|
|
|
405
405
|
other-package-dir/main/default --target-org my-dev-org
|
|
406
406
|
```
|
|
407
407
|
|
|
408
|
-
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
408
|
+
_See code: [src/commands/agent/generate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/generate/authoring-bundle.ts)_
|
|
409
409
|
|
|
410
410
|
## `sf agent generate template`
|
|
411
411
|
|
|
@@ -453,7 +453,7 @@ EXAMPLES
|
|
|
453
453
|
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
|
|
454
454
|
```
|
|
455
455
|
|
|
456
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
456
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/generate/template.ts)_
|
|
457
457
|
|
|
458
458
|
## `sf agent generate test-spec`
|
|
459
459
|
|
|
@@ -514,7 +514,7 @@ EXAMPLES
|
|
|
514
514
|
force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
|
|
515
515
|
```
|
|
516
516
|
|
|
517
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
517
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/generate/test-spec.ts)_
|
|
518
518
|
|
|
519
519
|
## `sf agent preview`
|
|
520
520
|
|
|
@@ -587,7 +587,7 @@ EXAMPLES
|
|
|
587
587
|
$ sf agent preview --use-live-actions --apex-debug --output-dir transcripts/my-preview
|
|
588
588
|
```
|
|
589
589
|
|
|
590
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
590
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/preview.ts)_
|
|
591
591
|
|
|
592
592
|
## `sf agent preview end`
|
|
593
593
|
|
|
@@ -642,7 +642,7 @@ EXAMPLES
|
|
|
642
642
|
$ sf agent preview end --authoring-bundle My_Local_Agent
|
|
643
643
|
```
|
|
644
644
|
|
|
645
|
-
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
645
|
+
_See code: [src/commands/agent/preview/end.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/preview/end.ts)_
|
|
646
646
|
|
|
647
647
|
## `sf agent preview send`
|
|
648
648
|
|
|
@@ -700,7 +700,7 @@ EXAMPLES
|
|
|
700
700
|
$ sf agent preview send --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
|
|
701
701
|
```
|
|
702
702
|
|
|
703
|
-
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
703
|
+
_See code: [src/commands/agent/preview/send.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/preview/send.ts)_
|
|
704
704
|
|
|
705
705
|
## `sf agent preview sessions`
|
|
706
706
|
|
|
@@ -733,7 +733,7 @@ EXAMPLES
|
|
|
733
733
|
$ sf agent preview sessions
|
|
734
734
|
```
|
|
735
735
|
|
|
736
|
-
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
736
|
+
_See code: [src/commands/agent/preview/sessions.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/preview/sessions.ts)_
|
|
737
737
|
|
|
738
738
|
## `sf agent preview start`
|
|
739
739
|
|
|
@@ -790,7 +790,7 @@ EXAMPLES
|
|
|
790
790
|
$ sf agent preview start --api-name My_Published_Agent
|
|
791
791
|
```
|
|
792
792
|
|
|
793
|
-
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
793
|
+
_See code: [src/commands/agent/preview/start.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/preview/start.ts)_
|
|
794
794
|
|
|
795
795
|
## `sf agent publish authoring-bundle`
|
|
796
796
|
|
|
@@ -839,7 +839,7 @@ EXAMPLES
|
|
|
839
839
|
$ sf agent publish authoring-bundle --api-name MyAuthoringbundle --target-org my-dev-org
|
|
840
840
|
```
|
|
841
841
|
|
|
842
|
-
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
842
|
+
_See code: [src/commands/agent/publish/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/publish/authoring-bundle.ts)_
|
|
843
843
|
|
|
844
844
|
## `sf agent test create`
|
|
845
845
|
|
|
@@ -894,7 +894,7 @@ EXAMPLES
|
|
|
894
894
|
$ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
|
|
895
895
|
```
|
|
896
896
|
|
|
897
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
897
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/test/create.ts)_
|
|
898
898
|
|
|
899
899
|
## `sf agent test list`
|
|
900
900
|
|
|
@@ -929,7 +929,7 @@ EXAMPLES
|
|
|
929
929
|
$ sf agent test list --target-org my-org
|
|
930
930
|
```
|
|
931
931
|
|
|
932
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
932
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/test/list.ts)_
|
|
933
933
|
|
|
934
934
|
## `sf agent test results`
|
|
935
935
|
|
|
@@ -995,7 +995,7 @@ FLAG DESCRIPTIONS
|
|
|
995
995
|
expression when using custom evaluations.
|
|
996
996
|
```
|
|
997
997
|
|
|
998
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
998
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/test/results.ts)_
|
|
999
999
|
|
|
1000
1000
|
## `sf agent test resume`
|
|
1001
1001
|
|
|
@@ -1068,7 +1068,7 @@ FLAG DESCRIPTIONS
|
|
|
1068
1068
|
expression when using custom evaluations.
|
|
1069
1069
|
```
|
|
1070
1070
|
|
|
1071
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1071
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/test/resume.ts)_
|
|
1072
1072
|
|
|
1073
1073
|
## `sf agent test run`
|
|
1074
1074
|
|
|
@@ -1142,7 +1142,7 @@ FLAG DESCRIPTIONS
|
|
|
1142
1142
|
expression when using custom evaluations.
|
|
1143
1143
|
```
|
|
1144
1144
|
|
|
1145
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1145
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/test/run.ts)_
|
|
1146
1146
|
|
|
1147
1147
|
## `sf agent validate authoring-bundle`
|
|
1148
1148
|
|
|
@@ -1189,6 +1189,6 @@ EXAMPLES
|
|
|
1189
1189
|
$ sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
|
|
1190
1190
|
```
|
|
1191
1191
|
|
|
1192
|
-
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
1192
|
+
_See code: [src/commands/agent/validate/authoring-bundle.ts](https://github.com/salesforcecli/plugin-agent/blob/1.29.0/src/commands/agent/validate/authoring-bundle.ts)_
|
|
1193
1193
|
|
|
1194
1194
|
<!-- commandsstop -->
|
|
@@ -18,6 +18,5 @@ export default class AgentGenerateAuthoringBundle extends SfCommand<AgentGenerat
|
|
|
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
20
|
};
|
|
21
|
-
private static readonly FLAGGABLE_PROMPTS;
|
|
22
21
|
run(): Promise<AgentGenerateAuthoringBundleResult>;
|
|
23
22
|
}
|
|
@@ -14,14 +14,13 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { join, resolve } from 'node:path';
|
|
17
|
-
import { readFileSync, existsSync } from 'node:fs';
|
|
17
|
+
import { readFileSync, existsSync, readdirSync } from 'node:fs';
|
|
18
18
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
19
19
|
import { generateApiName, Messages, SfError } from '@salesforce/core';
|
|
20
20
|
import { ScriptAgent } from '@salesforce/agents';
|
|
21
21
|
import YAML from 'yaml';
|
|
22
|
-
import { input as inquirerInput } from '@inquirer/prompts';
|
|
22
|
+
import { select, input as inquirerInput } from '@inquirer/prompts';
|
|
23
23
|
import { theme } from '../../../inquirer-theme.js';
|
|
24
|
-
import { promptForFlag, promptForSpecYaml } from '../../../flags.js';
|
|
25
24
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
26
25
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.authoring-bundle');
|
|
27
26
|
export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
@@ -51,50 +50,13 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
51
50
|
char: 'n',
|
|
52
51
|
}),
|
|
53
52
|
};
|
|
54
|
-
static FLAGGABLE_PROMPTS = {
|
|
55
|
-
name: {
|
|
56
|
-
message: messages.getMessage('flags.name.summary'),
|
|
57
|
-
promptMessage: messages.getMessage('flags.name.prompt'),
|
|
58
|
-
validate: (d) => d.trim().length > 0 || 'Name cannot be empty or contain only whitespace',
|
|
59
|
-
required: true,
|
|
60
|
-
},
|
|
61
|
-
'api-name': {
|
|
62
|
-
message: messages.getMessage('flags.api-name.summary'),
|
|
63
|
-
promptMessage: messages.getMessage('flags.api-name.prompt'),
|
|
64
|
-
validate: (d) => {
|
|
65
|
-
if (d.length === 0) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
if (d.length > 80) {
|
|
69
|
-
return 'API name cannot be over 80 characters.';
|
|
70
|
-
}
|
|
71
|
-
const regex = /^[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]+$/;
|
|
72
|
-
if (!regex.test(d)) {
|
|
73
|
-
return 'Invalid API name.';
|
|
74
|
-
}
|
|
75
|
-
return true;
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
spec: {
|
|
79
|
-
message: messages.getMessage('flags.spec.summary'),
|
|
80
|
-
promptMessage: messages.getMessage('flags.spec.prompt'),
|
|
81
|
-
validate: (d) => {
|
|
82
|
-
const specPath = resolve(d);
|
|
83
|
-
if (!existsSync(specPath)) {
|
|
84
|
-
return 'Please enter an existing agent spec (yaml) file';
|
|
85
|
-
}
|
|
86
|
-
return true;
|
|
87
|
-
},
|
|
88
|
-
required: true,
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
53
|
async run() {
|
|
92
54
|
const { flags } = await this.parse(AgentGenerateAuthoringBundle);
|
|
93
55
|
const { 'output-dir': outputDir } = flags;
|
|
94
56
|
if (flags.spec && flags['no-spec']) {
|
|
95
57
|
throw new SfError(messages.getMessage('error.specAndNoSpec'));
|
|
96
58
|
}
|
|
97
|
-
// Resolve spec: --no-spec => undefined
|
|
59
|
+
// Resolve spec: --no-spec => undefined, --spec <path> => path, missing => wizard prompts
|
|
98
60
|
let spec;
|
|
99
61
|
if (flags['no-spec']) {
|
|
100
62
|
spec = undefined;
|
|
@@ -107,17 +69,81 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
107
69
|
spec = specPath;
|
|
108
70
|
}
|
|
109
71
|
else {
|
|
110
|
-
spec
|
|
72
|
+
// Find spec files in specs/ directory
|
|
73
|
+
const specsDir = join(this.project.getPath(), 'specs');
|
|
74
|
+
let specFiles = [];
|
|
75
|
+
if (existsSync(specsDir)) {
|
|
76
|
+
specFiles = readdirSync(specsDir).filter((f) => (f.endsWith('.yaml') || f.endsWith('.yml')) && !f.includes('-testSpec'));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.warn(messages.getMessage('warning.noSpecDir', [specsDir]));
|
|
80
|
+
}
|
|
81
|
+
// Build spec type choices
|
|
82
|
+
const specTypeChoices = [
|
|
83
|
+
{
|
|
84
|
+
name: messages.getMessage('wizard.specType.option.default.name'),
|
|
85
|
+
value: 'default',
|
|
86
|
+
description: messages.getMessage('wizard.specType.option.default.description'),
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
if (specFiles.length > 0) {
|
|
90
|
+
specTypeChoices.push({
|
|
91
|
+
name: messages.getMessage('wizard.specType.option.fromSpec.name'),
|
|
92
|
+
value: 'fromSpec',
|
|
93
|
+
description: messages.getMessage('wizard.specType.option.fromSpec.description'),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const specType = await select({
|
|
97
|
+
message: messages.getMessage('wizard.specType.prompt'),
|
|
98
|
+
choices: specTypeChoices,
|
|
99
|
+
theme,
|
|
100
|
+
});
|
|
101
|
+
if (specType === 'fromSpec') {
|
|
102
|
+
const selectedFile = await select({
|
|
103
|
+
message: messages.getMessage('wizard.specFile.prompt'),
|
|
104
|
+
choices: specFiles.map((f) => ({ name: f, value: join(specsDir, f) })),
|
|
105
|
+
theme,
|
|
106
|
+
});
|
|
107
|
+
spec = selectedFile;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
spec = undefined;
|
|
111
|
+
}
|
|
111
112
|
}
|
|
112
|
-
//
|
|
113
|
-
const name = flags['name'] ??
|
|
114
|
-
|
|
113
|
+
// Resolve name: --name flag or prompt
|
|
114
|
+
const name = flags['name'] ??
|
|
115
|
+
(await inquirerInput({
|
|
116
|
+
message: messages.getMessage('wizard.name.prompt'),
|
|
117
|
+
validate: (d) => {
|
|
118
|
+
if (d.length === 0) {
|
|
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
|
|
115
129
|
let bundleApiName = flags['api-name'];
|
|
116
130
|
if (!bundleApiName) {
|
|
117
131
|
bundleApiName = generateApiName(name);
|
|
118
132
|
const promptedValue = await inquirerInput({
|
|
119
133
|
message: messages.getMessage('flags.api-name.prompt'),
|
|
120
|
-
validate:
|
|
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
|
+
},
|
|
121
147
|
default: bundleApiName,
|
|
122
148
|
theme,
|
|
123
149
|
});
|
|
@@ -132,7 +158,7 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
132
158
|
// Generate file paths
|
|
133
159
|
const agentPath = join(targetOutputDir, `${bundleApiName}.agent`);
|
|
134
160
|
const metaXmlPath = join(targetOutputDir, `${bundleApiName}.bundle-meta.xml`);
|
|
135
|
-
|
|
161
|
+
this.spinner.start(messages.getMessage('progress.title', [bundleApiName]));
|
|
136
162
|
const parsedSpec = spec ? YAML.parse(readFileSync(spec, 'utf8')) : undefined;
|
|
137
163
|
await ScriptAgent.createAuthoringBundle({
|
|
138
164
|
agentSpec: {
|
|
@@ -144,7 +170,8 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
144
170
|
project: this.project,
|
|
145
171
|
bundleApiName,
|
|
146
172
|
});
|
|
147
|
-
this.
|
|
173
|
+
this.spinner.stop();
|
|
174
|
+
this.logSuccess(messages.getMessage('success.message', [name]));
|
|
148
175
|
return {
|
|
149
176
|
agentPath,
|
|
150
177
|
metaXmlPath,
|
|
@@ -152,8 +179,9 @@ export default class AgentGenerateAuthoringBundle extends SfCommand {
|
|
|
152
179
|
};
|
|
153
180
|
}
|
|
154
181
|
catch (error) {
|
|
182
|
+
this.spinner.stop('failed');
|
|
155
183
|
const err = SfError.wrap(error);
|
|
156
|
-
throw new SfError(messages.getMessage('error.failed-to-create-agent'
|
|
184
|
+
throw new SfError(messages.getMessage('error.failed-to-create-agent', [err.message]), 'AgentGenerationError');
|
|
157
185
|
}
|
|
158
186
|
}
|
|
159
187
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-bundle.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/authoring-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because it uses it to access an LLM for generating
|
|
|
16
16
|
|
|
17
17
|
# flags.spec.summary
|
|
18
18
|
|
|
19
|
-
Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.
|
|
19
|
+
Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.
|
|
20
20
|
|
|
21
21
|
# flags.spec.prompt
|
|
22
22
|
|
|
@@ -44,7 +44,7 @@ API name of the new authoring bundle; if not specified, the API name is derived
|
|
|
44
44
|
|
|
45
45
|
# flags.api-name.prompt
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Enter authoring bundle API name
|
|
48
48
|
|
|
49
49
|
# examples
|
|
50
50
|
|
|
@@ -78,4 +78,52 @@ The specified file is not a valid agent spec YAML file.
|
|
|
78
78
|
|
|
79
79
|
# error.failed-to-create-agent
|
|
80
80
|
|
|
81
|
-
Failed to
|
|
81
|
+
Failed to generate authoring bundle: %s.
|
|
82
|
+
|
|
83
|
+
# wizard.specType.prompt
|
|
84
|
+
|
|
85
|
+
Select an authoring bundle template
|
|
86
|
+
|
|
87
|
+
# wizard.specType.option.default.name
|
|
88
|
+
|
|
89
|
+
Default template (Recommended)
|
|
90
|
+
|
|
91
|
+
# wizard.specType.option.default.description
|
|
92
|
+
|
|
93
|
+
Start with a ready-to-use Agent Script template.
|
|
94
|
+
|
|
95
|
+
# wizard.specType.option.fromSpec.name
|
|
96
|
+
|
|
97
|
+
From an agent spec YAML file (Advanced)
|
|
98
|
+
|
|
99
|
+
# wizard.specType.option.fromSpec.description
|
|
100
|
+
|
|
101
|
+
Generate an Agent Script file from an existing agent spec YAML file.
|
|
102
|
+
|
|
103
|
+
# wizard.specFile.prompt
|
|
104
|
+
|
|
105
|
+
Select the agent spec YAML file
|
|
106
|
+
|
|
107
|
+
# wizard.name.prompt
|
|
108
|
+
|
|
109
|
+
Enter the authoring bundle name
|
|
110
|
+
|
|
111
|
+
# wizard.name.validation.required
|
|
112
|
+
|
|
113
|
+
Authoring bundle name is required.
|
|
114
|
+
|
|
115
|
+
# wizard.name.validation.empty
|
|
116
|
+
|
|
117
|
+
Authoring bundle name can't be empty.
|
|
118
|
+
|
|
119
|
+
# progress.title
|
|
120
|
+
|
|
121
|
+
Generating authoring bundle: %s
|
|
122
|
+
|
|
123
|
+
# success.message
|
|
124
|
+
|
|
125
|
+
Authoring bundle "%s" was generated successfully.
|
|
126
|
+
|
|
127
|
+
# warning.noSpecDir
|
|
128
|
+
|
|
129
|
+
No agent spec directory found at %s.
|