cline-rb 2.0.0 → 2.1.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: ddeedc9fb1f4b8b7eec25510769a011cdd00bd2b4dd29061a15011591fea8f27
4
- data.tar.gz: 6c5ffa5afd84be8f08b24c865ec6fb44f87491323c415add15c63f5a69c5006c
3
+ metadata.gz: a01259d29dbebf9ef8f098c9d86f4542719c9e7721ba6f8a31458ace1748216c
4
+ data.tar.gz: 55905c7acc0e83133241e54d68242d5a2a59a9aa212885eea06c485094a66c57
5
5
  SHA512:
6
- metadata.gz: 95eb7157036da75b54ff00396a2d8a36e5743350be968cf5fe6b65c2fe6d6f61bfa75b6456e833a57a8c96940cb5456f3693d86f92445606aea2fe3eb9c25bde
7
- data.tar.gz: da15c8868c9cf6d53e08c2559e75b5520d2cecd39be1c6fe99f74cf2ab23e50eca62f63fdd962b5ff27503aba764fb4ac7cb8c51189ca3bfac92e0455c38a580
6
+ metadata.gz: 7471d4867c48f307b11fe7218db73ff8e1cdd61e1510a18db21bc2aedfe4fcb55f5632971d9ecc5b86c2b6426fd506488c9255e6abcb7b977deff584ddf39f23
7
+ data.tar.gz: fe6f2921cfa9128d7aafb96d1f3c82ef06dde9eba649097d174bc41e93911dcd0910e3b5c95f35c27a7b0e5da4468193b237510b5ba2e8b34feff93226226541
data/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # [v2.1.1](https://github.com/Muriel-Salvan/cline-rb/compare/v2.1.0...v2.1.1) (2026-10-28 09:57:49)
2
+
3
+ ## Global changes
4
+ ### Patches
5
+
6
+ * [fix(cline): refresh log cache after block-based monitoring](https://github.com/Muriel-Salvan/cline-rb/commit/bd3d05bbf783a8ccefd70e38d24f2204ddacfa7e)
7
+
8
+ ## Changes for cline
9
+ ### Patches
10
+
11
+ * [fix(cline): refresh log cache after block-based monitoring](https://github.com/Muriel-Salvan/cline-rb/commit/bd3d05bbf783a8ccefd70e38d24f2204ddacfa7e)
12
+
13
+ # [v2.1.0](https://github.com/Muriel-Salvan/cline-rb/compare/v2.0.0...v2.1.0) (2026-10-27 11:46:14)
14
+
15
+ ## Global changes
16
+ ### Patches
17
+
18
+ * [feat(cline): add telemetry attributes to session and error logs](https://github.com/Muriel-Salvan/cline-rb/commit/efe3f555c42aebca33f6d039671c03f6774a0f67)
19
+
20
+ ## Changes for cline
21
+ ### Features
22
+
23
+ * [feat(cline): add telemetry attributes to session and error logs](https://github.com/Muriel-Salvan/cline-rb/commit/efe3f555c42aebca33f6d039671c03f6774a0f67)
24
+
1
25
  # [v2.0.0](https://github.com/Muriel-Salvan/cline-rb/compare/v1.1.4...v2.0.0) (2026-10-22 13:28:57)
2
26
 
3
27
  ## Global changes
data/lib/cline/log.rb CHANGED
@@ -222,6 +222,81 @@ module Cline
222
222
  # @return [String, nil] Whether the session was restored from persistence
223
223
  attribute :restored_from_persistence, :boolean
224
224
 
225
+ # @return [String, nil] User identifier
226
+ attribute :user_id, :string
227
+
228
+ # @return [String, nil] Account identifier
229
+ attribute :account_id, :string
230
+
231
+ # @return [String, nil] Account email
232
+ attribute :account_email, :string
233
+
234
+ # @return [String, nil] Session origin (e.g. "user", "cli")
235
+ attribute :session_origin, :string
236
+
237
+ # @return [String, nil] Device identifier
238
+ attribute :device_id, :string
239
+
240
+ # @return [Integer, nil] Reasoning token count
241
+ attribute :reasoning_token_count, :integer
242
+
243
+ # @return [String, nil] Model request identifier
244
+ attribute :model_request_id, :string
245
+
246
+ # @return [Integer, nil] Run count
247
+ attribute :run_count, :integer
248
+
249
+ # @return [String, nil] Outcome (e.g. "head_clean", "aborted")
250
+ attribute :outcome, :string
251
+
252
+ # @return [String, nil] Phase of a provider request (e.g. "provider_request_started", "first_chunk_received")
253
+ attribute :phase, :string
254
+
255
+ # @return [String, nil] Skill name used
256
+ attribute :skill_name, :string
257
+
258
+ # @return [String, nil] Skill source (e.g. "project", "global")
259
+ attribute :skill_source, :string
260
+
261
+ # @return [Integer, nil] Number of skills available globally
262
+ attribute :skills_available_global, :integer
263
+
264
+ # @return [Integer, nil] Number of skills available for the project
265
+ attribute :skills_available_project, :integer
266
+
267
+ # @return [String, nil] Compaction strategy (e.g. "agentic")
268
+ attribute :strategy, :string
269
+
270
+ # @return [Integer, nil] Mode of the compaction (e.g. "auto")
271
+ attribute :mode, :string
272
+
273
+ # @return [Integer, nil] Number of messages before compaction
274
+ attribute :messages_before, :integer
275
+
276
+ # @return [Integer, nil] Number of messages after compaction
277
+ attribute :messages_after, :integer
278
+
279
+ # @return [Integer, nil] Number of messages removed during compaction
280
+ attribute :messages_removed, :integer
281
+
282
+ # @return [Integer, nil] Number of tokens before compaction
283
+ attribute :tokens_before, :integer
284
+
285
+ # @return [Integer, nil] Number of tokens after compaction
286
+ attribute :tokens_after, :integer
287
+
288
+ # @return [Integer, nil] Number of tokens saved by compaction
289
+ attribute :tokens_saved, :integer
290
+
291
+ # @return [Float, nil] Trigger tokens for compaction
292
+ attribute :trigger_tokens, :float
293
+
294
+ # @return [Float, nil] Maximum input tokens
295
+ attribute :max_input_tokens, :float
296
+
297
+ # @return [Float, nil] Threshold ratio for compaction trigger
298
+ attribute :threshold_ratio, :float
299
+
225
300
  # All attributes are already snake case
226
301
  cline_snake_attributes(*attributes.keys)
227
302
  end
@@ -282,6 +357,24 @@ module Cline
282
357
  # @return [String, nil] Provider identifier (e.g. "cline")
283
358
  attribute :provider_id, :string
284
359
 
360
+ # @return [String, nil] Run identifier
361
+ attribute :run_id, :string
362
+
363
+ # @return [String, nil] Status (e.g. "aborted", "completed")
364
+ attribute :status, :string
365
+
366
+ # @return [Integer, nil] Iteration number
367
+ attribute :iteration, :integer
368
+
369
+ # @return [String, nil] Error class name
370
+ attribute :error_name, :string
371
+
372
+ # @return [String, nil] Human-readable error message
373
+ attribute :error_message, :string
374
+
375
+ # @return [Integer, nil] Number of assistant content parts
376
+ attribute :assistant_content_part_count, :integer
377
+
285
378
  # @return [Error, nil] Error details for error logs
286
379
  attribute :err, Error
287
380
  end
data/lib/cline/logs.rb CHANGED
@@ -62,7 +62,7 @@ module Cline
62
62
  def monitor(on_log:, from: nil, monitoring_interval_secs: 1, &)
63
63
  # Keep the last log line that we have read
64
64
  last_log = from
65
- Logs.monitor_file_changes(
65
+ monitor = Logs.monitor_file_changes(
66
66
  file,
67
67
  on_change: proc do |_mtime|
68
68
  refresh!
@@ -78,6 +78,12 @@ module Cline
78
78
  monitoring_interval_secs:,
79
79
  &
80
80
  )
81
+ # When monitoring is driven by a block, FileMonitor#start has already
82
+ # called #stop at the end of the block's execution. Invalidate the
83
+ # in-memory cache so that the next call to #logs reads from disk instead
84
+ # of a stale snapshot frozen during monitoring.
85
+ refresh! if block_given?
86
+ monitor
81
87
  end
82
88
 
83
89
  # Clear the cache in case the log file has changed
data/lib/cline/version.rb CHANGED
@@ -2,5 +2,5 @@ module Cline
2
2
  # @!group Public API
3
3
 
4
4
  # Gem version
5
- VERSION = '2.0.0'
5
+ VERSION = '2.1.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cline-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan