Add iter.Seq iterators for AgentRegistry (AllSeq) and AllowanceStore
(ListSeq) across all backends (sqlite, redis). Use slices.SortFunc,
slices.Contains, maps.Keys in dispatcher and router.
Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
Uses reusable workflows from core/go-devops for Go testing
(with race detector and coverage) and security scanning
(govulncheck, gitleaks, trivy).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update imports from forge.lthn.ai/core/go/pkg/cli to
forge.lthn.ai/core/cli/pkg/cli following CLI package split.
Co-Authored-By: Virgil <virgil@lethean.io>
Go 1.26 rejects non-semver version strings (like 'main') in go.mod.
Tags v0.0.1 now exist on all forge repos — workspace still overrides
for local development.
Co-Authored-By: Virgil <virgil@lethean.io>
Forge module versions now use main branch resolution via ~/Code/go.work
workspace. Removes local replace directives — the central go.work handles
all cross-repo resolution during development.
Co-Authored-By: Virgil <virgil@lethean.io>
Commands now register through Core framework lifecycle via
cli.WithCommands() instead of side-channel init() functions.
Co-Authored-By: Virgil <virgil@lethean.io>
Replace internal task tracking (TODO.md, FINDINGS.md) with structured
documentation in docs/. Trim CLAUDE.md to agent instructions only.
Co-Authored-By: Virgil <virgil@lethean.io>
Allows consumers to signal the drain goroutine to stop by closing
the underlying channel. Used by CLI dispatch watch cleanup.
Co-Authored-By: Charon <charon@lethean.io>
EventEmitter interface with ChannelEmitter (buffered, non-blocking) and
MultiEmitter (fan-out). Wired into Dispatcher (5 event types) and
AllowanceService (3 event types). 20 new tests, all passing under -race.
Co-Authored-By: Charon <charon@lethean.io>
Sort pending tasks by priority (Critical > High > Medium > Low) with
oldest-first tie-breaking before dispatch. Add exponential backoff for
failed dispatches (5s, 10s, 20s...) and dead-letter tasks that exceed
MaxRetries (default 3) by marking them StatusFailed via UpdateTask.
New Task fields: MaxRetries, RetryCount, LastAttempt, FailReason.
New constant: StatusFailed.
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add SQLiteRegistry and RedisRegistry implementations of the AgentRegistry
interface, mirroring the AllowanceStore persistence pattern. SQLiteRegistry
uses modernc.org/sqlite directly with a proper agents table schema, WAL mode,
and UPSERT semantics. RedisRegistry uses go-redis/v9 with TTL-based natural
reaping and SCAN for listing. Add RegistryConfig struct and
NewAgentRegistryFromConfig factory function to config.go.
Full test parity with existing MemoryRegistry tests, including concurrent
access under -race, persistence round-trip, and skip-if-no-Redis pattern.
Co-Authored-By: Virgil <virgil@lethean.io>
- DefaultBaseURL was api.core-agentic.dev (nonexistent domain). Changed
to http://localhost:8080 for local dev. Set AGENTIC_BASE_URL for prod.
- HourlyRateLimit and CostCeiling on ModelQuota annotated as reserved:
stored but not enforced. Enforcement requires AllowanceStore interface
changes (sliding window) — deferred.
- Phase 6 marked complete in TODO.md.
Co-Authored-By: Virgil <virgil@lethean.io>
Tests were spawning real claude subprocess, causing 55s+ runtime and
failures on machines where claude is installed. Use PATH-prepended mock
script (exit 1) — same pattern as existing gh mocks. Suite now runs in
~5s.
Co-Authored-By: Charon <developers@lethean.io>
registerAgent hardcodes ConcurrentJobs: 5, but the concurrent test
launches 10 goroutines. Override with ConcurrentJobs: 0 (unlimited)
so all 10 dispatches succeed as intended.
Co-Authored-By: Charon <developers@lethean.io>
Implements RedisStore using github.com/redis/go-redis/v9 with Lua
scripts for atomic increment/decrement operations. Adds functional
options (WithRedisPassword, WithRedisDB, WithRedisPrefix), config
wiring via "redis" store_backend, and comprehensive tests covering
all 10 interface methods, concurrency, persistence, and error paths.
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>