patchcord 0.5.7 → 0.5.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 with push delivery. Messages from other agents arrive as native channel notifications.",
4
- "version": "0.5.7",
4
+ "version": "0.5.8",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",
@@ -55,9 +55,11 @@ fi
55
55
 
56
56
  # Check inbox — one lightweight HTTP call
57
57
  MACHINE_NAME=$(hostname -s 2>/dev/null || echo "unknown")
58
+ INSTALL_PATH=$(dirname "$MCP_JSON")
58
59
  HTTP_CODE=$(curl -s -o /tmp/patchcord_inbox.json -w "%{http_code}" --max-time 5 \
59
60
  -H "Authorization: Bearer ${TOKEN}" \
60
61
  -H "x-patchcord-machine: ${MACHINE_NAME}" \
62
+ -H "x-patchcord-install-path: ${INSTALL_PATH}" \
61
63
  "${URL}/api/inbox?status=pending&limit=5&count_only=1" 2>/dev/null || echo "000")
62
64
 
63
65
  if [ "$HTTP_CODE" = "401" ] || [ "$HTTP_CODE" = "403" ]; then
@@ -74,8 +74,10 @@ if [ -n "$pc_url" ] && [ -n "$pc_token" ]; then
74
74
  fi
75
75
 
76
76
  if $needs_refresh; then
77
+ install_path=$(dirname "$mcp_json")
77
78
  http_code=$(curl -s -o /tmp/claude/patchcord-sl-resp.json -w "%{http_code}" --max-time 5 \
78
79
  -H "Authorization: Bearer $pc_token" \
80
+ -H "x-patchcord-install-path: ${install_path}" \
79
81
  "${pc_url}/api/inbox?status=pending&limit=50" 2>/dev/null || echo "000")
80
82
  if [ "$http_code" = "401" ] || [ "$http_code" = "403" ]; then
81
83
  pc_data='{"_auth_error":true}'
@@ -81,7 +81,10 @@ function httpJson(urlStr, { method = "GET", headers = {}, body = null } = {}) {
81
81
 
82
82
  async function fetchTicket(baseUrl, token) {
83
83
  const res = await httpJson(`${baseUrl}/api/realtime/ticket`, {
84
- headers: { Authorization: `Bearer ${token}` },
84
+ headers: {
85
+ Authorization: `Bearer ${token}`,
86
+ "x-patchcord-install-path": process.cwd(),
87
+ },
85
88
  });
86
89
  if (res.status === 401 || res.status === 403) {
87
90
  die(`ticket: token rejected (HTTP ${res.status}) — check .mcp.json`);
@@ -109,7 +112,10 @@ async function fetchTicket(baseUrl, token) {
109
112
  // Monitor wakes the agent the same way a real arrival does.
110
113
  async function drainQueueOnce(baseUrl, token) {
111
114
  const res = await httpJson(`${baseUrl}/api/inbox?count_only=1&limit=100`, {
112
- headers: { Authorization: `Bearer ${token}` },
115
+ headers: {
116
+ Authorization: `Bearer ${token}`,
117
+ "x-patchcord-install-path": process.cwd(),
118
+ },
113
119
  });
114
120
  if (res.status !== 200) {
115
121
  throw new Error(`inbox HTTP ${res.status}`);