Comments, doc comments, test names, error and log messages, CLI help, README, Makefile, CI step names and the design document are now all in English. No behaviour changes; the full suite passes under the race detector. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
58 lines
1.4 KiB
Go
58 lines
1.4 KiB
Go
package cli
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// errNotImplemented marks commands belonging to phases not yet built.
|
|
var errNotImplemented = errors.New("not implemented yet (see llmgw-plan.md §11)")
|
|
|
|
func newServerCmd() *cobra.Command {
|
|
var configPath string
|
|
cmd := &cobra.Command{
|
|
Use: "server",
|
|
Short: "Router and control plane (phases 1-3)",
|
|
RunE: func(_ *cobra.Command, _ []string) error {
|
|
return errNotImplemented
|
|
},
|
|
}
|
|
cmd.Flags().StringVar(&configPath, "config", "server.yaml", "configuration file")
|
|
return cmd
|
|
}
|
|
|
|
func newAgentCmd() *cobra.Command {
|
|
var configPath string
|
|
cmd := &cobra.Command{
|
|
Use: "agent",
|
|
Short: "Node agent running on each GPU host (phase 2)",
|
|
RunE: func(_ *cobra.Command, _ []string) error {
|
|
return errNotImplemented
|
|
},
|
|
}
|
|
cmd.Flags().StringVar(&configPath, "config", "agent.yaml", "configuration file")
|
|
return cmd
|
|
}
|
|
|
|
func newCtlCmd() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "ctl",
|
|
Short: "Administrative CLI (phase 3)",
|
|
}
|
|
for _, sub := range []struct{ use, short string }{
|
|
{"nodes", "list nodes"},
|
|
{"models", "show the model catalog"},
|
|
{"replicas", "list replicas"},
|
|
{"explain-placement", "explain why a model could not be placed"},
|
|
{"bench", "measure profile capacity (§10)"},
|
|
} {
|
|
cmd.AddCommand(&cobra.Command{
|
|
Use: sub.use,
|
|
Short: sub.short,
|
|
RunE: func(_ *cobra.Command, _ []string) error { return errNotImplemented },
|
|
})
|
|
}
|
|
return cmd
|
|
}
|