Module: Html2rss::MCP::Runtime
- Defined in:
- lib/html2rss/mcp/runtime.rb
Overview
Runtime facts for the MCP process (env configuration, wire coercion).
Defined Under Namespace
Classes: Snapshot
Class Method Summary collapse
-
.botasaurus_configured? ⇒ Boolean
Whether Botasaurus transport is configured in this process.
- .coerce_strategy(strategy) ⇒ Symbol
-
.snapshot ⇒ Snapshot
Runtime capabilities and catalog identity for MCP clients.
Class Method Details
.botasaurus_configured? ⇒ Boolean
Returns whether Botasaurus transport is configured in this process.
21 22 23 |
# File 'lib/html2rss/mcp/runtime.rb', line 21 def botasaurus_configured? !ENV['BOTASAURUS_SCRAPER_URL'].to_s.strip.empty? end |
.coerce_strategy(strategy) ⇒ Symbol
40 41 42 |
# File 'lib/html2rss/mcp/runtime.rb', line 40 def coerce_strategy(strategy) (strategy || :auto).to_sym end |
.snapshot ⇒ Snapshot
Returns runtime capabilities and catalog identity for MCP clients.
27 28 29 30 31 32 33 34 35 |
# File 'lib/html2rss/mcp/runtime.rb', line 27 def snapshot Snapshot.new( version: Html2rss::VERSION, mcp_contract_version: Contract::MCP_CONTRACT_VERSION, catalog_fingerprint: Contract.catalog_fingerprint, tools: Contract.catalog_tools, botasaurus_configured: botasaurus_configured? ) end |