Context
Part of Objective #2 (Kernel Interface). Server binary that starts the kernel as an HTTP service with all subsystems wired together.
Depends on: #27 (HTTP API with SSE streaming)
Scope
cmd/server/main.go — HTTP server with handler routing via http.ServeMux
- Server configuration: listen address, kernel config file path, read/write timeouts
- Built-in tool registration (shared with or extracted from
cmd/kernel/tools.go)
- Graceful shutdown with signal handling (SIGINT/SIGTERM) and shutdown timeout
- Structured logging via observer → slog adapter
- Scalar UI: Standalone Bun project in
scalar/ directory. Fetches GET /openapi.json from the running kernel server. Fully separate from the Go binary — no embedding, no //go:embed. Development-time only.
Approach
- New
cmd/server/main.go with flag parsing, config loading, kernel initialization
- HTTP server wraps api.Handler with http.ServeMux routing
- Signal handling with context cancellation for graceful shutdown
scalar/ directory contains standalone Bun project with Scalar API reference UI
Acceptance Criteria
Context
Part of Objective #2 (Kernel Interface). Server binary that starts the kernel as an HTTP service with all subsystems wired together.
Depends on: #27 (HTTP API with SSE streaming)
Scope
cmd/server/main.go— HTTP server with handler routing viahttp.ServeMuxcmd/kernel/tools.go)scalar/directory. FetchesGET /openapi.jsonfrom the running kernel server. Fully separate from the Go binary — no embedding, no//go:embed. Development-time only.Approach
cmd/server/main.gowith flag parsing, config loading, kernel initializationscalar/directory contains standalone Bun project with Scalar API reference UIAcceptance Criteria