agent-relay-plugin 0.4.15 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/hooks/relay-monitor.sh +11 -2
- package/package.json +1 -1
package/hooks/relay-monitor.sh
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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