riffer 0.48.0 → 0.49.0

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.
Files changed (258) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/rules/comments.md +2 -4
  3. data/.claude/rules/rbs-inline.md +2 -12
  4. data/.release-please-manifest.json +1 -1
  5. data/.rubocop.yml +5 -0
  6. data/CHANGELOG.md +19 -0
  7. data/docs/AGENTS.md +3 -5
  8. data/docs/AGENT_LIFECYCLE.md +13 -16
  9. data/docs/CONFIGURATION.md +22 -33
  10. data/docs/TOOL_ADVANCED.md +1 -3
  11. data/docs/TRACING.md +1 -1
  12. data/docs/providers/AMAZON_BEDROCK.md +31 -0
  13. data/docs/providers/OPENROUTER.md +18 -1
  14. data/docs-site/build.rb +0 -6
  15. data/docs-site/check.rb +1 -5
  16. data/lib/riffer/agent/config.rb +4 -45
  17. data/lib/riffer/agent/context.rb +2 -26
  18. data/lib/riffer/agent/outcome.rb +0 -20
  19. data/lib/riffer/agent/response.rb +0 -38
  20. data/lib/riffer/agent/run.rb +11 -43
  21. data/lib/riffer/agent/serializer.rb +10 -39
  22. data/lib/riffer/agent/session/repair.rb +3 -15
  23. data/lib/riffer/agent/session.rb +25 -38
  24. data/lib/riffer/agent/structured_output/result.rb +0 -8
  25. data/lib/riffer/agent/structured_output.rb +0 -7
  26. data/lib/riffer/agent.rb +10 -130
  27. data/lib/riffer/config/amazon_bedrock.rb +30 -0
  28. data/lib/riffer/config/anthropic.rb +21 -0
  29. data/lib/riffer/config/azure_open_ai.rb +30 -0
  30. data/lib/riffer/config/evals.rb +18 -0
  31. data/lib/riffer/config/files.rb +61 -0
  32. data/lib/riffer/config/gemini.rb +21 -0
  33. data/lib/riffer/config/mcp.rb +31 -0
  34. data/lib/riffer/config/open_ai.rb +30 -0
  35. data/lib/riffer/config/open_router.rb +21 -0
  36. data/lib/riffer/config/pricing/rates.rb +36 -0
  37. data/lib/riffer/config/pricing.rb +64 -0
  38. data/lib/riffer/config/skills.rb +38 -0
  39. data/lib/riffer/config/tracing.rb +43 -0
  40. data/lib/riffer/config.rb +3 -362
  41. data/lib/riffer/evals/evaluator.rb +1 -29
  42. data/lib/riffer/evals/evaluator_runner.rb +0 -15
  43. data/lib/riffer/evals/judge.rb +0 -8
  44. data/lib/riffer/evals/result.rb +1 -11
  45. data/lib/riffer/evals/run_result.rb +0 -12
  46. data/lib/riffer/evals/scenario_result.rb +0 -19
  47. data/lib/riffer/files/downloader.rb +2 -3
  48. data/lib/riffer/files/resolver.rb +2 -7
  49. data/lib/riffer/guardrail.rb +2 -22
  50. data/lib/riffer/guardrails/modification.rb +0 -8
  51. data/lib/riffer/guardrails/result.rb +0 -17
  52. data/lib/riffer/guardrails/runner.rb +2 -11
  53. data/lib/riffer/guardrails/tripwire.rb +0 -8
  54. data/lib/riffer/guardrails.rb +0 -2
  55. data/lib/riffer/helpers/boolean.rb +0 -4
  56. data/lib/riffer/helpers/call_or_value.rb +0 -3
  57. data/lib/riffer/helpers/deep_dup.rb +3 -8
  58. data/lib/riffer/helpers/dependencies.rb +0 -4
  59. data/lib/riffer/helpers/identifier.rb +3 -12
  60. data/lib/riffer/helpers/validate.rb +42 -0
  61. data/lib/riffer/mcp/authenticated_tool.rb +4 -12
  62. data/lib/riffer/mcp/client.rb +0 -7
  63. data/lib/riffer/mcp/manifest.rb +3 -7
  64. data/lib/riffer/mcp/registration.rb +0 -10
  65. data/lib/riffer/mcp/registry.rb +0 -9
  66. data/lib/riffer/mcp/search_tool.rb +0 -4
  67. data/lib/riffer/mcp/tool.rb +1 -4
  68. data/lib/riffer/mcp/tool_factory.rb +3 -6
  69. data/lib/riffer/mcp.rb +2 -23
  70. data/lib/riffer/messages/assistant/reasoning_part.rb +4 -21
  71. data/lib/riffer/messages/assistant/tool_call.rb +1 -9
  72. data/lib/riffer/messages/assistant.rb +1 -21
  73. data/lib/riffer/messages/base.rb +0 -12
  74. data/lib/riffer/messages/system.rb +0 -3
  75. data/lib/riffer/messages/tool.rb +0 -15
  76. data/lib/riffer/messages/user/file_part.rb +2 -30
  77. data/lib/riffer/messages/user.rb +0 -4
  78. data/lib/riffer/params/boolean.rb +1 -5
  79. data/lib/riffer/params/param.rb +3 -31
  80. data/lib/riffer/params.rb +8 -41
  81. data/lib/riffer/providers/amazon_bedrock.rb +101 -42
  82. data/lib/riffer/providers/anthropic.rb +9 -24
  83. data/lib/riffer/providers/azure_open_ai.rb +3 -8
  84. data/lib/riffer/providers/base.rb +7 -28
  85. data/lib/riffer/providers/finish_reason.rb +0 -6
  86. data/lib/riffer/providers/gemini/client.rb +4 -17
  87. data/lib/riffer/providers/gemini.rb +4 -10
  88. data/lib/riffer/providers/mock.rb +1 -26
  89. data/lib/riffer/providers/open_ai.rb +7 -17
  90. data/lib/riffer/providers/open_router.rb +105 -30
  91. data/lib/riffer/providers/repository.rb +2 -14
  92. data/lib/riffer/providers/token_usage.rb +5 -14
  93. data/lib/riffer/registrable.rb +11 -45
  94. data/lib/riffer/runner/fibers.rb +1 -6
  95. data/lib/riffer/runner/sequential.rb +0 -1
  96. data/lib/riffer/runner/threaded.rb +0 -3
  97. data/lib/riffer/runner.rb +0 -3
  98. data/lib/riffer/skills/activate_tool.rb +0 -3
  99. data/lib/riffer/skills/adapter.rb +0 -8
  100. data/lib/riffer/skills/backend.rb +2 -7
  101. data/lib/riffer/skills/config.rb +4 -20
  102. data/lib/riffer/skills/context.rb +0 -29
  103. data/lib/riffer/skills/filesystem_backend.rb +0 -7
  104. data/lib/riffer/skills/frontmatter.rb +2 -16
  105. data/lib/riffer/skills/markdown_adapter.rb +3 -6
  106. data/lib/riffer/skills/xml_adapter.rb +0 -3
  107. data/lib/riffer/stream_events/base.rb +0 -3
  108. data/lib/riffer/stream_events/finish_reason_done.rb +1 -6
  109. data/lib/riffer/stream_events/guardrail_modification.rb +0 -10
  110. data/lib/riffer/stream_events/guardrail_tripwire.rb +0 -10
  111. data/lib/riffer/stream_events/interrupt.rb +2 -12
  112. data/lib/riffer/stream_events/reasoning_delta.rb +0 -3
  113. data/lib/riffer/stream_events/reasoning_done.rb +1 -5
  114. data/lib/riffer/stream_events/skill_activation.rb +0 -3
  115. data/lib/riffer/stream_events/text_delta.rb +0 -2
  116. data/lib/riffer/stream_events/text_done.rb +0 -2
  117. data/lib/riffer/stream_events/token_usage_done.rb +0 -2
  118. data/lib/riffer/stream_events/tool_call_delta.rb +1 -5
  119. data/lib/riffer/stream_events/tool_call_done.rb +0 -5
  120. data/lib/riffer/stream_events/web_search_done.rb +0 -3
  121. data/lib/riffer/stream_events/web_search_status.rb +1 -5
  122. data/lib/riffer/testing/minitest.rb +4 -5
  123. data/lib/riffer/testing.rb +5 -38
  124. data/lib/riffer/tool.rb +2 -28
  125. data/lib/riffer/tools/response.rb +3 -32
  126. data/lib/riffer/tools/runtime/fibers.rb +0 -6
  127. data/lib/riffer/tools/runtime/inline.rb +0 -1
  128. data/lib/riffer/tools/runtime/threaded.rb +0 -6
  129. data/lib/riffer/tools/runtime.rb +5 -26
  130. data/lib/riffer/tools/toolable.rb +0 -37
  131. data/lib/riffer/tracing/capture.rb +3 -5
  132. data/lib/riffer/tracing/no_op.rb +0 -7
  133. data/lib/riffer/tracing/otel.rb +7 -16
  134. data/lib/riffer/tracing/stream_recorder.rb +0 -7
  135. data/lib/riffer/tracing.rb +4 -27
  136. data/lib/riffer/version.rb +1 -1
  137. data/lib/riffer.rb +2 -30
  138. data/sig/generated/riffer/agent/config.rbs +12 -48
  139. data/sig/generated/riffer/agent/context.rbs +2 -26
  140. data/sig/generated/riffer/agent/outcome.rbs +0 -20
  141. data/sig/generated/riffer/agent/response.rbs +1 -29
  142. data/sig/generated/riffer/agent/run.rbs +1 -27
  143. data/sig/generated/riffer/agent/serializer.rbs +2 -27
  144. data/sig/generated/riffer/agent/session/repair.rbs +2 -10
  145. data/sig/generated/riffer/agent/session.rbs +10 -36
  146. data/sig/generated/riffer/agent/structured_output/result.rbs +0 -7
  147. data/sig/generated/riffer/agent/structured_output.rbs +0 -7
  148. data/sig/generated/riffer/agent.rbs +5 -121
  149. data/sig/generated/riffer/config/amazon_bedrock.rbs +21 -0
  150. data/sig/generated/riffer/config/anthropic.rbs +15 -0
  151. data/sig/generated/riffer/config/azure_open_ai.rbs +21 -0
  152. data/sig/generated/riffer/config/evals.rbs +13 -0
  153. data/sig/generated/riffer/config/files.rbs +43 -0
  154. data/sig/generated/riffer/config/gemini.rbs +15 -0
  155. data/sig/generated/riffer/config/mcp.rbs +19 -0
  156. data/sig/generated/riffer/config/open_ai.rbs +21 -0
  157. data/sig/generated/riffer/config/open_router.rbs +15 -0
  158. data/sig/generated/riffer/config/pricing/rates.rbs +19 -0
  159. data/sig/generated/riffer/config/pricing.rbs +31 -0
  160. data/sig/generated/riffer/config/skills.rbs +19 -0
  161. data/sig/generated/riffer/config/tracing.rbs +25 -0
  162. data/sig/generated/riffer/config.rbs +2 -307
  163. data/sig/generated/riffer/evals/evaluator.rbs +0 -28
  164. data/sig/generated/riffer/evals/evaluator_runner.rbs +0 -14
  165. data/sig/generated/riffer/evals/judge.rbs +0 -7
  166. data/sig/generated/riffer/evals/result.rbs +1 -11
  167. data/sig/generated/riffer/evals/run_result.rbs +0 -12
  168. data/sig/generated/riffer/evals/scenario_result.rbs +0 -14
  169. data/sig/generated/riffer/files/resolver.rbs +0 -7
  170. data/sig/generated/riffer/guardrail.rbs +2 -22
  171. data/sig/generated/riffer/guardrails/modification.rbs +0 -6
  172. data/sig/generated/riffer/guardrails/result.rbs +0 -15
  173. data/sig/generated/riffer/guardrails/runner.rbs +0 -11
  174. data/sig/generated/riffer/guardrails/tripwire.rbs +0 -8
  175. data/sig/generated/riffer/guardrails.rbs +0 -2
  176. data/sig/generated/riffer/helpers/boolean.rbs +0 -4
  177. data/sig/generated/riffer/helpers/call_or_value.rbs +0 -3
  178. data/sig/generated/riffer/helpers/deep_dup.rbs +0 -8
  179. data/sig/generated/riffer/helpers/dependencies.rbs +0 -4
  180. data/sig/generated/riffer/helpers/identifier.rbs +0 -12
  181. data/sig/generated/riffer/helpers/validate.rbs +21 -0
  182. data/sig/generated/riffer/mcp/authenticated_tool.rbs +0 -5
  183. data/sig/generated/riffer/mcp/client.rbs +0 -7
  184. data/sig/generated/riffer/mcp/manifest.rbs +3 -7
  185. data/sig/generated/riffer/mcp/registration.rbs +0 -10
  186. data/sig/generated/riffer/mcp/registry.rbs +0 -9
  187. data/sig/generated/riffer/mcp/search_tool.rbs +0 -4
  188. data/sig/generated/riffer/mcp/tool.rbs +0 -4
  189. data/sig/generated/riffer/mcp/tool_factory.rbs +0 -6
  190. data/sig/generated/riffer/mcp.rbs +2 -22
  191. data/sig/generated/riffer/messages/assistant/reasoning_part.rbs +4 -17
  192. data/sig/generated/riffer/messages/assistant/tool_call.rbs +1 -9
  193. data/sig/generated/riffer/messages/assistant.rbs +10 -30
  194. data/sig/generated/riffer/messages/base.rbs +0 -12
  195. data/sig/generated/riffer/messages/system.rbs +0 -3
  196. data/sig/generated/riffer/messages/tool.rbs +0 -12
  197. data/sig/generated/riffer/messages/user/file_part.rbs +0 -30
  198. data/sig/generated/riffer/messages/user.rbs +0 -4
  199. data/sig/generated/riffer/params/boolean.rbs +1 -4
  200. data/sig/generated/riffer/params/param.rbs +0 -31
  201. data/sig/generated/riffer/params.rbs +4 -40
  202. data/sig/generated/riffer/providers/amazon_bedrock.rbs +29 -25
  203. data/sig/generated/riffer/providers/anthropic.rbs +0 -10
  204. data/sig/generated/riffer/providers/azure_open_ai.rbs +0 -8
  205. data/sig/generated/riffer/providers/base.rbs +0 -28
  206. data/sig/generated/riffer/providers/finish_reason.rbs +0 -6
  207. data/sig/generated/riffer/providers/gemini/client.rbs +4 -17
  208. data/sig/generated/riffer/providers/gemini.rbs +0 -6
  209. data/sig/generated/riffer/providers/mock.rbs +0 -26
  210. data/sig/generated/riffer/providers/open_ai.rbs +2 -9
  211. data/sig/generated/riffer/providers/open_router.rbs +33 -14
  212. data/sig/generated/riffer/providers/repository.rbs +2 -14
  213. data/sig/generated/riffer/providers/token_usage.rbs +5 -14
  214. data/sig/generated/riffer/registrable.rbs +0 -45
  215. data/sig/generated/riffer/runner/fibers.rbs +0 -6
  216. data/sig/generated/riffer/runner/sequential.rbs +0 -1
  217. data/sig/generated/riffer/runner/threaded.rbs +0 -3
  218. data/sig/generated/riffer/runner.rbs +0 -3
  219. data/sig/generated/riffer/skills/activate_tool.rbs +0 -3
  220. data/sig/generated/riffer/skills/adapter.rbs +0 -8
  221. data/sig/generated/riffer/skills/backend.rbs +2 -7
  222. data/sig/generated/riffer/skills/config.rbs +0 -20
  223. data/sig/generated/riffer/skills/context.rbs +0 -29
  224. data/sig/generated/riffer/skills/filesystem_backend.rbs +0 -7
  225. data/sig/generated/riffer/skills/frontmatter.rbs +2 -16
  226. data/sig/generated/riffer/skills/markdown_adapter.rbs +0 -6
  227. data/sig/generated/riffer/skills/xml_adapter.rbs +0 -3
  228. data/sig/generated/riffer/stream_events/base.rbs +0 -3
  229. data/sig/generated/riffer/stream_events/finish_reason_done.rbs +1 -6
  230. data/sig/generated/riffer/stream_events/guardrail_modification.rbs +0 -10
  231. data/sig/generated/riffer/stream_events/guardrail_tripwire.rbs +0 -10
  232. data/sig/generated/riffer/stream_events/interrupt.rbs +2 -10
  233. data/sig/generated/riffer/stream_events/reasoning_delta.rbs +0 -3
  234. data/sig/generated/riffer/stream_events/reasoning_done.rbs +1 -5
  235. data/sig/generated/riffer/stream_events/skill_activation.rbs +0 -3
  236. data/sig/generated/riffer/stream_events/text_delta.rbs +0 -2
  237. data/sig/generated/riffer/stream_events/text_done.rbs +0 -2
  238. data/sig/generated/riffer/stream_events/token_usage_done.rbs +0 -2
  239. data/sig/generated/riffer/stream_events/tool_call_delta.rbs +1 -5
  240. data/sig/generated/riffer/stream_events/tool_call_done.rbs +0 -5
  241. data/sig/generated/riffer/stream_events/web_search_done.rbs +0 -3
  242. data/sig/generated/riffer/stream_events/web_search_status.rbs +1 -5
  243. data/sig/generated/riffer/testing.rbs +0 -38
  244. data/sig/generated/riffer/tool.rbs +0 -27
  245. data/sig/generated/riffer/tools/response.rbs +3 -29
  246. data/sig/generated/riffer/tools/runtime/fibers.rbs +0 -5
  247. data/sig/generated/riffer/tools/runtime/inline.rbs +0 -1
  248. data/sig/generated/riffer/tools/runtime/threaded.rbs +0 -5
  249. data/sig/generated/riffer/tools/runtime.rbs +2 -24
  250. data/sig/generated/riffer/tools/toolable.rbs +0 -37
  251. data/sig/generated/riffer/tracing/capture.rbs +2 -5
  252. data/sig/generated/riffer/tracing/no_op.rbs +0 -7
  253. data/sig/generated/riffer/tracing/otel.rbs +7 -16
  254. data/sig/generated/riffer/tracing/stream_recorder.rbs +0 -2
  255. data/sig/generated/riffer/tracing.rbs +4 -23
  256. data/sig/generated/riffer.rbs +2 -29
  257. data/sig/manual/riffer/helpers/validate.rbs +5 -0
  258. metadata +30 -1
