NAME
Claude::Agent::Message::Base - Base class for message types
DESCRIPTION
Base class providing the attributes every message from the CLI carries. A message whose type has no class of its own is returned as a plain Base object, with the full decoded hash in raw.
ATTRIBUTES
type
The message type: user, assistant, system, result, stream_event, tool_progress, rate_limit_event, or any newer type the CLI emits.
uuid
Unique message identifier.
session_id
Session identifier.
parent_tool_use_id
Set when the message belongs to a subagent, naming the Task tool use that started it.
agent_id
The subagent that produced the message, when there is one.
raw
The decoded message exactly as the CLI sent it, with its original keys. A field the class does not declare is reachable here, for example $msg->raw->{apiKeySource}.
METHODS
new
Takes a flat list of name/value pairs. Unknown names are ignored. Every attribute except type is optional and has a has_* predicate.
AUTHOR
LNATION, <email at lnation.org>
LICENSE
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under The Artistic License 2.0 (GPL Compatible).