patchcord 0.6.6 → 0.6.8

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.6",
4
+ "version": "0.6.8",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -1196,9 +1196,9 @@ if (cmd === "login" || cmd === "orchestrator" || cmd === "teamlead" || cmd === "
1196
1196
  writeWorkerConfig(tool, dir, base, json.token, hostname);
1197
1197
  if (role) {
1198
1198
  const agyNote = (tool === "antigravity" || tool === "agy")
1199
- ? "\nMux prompts with a concrete task take priority — do not call inbox() before doing the work in the prompt.\n"
1199
+ ? "\nIf the `inbox` MCP tool is not loaded, Patchcord is disconnected — do not run the patchcord CLI or read tokens from config files; do the user's/mux task only.\n"
1200
1200
  : "";
1201
- try { writeFileSync(join(dir, "AGENTS.md"), `# ${arg} — role: ${role}\n\nYou are \`${arg}\` in the \`${ns}\` Patchcord team. Role: ${role}.\nCoordinate with teammates over Patchcord (send_message / reply). Call inbox only on explicit wake or after finishing the current task.${agyNote}`); } catch {}
1201
+ try { writeFileSync(join(dir, "AGENTS.md"), `# ${arg} — role: ${role}\n\nYou are \`${arg}\` in the \`${ns}\` Patchcord team. Role: ${role}.\nCoordinate with teammates over Patchcord (inbox / send_message / reply).${agyNote}`); } catch {}
1202
1202
  }
1203
1203
  // Record in the local team manifest so `team launch` / `team status` see it.
1204
1204
  try {
@@ -1953,15 +1953,15 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
1953
1953
  globalChanges.push("Removed global Patchcord skills/instructions (agy reads ~/.gemini/skills — per-project only)");
1954
1954
  }
1955
1955
  // agy-cli loads ALL of ~/.gemini/skills in every folder — warn if orchestrator/mux
1956
- // skills are present (they say "call inbox first" and override mux task prompts).
1956
+ // skills are present (they mention patchcord/inbox and trigger CLI/token scavenging).
1957
1957
  const geminiSkillsRoot = join(HOME, ".gemini", "skills");
1958
1958
  if (existsSync(geminiSkillsRoot)) {
1959
- const noisy = ["orchestrator-comms", "orchestrator-team", "orchestrator-flow", "mux", "actor-lead", "actor-team-lead"];
1959
+ const noisy = ["orchestrator-comms", "orchestrator-team", "orchestrator-flow", "mux", "actor-lead", "actor-team-lead", "patchcord"];
1960
1960
  let entries = [];
1961
1961
  try { entries = readdirSync(geminiSkillsRoot, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name); } catch {}
1962
1962
  const found = entries.filter((n) => noisy.some((p) => n.includes(p)));
1963
1963
  if (found.length) {
1964
- console.log(` ${M.yellow}warning:${M.rst} ~/.gemini/skills has orchestrator/mux skills (${found.join(", ")}) — agy-cli reads them globally and may call inbox before your mux task. Keep orchestrator skills in ~/.claude/skills or ~/.codex/skills only.`);
1964
+ console.log(` ${yellow}warning:${r} ~/.gemini/skills has global skills (${found.join(", ")}) — agy-cli reads them in every folder and may hunt patchcord without MCP. Keep orchestrator/patchcord skills in ~/.claude/skills or per-project .agents/skills only.`);
1965
1965
  }
1966
1966
  }
1967
1967
  // true = configured, false = file absent (definitely not), null = unparseable (unknown)
@@ -2429,21 +2429,14 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
2429
2429
  const identityStr = existingIdentity ? ` (${bold}${existingIdentity}${r}${dim})` : "";
2430
2430
  console.log(`\n ${dim}${existingToolName} agent is already configured in this project${identityStr}${r}`);
2431
2431
 
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
2432
  // Q1: Add another agent? (most likely reason to re-run installer)
2438
- const addAnswer = (await askU(` ${bold}Add another agent to this project? (y/N):${r} `)).trim().toLowerCase();
2433
+ const addAnswer = (await ask(` ${bold}Add another agent to this project? (y/N):${r} `)).trim().toLowerCase();
2439
2434
  if (addAnswer === "y" || addAnswer === "yes") {
2440
- rlU.close();
2441
2435
  // Drop into browser connect flow — fresh setup for new agent
2442
2436
  token = "";
2443
2437
  } else {
2444
2438
  // Q2: Update existing agent?
2445
- const updateAnswer = (await askU(` ${bold}Update ${existingToolName} agent? (y/N):${r} `)).trim().toLowerCase();
2446
- rlU.close();
2439
+ const updateAnswer = (await ask(` ${bold}Update ${existingToolName} agent? (y/N):${r} `)).trim().toLowerCase();
2447
2440
  if (updateAnswer === "y" || updateAnswer === "yes") {
2448
2441
  token = existingToken;
2449
2442
  if (existingIdentity) {
@@ -2459,6 +2452,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
2459
2452
  } else {
2460
2453
  // Both N — skills already updated by global setup, done
2461
2454
  console.log(`\n ${dim}Skills updated.${r}`);
2455
+ rl.close();
2462
2456
  process.exit(0);
2463
2457
  }
2464
2458
  }
@@ -2466,7 +2460,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
2466
2460
 
2467
2461
  if (!token) {
2468
2462
  // Browser connect flow
2469
- if (rl) rl.close();
2463
+ rl.close();
2470
2464
 
2471
2465
  function canOpenBrowser() {
2472
2466
  if (process.env.SSH_CLIENT || process.env.SSH_TTY) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
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"
@@ -1,22 +1,24 @@
1
1
  ---
2
2
  name: patchcord-inbox
3
- description: Patchcord MCP inbox workflow for this project's Antigravity agent
3
+ description: >
4
+ Antigravity-only. Patchcord MCP inbox workflow for THIS project's agy seat.
5
+ Active ONLY when mcp_patchcord_inbox (or patchcord/inbox) is loaded — ignore
6
+ entirely when Patchcord MCP is absent.
4
7
  ---
5
8
 
6
9
  ## Applies only when Patchcord MCP tools are loaded
7
10
 
8
- If the `inbox` MCP tool is not available in this session, this skill does not
9
- apply. Do nothing: do not run the Patchcord CLI, read a token from a config
10
- file, or call the HTTP API. A missing project MCP config is a normal state.
11
+ If the `inbox` MCP tool is **not** available in this session, this skill does not
12
+ apply. **Stop here.** Do nothing patchcord-related:
11
13
 
12
- **TASK PRIORITY:** If the user's current message already names a concrete task
13
- (mux paste, file to build, "Focus on X", deliverables listed), do that work
14
- FIRST. Do NOT call inbox() or recall() before executing the task. The task text
15
- IS the assignment inbox is for when the prompt is only a wake or you need
16
- message IDs after the work is done.
14
+ - Do **not** run the `patchcord` CLI (`whoami`, `inbox`, `recall`, HTTP calls, etc.).
15
+ - Do **not** read a bearer token from `.agents/mcp_config.json`, `.mcp.json`,
16
+ `settings.json`, env vars, or **any other project's folder**.
17
+ - Do **not** "check patchcord", "find the session", or fabricate an MCP connection.
18
+ - A missing MCP tool is normal — proceed with the user's actual task (mux paste,
19
+ files, commands) with zero patchcord steps.
17
20
 
18
- Invoke with `/patchcord-inbox` when Patchcord MCP is connected AND you need to
19
- check team mail (not at session start, not before a concrete task in the prompt).
21
+ Invoke with `/patchcord-inbox` only when Patchcord MCP is connected in this project.
20
22
 
21
23
  Call the `inbox` MCP tool now. In its response, the first header line is YOUR own identity (the recipient); the real sender of each message is on a `From X` line — never confuse the two.
22
24
 
@@ -1,13 +1,15 @@
1
1
  ---
2
2
  name: patchcord-wait
3
- description: Block until one Patchcord message arrives (this project's Antigravity agent)
3
+ description: >
4
+ Antigravity-only. Block until one Patchcord message arrives. Active ONLY when
5
+ wait_for_message MCP is loaded — ignore when Patchcord MCP is absent.
4
6
  ---
5
7
 
6
8
  ## Applies only when Patchcord MCP tools are loaded
7
9
 
8
- If the `wait_for_message` MCP tool is not available in this session, this skill
9
- does not apply. Do nothing: do not run the Patchcord CLI, read a token from a
10
- config file, or call the HTTP API. A missing project MCP config is a normal state.
10
+ If the `wait_for_message` MCP tool is **not** available in this session, this skill
11
+ does not apply. **Stop here.** Do not run the Patchcord CLI, read tokens from config
12
+ files (this project or any other), or call the HTTP API.
11
13
 
12
14
  Invoke with `/patchcord-wait` when Patchcord MCP is connected in this project.
13
15
 
@@ -19,8 +19,6 @@ This skill governs those 7 MCP tools. It applies only if they are actually avail
19
19
  - Do NOT read a bearer token out of `.mcp.json`, `settings.json`, `mcp_config.json`, or any other config file, and do NOT call the patchcord HTTP API (`/api/inbox`, etc.) directly. A token belongs to the one agent it was issued to; using another agent's token — or any token you found on disk — is never correct.
20
20
  - Just proceed with the user's actual request.
21
21
 
22
- **TASK PRIORITY (when MCP tools ARE present):** If the user's current message already contains a concrete task, do that work FIRST. Do not call inbox() first. Inbox is for explicit check-inbox requests, wake-only nudges, or finding the next task after you finish — not before executing a mux prompt that already spells out the work.
23
-
24
22
  A missing tool means patchcord is not configured for this agent. That is a normal, silent state, not a problem to work around.
25
23
 
26
24
  ## Do the work, never just acknowledge
@@ -47,7 +45,7 @@ The user can undo any change in 3 seconds with git. A wrong action costs nothing
47
45
 
48
46
  The following applies only when the patchcord MCP tools are present in this session (see the gate above). If they are absent, skip this entire section.
49
47
 
50
- **If the current user message already contains a concrete task, skip inbox and do that work first** (see TASK PRIORITY above). Otherwise call inbox() when the prompt is a wake-only nudge or you need coordination before starting work. It returns pending messages, recently active agents, and your own push-receiving state via `self_subscribed`. Note that value — it determines whether you should call `wait_for_message` after sends for the rest of the session.
48
+ Call inbox(). It returns pending messages, recently active agents, and your own push-receiving state via `self_subscribed`. Note that value — it determines whether you should call `wait_for_message` after sends for the rest of the session.
51
49
 
52
50
  If `subscribe_appears_down: true` is in the response, your subscribe.mjs was running but appears dead. Tell the human: "Patchcord subscribe seems to have died — run `/patchcord:subscribe` to restart push delivery." Do not try to restart it yourself.
53
51