composable_agents 3.4.0 → 3.4.1

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: dafd767c4fb148d355237988c5b0e3d8a43a31710f234041e12bf12f1c3b4f44
4
- data.tar.gz: ef63857b75133852cc606daeab198d82d6fb67079fb051cdd2805e151e601ddd
3
+ metadata.gz: e8148fa849ff96e11a995eb6a0ad99f0b13d2628559b2beb45c2500e125c0318
4
+ data.tar.gz: fc1de0025450682dfbfe3088a75039af4497bb2575a0eda0dd31eca12d09582f
5
5
  SHA512:
6
- metadata.gz: 06ffc0718f7f653c7d75fe694ab2f38e4da7b48ef556f13bec3d7632cca3d929afcaeb3199ad9d9fd193cdce5ec8787095fc7a2efc2307e8745cd543c20a24a8
7
- data.tar.gz: 0e6d0c71a145d87c70230e65181cd5bb8f4c615c64c6fee7fe3ae5580792eeaf3f17da66919b8cfbd3896506aad3f89bc60ae6e78d11b987a087cffb02bb7658
6
+ metadata.gz: c393a9e128304acda10e20d6e644515858c78ae643239e7bb4b40a96fc57a6758d186aab5701625bad811fec747d99b528341172da0d9a73c4a1ea9e3773cfb1
7
+ data.tar.gz: 0c31274bc54daa0023577f73c784533403e20bcfe8babc197beeb7a1b43a61455bb3b7c0cb456821e41472457dab99d0cabc17a41de214a1d2f9d22897c77b1b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [v3.4.1](https://github.com/Muriel-Salvan/composable_agents/compare/v3.4.0...v3.4.1) (2026-11-03 17:18:14)
2
+
3
+ ### Patches
4
+
5
+ * [chore: update cline-rb to 2.2 and filter empty assistant messages](https://github.com/Muriel-Salvan/composable_agents/commit/7e166079df9bd949b86e7172dc06a4bc4f62d093)
6
+
1
7
  # [v3.4.0](https://github.com/Muriel-Salvan/composable_agents/compare/v3.3.1...v3.4.0) (2026-11-03 13:46:46)
2
8
 
3
9
  ### Features
@@ -170,32 +170,31 @@ module ComposableAgents
170
170
  if cline_cli.session&.messages
171
171
  @context.concat(
172
172
  cline_cli.session.messages.map.with_index do |message, idx_message|
173
- {
174
- role: message.role,
175
- content: message.content.map.with_index do |content, idx_content|
176
- {
177
- type: content.type,
178
- text: (
179
- if idx_message.zero? && idx_content.zero?
180
- # First message is the user prompt, but we don't want to include the context from it
181
- user_prompt
182
- else
183
- content.text
184
- end
185
- ),
186
- input:
187
- if content.input
188
- {
189
- question: content.input.question,
190
- # The options are a Shale collection that JSON can't serialize: keep them as a plain Array
191
- options: content.input.options&.to_a
192
- }.compact
193
- end,
194
- content: content.content
195
- }.compact
196
- end
197
- }
198
- end
173
+ curated_content = message.content.map.with_index do |content, idx_content|
174
+ curated_message = {
175
+ type: content.type,
176
+ text: (
177
+ if idx_message.zero? && idx_content.zero?
178
+ # First message is the user prompt, but we don't want to include the context from it
179
+ user_prompt
180
+ else
181
+ content.thinking || content.text
182
+ end
183
+ ),
184
+ input:
185
+ if content.input&.question
186
+ {
187
+ question: content.input.question,
188
+ # The options are a Shale collection that JSON can't serialize: keep them as a plain Array
189
+ options: content.input.options&.to_a
190
+ }.compact
191
+ end,
192
+ content: content.content
193
+ }.compact
194
+ curated_message.keys == [:type] ? nil : curated_message
195
+ end.compact
196
+ curated_content.empty? ? nil : { role: message.role, content: curated_content }
197
+ end.compact
199
198
  )
200
199
  end
201
200
 
@@ -211,13 +211,14 @@ module ComposableAgents
211
211
  # Track a message that is part of the conversation with this agent
212
212
  #
213
213
  # @param message [String, #to_hash, nil] The message content, as a String or an object that can be hashed, or nil if none.
214
+ # Nil attributes of the hashed message are not kept in the conversation.
214
215
  # @param author [String] Author of the message.
215
216
  # @param question [Boolean] Is this message a question expecting a reply?
216
217
  def track_message(message:, author: 'Orchestrator', question: false)
217
218
  @conversation << {
218
219
  at: Time.now.utc,
219
220
  author:,
220
- message: message.is_a?(String) ? message : message&.to_hash,
221
+ message: message.is_a?(String) ? message : message&.to_hash&.compact,
221
222
  question:
222
223
  }
223
224
  end
@@ -2,5 +2,5 @@ module ComposableAgents
2
2
  # @!group Public API
3
3
 
4
4
  # Gem version
5
- VERSION = '3.4.0'
5
+ VERSION = '3.4.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composable_agents
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '2.1'
32
+ version: '2.2'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '2.1'
39
+ version: '2.2'
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: commonmarker
42
42
  requirement: !ruby/object:Gem::Requirement