refactor: add agent param to notify.ps1, update claude settings

This commit is contained in:
2026-02-24 11:10:38 -06:00
parent 2edb3623c8
commit 3112c53d86
2 changed files with 9 additions and 4 deletions

View File

@@ -88,7 +88,8 @@
"mcp__agent-ui__z590_nucleoriofrio_com-edit_component", "mcp__agent-ui__z590_nucleoriofrio_com-edit_component",
"mcp__agent-ui__z590_nucleoriofrio_com-list_fs_components", "mcp__agent-ui__z590_nucleoriofrio_com-list_fs_components",
"mcp__agent-ui__z590_nucleoriofrio_com-load_fs_component", "mcp__agent-ui__z590_nucleoriofrio_com-load_fs_component",
"Bash(grep:*)" "Bash(grep:*)",
"WebFetch(domain:v2.tauri.app)"
] ]
}, },
"enableAllProjectMcpServers": true, "enableAllProjectMcpServers": true,

View File

@@ -1,7 +1,11 @@
# Unified hook notifier - forwards all hook events to agent-ui server # Unified hook notifier - forwards all hook events to agent-ui server
# Claude Code pipes JSON via stdin with session_id, transcript_path, etc. # Usage: powershell -NoProfile -File hooks/notify.ps1 [agent]
# The server routes to the correct agent automatically. # If agent is specified, passes ?agent=<name> so the backend knows the source.
# If omitted, the backend auto-detects from session_id/transcript_path.
param([string]$agent = "")
$b = [Console]::In.ReadToEnd() $b = [Console]::In.ReadToEnd()
$url = 'http://localhost:4101/api/claude-hook'
if ($agent) { $url += "?agent=$agent" }
try { try {
Invoke-RestMethod -Uri 'http://localhost:4101/api/claude-hook' -Method POST -Body $b -ContentType 'application/json' -TimeoutSec 3 | Out-Null Invoke-RestMethod -Uri $url -Method POST -Body $b -ContentType 'application/json' -TimeoutSec 3 | Out-Null
} catch {} } catch {}