Class: ClaudeHooks::SubagentStart
- Defined in:
- lib/claude_hooks/subagent_start.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#config, #input_data, #logger, #output, #output_data
Class Method Summary collapse
Instance Method Summary collapse
-
#add_additional_context!(context) ⇒ Object
(also: #add_context!)
agent_id and agent_type readers come from Base (Part A).
Methods inherited from Base
#agent_id, #agent_type, #allow_continue!, #base_dir, #call, #clear_specifics!, #clear_system_message!, #cwd, #effort, #home_claude_dir, #home_path_for, #hook_event_name, #hook_type, #initialize, #log, #output_and_exit, #path_for, #permission_mode, #prevent_continue!, #project_claude_dir, #project_path_for, #prompt_id, #read_transcript, #session_id, #show_output!, #stringify_output, #suppress_output!, #system_message!, #terminal_sequence, #terminal_sequence!, #transcript_path
Constructor Details
This class inherits a constructor from ClaudeHooks::Base
Class Method Details
.hook_type ⇒ Object
7 8 9 |
# File 'lib/claude_hooks/subagent_start.rb', line 7 def self.hook_type 'SubagentStart' end |
.input_fields ⇒ Object
11 12 13 |
# File 'lib/claude_hooks/subagent_start.rb', line 11 def self.input_fields %w[agent_id agent_type] end |
Instance Method Details
#add_additional_context!(context) ⇒ Object Also known as: add_context!
agent_id and agent_type readers come from Base (Part A)
17 18 19 20 |
# File 'lib/claude_hooks/subagent_start.rb', line 17 def add_additional_context!(context) @output_data['hookSpecificOutput'] ||= { 'hookEventName' => hook_event_name } @output_data['hookSpecificOutput']['additionalContext'] = context end |