agent-relay-plugin 0.4.32 → 0.4.33

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.32"
4
+ "version": "0.4.33"
5
5
  }
@@ -2,6 +2,10 @@
2
2
  # Agent Relay plugin — approval gate for PreToolUse and PermissionDenied hooks.
3
3
  # Enforces AGENT_RELAY_APPROVAL/profile approval policy: open (default), guarded, read-only.
4
4
 
5
+ if [ "${AGENT_RELAY_DISABLED:-}" = "1" ]; then
6
+ exit 0
7
+ fi
8
+
5
9
  script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
6
10
  source "${script_dir}/profile-lib.sh"
7
11
  project=$(basename "${PWD:-unknown}")
@@ -3,6 +3,10 @@
3
3
  # Each new message prints one stdout line (consumed by Monitor as a notification).
4
4
  # Usage: poll-inbox.sh <relay-url> <agent-id> [interval-seconds]
5
5
 
6
+ if [ "${AGENT_RELAY_DISABLED:-}" = "1" ]; then
7
+ exit 0
8
+ fi
9
+
6
10
  RELAY_URL="$1"
7
11
  AGENT_ID="$2"
8
12
  INTERVAL="${3:-10}"
@@ -88,6 +92,11 @@ marked_ready=false
88
92
  # Save parent PID (Claude Code wrapper) — if it dies, we're orphaned.
89
93
  _parent_pid="$PPID"
90
94
  while true; do
95
+ if [ "${AGENT_RELAY_DISABLED:-}" = "1" ]; then
96
+ set_status "offline"
97
+ exit 0
98
+ fi
99
+
91
100
  # Exit if parent process is gone — prevents orphaned monitors from heartbeating forever.
92
101
  if ! kill -0 "$_parent_pid" 2>/dev/null; then
93
102
  set_status "offline"
@@ -4,6 +4,10 @@
4
4
  # Runs automatically via monitors.json — no user interaction required.
5
5
  # CLAUDE_CODE_SESSION_ID = stable session key for state file coordination between monitor and hooks.
6
6
 
7
+ if [ "${AGENT_RELAY_DISABLED:-}" = "1" ]; then
8
+ exit 0
9
+ fi
10
+
7
11
  RELAY_URL="${AGENT_RELAY_URL:-http://localhost:4850}"
8
12
  script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
9
13
  source "${script_dir}/profile-lib.sh"
@@ -2,6 +2,10 @@
2
2
  # Agent Relay plugin — SessionEnd hook
3
3
  # Marks this session's agent as offline using state file written by relay-monitor.
4
4
 
5
+ if [ "${AGENT_RELAY_DISABLED:-}" = "1" ]; then
6
+ exit 0
7
+ fi
8
+
5
9
  RELAY_URL="${AGENT_RELAY_URL:-http://localhost:4850}"
6
10
  auth_header_args=()
7
11
  if [ -n "${AGENT_RELAY_TOKEN:-}" ]; then
@@ -2,6 +2,10 @@
2
2
  # Agent Relay plugin — status update helper for Claude turn hooks.
3
3
  # Usage: set-status.sh <online|idle|busy|offline>
4
4
 
5
+ if [ "${AGENT_RELAY_DISABLED:-}" = "1" ]; then
6
+ exit 0
7
+ fi
8
+
5
9
  status="${1:-}"
6
10
  case "$status" in
7
11
  online|idle|busy|offline) ;;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-plugin",
3
- "version": "0.4.32",
3
+ "version": "0.4.33",
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",