Class: Riffer::Mcp::Manifest
- Inherits:
-
Object
- Object
- Riffer::Mcp::Manifest
- Defined in:
- lib/riffer/mcp/manifest.rb
Overview
Holds the configuration for a single MCP server.
Instance Attribute Summary collapse
-
#credentials_scope ⇒ Object
readonly
Optional hint (
:global/:tenant/:user) for whether invocation credentials depend on tenant/user keys incontext. -
#discovery_headers ⇒ Object
readonly
Headers (or a Proc) resolved once when building the discovery client.
-
#endpoint ⇒ Object
readonly
HTTPS URL passed to the MCP transport.
-
#name ⇒ Object
readonly
Identifier used as the registration key and generated-agent identifier.
-
#tags ⇒ Object
readonly
Tags for matching
use_mcp.
Instance Method Summary collapse
-
#initialize(name:, endpoint:, tags: nil, discovery_headers: nil, credentials_scope: nil) ⇒ Manifest
constructor
Raises Riffer::ArgumentError unless
nameis present andendpointis a valid HTTPS URL.
Constructor Details
#initialize(name:, endpoint:, tags: nil, discovery_headers: nil, credentials_scope: nil) ⇒ Manifest
Raises Riffer::ArgumentError unless name is present and endpoint is a valid HTTPS URL. – : (name: String, endpoint: String, ?tags: Array?, ?discovery_headers: (Hash[String, untyped] | ::Proc)?, ?credentials_scope: (String | Symbol)?) -> void
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/riffer/mcp/manifest.rb', line 28 def initialize(name:, endpoint:, tags: nil, discovery_headers: nil, credentials_scope: nil) @name = name.to_s.strip raise Riffer::ArgumentError, "MCP manifest name is required" if @name.empty? @endpoint = endpoint.to_s.strip raise Riffer::ArgumentError, "MCP manifest endpoint must be a valid HTTPS URL" unless valid_endpoint? @tags = Array().map(&:to_sym) @discovery_headers = discovery_headers @credentials_scope = credentials_scope&.to_sym end |
Instance Attribute Details
#credentials_scope ⇒ Object (readonly)
Optional hint (:global/:tenant/:user) for whether invocation credentials depend on tenant/user keys in context.
22 23 24 |
# File 'lib/riffer/mcp/manifest.rb', line 22 def credentials_scope @credentials_scope end |
#discovery_headers ⇒ Object (readonly)
Headers (or a Proc) resolved once when building the discovery client.
18 19 20 |
# File 'lib/riffer/mcp/manifest.rb', line 18 def discovery_headers @discovery_headers end |
#endpoint ⇒ Object (readonly)
HTTPS URL passed to the MCP transport.
15 16 17 |
# File 'lib/riffer/mcp/manifest.rb', line 15 def endpoint @endpoint end |
#name ⇒ Object (readonly)
Identifier used as the registration key and generated-agent identifier.
9 10 11 |
# File 'lib/riffer/mcp/manifest.rb', line 9 def name @name end |
#tags ⇒ Object (readonly)
Tags for matching use_mcp.
12 13 14 |
# File 'lib/riffer/mcp/manifest.rb', line 12 def @tags end |