Documentation
¶
Index ¶
Constants ¶
View Source
const ( TurnStateRunning TurnState = "running" TurnStateCompleted TurnState = "completed" TurnStateFailed TurnState = "failed" TurnStateCancelled TurnState = "cancelled" TurnStateInterrupted TurnState = "interrupted" MessageRoleUser MessageRole = "user" MessageRoleAssistant MessageRole = "assistant" MessageRoleTool MessageRole = "tool" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compaction ¶
type Compaction struct {
ID uuid.UUID
SessionID uuid.UUID
FromMessageID uuid.UUID
ToMessageID uuid.UUID
FromSequence int64
ToSequence int64
Summary string
SourceMessageCount int64
InputTokenCount int64
SummaryTokenCount int64
ModelID string
PromptHash string
CreatedAt time.Time
SupersedesCompactionID *uuid.UUID
}
Compaction is one immutable summary covering a completed message prefix.
func (Compaction) TableName ¶
func (Compaction) TableName() string
TableName pins the schema-owned compactions table name.
type ContextSnapshot ¶
type ContextSnapshot struct {
Hash string `gorm:"primaryKey"`
ManifestJSON string
ResolvedContent string
CreatedAt time.Time
}
ContextSnapshot stores one immutable resolved harness context.
func (ContextSnapshot) TableName ¶
func (ContextSnapshot) TableName() string
TableName pins the schema-owned context_snapshots table name.
type Event ¶
type Event struct {
ID uuid.UUID
SessionID uuid.UUID
TurnID uuid.UUID
Sequence int64
RequestID uuid.UUID
EventType string
PayloadJSON string
ParentToolCallID string
CreatedAt time.Time
}
Event is one ordered internal or protocol event in a session transcript.
type Message ¶
type Message struct {
ID uuid.UUID
SessionID uuid.UUID
TurnID uuid.UUID
Sequence int64
Workspace string
Role MessageRole
Content string
ModelID string
Thinking string
ToolCallsJSON string
ToolCallID string
IsError bool
Incomplete bool
CreatedAt time.Time
}
Message is one durable user, assistant, or tool transcript record.
type PromptSnapshot ¶
type PromptSnapshot struct {
Hash string `gorm:"primaryKey"`
EffectivePrompt string
CreatedAt time.Time
}
PromptSnapshot stores one immutable effective prompt.
func (PromptSnapshot) TableName ¶
func (PromptSnapshot) TableName() string
TableName pins the schema-owned prompt_snapshots table name.
type Session ¶
type Session struct {
ID uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
LastMessageAt *time.Time
MessageCount int64
CompletedTurnCount int64
LastCompletedSequence int64
ActiveContextHash string
RootAgent string
ModelID string
}
Session is the durable metadata for one Peen conversation.
type Turn ¶
type Turn struct {
ID uuid.UUID
SessionID uuid.UUID
RequestID uuid.UUID
Workspace string
State TurnState
CancelRequested bool
StartedAt time.Time
CompletedAt *time.Time
FailureClassification string
ContextSnapshotHash *string
PromptSnapshotHash *string
}
Turn is one request execution within a session.
Click to show internal directories.
Click to hide internal directories.