MCPcopy Create free account
hub / github.com/MemTensor/MemOS / syncIfInstalled

Method syncIfInstalled

packages/memos-core/src/skill/installer.ts:144–153  ·  view source on GitHub ↗
(skillName: string)

Source from the content-addressed store, hash-verified

142 }
143
144 syncIfInstalled(skillName: string): void {
145 const skill = this.store.getSkillByName(skillName);
146 if (!skill || !skill.installed) return;
147
148 const dstDir = path.join(this.workspaceSkillsDir, skill.name);
149 if (fs.existsSync(skill.dirPath)) {
150 this.cleanSync(skill.dirPath, dstDir);
151 this.ctx.log.info(`Skill synced: "${skill.name}" v${skill.version} → workspace`);
152 }
153 }
154
155 private cleanSync(srcDir: string, dstDir: string): void {
156 if (fs.existsSync(dstDir)) {

Callers 1

handleExistingSkillMethod · 0.45

Calls 4

cleanSyncMethod · 0.95
infoMethod · 0.65
getSkillByNameMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected