patchcord 0.5.131 → 0.5.132

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "patchcord",
3
3
  "description": "Cross-machine agent messaging. Messages from other agents land in the inbox and wake the agent to reply.",
4
- "version": "0.5.131",
4
+ "version": "0.5.132",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
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,11 @@ 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
- o.mcpServers.patchcord = { url: `${baseUrl}/mcp`, headers: hdr };
1017
+ o.mcpServers.patchcord = {
1018
+ type: "streamable-http",
1019
+ url: `${baseUrl}/mcp/bearer`,
1020
+ headers: hdr,
1021
+ };
1018
1022
  });
1019
1023
  }
1020
1024
  if (tool === "antigravity" || tool === "agy") {
@@ -1739,9 +1743,14 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
1739
1743
  }
1740
1744
  }
1741
1745
 
1742
- // Cursor
1746
+ // Cursor. Cursor CLI (cursor-agent) can be installed without creating the
1747
+ // IDE's skills directory, so detect the executable as well as the directory.
1748
+ // The bearer-only endpoint prevents Cursor from incorrectly starting OAuth
1749
+ // discovery when the installer has supplied a static bearer header.
1743
1750
  const cursorSkillsRoot = join(HOME, ".cursor", "skills-cursor");
1744
- if (existsSync(cursorSkillsRoot)) {
1751
+ const hasCursorAgent = run("which cursor-agent");
1752
+ if (hasCursorAgent || existsSync(cursorSkillsRoot)) {
1753
+ mkdirSync(cursorSkillsRoot, { recursive: true });
1745
1754
  const cursorSkillDir = join(cursorSkillsRoot, "patchcord");
1746
1755
  const cursorWaitDir = join(cursorSkillsRoot, "patchcord-wait");
1747
1756
  let cursorChanged = false;
@@ -1756,6 +1765,27 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
1756
1765
  cursorChanged = true;
1757
1766
  }
1758
1767
  if (cursorChanged) globalChanges.push("Cursor skills installed");
1768
+
1769
+ if (hasCursorAgent) {
1770
+ const cursorPermissionsPath = join(HOME, ".cursor", "permissions.json");
1771
+ let allowlistChanged = false;
1772
+ const permissionsOk = updateJsonConfig(cursorPermissionsPath, (obj) => {
1773
+ if (obj.mcpAllowlist === undefined) obj.mcpAllowlist = [];
1774
+ if (!Array.isArray(obj.mcpAllowlist)) {
1775
+ console.log(`\n ${yellow}⚠${r} Skipped Cursor MCP allowlist — ${cursorPermissionsPath} has a non-array mcpAllowlist.`);
1776
+ return;
1777
+ }
1778
+ if (!obj.mcpAllowlist.includes("patchcord:*")) {
1779
+ obj.mcpAllowlist.push("patchcord:*");
1780
+ allowlistChanged = true;
1781
+ }
1782
+ });
1783
+ if (!permissionsOk) {
1784
+ globalChanges.push("✗ Cursor permissions error");
1785
+ } else if (allowlistChanged) {
1786
+ globalChanges.push("Cursor MCP allowlist configured");
1787
+ }
1788
+ }
1759
1789
  }
1760
1790
 
1761
1791
  // Windsurf
@@ -2091,8 +2121,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
2091
2121
  }
2092
2122
  }
2093
2123
 
2094
- if (!hasClaude && !existsSync(codexConfig) && !hasKimi) {
2095
- console.log(`${dim}No Claude Code, Codex CLI, or Kimi Code detected — skipping global setup.${r}`);
2124
+ if (!hasClaude && !existsSync(codexConfig) && !hasKimi && !hasCursorAgent && !existsSync(cursorSkillsRoot)) {
2125
+ console.log(`${dim}No Claude Code, Codex CLI, Cursor, or Kimi Code detected — skipping global setup.${r}`);
2096
2126
  console.log(`${dim} Kimi Code: https://kimi.moonshot.cn/download${r}`);
2097
2127
  }
2098
2128
 
@@ -2519,7 +2549,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
2519
2549
  const cursorConfig = {
2520
2550
  mcpServers: {
2521
2551
  patchcord: {
2522
- url: `${serverUrl}/mcp`,
2552
+ type: "streamable-http",
2553
+ url: `${serverUrl}/mcp/bearer`,
2523
2554
  headers: {
2524
2555
  Authorization: `Bearer ${token}`,
2525
2556
  "X-Patchcord-Machine": hostname,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.131",
3
+ "version": "0.5.132",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "scripts": {
6
6
  "version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin/plugin.json"