@@ -25,7 +25,7 @@ func NewActionExecutor(runner CommandRunner) *ActionExecutor {
2525
2626// ExecuteNotificationAction executes an action for the Notification event and returns JSON output.
2727// Similar to SessionStart, Notification uses hookSpecificOutput with additionalContext.
28- func (e * ActionExecutor ) ExecuteNotificationAction (action Action , input * NotificationInput , rawJSON interface {} ) (* ActionOutput , error ) {
28+ func (e * ActionExecutor ) ExecuteNotificationAction (action Action , input * NotificationInput , rawJSON any ) (* ActionOutput , error ) {
2929 switch action .Type {
3030 case "command" :
3131 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -145,7 +145,7 @@ func (e *ActionExecutor) ExecuteNotificationAction(action Action, input *Notific
145145
146146// ExecuteSubagentStartAction executes an action for the SubagentStart event and returns JSON output.
147147// Similar to Notification, SubagentStart uses hookSpecificOutput with additionalContext.
148- func (e * ActionExecutor ) ExecuteSubagentStartAction (action Action , input * SubagentStartInput , rawJSON interface {} ) (* ActionOutput , error ) {
148+ func (e * ActionExecutor ) ExecuteSubagentStartAction (action Action , input * SubagentStartInput , rawJSON any ) (* ActionOutput , error ) {
149149 switch action .Type {
150150 case "command" :
151151 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -266,7 +266,7 @@ func (e *ActionExecutor) ExecuteSubagentStartAction(action Action, input *Subage
266266// ExecuteStopAction executes an action for the Stop event.
267267// Returns ActionOutput for JSON serialization with decision/reason fields.
268268// Stop hooks use top-level decision pattern (no hookSpecificOutput).
269- func (e * ActionExecutor ) ExecuteStopAction (action Action , input * StopInput , rawJSON interface {} ) (* ActionOutput , error ) {
269+ func (e * ActionExecutor ) ExecuteStopAction (action Action , input * StopInput , rawJSON any ) (* ActionOutput , error ) {
270270 switch action .Type {
271271 case "command" :
272272 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -426,7 +426,7 @@ func (e *ActionExecutor) ExecuteStopAction(action Action, input *StopInput, rawJ
426426
427427// ExecuteSubagentStopAction executes an action for the SubagentStop event.
428428// Command failures result in exit status 2 to block the subagent stop operation.
429- func (e * ActionExecutor ) ExecuteSubagentStopAction (action Action , input * SubagentStopInput , rawJSON interface {} ) (* ActionOutput , error ) {
429+ func (e * ActionExecutor ) ExecuteSubagentStopAction (action Action , input * SubagentStopInput , rawJSON any ) (* ActionOutput , error ) {
430430 switch action .Type {
431431 case "command" :
432432 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -589,7 +589,7 @@ func (e *ActionExecutor) ExecuteSubagentStopAction(action Action, input *Subagen
589589// ExecutePreCompactAction executes an action for the PreCompact event and returns ActionOutput.
590590// PreCompact always returns continue=true (fail-safe: compaction cannot be blocked).
591591// Errors are reported via systemMessage field, not by blocking execution.
592- func (e * ActionExecutor ) ExecutePreCompactAction (action Action , input * PreCompactInput , rawJSON interface {} ) (* ActionOutput , error ) {
592+ func (e * ActionExecutor ) ExecutePreCompactAction (action Action , input * PreCompactInput , rawJSON any ) (* ActionOutput , error ) {
593593 switch action .Type {
594594 case "command" :
595595 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -668,7 +668,7 @@ func (e *ActionExecutor) ExecutePreCompactAction(action Action, input *PreCompac
668668
669669// ExecuteSessionStartAction executes an action for the SessionStart event.
670670// Returns ActionOutput for JSON serialization.
671- func (e * ActionExecutor ) ExecuteSessionStartAction (action Action , input * SessionStartInput , rawJSON interface {} ) (* ActionOutput , error ) {
671+ func (e * ActionExecutor ) ExecuteSessionStartAction (action Action , input * SessionStartInput , rawJSON any ) (* ActionOutput , error ) {
672672 switch action .Type {
673673 case "command" :
674674 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -780,7 +780,7 @@ func (e *ActionExecutor) ExecuteSessionStartAction(action Action, input *Session
780780
781781// ExecuteUserPromptSubmitAction executes an action for the UserPromptSubmit event and returns JSON output.
782782// This method implements Phase 2 JSON output functionality for UserPromptSubmit hooks.
783- func (e * ActionExecutor ) ExecuteUserPromptSubmitAction (action Action , input * UserPromptSubmitInput , rawJSON interface {} ) (* ActionOutput , error ) {
783+ func (e * ActionExecutor ) ExecuteUserPromptSubmitAction (action Action , input * UserPromptSubmitInput , rawJSON any ) (* ActionOutput , error ) {
784784 switch action .Type {
785785 case "command" :
786786 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -940,7 +940,7 @@ func (e *ActionExecutor) ExecuteUserPromptSubmitAction(action Action, input *Use
940940// ExecuteSessionEndAction executes an action for the SessionEnd event and returns ActionOutput.
941941// SessionEnd always returns continue=true (fail-safe: session end cannot be blocked).
942942// Errors are reported via systemMessage field, not by blocking execution.
943- func (e * ActionExecutor ) ExecuteSessionEndAction (action Action , input * SessionEndInput , rawJSON interface {} ) (* ActionOutput , error ) {
943+ func (e * ActionExecutor ) ExecuteSessionEndAction (action Action , input * SessionEndInput , rawJSON any ) (* ActionOutput , error ) {
944944 switch action .Type {
945945 case "command" :
946946 cmd := unifiedTemplateReplace (action .Command , rawJSON )
@@ -1022,7 +1022,7 @@ func (e *ActionExecutor) ExecuteSessionEndAction(action Action, input *SessionEn
10221022// and logs warnings to stderr. Supported fields are: continue, stopReason, suppressOutput,
10231023// systemMessage, and hookSpecificOutput.
10241024func checkUnsupportedFieldsSessionStart (stdout string ) {
1025- var data map [string ]interface {}
1025+ var data map [string ]any
10261026 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
10271027 // JSON parsing failed - this will be caught by the main validation
10281028 return
@@ -1046,7 +1046,7 @@ func checkUnsupportedFieldsSessionStart(stdout string) {
10461046// checkUnsupportedFieldsSessionEnd checks for unsupported fields in SessionEnd hook output
10471047// SessionEnd uses Common JSON Fields only (no decision/reason/hookSpecificOutput)
10481048func checkUnsupportedFieldsSessionEnd (stdout string ) {
1049- var data map [string ]interface {}
1049+ var data map [string ]any
10501050 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
10511051 return
10521052 }
@@ -1068,7 +1068,7 @@ func checkUnsupportedFieldsSessionEnd(stdout string) {
10681068
10691069//nolint:unused // Will be used in Step 3
10701070func checkUnsupportedFieldsPreCompact (stdout string ) {
1071- var data map [string ]interface {}
1071+ var data map [string ]any
10721072 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
10731073 return
10741074 }
@@ -1091,7 +1091,7 @@ func checkUnsupportedFieldsPreCompact(stdout string) {
10911091// checkUnsupportedFieldsNotification checks for unsupported fields in Notification JSON output
10921092// and logs warnings to stderr for any fields that are not in the supported list.
10931093func checkUnsupportedFieldsNotification (stdout string ) {
1094- var data map [string ]interface {}
1094+ var data map [string ]any
10951095 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
10961096 // JSON parsing failed - this will be caught by the main validation
10971097 return
@@ -1115,7 +1115,7 @@ func checkUnsupportedFieldsNotification(stdout string) {
11151115// checkUnsupportedFieldsSubagentStart checks for unsupported fields in SubagentStart JSON output
11161116// and logs warnings to stderr for any fields that are not in the supported list.
11171117func checkUnsupportedFieldsSubagentStart (stdout string ) {
1118- var data map [string ]interface {}
1118+ var data map [string ]any
11191119 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
11201120 // JSON parsing failed - this will be caught by the main validation
11211121 return
@@ -1139,7 +1139,7 @@ func checkUnsupportedFieldsSubagentStart(stdout string) {
11391139// checkUnsupportedFieldsUserPromptSubmit checks for unsupported fields in UserPromptSubmit JSON output
11401140// and logs warnings to stderr for any fields that are not in the supported list.
11411141func checkUnsupportedFieldsUserPromptSubmit (stdout string ) {
1142- var data map [string ]interface {}
1142+ var data map [string ]any
11431143 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
11441144 // JSON parsing failed - this will be caught by the main validation
11451145 return
@@ -1164,7 +1164,7 @@ func checkUnsupportedFieldsUserPromptSubmit(stdout string) {
11641164// checkUnsupportedFieldsStop checks for unsupported fields in Stop JSON output
11651165// and logs warnings to stderr. Stop uses top-level decision/reason (no hookSpecificOutput).
11661166func checkUnsupportedFieldsStop (stdout string ) {
1167- var data map [string ]interface {}
1167+ var data map [string ]any
11681168 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
11691169 return
11701170 }
@@ -1189,7 +1189,7 @@ func checkUnsupportedFieldsStop(stdout string) {
11891189// checkUnsupportedFieldsSubagentStop checks for unsupported fields in SubagentStop hook output
11901190// SubagentStop uses the same schema as Stop (no hookSpecificOutput)
11911191func checkUnsupportedFieldsSubagentStop (stdout string ) {
1192- var data map [string ]interface {}
1192+ var data map [string ]any
11931193 if err := json .Unmarshal ([]byte (stdout ), & data ); err != nil {
11941194 return
11951195 }
0 commit comments