patchcord 0.6.17 → 0.6.18
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 +16 -2
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -1850,9 +1850,11 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1850
1850
|
let globalChanges = [];
|
|
1851
1851
|
if (globalCliInstalled) globalChanges.push("Patchcord CLI installed globally");
|
|
1852
1852
|
|
|
1853
|
-
// Claude Code
|
|
1853
|
+
// Claude Code — skip when install runs inside cursor-agent: Claude's plugin
|
|
1854
|
+
// MCP registers as "plugin-patchcord-marketplace-patchcord", which cursor-agent
|
|
1855
|
+
// tries instead of project .cursor/mcp.json → "MCP server not found".
|
|
1854
1856
|
const hasClaude = run("which claude");
|
|
1855
|
-
if (hasClaude) {
|
|
1857
|
+
if (hasClaude && !process.env.CURSOR_AGENT) {
|
|
1856
1858
|
// Remove legacy npm-cache install (pre-marketplace era) — causes duplicate /patchcord commands.
|
|
1857
1859
|
const npmCachePatchcord = join(HOME, ".claude", "plugins", "npm-cache", "node_modules", "patchcord");
|
|
1858
1860
|
if (existsSync(npmCachePatchcord)) {
|
|
@@ -2838,6 +2840,18 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
2838
2840
|
console.log(`\n ${green}✓${r} Cursor configured: ${dim}${cursorPath}${r}`);
|
|
2839
2841
|
console.log(` ${dim}Per-project only — other projects won't see this agent.${r}`);
|
|
2840
2842
|
}
|
|
2843
|
+
// Project-layer CLI permissions (cursor-agent merges .cursor/cli.json from git root).
|
|
2844
|
+
const cursorCliPath = join(cursorDir, "cli.json");
|
|
2845
|
+
const cursorCliOk = updateJsonConfig(cursorCliPath, (obj) => {
|
|
2846
|
+
obj.permissions = obj.permissions || {};
|
|
2847
|
+
if (!obj.permissions.allow) obj.permissions.allow = [];
|
|
2848
|
+
if (!Array.isArray(obj.permissions.allow)) return;
|
|
2849
|
+
const pat = "Mcp(patchcord:*)";
|
|
2850
|
+
if (!obj.permissions.allow.includes(pat)) obj.permissions.allow.push(pat);
|
|
2851
|
+
});
|
|
2852
|
+
if (cursorCliOk) {
|
|
2853
|
+
console.log(` ${green}✓${r} Cursor CLI permissions: ${dim}${cursorCliPath}${r}`);
|
|
2854
|
+
}
|
|
2841
2855
|
} else if (isGrok) {
|
|
2842
2856
|
// Grok CLI: project-scoped .grok/config.toml. Grok loads this file from
|
|
2843
2857
|
// the current directory up through the git root, so the bearer remains
|
package/package.json
CHANGED