Documentation
¶
Index ¶
- func WithoutSystemMessages(messages []llm.Message) []llm.Message
- type AppState
- func (s *AppState) AddMessage(role llm.Role, content string)
- func (s *AppState) AppendMessage(message llm.Message)
- func (s *AppState) ApplyCompaction(summary string) error
- func (s *AppState) ClearContextMetrics()
- func (s *AppState) ClearMessages()
- func (s *AppState) EffectiveToolRegistry() *tools.Registry
- func (s *AppState) FindEnabledSkill(name string) (skills.Skill, bool)
- func (s *AppState) GetClient() llm.LLMClient
- func (s *AppState) GetContextBreakdown() llm.ContextBreakdown
- func (s *AppState) GetLastUsage() *llm.TokenUsage
- func (s *AppState) GetMessages() []llm.Message
- func (s *AppState) GetSkills() skills.Discovery
- func (s *AppState) GetSkillsConfig() skills.Config
- func (s *AppState) GetSubagents() subagents.Discovery
- func (s *AppState) GetToolRegistry() *tools.Registry
- func (s *AppState) IsAdversaryClientReady() bool
- func (s *AppState) IsClientReady(cfg *config.ResolvedConfig) bool
- func (s *AppState) Mode() llm.AgentMode
- func (s *AppState) RegisterTool(tool tools.Tool) error
- func (s *AppState) ReloadSkills() skills.Discovery
- func (s *AppState) ReloadSubagents() subagents.Discovery
- func (s *AppState) RemoveSkillStatus(name string) error
- func (s *AppState) ReplaceMessages(messages []llm.Message)
- func (s *AppState) ResetClientState()
- func (s *AppState) SetAdversaryClient(client llm.LLMClient)
- func (s *AppState) SetLastUsage(usage *llm.TokenUsage)
- func (s *AppState) SetMode(mode llm.AgentMode)
- func (s *AppState) SetSkillStatus(name string, status skills.Status) error
- func (s *AppState) SkillSuggestions() []skills.Skill
- func (s *AppState) SkillsCatalog() string
- func (s *AppState) StreamAdversary(ctx context.Context, focus string) (<-chan llm.StreamEvent, error)
- func (s *AppState) StreamBtw(ctx context.Context, question string, opts ...llm.StreamOptions) (<-chan llm.StreamEvent, error)
- func (s *AppState) StreamChat(ctx context.Context, cfg *config.ResolvedConfig, opts ...llm.StreamOptions) (<-chan llm.StreamEvent, error)
- func (s *AppState) StreamCompact(ctx context.Context, cfg *config.ResolvedConfig, extraPrompt string, ...) (<-chan llm.StreamEvent, error)
- func (s *AppState) SubagentsCatalog() string
- func (s *AppState) UpdateClient(client llm.LLMClient)
- func (s *AppState) WorkingDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppState ¶
type AppState struct {
// contains filtered or unexported fields
}
func (*AppState) AppendMessage ¶
func (*AppState) ApplyCompaction ¶
func (*AppState) ClearContextMetrics ¶
func (s *AppState) ClearContextMetrics()
func (*AppState) ClearMessages ¶
func (s *AppState) ClearMessages()
func (*AppState) EffectiveToolRegistry ¶
func (*AppState) FindEnabledSkill ¶
func (*AppState) GetContextBreakdown ¶
func (s *AppState) GetContextBreakdown() llm.ContextBreakdown
GetContextBreakdown estimates token usage per context category. When the provider has reported input token usage, category counts are scaled so they sum to the reported total; otherwise raw heuristic estimates are returned.
func (*AppState) GetLastUsage ¶
func (s *AppState) GetLastUsage() *llm.TokenUsage
func (*AppState) GetMessages ¶
func (*AppState) GetSkillsConfig ¶
func (*AppState) GetSubagents ¶
func (*AppState) GetToolRegistry ¶
func (*AppState) IsAdversaryClientReady ¶
func (*AppState) IsClientReady ¶
func (s *AppState) IsClientReady(cfg *config.ResolvedConfig) bool
func (*AppState) ReloadSkills ¶
func (*AppState) ReloadSubagents ¶
func (*AppState) RemoveSkillStatus ¶
func (*AppState) ReplaceMessages ¶
func (*AppState) ResetClientState ¶
func (s *AppState) ResetClientState()
func (*AppState) SetAdversaryClient ¶
func (*AppState) SetLastUsage ¶
func (s *AppState) SetLastUsage(usage *llm.TokenUsage)
func (*AppState) SetSkillStatus ¶
func (*AppState) SkillSuggestions ¶
func (*AppState) SkillsCatalog ¶
func (*AppState) StreamAdversary ¶
func (*AppState) StreamBtw ¶
func (s *AppState) StreamBtw(ctx context.Context, question string, opts ...llm.StreamOptions) (<-chan llm.StreamEvent, error)
func (*AppState) StreamChat ¶
func (s *AppState) StreamChat(ctx context.Context, cfg *config.ResolvedConfig, opts ...llm.StreamOptions) (<-chan llm.StreamEvent, error)
func (*AppState) StreamCompact ¶
func (s *AppState) StreamCompact(ctx context.Context, cfg *config.ResolvedConfig, extraPrompt string, opts ...llm.StreamOptions) (<-chan llm.StreamEvent, error)
func (*AppState) SubagentsCatalog ¶
func (*AppState) UpdateClient ¶
func (*AppState) WorkingDir ¶
Click to show internal directories.
Click to hide internal directories.