agent

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachSession

func AttachSession(sessionName string) error

AttachSession attaches to a tmux session

func CreateAgentSession

func CreateAgentSession(sessionName, worktreeDir, command string) error

CreateAgentSession creates a tmux session for an agent task

func InjectTaskIntoSkill

func InjectTaskIntoSkill(skill string, taskContent string) string

InjectTaskIntoSkill replaces {task} placeholder with task content

func KillSession

func KillSession(sessionName string) error

KillSession kills a tmux session

func LaunchGSDWorkflow

func LaunchGSDWorkflow(cfg *config.Config, workflow GSDWorkflow) error

LaunchGSDWorkflow starts a GSD workflow with task content

func ListAgentSessions

func ListAgentSessions() ([]string, error)

ListAgentSessions returns all running tmux sessions

func ProcessQueue

func ProcessQueue(cfg *config.Config, workCfg *config.WorktreeConfig, q *queue.Queue) error

ProcessQueue runs the next pending task from the queue

func ProcessQueueContinuous

func ProcessQueueContinuous(cfg *config.Config, workCfg *config.WorktreeConfig, q *queue.Queue) error

ProcessQueueContinuous processes all pending tasks in sequence

func ReadTaskFile

func ReadTaskFile(dir string) (string, error)

ReadTaskFile reads .task.md from the specified directory

func SessionExists

func SessionExists(sessionName string) bool

SessionExists checks if a tmux session exists

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor manages the execution of a scheduled agent task

func NewExecutor

func NewExecutor(cfg *config.Config, workCfg *config.WorktreeConfig, task *config.AgentTask, agentName string) *Executor

NewExecutor creates a new agent executor

func (*Executor) Run

func (e *Executor) Run() error

Run executes the agent task

type GSDWorkflow

type GSDWorkflow struct {
	Milestone   string
	Phase       string
	AutoExecute bool
	YoloMode    bool
}

GSDWorkflow represents a GSD workflow configuration

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler manages scheduled agent tasks

func NewScheduler

func NewScheduler(cfg *config.Config, workCfg *config.WorktreeConfig) (*Scheduler, error)

NewScheduler creates a new agent scheduler

func (*Scheduler) GetNextRuns

func (s *Scheduler) GetNextRuns() map[string]time.Time

GetNextRuns returns the next scheduled run times for all tasks

func (*Scheduler) IsRunning

func (s *Scheduler) IsRunning(taskName string) bool

IsRunning checks if a task is currently running

func (*Scheduler) Start

func (s *Scheduler) Start(ctx context.Context) error

Start starts the scheduler daemon

func (*Scheduler) Stop

func (s *Scheduler) Stop() error

Stop stops the scheduler daemon

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL