fix(claude): accept async rewake metadata

This commit is contained in:
ZacharyZhang-NY committed 2026-07-20 09:11:30 -04:00
1 parent 2dc633a506
commit f619b04289
4 files changed
+27 -4

No files matched your search

+9 -1
View File
@@ -34,7 +34,8 @@ var claudeHookEvents = stringSet(
var claudeHandlerKeys = map[string]map[string]struct{}{
"command": stringSet(
"if", "once", "statusMessage", "timeout", "args", "async",
"asyncRewake", "command", "shell", "type",
"asyncRewake", "command", "rewakeMessage", "rewakeSummary",
"shell", "type",
),
"prompt": stringSet(
"if", "once", "statusMessage", "timeout", "continueOnBlock", "model",
@@ -252,6 +253,13 @@ func validateClaudeHandler(
return nil, err
}
}
for _, field := range []string{"rewakeMessage", "rewakeSummary"} {
if _, exists := handler[field]; exists {
if _, err := requireClaudeString(handler, field, label); err != nil {
return nil, err
}
}
}
if shell, exists := handler["shell"]; exists &&
shell != "bash" && shell != "powershell" {
return nil, fmt.Errorf(