Documentation
¶
Overview ¶
Package run provides the cmd.run lane handler for worker agent run commands.
Handler is a NATS adapter: it decodes WorkerCommands, validates routes/payloads, tracks NATS delivery sequences, and delegates scheduling + execution to the RunCoordinator. Workspace preparation, attachment ingestion, and git operations are owned by the assistant layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestFromWorkerTask ¶
func RequestFromWorkerTask(task runTask) *assistantdomain.RunRequest
RequestFromWorkerTask converts the internal runTask into the agent runtime boundary.
Types ¶
type Config ¶
type Config struct {
OrgID uint
WorkerID uint
Env string
MaxConcurrency int // passed to Coordinator
DebounceWindow time.Duration // passed to Coordinator
SeqTrackerPath string // path to SQLite seq tracker database
}
Config controls a worker run handler.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler receives run commands and delegates to the RunCoordinator.
func (*Handler) HandleControlCommand ¶
HandleControlCommand handles control commands (cancel) from the command dispatcher.
func (*Handler) HandleRunCommand ¶
func (h *Handler) HandleRunCommand(ctx context.Context, cmd messaging.WorkerCommand, msg *nats.Msg) error
HandleRunCommand handles run commands from the command dispatcher.
It decodes the payload, validates routing, tracks sequences, builds a RunSubmission, and submits to the Coordinator for scheduling+execution.
func (*Handler) RunSubject ¶
RunSubject returns the NATS subject for this handler's cmd.run lane.