patchcord 0.6.7 → 0.6.9
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/.claude-plugin/plugin.json +1 -1
- package/bin/patchcord.mjs +26 -18
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -1952,16 +1952,30 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1952
1952
|
if (removedStaleGlobal) {
|
|
1953
1953
|
globalChanges.push("Removed global Patchcord skills/instructions (agy reads ~/.gemini/skills — per-project only)");
|
|
1954
1954
|
}
|
|
1955
|
-
// agy-cli loads ALL of ~/.gemini/skills in every folder
|
|
1956
|
-
//
|
|
1955
|
+
// agy-cli loads ALL of ~/.gemini/skills in every folder. Gemini CLI uses
|
|
1956
|
+
// ~/.gemini/commands for patchcord — NOT this dir. Purge orchestrator/mux/
|
|
1957
|
+
// actor skills that were copied here by mistake (they trigger patchcord hunts
|
|
1958
|
+
// without MCP). Silent — never ask the user to clean up by hand.
|
|
1957
1959
|
const geminiSkillsRoot = join(HOME, ".gemini", "skills");
|
|
1960
|
+
const isAgyGlobalSkillLeak = (name) => {
|
|
1961
|
+
const n = name.toLowerCase();
|
|
1962
|
+
if (n.startsWith("patchcord")) return true;
|
|
1963
|
+
if (n.startsWith("orchestrator")) return true;
|
|
1964
|
+
if (n.startsWith("actor-") || n.startsWith("actor:")) return true;
|
|
1965
|
+
if (n === "mux" || n.startsWith("mux-")) return true;
|
|
1966
|
+
if (n === "team-ops") return true;
|
|
1967
|
+
return false;
|
|
1968
|
+
};
|
|
1958
1969
|
if (existsSync(geminiSkillsRoot)) {
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1970
|
+
let removedLeaked = 0;
|
|
1971
|
+
try {
|
|
1972
|
+
for (const ent of readdirSync(geminiSkillsRoot, { withFileTypes: true })) {
|
|
1973
|
+
if (!ent.isDirectory() || !isAgyGlobalSkillLeak(ent.name)) continue;
|
|
1974
|
+
try { rmSync(join(geminiSkillsRoot, ent.name), { recursive: true, force: true }); removedLeaked++; } catch {}
|
|
1975
|
+
}
|
|
1976
|
+
} catch {}
|
|
1977
|
+
if (removedLeaked > 0) {
|
|
1978
|
+
globalChanges.push(`Removed ${removedLeaked} leaked skill(s) from ~/.gemini/skills (agy global read path)`);
|
|
1965
1979
|
}
|
|
1966
1980
|
}
|
|
1967
1981
|
// true = configured, false = file absent (definitely not), null = unparseable (unknown)
|
|
@@ -2429,21 +2443,14 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
2429
2443
|
const identityStr = existingIdentity ? ` (${bold}${existingIdentity}${r}${dim})` : "";
|
|
2430
2444
|
console.log(`\n ${dim}${existingToolName} agent is already configured in this project${identityStr}${r}`);
|
|
2431
2445
|
|
|
2432
|
-
if (rl) rl.close();
|
|
2433
|
-
const { createInterface: createRLU } = await import("readline");
|
|
2434
|
-
const rlU = createRLU({ input: process.stdin, output: process.stdout });
|
|
2435
|
-
const askU = (q) => new Promise((resolve) => rlU.question(q, resolve));
|
|
2436
|
-
|
|
2437
2446
|
// Q1: Add another agent? (most likely reason to re-run installer)
|
|
2438
|
-
const addAnswer = (await
|
|
2447
|
+
const addAnswer = (await ask(` ${bold}Add another agent to this project? (y/N):${r} `)).trim().toLowerCase();
|
|
2439
2448
|
if (addAnswer === "y" || addAnswer === "yes") {
|
|
2440
|
-
rlU.close();
|
|
2441
2449
|
// Drop into browser connect flow — fresh setup for new agent
|
|
2442
2450
|
token = "";
|
|
2443
2451
|
} else {
|
|
2444
2452
|
// Q2: Update existing agent?
|
|
2445
|
-
const updateAnswer = (await
|
|
2446
|
-
rlU.close();
|
|
2453
|
+
const updateAnswer = (await ask(` ${bold}Update ${existingToolName} agent? (y/N):${r} `)).trim().toLowerCase();
|
|
2447
2454
|
if (updateAnswer === "y" || updateAnswer === "yes") {
|
|
2448
2455
|
token = existingToken;
|
|
2449
2456
|
if (existingIdentity) {
|
|
@@ -2459,6 +2466,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
2459
2466
|
} else {
|
|
2460
2467
|
// Both N — skills already updated by global setup, done
|
|
2461
2468
|
console.log(`\n ${dim}Skills updated.${r}`);
|
|
2469
|
+
rl.close();
|
|
2462
2470
|
process.exit(0);
|
|
2463
2471
|
}
|
|
2464
2472
|
}
|
|
@@ -2466,7 +2474,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
2466
2474
|
|
|
2467
2475
|
if (!token) {
|
|
2468
2476
|
// Browser connect flow
|
|
2469
|
-
|
|
2477
|
+
rl.close();
|
|
2470
2478
|
|
|
2471
2479
|
function canOpenBrowser() {
|
|
2472
2480
|
if (process.env.SSH_CLIENT || process.env.SSH_TTY) return false;
|
package/package.json
CHANGED