@easysociable/cli 0.1.28 → 0.1.30
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/dist/easysociable.js
CHANGED
|
@@ -34683,6 +34683,12 @@ function isUnifiedConfigCompatible(config2) {
|
|
|
34683
34683
|
}
|
|
34684
34684
|
|
|
34685
34685
|
// src/installSkills.ts
|
|
34686
|
+
var ALL_SKILL_IDS = [
|
|
34687
|
+
"easysociable-content",
|
|
34688
|
+
"easysociable-template",
|
|
34689
|
+
"easysociable-slideshow"
|
|
34690
|
+
];
|
|
34691
|
+
var RETIRED_SKILL_IDS = ["easysociable-tweet-image"];
|
|
34686
34692
|
var DEFAULT_SKILL_IDS = [
|
|
34687
34693
|
"easysociable-slideshow"
|
|
34688
34694
|
];
|
|
@@ -35588,6 +35594,10 @@ function detectedHosts(home) {
|
|
|
35588
35594
|
];
|
|
35589
35595
|
return candidates.filter((item) => existsSync4(item.dir)).map((item) => ({ host: item.host, configPath: join4(item.dir, "mcp.json"), skillsPath: join4(item.dir, "skills") }));
|
|
35590
35596
|
}
|
|
35597
|
+
function hostSkillIds(skillsPath, options) {
|
|
35598
|
+
const installed = ALL_SKILL_IDS.filter((skill) => existsSync4(join4(skillsPath, skill)));
|
|
35599
|
+
return [.../* @__PURE__ */ new Set([...resolveInstallSkillIds(options), ...installed])];
|
|
35600
|
+
}
|
|
35591
35601
|
async function planInstallation(options) {
|
|
35592
35602
|
const home = installHome(options);
|
|
35593
35603
|
const source = installSource(options);
|
|
@@ -35602,7 +35612,8 @@ async function planInstallation(options) {
|
|
|
35602
35612
|
missingSkills,
|
|
35603
35613
|
changes: hosts.flatMap((host) => [
|
|
35604
35614
|
`merge ${host.configPath} with one easysociable MCP registration`,
|
|
35605
|
-
...
|
|
35615
|
+
...hostSkillIds(host.skillsPath, options).map((name) => `install ${join4(host.skillsPath, name)}`),
|
|
35616
|
+
...RETIRED_SKILL_IDS.filter((name) => existsSync4(join4(host.skillsPath, name))).map((name) => `remove ${join4(host.skillsPath, name)}`)
|
|
35606
35617
|
])
|
|
35607
35618
|
};
|
|
35608
35619
|
}
|
|
@@ -35625,16 +35636,13 @@ async function applyInstallation(options) {
|
|
|
35625
35636
|
}
|
|
35626
35637
|
await installHostConfig({ host: host.host, dataDir: "", configPath: host.configPath });
|
|
35627
35638
|
await mkdir(host.skillsPath, { recursive: true, mode: 448 });
|
|
35628
|
-
for (const skill of
|
|
35639
|
+
for (const skill of hostSkillIds(host.skillsPath, options)) {
|
|
35629
35640
|
const target = join4(host.skillsPath, skill);
|
|
35630
|
-
|
|
35631
|
-
const backupPath = join4(String(plan.home), ".easysociable", "backups", backupSuffix, host.host, skill);
|
|
35632
|
-
await cp(target, backupPath, { recursive: true });
|
|
35633
|
-
backups.push(backupPath);
|
|
35634
|
-
await rm(target, { recursive: true, force: true });
|
|
35635
|
-
}
|
|
35641
|
+
await rm(target, { recursive: true, force: true });
|
|
35636
35642
|
await cp(join4(String(plan.source), skill), target, { recursive: true });
|
|
35637
35643
|
}
|
|
35644
|
+
for (const skill of RETIRED_SKILL_IDS)
|
|
35645
|
+
await rm(join4(host.skillsPath, skill), { recursive: true, force: true });
|
|
35638
35646
|
}
|
|
35639
35647
|
if (options.json !== true) {
|
|
35640
35648
|
process.stdout.write(`Installed skills your Agent will use:
|