Add persistent storage for agent allowance quotas using go-store (SQLite KV). SQLiteStore implements all 11 AllowanceStore methods with JSON serialisation, mutex-guarded read-modify-write for atomic increments, and proper time.Duration handling via nanosecond int64 encoding. - allowance_sqlite.go: full AllowanceStore implementation with 4 KV groups - allowance_sqlite_test.go: 26 tests covering CRUD, persistence across close/reopen, concurrent access (10 goroutines), and AllowanceService integration - config.go: AllowanceConfig struct + NewAllowanceStoreFromConfig factory - go.mod: add forge.lthn.ai/core/go-store dependency Co-Authored-By: Virgil <virgil@lethean.io> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
1 KiB
Modula-2
31 lines
1 KiB
Modula-2
module forge.lthn.ai/core/go-agentic
|
|
|
|
go 1.25.5
|
|
|
|
require (
|
|
forge.lthn.ai/core/go v0.0.0
|
|
forge.lthn.ai/core/go-store v0.0.0-00010101000000-000000000000
|
|
github.com/stretchr/testify v1.11.1
|
|
gopkg.in/yaml.v3 v3.0.1
|
|
)
|
|
|
|
require (
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/kr/pretty v0.3.1 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/ncruces/go-strftime v1.0.0 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect
|
|
golang.org/x/sys v0.41.0 // indirect
|
|
modernc.org/libc v1.67.7 // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.11.0 // indirect
|
|
modernc.org/sqlite v1.46.1 // indirect
|
|
)
|
|
|
|
replace forge.lthn.ai/core/go => ../go
|
|
|
|
replace forge.lthn.ai/core/go-store => ../go-store
|