agent/pkg/agentic/process_register.go
Snider 72387dde91 feat: move workspace + process commands into services — main.go 98 lines
- 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>
2026-03-25 00:03:22 +00:00

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}
}