Class: Silas::Tools::AskQuestion
- Inherits:
-
Silas::Tool
- Object
- Silas::Tool
- Silas::Tools::AskQuestion
- Defined in:
- lib/silas/tools/ask_question.rb
Overview
Parks the turn to ask the HUMAN something — information, not permission.
It rides the approval machinery end to end (park at zero compute, TTL expiry, channel ping, the resume gate), differing only in the verdict: an operator ANSWERS, and the answer text becomes the tool result the model resumes with. Replay determinism is free — the answer is a persisted row like any other tool result.
Instance Attribute Summary
Attributes inherited from Silas::Tool
Instance Method Summary collapse
Methods inherited from Silas::Tool
approval, #approval_policy, at_most_once!, description, effect_mode, #effect_mode, idempotent!, param, schema, tool_name, transactional!, validate_signature!
Instance Method Details
#call(question:) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/silas/tools/ask_question.rb', line 18 def call(question:) # pending+approved would execute this, but ToolInvocation#approve! # refuses questions (answer! is their verdict) — reaching here is a # framework bug, never a user mistake. raise Error, "ask_question is answered, not executed — ToolInvocation#answer! settles it" end |