Core service and CLI for QuiverKeep.
quiverkeep-core is the system of record for the product. This repository owns domain logic, configuration, storage,
API contracts, and the Go CLI entrypoint.
- run the core server;
- expose versioned contracts for clients;
- own usage, limits, reset, and provider normalization logic;
- manage storage and migrations;
- provide CLI commands without duplicating business rules.
- desktop and web clients consume contracts from core;
- no UI repository may read storage directly;
- business logic must not be duplicated outside core.
Core Base implementation is present and runnable.
- Go module and single binary entrypoint (
cmd/quiverkeep). - Config loader with precedence
flags > env > file > defaults. - Canonical config path via OS config dir with legacy fallback to
~/.quiverkeep/config.json. - SQLite storage (
modernc.org/sqlite) with migration bootstrap and lock file. - HTTP API endpoints:
GET /api/v1/statusGET /api/v1/usageGET /api/v1/limitsGET /api/v1/subscriptionsGET /api/v1/providersPOST /api/v1/proxy/anthropic/messagesGET /api/v1/proxy/status
- Thin CLI commands:
serve,status,usage,limits,proxy status,config show,config path,doctor,version
- Structured logging with configurable
LOG_LEVELand JSON output. - Contract/integration/perf/security tests (
go test ./...).
Set-Location D:\Projects\aifhub\quiverkeep\quiverkeep-core
go test ./...
go run .\cmd\quiverkeep serveIn another terminal:
Set-Location D:\Projects\aifhub\quiverkeep\quiverkeep-core
go run .\cmd\quiverkeep status
go run .\cmd\quiverkeep usage --json
go run .\cmd\quiverkeep proxy status --json
go run .\cmd\quiverkeep doctor --jsonPOST /api/v1/proxy/anthropic/messagesforwards Anthropic Messages API payloads through core.- Upstream non-success and timeout outcomes are mapped to stable core errors (
PROXY_UPSTREAM_ERROR,PROXY_TIMEOUT). - Proxy diagnostics are exposed through
GET /api/v1/proxy/status. - Provider-spending proxy calls require core bearer auth even in loopback mode.
- Structured logs only (JSON).
- Required keys in operational flows:
component,operation,request_id,duration_ms,error_codewhen applicable. - Proxy operations must include:
provider,operation=proxy_forward|proxy_usage|proxy_status,retry_decision, and upstreamstatuswhere applicable. - Levels:
DEBUGfor detailed flow and override resolution.INFOfor lifecycle and successful operations.WARNfor recoverable issues (auth mismatch, fallback, stale lock).ERRORfor failed operations and exits.
- Control:
QUIVERKEEP_LOG_LEVEL(or--log-level) controls verbosity.- Optional file sink via config
logging.path.
PORT_IN_USE: runquiverkeep serve --port 9000.STORAGE_LOCK_ERROR: check whether another core instance is active; stale lock is auto-cleaned.UNAUTHORIZED: verifyQUIVERKEEP_TOKEN/Authorization: Bearer ...policy for remote mode.PROXY_DISABLED/PROXY_NOT_CONFIGURED: enable proxy mode and setANTHROPIC_API_KEY.PROXY_UPSTREAM_ERROR/PROXY_TIMEOUT: inspect proxy logs and/api/v1/proxy/statusdiagnostics.
Required completion gates for this repository:
go test ./...
go build ./cmd/quiverkeep
go vet ./...Lint target is not defined yet in this repository (Makefile / Taskfile is absent), so lint checks are currently
documented as pending automation.
quiverkeep-core is an independent repository. Implementation and commits for core tasks must be done in this
repository branch, not in workspace root.
- Open
quiverkeep-core - Verify branch:
codex/feat/core-base-runtime - Run build/test commands from this repository only
- Commit in
quiverkeep-corerepository lifecycle