@graypark/loophaus 2.1.1 → 2.1.2
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/package.json
CHANGED
|
@@ -145,14 +145,15 @@ export async function install({ dryRun = false, force = false, local = false } =
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
const totalSteps =
|
|
148
|
+
const totalSteps = 4;
|
|
149
149
|
|
|
150
|
-
// Step 1: Clean up legacy
|
|
150
|
+
// Step 1: Clean up legacy skills from ~/.codex/skills/
|
|
151
151
|
console.log(`[1/${totalSteps}] Cleaning up legacy skills...`);
|
|
152
|
-
|
|
152
|
+
const CLEANUP_FROM_CODEX = [...LEGACY_SKILLS, "loop", "loop-stop", "loop-plan", "loop-pulse"];
|
|
153
|
+
for (const name of CLEANUP_FROM_CODEX) {
|
|
153
154
|
const legacyDir = join(skillsDir, name);
|
|
154
155
|
if (await fileExists(legacyDir)) {
|
|
155
|
-
console.log(` > Remove
|
|
156
|
+
console.log(` > Remove from ~/.codex/skills/: ${name}`);
|
|
156
157
|
if (!dryRun) {
|
|
157
158
|
await rm(legacyDir, { recursive: true, force: true });
|
|
158
159
|
}
|
|
@@ -192,10 +193,13 @@ export async function install({ dryRun = false, force = false, local = false } =
|
|
|
192
193
|
await writeFile(hooksJsonPath, JSON.stringify(existing, null, 2), "utf-8");
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
// Step 4: Install skills to
|
|
196
|
-
|
|
196
|
+
// Step 4: Install skills to standard path
|
|
197
|
+
// Global: ~/.agents/skills/ (new Codex CLI standard — avoids duplicates with ~/.codex/skills/)
|
|
198
|
+
// Local: .codex/skills/ (project-scoped)
|
|
199
|
+
const targetSkillsDir = local ? skillsDir : getAgentsSkillsDir();
|
|
200
|
+
console.log(`[4/${totalSteps}] Installing skills to ${local ? ".codex/skills/" : "~/.agents/skills/"}...`);
|
|
197
201
|
for (const [name, skill] of Object.entries(CODEX_SKILLS)) {
|
|
198
|
-
const skillDir = join(
|
|
202
|
+
const skillDir = join(targetSkillsDir, name);
|
|
199
203
|
console.log(` > Install skill: ${name}`);
|
|
200
204
|
if (!dryRun) {
|
|
201
205
|
await mkdir(skillDir, { recursive: true });
|
|
@@ -207,24 +211,6 @@ export async function install({ dryRun = false, force = false, local = false } =
|
|
|
207
211
|
}
|
|
208
212
|
}
|
|
209
213
|
|
|
210
|
-
// Step 5: Mirror skills to ~/.agents/skills/ (new Codex CLI standard path)
|
|
211
|
-
if (!local) {
|
|
212
|
-
const agentsSkillsDir = getAgentsSkillsDir();
|
|
213
|
-
console.log(`[5/${totalSteps}] Installing skills to ~/.agents/skills/...`);
|
|
214
|
-
for (const [name, skill] of Object.entries(CODEX_SKILLS)) {
|
|
215
|
-
const skillDir = join(agentsSkillsDir, name);
|
|
216
|
-
console.log(` > Install skill: ${name}`);
|
|
217
|
-
if (!dryRun) {
|
|
218
|
-
await mkdir(skillDir, { recursive: true });
|
|
219
|
-
await writeFile(
|
|
220
|
-
join(skillDir, "SKILL.md"),
|
|
221
|
-
skill.content.replaceAll("${RALPH_CODEX_ROOT}", pluginDir).replaceAll("${LOOPHAUS_ROOT}", pluginDir),
|
|
222
|
-
"utf-8",
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
214
|
console.log("");
|
|
229
215
|
if (dryRun) {
|
|
230
216
|
console.log(" \u2714 Dry run complete. No files were modified.");
|