forgejo-mcp-broker/.beads
Ole-Morten Duesund 006d5c1448 feat(forgejo): upstream OAuth client (forgejo-mcp-broker-b9i)
Adds internal/forgejo: a stateless OAuth 2.1 client for upstream Forgejo.
Covers what the broker AS needs:
  - AuthorizeURL: builds the user-agent redirect to /login/oauth/authorize
  - ExchangeCode: code → access+refresh tokens (PKCE verifier included)
  - Refresh: refresh_token grant (Forgejo rotates the refresh token)
  - FetchUserInfo: OIDC userinfo claims (sub, preferred_username, etc.)

OAuth errors come back as a structured *forgejo.Error so the AS can
distinguish "user must re-authenticate" (invalid_grant) from "transient
network problem" via errors.As. Forgejo doesn't currently expose a token
revocation endpoint, so revocation lives in the broker's own store —
upstream tokens expire naturally.

Defaults:
  - 30s HTTP timeout (Forgejo OAuth is sub-second when healthy)
  - User-Agent "fjmcp-broker" if not overridden
  - 64 KiB cap on response bodies (these endpoints return ~kilobytes)

Tests: 95.1% coverage. httptest.Server fake Forgejo exercises every
public method, every error shape (OAuth-formatted, plain {"message":...},
malformed JSON, missing required fields, network failure), and verifies
form params hit the wire as expected.

Closes forgejo-mcp-broker-b9i.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 13:31:19 +02:00
..
hooks bd init: initialize beads issue tracking 2026-04-24 16:34:50 +02:00
.gitignore bd init: initialize beads issue tracking 2026-04-24 16:34:50 +02:00
config.yaml bd init: initialize beads issue tracking 2026-04-24 16:34:50 +02:00
issues.jsonl feat(forgejo): upstream OAuth client (forgejo-mcp-broker-b9i) 2026-04-27 13:31:19 +02:00
metadata.json bd init: initialize beads issue tracking 2026-04-24 16:34:50 +02:00
README.md bd init: initialize beads issue tracking 2026-04-24 16:34:50 +02:00

Beads - AI-Native Issue Tracking

Welcome to Beads! This repository uses Beads for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.

What is Beads?

Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.

Learn more: github.com/steveyegge/beads

Quick Start

Essential Commands

# Create new issues
bd create "Add user authentication"

# View all issues
bd list

# View issue details
bd show <issue-id>

# Update issue status
bd update <issue-id> --claim
bd update <issue-id> --status done

# Sync with Dolt remote
bd dolt push

Working with Issues

Issues in Beads are:

  • Git-native: Stored in Dolt database with version control and branching
  • AI-friendly: CLI-first design works perfectly with AI coding agents
  • Branch-aware: Issues can follow your branch workflow
  • Always in sync: Auto-syncs with your commits

Why Beads?

AI-Native Design

  • Built specifically for AI-assisted development workflows
  • CLI-first interface works seamlessly with AI coding agents
  • No context switching to web UIs

🚀 Developer Focused

  • Issues live in your repo, right next to your code
  • Works offline, syncs when you push
  • Fast, lightweight, and stays out of your way

🔧 Git Integration

  • Automatic sync with git commits
  • Branch-aware issue tracking
  • Dolt-native three-way merge resolution

Get Started with Beads

Try Beads in your own projects:

# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash

# Initialize in your repo
bd init

# Create your first issue
bd create "Try out Beads"

Learn More


Beads: Issue tracking that moves at the speed of thought