refactor(monorepo): extract inbox and orch runtimes

This commit is contained in:
2026-03-20 13:08:33 +08:00
parent 1938eb8f07
commit 9b8e886289
78 changed files with 10516 additions and 77 deletions
@@ -0,0 +1,43 @@
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",
SilenceErrors: true,
SilenceUsage: true,
}
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))
cmd.AddCommand(newSendCmd(opts))
cmd.AddCommand(newFetchCmd(opts))
cmd.AddCommand(newClaimCmd(opts))
cmd.AddCommand(newRenewCmd(opts))
cmd.AddCommand(newUpdateCmd(opts))
cmd.AddCommand(newReplyCmd(opts))
cmd.AddCommand(newDoneCmd(opts))
cmd.AddCommand(newFailCmd(opts))
cmd.AddCommand(newCancelCmd(opts))
cmd.AddCommand(newListCmd(opts))
cmd.AddCommand(newWatchCmd(opts))
cmd.AddCommand(newWaitReplyCmd(opts))
cmd.AddCommand(newShowCmd(opts))
return cmd
}