cline-rb 2.1.0 → 2.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/lib/cline/cli.rb +1 -1
- data/lib/cline/logs.rb +7 -1
- data/lib/cline/session_message.rb +28 -0
- data/lib/cline/session_messages.rb +26 -0
- data/lib/cline/version.rb +1 -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: 8d691efd743f7f5ed4826457a94e44d087daebb4545afad5b17b775b0fa86419
|
|
4
|
+
data.tar.gz: 49c1abc4ee95dced54956e00f30b75dc1886cf8a1e3ec35f18ff488b8972e6c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bec4f499ba41f796dd1e1e9f6292811854da30e9a7f8ebcf2fa9f8a87273a85908956f02ba41aba3fd9402f810c90234085690a1f7df4c46f54d8b9c7733fcf3
|
|
7
|
+
data.tar.gz: 7896bbb8e74e4efde6ea41a725df53f0e83909a2f3f7845ea86674905b43101c75452a4a78f2b2cac7ce020a4bf14f3528078fea02abda2009ea6e00523d96c3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# [v2.2.0](https://github.com/Muriel-Salvan/cline-rb/compare/v2.1.1...v2.2.0) (2026-11-03 16:44:07)
|
|
2
|
+
|
|
3
|
+
## Global changes
|
|
4
|
+
### Patches
|
|
5
|
+
|
|
6
|
+
* [feat(session-message): add tool input attributes and origin metadata](https://github.com/Muriel-Salvan/cline-rb/commit/b873024a5d85f1032f63af03742e713d84f0818f)
|
|
7
|
+
|
|
8
|
+
## Changes for session-message
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* [feat(session-message): add tool input attributes and origin metadata](https://github.com/Muriel-Salvan/cline-rb/commit/b873024a5d85f1032f63af03742e713d84f0818f)
|
|
12
|
+
|
|
13
|
+
# [v2.1.1](https://github.com/Muriel-Salvan/cline-rb/compare/v2.1.0...v2.1.1) (2026-10-28 09:57:49)
|
|
14
|
+
|
|
15
|
+
## Global changes
|
|
16
|
+
### Patches
|
|
17
|
+
|
|
18
|
+
* [fix(cline): refresh log cache after block-based monitoring](https://github.com/Muriel-Salvan/cline-rb/commit/bd3d05bbf783a8ccefd70e38d24f2204ddacfa7e)
|
|
19
|
+
|
|
20
|
+
## Changes for cline
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
* [fix(cline): refresh log cache after block-based monitoring](https://github.com/Muriel-Salvan/cline-rb/commit/bd3d05bbf783a8ccefd70e38d24f2204ddacfa7e)
|
|
24
|
+
|
|
1
25
|
# [v2.1.0](https://github.com/Muriel-Salvan/cline-rb/compare/v2.0.0...v2.1.0) (2026-10-27 11:46:14)
|
|
2
26
|
|
|
3
27
|
## Global changes
|
data/lib/cline/cli.rb
CHANGED
|
@@ -116,7 +116,7 @@ module Cline
|
|
|
116
116
|
# or nil if none (see Session#monitor_message)
|
|
117
117
|
# @param on_question [#call, nil] Callback called for each question that is asked by the assistant, or nil if none.
|
|
118
118
|
# This should be set if an interactive session is expected.
|
|
119
|
-
# If a question is asked without a callback to handle it, an UnexpectedInteractiveSessionError
|
|
119
|
+
# If a question is asked without a callback to handle it, an UnexpectedInteractiveSessionError exception will be raised.
|
|
120
120
|
# - Param question [SessionMessage::MessageContent::ToolUseInput] Question input with possible options
|
|
121
121
|
# (see SessionMessage::MessageContent::ToolUseInput).
|
|
122
122
|
# - Return [String] The answer that the user should provide to this assistant's question.
|
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
|
|
@@ -49,11 +49,36 @@ module Cline
|
|
|
49
49
|
class ToolUseInput < Schema
|
|
50
50
|
# @!group Public API
|
|
51
51
|
|
|
52
|
+
# A file to be read by the read_files tool
|
|
53
|
+
class FileInput < Schema
|
|
54
|
+
# @!group Public API
|
|
55
|
+
|
|
56
|
+
# @return [String] File path
|
|
57
|
+
attribute :path, :string
|
|
58
|
+
end
|
|
59
|
+
|
|
52
60
|
# @return [String] Question
|
|
53
61
|
attribute :question, :string
|
|
54
62
|
|
|
55
63
|
# @return [Array<String>] List of options for the given question
|
|
56
64
|
attribute :options, Utils::Schema.collection(:string)
|
|
65
|
+
|
|
66
|
+
# @return [String, nil] File path (for editor / read_files tools)
|
|
67
|
+
attribute :path, :string
|
|
68
|
+
|
|
69
|
+
# @return [String, nil] New file content (for editor tool)
|
|
70
|
+
attribute :new_text, :string
|
|
71
|
+
|
|
72
|
+
# @return [String, nil] Old file content (for editor tool)
|
|
73
|
+
attribute :old_text, :string
|
|
74
|
+
|
|
75
|
+
# @return [String, nil] Shell commands to run (for run_commands tool)
|
|
76
|
+
attribute :commands, :string
|
|
77
|
+
|
|
78
|
+
# @return [Array<FileInput>, nil] Files to read (for read_files tool)
|
|
79
|
+
attribute :files, Utils::Schema.collection(FileInput)
|
|
80
|
+
|
|
81
|
+
cline_snake_attributes :new_text, :old_text
|
|
57
82
|
end
|
|
58
83
|
|
|
59
84
|
# @return [String] Content block type (text, tool_use, tool_result)
|
|
@@ -62,6 +87,9 @@ module Cline
|
|
|
62
87
|
# @return [String, nil] Text content (for type "text")
|
|
63
88
|
attribute :text, :string
|
|
64
89
|
|
|
90
|
+
# @return [String, nil] Thinking content (for type "thinking")
|
|
91
|
+
attribute :thinking, :string
|
|
92
|
+
|
|
65
93
|
# @return [String, nil] Tool use identifier (for type "tool_use")
|
|
66
94
|
attribute :id, :string
|
|
67
95
|
|
|
@@ -7,6 +7,23 @@ module Cline
|
|
|
7
7
|
|
|
8
8
|
# @!group Public API
|
|
9
9
|
|
|
10
|
+
# Origin of the messages (from where they were generated)
|
|
11
|
+
class Origin < Schema
|
|
12
|
+
# @!group Public API
|
|
13
|
+
|
|
14
|
+
# @return [String] Source of the messages (cli or api)
|
|
15
|
+
attribute :source, :string
|
|
16
|
+
|
|
17
|
+
# @return [String] Interaction mode (user or auto)
|
|
18
|
+
attribute :mode, :string
|
|
19
|
+
|
|
20
|
+
# @return [String] Origin session ID
|
|
21
|
+
attribute :session_id, :string
|
|
22
|
+
|
|
23
|
+
# @return [String] Version of the origin source
|
|
24
|
+
attribute :version, :string
|
|
25
|
+
end
|
|
26
|
+
|
|
10
27
|
Serializable::ClineData.include_for(self, proc { |base_dir| "#{File.basename(base_dir)}.messages.json" })
|
|
11
28
|
|
|
12
29
|
# @return [Integer] Schema version
|
|
@@ -21,6 +38,15 @@ module Cline
|
|
|
21
38
|
# @return [String] Session ID
|
|
22
39
|
attribute :session_id, :string
|
|
23
40
|
|
|
41
|
+
# @return [String, nil] Source of the messages (cli or api)
|
|
42
|
+
attribute :source, :string
|
|
43
|
+
|
|
44
|
+
# @return [String, nil] Interaction mode (user or auto)
|
|
45
|
+
attribute :mode, :string
|
|
46
|
+
|
|
47
|
+
# @return [Origin, nil] Origin of the messages
|
|
48
|
+
attribute :origin, Origin
|
|
49
|
+
|
|
24
50
|
# @return [Array<SessionMessage>] Messages of this session
|
|
25
51
|
attribute :messages, Utils::Schema.collection(SessionMessage)
|
|
26
52
|
|
data/lib/cline/version.rb
CHANGED