@salesforce/plugin-agent 1.14.5-dev.5 → 1.15.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 +35 -38
- package/lib/commands/agent/create.js +2 -2
- package/lib/commands/agent/create.js.map +1 -1
- package/lib/commands/agent/generate/template.d.ts +4 -3
- package/lib/commands/agent/generate/template.js +108 -20
- package/lib/commands/agent/generate/template.js.map +1 -1
- package/lib/commands/agent/generate/test-spec.d.ts +0 -4
- package/lib/commands/agent/generate/test-spec.js +76 -130
- package/lib/commands/agent/generate/test-spec.js.map +1 -1
- package/lib/commands/agent/test/create.d.ts +1 -2
- package/lib/commands/agent/test/create.js +18 -75
- package/lib/commands/agent/test/create.js.map +1 -1
- package/lib/flags.d.ts +0 -1
- package/lib/flags.js +0 -31
- package/lib/flags.js.map +1 -1
- package/lib/handleTestResults.js +21 -2
- package/lib/handleTestResults.js.map +1 -1
- package/lib/read-dir.d.ts +1 -0
- package/lib/read-dir.js +16 -0
- package/lib/read-dir.js.map +1 -0
- package/messages/agent.generate.template.md +7 -7
- package/messages/agent.generate.test-spec.md +0 -8
- package/messages/agent.test.create.md +7 -17
- package/npm-shrinkwrap.json +39 -521
- package/oclif.lock +16 -115
- package/oclif.manifest.json +16 -37
- package/package.json +5 -6
- package/schemas/agent-generate-template.json +5 -2
- package/lib/yes-no-cancel.d.ts +0 -10
- package/lib/yes-no-cancel.js +0 -60
- package/lib/yes-no-cancel.js.map +0 -1
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ EXAMPLES
|
|
|
132
132
|
$ sf agent create --agent-name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
_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.15.0/src/commands/agent/create.ts)_
|
|
136
136
|
|
|
137
137
|
## `sf agent generate agent-spec`
|
|
138
138
|
|
|
@@ -236,7 +236,7 @@ EXAMPLES
|
|
|
236
236
|
$ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
_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.15.0/src/commands/agent/generate/agent-spec.ts)_
|
|
240
240
|
|
|
241
241
|
## `sf agent generate template`
|
|
242
242
|
|
|
@@ -244,15 +244,15 @@ Generate an agent template for packaging.
|
|
|
244
244
|
|
|
245
245
|
```
|
|
246
246
|
USAGE
|
|
247
|
-
$ sf agent generate template -o <value> --agent-
|
|
247
|
+
$ sf agent generate template -o <value> --agent-version <value> -f <value> [--json] [--flags-dir <value>] [--api-version
|
|
248
248
|
<value>]
|
|
249
249
|
|
|
250
250
|
FLAGS
|
|
251
|
-
-
|
|
252
|
-
-o, --target-org=<value>
|
|
253
|
-
|
|
254
|
-
--agent-
|
|
255
|
-
--api-version=<value>
|
|
251
|
+
-f, --agent-file=<value> (required) The path to an Agent (Bot) file.
|
|
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-version=<value> (required) Version of the Agent (botVersion).
|
|
255
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
256
256
|
|
|
257
257
|
GLOBAL FLAGS
|
|
258
258
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -264,12 +264,13 @@ DESCRIPTION
|
|
|
264
264
|
Generate agent template metadata to for packaging your agent.
|
|
265
265
|
|
|
266
266
|
EXAMPLES
|
|
267
|
-
Generate an agent template from a Bot
|
|
267
|
+
Generate an agent template from a Bot metadata file in your project:
|
|
268
268
|
|
|
269
|
-
$ sf agent generate template --agent-
|
|
269
|
+
$ sf agent generate template --agent-file \
|
|
270
|
+
force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
|
|
270
271
|
```
|
|
271
272
|
|
|
272
|
-
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
273
|
+
_See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/generate/template.ts)_
|
|
273
274
|
|
|
274
275
|
## `sf agent generate test-spec`
|
|
275
276
|
|
|
@@ -277,11 +278,7 @@ Interactively generate a specification file for a AI evaluation test.
|
|
|
277
278
|
|
|
278
279
|
```
|
|
279
280
|
USAGE
|
|
280
|
-
$ sf agent generate test-spec [--flags-dir <value>]
|
|
281
|
-
|
|
282
|
-
FLAGS
|
|
283
|
-
-d, --output-dir=<value> [default: specs] The directory to save the generated spec file.
|
|
284
|
-
-f, --output-file=<value> [default: agentTestSpec.yaml] The name of the generated spec file.
|
|
281
|
+
$ sf agent generate test-spec [--flags-dir <value>]
|
|
285
282
|
|
|
286
283
|
GLOBAL FLAGS
|
|
287
284
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -296,7 +293,7 @@ EXAMPLES
|
|
|
296
293
|
$ sf agent generate test-spec
|
|
297
294
|
```
|
|
298
295
|
|
|
299
|
-
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
296
|
+
_See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/generate/test-spec.ts)_
|
|
300
297
|
|
|
301
298
|
## `sf agent preview`
|
|
302
299
|
|
|
@@ -331,43 +328,43 @@ FLAG DESCRIPTIONS
|
|
|
331
328
|
the API name of the agent? (TBD based on agents library)
|
|
332
329
|
```
|
|
333
330
|
|
|
334
|
-
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
331
|
+
_See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/preview.ts)_
|
|
335
332
|
|
|
336
333
|
## `sf agent test create`
|
|
337
334
|
|
|
338
|
-
|
|
335
|
+
Summary of a command.
|
|
339
336
|
|
|
340
337
|
```
|
|
341
338
|
USAGE
|
|
342
|
-
$ sf agent test create -o <value> [--json] [--flags-dir <value>] [--
|
|
343
|
-
[--api-version <value>] [--preview] [-p]
|
|
339
|
+
$ sf agent test create -s <value> -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--preview] [-p]
|
|
344
340
|
|
|
345
341
|
FLAGS
|
|
346
|
-
-o, --target-org=<value>
|
|
347
|
-
|
|
348
|
-
-p, --no-prompt
|
|
349
|
-
|
|
350
|
-
--
|
|
351
|
-
--
|
|
352
|
-
--test-api-name=<value> The API name of the AiEvaluationDefinition.
|
|
342
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
343
|
+
configuration variable is already set.
|
|
344
|
+
-p, --no-prompt Don't prompt for confirmation when overwriting an existing test.
|
|
345
|
+
-s, --spec=<value> (required) Description of a flag.
|
|
346
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
347
|
+
--preview Preview the test metadata without deploying to your org.
|
|
353
348
|
|
|
354
349
|
GLOBAL FLAGS
|
|
355
350
|
--flags-dir=<value> Import flag values from a directory.
|
|
356
351
|
--json Format output as json.
|
|
357
352
|
|
|
358
353
|
DESCRIPTION
|
|
359
|
-
|
|
354
|
+
Summary of a command.
|
|
360
355
|
|
|
361
|
-
|
|
362
|
-
must be in yaml format.
|
|
363
|
-
|
|
364
|
-
Use the --preview flag to see the metadata that will be deployed without actually deploying it.
|
|
356
|
+
More information about a command. Don't repeat the summary.
|
|
365
357
|
|
|
366
358
|
EXAMPLES
|
|
367
359
|
$ sf agent test create
|
|
360
|
+
|
|
361
|
+
FLAG DESCRIPTIONS
|
|
362
|
+
-s, --spec=<value> Description of a flag.
|
|
363
|
+
|
|
364
|
+
More information about a flag. Don't repeat the summary.
|
|
368
365
|
```
|
|
369
366
|
|
|
370
|
-
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
367
|
+
_See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/test/create.ts)_
|
|
371
368
|
|
|
372
369
|
## `sf agent test list`
|
|
373
370
|
|
|
@@ -396,7 +393,7 @@ EXAMPLES
|
|
|
396
393
|
$ sf agent test list
|
|
397
394
|
```
|
|
398
395
|
|
|
399
|
-
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
396
|
+
_See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/test/list.ts)_
|
|
400
397
|
|
|
401
398
|
## `sf agent test results`
|
|
402
399
|
|
|
@@ -452,7 +449,7 @@ FLAG DESCRIPTIONS
|
|
|
452
449
|
test results aren't written.
|
|
453
450
|
```
|
|
454
451
|
|
|
455
|
-
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
452
|
+
_See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/test/results.ts)_
|
|
456
453
|
|
|
457
454
|
## `sf agent test resume`
|
|
458
455
|
|
|
@@ -515,7 +512,7 @@ FLAG DESCRIPTIONS
|
|
|
515
512
|
test results aren't written.
|
|
516
513
|
```
|
|
517
514
|
|
|
518
|
-
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
515
|
+
_See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/test/resume.ts)_
|
|
519
516
|
|
|
520
517
|
## `sf agent test run`
|
|
521
518
|
|
|
@@ -578,6 +575,6 @@ FLAG DESCRIPTIONS
|
|
|
578
575
|
test results aren't written.
|
|
579
576
|
```
|
|
580
577
|
|
|
581
|
-
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.
|
|
578
|
+
_See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.15.0/src/commands/agent/test/run.ts)_
|
|
582
579
|
|
|
583
580
|
<!-- commandsstop -->
|
|
@@ -13,7 +13,7 @@ import { MultiStageOutput } from '@oclif/multi-stage-output';
|
|
|
13
13
|
import { input as inquirerInput } from '@inquirer/prompts';
|
|
14
14
|
import { colorize } from '@oclif/core/ux';
|
|
15
15
|
import { Agent, AgentCreateLifecycleStagesV2, generateAgentApiName, } from '@salesforce/agents';
|
|
16
|
-
import { makeFlags, promptForFlag, getAgentUserId, validateAgentType, validateTone,
|
|
16
|
+
import { makeFlags, promptForFlag, getAgentUserId, validateAgentType, validateTone, } from '../../flags.js';
|
|
17
17
|
import { theme } from '../../inquirer-theme.js';
|
|
18
18
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
19
19
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.create');
|
|
@@ -90,7 +90,7 @@ export default class AgentCreate extends SfCommand {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
// If we don't have an agent spec yet, prompt.
|
|
93
|
-
const specPath = flags.spec ?? (await
|
|
93
|
+
const specPath = flags.spec ?? (await promptForFlag(FLAGGABLE_PROMPTS['spec']));
|
|
94
94
|
// Read the agent spec and validate
|
|
95
95
|
const inputSpec = YAML.parse(readFileSync(resolve(specPath), 'utf8'));
|
|
96
96
|
validateSpec(inputSpec);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/agent/create.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,I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AC,CAAC,CAAC,CAAC;IAChE,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,MAAM,QAAQ,CAAC,WAAW,CAAC,qCAAqC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC;IAED,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC1C,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
2
|
export type AgentGenerateTemplateResult = {
|
|
3
|
-
|
|
3
|
+
genAiPlannerPath: string;
|
|
4
|
+
botTemplatePath: string;
|
|
4
5
|
};
|
|
5
6
|
export default class AgentGenerateTemplate extends SfCommand<AgentGenerateTemplateResult> {
|
|
6
7
|
static readonly summary: string;
|
|
@@ -11,8 +12,8 @@ export default class AgentGenerateTemplate extends SfCommand<AgentGenerateTempla
|
|
|
11
12
|
static readonly flags: {
|
|
12
13
|
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
'agent-
|
|
15
|
-
'
|
|
15
|
+
'agent-version': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'agent-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
};
|
|
17
18
|
run(): Promise<AgentGenerateTemplateResult>;
|
|
18
19
|
}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
import { dirname,
|
|
8
|
-
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
7
|
+
import { join, dirname, basename, resolve } from 'node:path';
|
|
8
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
9
9
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
10
|
-
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
11
|
+
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
11
12
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
13
|
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.template');
|
|
13
14
|
export default class AgentGenerateTemplate extends SfCommand {
|
|
@@ -19,30 +20,117 @@ export default class AgentGenerateTemplate extends SfCommand {
|
|
|
19
20
|
static flags = {
|
|
20
21
|
'target-org': Flags.requiredOrg(),
|
|
21
22
|
'api-version': Flags.orgApiVersion(),
|
|
22
|
-
'agent-
|
|
23
|
-
summary: messages.getMessage('flags.agent-
|
|
23
|
+
'agent-version': Flags.integer({
|
|
24
|
+
summary: messages.getMessage('flags.agent-version.summary'),
|
|
24
25
|
required: true,
|
|
25
26
|
}),
|
|
26
|
-
'
|
|
27
|
-
|
|
27
|
+
'agent-file': Flags.file({
|
|
28
|
+
summary: messages.getMessage('flags.agent-file.summary'),
|
|
29
|
+
char: 'f',
|
|
30
|
+
required: true,
|
|
28
31
|
exists: true,
|
|
29
|
-
summary: messages.getMessage('flags.output-dir.summary'),
|
|
30
32
|
}),
|
|
31
33
|
};
|
|
32
34
|
async run() {
|
|
33
35
|
const { flags } = await this.parse(AgentGenerateTemplate);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
const { 'agent-file': agentFile, 'agent-version': botVersion } = flags;
|
|
37
|
+
if (!agentFile.endsWith('.bot-meta.xml')) {
|
|
38
|
+
throw new SfError('Invalid Agent file. Must be a Bot metadata file. Example: force-app/main/default/bots/MyBot.bot-meta.xml');
|
|
39
|
+
}
|
|
40
|
+
const parser = new XMLParser({ ignoreAttributes: false });
|
|
41
|
+
const builder = new XMLBuilder({ format: true, ignoreAttributes: false, indentBy: ' ' });
|
|
42
|
+
const botName = basename(agentFile).replace('.bot-meta.xml', '');
|
|
43
|
+
// Since we are cloning the GenAiPlanner, we need to use a different name than the Agent (Bot) we started with
|
|
44
|
+
// We will use this name for the BotTemplate also to make it clear they are related
|
|
45
|
+
const finalFilename = `${botName}_v${botVersion}_Template`;
|
|
46
|
+
// Build the base dir from the AgentFile
|
|
47
|
+
const basePath = resolve(dirname(agentFile), '..', '..');
|
|
48
|
+
const botDir = join(basePath, 'bots', botName);
|
|
49
|
+
const genAiPlannerDir = join(basePath, 'genAiPlanners');
|
|
50
|
+
const botTemplateDir = join(basePath, 'botTemplates');
|
|
51
|
+
const botTemplateFilePath = join(botTemplateDir, `${finalFilename}.botTemplate-meta.xml`);
|
|
52
|
+
const clonedGenAiPlannerFilePath = join(genAiPlannerDir, `${finalFilename}.genAiPlanner-meta.xml`);
|
|
53
|
+
// Parse the metadata files as JSON
|
|
54
|
+
const botJson = xmlToJson(join(botDir, `${botName}.bot-meta.xml`), parser);
|
|
55
|
+
const botVersionJson = xmlToJson(join(botDir, `v${botVersion}.botVersion-meta.xml`), parser);
|
|
56
|
+
const genAiPlannerMetaJson = xmlToJson(join(genAiPlannerDir, `${botName}.genAiPlanner-meta.xml`), parser);
|
|
57
|
+
// Modify the metadata files for final output
|
|
58
|
+
// TODO: Confirm this name (might be conversationDefinitionPlanners)
|
|
59
|
+
genAiPlannerMetaJson.GenAiPlanner.botTemplate = finalFilename;
|
|
60
|
+
const botTemplate = convertBotToBotTemplate(botJson, botVersionJson, finalFilename, botTemplateFilePath);
|
|
61
|
+
// Build and save the metadata files
|
|
62
|
+
jsonToXml(clonedGenAiPlannerFilePath, genAiPlannerMetaJson, builder);
|
|
63
|
+
jsonToXml(botTemplateFilePath, botTemplate, builder);
|
|
64
|
+
this.log(`\nSaved BotTemplate to:\n - ${botTemplateFilePath}`);
|
|
65
|
+
this.log(`Saved GenAiPlanner to:\n - ${clonedGenAiPlannerFilePath}`);
|
|
66
|
+
return {
|
|
67
|
+
genAiPlannerPath: clonedGenAiPlannerFilePath,
|
|
68
|
+
botTemplatePath: botTemplateFilePath,
|
|
69
|
+
};
|
|
42
70
|
}
|
|
43
71
|
}
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
72
|
+
const convertBotToBotTemplate = (bot, botVersionJson, newMlDomainName, botFilePath) => {
|
|
73
|
+
const entryDialog = botVersionJson.BotVersion.entryDialog;
|
|
74
|
+
const { conversationSystemDialogs } = botVersionJson.BotVersion;
|
|
75
|
+
// We need to pull the botDialog from the BotVersion file that matches the entryDialog
|
|
76
|
+
// This will be added to the BotTemplate
|
|
77
|
+
const entryDialogJson = botVersionJson.BotVersion.botDialogs.find((dialog) => dialog.developerName === entryDialog);
|
|
78
|
+
if (!entryDialogJson)
|
|
79
|
+
throw new SfError('No entryDialog found in BotVersion file');
|
|
80
|
+
// TODO: Test this on a newer org. I had to have this renamed.
|
|
81
|
+
entryDialogJson.label = entryDialog;
|
|
82
|
+
if (!bot.Bot.label)
|
|
83
|
+
throw new SfError(`No label found in Agent (Bot) file: ${botFilePath}`);
|
|
84
|
+
if (!bot.Bot.botMlDomain)
|
|
85
|
+
throw new SfError(`No botMlDomain found in Agent (Bot) file: ${botFilePath}`);
|
|
86
|
+
const masterLabel = bot.Bot.label;
|
|
87
|
+
const mlDomain = bot.Bot.botMlDomain;
|
|
88
|
+
delete bot.Bot.botMlDomain;
|
|
89
|
+
delete bot.Bot.label;
|
|
90
|
+
delete bot.Bot.botUser;
|
|
91
|
+
delete bot.Bot.logPrivateConversationData;
|
|
92
|
+
delete bot.Bot.sessionTimeout;
|
|
93
|
+
// botDialogGroups is not required
|
|
94
|
+
const botTemplate = {
|
|
95
|
+
BotTemplate: {
|
|
96
|
+
masterLabel,
|
|
97
|
+
conversationLanguages: 'en_US',
|
|
98
|
+
mainMenuDialog: 'Main_Menu',
|
|
99
|
+
botDialogs: [
|
|
100
|
+
{
|
|
101
|
+
developerName: 'Main_Menu',
|
|
102
|
+
isPlaceholderDialog: false,
|
|
103
|
+
label: 'Main_Menu',
|
|
104
|
+
showInFooterMenu: false,
|
|
105
|
+
botSteps: [],
|
|
106
|
+
},
|
|
107
|
+
entryDialogJson,
|
|
108
|
+
],
|
|
109
|
+
conversationSystemDialogs,
|
|
110
|
+
entryDialog,
|
|
111
|
+
mlDomain,
|
|
112
|
+
...bot.Bot,
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
// TODO: Test this on a newer org. I had to have this renamed to avoid a conflict.
|
|
116
|
+
botTemplate.BotTemplate.mlDomain.name = newMlDomainName;
|
|
117
|
+
return botTemplate;
|
|
118
|
+
};
|
|
119
|
+
const xmlToJson = (path, parser) => {
|
|
120
|
+
const file = readFileSync(path, 'utf8');
|
|
121
|
+
if (!file)
|
|
122
|
+
throw new SfError(`No metadata file found at ${path}`);
|
|
123
|
+
return parser.parse(file);
|
|
124
|
+
};
|
|
125
|
+
const jsonToXml = (filename, json, builder) => {
|
|
126
|
+
// Ensure output dir exists (dir of filename)
|
|
127
|
+
mkdirSync(dirname(filename), { recursive: true });
|
|
128
|
+
try {
|
|
129
|
+
const xml = builder.build(json);
|
|
130
|
+
writeFileSync(filename, xml);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
throw new SfError(`Failed save to file: ${filename}`);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
48
136
|
//# sourceMappingURL=template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/comm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AyB;YACzB,WAAW;YACX,QAAQ;YACR,GAAG,GAAG,CAAC,GAAG;SACX;KACF,CAAC;IAEF,kFAAkF;IAClF,WAAW,CAAC,WAAW,CAAC,QAAS,CAAC,IAAI,GAAG,eAAe,CAAC;IAEzD,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAI,IAAY,EAAE,MAAiB,EAAK,EAAE;IAC1D,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAExC,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,OAAO,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;IAElE,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAM,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAI,QAAgB,EAAE,IAAO,EAAE,OAAmB,EAAQ,EAAE;IAC5E,6CAA6C;IAC7C,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAElD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAW,CAAC;QAC1C,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,OAAO,CAAC,wBAAwB,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -5,9 +5,5 @@ export default class AgentGenerateTestSpec extends SfCommand<void> {
|
|
|
5
5
|
static readonly examples: string[];
|
|
6
6
|
static readonly enableJsonFlag = false;
|
|
7
7
|
static readonly state = "beta";
|
|
8
|
-
static readonly flags: {
|
|
9
|
-
'output-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
'output-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
};
|
|
12
8
|
run(): Promise<void>;
|
|
13
9
|
}
|