patchcord 0.6.4 → 0.6.5

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.4",
4
+ "version": "0.6.5",
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.6.4",
3
+ "version": "0.6.5",
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"
@@ -49,10 +49,16 @@ fi
49
49
 
50
50
  BASE_URL=$(echo "$URL" | sed 's|/mcp$||; s|/mcp/bearer$||')
51
51
 
52
- # Derive agent identity for pidfile
52
+ # Poll loop: count_only + no registry write — same cost model as subscribe.mjs
53
+ # drainQueueOnce (id SELECT only). Kimi cannot hold a WebSocket/Realtime
54
+ # listener (no Monitor; task must exit to wake), so polling is the transport;
55
+ # the bug was fetching full message bodies every tick.
56
+ INBOX_POLL_QS="status=pending&limit=5&count_only=1&touch_presence=0"
57
+
58
+ # Derive agent identity for pidfile (count_only, no registry write)
53
59
  IDENTITY_RESP=$(curl -s --max-time 5 \
54
60
  -H "Authorization: Bearer ${TOKEN}" \
55
- "${BASE_URL}/api/inbox?limit=0" 2>/dev/null || echo "{}")
61
+ "${BASE_URL}/api/inbox?limit=0&count_only=1&touch_presence=0" 2>/dev/null || echo "{}")
56
62
  NAMESPACE_ID=$(echo "$IDENTITY_RESP" | jq -r '.namespace_id // empty' 2>/dev/null || true)
57
63
  AGENT_ID=$(echo "$IDENTITY_RESP" | jq -r '.agent_id // empty' 2>/dev/null || true)
58
64
 
@@ -99,7 +105,7 @@ echo "PATCHCORD: subscribe started (poll ${INTERVAL}s) for ${AGENT_ID}@${NAMESPA
99
105
  while true; do
100
106
  RESP=$(curl -s --max-time 10 \
101
107
  -H "Authorization: Bearer ${TOKEN}" \
102
- "${BASE_URL}/api/inbox?status=pending&limit=5" 2>/dev/null || echo "{}")
108
+ "${BASE_URL}/api/inbox?${INBOX_POLL_QS}" 2>/dev/null || echo "{}")
103
109
 
104
110
  COUNT=$(echo "$RESP" | jq -r '.pending_count // 0' 2>/dev/null || echo "0")
105
111