Documentation
¶
Index ¶
- Constants
- Variables
- type ClaudeRuntime
- func (r *ClaudeRuntime) CloseSession(sessionID SessionID) bool
- func (r *ClaudeRuntime) RespondInterrupt(ctx context.Context, input RuntimeInterruptResponseInput) (TurnStream, error)
- func (r *ClaudeRuntime) SessionAnchor(sessionID SessionID) RuntimeSessionAnchor
- func (r *ClaudeRuntime) StartTurn(ctx context.Context, input RuntimeTurnInput) (TurnStream, error)
- func (r *ClaudeRuntime) Supports(providerItem catalogdomain.AgentProvider) bool
- type CodexRuntime
- func (r *CodexRuntime) CloseSession(sessionID SessionID) bool
- func (r *CodexRuntime) EnsureSession(ctx context.Context, input RuntimeTurnInput) error
- func (r *CodexRuntime) RespondInterrupt(ctx context.Context, input RuntimeInterruptResponseInput) (TurnStream, error)
- func (r *CodexRuntime) SessionAnchor(sessionID SessionID) RuntimeSessionAnchor
- func (r *CodexRuntime) StartTurn(ctx context.Context, input RuntimeTurnInput) (TurnStream, error)
- func (r *CodexRuntime) Supports(providerItem catalogdomain.AgentProvider) bool
- type Context
- type GeminiRuntime
- type ProjectConversationFocus
- type ProjectConversationFocusKind
- type ProjectConversationMachineFocus
- type ProjectConversationMuxEvent
- type ProjectConversationService
- func (s *ProjectConversationService) AppendActionExecutionResult(ctx context.Context, userID UserID, conversationID uuid.UUID, ...) (domain.Entry, error)
- func (s *ProjectConversationService) CloseRuntime(ctx context.Context, userID UserID, conversationID uuid.UUID) error
- func (s *ProjectConversationService) ConfigureGitHubCredentials(resolver githubauthservice.TokenResolver)
- func (s *ProjectConversationService) ConfigurePlatformEnvironment(apiURL string, platform projectConversationAgentPlatform)
- func (s *ProjectConversationService) CreateConversation(ctx context.Context, userID UserID, projectID uuid.UUID, providerID uuid.UUID) (domain.Conversation, error)
- func (s *ProjectConversationService) GetConversation(ctx context.Context, userID UserID, conversationID uuid.UUID) (domain.Conversation, error)
- func (s *ProjectConversationService) GetPrincipal(ctx context.Context, userID UserID, conversationID uuid.UUID) (domain.ProjectConversationPrincipal, error)
- func (s *ProjectConversationService) GetWorkspaceDiff(ctx context.Context, userID UserID, conversationID uuid.UUID) (ProjectConversationWorkspaceDiff, error)
- func (s *ProjectConversationService) ListConversations(ctx context.Context, userID UserID, projectID uuid.UUID, providerID *uuid.UUID) ([]domain.Conversation, error)
- func (s *ProjectConversationService) ListEntries(ctx context.Context, userID UserID, conversationID uuid.UUID) ([]domain.Entry, error)
- func (s *ProjectConversationService) RespondInterrupt(ctx context.Context, userID UserID, conversationID uuid.UUID, ...) (domain.PendingInterrupt, error)
- func (s *ProjectConversationService) StartTurn(ctx context.Context, userID UserID, conversationID uuid.UUID, message string, ...) (domain.Turn, error)
- func (s *ProjectConversationService) WatchConversation(ctx context.Context, conversationID uuid.UUID) (<-chan StreamEvent, func())
- func (s *ProjectConversationService) WatchProjectConversations(ctx context.Context, userID UserID, projectID uuid.UUID) (<-chan ProjectConversationMuxEvent, func(), error)
- type ProjectConversationSkillFocus
- type ProjectConversationTicketActivity
- type ProjectConversationTicketAssignedAgent
- type ProjectConversationTicketDependency
- type ProjectConversationTicketFocus
- type ProjectConversationTicketHook
- type ProjectConversationTicketRepoScope
- type ProjectConversationTicketRun
- type ProjectConversationTicketTargetMachine
- type ProjectConversationWorkflowFocus
- type ProjectConversationWorkspaceDiff
- type ProjectConversationWorkspaceFileDiff
- type ProjectConversationWorkspaceFileStatus
- type ProjectConversationWorkspaceRepoDiff
- type RawChatContext
- type RawProjectConversationFocus
- type RawProjectConversationTicketActivity
- type RawProjectConversationTicketAssignedAgent
- type RawProjectConversationTicketDependency
- type RawProjectConversationTicketHook
- type RawProjectConversationTicketRepoScope
- type RawProjectConversationTicketRun
- type RawProjectConversationTicketTargetMachine
- type RawStartInput
- type Runtime
- type RuntimeInterruptDecision
- type RuntimeInterruptEvent
- type RuntimeInterruptResponseInput
- type RuntimeSessionAnchor
- type RuntimeTurnInput
- type Service
- type SessionID
- type SkillRefinementInput
- type SkillRefinementResultPayload
- type SkillRefinementService
- func (s *SkillRefinementService) CloseSession(userID UserID, sessionID SessionID) bool
- func (s *SkillRefinementService) ResolveSessionScopeForUser(userID UserID, sessionID SessionID) (uuid.UUID, uuid.UUID, bool)
- func (s *SkillRefinementService) Start(ctx context.Context, userID UserID, input SkillRefinementInput) (TurnStream, error)
- type SkillRefinementSessionPayload
- type SkillRefinementStatusPayload
- type Source
- type StartInput
- type StreamEvent
- type TurnStream
- type UserID
Constants ¶
View Source
const ( DefaultMaxTurns = 10 DefaultMaxBudgetUSD = 2.0 )
View Source
const (
DefaultSkillRefinementMaxAttempts = 3
)
Variables ¶
View Source
var ( ErrConversationNotFound = chatrepo.ErrNotFound ErrConversationConflict = chatrepo.ErrConflict ErrConversationTurnActive = chatrepo.ErrTurnAlreadyActive ErrConversationInterruptPending = domain.ErrInterruptPending ErrPendingInterruptNotFound = chatrepo.ErrNotFound ErrConversationRuntimeAbsent = fmt.Errorf("chat conversation runtime is unavailable") )
View Source
var ( ErrSourceUnsupported = errors.New("chat source is unsupported") ErrProviderNotFound = errors.New("chat-capable provider not found for project") ErrProviderUnsupported = errors.New("chat provider does not support ephemeral chat") ErrSessionNotFound = errors.New("chat session not found") ErrSessionProviderMismatch = errors.New("chat session cannot resume across providers") ErrSessionTurnLimitReached = errors.New("chat session reached the turn limit; please create a ticket for further work") ErrSessionBudgetExceeded = errors.New("chat session reached the budget cap; please create a ticket for further work") )
View Source
var ( ErrSkillRefinementSessionNotFound = errors.New("skill refinement session not found") )
Functions ¶
This section is empty.
Types ¶
type ClaudeRuntime ¶
type ClaudeRuntime struct {
// contains filtered or unexported fields
}
func NewClaudeRuntime ¶
func NewClaudeRuntime(adapter provider.ClaudeCodeAdapter) *ClaudeRuntime
func (*ClaudeRuntime) CloseSession ¶
func (r *ClaudeRuntime) CloseSession(sessionID SessionID) bool
func (*ClaudeRuntime) RespondInterrupt ¶
func (r *ClaudeRuntime) RespondInterrupt( ctx context.Context, input RuntimeInterruptResponseInput, ) (TurnStream, error)
func (*ClaudeRuntime) SessionAnchor ¶
func (r *ClaudeRuntime) SessionAnchor(sessionID SessionID) RuntimeSessionAnchor
func (*ClaudeRuntime) StartTurn ¶
func (r *ClaudeRuntime) StartTurn(ctx context.Context, input RuntimeTurnInput) (TurnStream, error)
func (*ClaudeRuntime) Supports ¶
func (r *ClaudeRuntime) Supports(providerItem catalogdomain.AgentProvider) bool
type CodexRuntime ¶
type CodexRuntime struct {
// contains filtered or unexported fields
}
func NewCodexRuntime ¶
func NewCodexRuntime(adapter *codexadapter.Adapter) *CodexRuntime
func (*CodexRuntime) CloseSession ¶
func (r *CodexRuntime) CloseSession(sessionID SessionID) bool
func (*CodexRuntime) EnsureSession ¶
func (r *CodexRuntime) EnsureSession(ctx context.Context, input RuntimeTurnInput) error
func (*CodexRuntime) RespondInterrupt ¶
func (r *CodexRuntime) RespondInterrupt( ctx context.Context, input RuntimeInterruptResponseInput, ) (TurnStream, error)
func (*CodexRuntime) SessionAnchor ¶
func (r *CodexRuntime) SessionAnchor(sessionID SessionID) RuntimeSessionAnchor
func (*CodexRuntime) StartTurn ¶
func (r *CodexRuntime) StartTurn(ctx context.Context, input RuntimeTurnInput) (TurnStream, error)
func (*CodexRuntime) Supports ¶
func (r *CodexRuntime) Supports(providerItem catalogdomain.AgentProvider) bool
type GeminiRuntime ¶
type GeminiRuntime struct {
// contains filtered or unexported fields
}
func NewGeminiRuntime ¶
func NewGeminiRuntime(processManager provider.AgentCLIProcessManager) *GeminiRuntime
func (*GeminiRuntime) CloseSession ¶
func (r *GeminiRuntime) CloseSession(sessionID SessionID) bool
func (*GeminiRuntime) StartTurn ¶
func (r *GeminiRuntime) StartTurn(ctx context.Context, input RuntimeTurnInput) (TurnStream, error)
func (*GeminiRuntime) Supports ¶
func (r *GeminiRuntime) Supports(providerItem catalogdomain.AgentProvider) bool
type ProjectConversationFocus ¶
type ProjectConversationFocus struct {
Kind ProjectConversationFocusKind
Workflow *ProjectConversationWorkflowFocus
Skill *ProjectConversationSkillFocus
Ticket *ProjectConversationTicketFocus
Machine *ProjectConversationMachineFocus
}
func ParseProjectConversationFocus ¶
func ParseProjectConversationFocus(raw *RawProjectConversationFocus) (*ProjectConversationFocus, error)
type ProjectConversationFocusKind ¶
type ProjectConversationFocusKind string
const ( ProjectConversationFocusWorkflow ProjectConversationFocusKind = "workflow" ProjectConversationFocusSkill ProjectConversationFocusKind = "skill" ProjectConversationFocusTicket ProjectConversationFocusKind = "ticket" ProjectConversationFocusMachine ProjectConversationFocusKind = "machine" )
type ProjectConversationService ¶
type ProjectConversationService struct {
// contains filtered or unexported fields
}
func NewProjectConversationService ¶
func NewProjectConversationService( logger *slog.Logger, stores projectConversationStoreSource, catalog projectConversationCatalog, tickets ticketReader, workflows workflowReader, localProcessManager provider.AgentCLIProcessManager, sshPool *sshinfra.Pool, ) *ProjectConversationService
func (*ProjectConversationService) AppendActionExecutionResult ¶
func (*ProjectConversationService) CloseRuntime ¶
func (*ProjectConversationService) ConfigureGitHubCredentials ¶
func (s *ProjectConversationService) ConfigureGitHubCredentials(resolver githubauthservice.TokenResolver)
func (*ProjectConversationService) ConfigurePlatformEnvironment ¶
func (s *ProjectConversationService) ConfigurePlatformEnvironment( apiURL string, platform projectConversationAgentPlatform, )
func (*ProjectConversationService) CreateConversation ¶
func (*ProjectConversationService) GetConversation ¶
func (s *ProjectConversationService) GetConversation(ctx context.Context, userID UserID, conversationID uuid.UUID) (domain.Conversation, error)
func (*ProjectConversationService) GetPrincipal ¶
func (s *ProjectConversationService) GetPrincipal(ctx context.Context, userID UserID, conversationID uuid.UUID) (domain.ProjectConversationPrincipal, error)
func (*ProjectConversationService) GetWorkspaceDiff ¶
func (s *ProjectConversationService) GetWorkspaceDiff( ctx context.Context, userID UserID, conversationID uuid.UUID, ) (ProjectConversationWorkspaceDiff, error)
func (*ProjectConversationService) ListConversations ¶
func (*ProjectConversationService) ListEntries ¶
func (*ProjectConversationService) RespondInterrupt ¶
func (s *ProjectConversationService) RespondInterrupt( ctx context.Context, userID UserID, conversationID uuid.UUID, interruptID uuid.UUID, response domain.InterruptResponse, ) (domain.PendingInterrupt, error)
func (*ProjectConversationService) WatchConversation ¶
func (s *ProjectConversationService) WatchConversation( ctx context.Context, conversationID uuid.UUID, ) (<-chan StreamEvent, func())
func (*ProjectConversationService) WatchProjectConversations ¶
func (s *ProjectConversationService) WatchProjectConversations( ctx context.Context, userID UserID, projectID uuid.UUID, ) (<-chan ProjectConversationMuxEvent, func(), error)
type ProjectConversationTicketFocus ¶
type ProjectConversationTicketFocus struct {
ID uuid.UUID
Identifier string
Title string
Description string
Status string
Priority string
AttemptCount int
RetryPaused bool
PauseReason string
SelectedArea string
Dependencies []ProjectConversationTicketDependency
RepoScopes []ProjectConversationTicketRepoScope
RecentActivity []ProjectConversationTicketActivity
HookHistory []ProjectConversationTicketHook
AssignedAgent *ProjectConversationTicketAssignedAgent
CurrentRun *ProjectConversationTicketRun
TargetMachine *ProjectConversationTicketTargetMachine
}
type ProjectConversationWorkspaceFileDiff ¶
type ProjectConversationWorkspaceFileDiff struct {
Path string
Status ProjectConversationWorkspaceFileStatus
Added int
Removed int
}
type ProjectConversationWorkspaceFileStatus ¶
type ProjectConversationWorkspaceFileStatus string
const ( ProjectConversationWorkspaceFileStatusModified ProjectConversationWorkspaceFileStatus = "modified" ProjectConversationWorkspaceFileStatusAdded ProjectConversationWorkspaceFileStatus = "added" ProjectConversationWorkspaceFileStatusDeleted ProjectConversationWorkspaceFileStatus = "deleted" ProjectConversationWorkspaceFileStatusRenamed ProjectConversationWorkspaceFileStatus = "renamed" ProjectConversationWorkspaceFileStatusUntracked ProjectConversationWorkspaceFileStatus = "untracked" )
type RawChatContext ¶
type RawChatContext struct {
ProjectID *string `json:"project_id"`
WorkflowID *string `json:"workflow_id"`
TicketID *string `json:"ticket_id"`
HarnessDraft *string `json:"harness_draft"`
SkillID *string `json:"skill_id"`
SkillFilePath *string `json:"skill_file_path"`
SkillFileDraft *string `json:"skill_file_draft"`
}
type RawProjectConversationFocus ¶
type RawProjectConversationFocus struct {
Kind string `json:"kind"`
WorkflowID *string `json:"workflow_id"`
WorkflowName *string `json:"workflow_name"`
WorkflowType *string `json:"workflow_type"`
HarnessPath *string `json:"harness_path"`
IsActive *bool `json:"is_active"`
SelectedArea *string `json:"selected_area"`
HasDirtyDraft *bool `json:"has_dirty_draft"`
SkillID *string `json:"skill_id"`
SkillName *string `json:"skill_name"`
SelectedFilePath *string `json:"selected_file_path"`
BoundWorkflowNames []string `json:"bound_workflow_names"`
TicketID *string `json:"ticket_id"`
TicketIdentifier *string `json:"ticket_identifier"`
TicketTitle *string `json:"ticket_title"`
TicketDescription *string `json:"ticket_description"`
TicketStatus *string `json:"ticket_status"`
TicketPriority *string `json:"ticket_priority"`
TicketAttemptCount *int `json:"ticket_attempt_count"`
TicketRetryPaused *bool `json:"ticket_retry_paused"`
TicketPauseReason *string `json:"ticket_pause_reason"`
TicketDependencies []RawProjectConversationTicketDependency `json:"ticket_dependencies"`
TicketRepoScopes []RawProjectConversationTicketRepoScope `json:"ticket_repo_scopes"`
TicketRecentActivity []RawProjectConversationTicketActivity `json:"ticket_recent_activity"`
TicketHookHistory []RawProjectConversationTicketHook `json:"ticket_hook_history"`
TicketAssignedAgent *RawProjectConversationTicketAssignedAgent `json:"ticket_assigned_agent"`
TicketCurrentRun *RawProjectConversationTicketRun `json:"ticket_current_run"`
TicketTargetMachine *RawProjectConversationTicketTargetMachine `json:"ticket_target_machine"`
MachineID *string `json:"machine_id"`
MachineName *string `json:"machine_name"`
MachineHost *string `json:"machine_host"`
MachineStatus *string `json:"machine_status"`
HealthSummary *string `json:"health_summary"`
}
type RawStartInput ¶
type RawStartInput struct {
Message string `json:"message"`
Source string `json:"source"`
ProviderID *string `json:"provider_id"`
Context RawChatContext `json:"context"`
SessionID *string `json:"session_id"`
}
type Runtime ¶
type Runtime interface {
Supports(catalogdomain.AgentProvider) bool
StartTurn(context.Context, RuntimeTurnInput) (TurnStream, error)
CloseSession(SessionID) bool
}
func NewRuntime ¶
type RuntimeInterruptEvent ¶
type RuntimeInterruptEvent struct {
RequestID string `json:"request_id"`
Kind string `json:"kind"`
Options []RuntimeInterruptDecision `json:"options,omitempty"`
Payload map[string]any `json:"payload,omitempty"`
}
type RuntimeInterruptResponseInput ¶
type RuntimeInterruptResponseInput struct {
SessionID SessionID
Provider catalogdomain.AgentProvider
RequestID string
Kind string
Decision string
Answer map[string]any
Payload map[string]any
WorkingDirectory provider.AbsolutePath
Environment []string
ResumeProviderThreadID string
ResumeProviderTurnID string
PersistentConversation bool
}
type RuntimeSessionAnchor ¶
type RuntimeTurnInput ¶
type RuntimeTurnInput struct {
SessionID SessionID
Provider catalogdomain.AgentProvider
Message string
SystemPrompt string
WorkingDirectory provider.AbsolutePath
Environment []string
ResumeProviderThreadID string
ResumeProviderTurnID string
MaxTurns int
MaxBudgetUSD float64
PersistentConversation bool
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CloseSession ¶
func (*Service) EnableDurableSessions ¶
func (*Service) StartTurn ¶
func (s *Service) StartTurn(ctx context.Context, userID UserID, input StartInput) (TurnStream, error)
type SkillRefinementInput ¶
type SkillRefinementInput struct {
ProjectID uuid.UUID
SkillID uuid.UUID
ProviderID *uuid.UUID
Message string
DraftFiles []workflowservice.SkillBundleFileInput
}
type SkillRefinementResultPayload ¶
type SkillRefinementResultPayload struct {
SessionID string `json:"session_id"`
Status string `json:"status"`
WorkspacePath string `json:"workspace_path"`
ProviderID string `json:"provider_id"`
ProviderName string `json:"provider_name"`
ProviderThreadID string `json:"provider_thread_id,omitempty"`
ProviderTurnID string `json:"provider_turn_id,omitempty"`
Attempts int `json:"attempts"`
TranscriptSummary string `json:"transcript_summary,omitempty"`
CommandOutputSummary string `json:"command_output_summary,omitempty"`
FailureReason string `json:"failure_reason,omitempty"`
CandidateFiles []workflowservice.SkillBundleFile `json:"candidate_files,omitempty"`
CandidateBundleHash string `json:"candidate_bundle_hash,omitempty"`
}
type SkillRefinementService ¶
type SkillRefinementService struct {
// contains filtered or unexported fields
}
func NewSkillRefinementService ¶
func NewSkillRefinementService( logger *slog.Logger, runtime skillRefinementRuntime, catalog catalogReader, workflows workflowReader, ) *SkillRefinementService
func (*SkillRefinementService) CloseSession ¶
func (s *SkillRefinementService) CloseSession(userID UserID, sessionID SessionID) bool
func (*SkillRefinementService) ResolveSessionScopeForUser ¶
func (*SkillRefinementService) Start ¶
func (s *SkillRefinementService) Start( ctx context.Context, userID UserID, input SkillRefinementInput, ) (TurnStream, error)
type StartInput ¶
type StartInput struct {
Message string
Source Source
ProviderID *uuid.UUID
Context Context
SessionID *SessionID
}
func ParseStartInput ¶
func ParseStartInput(raw RawStartInput) (StartInput, error)
type StreamEvent ¶
type TurnStream ¶
type TurnStream struct {
Events <-chan StreamEvent
}
Source Files
¶
- gemini_protocol.go
- project_conversation_mux_broker.go
- project_conversation_runtime_manager.go
- project_conversation_service.go
- project_conversation_stores.go
- project_conversation_stream_broker.go
- project_conversation_ticket_focus.go
- project_conversation_workspace_diff.go
- project_focus.go
- project_focus_snapshot.go
- provider_surface.go
- runtime.go
- runtime_claude.go
- runtime_codex.go
- runtime_cost.go
- runtime_gemini.go
- runtime_messages.go
- runtime_permission.go
- service.go
- session_registry.go
- session_store.go
- skill_refinement_service.go
Click to show internal directories.
Click to hide internal directories.