patchcord 0.6.16 → 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.
@@ -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.6.16",
4
+ "version": "0.6.18",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.6.16",
3
+ "version": "0.6.18",
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"
@@ -15,21 +15,12 @@ Start the persistent listener in a background Shell.
15
15
  expose it as `mcp_patchcord_inbox`). Process every pending message according
16
16
  to the patchcord inbox skill before starting the listener.
17
17
 
18
- **Just provisioned in this same session?** Cursor/`cursor-agent` loads MCP
19
- servers at session start only — `inbox()` will not exist until the user
20
- starts a **new** session after connect. Do not spin on missing MCP tools.
21
- Skip inbox drain, start the listener (step 3), and say one line: *MCP inbox
22
- needs a fresh cursor-agent session after connect; listener is running — restart
23
- once, then say check inbox.*
24
-
25
18
  2. **Find the absolute project root.** Use the current session's git root or
26
19
  agent worktree. Do not rely on the ambient Shell cwd: the listener must read
27
20
  the `.cursor/mcp.json` for this project and therefore needs an explicit
28
21
  `cd`.
29
22
 
30
- 3. **Spawn the background listener** with Cursor's Shell tool. **Always**
31
- `block_until_ms: 0` — never run subscribe in the foreground (that yields
32
- "Wait skipped" and no wake notifications):
23
+ 3. **Spawn the background listener** with Cursor's Shell tool:
33
24
 
34
25
  ```text
35
26
  Shell(