planner

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCorePlanner

func NewCorePlanner(logger logging.Logger) interfaces.TaskPlanner

NewCorePlanner creates a new core task planner

func NewCorePlannerWithAI

func NewCorePlannerWithAI(logger logging.Logger, aiPlanner AIPlanner) interfaces.TaskPlanner

NewCorePlannerWithAI creates a new core task planner with a specific AI planner

Types

type AIPlanner

type AIPlanner interface {
	GeneratePlan(ctx context.Context, task *core.Task) (string, error)
}

AIPlanner is an interface for AI-based planning services

type CorePlanner

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

CorePlanner implements the interfaces.TaskPlanner interface

func (*CorePlanner) AnalyzeTaskContext

func (p *CorePlanner) AnalyzeTaskContext(task *core.Task) map[string]interface{}

AnalyzeTaskContext extracts key information from task metadata and description to generate more contextually relevant plans

func (*CorePlanner) CreatePlan

func (p *CorePlanner) CreatePlan(ctx context.Context, taskObj interface{}) (string, error)

CreatePlan creates a plan for a task

func (*CorePlanner) SerializeTaskForAI

func (p *CorePlanner) SerializeTaskForAI(task *core.Task) (string, error)

SerializeTaskForAI prepares a task for sending to an AI service

type MockAIPlanner

type MockAIPlanner struct{}

MockAIPlanner implements a simple mock AI planner

func (*MockAIPlanner) GeneratePlan

func (p *MockAIPlanner) GeneratePlan(ctx context.Context, task *core.Task) (string, error)

GeneratePlan generates a mock plan

type SimpleLLMPlanner

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

SimpleLLMPlanner implements a simple AI planner using LLM

func NewSimpleLLMPlanner

func NewSimpleLLMPlanner(llm interfaces.LLM, logger logging.Logger) *SimpleLLMPlanner

NewSimpleLLMPlanner creates a new SimpleLLMPlanner with the provided LLM client

func NewSimpleLLMPlannerWithSystemPrompt

func NewSimpleLLMPlannerWithSystemPrompt(llm interfaces.LLM, logger logging.Logger, systemPrompt string) *SimpleLLMPlanner

NewSimpleLLMPlannerWithSystemPrompt creates a new SimpleLLMPlanner with a custom system prompt

func (*SimpleLLMPlanner) GeneratePlan

func (p *SimpleLLMPlanner) GeneratePlan(ctx context.Context, task *core.Task) (string, error)

GeneratePlan generates a plan using an LLM

Jump to

Keyboard shortcuts

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