package main

import (
	"fmt"
	"os"

	"github.com/spf13/cobra"
)

func main() {
	if err := rootCmd().Execute(); err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
}

func rootCmd() *cobra.Command {
	root := &cobra.Command{
		Use:   "worker",
		Short: "IOP Worker — async job processor (placeholder)",
		Long: `worker processes asynchronous jobs from the IOP job queue.

This component is a placeholder. Implementation is planned after the node is stable.`,
	}
	root.AddCommand(&cobra.Command{
		Use:   "serve",
		Short: "Start the worker",
		Run: func(_ *cobra.Command, _ []string) {
			fmt.Println("worker serve: not yet implemented")
		},
	})
	return root
}
