Class: Insika::Evals::HttpCapabilities
- Inherits:
-
Object
- Object
- Insika::Evals::HttpCapabilities
- Defined in:
- lib/insika/evals/transport.rb
Overview
What the deployment HAS, per agent, read over the same gated
/v1 the replay uses. The eval stays a client: it asks the engine instead of
keeping its own idea of which tools exist.
#for(id) -> { "tools" => [names] | nil, "capabilities" => [names] } | nil.
nil means UNRESOLVED — the agent is not there, the route is not wired, the
deployment is unreachable — and the Runner treats that as "run the case
anyway". Silence must not shrink a suite. Answers are memoized: a corpus has
many cases per agent and this is the same answer every time.
Instance Method Summary collapse
- #for(agent_id) ⇒ Object
-
#initialize(base_url:, token:, timeout: 10) ⇒ HttpCapabilities
constructor
A new instance of HttpCapabilities.
Constructor Details
#initialize(base_url:, token:, timeout: 10) ⇒ HttpCapabilities
Returns a new instance of HttpCapabilities.
85 86 87 88 89 90 |
# File 'lib/insika/evals/transport.rb', line 85 def initialize(base_url:, token:, timeout: 10) @base = base_url @token = token @timeout = timeout @cache = {} end |
Instance Method Details
#for(agent_id) ⇒ Object
92 93 94 |
# File 'lib/insika/evals/transport.rb', line 92 def for(agent_id) @cache.fetch(agent_id) { @cache[agent_id] = fetch(agent_id) } end |