Documentation
¶
Overview ¶
Package omniworkboard provides project management workboard functionality.
Index ¶
- Constants
- func CanTransition(from, to ColumnType) bool
- func ColumnIndex(col ColumnType) int
- type Board
- func (b *Board) AddDependency(ctx context.Context, cardID, dependsOnID string) error
- func (b *Board) CreateCard(ctx context.Context, title, description string, priority Priority) (*Card, error)
- func (b *Board) DeleteCard(ctx context.Context, id string) error
- func (b *Board) GetCard(ctx context.Context, id string) (*Card, error)
- func (b *Board) ListCards(ctx context.Context, filter CardFilter) ([]*Card, error)
- func (b *Board) MoveCard(ctx context.Context, id string, toColumn ColumnType) (*Card, error)
- func (b *Board) RemoveDependency(ctx context.Context, cardID, dependsOnID string) error
- func (b *Board) Stats() BoardStats
- func (b *Board) UpdateCard(ctx context.Context, id string, updates CardUpdate) (*Card, error)
- type BoardConfig
- type BoardStats
- type Card
- type CardFilter
- type CardUpdate
- type ColumnType
- type Priority
- type Skill
- type Tool
- type ToolHandler
- type WorkboardTools
Constants ¶
const ( // SkillName is the name of the workboard skill. SkillName = "workboard" // StorageKeyBoard is the key for persisting the board. StorageKeyBoard = "workboard:board" )
Variables ¶
This section is empty.
Functions ¶
func CanTransition ¶
func CanTransition(from, to ColumnType) bool
CanTransition checks if a transition between columns is allowed.
func ColumnIndex ¶
func ColumnIndex(col ColumnType) int
ColumnIndex returns the position of a column in the workflow.
Types ¶
type Board ¶
type Board struct {
// ID is the unique identifier.
ID string `json:"id"`
// Name is the board name.
Name string `json:"name"`
// Description is an optional description.
Description string `json:"description,omitempty"`
// Columns is the ordered list of columns.
Columns []ColumnType `json:"columns"`
// Cards is the map of card ID to card.
Cards map[string]*Card `json:"cards"`
// CreatedAt is when the board was created.
CreatedAt time.Time `json:"created_at"`
// UpdatedAt is when the board was last updated.
UpdatedAt time.Time `json:"updated_at"`
// contains filtered or unexported fields
}
Board represents a workboard with columns and cards.
func (*Board) AddDependency ¶
AddDependency adds a dependency between cards.
func (*Board) CreateCard ¶
func (b *Board) CreateCard(ctx context.Context, title, description string, priority Priority) (*Card, error)
CreateCard creates a new card on the board.
func (*Board) DeleteCard ¶
DeleteCard removes a card from the board.
func (*Board) RemoveDependency ¶
RemoveDependency removes a dependency between cards.
func (*Board) UpdateCard ¶
UpdateCard updates a card's fields.
type BoardConfig ¶
type BoardConfig struct {
// Name is the board name.
Name string
// Description is an optional description.
Description string
// Columns is the ordered list of columns (defaults to DefaultColumns).
Columns []ColumnType
}
BoardConfig configures a new board.
type BoardStats ¶
type BoardStats struct {
TotalCards int
ByColumn map[ColumnType]int
ByPriority map[Priority]int
BlockedCards int
}
BoardStats contains board statistics.
type Card ¶
type Card struct {
// ID is the unique identifier.
ID string `json:"id"`
// Title is the card title.
Title string `json:"title"`
// Description provides detailed information.
Description string `json:"description,omitempty"`
// Column is the current column the card is in.
Column ColumnType `json:"column"`
// Priority is the card priority.
Priority Priority `json:"priority"`
// DependsOn is a list of card IDs this card depends on.
DependsOn []string `json:"depends_on,omitempty"`
// BlockedBy is computed from DependsOn - cards that block this one.
// This is populated by the board when querying.
BlockedBy []string `json:"blocked_by,omitempty"`
// Labels are tags for categorization.
Labels []string `json:"labels,omitempty"`
// Assignee is the person or agent assigned to this card.
Assignee string `json:"assignee,omitempty"`
// Metadata contains additional key-value data.
Metadata map[string]any `json:"metadata,omitempty"`
// CreatedAt is when the card was created.
CreatedAt time.Time `json:"created_at"`
// UpdatedAt is when the card was last updated.
UpdatedAt time.Time `json:"updated_at"`
// CompletedAt is when the card was moved to done.
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
Card represents a task card on the workboard.
func (*Card) AddDependency ¶
AddDependency adds a dependency on another card.
func (*Card) RemoveDependency ¶
RemoveDependency removes a dependency.
func (*Card) RemoveLabel ¶
RemoveLabel removes a label if present.
type CardFilter ¶
type CardFilter struct {
// Columns filters by column (any of these).
Columns []ColumnType
// Priorities filters by priority (any of these).
Priorities []Priority
// Labels filters by labels (all must match).
Labels []string
// Assignee filters by assignee.
Assignee string
// IncludeBlocked includes blocked cards (default true).
IncludeBlocked *bool
}
CardFilter specifies criteria for listing cards.
type CardUpdate ¶
type CardUpdate struct {
Title *string
Description *string
Priority *Priority
Assignee *string
Labels []string
Metadata map[string]any
}
CardUpdate contains optional fields for updating a card.
type ColumnType ¶
type ColumnType string
ColumnType represents the type of column on a workboard.
const ( // ColumnBacklog is for items not yet planned. ColumnBacklog ColumnType = "backlog" // ColumnTodo is for planned items ready to start. ColumnTodo ColumnType = "todo" // ColumnInProgress is for items currently being worked on. ColumnInProgress ColumnType = "in_progress" // ColumnReview is for items awaiting review. ColumnReview ColumnType = "review" // ColumnDone is for completed items. ColumnDone ColumnType = "done" )
func DefaultColumns ¶
func DefaultColumns() []ColumnType
DefaultColumns returns the default set of columns in order.
func ParseColumnType ¶
func ParseColumnType(s string) ColumnType
ParseColumnType parses a string into a ColumnType.
func (ColumnType) IsActive ¶
func (c ColumnType) IsActive() bool
IsActive returns true if the column represents active work.
func (ColumnType) IsDone ¶
func (c ColumnType) IsDone() bool
IsDone returns true if the column represents completion.
func (ColumnType) IsValid ¶
func (c ColumnType) IsValid() bool
IsValid returns true if the column type is valid.
func (ColumnType) String ¶
func (c ColumnType) String() string
String returns the string representation.
type Priority ¶
type Priority int
Priority represents the priority level of a card.
func ParsePriority ¶
ParsePriority parses a string into a Priority.
type Skill ¶
type Skill struct {
// contains filtered or unexported fields
}
Skill implements compiled.Skill for the workboard.
func NewSkillWithBoard ¶
NewSkillWithBoard creates a new workboard skill with an existing board.
func (*Skill) Description ¶
Description implements compiled.Skill.
func (*Skill) SetStorage ¶
SetStorage implements compiled.StorageAware.
type Tool ¶
type Tool struct {
// Name is the tool name.
Name string `json:"name"`
// Description describes what the tool does.
Description string `json:"description"`
// InputSchema is the JSON schema for the tool's input.
InputSchema map[string]any `json:"input_schema"`
}
Tool represents a tool that can be invoked by an agent.
type ToolHandler ¶
ToolHandler handles tool invocations.
type WorkboardTools ¶
type WorkboardTools struct {
// contains filtered or unexported fields
}
WorkboardTools provides tools for interacting with a workboard.
func NewWorkboardTools ¶
func NewWorkboardTools(board *Board) *WorkboardTools
NewWorkboardTools creates tools for the given board.
func (*WorkboardTools) Invoke ¶
func (wt *WorkboardTools) Invoke(ctx context.Context, name string, input json.RawMessage) (any, error)
Invoke calls a tool with the given input.
func (*WorkboardTools) Tools ¶
func (wt *WorkboardTools) Tools() []Tool
Tools returns the list of available tools.