@@ -1,22 +1,16 @@
1
1
  # Generated from lib/riffer/guardrails/modification.rb with RBS::Inline
2
2
 
3
- # Records a guardrail transformation event.
4
3
  class Riffer::Guardrails::Modification
5
- # The guardrail class that transformed data.
6
4
  attr_reader guardrail: singleton(Riffer::Guardrail)
7
5
 
8
- # The phase when the transformation occurred (:before or :after).
9
6
  attr_reader phase: Symbol
10
7
 
11
- # The indices of messages that were changed.
12
8
  attr_reader message_indices: Array[Integer]
13
9
 
14
10
  # --
15
11
  # : (guardrail: singleton(Riffer::Guardrail), phase: Symbol, message_indices: Array[Integer]) -> void
16
12
  def initialize: (guardrail: singleton(Riffer::Guardrail), phase: Symbol, message_indices: Array[Integer]) -> void
17
13
 
18
- # Converts the modification to a hash.
19
- #
20
14
  # --
21
15
  # : () -> Hash[Symbol, untyped]
22
16
  def to_h: () -> Hash[Symbol, untyped]
@@ -1,53 +1,38 @@
1
1
  # Generated from lib/riffer/guardrails/result.rb with RBS::Inline
2
2
 
3
- # Represents the result of a guardrail execution: +pass+ (continue unchanged),
4
- # +transform+ (continue with changed data), or +block+ (halt with a reason).
5
3
  class Riffer::Guardrails::Result
