- Initialize go.mod with module path kode.naiv.no/olemd/forgejo-mcp-broker
- Create directory layout: cmd/broker + internal/{buildinfo,config,log,store,httpserver}
- Add Makefile with build/test/lint/tidy/clean targets and ldflags-injected build info
- Stub cmd/broker/main.go with --version support; real wiring follows in -t37
- Stub doc.go for each internal/* package, pointing to the issue that fills it in
Closes forgejo-mcp-broker-n84.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
934 B
Go
31 lines
934 B
Go
// Command fjmcp-broker is an OAuth 2.1 authorization server and MCP session
|
|
// broker that fronts forgejo-mcp. See ../../README.md and ../../docs/ for the
|
|
// design.
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
|
|
"kode.naiv.no/olemd/forgejo-mcp-broker/internal/buildinfo"
|
|
)
|
|
|
|
func main() {
|
|
var showVersion bool
|
|
flag.BoolVar(&showVersion, "version", false, "print build info and exit")
|
|
flag.Parse()
|
|
|
|
if showVersion {
|
|
fmt.Printf("fjmcp-broker %s (rev %s, built %s)\n",
|
|
buildinfo.Version, buildinfo.GitRevision, buildinfo.BuildDate)
|
|
return
|
|
}
|
|
|
|
// Full startup wiring (config → log → store → httpserver) lands in
|
|
// forgejo-mcp-broker-t37. Until then this binary only serves --version
|
|
// so the bootstrap acceptance criteria can be exercised.
|
|
fmt.Fprintln(os.Stderr, "fjmcp-broker: runtime wiring not yet implemented (phase 1 in progress)")
|
|
fmt.Fprintln(os.Stderr, "Use --version to print build info.")
|
|
os.Exit(2)
|
|
}
|