lex-llm-ledger 0.1.7 → 0.1.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65d2298886cd461ff9a4a5cfb89ee0b9d16f8cb3af3e5f38a8a6a8910094a14f
|
|
4
|
+
data.tar.gz: 74e394c3972fbc45153e898b8ead76c24cf185dcb677f48b032150894b0b4fe2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 481103355373158a86cbc6b7b98ee59c6f78bdbee0ca9c1bb67a990675c7389d743fc2ce9b596965688825e1259a8257e06d5b47c2b0edf2623dafd063197c50
|
|
7
|
+
data.tar.gz: 5e94a8155fe3c6ce2a15bf3ac3a1e8c235d48d9d9d198e6fef07e89f43b4e10342387ab153d977efcc88743f87566f92a932555b29c5c790059b099baaa06141
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.9] - 2026-04-09
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- SpoolFlush runner_function points to `spool_flush` (zero-arg) instead of `write_metering_record` (requires payload)
|
|
7
|
+
- Add `Runners::Metering.spool_flush` method that the framework can call on Every actor ticks
|
|
8
|
+
|
|
9
|
+
## [0.1.8] - 2026-04-09
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- SpoolFlush actor adds runner_class/runner_function to satisfy framework base actor const_get resolution
|
|
13
|
+
|
|
3
14
|
## [0.1.7] - 2026-04-09
|
|
4
15
|
|
|
5
16
|
### Changed
|
|
@@ -6,6 +6,14 @@ module Legion
|
|
|
6
6
|
module Ledger
|
|
7
7
|
module Actor
|
|
8
8
|
class SpoolFlush < Legion::Extensions::Actors::Every # rubocop:disable Legion/Extension/EveryActorRequiresTime
|
|
9
|
+
def runner_class
|
|
10
|
+
'Legion::Extensions::Llm::Ledger::Runners::Metering'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def runner_function
|
|
14
|
+
'spool_flush'
|
|
15
|
+
end
|
|
16
|
+
|
|
9
17
|
def time
|
|
10
18
|
60
|
|
11
19
|
end
|
|
@@ -8,6 +8,17 @@ module Legion
|
|
|
8
8
|
module Metering
|
|
9
9
|
extend self
|
|
10
10
|
|
|
11
|
+
def spool_flush
|
|
12
|
+
return unless defined?(Legion::LLM::Metering) &&
|
|
13
|
+
Legion::LLM::Metering.respond_to?(:flush_spool)
|
|
14
|
+
|
|
15
|
+
Legion::LLM::Metering.flush_spool
|
|
16
|
+
{ result: :ok }
|
|
17
|
+
rescue StandardError => e
|
|
18
|
+
Legion::Logging.warn("[lex-llm-ledger] spool_flush failed: #{e.message}") # rubocop:disable Legion/HelperMigration/DirectLogging
|
|
19
|
+
{ result: :error, error: e.message }
|
|
20
|
+
end
|
|
21
|
+
|
|
11
22
|
def write_metering_record(payload, metadata = {})
|
|
12
23
|
ctx = payload[:message_context] || {}
|
|
13
24
|
props = metadata[:properties] || {}
|