package runtimeproc

import (
	"context"
	"time"
)

// ProcessInfo is the minimal process metadata needed by the janitor. Some
// fields are unavailable on some operating systems and may be empty. StartedAt
// is best-effort process creation time; janitor uses it to guard persisted
// registry matches against PID reuse when cwd/cmdline evidence is unavailable.
type ProcessInfo struct {
	PID       int
	PPID      int
	PGID      int
	Exe       string
	Cmdline   string
	CWD       string
	StartedAt time.Time
}

// Manager provides process enumeration and process-tree termination. Platform
// implementations may return partial metadata; empty CWD/command/start fields
// reduce janitor coverage instead of broadening cleanup decisions.
type Manager interface {
	ListProcesses(context.Context) ([]ProcessInfo, error)
	KillTree(context.Context, int) error
}
