Class: Riffer::Skills::Config
- Inherits:
-
Object
- Object
- Riffer::Skills::Config
- Defined in:
- lib/riffer/skills/config.rb
Overview
Configuration object for the skills block DSL.
skills do
backend Riffer::Skills::FilesystemBackend.new(".skills")
adapter Riffer::Skills::XmlAdapter
activate ["code-review"]
end
Instance Method Summary collapse
-
#activate(value = nil) ⇒ Object
Gets or sets skill names to activate at startup (an array or a
context-resolved Proc); activated skills’ bodies are included in the system prompt without a tool call. -
#activate_tool(value = nil) ⇒ Object
Gets or sets the per-agent skill activation tool override, or
nilwhen unset — the global fallback toRiffer.config.skills.default_activate_toolis applied by the agent at resolution, not here. -
#adapter(value = nil) ⇒ Object
Gets or sets a custom skill adapter class; defaults to the provider’s preferred adapter.
-
#backend(value = nil) ⇒ Object
Gets or sets the skills backend (a Backend or a
context-resolved Proc). -
#initialize ⇒ Config
constructor
– : () -> void.
Constructor Details
#initialize ⇒ Config
– : () -> void
19 20 21 22 23 24 |
# File 'lib/riffer/skills/config.rb', line 19 def initialize @backend = nil @adapter = nil @activate = nil @activate_tool = nil end |
Instance Method Details
#activate(value = nil) ⇒ Object
48 49 50 51 |
# File 'lib/riffer/skills/config.rb', line 48 def activate(value = nil) return @activate if value.nil? @activate = value end |
#activate_tool(value = nil) ⇒ Object
Gets or sets the per-agent skill activation tool override, or nil when unset — the global fallback to Riffer.config.skills.default_activate_tool is applied by the agent at resolution, not here. Raises Riffer::ArgumentError on an invalid value. – : (?singleton(Riffer::Tool)?) -> singleton(Riffer::Tool)?
59 60 61 62 63 |
# File 'lib/riffer/skills/config.rb', line 59 def activate_tool(value = nil) return @activate_tool if value.nil? raise Riffer::ArgumentError, "activate_tool must be a Riffer::Tool subclass" unless value.is_a?(Class) && value < Riffer::Tool @activate_tool = value end |
#adapter(value = nil) ⇒ Object
Gets or sets a custom skill adapter class; defaults to the provider’s preferred adapter. – : (?singleton(Riffer::Skills::Adapter)?) -> singleton(Riffer::Skills::Adapter)?
38 39 40 41 |
# File 'lib/riffer/skills/config.rb', line 38 def adapter(value = nil) return @adapter if value.nil? @adapter = value end |
#backend(value = nil) ⇒ Object
Gets or sets the skills backend (a Backend or a context-resolved Proc). – : (?(Riffer::Skills::Backend | Proc)?) -> (Riffer::Skills::Backend | Proc)?
29 30 31 32 |
# File 'lib/riffer/skills/config.rb', line 29 def backend(value = nil) return @backend if value.nil? @backend = value end |