Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback func(info StepInfo)
Callback is a function type invoked at various lifecycle phases.
type Phase ¶
type Phase string
Phase represents a lifecycle stage of an agent, task, crew, or flow.
const ( PhaseAgentInit Phase = "agent_init" PhaseAgentThink Phase = "agent_think" PhaseAgentTool Phase = "agent_tool" PhaseAgentOutput Phase = "agent_output" PhaseAgentComplete Phase = "agent_complete" PhaseAgentError Phase = "agent_error" PhaseTaskStart Phase = "task_start" PhaseTaskComplete Phase = "task_complete" PhaseTaskError Phase = "task_error" PhaseCrewStart Phase = "crew_start" PhaseCrewComplete Phase = "crew_complete" PhaseCrewError Phase = "crew_error" PhaseHumanInput Phase = "human_input" PhaseReviewRequired Phase = "review_required" PhaseFlowStart Phase = "flow_start" PhaseFlowNodeStart Phase = "flow_node_start" PhaseFlowNodeComplete Phase = "flow_node_complete" PhaseFlowComplete Phase = "flow_complete" // @sk-task production-features#T1.1: add checkpoint phases (AC-013) PhaseCheckpointSave Phase = "checkpoint_save" PhaseCheckpointLoad Phase = "checkpoint_load" PhaseResumeStart Phase = "resume_start" PhaseResumeComplete Phase = "resume_complete" // @sk-task training#T4.1: add training callback phases (AC-013) PhaseTrainStart Phase = "train_start" PhaseTrainIteration Phase = "train_iteration" PhaseTrainFeedback Phase = "train_feedback" PhaseTrainComplete Phase = "train_complete" // @sk-task dashboard-v2#T1.3: granular agent phases for dashboard streaming (AC-001, AC-003) PhaseAgentThinking Phase = "agent_thinking" PhaseAgentToolCall Phase = "agent_tool_call" PhaseAgentWaiting Phase = "agent_waiting" PhaseCrewPaused Phase = "crew_paused" PhaseCrewResumed Phase = "crew_resumed" PhaseTaskInjected Phase = "task_injected" // @sk-task output-streaming#T5.2: stream chunk callback phase (AC-014) PhaseChunkComplete Phase = "chunk_complete" // @sk-task unified-memory#T1.1: memory callback phases (AC-009) PhaseMemoryRecall Phase = "memory_recall" PhaseMemoryRemember Phase = "memory_remember" )
Phase constants for all lifecycle events.
type StepInfo ¶
type StepInfo struct {
Phase Phase
AgentRole string
TaskDesc string
Thought string
ToolName string
ToolInput string
Output string
Error string
Duration time.Duration
TokenUsed int
Metadata map[string]any
Timestamp time.Time
// @sk-task production-features#T1.1: StepInfo checkpoint fields (AC-012, AC-013)
CheckpointID string `json:"checkpoint_id,omitempty"`
ProgressPct int `json:"progress_pct,omitempty"`
NodeID string `json:"node_id,omitempty"`
EventType string `json:"event_type,omitempty"`
}
StepInfo contains the context and data for a single callback invocation.
Click to show internal directories.
Click to hide internal directories.