riffer 0.27.1 → 0.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c5771ca92fde87f9124e84773130cbcefc81fca31ad5dc981ed673ba8ff20cd
4
- data.tar.gz: 5596097277a6067b7cee0a2e980741a3757b1c3336ea4e3952195922e0e9c896
3
+ metadata.gz: 22e4b5cd255cc4d66929a8696586b75a5f86d56728b930c50be48050972a5e60
4
+ data.tar.gz: c1a6a0a1f7200f2b9dceedbaccada8620ff39cf718d2cf7bbee6ee9954176441
5
5
  SHA512:
6
- metadata.gz: 5c2a9892f479b99925ce7fb00a837b0b7d1ab52e181402dd90d91df6c49b60be0a90d9d69f7e04522b55e7547d21eb718dfad86b39fb0af89a09f50108f77c38
7
- data.tar.gz: e781cf0e82e4717cd1f12692ecbfc1910ad732361e3f21ad6383a4e3b5c704222ac08c62dc574e0936d5351150775a4b49c4b10b3b3749e3aad83e4fb1b572dd
6
+ metadata.gz: 0cf4b811e2c89ab5d71ce64a5d701ea8582d87edb70062440974bba0ab4b0898db74d87b05fbd3b9042b47a2cd9af3ebe0c1efb89022a7a3a6cee34dcd66e9da
7
+ data.tar.gz: d94271b381b08a9bbfa57c372a9dcd3b404601aeaed6ef11e7f78af3a6e7667abc9a8488034fdc6e74b4c13dd6346002d4add9a20f30ac10a73569a62ab401f5
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.27.1"
2
+ ".": "0.27.2"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.27.2](https://github.com/janeapp/riffer/compare/riffer/v0.27.1...riffer/v0.27.2) (2026-05-04)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * validate tools at the class-level resolution boundary ([#242](https://github.com/janeapp/riffer/issues/242)) ([7abbcd6](https://github.com/janeapp/riffer/commit/7abbcd607f1cbb3e1d45f5d148d902170a78af06))
14
+
8
15
  ## [0.27.1](https://github.com/janeapp/riffer/compare/riffer/v0.27.0...riffer/v0.27.1) (2026-05-04)
9
16
 
10
17
 
data/lib/riffer/agent.rb CHANGED
@@ -146,20 +146,30 @@ class Riffer::Agent
146
146
  # <tt>skills do; activate_tool ...; end</tt> override when set, otherwise
147
147
  # from <tt>Riffer.config.skills.default_activate_tool</tt>.
148
148
  #
149
+ # Each returned tool class is validated via +validate_as_tool!+, so
150
+ # callers serializing this list to a provider can rely on every entry
151
+ # having the metadata required for tool use (name + description).
152
+ #
149
153
  # Raises Riffer::ArgumentError on tool name conflicts with the skill
150
- # activation tool.
154
+ # activation tool, or when a tool class fails +validate_as_tool!+.
151
155
  #
152
156
  #--
153
157
  #: (?context: Hash[Symbol, untyped]?) -> Array[singleton(Riffer::Tool)]
154
158
  def self.resolved_tool_classes(context: nil)
155
159
  base = resolve_uses_tools_config(context)
156
- return base unless skills
157
160
 
158
- skill_activate_tool_class = skills.activate_tool || Riffer.config.skills.default_activate_tool
159
- if base.any? { |t| t.name == skill_activate_tool_class.name }
160
- raise Riffer::ArgumentError, "Tool name conflict with skill tools: #{skill_activate_tool_class.name}"
161
+ tools = if skills
162
+ skill_activate_tool_class = skills.activate_tool || Riffer.config.skills.default_activate_tool
163
+ if base.any? { |t| t.name == skill_activate_tool_class.name }
164
+ raise Riffer::ArgumentError, "Tool name conflict with skill tools: #{skill_activate_tool_class.name}"
165
+ end
166
+ base + [skill_activate_tool_class]
167
+ else
168
+ base
161
169
  end
162
- base + [skill_activate_tool_class]
170
+
171
+ tools.each(&:validate_as_tool!)
172
+ tools
163
173
  end
164
174
 
165
175
  #--
@@ -2,5 +2,5 @@
2
2
  # rbs_inline: enabled
3
3
 
4
4
  module Riffer
5
- VERSION = "0.27.1" #: String
5
+ VERSION = "0.27.2" #: String
6
6
  end
@@ -102,8 +102,12 @@ class Riffer::Agent
102
102
  # <tt>skills do; activate_tool ...; end</tt> override when set, otherwise
103
103
  # from <tt>Riffer.config.skills.default_activate_tool</tt>.
104
104
  #
105
+ # Each returned tool class is validated via +validate_as_tool!+, so
106
+ # callers serializing this list to a provider can rely on every entry
107
+ # having the metadata required for tool use (name + description).
108
+ #
105
109
  # Raises Riffer::ArgumentError on tool name conflicts with the skill
106
- # activation tool.
110
+ # activation tool, or when a tool class fails +validate_as_tool!+.
107
111
  #
108
112
  # --
109
113
  # : (?context: Hash[Symbol, untyped]?) -> Array[singleton(Riffer::Tool)]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riffer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.1
4
+ version: 0.27.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Bottrall