NewAPI creates a new process API handler.
(logger slog.Logger, execer agentexec.Execer, updateEnv func(current []string) (updated []string, err error), pathStore *agentgit.PathStore, workingDir func() string)
| 37 | |
| 38 | // NewAPI creates a new process API handler. |
| 39 | func NewAPI(logger slog.Logger, execer agentexec.Execer, updateEnv func(current []string) (updated []string, err error), pathStore *agentgit.PathStore, workingDir func() string) *API { |
| 40 | return &API{ |
| 41 | logger: logger, |
| 42 | manager: newManager(logger, execer, updateEnv, workingDir), |
| 43 | pathStore: pathStore, |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | // Close shuts down the process manager, killing all running |
| 48 | // processes. |