patchcord 0.5.131 → 0.5.133
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/README.md +3 -0
- package/bin/patchcord.mjs +45 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,9 @@ npx patchcord@latest --token <token> --server https://patchcord.yourdomain.com
|
|
|
23
23
|
- **Stop hook** — checks inbox between turns, notifies of pending messages
|
|
24
24
|
- **Slash commands** — `/patchcord` and `/patchcord-wait` for Codex and Gemini CLI
|
|
25
25
|
- **MCP config** — per-project or global config depending on tool
|
|
26
|
+
- **Cursor CLI** — bearer-only MCP endpoint, `patchcord:*` pre-allowed in
|
|
27
|
+
`~/.cursor/permissions.json`, and inbox/wait skills installed when
|
|
28
|
+
`cursor-agent` is detected
|
|
26
29
|
- **Kimi CLI** — global MCP config plus skills in `~/.kimi/skills/`
|
|
27
30
|
|
|
28
31
|
## How it works
|
package/bin/patchcord.mjs
CHANGED
|
@@ -1014,7 +1014,16 @@ if (cmd === "login" || cmd === "orchestrator" || cmd === "teamlead" || cmd === "
|
|
|
1014
1014
|
const cdir = join(dir, ".cursor"); mkdirSync(cdir, { recursive: true });
|
|
1015
1015
|
return writeJson(join(cdir, "mcp.json"), (o) => {
|
|
1016
1016
|
o.mcpServers = o.mcpServers || {};
|
|
1017
|
-
|
|
1017
|
+
// NO "type" field — cursor-agent silently drops the entire server entry
|
|
1018
|
+
// when "type" is set to any value here (verified: tools simply never
|
|
1019
|
+
// load, ListMcpResources returns empty, no error surfaced anywhere).
|
|
1020
|
+
// Confirmed via 3 headless `cursor-agent --print` variants: with "type"
|
|
1021
|
+
// set, 0 tools; without it, all patchcord tools load correctly — both
|
|
1022
|
+
// against /mcp/bearer and plain /mcp. Do not re-add this field.
|
|
1023
|
+
o.mcpServers.patchcord = {
|
|
1024
|
+
url: `${baseUrl}/mcp/bearer`,
|
|
1025
|
+
headers: hdr,
|
|
1026
|
+
};
|
|
1018
1027
|
});
|
|
1019
1028
|
}
|
|
1020
1029
|
if (tool === "antigravity" || tool === "agy") {
|
|
@@ -1739,9 +1748,14 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1739
1748
|
}
|
|
1740
1749
|
}
|
|
1741
1750
|
|
|
1742
|
-
// Cursor
|
|
1751
|
+
// Cursor. Cursor CLI (cursor-agent) can be installed without creating the
|
|
1752
|
+
// IDE's skills directory, so detect the executable as well as the directory.
|
|
1753
|
+
// The bearer-only endpoint prevents Cursor from incorrectly starting OAuth
|
|
1754
|
+
// discovery when the installer has supplied a static bearer header.
|
|
1743
1755
|
const cursorSkillsRoot = join(HOME, ".cursor", "skills-cursor");
|
|
1744
|
-
|
|
1756
|
+
const hasCursorAgent = run("which cursor-agent");
|
|
1757
|
+
if (hasCursorAgent || existsSync(cursorSkillsRoot)) {
|
|
1758
|
+
mkdirSync(cursorSkillsRoot, { recursive: true });
|
|
1745
1759
|
const cursorSkillDir = join(cursorSkillsRoot, "patchcord");
|
|
1746
1760
|
const cursorWaitDir = join(cursorSkillsRoot, "patchcord-wait");
|
|
1747
1761
|
let cursorChanged = false;
|
|
@@ -1756,6 +1770,27 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1756
1770
|
cursorChanged = true;
|
|
1757
1771
|
}
|
|
1758
1772
|
if (cursorChanged) globalChanges.push("Cursor skills installed");
|
|
1773
|
+
|
|
1774
|
+
if (hasCursorAgent) {
|
|
1775
|
+
const cursorPermissionsPath = join(HOME, ".cursor", "permissions.json");
|
|
1776
|
+
let allowlistChanged = false;
|
|
1777
|
+
const permissionsOk = updateJsonConfig(cursorPermissionsPath, (obj) => {
|
|
1778
|
+
if (obj.mcpAllowlist === undefined) obj.mcpAllowlist = [];
|
|
1779
|
+
if (!Array.isArray(obj.mcpAllowlist)) {
|
|
1780
|
+
console.log(`\n ${yellow}⚠${r} Skipped Cursor MCP allowlist — ${cursorPermissionsPath} has a non-array mcpAllowlist.`);
|
|
1781
|
+
return;
|
|
1782
|
+
}
|
|
1783
|
+
if (!obj.mcpAllowlist.includes("patchcord:*")) {
|
|
1784
|
+
obj.mcpAllowlist.push("patchcord:*");
|
|
1785
|
+
allowlistChanged = true;
|
|
1786
|
+
}
|
|
1787
|
+
});
|
|
1788
|
+
if (!permissionsOk) {
|
|
1789
|
+
globalChanges.push("✗ Cursor permissions error");
|
|
1790
|
+
} else if (allowlistChanged) {
|
|
1791
|
+
globalChanges.push("Cursor MCP allowlist configured");
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1759
1794
|
}
|
|
1760
1795
|
|
|
1761
1796
|
// Windsurf
|
|
@@ -2091,8 +2126,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
2091
2126
|
}
|
|
2092
2127
|
}
|
|
2093
2128
|
|
|
2094
|
-
if (!hasClaude && !existsSync(codexConfig) && !hasKimi) {
|
|
2095
|
-
console.log(`${dim}No Claude Code, Codex CLI, or Kimi Code detected — skipping global setup.${r}`);
|
|
2129
|
+
if (!hasClaude && !existsSync(codexConfig) && !hasKimi && !hasCursorAgent && !existsSync(cursorSkillsRoot)) {
|
|
2130
|
+
console.log(`${dim}No Claude Code, Codex CLI, Cursor, or Kimi Code detected — skipping global setup.${r}`);
|
|
2096
2131
|
console.log(`${dim} Kimi Code: https://kimi.moonshot.cn/download${r}`);
|
|
2097
2132
|
}
|
|
2098
2133
|
|
|
@@ -2518,8 +2553,12 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
2518
2553
|
const cursorPath = join(cursorDir, "mcp.json");
|
|
2519
2554
|
const cursorConfig = {
|
|
2520
2555
|
mcpServers: {
|
|
2556
|
+
// NO "type" field — cursor-agent silently drops the entire server
|
|
2557
|
+
// entry when "type" is set (verified: tools never load, no error
|
|
2558
|
+
// surfaced anywhere). Confirmed via headless cursor-agent --print
|
|
2559
|
+
// testing. Do not re-add this field.
|
|
2521
2560
|
patchcord: {
|
|
2522
|
-
url: `${serverUrl}/mcp`,
|
|
2561
|
+
url: `${serverUrl}/mcp/bearer`,
|
|
2523
2562
|
headers: {
|
|
2524
2563
|
Authorization: `Bearer ${token}`,
|
|
2525
2564
|
"X-Patchcord-Machine": hostname,
|
package/package.json
CHANGED