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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/lib/riffer/agent.rb +16 -6
- data/lib/riffer/version.rb +1 -1
- data/sig/generated/riffer/agent.rbs +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22e4b5cd255cc4d66929a8696586b75a5f86d56728b930c50be48050972a5e60
|
|
4
|
+
data.tar.gz: c1a6a0a1f7200f2b9dceedbaccada8620ff39cf718d2cf7bbee6ee9954176441
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0cf4b811e2c89ab5d71ce64a5d701ea8582d87edb70062440974bba0ab4b0898db74d87b05fbd3b9042b47a2cd9af3ebe0c1efb89022a7a3a6cee34dcd66e9da
|
|
7
|
+
data.tar.gz: d94271b381b08a9bbfa57c372a9dcd3b404601aeaed6ef11e7f78af3a6e7667abc9a8488034fdc6e74b4c13dd6346002d4add9a20f30ac10a73569a62ab401f5
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
170
|
+
|
|
171
|
+
tools.each(&:validate_as_tool!)
|
|
172
|
+
tools
|
|
163
173
|
end
|
|
164
174
|
|
|
165
175
|
#--
|
data/lib/riffer/version.rb
CHANGED
|
@@ -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)]
|