6
4
  TYPES: Array[Symbol]
7
5
 
8
- # The result type (:pass, :transform, or :block).
9
6
  attr_reader type: Symbol
10
7
 
11
- # The data (for pass/transform) or reason (for block).
12
8
  attr_reader data: untyped
13
9
 
14
- # Optional metadata for block results.
15
10
  attr_reader metadata: Hash[Symbol, untyped]?
16
11
 
17
- # Creates a pass result that continues with unchanged data.
18
12
  # --
19
13
  # : (untyped) -> Riffer::Guardrails::Result
20
14
  def self.pass: (untyped) -> Riffer::Guardrails::Result
21
15
 
22
- # Creates a transform result that continues with transformed data.
23
16
  # --
24
17
  # : (untyped) -> Riffer::Guardrails::Result
25
18
  def self.transform: (untyped) -> Riffer::Guardrails::Result
26
19
 
27
- # Creates a block result that halts execution.
28
20
  # --
29
21
  # : (String, ?metadata: Hash[Symbol, untyped]?) -> Riffer::Guardrails::Result
30
22
  def self.block: (String, ?metadata: Hash[Symbol, untyped]?) -> Riffer::Guardrails::Result
31
23
 
32
- # Raises Riffer::ArgumentError if +type+ is not :pass, :transform, or :block.
33
24
  # --
