brute 2.0.5 → 2.0.6
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/lib/brute/session.rb +12 -13
- data/lib/brute/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ca9915157a21335990328dcbf4b6104cffa72bd0835e93055ec46e8be05aee7
|
|
4
|
+
data.tar.gz: 6e7ef36a7fd32e0351563856d888f832fb4d48fad32444f937fb58c2d45baa4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff22892e28c30deb694b7bbea899e8b14ceb31e068fa74b27b9b462d7778ab52da06f332f743ac6c19324bf962d7ee1401e8146f1714496fc1dcba5179f6e551
|
|
7
|
+
data.tar.gz: 457fbacd0115628b002c6b274ef7c07d47a267c4841107c52c4d983d23a0967012ca68a084b50f833d5421ff013766c2aef07be5e465d8630ca61cc9c06326f5
|
data/lib/brute/session.rb
CHANGED
|
@@ -10,24 +10,23 @@ module Brute
|
|
|
10
10
|
def initialize(path: nil)
|
|
11
11
|
super()
|
|
12
12
|
@path = path
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if File.exist?(path)
|
|
21
|
-
File.foreach(path).map(&:strip).each do |line|
|
|
22
|
-
if line.present?
|
|
23
|
-
# Use push to bypass append persistence (avoids re-writing existing lines)
|
|
24
|
-
session.push(RubyLLM::Message.new(**JSON.parse(line, symbolize_names: true)))
|
|
25
|
-
end
|
|
13
|
+
if @path
|
|
14
|
+
FileUtils.mkdir_p(File.dirname(@path))
|
|
15
|
+
if File.exist?(@path)
|
|
16
|
+
File.foreach(@path) do |line|
|
|
17
|
+
line.strip!
|
|
18
|
+
# Use push to bypass append persistence (avoids re-writing existing lines)
|
|
19
|
+
push(RubyLLM::Message.new(**JSON.parse(line, symbolize_names: true))) if line.present?
|
|
26
20
|
end
|
|
27
21
|
end
|
|
28
22
|
end
|
|
29
23
|
end
|
|
30
24
|
|
|
25
|
+
# @deprecated Use Session.new(path:) instead.
|
|
26
|
+
def self.from_jsonl(path)
|
|
27
|
+
new(path: path)
|
|
28
|
+
end
|
|
29
|
+
|
|
31
30
|
# Append a message and persist it to disk if a path is set.
|
|
32
31
|
def <<(msg)
|
|
33
32
|
super
|
data/lib/brute/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: brute
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brute Contributors
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 1980-01-
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: async
|
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
276
276
|
- !ruby/object:Gem::Version
|
|
277
277
|
version: '0'
|
|
278
278
|
requirements: []
|
|
279
|
-
rubygems_version:
|
|
279
|
+
rubygems_version: 4.0.6
|
|
280
280
|
specification_version: 4
|
|
281
281
|
summary: A coding agent built on ruby_llm
|
|
282
282
|
test_files: []
|