agent-relay-plugin 0.4.14 → 0.4.16

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,5 +1,5 @@
1
1
  {
2
2
  "name": "agent-relay",
3
3
  "description": "Client connector for Agent Relay — auto-registers Claude Code sessions as agents and enables inter-agent messaging via a lightweight HTTP message bus",
4
- "version": "0.4.11"
4
+ "version": "0.4.16"
5
5
  }
@@ -5,7 +5,14 @@
5
5
  # PPID = Claude Code process, stable across /clear and /compact.
6
6
 
7
7
  RELAY_URL="${AGENT_RELAY_URL:-http://localhost:4850}"
8
- PLUGIN_VERSION=$(jq -r '.version' "${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json" 2>/dev/null || echo "unknown")
8
+ script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
9
+ plugin_root="${CLAUDE_PLUGIN_ROOT:-$(cd "${script_dir}/.." && pwd)}"
10
+ PLUGIN_VERSION=$(
11
+ jq -r '.version // empty' "${plugin_root}/.claude-plugin/plugin.json" 2>/dev/null ||
12
+ jq -r '.version // empty' "${plugin_root}/package.json" 2>/dev/null ||
13
+ true
14
+ )
15
+ PLUGIN_VERSION="${PLUGIN_VERSION:-unknown}"
9
16
  auth_header_args=()
10
17
  auth_header_example=' ${AGENT_RELAY_TOKEN:+-H "X-Agent-Relay-Token: ${AGENT_RELAY_TOKEN}"}'
11
18
  if [ -n "${AGENT_RELAY_TOKEN:-}" ]; then
@@ -77,8 +84,10 @@ server_version=$(curl -s "${auth_header_args[@]}" "${RELAY_URL}/api/stats" 2>/de
77
84
  version_warning=""
78
85
  if [ -z "$server_version" ]; then
79
86
  version_warning="⚠ Server does not report its version — consider updating: bunx agent-relay-server@latest"
87
+ elif [ "$PLUGIN_VERSION" = "unknown" ]; then
88
+ version_warning="⚠ Version mismatch — server ${server_version}, plugin unknown. Restart Claude Code or update the Agent Relay plugin."
80
89
  elif [ "$server_version" != "$PLUGIN_VERSION" ]; then
81
- version_warning="⚠ Version mismatch — server ${server_version}, plugin ${PLUGIN_VERSION}. Update server: bunx agent-relay-server@latest"
90
+ version_warning="⚠ Version mismatch — server ${server_version}, plugin ${PLUGIN_VERSION}. Update/restart Agent Relay server and plugin so the versions match."
82
91
  fi
83
92
 
84
93
  # --- Output context (first stdout = notification injected into conversation) ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-plugin",
3
- "version": "0.4.14",
3
+ "version": "0.4.16",
4
4
  "description": "Claude Code plugin for Agent Relay — auto-registers sessions as agents and enables inter-agent messaging",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",