Documentation
¶
Index ¶
- func EncodeClaudeResult(hookEventName string, result Result) ([]byte, error)
- func MarshalMap(value map[string]any) (json.RawMessage, error)
- func Run(stdin io.Reader, stdout, stderr io.Writer, codec Codec, sink Sink) int
- type ClaudeHookInput
- type Codec
- type Decision
- type Event
- type Result
- type Sink
- type SinkFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeClaudeResult ¶
func MarshalMap ¶
func MarshalMap(value map[string]any) (json.RawMessage, error)
Types ¶
type ClaudeHookInput ¶
type ClaudeHookInput struct {
SessionID string `json:"session_id"`
SessionIDAlt string `json:"sessionId"`
HookEventName string `json:"hook_event_name"`
HookEventNameAlt string `json:"hookEventName"`
HookEventLegacy string `json:"hook_event"`
ToolName string `json:"tool_name"`
ToolNameAlt string `json:"toolName"`
ToolInput map[string]any `json:"tool_input"`
ToolInputAlt map[string]any `json:"toolInput"`
ToolResponse map[string]any `json:"tool_response"`
ToolResponseAlt map[string]any `json:"toolResponse"`
ToolUseID string `json:"tool_use_id"`
ToolUseIDAlt string `json:"toolUseId"`
ToolUseIDUpper string `json:"toolUseID"`
CWD string `json:"cwd"`
PermissionMode *string `json:"permission_mode"`
DurationMs *int64 `json:"duration_ms"`
Error *string `json:"error"`
IsInterrupt *bool `json:"is_interrupt"`
}
type Event ¶
Click to show internal directories.
Click to hide internal directories.