If you're facing errors without clear details, I won't be able to provide specific solutions. However, I can guide you towards understanding the purpose of botskills connect
.
Behind the scenes, running botskills connect involves a series of validations on your skill manifest and cognitive models. Once these checks are passed, it forms a new ConnectSkills object and triggers '.connectSkills' on it. 1
This function executes additional validations and then invokes .connectSkillsManifest 2
The new method updates Dispatch to accommodate the fresh cognitive models in your skill and ultimately generates a 'skillmanifest' in your VA bot, integrating your new skill there: 3
private async connectSkillManifest(cognitiveModelsFile: ICognitiveModel, skillManifest: IManifest): Promise<void> {
try {
// Retrieving VA Skills configurations
const assistantSkillsFile: IAppSetting = JSON.parse(readFileSync(this.configuration.appSettingsFile, 'UTF8'));
const assistantSkills: ISkill[] = assistantSkillsFile.botFrameworkSkills !== undefined ? assistantSkillsFile.botFrameworkSkills : [];
// Checking if the skill is already linked to the assistant
if (assistantSkills.find((assistantSkill: ISkill): boolean => assistantSkill.id === skillManifest.id)) {
this.logger.warning(`The skill with ID '${ skillManifest.id }' is already registered.`);
return;
}
// Validating cultures
await this.validateCultures(cognitiveModelsFile, skillManifest.luisDictionary);
// Updating Dispatch
this.logger.message('Updating Dispatch');
await this.updateModel(skillManifest.luisDictionary, skillManifest.id);
// Appending the skill manifest to the assistant skills array
this.logger.message(`Adding '${ skillManifest.name }' manifest to your assistant's skills configuration file.`);
// Modifying the assistant skills file's skills property with the assistant skills array
// Writing (and overwriting) the assistant skills file
//writeFileSync(this.configuration.skillsFile, JSON.stringify(assistantSkillsFile, undefined, 4));
await this.AddSkill(assistantSkillsFile, assistantSkills, skillManifest);
this.logger.success(`Successfully added '${ skillManifest.name }' manifest to your assistant's skills configuration file!`);
// Configuring bot authentication settings
//this.logger.message('Configuring bot auth settings');
//await this.authenticationUtils.authenticate(this.configuration, skillManifest, this.logger);
} catch (err) {
this.logger.error(`An error occurred while connecting the Skill to the Assistant:\n${ err }`);
}
}
My understanding of TypeScript may be a bit rusty, but all this code is written in TS, so now that you know where to look, parsing it should be more manageable.