Documentation
¶
Index ¶
- Constants
- Variables
- type AppendStepEventInput
- type AppendTraceEventInput
- type ClosePrincipalInput
- type Conversation
- type ConversationAnchors
- type ConversationStatus
- type CreateConversation
- type CreateRunInput
- type EnsurePrincipalInput
- type Entry
- type EntryKind
- type InterruptKind
- type InterruptResponse
- type InterruptStatus
- type ListConversationsFilter
- type PendingInterrupt
- type PrincipalStatus
- type ProjectConversationPrincipal
- type ProjectConversationRun
- type ProjectConversationStepEvent
- type ProjectConversationTraceEvent
- type RecordRunUsageInput
- type RunStatus
- type RunUsageSnapshot
- type RuntimeState
- type Source
- type Turn
- type TurnStatus
- type UpdatePrincipalRuntimeInput
- type UpdateProviderRateLimitInput
- type UpdateRunInput
Constants ¶
View Source
const CostRecordedEventType string = "project_conversation.cost_recorded"
Variables ¶
View Source
var ( ErrNotFound = errors.New("chat conversation resource not found") ErrConflict = errors.New("chat conversation resource conflict") ErrInvalidInput = errors.New("chat conversation invalid input") ErrTurnAlreadyActive = fmt.Errorf( "%w: project conversation already has an active turn", ErrConflict, ) ErrInterruptPending = fmt.Errorf( "%w: project conversation has a pending interrupt", ErrConflict, ) )
Functions ¶
This section is empty.
Types ¶
type AppendStepEventInput ¶
type AppendTraceEventInput ¶
type ClosePrincipalInput ¶
type Conversation ¶
type Conversation struct {
ID uuid.UUID
ProjectID uuid.UUID
UserID string
Source Source
ProviderID uuid.UUID
Status ConversationStatus
ProviderThreadID *string
LastTurnID *string
ProviderThreadStatus *string
ProviderThreadActiveFlags []string
RollingSummary string
LastActivityAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type ConversationAnchors ¶
type ConversationStatus ¶
type ConversationStatus string
const ( ConversationStatusActive ConversationStatus = "active" ConversationStatusInterrupted ConversationStatus = "interrupted" ConversationStatusClosed ConversationStatus = "closed" )
type CreateConversation ¶
type CreateRunInput ¶
type CreateRunInput struct {
RunID uuid.UUID
PrincipalID uuid.UUID
ConversationID uuid.UUID
ProjectID uuid.UUID
ProviderID uuid.UUID
TurnID *uuid.UUID
Status RunStatus
SessionID *string
WorkspacePath *string
ProviderThreadID *string
ProviderTurnID *string
RuntimeStartedAt *time.Time
LastHeartbeatAt *time.Time
CurrentStepStatus *string
CurrentStepSummary *string
CurrentStepChangedAt *time.Time
}
type EnsurePrincipalInput ¶
type EntryKind ¶
type EntryKind string
const ( EntryKindUserMessage EntryKind = "user_message" EntryKindAssistantTextDelta EntryKind = "assistant_text_delta" EntryKindActionProposal EntryKind = "action_proposal" EntryKindDiff EntryKind = "diff" EntryKindInterrupt EntryKind = "interrupt" EntryKindInterruptResolution EntryKind = "interrupt_resolution" EntryKindActionResult EntryKind = "action_result" EntryKindSystem EntryKind = "system" )
type InterruptKind ¶
type InterruptKind string
const ( InterruptKindCommandExecutionApproval InterruptKind = "command_execution_approval" InterruptKindFileChangeApproval InterruptKind = "file_change_approval" InterruptKindUserInput InterruptKind = "user_input" )
type InterruptResponse ¶
type InterruptStatus ¶
type InterruptStatus string
const ( InterruptStatusPending InterruptStatus = "pending" InterruptStatusResolved InterruptStatus = "resolved" )
type ListConversationsFilter ¶
type PendingInterrupt ¶
type PrincipalStatus ¶
type PrincipalStatus string
const ( PrincipalStatusActive PrincipalStatus = "active" PrincipalStatusClosed PrincipalStatus = "closed" )
type ProjectConversationPrincipal ¶
type ProjectConversationPrincipal struct {
ID uuid.UUID
ConversationID uuid.UUID
ProjectID uuid.UUID
ProviderID uuid.UUID
Name string
Status PrincipalStatus
RuntimeState RuntimeState
CurrentSessionID *string
CurrentWorkspacePath *string
CurrentRunID *uuid.UUID
LastHeartbeatAt *time.Time
CurrentStepStatus *string
CurrentStepSummary *string
CurrentStepChangedAt *time.Time
ClosedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type ProjectConversationRun ¶
type ProjectConversationRun struct {
ID uuid.UUID
PrincipalID uuid.UUID
ConversationID uuid.UUID
ProjectID uuid.UUID
ProviderID uuid.UUID
TurnID *uuid.UUID
Status RunStatus
SessionID *string
WorkspacePath *string
ProviderThreadID *string
ProviderTurnID *string
RuntimeStartedAt *time.Time
TerminalAt *time.Time
LastError *string
LastHeartbeatAt *time.Time
CostAmount float64
InputTokens int64
OutputTokens int64
CachedInputTokens int64
CacheCreationTokens int64
ReasoningTokens int64
PromptTokens int64
CandidateTokens int64
ToolTokens int64
TotalTokens int64
CurrentStepStatus *string
CurrentStepSummary *string
CurrentStepChangedAt *time.Time
CreatedAt time.Time
}
type RecordRunUsageInput ¶
type RecordRunUsageInput struct {
RunID uuid.UUID
ProjectID uuid.UUID
ProviderID uuid.UUID
RecordedAt time.Time
Totals RunUsageSnapshot
Delta RunUsageSnapshot
}
type RunUsageSnapshot ¶
type RuntimeState ¶
type RuntimeState string
const ( RuntimeStateInactive RuntimeState = "inactive" RuntimeStateReady RuntimeState = "ready" RuntimeStateExecuting RuntimeState = "executing" RuntimeStateInterrupted RuntimeState = "interrupted" )
type Source ¶
type Source string
const (
SourceProjectSidebar Source = "project_sidebar"
)
func ParseSource ¶
type TurnStatus ¶
type TurnStatus string
const ( TurnStatusPending TurnStatus = "pending" TurnStatusRunning TurnStatus = "running" TurnStatusInterrupted TurnStatus = "interrupted" TurnStatusCompleted TurnStatus = "completed" TurnStatusFailed TurnStatus = "failed" TurnStatusTerminated TurnStatus = "terminated" )
type UpdateRunInput ¶
Click to show internal directories.
Click to hide internal directories.