34
25
  # : (Symbol, untyped, ?metadata: Hash[Symbol, untyped]?) -> void
35
26
  def initialize: (Symbol, untyped, ?metadata: Hash[Symbol, untyped]?) -> void
36
27
 
37
- # Returns true if this is a pass result.
38
- #
39
28
  # --
40
29
  # : () -> bool
41
30
  def pass?: () -> bool
42
31
 
43
- # Returns true if this is a transform result.
44
- #
45
32
  # --
46
33
  # : () -> bool
47
34
  def transform?: () -> bool
48
35
 
49
- # Returns true if this is a block result.
50
- #
51
36
  # --
52
37
  # : () -> bool
53
38
  def block?: () -> bool
@@ -1,27 +1,18 @@
1
1
  # Generated from lib/riffer/guardrails/runner.rb with RBS::Inline
2
2
 
3
- # Executes guardrails sequentially, passing each one's output to the next; if
4
- # any blocks, execution stops and a tripwire is returned.
5
3
  class Riffer::Guardrails::Runner
6
- # The guardrail configs to execute.
7
4
  attr_reader guardrail_configs: Array[Hash[Symbol, untyped]]
8
5
 
9
- # The execution phase (:before or :after).
10
6
  attr_reader phase: Symbol
11
7
 
12
- # The context passed to guardrails.
13
8
  attr_reader context: untyped
14
9
 
15
- # The normalized per-call tags, stamped as +riffer.tag.*+ on guardrail spans.
16
10
  attr_reader tags: Hash[String, String]
17
11
 
18
12
  # --
19
13
  # : (Array[Hash[Symbol, untyped]], phase: Symbol, ?context: untyped, ?tags: Hash[String, String]) -> void
20
14
  def initialize: (Array[Hash[Symbol, untyped]], phase: Symbol, ?context: untyped, ?tags: Hash[String, String]) -> void
21
15
 
22
- # Runs the guardrails sequentially. For the +:before+ phase +data+ is the
23
- # messages array; for +:after+ it's the response (and +messages+ must be
24
- # provided).
25
16
  # --
26
17
  # : (untyped, ?messages: Array[Riffer::Messages::Base]?) -> [untyped, Riffer::Guardrails::Tripwire?, Array[Riffer::Guardrails::Modification]]
27
18
  def run: (untyped, ?messages: Array[Riffer::Messages::Base]?) -> [ untyped, Riffer::Guardrails::Tripwire?, Array[Riffer::Guardrails::Modification] ]
@@ -48,8 +39,6 @@ class Riffer::Guardrails::Runner
48
39
  # : (Riffer::Guardrail) -> Hash[String, untyped]
49
40
  def guardrail_span_attributes: (Riffer::Guardrail) -> Hash[String, untyped]
50
41
 
51
- # A block is a handled outcome, so its span status stays unset — an error
52
- # span status is reserved for a raised exception.
53
42
  # --
54
43
  # : ((Riffer::Tracing::Otel::Span | Riffer::Tracing::NoOp::Span), Riffer::Guardrails::Result) -> void
55
44
  def record_guardrail_outcome: (Riffer::Tracing::Otel::Span | Riffer::Tracing::NoOp::Span, Riffer::Guardrails::Result) -> void
@@ -1,28 +1,20 @@
1
1
  # Generated from lib/riffer/guardrails/tripwire.rb with RBS::Inline
2
2
 
3
- # Captures information about a blocked guardrail execution.
4
3
  class Riffer::Guardrails::Tripwire
5
4
  PHASES: Array[Symbol]
6
5
 
7
- # The reason for blocking.
8
6
  attr_reader reason: String
9
7
 
10
- # The guardrail class that triggered the block.
11
8
  attr_reader guardrail: singleton(Riffer::Guardrail)
12
9
 
13
- # The phase when the block occurred (:before or :after).
14
10
  attr_reader phase: Symbol
15
11
 
16
- # Optional metadata about the block.
17
12
  attr_reader metadata: Hash[Symbol, untyped]?
18
13
 
19
- # Raises Riffer::ArgumentError if +phase+ is invalid.
20
14
  # --
21
15
  # : (reason: String, guardrail: singleton(Riffer::Guardrail), phase: Symbol, ?metadata: Hash[Symbol, untyped]?) -> void
22
16
  def initialize: (reason: String, guardrail: singleton(Riffer::Guardrail), phase: Symbol, ?metadata: Hash[Symbol, untyped]?) -> void
23
17
 
24
- # Converts the tripwire to a hash.
25
- #
26
18
  # --
27
19
  # : () -> Hash[Symbol, untyped]
28
20
  def to_h: () -> Hash[Symbol, untyped]
