legionio 1.9.1 → 1.9.3

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: 45c36457fa18952ae68b86d8b1d230a5166bdf119338ce9c9e23791b413f822b
4
- data.tar.gz: 380124a7e0321717dc18751d5de61bf83b2cd255d50efa5cf07a920c7d115f5a
3
+ metadata.gz: 0c184a34aab52a0fc1efa955381cc6a4fc0044cbdc4b2781169e4d8708d2be92
4
+ data.tar.gz: 50d1fd3ba6a2360e1d07fb6a6c028d7a667748ac9ff6b62f85badb5c2726d393
5
5
  SHA512:
6
- metadata.gz: 4bbc31826f903cbc0753fb79ed0745b1322d0acc86009a7b88586cd7ca4f520bc5e97d81f7c777bb7ba72be89d7d894565403cc413eda5b6934eadf35161f1b3
7
- data.tar.gz: b546b6d4bd2f78e5a5d87c4acc253c1d849bd59adbd45af28781f16ab56c1895c389145576bf9ddae0af14b0907e32a4ee560817c34d2b2a83d11ab1a05bb10a
6
+ metadata.gz: 9d708aeeb13ea3107e7ff0002072e460c33d742c1a3883929d45db889e2198d6de9ed1c71bbfcb7b0ab2322a4875f6a4cbdb3026d59ae64ca3d3bb71af529a83
7
+ data.tar.gz: e87eda562703def914551720779496733a10387e9355d73547f904785c7907170ca0d8f25c2a794c600fb94458f75bc4d1c8662a6331640e9b2ca2805b5a707d
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  Gemfile.lock
4
+ *.gem
4
5
  /_yardoc/
5
6
  /coverage/
6
7
  /doc/
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.9.3] - 2026-04-27
6
+
7
+ ### Fixed
8
+ - Extension catalog persistence now skips no-op startup updates when the stored state already matches, reducing local SQLite write churn. Fixes #176
9
+
10
+ ## [1.9.2] - 2026-04-27
11
+
12
+ ### Fixed
13
+ - `POST /api/knowledge/status` no longer silently defaults to the daemon's cwd. Uses `knowledge.default_corpus_path` setting or `LEGION_CORPUS_PATH` env var; returns 400 when unresolvable. Prevents `Errno::EPERM` crashes on macOS when the daemon is launched from `~` and `Find.find` walks into TCC-protected subdirs like `~/Library/Accounts`.
14
+
5
15
  ## [1.9.1] - 2026-04-25
6
16
 
7
17
  ### Added
@@ -67,7 +67,15 @@ module Legion
67
67
  app.post '/api/knowledge/status' do
68
68
  require_knowledge_ingest!
69
69
  body = parse_request_body
70
- path = body[:path] || Dir.pwd
70
+ path = body[:path] ||
71
+ Legion::Settings.dig(:knowledge, :default_corpus_path) ||
72
+ ENV.fetch('LEGION_CORPUS_PATH', nil)
73
+
74
+ if path.nil? || path.to_s.empty?
75
+ halt 400, json_error('missing_param',
76
+ 'path is required (no knowledge.default_corpus_path configured)')
77
+ end
78
+
71
79
  result = Legion::Extensions::Knowledge::Runners::Ingest.scan_corpus(path: path)
72
80
  json_response(result)
73
81
  end
@@ -85,6 +85,8 @@ module Legion
85
85
  pending.each do |lex_name, new_state|
86
86
  existing = model.where(lex_name: lex_name).first
87
87
  if existing
88
+ next if existing.respond_to?(:state) && existing.state == new_state.to_s
89
+
88
90
  existing.update(state: new_state.to_s, updated_at: now)
89
91
  else
90
92
  model.insert(lex_name: lex_name, state: new_state.to_s, created_at: now, updated_at: now)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legion
4
- VERSION = '1.9.1'
4
+ VERSION = '1.9.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legionio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity