Class: Insika::Capability::ResolvedTool
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Insika::Capability::ResolvedTool
- Defined in:
- lib/insika/capability/resolved_tool.rb
Overview
Thin decorator: swaps only the name exposed to the model for the
STABLE capability name (e.g. "browse"), regardless of which concrete impl
(impl_name, e.g. "puppeteer_browser") resolution chose.
execute/parameters/description/call keep delegating to the impl via
SimpleDelegator — nothing reimplemented, same spirit as ToolEnvelope.
Wrapping order in run_pipeline: impl -> ResolvedTool ->
ToolEnvelope. The Envelope, from the outside, sees the already-renamed call (the
model calls browse); for side_effect?/approval it needs the REAL impl_name
(it's the tool_registry that knows whether "puppeteer_browser" is a side-effect, not
"browse") — that's why impl_name is exposed here. This is consumed by the
Executor (ToolEnvelope).
Instance Method Summary collapse
-
#impl_name ⇒ Object
Concrete name behind resolution — for side_effect?/approval in the ToolEnvelope, NEVER exposed to the model.
-
#initialize(impl, capability_name:, impl_name:) ⇒ ResolvedTool
constructor
A new instance of ResolvedTool.
-
#name ⇒ Object
STABLE name exposed to the model — shadows the impl's
name.
Constructor Details
#initialize(impl, capability_name:, impl_name:) ⇒ ResolvedTool
Returns a new instance of ResolvedTool.
20 21 22 23 24 |
# File 'lib/insika/capability/resolved_tool.rb', line 20 def initialize(impl, capability_name:, impl_name:) super(impl) @capability_name = capability_name.to_s @impl_name = impl_name.to_s end |
Instance Method Details
#impl_name ⇒ Object
Concrete name behind resolution — for side_effect?/approval in the ToolEnvelope, NEVER exposed to the model.
31 |
# File 'lib/insika/capability/resolved_tool.rb', line 31 def impl_name = @impl_name |
#name ⇒ Object
STABLE name exposed to the model — shadows the impl's name.
27 |
# File 'lib/insika/capability/resolved_tool.rb', line 27 def name = @capability_name |