@@ -1,7 +1,5 @@
1
1
  # Generated from lib/riffer/guardrails.rb with RBS::Inline
2
2
 
3
- # Namespace for guardrail components that pre-process input and post-process
4
- # output in the agent pipeline.
5
3
  module Riffer::Guardrails
6
4
  PHASES: Array[Symbol]
7
5
  end
@@ -1,10 +1,6 @@
1
1
  # Generated from lib/riffer/helpers/boolean.rb with RBS::Inline
2
2
 
3
- # Coercion for boolean-ish configuration values.
4
3
  module Riffer::Helpers::Boolean
5
- # Coerces +value+ to a boolean so an env-var +"false"+ (truthy in Ruby)
6
- # doesn't silently read as +true+. Raises Riffer::ArgumentError on an
7
- # unrecognized value, naming +attribute+ in the message.
8
4
  # --
9
5
  # : (untyped, attribute: String) -> bool
10
6
  def coerce: (untyped, attribute: String) -> bool
@@ -1,9 +1,6 @@
1
1
  # Generated from lib/riffer/helpers/call_or_value.rb with RBS::Inline
2
2
 
3
- # Resolves the Proc-or-value idiom.
4
3
  module Riffer::Helpers::CallOrValue
5
- # Calls +thing+ when it's a Proc (passing +context+ if its arity is non-zero),
6
- # returns it unchanged otherwise, or +default+ when +nil+.
7
4
  # --
8
5
  # : (untyped, ?context: untyped, ?default: untyped) -> untyped
9
6
  def resolve: (untyped, ?context: untyped, ?default: untyped) -> untyped
@@ -1,14 +1,6 @@
1
1
  # Generated from lib/riffer/helpers/deep_dup.rb with RBS::Inline
2
2
 
3
- # Copying for the nested Hashes and Arrays a configuration object holds.
4
3
  module Riffer::Helpers::DeepDup
5
- # Returns +value+ with every Hash and Array rebuilt, so a copy shares no
6
- # collection with its source.
7
- #
8
- # Anything else is returned as-is, which a Class or a Proc needs: +Class#dup+
9
- # answers a new anonymous class. One source collection maps to one copy, so
10
- # references shared within +value+ stay shared in the result — an +:around+
11
- # guardrail registered under two phases is still one registration afterwards.
12
4
  # --
13
5
  # : (untyped) -> untyped
14
6
  def call: (untyped) -> untyped
@@ -1,13 +1,9 @@
1
1
  # Generated from lib/riffer/helpers/dependencies.rb with RBS::Inline
2
2
 
3
- # Lazy-loads gem dependencies — used by providers to load required gems only
4
- # when needed.
5
3
  module Riffer::Helpers::Dependencies
6
- # Raised when a required gem cannot be loaded.
7
4
  class LoadError < ::LoadError
8
5
  end
9
6
 
10
- # Requires a gem by name; raises LoadError if it isn't installed.
11
7
  # --
12
8
  # : (String) -> true
13
9
  def depends_on: (String) -> true
@@ -1,26 +1,14 @@
1
1
  # Generated from lib/riffer/helpers/identifier.rb with RBS::Inline
2
2
 
3
- # Helper module for deriving snake_case identifiers from class names.
4
3
  module Riffer::Helpers::Identifier
5
- # Derives a snake_case identifier from a class name string.
6
- #
7
4
  # --
8
5
  # : (String?) -> String
9
6
  def derive: (String?) -> String
10
7
 
11
- # Derives and memoizes the identifier for a class or module. Anonymous
12
- # classes return "" without caching, so a class named later still derives its
13
- # real identifier — a guard that must travel with the cache, so callers never
14
- # memoize their own.
15
- #
16
8
  # --
17
9
  # : (Module) -> String
18
10
  def for: (Module) -> String
19
11
 
20
- # Returns the class-path name of a class or module, or +nil+ when anonymous.
21
- # Tool classes shadow Module#name with the identifier DSL, so the real name
22
- # must come from Module's own implementation.
23
- #
24
12
  # --
25
13
  # : (Module) -> String?
26
14
  def real_name: (Module) -> String?
@@ -0,0 +1,21 @@
1
+ # Generated from lib/riffer/helpers/validate.rb with RBS::Inline
2
+
3
+ module Riffer::Helpers::Validate
4
+ # The error names the class, not the value, so a misassigned secret never
5
+ # lands in a log.
6
+ # --
7
+ # : (untyped, attribute: String) -> String?
8
+ def optional_string: (untyped, attribute: String) -> String?
9
+
10
+ # --
11
+ # : (untyped, attribute: String) -> Integer
12
+ def positive_integer: (untyped, attribute: String) -> Integer
13
+
14
+ # --
15
+ # : (untyped, attribute: String) -> Riffer::Runner
16
+ def runner: (untyped, attribute: String) -> Riffer::Runner
17
+
18
+ # --
19
+ # : (untyped, attribute: String) -> String
20
+ def model_id: (untyped, attribute: String) -> String
21
+ end
@@ -1,11 +1,6 @@
1
1
  # Generated from lib/riffer/mcp/authenticated_tool.rb with RBS::Inline
2
2
 
3
- # Wraps MCP-generated tool classes so +tools/call+ resolves
4
- # +Riffer.config.mcp.credentials+ per invocation, copying metadata from the
5
- # inner class at wrap time.
6
3
  module Riffer::Mcp::AuthenticatedTool
7
- # Returns one wrapper class per inner tool, sharing +manifest+ and +matched_tags+.
8
- #
9
4
  # --
10
5
  # : (Array[singleton(Riffer::Mcp::Tool)], Riffer::Mcp::Manifest, Array[Symbol]) -> Array[singleton(Riffer::Mcp::Tool)]
11
6
  def wrap_all: (Array[singleton(Riffer::Mcp::Tool)], Riffer::Mcp::Manifest, Array[Symbol]) -> Array[singleton(Riffer::Mcp::Tool)]
@@ -1,8 +1,5 @@
1
1
  # Generated from lib/riffer/mcp/client.rb with RBS::Inline
2
2
 
3
- # Thin wrapper around the MCP Ruby SDK client (mcp gem v0.8+). Resolves headers
4
- # (if a Proc) once at init, then provides +tools_list+ / +tools_call+ — used for
5
- # discovery and for +tools/call+ when no +credentials+ proc is configured.
6
3
  class Riffer::Mcp::Client
7
4
  @client: untyped
8
5
 
