llmemory 0.2.8 → 0.2.9
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/llmemory/railtie.rb +9 -0
- data/lib/llmemory/version.rb +1 -1
- data/lib/llmemory.rb +1 -0
- data/lib/tasks/llmemory.rake +3 -1
- data/lib/tasks/release.rake +16 -6
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1758a40a096cf694812a669cb4c92ee6010954b68f733acf8d31083cd8ccaf21
|
|
4
|
+
data.tar.gz: 9f7c8a4d63c2f71325ef6dc5134fa5895655e1d2fadfe93b64ebbcc2e68224f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8ef12d0d2294ebc7eca0d1ad4760f92c288fb54c02c41ce88b88c16d8fd459d77364ab3f29388801daaaf4cf1c42d4e972dacfbda69c8433c13dc7ff4f4e5c0
|
|
7
|
+
data.tar.gz: 7b6bbe90b6b251f11cbc2692eb4f63d3dc57699dbadda16001d171b836a28fd4ac871e1e94742e81bd2b80efff890c13142934c7a210dee790331bad78ef1c37
|
data/lib/llmemory/version.rb
CHANGED
data/lib/llmemory.rb
CHANGED
data/lib/tasks/llmemory.rake
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
namespace :llmemory do
|
|
4
4
|
desc "Backfill search_tokens blind index (and name_det on skills) for encrypted keyword search. " \
|
|
5
5
|
"Env: FORCE=1 (re-backfill all rows), DRY_RUN=1 (count only), STORE=active_record|postgres"
|
|
6
|
-
|
|
6
|
+
task_deps = Rake::Task.task_defined?(:environment) ? [:environment] : []
|
|
7
|
+
|
|
8
|
+
task :backfill_search_tokens, [:user_id] => task_deps do |_t, args|
|
|
7
9
|
require "llmemory"
|
|
8
10
|
require_relative "../llmemory/maintenance/search_tokens_backfill"
|
|
9
11
|
|
data/lib/tasks/release.rake
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
module Release
|
|
4
4
|
RELEASE_FILES = %w[lib/llmemory/version.rb Gemfile.lock CHANGELOG.txt].freeze
|
|
5
5
|
DEFAULT_NOTES_PATH = File.expand_path("../../tmp/release_notes.txt", __dir__)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
module_function
|
|
8
|
+
|
|
9
|
+
def resolve_notes_path(arg)
|
|
8
10
|
path = arg.to_s.strip
|
|
9
11
|
path = DEFAULT_NOTES_PATH if path.empty?
|
|
10
12
|
File.expand_path(path)
|
|
11
13
|
end
|
|
12
14
|
|
|
13
|
-
def
|
|
15
|
+
def build_changelog_entry(version, date, notes_body)
|
|
14
16
|
body = notes_body.strip
|
|
15
17
|
body = body.sub(/\A#+\s*[^\n]*\n+/, "") # drop optional leading markdown title
|
|
16
18
|
|
|
@@ -22,6 +24,12 @@ namespace :release do
|
|
|
22
24
|
ENTRY
|
|
23
25
|
end
|
|
24
26
|
|
|
27
|
+
def allowed_dirty_path?(path, notes_path)
|
|
28
|
+
RELEASE_FILES.include?(path) || File.expand_path(path) == File.expand_path(notes_path)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
namespace :release do
|
|
25
33
|
desc "Show commits and diff stat since the last tag (helper before writing release notes)"
|
|
26
34
|
task :since_tag do
|
|
27
35
|
last_tag = `git describe --tags --abbrev=0 2>/dev/null`.strip
|
|
@@ -41,16 +49,17 @@ namespace :release do
|
|
|
41
49
|
current_branch = `git rev-parse --abbrev-ref HEAD`.strip
|
|
42
50
|
abort "Current branch must be main (got: #{current_branch})" unless current_branch == "main"
|
|
43
51
|
|
|
52
|
+
notes_path = Release.resolve_notes_path(args[:notes_file])
|
|
53
|
+
|
|
44
54
|
status_lines = `git status --porcelain --untracked-files=normal`.strip.lines
|
|
45
55
|
other_changes = status_lines.reject do |line|
|
|
46
56
|
path = line.sub(/\A..\s+/, "").strip.split(" -> ").last
|
|
47
|
-
|
|
57
|
+
Release.allowed_dirty_path?(path, notes_path)
|
|
48
58
|
end
|
|
49
59
|
unless other_changes.empty?
|
|
50
60
|
abort "Working tree has uncommitted changes outside release files. Commit or stash them first.\n#{other_changes.join}"
|
|
51
61
|
end
|
|
52
62
|
|
|
53
|
-
notes_path = Release.resolve_notes_path(args[:notes_file])
|
|
54
63
|
unless File.exist?(notes_path)
|
|
55
64
|
abort <<~MSG
|
|
56
65
|
Release notes file not found: #{notes_path}
|
|
@@ -123,7 +132,8 @@ namespace :release do
|
|
|
123
132
|
sh "git tag v#{new_version_s}"
|
|
124
133
|
sh "git push origin v#{new_version_s}"
|
|
125
134
|
|
|
126
|
-
|
|
135
|
+
default_notes = Release::DEFAULT_NOTES_PATH
|
|
136
|
+
File.delete(notes_path) if File.expand_path(notes_path) == File.expand_path(default_notes) && File.exist?(notes_path)
|
|
127
137
|
puts "\nDone. Released v#{new_version_s}"
|
|
128
138
|
end
|
|
129
139
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: llmemory
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- llmemory
|
|
@@ -246,6 +246,7 @@ files:
|
|
|
246
246
|
- lib/llmemory/memory_module.rb
|
|
247
247
|
- lib/llmemory/noise_filter.rb
|
|
248
248
|
- lib/llmemory/provenance.rb
|
|
249
|
+
- lib/llmemory/railtie.rb
|
|
249
250
|
- lib/llmemory/reflection.rb
|
|
250
251
|
- lib/llmemory/reflection/reflector.rb
|
|
251
252
|
- lib/llmemory/retrieval.rb
|