Class: ClaudeHooks::Elicitation
- Inherits:
-
Base
- Object
- Base
- ClaudeHooks::Elicitation
show all
- Defined in:
- lib/claude_hooks/elicitation.rb
Constant Summary
Constants inherited
from Base
Base::COMMON_INPUT_FIELDS
Instance Attribute Summary
Attributes inherited from Base
#config, #input_data, #logger, #output, #output_data
Class Method Summary
collapse
Instance Method Summary
collapse
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
Class Method Details
.hook_type ⇒ Object
7
8
9
|
# File 'lib/claude_hooks/elicitation.rb', line 7
def self.hook_type
'Elicitation'
end
|
11
12
13
|
# File 'lib/claude_hooks/elicitation.rb', line 11
def self.input_fields
%w[mcp_server_name message]
end
|
Instance Method Details
#accept!(content = {}) ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/claude_hooks/elicitation.rb', line 39
def accept!(content = {})
@output_data['hookSpecificOutput'] = {
'hookEventName' => hook_event_name,
'action' => 'accept',
'content' => content
}
end
|
#cancel! ⇒ Object
54
55
56
57
58
59
|
# File 'lib/claude_hooks/elicitation.rb', line 54
def cancel!
@output_data['hookSpecificOutput'] = {
'hookEventName' => hook_event_name,
'action' => 'cancel'
}
end
|
#decline! ⇒ Object
47
48
49
50
51
52
|
# File 'lib/claude_hooks/elicitation.rb', line 47
def decline!
@output_data['hookSpecificOutput'] = {
'hookEventName' => hook_event_name,
'action' => 'decline'
}
end
|
#elicitation_id ⇒ Object
31
32
33
|
# File 'lib/claude_hooks/elicitation.rb', line 31
def elicitation_id
@input_data['elicitation_id'] || @input_data['elicitationId']
end
|
#mcp_server_name ⇒ Object
15
16
17
|
# File 'lib/claude_hooks/elicitation.rb', line 15
def mcp_server_name
@input_data['mcp_server_name'] || @input_data['mcpServerName']
end
|
#message ⇒ Object
19
20
21
|
# File 'lib/claude_hooks/elicitation.rb', line 19
def message
@input_data['message']
end
|
#mode ⇒ Object
23
24
25
|
# File 'lib/claude_hooks/elicitation.rb', line 23
def mode
@input_data['mode']
end
|
#requested_schema ⇒ Object
35
36
37
|
# File 'lib/claude_hooks/elicitation.rb', line 35
def requested_schema
@input_data['requested_schema'] || @input_data['requestedSchema']
end
|
#url ⇒ Object
27
28
29
|
# File 'lib/claude_hooks/elicitation.rb', line 27
def url
@input_data['url']
end
|