patchcord 0.5.114 → 0.5.115

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/bin/patchcord.mjs CHANGED
@@ -1628,6 +1628,27 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
1628
1628
  }
1629
1629
  }
1630
1630
 
1631
+ // Hermes — refresh patchcord skills to the current version on every run, so
1632
+ // skill fixes land via `patchcord update` (the interactive choice 13 only
1633
+ // installs them once). ~/.hermes/skills is Hermes-only, so no leak risk; only
1634
+ // refresh when the integrations dir already exists (Hermes was set up before).
1635
+ {
1636
+ const hermesSkillsSrc = join(pluginRoot, "per-project-skills", "hermes");
1637
+ const hermesSkillsDest = join(HOME, ".hermes", "skills", "integrations");
1638
+ if (existsSync(hermesSkillsDest) && existsSync(hermesSkillsSrc)) {
1639
+ let hermesChanged = false;
1640
+ for (const name of readdirSync(hermesSkillsSrc)) {
1641
+ const src = join(hermesSkillsSrc, name, "SKILL.md");
1642
+ if (!existsSync(src)) continue;
1643
+ const dest = join(hermesSkillsDest, name, "SKILL.md");
1644
+ const want = readFileSync(src, "utf-8");
1645
+ let cur = ""; try { cur = readFileSync(dest, "utf-8"); } catch {}
1646
+ if (cur !== want) { mkdirSync(dirname(dest), { recursive: true }); writeFileSync(dest, want); hermesChanged = true; }
1647
+ }
1648
+ if (hermesChanged) globalChanges.push("Hermes patchcord skills refreshed");
1649
+ }
1650
+ }
1651
+
1631
1652
  // Kimi CLI
1632
1653
  const hasKimi = run("which kimi");
1633
1654
  if (hasKimi) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.114",
3
+ "version": "0.5.115",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",
@@ -9,6 +9,8 @@ metadata:
9
9
  ---
10
10
  # Patchcord — inbox
11
11
 
12
+ Applies only when the patchcord MCP tools (`mcp_patchcord_*`) are available this session. If they are not, do nothing — do not run the CLI as a substitute, do not read a bearer token from a config file, do not call the API directly, and do not web-search for setup. Just proceed with the user's request.
13
+
12
14
  ## When to use
13
15
  The user mentions patchcord / other agents / checking messages, or a Patchcord webhook fired ("new Patchcord messages").
14
16
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: patchcord-subscribe
3
- description: Set up real-time Patchcord delivery so new messages wake this agent automatically via the gateway webhook bridge.
4
- version: 1.0.0
3
+ description: Real-time Patchcord delivery options for Hermes. Hermes has no in-session listener, so this starts nothing in-turn — it drains the inbox and tells the human the optional one-time push setup.
4
+ version: 2.0.0
5
5
  platforms: [macos, linux]
6
6
  metadata:
7
7
  hermes:
@@ -10,21 +10,19 @@ metadata:
10
10
  ---
11
11
  # Patchcord — subscribe (real-time)
12
12
 
13
- Hermes has no per-turn background-listener tool. Real-time delivery uses the
14
- gateway webhook plus the patchcord bridge: the bridge holds one realtime
15
- connection and POSTs to a Hermes webhook on each new message, and the always-on
16
- gateway injects a prompt that wakes the agent. No re-arm.
13
+ Applies only when the patchcord MCP tools (`mcp_patchcord_*`) are available this session. If they are not, do nothing — do not run the CLI, do not read tokens from config files, do not call the API directly.
17
14
 
18
- ## One-time setup
19
- 1. Register a webhook route on the gateway:
20
- `hermes webhook subscribe patchcord --prompt "You have new Patchcord messages. Run /patchcord-inbox now."`
21
- Note the route URL it prints (e.g. `https://<gateway-host>/webhooks/patchcord`).
22
- 2. Start the bridge under the gateway/tmux/systemd:
23
- `PATCHCORD_HERMES_WEBHOOK=<route-url> patchcord subscribe --hermes`
24
- It self-reconnects and survives JWT cycles — leave it running.
15
+ **Hermes has no per-turn background-listener tool. There is nothing to start in this turn.** Do NOT web-search, do NOT fetch docs, do NOT guess or invent `hermes ...` commands.
25
16
 
26
- ## When the webhook fires
27
- The gateway injects the prompt → run the **patchcord-inbox** skill: read inbox, reply to each message, report to the user.
17
+ When invoked, do exactly this and stop:
18
+ 1. Run the **patchcord-inbox** skill now (drain anything pending).
19
+ 2. Tell the human: "Hermes can't hold a live listener — I'll check the inbox at the start of each session. For push delivery there's a one-time bridge the human sets up; want the steps?"
20
+ 3. Do not configure anything yourself.
28
21
 
29
- ## No webhook available
30
- Fall back to polling: `hermes cron create` a job that runs `/patchcord-inbox` every few minutes.
22
+ ## One-time push setup (the HUMAN runs this, only if they ask)
23
+ Real-time needs the patchcord bridge holding one realtime connection and POSTing to a Hermes webhook the human controls. Hand these to the human — never run them or invent command names yourself:
24
+ - In Hermes, create a webhook route that, when it fires, injects the prompt: `You have new Patchcord messages. Run /patchcord-inbox now.` (Use whatever the installed Hermes version calls this — the human knows their CLI.)
25
+ - Start the bridge pointed at that route URL and leave it running:
26
+ `PATCHCORD_HERMES_WEBHOOK=<route-url> patchcord subscribe --hermes`
27
+
28
+ Once the bridge runs, each new message fires the webhook → the gateway wakes the agent → run **patchcord-inbox**. If the human doesn't want the bridge, checking inbox at session start is the whole feature — that's fine.
@@ -9,6 +9,8 @@ metadata:
9
9
  ---
10
10
  # Patchcord — wait
11
11
 
12
+ Applies only when the patchcord MCP tools (`mcp_patchcord_*`) are available this session. If they are not, do nothing — do not run the CLI, read tokens from config files, call the API directly, or web-search for setup. Proceed with the user's request.
13
+
12
14
  ## When to use
13
15
  You sent a message and expect a reply, or the user asks you to wait for an incoming Patchcord message.
14
16