Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DapCmd = &cobra.Command{ Use: "dap", Short: "Start the Heddle Debug Adapter", PreRunE: func(cmd *cobra.Command, args []string) error { if err := config.Init("HEDDLE_DAP", dapCfgFile); err != nil { return err } logPath, err := cmd.Flags().GetString("log-path") if err != nil { return err } return logger.Init(logger.Config{ OutputPaths: []string{logPath}, Level: "debug", Development: true, }) }, Run: func(cmd *cobra.Command, args []string) { l := logger.L() cpAddr, _ := cmd.Flags().GetString("control-plane-addr") addr, _ := cmd.Flags().GetString("addr") l.Info("DAP server starting", zap.String("addr", addr), zap.String("control-plane-addr", cpAddr)) server := dap.NewServer(l, addr, cpAddr) if err := server.StartStdio(context.Background(), os.Stdin, os.Stdout); err != nil { l.Fatal("DAP stdio failed", zap.Error(err)) } }, }
DapCmd starts the Heddle Debug Adapter
View Source
var DevCmd = &cobra.Command{
Use: "dev",
Short: "Development and debugging tools",
Long: `Development tools include the Heddle Language Server (LSP) and the Debug Adapter (DAP).`,
}
DevCmd is the root command for development and debugging tools.
View Source
var InitCmd = &cobra.Command{ Use: "init <namespace>/<project_name>", Short: "Initialize a new Heddle project structure", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { projectName := args[0] s := scaffold.NewScaffoldService() return s.Init(projectName) }, }
View Source
var LspCmd = &cobra.Command{ Use: "lsp", Short: "Start the Heddle Language Server", PreRunE: func(cmd *cobra.Command, args []string) error { if err := config.Init("HEDDLE_LSP", lspCfgFile); err != nil { return err } logPath, err := cmd.Flags().GetString("log-path") if err != nil { return err } return logger.Init(logger.Config{ OutputPaths: []string{logPath}, Level: "debug", Development: true, }) }, Run: func(cmd *cobra.Command, args []string) { l := logger.L() cpAddr, _ := cmd.Flags().GetString("control-plane-addr") server := lsp.NewServer(l, cpAddr) rw := stdioRW{cmd.InOrStdin(), cmd.OutOrStdout()} defer rw.Close() if err := server.Start(cmd.Context(), rw); err != nil { l.Fatal("LSP server failed", zap.Error(err)) } }, }
LspCmd starts the Heddle Language Server
View Source
var WatchCmd = &cobra.Command{ Use: "watch [project-path]", Short: "Start the local development orchestrator with hot-reload", Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { if err := local.StartLocalServices(cmd.Context()); err != nil { return err } projectPath := "." if len(args) > 0 { projectPath = args[0] } absPath, err := filepath.Abs(projectPath) if err != nil { return err } m, err := maestro.NewMaestro(absPath) if err != nil { return err } return m.Run(cmd.Context()) }, }
View Source
var WorkerAddCmd = &cobra.Command{ Use: "add <language> <namespace>/<worker_name>", Short: "Scaffold a new worker", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { language := args[0] fullName := args[1] s := scaffold.NewScaffoldService() return s.WorkerAdd(language, fullName) }, }
View Source
var WorkerCmd = &cobra.Command{
Use: "worker",
Short: "Manage Heddle workers",
}
View Source
var WorkerValidateCmd = &cobra.Command{ Use: "validate", Short: "Validate the workers workspace structure", RunE: func(cmd *cobra.Command, args []string) error { s := scaffold.NewScaffoldService() _, err := s.WorkerValidate() return err }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.