lib

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AvailablePromptStatuses lists all valid prompt result statuses.

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

Functions

This section is empty.

Types

type Prompt

type Prompt struct {
	base.Object[base.Identifier]
	PromptIdentifier PromptIdentifier  `json:"promptIdentifier"`
	TaskIdentifier   TaskIdentifier    `json:"taskIdentifier"`
	Assignee         TaskAssignee      `json:"assignee"`
	Instruction      PromptInstruction `json:"instruction"`
	Parameters       PromptParameters  `json:"parameters,omitempty"`
}

Prompt represents a work request sent to an agent job via the controller. base.Object provides event-level Identifier, Created, Modified. PromptIdentifier is the business key for this prompt.

func (Prompt) Ptr

func (p Prompt) Ptr() *Prompt

func (Prompt) Validate

func (p Prompt) Validate(ctx context.Context) error

type PromptIdentifier

type PromptIdentifier string

PromptIdentifier uniquely identifies an agent prompt request.

func (PromptIdentifier) Bytes

func (p PromptIdentifier) Bytes() []byte

func (PromptIdentifier) Equal

func (p PromptIdentifier) Equal(identifier base.ObjectIdentifier) bool

func (PromptIdentifier) Ptr

func (PromptIdentifier) String

func (p PromptIdentifier) String() string

func (PromptIdentifier) Validate

func (p PromptIdentifier) Validate(ctx context.Context) error

type PromptIdentifierGenerator

type PromptIdentifierGenerator base.IdentifierGenerator[PromptIdentifier]

PromptIdentifierGenerator generates unique prompt identifiers.

type PromptIdentifiers

type PromptIdentifiers []PromptIdentifier

PromptIdentifiers is a slice of PromptIdentifier.

func (PromptIdentifiers) Contains

func (p PromptIdentifiers) Contains(value PromptIdentifier) bool

Contains returns true if the slice contains the given identifier.

type PromptInstruction

type PromptInstruction string

PromptInstruction is the text instruction sent to an agent job.

func (PromptInstruction) String

func (p PromptInstruction) String() string

func (PromptInstruction) Validate

func (p PromptInstruction) Validate(ctx context.Context) error

type PromptMessage

type PromptMessage string

PromptMessage is a human-readable message from an agent job result.

func (PromptMessage) String

func (p PromptMessage) String() string

type PromptOutput

type PromptOutput string

PromptOutput is the result output produced by an agent job.

func (PromptOutput) String

func (p PromptOutput) String() string

type PromptParameters

type PromptParameters map[string]string

PromptParameters holds key-value parameters passed to an agent job.

type PromptResult

type PromptResult struct {
	base.Object[base.Identifier]
	PromptIdentifier PromptIdentifier `json:"promptIdentifier"`
	TaskIdentifier   TaskIdentifier   `json:"taskIdentifier"`
	Status           PromptStatus     `json:"status"`
	Output           PromptOutput     `json:"output,omitempty"`
	Message          PromptMessage    `json:"message,omitempty"`
	Links            []string         `json:"links,omitempty"`
}

PromptResult represents the outcome of a prompt execution by an agent job.

func (PromptResult) Validate

func (r PromptResult) Validate(ctx context.Context) error

type PromptStatus

type PromptStatus string

PromptStatus represents the result status of a prompt execution.

const (
	DonePromptStatus       PromptStatus = "done"
	RunningPromptStatus    PromptStatus = "running"
	NeedsInputPromptStatus PromptStatus = "needs_input"
	FailedPromptStatus     PromptStatus = "failed"
)

func (PromptStatus) String

func (p PromptStatus) String() string

func (PromptStatus) Validate

func (p PromptStatus) Validate(ctx context.Context) error

type PromptStatuses

type PromptStatuses []PromptStatus

PromptStatuses is a slice of PromptStatus.

func (PromptStatuses) Contains

func (p PromptStatuses) Contains(status PromptStatus) bool

Contains returns true if the slice contains the given status.

type Task

type Task struct {
	base.Object[base.Identifier]
	TaskIdentifier TaskIdentifier    `json:"taskIdentifier"`
	Name           TaskName          `json:"name"`
	Status         domain.TaskStatus `json:"status"`
	Phase          *domain.TaskPhase `json:"phase,omitempty"`
	Assignee       TaskAssignee      `json:"assignee"`
	Content        TaskContent       `json:"content"`
}

Task represents an agent task managed via CQRS over Kafka. base.Object provides event-level Identifier, Created, Modified. TaskIdentifier is the business key for this task.

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 AgentConfig 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.

func (TaskContent) String

func (t TaskContent) String() string

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.

type TaskName

type TaskName string

TaskName is the human-readable name of a task.

func (TaskName) String

func (t TaskName) String() string

func (TaskName) Validate

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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