Documentation
¶
Index ¶
- Variables
- type Prompt
- type PromptIdentifier
- type PromptIdentifierGenerator
- type PromptIdentifiers
- type PromptInstruction
- type PromptMessage
- type PromptOutput
- type PromptParameters
- type PromptResult
- type PromptStatus
- type PromptStatuses
- type Task
- type TaskAssignee
- type TaskContent
- type TaskIdentifier
- type TaskIdentifierGenerator
- type TaskIdentifiers
- type TaskName
Constants ¶
This section is empty.
Variables ¶
var AvailablePromptStatuses = PromptStatuses{ DonePromptStatus, RunningPromptStatus, NeedsInputPromptStatus, FailedPromptStatus, }
AvailablePromptStatuses lists all valid prompt result statuses.
var CDBSchemaIDs = cdb.SchemaIDs{ TaskV1SchemaID, PromptV1SchemaID, }
var PromptV1SchemaID = cdb.SchemaID{
Group: "agent",
Kind: "prompt",
Version: "v1",
}
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.
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 (p PromptIdentifier) Ptr() *PromptIdentifier
func (PromptIdentifier) String ¶
func (p PromptIdentifier) String() string
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
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 ¶
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.
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
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.
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
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
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.