From ea30d8b457cbc0a01f05632cfb3b749595c0ebe1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 17:49:14 +0000 Subject: [PATCH 1/4] Initial plan From 2fac3183f8a28d45fd0cc69be456f2f1c66ef2b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 17:56:22 +0000 Subject: [PATCH 2/4] Add desktop notification support to AEA monitor script Co-authored-by: 0xrinegade <101195284+0xrinegade@users.noreply.github.com> --- ...26T175356706Z-from-claude-test-simple.json | 26 +++++++++++++++++++ scripts/aea-monitor.sh | 13 ++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .aea/message-20251026T175356706Z-from-claude-test-simple.json diff --git a/.aea/message-20251026T175356706Z-from-claude-test-simple.json b/.aea/message-20251026T175356706Z-from-claude-test-simple.json new file mode 100644 index 0000000..24f9f97 --- /dev/null +++ b/.aea/message-20251026T175356706Z-from-claude-test-simple.json @@ -0,0 +1,26 @@ +{ + "protocol_version": "0.1.0", + "message_id": "test-simple-question", + "message_type": "question", + "timestamp": "2025-10-14T16:00:00Z", + "sender": { + "agent_id": "claude-test", + "repo_path": "/tmp/test", + "user": "developer" + }, + "recipient": { + "agent_id": "claude-current" + }, + "routing": { + "priority": "normal", + "requires_response": true + }, + "content": { + "subject": "How to optimize orderbook insertion performance?", + "body": "We're seeing slow orderbook insertions at high load. What are the recommended optimization strategies? Are there any SIMD optimizations available?\n\nContext:\n- Current throughput: 150 orders/sec\n- Target throughput: 500 orders/sec\n- Current method: single-threaded insertion" + }, + "metadata": { + "conversation_id": "test-simple-question", + "tags": ["performance", "optimization"] + } +} diff --git a/scripts/aea-monitor.sh b/scripts/aea-monitor.sh index d67205a..a918233 100755 --- a/scripts/aea-monitor.sh +++ b/scripts/aea-monitor.sh @@ -54,6 +54,16 @@ info() { echo -e "${BLUE}[AEA Monitor]${NC} $1" } +send_notification() { + local title="$1" + local message="$2" + + # Optional: Send desktop notification if available + if command -v notify-send &> /dev/null; then + notify-send "$title" "$message" -i dialog-information -t 10000 2>/dev/null || true + fi +} + #=============================================================================== # PID Management #=============================================================================== @@ -347,6 +357,9 @@ check_project_messages() { echo "[$timestamp] Monitor found $unprocessed_count unprocessed messages" >> ".aea/agent.log" fi + # Send desktop notification + send_notification "AEA Monitor" "New messages in $project_name" + # TODO: In future, this would trigger Claude via API # For now, just log that messages are waiting warn "⏳ Messages waiting for Claude processing in $project_name" From 869c6d6834af8da68920bbb1bf8247b6cb8a27fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 17:57:00 +0000 Subject: [PATCH 3/4] Remove test message file from repository Co-authored-by: 0xrinegade <101195284+0xrinegade@users.noreply.github.com> --- ...26T175356706Z-from-claude-test-simple.json | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 .aea/message-20251026T175356706Z-from-claude-test-simple.json diff --git a/.aea/message-20251026T175356706Z-from-claude-test-simple.json b/.aea/message-20251026T175356706Z-from-claude-test-simple.json deleted file mode 100644 index 24f9f97..0000000 --- a/.aea/message-20251026T175356706Z-from-claude-test-simple.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "protocol_version": "0.1.0", - "message_id": "test-simple-question", - "message_type": "question", - "timestamp": "2025-10-14T16:00:00Z", - "sender": { - "agent_id": "claude-test", - "repo_path": "/tmp/test", - "user": "developer" - }, - "recipient": { - "agent_id": "claude-current" - }, - "routing": { - "priority": "normal", - "requires_response": true - }, - "content": { - "subject": "How to optimize orderbook insertion performance?", - "body": "We're seeing slow orderbook insertions at high load. What are the recommended optimization strategies? Are there any SIMD optimizations available?\n\nContext:\n- Current throughput: 150 orders/sec\n- Target throughput: 500 orders/sec\n- Current method: single-threaded insertion" - }, - "metadata": { - "conversation_id": "test-simple-question", - "tags": ["performance", "optimization"] - } -} From 5156e7bb235498432148c93d2b51a59561d75240 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 18:30:21 +0000 Subject: [PATCH 4/4] Add notification throttling to prevent spam Co-authored-by: 0xrinegade <101195284+0xrinegade@users.noreply.github.com> --- scripts/aea-monitor.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/aea-monitor.sh b/scripts/aea-monitor.sh index a918233..3040595 100755 --- a/scripts/aea-monitor.sh +++ b/scripts/aea-monitor.sh @@ -357,13 +357,29 @@ check_project_messages() { echo "[$timestamp] Monitor found $unprocessed_count unprocessed messages" >> ".aea/agent.log" fi - # Send desktop notification - send_notification "AEA Monitor" "New messages in $project_name" + # Send desktop notification only if message count has increased + # Track notification state to avoid spam + local notif_state_file="$CONFIG_DIR/.notification_state_$(echo "$project_path" | md5sum | cut -d' ' -f1)" + local last_notified_count=0 + + if [ -f "$notif_state_file" ]; then + last_notified_count=$(cat "$notif_state_file" 2>/dev/null || echo 0) + fi + + # Only notify if message count increased (new messages arrived) + if [ "$unprocessed_count" -gt "$last_notified_count" ]; then + send_notification "AEA Monitor" "New messages in $project_name" + echo "$unprocessed_count" > "$notif_state_file" + fi # TODO: In future, this would trigger Claude via API # For now, just log that messages are waiting warn "⏳ Messages waiting for Claude processing in $project_name" warn " Run: cd $project_path && /aea" + else + # Clear notification state when all messages are processed + local notif_state_file="$CONFIG_DIR/.notification_state_$(echo "$project_path" | md5sum | cut -d' ' -f1)" + rm -f "$notif_state_file" 2>/dev/null fi }