goal

package
v0.14.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateGoalArgs

type CreateGoalArgs struct {
	Horizon string `json:"horizon" jsonschema:"time horizon: monthly, quarterly, yearly, short-term, long-term"`
	Period  string `json:"period" jsonschema:"time period (e.g., 2026-05, 2026-Q2, 2026, 2025-2028)"`
	Title   string `json:"title" jsonschema:"goal title"`
}

type CreateGoalResult

type CreateGoalResult struct {
	Goal    *GoalInfo `json:"goal,omitempty" jsonschema:"the created goal"`
	Message string    `json:"message" jsonschema:"status message"`
	Success bool      `json:"success" jsonschema:"whether creation succeeded"`
}

type GetGoalContentArgs

type GetGoalContentArgs struct {
	Horizon string `json:"horizon" jsonschema:"time horizon: monthly, quarterly, yearly, short-term, long-term"`
	Period  string `json:"period" jsonschema:"time period (e.g., 2026-05, 2026-Q2, 2026, 2025-2028)"`
	Title   string `json:"title" jsonschema:"goal title"`
}

type GetGoalContentResult

type GetGoalContentResult struct {
	Goal    *GoalInfo `json:"goal,omitempty" jsonschema:"goal metadata"`
	Content string    `json:"content" jsonschema:"goal file content"`
	Found   bool      `json:"found" jsonschema:"whether the goal was found"`
}

type Goal

type Goal struct {
	ID        string // Unique identifier for the goal
	Title     string
	Content   string
	CreatedAt time.Time
	UpdatedAt time.Time
	Project   string // This helps organize goals under projects
}

Goal represents a single goal with its metadata and content

type GoalInfo

type GoalInfo struct {
	Title   string `json:"title" jsonschema:"goal title"`
	Horizon string `json:"horizon" jsonschema:"time horizon (monthly, quarterly, yearly, short-term, long-term)"`
	Period  string `json:"period" jsonschema:"time period (e.g., 2026-05, 2026-Q2, 2026, 2025-2028)"`
	Path    string `json:"path" jsonschema:"file path to the goal"`
}

type GoalManager

type GoalManager struct {
	RootDir string
}

GoalManager manages all goal operations

func NewGoalManager

func NewGoalManager(rootDir string) *GoalManager

NewGoalManager creates a new GoalManager instance

func (*GoalManager) CreateGoal

func (gm *GoalManager) CreateGoal(horizon Horizon, period string, title string) error

CreateGoal creates a new goal file with the given title

func (*GoalManager) GetGoalPath

func (gm *GoalManager) GetGoalPath(horizon Horizon, period string, goalID string) string

GetGoalPath returns the path for a goal file within a horizons directory

func (*GoalManager) GetGoalPathForHorizon

func (gm *GoalManager) GetGoalPathForHorizon(horizon Horizon, period string, title string) string

GetGoalPathForHorizon returns the file path for a goal at a given horizon, period, and title

func (*GoalManager) GetHorizonPath

func (gm *GoalManager) GetHorizonPath(horizon Horizon) string

GetHorizonPath returns the path for a specific horizon

func (*GoalManager) ListGoals

func (gm *GoalManager) ListGoals() (map[Horizon]map[string][]string, error)

ListGoals returns all goals organized by horizon and period

func (*GoalManager) ListGoalsByHorizon

func (gm *GoalManager) ListGoalsByHorizon(horizon Horizon) (map[string][]string, error)

ListGoalsByHorizon returns all goals for a specific horizon If a file's title has changed, the file is renamed to match

type Horizon

type Horizon string

Horizon represents different time horizons for goals

const (
	HorizonMonthly   Horizon = "monthly"
	HorizonQuarterly Horizon = "quarterly"
	HorizonYearly    Horizon = "yearly"
	HorizonShortTerm Horizon = "short-term"
	HorizonLongTerm  Horizon = "long-term"
)

type ListGoalsArgs

type ListGoalsArgs struct {
	Horizon string `json:"horizon,omitempty" jsonschema:"optional horizon to filter (monthly, quarterly, yearly, short-term, long-term)"`
}

type ListGoalsResult

type ListGoalsResult struct {
	Goals []GoalInfo `json:"goals" jsonschema:"list of goals"`
	Count int        `json:"count" jsonschema:"total number of goals returned"`
}

type MCPServer

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

MCPServer wraps the MCP server with goal operations

func NewMCPServer

func NewMCPServer(manager *GoalManager) *MCPServer

NewMCPServer creates a new MCP server for goal operations

func (*MCPServer) Run

func (s *MCPServer) Run(ctx context.Context) error

Run starts the MCP server on stdio transport

Jump to

Keyboard shortcuts

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