Class: HermesAgent::Client::Entities::ChatToolProgress
- Inherits:
-
HermesAgent::Client::Entity
- Object
- HermesAgent::Client::Entity
- HermesAgent::Client::Entities::ChatToolProgress
- Defined in:
- lib/hermes_agent/client/entities/chat_completion.rb
Overview
A custom hermes.tool.progress event emitted on the chat-completions
stream while the server agent executes a tool. It is a distinct event
type from ChatCompletionChunk — it carries no choices/delta and is
never folded into the assembled ChatCompletion — so tool activity does
not pollute the assistant text. The Responses API does not emit these
(it represents tool activity as function_call output items instead).
Each tool call produces two events keyed by #tool_call_id: a
"running" event carrying #emoji and #label, then a "completed"
event that omits them. status is a lifecycle marker only — a tool that
fails (or times out) still reports "completed"; the failure surfaces in
the tool's result, not here.
Instance Method Summary collapse
-
#completed? ⇒ boolean
Whether this event marks the tool finishing execution.
-
#emoji ⇒ String?
A decorative emoji for the tool, present on the
"running"event. -
#label ⇒ String?
A short human-facing descriptor of the invocation (e.g. the search glob
"*", or the command"ls -F"), present on the"running"event. -
#running? ⇒ boolean
Whether this event marks the tool starting to run.
-
#status ⇒ String?
The lifecycle status,
"running"or"completed". -
#tool ⇒ String?
The tool name, e.g.
-
#tool_call_id ⇒ String?
The id correlating this event's
"running"and"completed"frames (read from the camelCasetoolCallIdwire field), e.g.
Methods inherited from HermesAgent::Client::Entity
Instance Method Details
#completed? ⇒ boolean
Whether this event marks the tool finishing execution. Note this is a lifecycle marker, not a success signal — see the class docs.
261 262 263 |
# File 'lib/hermes_agent/client/entities/chat_completion.rb', line 261 def completed? status == "completed" end |
#emoji ⇒ String?
A decorative emoji for the tool, present on the "running" event.
217 218 219 |
# File 'lib/hermes_agent/client/entities/chat_completion.rb', line 217 def emoji self["emoji"] end |
#label ⇒ String?
A short human-facing descriptor of the invocation (e.g. the search
glob "*", or the command "ls -F"), present on the "running"
event.
227 228 229 |
# File 'lib/hermes_agent/client/entities/chat_completion.rb', line 227 def label self["label"] end |
#running? ⇒ boolean
Whether this event marks the tool starting to run.
252 253 254 |
# File 'lib/hermes_agent/client/entities/chat_completion.rb', line 252 def running? status == "running" end |
#status ⇒ String?
The lifecycle status, "running" or "completed".
244 245 246 |
# File 'lib/hermes_agent/client/entities/chat_completion.rb', line 244 def status self["status"] end |
#tool ⇒ String?
The tool name, e.g. "search_files" or "terminal".
209 210 211 |
# File 'lib/hermes_agent/client/entities/chat_completion.rb', line 209 def tool self["tool"] end |
#tool_call_id ⇒ String?
The id correlating this event's "running" and "completed" frames
(read from the camelCase toolCallId wire field), e.g. "call_…".
236 237 238 |
# File 'lib/hermes_agent/client/entities/chat_completion.rb', line 236 def tool_call_id self["toolCallId"] end |