mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2026-02-04 05:00:32 -07:00
2.0 KiB
2.0 KiB
Integrations
Back to Docs Index | Index (HTML)
Purpose
Document external integrations used by Borealis, primarily the GitHub repository hash service.
GitHub Integration (Repository Hash)
- The Engine can query GitHub for the latest commit hash of a repository/branch.
- Results are cached locally to reduce API usage.
- Admins can store a GitHub API token via the WebUI.
API Endpoints
GET /api/github/token(Admin) - GitHub token status.POST /api/github/token(Admin) - update GitHub token.GET /api/repo/current_hash(Device or Token Authenticated) - current repo hash.
Related Documentation
Codex Agent (Detailed)
Integration implementation
Data/Engine/integrations/github.pyimplementsGitHubIntegration.- The integration uses:
- Cached results stored in
repo_hash_cache.json(under the Engine cache directory). - Token storage in the
github_tokenSQLite table.
- Cached results stored in
Defaults and overrides
- Default repo:
bunny-lab-io/Borealis. - Default branch:
main. - Environment overrides:
BOREALIS_REPOBOREALIS_REPO_BRANCH
- Cache TTL can be overridden via Engine config (
repo_hash_refresh).
Token management
- Admins manage tokens via
/api/github/token. - The token is stored in the Engine database (
github_tokentable). GitHubIntegration.verify_token()reports validity and rate-limit status.
GET /api/repo/current_hash
- This endpoint uses the cached GitHub integration to return a hash.
- It supports device-auth and operator-auth contexts.
- Useful for agent update checks and diagnostics.
Debug checklist
- Token missing: call
/api/github/tokenas Admin and confirmhas_token. - API rate limit errors: inspect the response payload for
rate_limitfields. - Cache stale: use the
force_refreshbehavior inGitHubIntegration(via config or code).