go-process/actions.go
Snider 8095807ad6 feat: extract process package from core/go pkg/process
Process management with Core IPC integration, output streaming via
ring buffer, exec wrapper with logging, and dependency-aware runner.

Moved from forge.lthn.ai/core/go/pkg/process to standalone module.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 12:50:09 +00:00

37 lines
856 B
Go

package process
import "time"
// --- ACTION messages (broadcast via Core.ACTION) ---
// ActionProcessStarted is broadcast when a process begins execution.
type ActionProcessStarted struct {
ID string
Command string
Args []string
Dir string
PID int
}
// ActionProcessOutput is broadcast for each line of output.
// Subscribe to this for real-time streaming.
type ActionProcessOutput struct {
ID string
Line string
Stream Stream
}
// ActionProcessExited is broadcast when a process completes.
// Check ExitCode for success (0) or failure.
type ActionProcessExited struct {
ID string
ExitCode int
Duration time.Duration
Error error // Non-nil if failed to start or was killed
}
// ActionProcessKilled is broadcast when a process is terminated.
type ActionProcessKilled struct {
ID string
Signal string
}