agent/docs/github-app-setup.md
Snider 90b03191b2 feat(agent): v0.2.0 — HTTP daemon, remote dispatch, review queue, verify+merge
Major additions:
- core-agent serve: persistent HTTP daemon with PID file, health check, registry
- agentic_dispatch_remote: dispatch tasks to remote agents (Charon) over MCP HTTP
- agentic_status_remote: check remote agent workspace status
- agentic_mirror: sync Forge repos to GitHub mirrors with file count limits
- agentic_review_queue: CodeRabbit/Codex review queue with rate-limit awareness
- verify.go: auto-verify (run tests) + auto-merge + retry with rebase + needs-review label
- monitor sync: checkin API integration for cross-agent repo sync
- PostToolUse inbox notification hook (check-notify.sh)

Dispatch improvements:
- --dangerously-skip-permissions (CLI flag changed)
- proc.CloseStdin() after spawn (Claude CLI stdin pipe fix)
- GOWORK=off in agent env and verify
- Exit code / BLOCKED.md / failure detection
- Monitor poke for instant notifications

New agent types:
- coderabbit: CodeRabbit CLI review (--plain --base)
- codex:review: OpenAI Codex review mode

Integrations:
- CODEX.md: OpenAI Codex conventions file
- Gemini extension: points at core-agent MCP (not Node server)
- Codex config: core-agent MCP server added
- GitHub webhook handler + CodeRabbit KPI tables (PHP)
- Forgejo provider for uptelligence webhooks
- Agent checkin endpoint for repo sync

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 17:45:04 +00:00

1.8 KiB

GitHub App Setup — dAppCore Agent

Create the App

Go to: https://github.com/organizations/dAppCore/settings/apps/new

Basic Info

  • App name: core-agent
  • Homepage URL: https://core.help
  • Description: Automated code sync, review, and CI/CD for the Core ecosystem

Webhook

  • Active: Yes
  • Webhook URL: https://api.lthn.sh/api/github/webhook (we'll build this endpoint)
  • Webhook secret: (generate one — save it for the server)

Permissions

Repository permissions:

  • Contents: Read & write (push to dev branch)
  • Pull requests: Read & write (create, merge, comment)
  • Issues: Read & write (create from findings)
  • Checks: Read & write (report build status)
  • Actions: Read (check workflow status)
  • Metadata: Read (always required)

Organization permissions:

  • None needed

Subscribe to events:

  • Pull request
  • Pull request review
  • Push
  • Check run
  • Check suite

Where can this app be installed?

  • Only on this account (dAppCore org only)

After Creation

  1. Note the App ID and Client ID
  2. Generate a Private Key (.pem file)
  3. Install the app on the dAppCore organization (all repos)
  4. Save credentials:
    mkdir -p ~/.core/github-app
    # Save the .pem file
    cp ~/Downloads/core-agent.*.pem ~/.core/github-app/private-key.pem
    # Save app ID
    echo "APP_ID" > ~/.core/github-app/app-id
    

Webhook Handler

The webhook handler at api.lthn.sh/api/github/webhook will:

  1. pull_request_review (approved) → auto-merge the PR
  2. pull_request_review (changes_requested) → extract findings, dispatch fix agent
  3. push (to main) → update Forge mirror (reverse sync)
  4. check_run (completed) → report status back

All events are also stored in uptelligence for the CodeRabbit KPI tracking.