cline-rb 2.1.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a01259d29dbebf9ef8f098c9d86f4542719c9e7721ba6f8a31458ace1748216c
4
- data.tar.gz: 55905c7acc0e83133241e54d68242d5a2a59a9aa212885eea06c485094a66c57
3
+ metadata.gz: 8d691efd743f7f5ed4826457a94e44d087daebb4545afad5b17b775b0fa86419
4
+ data.tar.gz: 49c1abc4ee95dced54956e00f30b75dc1886cf8a1e3ec35f18ff488b8972e6c1
5
5
  SHA512:
6
- metadata.gz: 7471d4867c48f307b11fe7218db73ff8e1cdd61e1510a18db21bc2aedfe4fcb55f5632971d9ecc5b86c2b6426fd506488c9255e6abcb7b977deff584ddf39f23
7
- data.tar.gz: fe6f2921cfa9128d7aafb96d1f3c82ef06dde9eba649097d174bc41e93911dcd0910e3b5c95f35c27a7b0e5da4468193b237510b5ba2e8b34feff93226226541
6
+ metadata.gz: bec4f499ba41f796dd1e1e9f6292811854da30e9a7f8ebcf2fa9f8a87273a85908956f02ba41aba3fd9402f810c90234085690a1f7df4c46f54d8b9c7733fcf3
7
+ data.tar.gz: 7896bbb8e74e4efde6ea41a725df53f0e83909a2f3f7845ea86674905b43101c75452a4a78f2b2cac7ce020a4bf14f3528078fea02abda2009ea6e00523d96c3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
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
+
1
13
  # [v2.1.1](https://github.com/Muriel-Salvan/cline-rb/compare/v2.1.0...v2.1.1) (2026-10-28 09:57:49)
2
14
 
3
15
  ## 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 exceptioon will be raised.
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.
@@ -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
@@ -2,5 +2,5 @@ module Cline
2
2
  # @!group Public API
3
3
 
4
4
  # Gem version
5
- VERSION = '2.1.1'
5
+ VERSION = '2.2.0'
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.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan