diff --git a/data/metrics.jsonl b/data/metrics.jsonl index 3bf341b..3033b6a 100644 --- a/data/metrics.jsonl +++ b/data/metrics.jsonl @@ -1,3 +1,4 @@ {"date": "2026-01-28", "timestamp": "2026-01-28T01:25:47.177362+00:00", "phase": "baseline", "followers": 63, "following": 13, "posts": 226, "replies": 91, "originals": 9, "reply_rate": 91.0, "likes_received": 56, "sample_size": 100, "likes_given": 16} {"date": "2026-01-28", "timestamp": "2026-01-28T02:06:58.047735+00:00", "phase": "engagement", "followers": 63, "following": 13, "posts": 233, "replies": 91, "originals": 9, "reply_rate": 91.0, "likes_received": 58, "sample_size": 100, "likes_given": 23} {"date": "2026-01-28", "timestamp": "2026-01-28T03:02:08.138252+00:00", "phase": "engagement", "followers": 65, "following": 15, "posts": 244, "replies": 90, "originals": 10, "reply_rate": 90.0, "likes_received": 58, "sample_size": 100, "likes_given": 31} +{"date": "2026-01-28", "timestamp": "2026-01-28T03:20:13.248063+00:00", "phase": "engagement", "followers": 66, "following": 15, "posts": 244, "replies": 90, "originals": 10, "reply_rate": 90.0, "likes_received": 64, "sample_size": 100, "likes_given": 31} diff --git a/hooks/livestream.py b/hooks/livestream.py index 157fb1b..e171323 100755 --- a/hooks/livestream.py +++ b/hooks/livestream.py @@ -104,6 +104,10 @@ def main(): except: sys.exit(0) + # Log for debugging + with open("/home/cameron/central/logs/hook_activity_debug.json", "a") as f: + f.write(json.dumps(input_data, indent=2) + "\n---\n") + event_type = input_data.get("event_type") tool_name = input_data.get("tool_name", "") tool_input = input_data.get("tool_input", {}) diff --git a/hooks/publish-response.py b/hooks/publish-response.py index d226784..98cffbd 100755 --- a/hooks/publish-response.py +++ b/hooks/publish-response.py @@ -88,22 +88,24 @@ def main(): except: sys.exit(0) + # Log what we receive for debugging + with open("/home/cameron/central/logs/hook_debug.json", "a") as f: + f.write(json.dumps(input_data, indent=2) + "\n---\n") + event_type = input_data.get("event_type") if event_type != "Stop": sys.exit(0) - # Get the assistant's response - assistant_message = input_data.get("assistant_message", "") - - if not assistant_message or len(assistant_message) < 10: - sys.exit(0) + # Stop hook only provides metadata, not actual response text + stop_reason = input_data.get("stop_reason", "unknown") + message_count = input_data.get("message_count", 0) + tool_call_count = input_data.get("tool_call_count", 0) - # Skip if it's mostly tool calls (starts with function markers) - if assistant_message.strip().startswith("<"): - sys.exit(0) + # Build summary from metadata + summary = f"Turn complete: {tool_call_count} tools, {message_count} messages" - post_response(assistant_message) + post_response(summary) sys.exit(0)