{"id":48084380,"url":"https://github.com/ichinya/quiverkeep-core","last_synced_at":"2026-04-04T15:06:23.580Z","repository":{"id":344567291,"uuid":"1182156447","full_name":"ichinya/quiverkeep-core","owner":"ichinya","description":"Core service and CLI for QuiverKeep.","archived":false,"fork":false,"pushed_at":"2026-03-15T14:16:37.000Z","size":67,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-15T22:19:27.821Z","etag":null,"topics":["ai-usage","api","cli","go","quiverkeep","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ichinya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-15T05:39:06.000Z","updated_at":"2026-03-15T14:15:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ichinya/quiverkeep-core","commit_stats":null,"previous_names":["ichinya/quiverkeep-core"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ichinya/quiverkeep-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichinya%2Fquiverkeep-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichinya%2Fquiverkeep-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichinya%2Fquiverkeep-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichinya%2Fquiverkeep-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ichinya","download_url":"https://codeload.github.com/ichinya/quiverkeep-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichinya%2Fquiverkeep-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-usage","api","cli","go","quiverkeep","sqlite"],"created_at":"2026-04-04T15:06:23.521Z","updated_at":"2026-04-04T15:06:23.574Z","avatar_url":"https://github.com/ichinya.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# quiverkeep-core\n\n\u003e Core service and CLI for QuiverKeep.\n\n`quiverkeep-core` is the system of record for the product. This repository owns domain logic, configuration, storage,\nAPI contracts, and the Go CLI entrypoint.\n\n## Responsibilities\n\n- run the core server;\n- expose versioned contracts for clients;\n- own usage, limits, reset, and provider normalization logic;\n- manage storage and migrations;\n- provide CLI commands without duplicating business rules.\n\n## Boundaries\n\n- desktop and web clients consume contracts from core;\n- no UI repository may read storage directly;\n- business logic must not be duplicated outside core.\n\n## Status\n\nCore Base implementation is present and runnable.\n\n## Verified Snapshot (2026-03-15)\n\n- Go module and single binary entrypoint (`cmd/quiverkeep`).\n- Config loader with precedence `flags \u003e env \u003e file \u003e defaults`.\n- Canonical config path via OS config dir with legacy fallback to `~/.quiverkeep/config.json`.\n- SQLite storage (`modernc.org/sqlite`) with migration bootstrap and lock file.\n- HTTP API endpoints:\n    - `GET /api/v1/status`\n    - `GET /api/v1/usage`\n    - `GET /api/v1/limits`\n    - `GET /api/v1/subscriptions`\n    - `GET /api/v1/providers`\n    - `POST /api/v1/proxy/anthropic/messages`\n    - `GET /api/v1/proxy/status`\n- Thin CLI commands:\n    - `serve`, `status`, `usage`, `limits`, `proxy status`, `config show`, `config path`, `doctor`, `version`\n- Structured logging with configurable `LOG_LEVEL` and JSON output.\n- Contract/integration/perf/security tests (`go test ./...`).\n\n## Quick Start\n\n```powershell\nSet-Location D:\\Projects\\aifhub\\quiverkeep\\quiverkeep-core\ngo test ./...\ngo run .\\cmd\\quiverkeep serve\n```\n\nIn another terminal:\n\n```powershell\nSet-Location D:\\Projects\\aifhub\\quiverkeep\\quiverkeep-core\ngo run .\\cmd\\quiverkeep status\ngo run .\\cmd\\quiverkeep usage --json\ngo run .\\cmd\\quiverkeep proxy status --json\ngo run .\\cmd\\quiverkeep doctor --json\n```\n\n## Proxy Mode (v0.2)\n\n- `POST /api/v1/proxy/anthropic/messages` forwards Anthropic Messages API payloads through core.\n- Upstream non-success and timeout outcomes are mapped to stable core errors (`PROXY_UPSTREAM_ERROR`, `PROXY_TIMEOUT`).\n- Proxy diagnostics are exposed through `GET /api/v1/proxy/status`.\n- Provider-spending proxy calls require core bearer auth even in loopback mode.\n\n## Logging Policy\n\n- Structured logs only (JSON).\n- Required keys in operational flows: `component`, `operation`, `request_id`, `duration_ms`, `error_code` when\n  applicable.\n- Proxy operations must include: `provider`, `operation=proxy_forward|proxy_usage|proxy_status`, `retry_decision`,\n  and upstream `status` where applicable.\n- Levels:\n    - `DEBUG` for detailed flow and override resolution.\n    - `INFO` for lifecycle and successful operations.\n    - `WARN` for recoverable issues (auth mismatch, fallback, stale lock).\n    - `ERROR` for failed operations and exits.\n- Control:\n    - `QUIVERKEEP_LOG_LEVEL` (or `--log-level`) controls verbosity.\n    - Optional file sink via config `logging.path`.\n\n## Troubleshooting\n\n- `PORT_IN_USE`: run `quiverkeep serve --port 9000`.\n- `STORAGE_LOCK_ERROR`: check whether another core instance is active; stale lock is auto-cleaned.\n- `UNAUTHORIZED`: verify `QUIVERKEEP_TOKEN` / `Authorization: Bearer ...` policy for remote mode.\n- `PROXY_DISABLED` / `PROXY_NOT_CONFIGURED`: enable proxy mode and set `ANTHROPIC_API_KEY`.\n- `PROXY_UPSTREAM_ERROR` / `PROXY_TIMEOUT`: inspect proxy logs and `/api/v1/proxy/status` diagnostics.\n\n## Quality Gates\n\nRequired completion gates for this repository:\n\n```powershell\ngo test ./...\ngo build ./cmd/quiverkeep\ngo vet ./...\n```\n\nLint target is not defined yet in this repository (`Makefile` / `Taskfile` is absent), so lint checks are currently\ndocumented as pending automation.\n\n## Repository Boundary Runbook\n\n`quiverkeep-core` is an independent repository. Implementation and commits for core tasks must be done in this\nrepository branch, not in workspace root.\n\n1. Open `quiverkeep-core`\n2. Verify branch: `codex/feat/core-base-runtime`\n3. Run build/test commands from this repository only\n4. Commit in `quiverkeep-core` repository lifecycle\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fichinya%2Fquiverkeep-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fichinya%2Fquiverkeep-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fichinya%2Fquiverkeep-core/lists"}