plan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedCommandPrefixes

func AllowedCommandPrefixes(commands []AllowedCommand) []string

func AllowedCommandsToEntries

func AllowedCommandsToEntries(commands []AllowedCommand) []storage.AllowedCommandEntry

func BuildApprovedPlanPrompt

func BuildApprovedPlanPrompt(title, content string, commands []AllowedCommand) string

func DescribeAllowedCommands

func DescribeAllowedCommands(commands []AllowedCommand) []string

func ExtractTitle

func ExtractTitle(content string) string

Types

type AllowedCommand

type AllowedCommand struct {
	CommandPrefix string
	Description   string
}

func ParseAllowedCommands

func ParseAllowedCommands(raw []RawAllowedCommand) []AllowedCommand

func ParseAllowedCommandsFromEntries

func ParseAllowedCommandsFromEntries(entries []storage.AllowedCommandEntry) []AllowedCommand

type Manager

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

func NewManager

func NewManager(session *agent.Session, approvalEngine *approval.Engine, planStore *storage.PlanStore, sessionStore *storage.Store) *Manager

func (*Manager) Approve

func (c *Manager) Approve() (string, string, []AllowedCommand, error)

func (*Manager) Cancel

func (c *Manager) Cancel() error

func (*Manager) CurrentPlan

func (c *Manager) CurrentPlan() (string, error)

func (*Manager) CurrentPlanPath

func (c *Manager) CurrentPlanPath() string

func (*Manager) Enter

func (c *Manager) Enter(task string) (string, error)

func (*Manager) Restore

func (c *Manager) Restore(state State) error

func (*Manager) Revise

func (c *Manager) Revise(feedback string) (string, error)

func (*Manager) Snapshot

func (c *Manager) Snapshot() State

func (*Manager) Submit

func (c *Manager) Submit(title, content string, commands []AllowedCommand) error

type Phase

type Phase string
const (
	PhaseOff      Phase = "off"
	PhasePlanning Phase = "planning"
	PhaseReview   Phase = "review"
)

type RawAllowedCommand

type RawAllowedCommand struct {
	CommandPrefix string
	Description   string
}

type State

type State struct {
	Phase           Phase
	Task            string
	Slug            string
	Title           string
	PreMode         string
	AllowedCommands []AllowedCommand
}

type Store

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

func NewStore

func NewStore() *Store

func (*Store) Replace

func (s *Store) Replace(state State)

func (*Store) Snapshot

func (s *Store) Snapshot() State

Jump to

Keyboard shortcuts

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