- ProcessRegister: proper factory in pkg/agentic - Workspace commands (list/clean/dispatch): moved to agentic.registerWorkspaceCommands - workspace.go deleted from cmd/ - main.go: 98 lines, just core.New + app commands + c.Run() Co-Authored-By: Virgil <virgil@lethean.io>
25 lines
628 B
Go
25 lines
628 B
Go
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
package agentic
|
|
|
|
import (
|
|
core "dappco.re/go/core"
|
|
"dappco.re/go/core/process"
|
|
)
|
|
|
|
// ProcessRegister is the service factory for the process management service.
|
|
// Wraps core/process for the v0.3.3→v0.4 factory pattern.
|
|
//
|
|
// core.New(
|
|
// core.WithService(agentic.ProcessRegister),
|
|
// )
|
|
func ProcessRegister(c *core.Core) core.Result {
|
|
svc, err := process.NewService(process.Options{})(c)
|
|
if err != nil {
|
|
return core.Result{Value: err, OK: false}
|
|
}
|
|
if procSvc, ok := svc.(*process.Service); ok {
|
|
_ = process.SetDefault(procSvc)
|
|
}
|
|
return core.Result{Value: svc, OK: true}
|
|
}
|