Class: ClaudeAgentSDK::HookResponseMessage

Inherits:
SystemMessage show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

Hook response system message

Instance Attribute Summary collapse

Attributes inherited from SystemMessage

#data, #subtype

Instance Method Summary collapse

Constructor Details

#initialize(subtype:, data:, uuid: nil, session_id: nil, hook_id: nil, hook_name: nil, hook_event: nil, output: nil, stdout: nil, stderr: nil, exit_code: nil, outcome: nil) ⇒ HookResponseMessage

Returns a new instance of HookResponseMessage.



309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/claude_agent_sdk/types.rb', line 309

def initialize(subtype:, data:, uuid: nil, session_id: nil, hook_id: nil, hook_name: nil,
               hook_event: nil, output: nil, stdout: nil, stderr: nil, exit_code: nil, outcome: nil)
  super(subtype: subtype, data: data)
  @uuid = uuid
  @session_id = session_id
  @hook_id = hook_id
  @hook_name = hook_name
  @hook_event = hook_event
  @output = output
  @stdout = stdout
  @stderr = stderr
  @exit_code = exit_code
  @outcome = outcome # "success", "error", or "cancelled"
end

Instance Attribute Details

#exit_codeObject

Returns the value of attribute exit_code.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def exit_code
  @exit_code
end

#hook_eventObject

Returns the value of attribute hook_event.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def hook_event
  @hook_event
end

#hook_idObject

Returns the value of attribute hook_id.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def hook_id
  @hook_id
end

#hook_nameObject

Returns the value of attribute hook_name.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def hook_name
  @hook_name
end

#outcomeObject

Returns the value of attribute outcome.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def outcome
  @outcome
end

#outputObject

Returns the value of attribute output.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def output
  @output
end

#session_idObject

Returns the value of attribute session_id.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def session_id
  @session_id
end

#stderrObject

Returns the value of attribute stderr.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def stdout
  @stdout
end

#uuidObject

Returns the value of attribute uuid.



306
307
308
# File 'lib/claude_agent_sdk/types.rb', line 306

def uuid
  @uuid
end