Documentation
¶
Overview ¶
Package execution provides execution mode state management.
Plan mode: the agent explores the codebase and writes a plan, which is then presented to the user for approval before any source files are modified.
Index ¶
- Variables
- func ClearAllPlanSlugs()
- func ClearAllStates()
- func EnterPlanMode(sessionID types.SessionID, agentID *types.AgentID)
- func ExitPlanMode(sessionID types.SessionID)
- func GetDisplayPath(planFilePath string) string
- func GetPlan(sessionID types.SessionID, agentID *types.AgentID) (string, error)
- func GetPlanFilePath(sessionID types.SessionID, agentID *types.AgentID) string
- func GetPlanSlug(sessionID types.SessionID) string
- func PlanExists(sessionID types.SessionID, agentID *types.AgentID) bool
- func SetHasPlanFile(sessionID types.SessionID, v bool)
- func SetPlan(sessionID types.SessionID, agentID *types.AgentID, content string) error
- func SetPlanSlug(sessionID types.SessionID, slug string)
- type ModeCache
- func (c *ModeCache[S]) ClearAllSlugs()
- func (c *ModeCache[S]) ClearAllStates()
- func (c *ModeCache[S]) ClearSlug(sessionID types.SessionID)
- func (c *ModeCache[S]) GetSlug(sessionID types.SessionID) string
- func (c *ModeCache[S]) GetState(sessionID types.SessionID) *S
- func (c *ModeCache[S]) SetSlug(sessionID types.SessionID, slug string)
- type State
Constants ¶
This section is empty.
Variables ¶
var DefaultPlansDirectory = runtimepath.PlansDir("")
DefaultPlansDirectory is the default location for plan files (~/.config/seshat/plans/).
var WordList = []string{
"algorithm", "cascade", "discovery", "element", "focus", "galaxy", "horizon", "insight",
"journey", "kernel", "launch", "momentum", "seshat", "orbit", "prism", "quest",
"resonance", "spectrum", "tempo", "unity", "vertex", "wavelength", "zenith", "apex",
"bridge", "chronicle", "dynamics", "eclipse", "fusion", "genesis", "harmonic", "infinity",
"junction", "kinesis", "lucid", "meridian", "novel", "origins", "paradigm", "quantum",
"radian", "symmetry", "threshold", "unity", "vortex", "wanderer", "xenon", "yearning",
}
WordList is used to generate human-readable mode file slugs.
Functions ¶
func ClearAllPlanSlugs ¶
func ClearAllPlanSlugs()
ClearAllPlanSlugs removes all plan slugs (useful for testing).
func ClearAllStates ¶
func ClearAllStates()
ClearAllStates removes all session states (useful for testing).
func EnterPlanMode ¶
EnterPlanMode initializes plan mode state for a session.
func ExitPlanMode ¶
ExitPlanMode applies state changes when leaving plan mode.
func GetDisplayPath ¶
GetDisplayPath returns a user-friendly tilde-prefixed path to the plan file.
func GetPlanFilePath ¶
GetPlanFilePath returns the full path to the plan file for a session. Plans are stored under workspaces/{sessionID}/plans/ so that deleting a session directory removes all its plans in one shot. When agentID is non-nil the filename includes the agent identifier, allowing separate plan files per sub-agent within the same session.
func GetPlanSlug ¶
GetPlanSlug returns the slug for a session's plan file.
func PlanExists ¶
PlanExists checks if a plan file exists for the session.
func SetHasPlanFile ¶
func SetPlanSlug ¶
SetPlanSlug sets the plan slug for a session (useful for testing).
Types ¶
type ModeCache ¶
type ModeCache[S any] struct { // contains filtered or unexported fields }
ModeCache manages per-session state, slug, and file artifact for a single mode. S is the mode-specific state type.
func NewModeCache ¶
NewModeCache creates a new ModeCache. subDir is the path relative to cwd (e.g. ".seshat/plans"). newState returns a fresh zero state for new sessions.
func (*ModeCache[S]) ClearAllSlugs ¶
func (c *ModeCache[S]) ClearAllSlugs()
ClearAllSlugs removes all slugs.
func (*ModeCache[S]) ClearAllStates ¶
func (c *ModeCache[S]) ClearAllStates()
ClearAllStates removes all session states.
func (*ModeCache[S]) GetSlug ¶
GetSlug returns the slug for a session, generating one if it does not exist.