feat: Global hooks approval modal with plan/question/permission modes
- Add PermissionRequest and Stop approval hooks to local Claude config - Unify PermissionApproval into multi-mode card (permission, plan, question) - Support allowAlways, deny-with-reason, and AskUserQuestion answering - Add cross-process broadcast fallback (HTTP to sync server) - Fix approval scripts to default to .claude/debug/ for local agent
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# Long-poll hooks-approval for PermissionRequest decisions
|
||||
# Reads hook stdin, POSTs to backend, waits up to 125s for UI response
|
||||
# Returns hookSpecificOutput JSON per Claude Code PermissionRequest docs
|
||||
param([string]$agent = "ejecutor")
|
||||
$logFile = "$PSScriptRoot/../.claude-$agent/debug/hooks.log"
|
||||
param([string]$agent = "")
|
||||
if ($agent) { $logFile = "$PSScriptRoot/../.claude-$agent/debug/hooks.log" }
|
||||
else { $logFile = "$PSScriptRoot/../.claude/debug/hooks.log"; $agent = "local" }
|
||||
$ts = Get-Date -Format "HH:mm:ss.fff"
|
||||
$b = [Console]::In.ReadToEnd()
|
||||
Add-Content $logFile "[$ts] [PERM] Hook fired for agent=$agent stdin_len=$($b.Length)"
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
# Returns Stop decision JSON per Claude Code docs:
|
||||
# { "decision": "block", "reason": "..." } to continue implementing
|
||||
# {} or empty to let Claude stop
|
||||
param([string]$agent = "ejecutor")
|
||||
$logFile = "$PSScriptRoot/../.claude-$agent/debug/hooks.log"
|
||||
param([string]$agent = "")
|
||||
if ($agent) { $logFile = "$PSScriptRoot/../.claude-$agent/debug/hooks.log" }
|
||||
else { $logFile = "$PSScriptRoot/../.claude/debug/hooks.log"; $agent = "local" }
|
||||
$ts = Get-Date -Format "HH:mm:ss.fff"
|
||||
$b = [Console]::In.ReadToEnd()
|
||||
Add-Content $logFile "[$ts] [PLAN] Hook fired for agent=$agent stdin_len=$($b.Length)"
|
||||
|
||||
Reference in New Issue
Block a user