AI service lifecycle, allowance management, CLI task client
Find a file
Snider 3b9e0e7a4c
All checks were successful
Security Scan / security (push) Successful in 12s
Test / test (push) Successful in 9m53s
chore: bump forge.lthn.ai dep versions to latest tags
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 06:49:36 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:28:02 +00:00
cmd refactor: migrate CLI imports from core/go to core/cli 2026-02-22 23:29:39 +00:00
docs docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:02:20 +00:00
prompts feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
.golangci.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
allowance.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
allowance_edge_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
allowance_error_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
allowance_redis.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
allowance_redis_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
allowance_service.go feat(events): Phase 8 — event hooks for task lifecycle and quota notifications 2026-02-20 12:02:30 +00:00
allowance_sqlite.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
allowance_sqlite_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
allowance_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
CLAUDE.md docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:02:20 +00:00
client.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
client_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
completion.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
completion_git_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
completion_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
config.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
config_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
context.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
context_git_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
context_test.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
coverage_boost_test.go fix(test): mock claude binary in HandleTask tests 2026-02-20 11:28:03 +00:00
dispatcher.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
dispatcher_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
embed.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
embed_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
events.go feat(events): add Close() method to ChannelEmitter 2026-02-20 12:46:48 +00:00
events_integration_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
events_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
go.mod chore: bump forge.lthn.ai dep versions to latest tags 2026-02-23 06:49:36 +00:00
go.sum chore: bump forge.lthn.ai dep versions to latest tags 2026-02-23 06:49:36 +00:00
lifecycle_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
logs.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
logs_test.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
README.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
registry.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
registry_redis.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
registry_redis_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
registry_sqlite.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
registry_sqlite_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
registry_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00
router.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
router_test.go feat(coordination): add agent registry, task router, and dispatcher 2026-02-20 07:16:53 +00:00
service.go feat: extract go-agentic from go-ai as standalone service package 2026-02-19 18:28:36 +00:00
service_test.go test: achieve 85.6% coverage with 7 new test files 2026-02-20 00:59:58 +00:00
status.go feat: modernise to Go 1.26 iterators and stdlib helpers 2026-02-23 06:08:13 +00:00
status_test.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
submit.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
submit_test.go feat(cli): add status summary, task submission, and log streaming 2026-02-20 07:21:59 +00:00
Taskfile.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:30 +00:00
types.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:17 +00:00

Go Reference License: EUPL-1.2 Go Version

go-agentic

AI service lifecycle and task management library for the Lethean agent platform. Provides per-agent token quota enforcement with Memory, SQLite, and Redis backends; an agent registry with heartbeat and reap semantics; a priority-based task router and dispatch loop with exponential backoff and dead-lettering; context building from git history and source files; and a claude CLI subprocess runner for commit and prompt tasks. Integrates with the Core dependency injection framework as a named service.

Module: forge.lthn.ai/core/go-agentic Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import "forge.lthn.ai/core/go-agentic"

// Allowance enforcement
svc := agentic.NewAllowanceService(agentic.NewSQLiteStore("~/.config/agentic/allowance.db"))
if err := svc.Check(agentID, model); err != nil {
    // quota exceeded
}

// Dispatch loop
dispatcher := agentic.NewDispatcher(registry, router, svc, client)
go dispatcher.DispatchLoop(ctx, 60*time.Second)

Documentation

Build & Test

go test ./...
go test -race ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.