Documentation
¶
Overview ¶
Package checkpoint provides checkpoint creation and management for supervised execution.
Index ¶
- type Checkpoint
- type Decision
- type Phase
- type PostCheckpoint
- type PreCheckpoint
- type ReconcileResult
- type Store
- func (s *Store) Get(stepID string) *Checkpoint
- func (s *Store) GetDecisionTrail() []*Checkpoint
- func (s *Store) Load() error
- func (s *Store) SavePost(cp *PostCheckpoint) error
- func (s *Store) SavePre(cp *PreCheckpoint) error
- func (s *Store) SaveReconcile(r *ReconcileResult) error
- func (s *Store) SaveSupervise(r *SuperviseResult) error
- type SuperviseResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶
type Checkpoint struct {
Pre *PreCheckpoint `json:"pre,omitempty"`
Post *PostCheckpoint `json:"post,omitempty"`
Reconcile *ReconcileResult `json:"reconcile,omitempty"`
Supervise *SuperviseResult `json:"supervise,omitempty"`
}
Checkpoint represents a complete checkpoint for a step.
type PostCheckpoint ¶
type PostCheckpoint struct {
StepID string `json:"step_id"`
ActualOutput string `json:"actual_output"`
ToolsUsed []string `json:"tools_used,omitempty"`
MetCommitment bool `json:"met_commitment"`
Deviations []string `json:"deviations,omitempty"`
Concerns []string `json:"concerns,omitempty"`
Unexpected []string `json:"unexpected,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
PostCheckpoint is created during the EXECUTE phase after execution.
type PreCheckpoint ¶
type PreCheckpoint struct {
StepID string `json:"step_id"`
StepType string `json:"step_type"` // GOAL, AGENT, RUN
Instruction string `json:"instruction"`
Interpretation string `json:"interpretation"`
ScopeIn []string `json:"scope_in,omitempty"`
ScopeOut []string `json:"scope_out,omitempty"`
Approach string `json:"approach"`
ToolsPlanned []string `json:"tools_planned,omitempty"`
PredictedOutput string `json:"predicted_output"`
Confidence string `json:"confidence"` // high, medium, low
Assumptions []string `json:"assumptions,omitempty"`
Timestamp time.Time `json:"timestamp"`
Metadata map[string]string `json:"metadata,omitempty"`
}
PreCheckpoint is created during the COMMIT phase before execution.
type ReconcileResult ¶
type ReconcileResult struct {
StepID string `json:"step_id"`
Triggers []string `json:"triggers"`
Supervise bool `json:"supervise"`
Timestamp time.Time `json:"timestamp"`
}
ReconcileResult is created during the RECONCILE phase.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages checkpoints for a session.
func (*Store) Get ¶
func (s *Store) Get(stepID string) *Checkpoint
Get retrieves a checkpoint by step ID.
func (*Store) GetDecisionTrail ¶
func (s *Store) GetDecisionTrail() []*Checkpoint
GetDecisionTrail returns all checkpoints in order for audit.
func (*Store) SavePost ¶
func (s *Store) SavePost(cp *PostCheckpoint) error
SavePost saves a post-checkpoint.
func (*Store) SavePre ¶
func (s *Store) SavePre(cp *PreCheckpoint) error
SavePre saves a pre-checkpoint.
func (*Store) SaveReconcile ¶
func (s *Store) SaveReconcile(r *ReconcileResult) error
SaveReconcile saves a reconcile result.
func (*Store) SaveSupervise ¶
func (s *Store) SaveSupervise(r *SuperviseResult) error
SaveSupervise saves a supervise result.
type SuperviseResult ¶
type SuperviseResult struct {
StepID string `json:"step_id"`
Verdict string `json:"verdict"` // CONTINUE, REORIENT, PAUSE
Correction string `json:"correction,omitempty"`
Question string `json:"question,omitempty"` // for PAUSE
Timestamp time.Time `json:"timestamp"`
}
SuperviseResult is created during the SUPERVISE phase.