29 lines
594 B
Go
29 lines
594 B
Go
package inbox
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
type rootOptions struct {
|
|
dbPath string
|
|
json bool
|
|
agent string
|
|
}
|
|
|
|
func NewRootCmd() *cobra.Command {
|
|
opts := &rootOptions{}
|
|
|
|
cmd := &cobra.Command{
|
|
Use: "inbox",
|
|
Short: "Worker-facing durable coordination bus",
|
|
}
|
|
|
|
cmd.PersistentFlags().StringVar(&opts.dbPath, "db", ".agents/coord.db", "SQLite database path")
|
|
cmd.PersistentFlags().BoolVar(&opts.json, "json", false, "Emit machine-readable JSON")
|
|
cmd.PersistentFlags().StringVar(&opts.agent, "agent", "", "Agent identity")
|
|
|
|
cmd.AddCommand(newInitCmd(opts))
|
|
|
|
return cmd
|
|
}
|