INNER CODE UNIT · Go
runNode
yaklang/yaklang · cmd/legion-smoke-node/main.go:61
func runNode(args []string) error {
flags := flag.NewFlagSet("legion-smoke-node", flag.ContinueOnError)
apiURL := flags.String("api-url", "http://127.0.0.1:8080", "Legion platform HTTP API base URL")
runtimeAPIURL := flags.String("runtime-api-url", strings.TrimSpace(os.Getenv("LEGION_RUNTIME_API_URL")), "Container-facing Legion platform HTTP API base URL for Runtime Host commands")
enrollmentToken := flags.String("enrollment-token", "", "Legion node enrollment token")
nodeID := flags.String("id", "", "Legacy node ID fallback; canonical node_id is assigned by platform")
displayName := flags.String("name", "smoke-node", "Display name reported to Legion")
agentInstallationID := flags.String("agent-installation-id", "", "Override persisted agent installation ID")
kind := flags.String("kind", "", "Node kind: empty/host=host node, ai_session=AI session container node")
dockerEndpoint := flags.String("docker-endpoint", strings.TrimSpace(os.Getenv("LEGION_DOCKER_ENDPOINT")), "Session-Manager-reachable Docker endpoint advertised by a host node")
runtimeHost := flags.Bool("runtime-host", environmentBool("LEGION_RUNTIME_HOST"), "Allow this node to run AI session containers using its local Docker Engine")
runtimeNetwork := flags.String("runtime-network", environmentValue("LEGION_RUNTIME_NETWORK", "bridge"), "Fixed local Docker network for AI session containers")
runtimeSystemReservedCPU := flags.Uint64(
"runtime-system-reserved-cpu-millicores",
scannode.DefaultHostSystemReservedCPUMillicores,
"CPU reserved for the host OS, Docker and Yaklang Node before scan/Runtime scheduling",
)
runtimeSystemReservedMemory := flags.Uint64(