@@ -10,14 +7,10 @@ class Riffer::Mcp::Client
10
7
  # : (endpoint: String, ?headers: (Hash[String, String] | Proc), ?client: untyped?) -> void
11
8
  def initialize: (endpoint: String, ?headers: Hash[String, String] | Proc, ?client: untyped?) -> void
12
9
 
13
- # Returns tool definition hashes with +:name+, +:description+, and
14
- # +:input_schema+ keys.
15
10
  # --
16
11
  # : () -> Array[Hash[Symbol, untyped]]
17
12
  def tools_list: () -> Array[Hash[Symbol, untyped]]
18
13
 
19
- # Calls a tool on the MCP server and returns joined text content from the response.
20
- #
21
14
  # --
22
15
  # : (String, ?Hash[untyped, untyped]) -> String
23
16
  def tools_call: (String, ?Hash[untyped, untyped]) -> String
@@ -1,21 +1,17 @@
1
1
  # Generated from lib/riffer/mcp/manifest.rb with RBS::Inline
2
2
 
3
- # Holds the configuration for a single MCP server.
4
3
  class Riffer::Mcp::Manifest
5
- # Identifier used as the registration key and generated-agent identifier.
6
4
  attr_reader name: String
7
5
 
8
- # Tags for matching +use_mcp+.
9
6
  attr_reader tags: Array[Symbol]
10
7
 
11
- # HTTPS URL passed to the MCP transport.
12
8
  attr_reader endpoint: String
13
9
 
14
- # Headers (or a Proc) resolved once when building the discovery client.
10
+ # Resolved once, when building the discovery client.
15
11
  attr_reader discovery_headers: (Hash[String, untyped] | ::Proc)?
16
12
 
17
- # Optional hint (+:global+/+:tenant+/+:user+) for whether invocation
18
- # credentials depend on tenant/user keys in +context+.
13
+ # +:global+, +:tenant+, or +:user+: whether invocation credentials depend on
14
+ # tenant/user keys in +context+.
19
15
  attr_reader credentials_scope: Symbol?
20
16
 
21
17
  # Raises Riffer::ArgumentError unless +name+ is present and +endpoint+ is a
@@ -1,7 +1,5 @@
1
1
  # Generated from lib/riffer/mcp/registration.rb with RBS::Inline
2
2
 
3
- # Per-server state managed by Riffer::Mcp::Registry — discovers tools via
4
- # +tools/list+ and generates tool classes when a server is registered.
5
3
  class Riffer::Mcp::Registration
6
4
  @cancelled: bool
7
5
 
@@ -9,11 +7,8 @@ class Riffer::Mcp::Registration
9
7
 
10
8
  @mutex: Thread::Mutex
11
9
 
12
- # The manifest that describes this server.
13
10
  attr_reader manifest: Riffer::Mcp::Manifest
14
11
 
15
- # Generated Riffer::Mcp::Tool subclasses.
16
- #
17
12
  # --
18
13
  # : () -> Array[singleton(Riffer::Mcp::Tool)]
19
14
  def tools: () -> Array[singleton(Riffer::Mcp::Tool)]
@@ -22,15 +17,10 @@ class Riffer::Mcp::Registration
22
17
  # : (Riffer::Mcp::Manifest) -> void
23
18
  def initialize: (Riffer::Mcp::Manifest) -> void
24
19
 
25
- # Retires this registration, preventing in-flight discovery from publishing
26
- # state.
27
- #
28
20
  # --
29
21
  # : () -> void
30
22
  def retire!: () -> void
31
23
 
32
- # Returns true if this registration has been retired.
33
- #
34
24
  # --
35
25
  # : () -> bool
36
26
  def retired?: () -> bool
@@ -1,31 +1,22 @@
1
1
  # Generated from lib/riffer/mcp/registry.rb with RBS::Inline
2
2
 
3
- # Thread-safe global store for MCP server registrations, keyed by manifest name.
4
3
  module Riffer::Mcp::Registry
5
4
  @mutex: Thread::Mutex
6
5
 
7
6
  @store: Hash[String, Riffer::Mcp::Registration]
8
7
 
9
- # Registers an MCP server and starts async tool discovery, replacing any
10
- # existing registration with the same name.
11
8
  # --
12
9
  # : ((Hash[Symbol, untyped] | Riffer::Mcp::Manifest)) -> Riffer::Mcp::Registration
13
10
  def register: (Hash[Symbol, untyped] | Riffer::Mcp::Manifest) -> Riffer::Mcp::Registration
14
11
 
15
- # Removes a registration by name.
16
- #
17
12
  # --
18
13
  # : ((String | Symbol)) -> void
19
14
  def unregister: (String | Symbol) -> void
20
15
 
21
- # Returns a frozen snapshot of all current registrations.
22
- #
23
16
  # --
24
17
  # : () -> Hash[String, Riffer::Mcp::Registration]
25
18
  def registrations: () -> Hash[String, Riffer::Mcp::Registration]
26
19
 
27
- # Returns all registrations whose manifest tags intersect the given tags
28
- # (normalized to symbols).
29
20
  # --
30
21
  # : (Array[Symbol]) -> Array[Riffer::Mcp::Registration]
31
22
  def find_by_tags: (Array[Symbol]) -> Array[Riffer::Mcp::Registration]
@@ -1,12 +1,9 @@
1
1
  # Generated from lib/riffer/mcp/search_tool.rb with RBS::Inline
2
2
 
3
- # Searches available MCP tools by name or description.
4
3
  class Riffer::Mcp::SearchTool < Riffer::Tool
5
4
  IDENTIFIER: ::String
6
5
 
7
- # Successful search response carrying the matched tool classes.
8
6
  class Result < Riffer::Tools::Response
9
- # Tool classes that matched the search query.
10
7
  attr_reader discovered_tools: Array[singleton(Riffer::Tool)]
11
8
 
12
9
  # --
@@ -14,7 +11,6 @@ class Riffer::Mcp::SearchTool < Riffer::Tool
14
11
  def initialize: (String, Array[singleton(Riffer::Tool)]) -> void
15
12
  end
16
13
 
17
- # Searches progressive MCP tools and returns a +Result+ with +discovered_tools+.
18
14
  # --
19
15
  # : (context: Riffer::Agent::Context?, query: String) -> Riffer::Tools::Response
20
16
  def call: (context: Riffer::Agent::Context?, query: String) -> Riffer::Tools::Response
@@ -1,18 +1,14 @@
1
1
  # Generated from lib/riffer/mcp/tool.rb with RBS::Inline
2
2
 
3
- # Base class for MCP-generated tools.
4
3
  class Riffer::Mcp::Tool < Riffer::Tool
