Class: Rubino::Tools::BackgroundTasks::Entry
- Inherits:
-
Struct
- Object
- Struct
- Rubino::Tools::BackgroundTasks::Entry
- Defined in:
- lib/rubino/tools/background_tasks.rb
Overview
last_activity / tool_count / activity_log — live-progress fields written by a subagent’s UI::CLI#tool_started / #tool_finished (via #record_tool_started / #record_tool_finished) under the registry mutex and read by the parent renderer (UI::SubagentCards) and the /agents drill-in. activity_log is a bounded ring of the last few ‘✓ verb · hint` lines for the live drill-in; output_tail is the bounded line buffer of the CURRENTLY RUNNING tool’s streamed output (fed by #record_tool_output, wiped at #record_tool_finished) that the drill-in’s output: block tails (#5). Nothing is persisted (it dies with the process, like the rest of the registry).
approval_gate / approval_question / approval_command are the Option-2 approval-surfacing state: when a background child’s tool needs approval the child thread parks on ‘approval_gate` (a Run::ApprovalGate) and the entry flips to status :needs_approval with the question/command shown on the card; the user resolves it via /agents <id>.
budget_request (#574) REUSES that exact :needs_approval gate for a different ask: a BACKGROUND child that hit its tool-iteration ceiling parks on the same gate to ask the human for MORE budget instead of silently force-summarizing. The flag only re-flavors the surfaces (card / menu row / the /agents resolve prompt read “wants +budget — grant?”, and the allowlist-persisting “always” option is dropped — there is no command to remember); the parking/wake/stop-cancel plumbing is identical.
Instance Attribute Summary collapse
-
#activity_log ⇒ Object
Returns the value of attribute activity_log.
-
#approval_command ⇒ Object
Returns the value of attribute approval_command.
-
#approval_gate ⇒ Object
Returns the value of attribute approval_gate.
-
#approval_id ⇒ Object
Returns the value of attribute approval_id.
-
#approval_question ⇒ Object
Returns the value of attribute approval_question.
-
#approval_seq ⇒ Object
Returns the value of attribute approval_seq.
-
#ask_blocking ⇒ Object
Returns the value of attribute ask_blocking.
-
#ask_gate ⇒ Object
Returns the value of attribute ask_gate.
-
#ask_id ⇒ Object
Returns the value of attribute ask_id.
-
#ask_options ⇒ Object
Returns the value of attribute ask_options.
-
#ask_question ⇒ Object
Returns the value of attribute ask_question.
-
#budget_request ⇒ Object
Returns the value of attribute budget_request.
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#error ⇒ Object
Returns the value of attribute error.
-
#finished_at ⇒ Object
Returns the value of attribute finished_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_activity ⇒ Object
Returns the value of attribute last_activity.
-
#last_probe_at ⇒ Object
Returns the value of attribute last_probe_at.
-
#output_tail ⇒ Object
Returns the value of attribute output_tail.
-
#owner_subagent_id ⇒ Object
Returns the value of attribute owner_subagent_id.
-
#parent_sink ⇒ Object
Returns the value of attribute parent_sink.
-
#probe_count ⇒ Object
Returns the value of attribute probe_count.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
-
#result ⇒ Object
Returns the value of attribute result.
-
#runner ⇒ Object
Returns the value of attribute runner.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#steer_queue ⇒ Object
Returns the value of attribute steer_queue.
-
#subagent ⇒ Object
Returns the value of attribute subagent.
-
#thread ⇒ Object
Returns the value of attribute thread.
-
#tool_count ⇒ Object
Returns the value of attribute tool_count.
Instance Method Summary collapse
-
#messages ⇒ Object
The child subagent’s FULL persisted transcript.
Instance Attribute Details
#activity_log ⇒ Object
Returns the value of attribute activity_log
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def activity_log @activity_log end |
#approval_command ⇒ Object
Returns the value of attribute approval_command
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def approval_command @approval_command end |
#approval_gate ⇒ Object
Returns the value of attribute approval_gate
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def approval_gate @approval_gate end |
#approval_id ⇒ Object
Returns the value of attribute approval_id
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def approval_id @approval_id end |
#approval_question ⇒ Object
Returns the value of attribute approval_question
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def approval_question @approval_question end |
#approval_seq ⇒ Object
Returns the value of attribute approval_seq
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def approval_seq @approval_seq end |
#ask_blocking ⇒ Object
Returns the value of attribute ask_blocking
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def ask_blocking @ask_blocking end |
#ask_gate ⇒ Object
Returns the value of attribute ask_gate
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def ask_gate @ask_gate end |
#ask_id ⇒ Object
Returns the value of attribute ask_id
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def ask_id @ask_id end |
#ask_options ⇒ Object
Returns the value of attribute ask_options
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def @ask_options end |
#ask_question ⇒ Object
Returns the value of attribute ask_question
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def ask_question @ask_question end |
#budget_request ⇒ Object
Returns the value of attribute budget_request
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def budget_request @budget_request end |
#depth ⇒ Object
Returns the value of attribute depth
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def depth @depth end |
#error ⇒ Object
Returns the value of attribute error
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def error @error end |
#finished_at ⇒ Object
Returns the value of attribute finished_at
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def finished_at @finished_at end |
#id ⇒ Object
Returns the value of attribute id
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def id @id end |
#last_activity ⇒ Object
Returns the value of attribute last_activity
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def last_activity @last_activity end |
#last_probe_at ⇒ Object
Returns the value of attribute last_probe_at
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def last_probe_at @last_probe_at end |
#output_tail ⇒ Object
Returns the value of attribute output_tail
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def output_tail @output_tail end |
#owner_subagent_id ⇒ Object
Returns the value of attribute owner_subagent_id
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def owner_subagent_id @owner_subagent_id end |
#parent_sink ⇒ Object
Returns the value of attribute parent_sink
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def parent_sink @parent_sink end |
#probe_count ⇒ Object
Returns the value of attribute probe_count
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def probe_count @probe_count end |
#prompt ⇒ Object
Returns the value of attribute prompt
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def prompt @prompt end |
#result ⇒ Object
Returns the value of attribute result
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def result @result end |
#runner ⇒ Object
Returns the value of attribute runner
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def runner @runner end |
#started_at ⇒ Object
Returns the value of attribute started_at
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def status @status end |
#steer_queue ⇒ Object
Returns the value of attribute steer_queue
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def steer_queue @steer_queue end |
#subagent ⇒ Object
Returns the value of attribute subagent
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def subagent @subagent end |
#thread ⇒ Object
Returns the value of attribute thread
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def thread @thread end |
#tool_count ⇒ Object
Returns the value of attribute tool_count
60 61 62 |
# File 'lib/rubino/tools/background_tasks.rb', line 60 def tool_count @tool_count end |
Instance Method Details
#messages ⇒ Object
The child subagent’s FULL persisted transcript. A background child runs its own Agent::Runner with its own session, so its complete message history (its tool calls + what it said) lives in the session store under ‘runner.session` — the agent-attach view replays exactly this. Empty when no runner/session is wired (sync/foreground/headless spawn).
121 122 123 124 |
# File 'lib/rubino/tools/background_tasks.rb', line 121 def session_id = runner&.session&.dig(:id) session_id ? ::Rubino::Session::Store.new.for_session(session_id) : [] end |