lib

package module
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CDBSchemaIDs = cdb.SchemaIDs{
	TaskV1SchemaID,
}
View Source
var TaskV1SchemaID = cdb.SchemaID{
	Group:   "agent",
	Kind:    "task",
	Version: "v1",
}

Functions

This section is empty.

Types

type BuildInfoMetrics

type BuildInfoMetrics interface {
	SetBuildInfo(buildDate *libtime.DateTime)
}

func NewBuildInfoMetrics

func NewBuildInfoMetrics() BuildInfoMetrics

type Task

type Task struct {
	base.Object[base.Identifier]
	TaskIdentifier TaskIdentifier  `json:"taskIdentifier"`
	Frontmatter    TaskFrontmatter `json:"frontmatter"`
	Content        TaskContent     `json:"content"`
}

Task is the payload published by an agent when it finishes a task. task/controller consumes this from agent-task-v1-request and writes it to the vault file. Frontmatter is a generic map — task/controller serializes it to YAML without interpreting individual fields. Content is the markdown body after the frontmatter closing delimiter. The agent owns the content transformation (status, phase, Result section, etc.).

func (Task) Ptr

func (t Task) Ptr() *Task

func (Task) Validate

func (t Task) Validate(ctx context.Context) error

type TaskAssignee

type TaskAssignee string

TaskAssignee identifies which agent type handles this task. Matched against Config CRD spec.assignee.

func (TaskAssignee) String

func (t TaskAssignee) String() string

func (TaskAssignee) Validate

func (t TaskAssignee) Validate(ctx context.Context) error

type TaskContent

type TaskContent string

TaskContent is the markdown body of a task after the frontmatter closing delimiter.

func (TaskContent) String

func (t TaskContent) String() string

func (TaskContent) Validate

func (t TaskContent) Validate(ctx context.Context) error

type TaskFrontmatter

type TaskFrontmatter map[string]interface{}

TaskFrontmatter is a generic map of frontmatter key-value pairs. Serializable as JSON (Kafka) and YAML (vault file). Typed accessors provide type-safe access to well-known fields.

func (TaskFrontmatter) Assignee

func (f TaskFrontmatter) Assignee() TaskAssignee

func (TaskFrontmatter) Phase

func (f TaskFrontmatter) Phase() *domain.TaskPhase

func (TaskFrontmatter) Stage

func (f TaskFrontmatter) Stage() string

Stage returns the execution stage from the "stage" key. Returns "prod" if the key is absent or empty.

func (TaskFrontmatter) Status

func (f TaskFrontmatter) Status() domain.TaskStatus

type TaskIdentifier

type TaskIdentifier string

TaskIdentifier uniquely identifies an agent task.

func (TaskIdentifier) Bytes

func (t TaskIdentifier) Bytes() []byte

func (TaskIdentifier) Equal

func (t TaskIdentifier) Equal(identifier base.ObjectIdentifier) bool

func (TaskIdentifier) Ptr

func (t TaskIdentifier) Ptr() *TaskIdentifier

func (TaskIdentifier) String

func (t TaskIdentifier) String() string

func (TaskIdentifier) Validate

func (t TaskIdentifier) Validate(ctx context.Context) error

type TaskIdentifierGenerator

type TaskIdentifierGenerator base.IdentifierGenerator[TaskIdentifier]

TaskIdentifierGenerator generates unique task identifiers.

type TaskIdentifiers

type TaskIdentifiers []TaskIdentifier

TaskIdentifiers is a slice of TaskIdentifier.

func (TaskIdentifiers) Contains

func (t TaskIdentifiers) Contains(value TaskIdentifier) bool

Contains returns true if the slice contains the given identifier.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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