5
4
  self.@mcp_server_tool_name: String?
6
5
 
7
6
  self.@input_schema: Hash[Symbol, untyped]?
8
7
 
9
- # Returns the unprefixed tool name used for +tools/call+ on the MCP server.
10
8
  # --
11
9
  # : () -> String
12
10
  def self.mcp_server_tool_name: () -> String
13
11
 
14
- # Returns the server-published input schema, falling back to the params DSL.
15
- # MCP schemas are server-defined, so +strict+ is not applied to them.
16
12
  # --
17
13
  # : (?strict: bool) -> Hash[Symbol, untyped]
18
14
  def self.parameters_schema: (?strict: bool) -> Hash[Symbol, untyped]
@@ -1,12 +1,6 @@
1
1
  # Generated from lib/riffer/mcp/tool_factory.rb with RBS::Inline
2
2
 
3
- # Generates anonymous Riffer::Mcp::Tool subclasses from MCP tool definitions.
4
- # Generated tools delegate +#call+ to the MCP client and skip Riffer's param
5
- # validation — the MCP server validates inputs.
6
3
  module Riffer::Mcp::ToolFactory
7
- # Builds one Riffer::Mcp::Tool subclass per tool definition, prefixing names
8
- # with the manifest name to avoid cross-server collisions (e.g.
9
- # +jira__search+); the server-side name stays on +.mcp_server_tool_name+.
10
4
  # --
11
5
  # : (String, Riffer::Mcp::Client, Array[Hash[Symbol, untyped]]) -> Array[singleton(Riffer::Mcp::Tool)]
12
6
  def build: (String, Riffer::Mcp::Client, Array[Hash[Symbol, untyped]]) -> Array[singleton(Riffer::Mcp::Tool)]
@@ -1,43 +1,23 @@
1
1
  # Generated from lib/riffer/mcp.rb with RBS::Inline
2
2
 
3
- # Integration with Model Context Protocol (MCP) servers. Register servers
4
- # globally; agents opt-in by tag via the +use_mcp+ DSL. Tags are
5
- # application-defined; see +docs/MCP.md+.
6
- #
7
- # Riffer::Mcp.register(
8
- # name: "github",
9
- # tags: [:github],
10
- # endpoint: "https://mcp.github.com",
11
- # discovery_headers: -> { {"Authorization" => "Bearer #{ENV['GITHUB_TOKEN']}"} }
12
- # )
13
- #
14
- # class MyAgent < Riffer::Agent
15
- # model "openai/gpt-4o"
16
- # use_mcp :github
17
- # end
18
3
  module Riffer::Mcp
19
- # Base error for all MCP-related failures.
20
4
  class Error < Riffer::Error
21
5
  end
22
6
 
23
7
  # Raised when +Riffer.config.mcp.credentials+ returns +nil+ during +tools/call+
24
- # after the server's tools were included for this run.
8
+ # after the server's tools were already included for this run.
25
9
  class CredentialsDeniedError < Error
26
10
  end
27
11
 
28
- # Registers an MCP server, blocking until tool discovery completes. Raises
29
- # on discovery failure.
12
+ # Blocks until tool discovery completes.
30
13
  # --
31
14
  # : ((Hash[Symbol, untyped] | Riffer::Mcp::Manifest)) -> Riffer::Mcp::Registration
32
15
  def register: (Hash[Symbol, untyped] | Riffer::Mcp::Manifest) -> Riffer::Mcp::Registration
33
16
 
34
- # Removes a registration by name; subsequent agent runs won't see its tools.
35
17
  # --
36
18
  # : (String) -> void
37
19
  def unregister: (String) -> void
38
20
 
39
- # Returns all current registrations keyed by name.
40
- #
41
21
  # --
42
22
  # : () -> Hash[String, Riffer::Mcp::Registration]
43
23
  def registrations: () -> Hash[String, Riffer::Mcp::Registration]
@@ -1,45 +1,32 @@
1
1
  # Generated from lib/riffer/messages/assistant/reasoning_part.rb with RBS::Inline
2
2
 
3
- # Represents one block of model reasoning attached to an assistant message.
4
- # riffer stores and replays a part verbatim rather than interpreting it, so a
5
- # provider that requires its own thinking blocks back gets them unchanged.
3
+ # Stored and replayed verbatim, never interpreted, so a provider that requires its own thinking
4
+ # blocks back gets them unchanged.
6
5
  class Riffer::Messages::Assistant::ReasoningPart
7
6
  TYPES: Array[Symbol]
8
7
 
9
- # What the part carries: readable reasoning (+:text+), a provider-condensed
10
- # digest (+:summary+), or an opaque payload (+:encrypted+).
11
8
  attr_reader type: Symbol
12
9
 
13
- # The reasoning prose, for +:text+ and +:summary+ parts.
14
10
  attr_reader text: String?
15
11
 
16
- # The opaque payload, for +:encrypted+ parts.
17
12
  attr_reader data: String?
18
13
 
19
- # The provider's signature over the part, when it issues one.
20
14
  attr_reader signature: String?
21
15
 
22
- # The provider's identifier for the part, when it issues one.
23
16
  attr_reader id: String?
24
17
 
25
- # The wire format of the part, owned by the provider adapter that produced it
26
- # (e.g. <tt>"anthropic-claude-v1"</tt>). Adapters replay only the formats they
27
- # recognize, so it is never validated here.
18
+ # Owned by the producing adapter (e.g. <tt>"anthropic-claude-v1"</tt>); adapters replay only the
19
+ # formats they recognize, so it is never validated here.
28
20
  attr_reader format: String?
29
21
 
30
- # Builds a ReasoningPart from a hash, or returns +part+ unchanged when it is
31
- # already a ReasoningPart.
32
22
  # --
33
23
  # : ((Hash[Symbol, untyped] | Riffer::Messages::Assistant::ReasoningPart)) -> Riffer::Messages::Assistant::ReasoningPart
34
24
  def self.from_hash: (Hash[Symbol, untyped] | Riffer::Messages::Assistant::ReasoningPart) -> Riffer::Messages::Assistant::ReasoningPart
35
25
 
36
- # Raises Riffer::ArgumentError on a +type+ outside TYPES.
37
26
  # --
38
27
  # : (type: Symbol, ?text: String?, ?data: String?, ?signature: String?, ?id: String?, ?format: String?) -> void
39
28
  def initialize: (type: Symbol, ?text: String?, ?data: String?, ?signature: String?, ?id: String?, ?format: String?) -> void
40
29
 
