workspace

package
v0.0.0-...-0f11aa8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlanStatusDraft    = "draft"
	PlanStatusApproved = "approved"
	PlanStatusComplete = "complete"
)

Variables

This section is empty.

Functions

func NewAfterToolHook

func NewAfterToolHook() llm.AfterToolHook

NewAfterToolHook returns a hook that maintains a plans-index.yaml in the session workspace whenever a plan tool is executed. This gives the LLM a quick overview of all plans without needing to list files.

Types

type PlanApproveTool

type PlanApproveTool struct{}

func (*PlanApproveTool) Definition

func (t *PlanApproveTool) Definition() llm.ToolDefinitionPart

func (*PlanApproveTool) Execute

func (t *PlanApproveTool) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)

func (*PlanApproveTool) Name

func (t *PlanApproveTool) Name() string

type PlanCreateTool

type PlanCreateTool struct{}

func (*PlanCreateTool) Definition

func (t *PlanCreateTool) Definition() llm.ToolDefinitionPart

func (*PlanCreateTool) Execute

func (t *PlanCreateTool) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)

func (*PlanCreateTool) Name

func (t *PlanCreateTool) Name() string

type PlanIndex

type PlanIndex struct {
	UpdatedAt time.Time        `yaml:"updated_at"`
	Plans     []PlanIndexEntry `yaml:"plans"`
}

PlanIndex is the top-level structure written to the session workspace.

type PlanIndexEntry

type PlanIndexEntry struct {
	PlanID       string    `yaml:"plan_id"`
	Status       string    `yaml:"status"`
	LastModified time.Time `yaml:"last_modified"`
	ToolAction   string    `yaml:"tool_action"`
}

PlanIndexEntry tracks the metadata for a single plan in the session index.

type PlanListTool

type PlanListTool struct{}

func (*PlanListTool) Definition

func (t *PlanListTool) Definition() llm.ToolDefinitionPart

func (*PlanListTool) Execute

func (t *PlanListTool) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)

func (*PlanListTool) Name

func (t *PlanListTool) Name() string

type PlanMetadata

type PlanMetadata struct {
	Status     string     `yaml:"status"`
	CreatedAt  time.Time  `yaml:"created_at"`
	ApprovedAt *time.Time `yaml:"approved_at,omitempty"`
}

type PlanReadTool

type PlanReadTool struct{}

func (*PlanReadTool) Definition

func (t *PlanReadTool) Definition() llm.ToolDefinitionPart

func (*PlanReadTool) Execute

func (t *PlanReadTool) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)

func (*PlanReadTool) Name

func (t *PlanReadTool) Name() string

type PlanUpdateTool

type PlanUpdateTool struct{}

func (*PlanUpdateTool) Definition

func (t *PlanUpdateTool) Definition() llm.ToolDefinitionPart

func (*PlanUpdateTool) Execute

func (t *PlanUpdateTool) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)

func (*PlanUpdateTool) Name

func (t *PlanUpdateTool) Name() string

type Provider

type Provider struct{}

Provider implements the plan toolbox mapping down to the active Workspace Dir.

func NewProvider

func NewProvider() *Provider

func (*Provider) GetTool

func (p *Provider) GetTool(name string) (llm.Tool, bool)

func (*Provider) Namespace

func (p *Provider) Namespace() string

func (*Provider) Tools

func (p *Provider) Tools() []llm.Tool

Jump to

Keyboard shortcuts

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