P2.1 + P3.1: Agent skeleton and CLI skeleton

Agent (P2.1): Agent struct with registry DB, runtime, and logger.
gRPC server with TLS 1.3 and MCIAS auth interceptor. Graceful
shutdown on SIGINT/SIGTERM. All RPCs return Unimplemented until
handlers are built in P2.2-P2.9.

CLI (P3.1): Full command tree with all 15 subcommands as stubs
(login, deploy, stop, start, restart, list, ps, status, sync,
adopt, service show/edit/export, push, pull, node list/add/remove).
gRPC dial helper with TLS, CA cert, and bearer token attachment.

Both gates for parallel Phase 2+3 work are now open.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 11:51:03 -07:00
parent 15b8823810
commit 53535f1e96
5 changed files with 445 additions and 7 deletions

View File

@@ -2,8 +2,11 @@ package main
import (
"fmt"
"log"
"os"
"git.wntrmute.dev/kyle/mcp/internal/agent"
"git.wntrmute.dev/kyle/mcp/internal/config"
"github.com/spf13/cobra"
)
@@ -27,7 +30,20 @@ func main() {
},
})
root.AddCommand(&cobra.Command{
Use: "server",
Short: "Start the agent server",
RunE: func(cmd *cobra.Command, args []string) error {
cfg, err := config.LoadAgentConfig(cfgPath)
if err != nil {
return fmt.Errorf("load config: %w", err)
}
return agent.Run(cfg)
},
})
if err := root.Execute(); err != nil {
log.Fatal(err)
os.Exit(1)
}
}