41
- # Serializes the part to a hash, omitting the fields it doesn't carry.
42
- #
43
30
  # --
44
31
  # : () -> Hash[Symbol, untyped]
45
32
  def to_h: () -> Hash[Symbol, untyped]
@@ -1,19 +1,13 @@
1
1
  # Generated from lib/riffer/messages/assistant/tool_call.rb with RBS::Inline
2
2
 
3
- # Represents one tool invocation the model requested on an assistant message.
4
3
  class Riffer::Messages::Assistant::ToolCall
5
- # The provider's identifier for the call, echoed back on the tool result.
6
4
  attr_reader call_id: String
7
5
 
8
- # The name of the tool to invoke.
9
6
  attr_reader name: String
10
7
 
11
- # The JSON-encoded arguments, exactly as the provider emitted them.
8
+ # JSON-encoded, exactly as the provider emitted them.
12
9
  attr_reader arguments: String
13
10
 
14
- # Builds a ToolCall from a hash, or returns +call+ unchanged when it is
15
- # already a ToolCall. Raises Riffer::ArgumentError when the hash is missing
16
- # a field.
17
11
  # --
18
12
  # : ((Hash[Symbol, untyped] | Riffer::Messages::Assistant::ToolCall)) -> Riffer::Messages::Assistant::ToolCall
19
13
  def self.from_hash: (Hash[Symbol, untyped] | Riffer::Messages::Assistant::ToolCall) -> Riffer::Messages::Assistant::ToolCall
@@ -22,8 +16,6 @@ class Riffer::Messages::Assistant::ToolCall
22
16
  # : (call_id: String, name: String, arguments: String) -> void
23
17
  def initialize: (call_id: String, name: String, arguments: String) -> void
24
18
 
25
- # Serializes the call to a hash.
26
- #
27
19
  # --
28
20
  # : () -> Hash[Symbol, untyped]
29
21
  def to_h: () -> Hash[Symbol, untyped]
@@ -1,52 +1,36 @@
1
1
  # Generated from lib/riffer/messages/assistant.rb with RBS::Inline
2
2
 
3
- # Represents an assistant (LLM) message in a conversation; may include tool
4
- # calls when the LLM requests tool execution.
5
3
  class Riffer::Messages::Assistant < Riffer::Messages::Base
6
- # The reasoning part types +reasoning_text+ reads; the rest carry no prose.
4
+ # The other reasoning part types carry no prose.
7
5
  REASONING_TEXT_TYPES: Array[Symbol]
8
6
 
9
- # Builds an Assistant message from a hash, or returns +msg+ unchanged when it
10
- # is already an Assistant message. Raises Riffer::ArgumentError on an invalid
11
- # tool call, reasoning part, or +finish_reason+.
12
7
  # --
13
8
  # : ((Hash[Symbol, untyped] | Riffer::Messages::Assistant)) -> Riffer::Messages::Assistant
14
9
  def self.from_hash: (Hash[Symbol, untyped] | Riffer::Messages::Assistant) -> Riffer::Messages::Assistant
15
10
 
16
- # Array of tool calls requested by the assistant.
17
11
  attr_reader tool_calls: Array[Riffer::Messages::Assistant::ToolCall]
18
12
 
19
- # The model's reasoning blocks for this response, in the order the provider
20
- # emitted them.
21
13
  attr_reader reasoning: Array[Riffer::Messages::Assistant::ReasoningPart]
22
14
 
23
- # Token usage data for this response.
24
15
  attr_reader token_usage: Riffer::Providers::TokenUsage?
25
16
 
26
- # Parsed structured output hash, or nil when not applicable.
27
17
  attr_reader structured_output: Hash[Symbol, untyped]?
28
18
 
29
- # Normalized reason the provider finished this response, when reported (see
30
- # <tt>Riffer::Providers::FinishReason::VALUES</tt>).
31
19
  attr_reader finish_reason: Symbol?
32
20
 
33
- # The provider's raw finish-reason value behind +finish_reason+, when one
34
- # exists on the wire.
35
21
  attr_reader finish_reason_raw: String?
36
22
 
37
- # Raises Riffer::ArgumentError when +finish_reason+ is outside the
38
- # normalized vocabulary.
39
23
  # --
40
24
  # : (
41
- # String,
42
- # ?id: String?,
43
- # ?tool_calls: Array[Riffer::Messages::Assistant::ToolCall],
44
- # ?reasoning: Array[Riffer::Messages::Assistant::ReasoningPart],
45
- # ?token_usage: Riffer::Providers::TokenUsage?,
46
- # ?structured_output: Hash[Symbol, untyped]?,
47
- # ?finish_reason: Symbol?,
48
- # ?finish_reason_raw: String?
49
- # ) -> void
25
+ # String,
26
+ # ?id: String?,
27
+ # ?tool_calls: Array[Riffer::Messages::Assistant::ToolCall],
28
+ # ?reasoning: Array[Riffer::Messages::Assistant::ReasoningPart],
29
+ # ?token_usage: Riffer::Providers::TokenUsage?,
30
+ # ?structured_output: Hash[Symbol, untyped]?,
31
+ # ?finish_reason: Symbol?,
32
+ # ?finish_reason_raw: String?
33
+ # ) -> void
50
34
  def initialize: (String, ?id: String?, ?tool_calls: Array[Riffer::Messages::Assistant::ToolCall], ?reasoning: Array[Riffer::Messages::Assistant::ReasoningPart], ?token_usage: Riffer::Providers::TokenUsage?, ?structured_output: Hash[Symbol, untyped]?, ?finish_reason: Symbol?, ?finish_reason_raw: String?) -> void
51
35
 
52
36
  # --
@@ -65,8 +49,6 @@ class Riffer::Messages::Assistant < Riffer::Messages::Base
65
49
  # : () -> bool
66
50
  def reasoning?: () -> bool
67
51
 
68
- # The readable reasoning across this message's +:text+ and +:summary+ parts,
69
- # joined by blank lines, or nil when it carries none.
70
52
  # --
71
53
  # : () -> String?
72
54
  def reasoning_text: () -> String?
@@ -75,8 +57,6 @@ class Riffer::Messages::Assistant < Riffer::Messages::Base
75
57
  # : (Riffer::Messages::Assistant) -> Riffer::Messages::Assistant
76
58
  def +: (Riffer::Messages::Assistant) -> Riffer::Messages::Assistant
77
59
 
78
- # Converts the message to a hash.
79
- #
80
60
  # --
81
61
  # : () -> Hash[Symbol, untyped]
82
62
  def to_h: () -> Hash[Symbol, untyped]