riffer 0.27.0 → 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 +14 -0
- data/lib/riffer/agent.rb +22 -9
- data/lib/riffer/version.rb +1 -1
- data/sig/generated/riffer/agent.rbs +5 -1
- metadata +3 -3
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,20 @@ 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
|
+
|
|
15
|
+
## [0.27.1](https://github.com/janeapp/riffer/compare/riffer/v0.27.0...riffer/v0.27.1) (2026-05-04)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* validate tools before sending them to providers ([#240](https://github.com/janeapp/riffer/issues/240)) ([537e2ab](https://github.com/janeapp/riffer/commit/537e2abf16542ba9d19d9fd3ffa649aefbca9c10))
|
|
21
|
+
|
|
8
22
|
## [0.27.0](https://github.com/janeapp/riffer/compare/riffer/v0.26.0...riffer/v0.27.0) (2026-05-01)
|
|
9
23
|
|
|
10
24
|
|
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
|
#--
|
|
@@ -834,9 +844,12 @@ class Riffer::Agent
|
|
|
834
844
|
|
|
835
845
|
#: () -> Array[singleton(Riffer::Tool)]
|
|
836
846
|
def resolved_tools
|
|
837
|
-
@resolved_tools ||=
|
|
838
|
-
|
|
839
|
-
|
|
847
|
+
@resolved_tools ||= begin
|
|
848
|
+
tools = self.class.resolved_tool_classes(context: @context) + resolve_mcp_tool_classes
|
|
849
|
+
assert_distinct_tool_names!(tools)
|
|
850
|
+
tools.each(&:validate_as_tool!)
|
|
851
|
+
tools
|
|
852
|
+
end
|
|
840
853
|
end
|
|
841
854
|
|
|
842
855
|
#--
|
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)]
|
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.
|
|
4
|
+
version: 0.27.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jake Bottrall
|
|
@@ -91,14 +91,14 @@ dependencies:
|
|
|
91
91
|
requirements:
|
|
92
92
|
- - "~>"
|
|
93
93
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: 0.
|
|
94
|
+
version: 0.60.0
|
|
95
95
|
type: :development
|
|
96
96
|
prerelease: false
|
|
97
97
|
version_requirements: !ruby/object:Gem::Requirement
|
|
98
98
|
requirements:
|
|
99
99
|
- - "~>"
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
|
-
version: 0.
|
|
101
|
+
version: 0.60.0
|
|
102
102
|
- !ruby/object:Gem::Dependency
|
|
103
103
|
name: async
|
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|