Versions in this module Expand all Collapse all v0 v0.4.16 Aug 13, 2026 v0.4.15 Aug 11, 2026 v0.4.14 Aug 11, 2026 v0.4.13 Aug 10, 2026 Changes in this version type ToolDefinition + PromptGuidelinesFunc func(context.Context) ([]string, error) v0.4.12 Aug 10, 2026 Changes in this version + type MarkdownTransformContext struct + AvailableWidth int + IsStreaming bool + MessageType string + type MarkdownTransformer func(markdown string, context MarkdownTransformContext) string v0.4.11 Aug 3, 2026 v0.4.10 Jul 30, 2026 Changes in this version + var ErrRuntimeNotInitialized = errors.New("Extension runtime not initialized") + var ErrUIUnavailable = errors.New("UI not available") + func BashToolCall(event ToolCallEvent) (tools.BashToolInput, bool) + func BashToolResult(event ToolResultEvent) (tools.BashToolDetails, bool) + func EditToolCall(event ToolCallEvent) (tools.EditToolInput, bool) + func EditToolResult(event ToolResultEvent) (tools.EditToolDetails, bool) + func EmitSessionShutdown(ctx context.Context, runner *Runner, event SessionShutdownEvent) bool + func FindToolCall(event ToolCallEvent) (tools.FindToolInput, bool) + func FindToolResult(event ToolResultEvent) (tools.FindToolDetails, bool) + func GrepToolCall(event ToolCallEvent) (tools.GrepToolInput, bool) + func GrepToolResult(event ToolResultEvent) (tools.GrepToolDetails, bool) + func LoadCompiled(cwd string, catalog []CompiledExtension, overrides map[string]bool, ...) (*Registry, []CompiledLoadError) + func LsToolCall(event ToolCallEvent) (tools.LsToolInput, bool) + func LsToolResult(event ToolResultEvent) (tools.LsToolDetails, bool) + func ReadToolCall(event ToolCallEvent) (tools.ReadToolInput, bool) + func ReadToolResult(event ToolResultEvent) (tools.ReadToolDetails, bool) + func RegisterCustomEditorBase(factory EditorFactory) + func WrapRegisteredTool(tool RegisteredTool, runner *Runner) agent.AgentTool + func WrapRegisteredTools(tools []RegisteredTool, runner *Runner) []agent.AgentTool + func WriteToolCall(event ToolCallEvent) (tools.WriteToolInput, bool) + func WriteToolResult(event ToolResultEvent) bool + type API interface + AppendEntry func(context.Context, string, any) error + Events func() EventBus + Exec func(context.Context, string, []string, *ExecOptions) (ExecResult, error) + GetActiveTools func() ([]string, error) + GetAllTools func() ([]ToolInfo, error) + GetCommands func() ([]SlashCommandInfo, error) + GetFlag func(string) (any, bool) + GetSessionName func(context.Context) (*string, error) + GetThinkingLevel func() (agent.ThinkingLevel, error) + On func(EventType, Handler) + RegisterCommand func(string, Command) + RegisterEntryRenderer func(string, EntryRenderer) + RegisterFlag func(string, Flag) + RegisterMessageRenderer func(string, MessageRenderer) + RegisterProvider func(Provider) + RegisterProviderConfig func(string, ProviderConfig) + RegisterShortcut func(string, Shortcut) + RegisterTool func(ToolDefinition) + SendMessage func(context.Context, CustomMessage, *SendMessageOptions) error + SendUserMessage func(context.Context, ai.UserContent, *SendUserMessageOptions) error + SetActiveTools func([]string) error + SetLabel func(context.Context, string, *string) error + SetModel func(context.Context, *ai.Model) (bool, error) + SetSessionName func(context.Context, string) error + SetThinkingLevel func(agent.ThinkingLevel) error + UnregisterProvider func(string) + type Actions struct + AppendEntry func(context.Context, string, any) error + GetActiveTools func() ([]string, error) + GetAllTools func() ([]ToolInfo, error) + GetCommands func() ([]SlashCommandInfo, error) + GetSessionName func(context.Context) (*string, error) + GetThinkingLevel func() (agent.ThinkingLevel, error) + RefreshTools func() + RegisterProvider func(Provider) error + RegisterProviderConfig func(string, ProviderConfig) error + SendMessage func(context.Context, CustomMessage, *SendMessageOptions) error + SendUserMessage func(context.Context, ai.UserContent, *SendUserMessageOptions) error + SetActiveTools func([]string) error + SetLabel func(context.Context, string, *string) error + SetModel func(context.Context, *ai.Model) (bool, error) + SetSessionName func(context.Context, string) error + SetThinkingLevel func(agent.ThinkingLevel) error + UnregisterProvider func(string) error + type AfterProviderResponseEvent struct + Headers map[string]string + Status int + func (AfterProviderResponseEvent) Type() EventType + type AgentEndEvent struct + Messages agent.AgentMessages + func (AgentEndEvent) Type() EventType + type AgentSettledEvent struct + func (AgentSettledEvent) Type() EventType + type AgentStartEvent struct + func (AgentStartEvent) Type() EventType + type AuthStatus struct + Configured bool + Label string + Source string + type AutocompleteEditorComponent interface + SetAutocompleteProvider func(AutocompleteProvider) + type AutocompleteItem struct + Description string + Label string + Value string + type AutocompleteProvider interface + ApplyCompletion func(AutocompleteRequest, AutocompleteItem, string) ([]string, int, int) + GetSuggestions func(context.Context, AutocompleteRequest) (*AutocompleteResult, error) + ShouldTriggerFileCompletion func(AutocompleteRequest) bool + TriggerCharacters func() []string + type AutocompleteProviderFactory func(AutocompleteProvider) AutocompleteProvider + type AutocompleteRequest struct + CursorCol int + CursorLine int + Force bool + Lines []string + Signal context.Context + type AutocompleteResult struct + Items []AutocompleteItem + Prefix string + type BashResult struct + Cancelled bool + ExitCode *int + FullOutput *string + Output string + Truncated bool + type BeforeAgentStartCombinedResult struct + Messages []CustomMessage + SystemPrompt *string + type BeforeAgentStartEvent struct + Images []*ai.ImageContent + Prompt string + SystemPrompt string + SystemPromptOptions SystemPromptOptions + func (BeforeAgentStartEvent) Type() EventType + type BeforeAgentStartResult struct + Message *CustomMessage + SystemPrompt *string + type BeforeProviderHeadersEvent struct + Headers ai.ProviderHeaders + func (BeforeProviderHeadersEvent) Type() EventType + type BeforeProviderRequestEvent struct + Payload any + func (BeforeProviderRequestEvent) Type() EventType + type Command struct + Description string + GetArgumentCompletions func(context.Context, string) ([]AutocompleteItem, error) + Handler func(context.Context, string, CommandContext) error + Name string + SourceInfo SourceInfo + type CommandActions struct + Fork func(context.Context, string, *ForkOptions) (SessionReplacementResult, error) + NavigateTree func(context.Context, string, *NavigateTreeOptions) (SessionReplacementResult, error) + NewSession func(context.Context, *NewSessionOptions) (SessionReplacementResult, error) + Reload func(context.Context) error + SwitchSession func(context.Context, string, *SwitchSessionOptions) (SessionReplacementResult, error) + WaitForIdle func(context.Context) error + type CommandContext interface + Fork func(context.Context, string, *ForkOptions) (SessionReplacementResult, error) + GetSystemPromptOptions func() SystemPromptOptions + NavigateTree func(context.Context, string, *NavigateTreeOptions) (SessionReplacementResult, error) + NewSession func(context.Context, *NewSessionOptions) (SessionReplacementResult, error) + Reload func(context.Context) error + SwitchSession func(context.Context, string, *SwitchSessionOptions) (SessionReplacementResult, error) + WaitForIdle func(context.Context) error + type CompactOptions struct + CustomInstructions string + OnComplete func(session.CompactionResult) + OnError func(error) + type CompactionReason string + const CompactionManual + const CompactionOverflow + const CompactionThreshold + type CompiledExtension struct + DefaultEnabled bool + Factory Factory + Hidden bool + Name string + type CompiledLoadError struct + Err error + Name string + func (loadError CompiledLoadError) Error() string + type Component interface + Render func(int) []string + type ComponentFactory func(UIHost, Theme) Component + type Context interface + Abort func() + CWD func() string + Compact func(*CompactOptions) + GetContextUsage func() *ContextUsage + GetSystemPrompt func() string + HasPendingMessages func() bool + HasUI func() bool + IsIdle func() bool + IsProjectTrusted func() bool + Mode func() Mode + Model func() *ai.Model + ModelRegistry func() ModelRegistry + ScopedModels func() []ScopedModel + SessionManager func() ReadonlySessionManager + Shutdown func() + Signal func() context.Context + ThinkingLevel func() agent.ThinkingLevel + UI func() UI + type ContextActions struct + Abort func() + Compact func(*CompactOptions) + GetContextUsage func() *ContextUsage + GetModel func() *ai.Model + GetScopedModels func() []ScopedModel + GetSignal func() context.Context + GetSystemPrompt func() string + GetSystemPromptOptions func() SystemPromptOptions + HasPendingMessages func() bool + IsIdle func() bool + IsProjectTrusted func() bool + Shutdown func() + type ContextEvent struct + Messages agent.AgentMessages + func (ContextEvent) Type() EventType + type ContextFile struct + Content string + Path string + type ContextResult struct + Messages agent.AgentMessages + type ContextUsage struct + ContextWindow int64 + Percent *float64 + Tokens *int64 + type CustomDone func(any) + type CustomFactory func(UIHost, Theme, Keybindings, CustomDone) (Component, error) + type CustomMessage struct + Content any + CustomType string + Details any + Display bool + type CustomOptions struct + DynamicOverlayOptions func() OverlayOptions + OnHandle func(OverlayHandle) + Overlay bool + StaticOverlayOptions *OverlayOptions + type DeliveryMode string + const DeliverFollowUp + const DeliverNextTurn + const DeliverSteer + type Diagnostic struct + Message string + Path string + Type string + type DialogOptions struct + Signal context.Context + Timeout *int64 + type DiscoveredPath struct + ExtensionPath string + Path string + type DiscoveredResources struct + PromptPaths []DiscoveredPath + SkillPaths []DiscoveredPath + ThemePaths []DiscoveredPath + type DisposableComponent interface + Dispose func() + type EditorComponent interface + GetText func() string + HandleInput func(string) + SetText func(string) + type EditorFactory func(UIHost, Theme, Keybindings) EditorComponent + func CustomEditorBase() EditorFactory + type EntryRenderOptions struct + Expanded bool + type EntryRenderer func(any, EntryRenderOptions, Theme) Component + type Event interface + Type func() EventType + type EventBus interface + Clear func() + Emit func(context.Context, string, any) []error + On func(string, EventListener) func() + func NewEventBus() EventBus + type EventListener func(context.Context, any) error + type EventType string + const EventAfterProviderResponse + const EventAgentEnd + const EventAgentSettled + const EventAgentStart + const EventBeforeAgentStart + const EventBeforeProviderHeaders + const EventBeforeProviderRequest + const EventContext + const EventInput + const EventMessageEnd + const EventMessageStart + const EventMessageUpdate + const EventModelSelect + const EventProjectTrust + const EventResourcesDiscover + const EventSessionBeforeCompact + const EventSessionBeforeFork + const EventSessionBeforeSwitch + const EventSessionBeforeTree + const EventSessionCompact + const EventSessionInfoChanged + const EventSessionShutdown + const EventSessionStart + const EventSessionTree + const EventThinkingLevelSelect + const EventToolCall + const EventToolExecutionEnd + const EventToolExecutionStart + const EventToolExecutionUpdate + const EventToolResult + const EventTurnEnd + const EventTurnStart + const EventUserBash + type ExecOptions struct + CWD string + Context context.Context + Env []string + Timeout int64 + type ExecResult struct + Code int + Killed bool + Stderr string + Stdout string + func Exec(ctx context.Context, command string, args []string, options *ExecOptions) (ExecResult, error) + type Extension struct + Hidden bool + Path string + ResolvedPath string + SourceInfo SourceInfo + type ExtensionError struct + Error string + Event string + ExtensionPath string + Stack string + type Factory func(API) error + type Flag struct + Default any + Description string + ExtensionPath string + Name string + Type FlagType + type FlagType string + const FlagBoolean + const FlagString + type FooterDataProvider interface + GitBranch func() string + Statuses func() map[string]string + type FooterFactory func(UIHost, Theme, FooterDataProvider) Component + type ForkOptions struct + Position ForkPosition + WithSession func(context.Context, ReplacedSessionContext) error + type ForkPosition string + const ForkAt + const ForkBefore + type Handler func(context.Context, Event, Context) (any, error) + type HeaderFactory func(UIHost, Theme) Component + type InputAction string + const InputContinue + const InputHandled + const InputTransform + type InputEvent struct + Images []*ai.ImageContent + Source InputSource + StreamingBehavior *DeliveryMode + Text string + func (InputEvent) Type() EventType + type InputResult struct + Action InputAction + Images []*ai.ImageContent + Text string + type InputSource string + const InputExtension + const InputInteractive + const InputRPC + type KeybindingConflict struct + Bindings []string + Key string + type KeybindingDefinition struct + DefaultKeys []string + Description string + type Keybindings interface + Conflicts func() []KeybindingConflict + Definition func(binding string) KeybindingDefinition + Keys func(binding string) []string + Matches func(input, binding string) bool + ResolvedBindings func() map[string][]string + UserBindings func() map[string][]string + type MessageEndEvent struct + Message agent.AgentMessage + func (MessageEndEvent) Type() EventType + type MessageEndResult struct + Message agent.AgentMessage + type MessageRenderOptions struct + Expanded bool + OutputPad int + type MessageRenderer func(CustomMessage, MessageRenderOptions, Theme) Component + type MessageStartEvent struct + Message agent.AgentMessage + func (MessageStartEvent) Type() EventType + type MessageUpdateEvent struct + AssistantMessageEvent ai.AssistantMessageEvent + Message agent.AgentMessage + func (MessageUpdateEvent) Type() EventType + type Mode string + const ModeJSON + const ModePrint + const ModeRPC + const ModeTUI + type ModelRegistry interface + Available func(env map[string]string) []ai.Model + AvailableWithError func(env map[string]string) ([]ai.Model, error) + Error func() string + Find func(provider, id string) (ai.Model, bool) + GetProviderAuthStatus func(provider string, env map[string]string) AuthStatus + HasConfiguredAuth func(provider string, env map[string]string) bool + IsUsingOAuth func(provider string) bool + Models func() []ai.Model + Provider func(string) (Provider, bool) + ProviderAuth func(string) aiauth.ProviderAuth + ProviderDisplayName func(string) string + RegisterProvider func(Provider) error + RegisterProviderConfig func(string, ProviderConfig) error + RegisteredNativeProvider func(string) (Provider, bool) + RegisteredProviderConfig func(string) (ProviderConfig, bool) + RegisteredProviderIDs func() []string + Reload func() error + ResolveAPIKey func(context.Context, string, map[string]string) (*string, error) + ResolveModelHeaders func(context.Context, ai.Model, map[string]string, ...*string) (*map[string]string, error) + ResolveProviderAuth func(context.Context, string, map[string]string) (*aiauth.AuthResult, error) + StreamSimple func(context.Context, *ai.Model, ai.Context, *ai.SimpleStreamOptions) (ai.AssistantMessageEventStream, error) + UnregisterProvider func(string) error + type ModelSelectEvent struct + Model *ai.Model + PreviousModel *ai.Model + Source ModelSelectSource + func (ModelSelectEvent) Type() EventType + type ModelSelectSource string + const ModelSelectCycle + const ModelSelectRestore + const ModelSelectSet + type NavigateTreeOptions struct + CustomInstructions string + Label string + ReplaceInstructions bool + Summarize bool + type NewSessionOptions struct + ParentSession string + Setup func(*session.SessionManager) error + WithSession func(context.Context, ReplacedSessionContext) error + type NoopUI struct + func (NoopUI) AddAutocompleteProvider(AutocompleteProviderFactory) + func (NoopUI) Confirm(context.Context, string, string, *DialogOptions) (bool, error) + func (NoopUI) Custom(context.Context, CustomFactory, *CustomOptions) (any, bool, error) + func (NoopUI) Editor(context.Context, string, *string) (string, bool, error) + func (NoopUI) GetAllThemes() []ThemeInfo + func (NoopUI) GetEditorComponent() EditorFactory + func (NoopUI) GetEditorText() string + func (NoopUI) GetTheme(string) Theme + func (NoopUI) GetToolsExpanded() bool + func (NoopUI) Input(context.Context, string, *string, *DialogOptions) (string, bool, error) + func (NoopUI) Notify(string, NotificationType) + func (NoopUI) OnTerminalInput(TerminalInputHandler) func() + func (NoopUI) PasteToEditor(string) + func (NoopUI) Select(context.Context, string, []string, *DialogOptions) (string, bool, error) + func (NoopUI) SetEditorComponent(EditorFactory) + func (NoopUI) SetEditorText(string) + func (NoopUI) SetFooter(FooterFactory) + func (NoopUI) SetHeader(HeaderFactory) + func (NoopUI) SetHiddenThinkingLabel(*string) + func (NoopUI) SetStatus(string, *string) + func (NoopUI) SetTheme(any) ThemeSetResult + func (NoopUI) SetTitle(string) + func (NoopUI) SetToolsExpanded(bool) + func (NoopUI) SetWidget(string, *Widget, *WidgetOptions) + func (NoopUI) SetWorkingIndicator(*WorkingIndicatorOptions) + func (NoopUI) SetWorkingMessage(*string) + func (NoopUI) SetWorkingVisible(bool) + func (NoopUI) Theme() Theme + type NotificationType string + const NotifyError + const NotifyInfo + const NotifyWarning + type OAuthAuthInfo struct + Instructions string + URL string + type OAuthCredentials struct + Access string + Expires int64 + Extra map[string]any + Refresh string + func (credentials *OAuthCredentials) UnmarshalJSON(data []byte) error + func (credentials OAuthCredentials) MarshalJSON() ([]byte, error) + type OAuthDeviceCodeInfo struct + ExpiresInSeconds int + IntervalSeconds int + UserCode string + VerificationURI string + type OAuthLoginCallbacks struct + OnAuth func(OAuthAuthInfo) + OnDeviceCode func(OAuthDeviceCodeInfo) + OnManualCodeInput func() (string, error) + OnProgress func(string) + OnPrompt func(OAuthPrompt) (string, error) + OnSelect func(OAuthSelectPrompt) (*string, error) + Signal context.Context + type OAuthPrompt struct + AllowEmpty bool + Message string + Placeholder string + type OAuthProvider struct + GetAPIKey func(OAuthCredentials) (string, error) + Login func(context.Context, OAuthLoginCallbacks) (OAuthCredentials, error) + ModifyModels func([]ai.Model, OAuthCredentials) ([]ai.Model, error) + Name string + RefreshToken func(context.Context, OAuthCredentials) (OAuthCredentials, error) + type OAuthSelectOption struct + ID string + Label string + type OAuthSelectPrompt struct + Message string + Options []OAuthSelectOption + type OverlayAnchor string + const OverlayBottom + const OverlayBottomLeft + const OverlayBottomRight + const OverlayCenter + const OverlayLeft + const OverlayRight + const OverlayTop + const OverlayTopLeft + const OverlayTopRight + type OverlayHandle interface + Focus func() + Hide func() + IsFocused func() bool + IsHidden func() bool + SetHidden func(bool) + Unfocus func(...OverlayUnfocusOptions) + type OverlayOptions struct + Anchor OverlayAnchor + Column any + Margin any + MaxHeight any + MinWidth int + NonCapturing bool + OffsetX int + OffsetY int + Row any + Visible func(width, height int) bool + Width any + type OverlayUnfocusOptions struct + Target Component + type ProjectTrustContext interface + CWD func() string + HasUI func() bool + Mode func() Mode + UI func() TrustUI + type ProjectTrustDecision string + const ProjectTrustNo + const ProjectTrustUndecided + const ProjectTrustYes + type ProjectTrustEvent struct + CWD string + func (ProjectTrustEvent) Type() EventType + type ProjectTrustResult struct + Remember bool + Trusted ProjectTrustDecision + type Provider struct + Auth aiauth.ProviderAuth + BaseURL string + Config ProviderConfig + FilterModels func([]ai.Model, *aiauth.Credential) ([]ai.Model, error) + GetModels func() ([]ai.Model, error) + Headers map[string]string + ID string + Name string + RefreshModels func(RefreshModelsContext) error + RegistrationValue any + Stream agent.StreamFn + StreamSimple agent.StreamFn + type ProviderConfig struct + API ai.API + APIKey string + AuthHeader *bool + BaseURL string + Defined map[string]bool + Headers map[string]string + Models []ProviderModelConfig + Name string + OAuth *OAuthProvider + RefreshModels func(RefreshModelsContext) ([]ProviderModelConfig, error) + RegistrationValues map[string]any + Stream agent.StreamFn + type ProviderModelConfig struct + API ai.API + BaseURL string + Compat json.RawMessage + ContextWindow float64 + Cost ai.ModelCost + Headers map[string]string + ID string + Input ai.InputModalities + MaxTokens float64 + Name string + Reasoning bool + ThinkingLevelMap *map[ai.ModelThinkingLevel]*string + type ProviderModelStore interface + Delete func(context.Context) error + Read func(context.Context) (*ProviderModelsStoreEntry, error) + Write func(context.Context, ProviderModelsStoreEntry) error + type ProviderModelsStoreEntry struct + CheckedAt *int64 + Models []ai.Model + type ProviderRequestResult struct + Payload any + Replace bool + type ReadonlySessionManager interface + BuildContextEntries func() []session.SessionEntry + BuildSessionContext func() session.SessionContext + GetBranch func(...string) []session.SessionEntry + GetCWD func() string + GetChildren func(string) []session.SessionEntry + GetEntries func() []session.SessionEntry + GetEntry func(string) *session.SessionEntry + GetHeader func() *session.SessionHeader + GetLabel func(string) *string + GetLeafEntry func() *session.SessionEntry + GetLeafID func() *string + GetSessionDir func() string + GetSessionFile func() string + GetSessionID func() string + GetSessionName func() *string + GetTree func() []*session.SessionTreeNode + IsPersisted func() bool + type RefreshModelsContext struct + AllowNetwork bool + Credential *aiauth.Credential + Force bool + Signal context.Context + Store ProviderModelStore + type RegisterOption func(*registerOptions) + func WithHidden(hidden bool) RegisterOption + func WithSourceInfo(sourceInfo SourceInfo) RegisterOption + type RegisteredTool struct + Definition ToolDefinition + SourceInfo SourceInfo + type Registry struct + func NewRegistry(cwd string) *Registry + func (registry *Registry) BindModelRegistry(models ModelRegistry, report func(ExtensionError)) + func (registry *Registry) Events() EventBus + func (registry *Registry) Extensions() []*Extension + func (registry *Registry) Fresh(cwd string) (*Registry, error) + func (registry *Registry) HasPath(path string) bool + func (registry *Registry) Len() int + func (registry *Registry) Register(path string, factory Factory, options ...RegisterOption) error + func (registry *Registry) RegisteredFlags() []Flag + func (registry *Registry) SetFlagValue(name string, value any) + type RenderShell string + const RenderShellDefault + const RenderShellSelf + type ReplacedSessionContext interface + SendMessage func(context.Context, CustomMessage, *SendMessageOptions) error + SendUserMessage func(context.Context, ai.UserContent, *SendUserMessageOptions) error + type ResolvedCommand struct + InvocationName string + type ResourcesDiscoverEvent struct + CWD string + Reason ResourcesDiscoverReason + func (ResourcesDiscoverEvent) Type() EventType + type ResourcesDiscoverReason string + const ResourcesDiscoverReload + const ResourcesDiscoverStartup + type ResourcesDiscoverResult struct + PromptPaths []string + SkillPaths []string + ThemePaths []string + type Runner struct + func NewRunner(registry *Registry, options RunnerOptions) *Runner + func (runner *Runner) ActiveTools() ([]string, error) + func (runner *Runner) AllRegisteredTools() []RegisteredTool + func (runner *Runner) BindCommandContext(actions *CommandActions) + func (runner *Runner) BindCore(actions Actions, contextActions ContextActions) + func (runner *Runner) Command(name string) *ResolvedCommand + func (runner *Runner) CommandDiagnostics() []Diagnostic + func (runner *Runner) CreateCommandContext() CommandContext + func (runner *Runner) CreateContext() Context + func (runner *Runner) CreateReplacedSessionContext() ReplacedSessionContext + func (runner *Runner) Emit(ctx context.Context, event Event) any + func (runner *Runner) EmitBeforeAgentStart(ctx context.Context, prompt string, images []*ai.ImageContent, ...) *BeforeAgentStartCombinedResult + func (runner *Runner) EmitBeforeProviderHeaders(ctx context.Context, headers ai.ProviderHeaders) ai.ProviderHeaders + func (runner *Runner) EmitBeforeProviderRequest(ctx context.Context, payload any) any + func (runner *Runner) EmitContext(ctx context.Context, messages agent.AgentMessages) agent.AgentMessages + func (runner *Runner) EmitInput(ctx context.Context, text string, images []*ai.ImageContent, ...) InputResult + func (runner *Runner) EmitMessageEnd(ctx context.Context, event MessageEndEvent) agent.AgentMessage + func (runner *Runner) EmitProjectTrust(ctx context.Context, event ProjectTrustEvent, trustContext Context) (*ProjectTrustResult, []ExtensionError) + func (runner *Runner) EmitResourcesDiscover(ctx context.Context, cwd string, reason ResourcesDiscoverReason) DiscoveredResources + func (runner *Runner) EmitToolCall(ctx context.Context, event ToolCallEvent) *ToolCallResult + func (runner *Runner) EmitToolResult(ctx context.Context, event ToolResultEvent) *ToolResultResult + func (runner *Runner) EmitUserBash(ctx context.Context, event UserBashEvent) *UserBashResult + func (runner *Runner) EntryRenderer(customType string) EntryRenderer + func (runner *Runner) ExecuteCommand(ctx context.Context, name, args string) bool + func (runner *Runner) ExtensionPaths() []string + func (runner *Runner) FlagValues() map[string]any + func (runner *Runner) Flags() map[string]Flag + func (runner *Runner) HasHandlers(event EventType) bool + func (runner *Runner) HasUI() bool + func (runner *Runner) Invalidate(message string) + func (runner *Runner) MessageRenderer(customType string) MessageRenderer + func (runner *Runner) ModelRegistry() ModelRegistry + func (runner *Runner) OnError(listener func(ExtensionError)) func() + func (runner *Runner) RegisteredCommands() []ResolvedCommand + func (runner *Runner) RegisteredFlags() []Flag + func (runner *Runner) SetFlagValue(name string, value any) + func (runner *Runner) SetUI(ui UI, mode Mode) + func (runner *Runner) ShortcutDiagnostics() []Diagnostic + func (runner *Runner) ShortcutOrder() []string + func (runner *Runner) Shortcuts(bindings map[string][]string) map[string]Shortcut + func (runner *Runner) Shutdown() + func (runner *Runner) ToolDefinition(name string) *ToolDefinition + func (runner *Runner) UI() UI + type RunnerOptions struct + Actions Actions + CWD string + CommandActions *CommandActions + ContextActions ContextActions + ErrorHandler func(ExtensionError) + Mode Mode + ModelRegistry ModelRegistry + SessionManager ReadonlySessionManager + UI UI + type ScopedModel struct + Model ai.Model + ThinkingLevel *ai.ModelThinkingLevel + type SendMessageOptions struct + DeliverAs DeliveryMode + TriggerTurn bool + type SendUserMessageOptions struct + DeliverAs DeliveryMode + type SessionBeforeCompactEvent struct + BranchEntries []session.SessionEntry + CustomInstructions *string + Preparation harness.CompactionPreparation + Reason CompactionReason + Signal context.Context + WillRetry bool + func (SessionBeforeCompactEvent) Type() EventType + type SessionBeforeCompactResult struct + Cancel bool + Compaction *session.CompactionResult + type SessionBeforeForkEvent struct + EntryID string + Position ForkPosition + func (SessionBeforeForkEvent) Type() EventType + type SessionBeforeForkResult struct + Cancel bool + SkipConversationRestore bool + type SessionBeforeSwitchEvent struct + Reason SessionSwitchReason + TargetSessionFile *string + func (SessionBeforeSwitchEvent) Type() EventType + type SessionBeforeSwitchResult struct + Cancel bool + type SessionBeforeTreeEvent struct + Preparation TreePreparation + Signal context.Context + func (SessionBeforeTreeEvent) Type() EventType + type SessionBeforeTreeResult struct + Cancel bool + CustomInstructions *string + Label *string + ReplaceInstructions *bool + Summary *TreeSummary + type SessionCompactEvent struct + CompactionEntry session.SessionEntry + FromExtension bool + Reason CompactionReason + WillRetry bool + func (SessionCompactEvent) Type() EventType + type SessionInfoChangedEvent struct + Name *string + func (SessionInfoChangedEvent) Type() EventType + type SessionReplacementResult struct + Cancelled bool + type SessionShutdownEvent struct + Reason SessionShutdownReason + TargetSessionFile *string + func (SessionShutdownEvent) Type() EventType + type SessionShutdownReason string + const SessionShutdownFork + const SessionShutdownNew + const SessionShutdownQuit + const SessionShutdownReload + const SessionShutdownResume + type SessionStartEvent struct + PreviousSessionFile *string + Reason SessionStartReason + func (SessionStartEvent) Type() EventType + type SessionStartReason string + const SessionStartFork + const SessionStartNew + const SessionStartReload + const SessionStartResume + const SessionStartStartup + type SessionSwitchReason string + const SessionSwitchNew + const SessionSwitchResume + type SessionTreeEvent struct + FromExtension *bool + NewLeafID *string + OldLeafID *string + SummaryEntry *session.SessionEntry + func (SessionTreeEvent) Type() EventType + type Shortcut struct + Description string + ExtensionPath string + Handler func(context.Context, Context) error + Shortcut string + type Skill struct + BaseDir string + Description string + DisableModelInvocation bool + FilePath string + Name string + SourceInfo SourceInfo + type SlashCommandInfo struct + Description string + Name string + Source SlashCommandSource + SourceInfo SourceInfo + type SlashCommandSource string + const SlashCommandExtension + const SlashCommandPrompt + const SlashCommandSkill + type SourceInfo struct + BaseDir *string + Origin SourceOrigin + Path string + Scope SourceScope + Source string + type SourceOrigin string + const SourceOriginPackage + const SourceOriginTopLevel + type SourceScope string + const SourceScopeProject + const SourceScopeTemporary + const SourceScopeUser + type SwitchSessionOptions struct + WithSession func(context.Context, ReplacedSessionContext) error + type SystemPromptOptions struct + AppendSystemPrompt *string + CWD string + ContextFiles []ContextFile + CustomPrompt *string + PromptGuidelines []string + SelectedTools []string + Skills []Skill + ToolSnippets map[string]string + type TerminalInputHandler func(string) *TerminalInputResult + type TerminalInputResult struct + Consume bool + Data *string + type Theme interface + BG func(color, text string) string + BGANSI func(string) string + BashModeBorderColor func() func(string) string + Bold func(string) string + ColorMode func() string + FG func(color, text string) string + FGANSI func(string) string + Inverse func(string) string + Italic func(string) string + Strikethrough func(string) string + ThinkingBorderColor func(agent.ThinkingLevel) func(string) string + Underline func(string) string + type ThemeInfo struct + Name string + Path *string + type ThemeSetResult struct + Error string + Success bool + type ThinkingLevelSelectEvent struct + Level agent.ThinkingLevel + PreviousLevel agent.ThinkingLevel + func (ThinkingLevelSelectEvent) Type() EventType + type ToolCallEvent struct + Input map[string]any + ToolCallID string + ToolName string + func (ToolCallEvent) Type() EventType + type ToolCallResult struct + Block bool + Reason string + type ToolDefinition struct + ConstrainedSampling *ai.ConstrainedSamplingConfig + Description string + Execute func(context.Context, string, any, agent.AgentToolUpdateCallback, Context) (agent.AgentToolResult, error) + ExecutionMode agent.ToolExecutionMode + Label string + Name string + Parameters ai.JSONSchema + PrepareArguments agent.PrepareArgumentsFunc + PromptGuidelines []string + PromptSnippet string + RenderCall func(any, Theme, ToolRenderContext) Component + RenderResult func(agent.AgentToolResult, ToolRenderResultOptions, Theme, ToolRenderContext) Component + RenderShell RenderShell + type ToolExecutionEndEvent struct + IsError bool + Result any + ToolCallID string + ToolName string + func (ToolExecutionEndEvent) Type() EventType + type ToolExecutionStartEvent struct + Args any + ToolCallID string + ToolName string + func (ToolExecutionStartEvent) Type() EventType + type ToolExecutionUpdateEvent struct + Args any + PartialResult any + ToolCallID string + ToolName string + func (ToolExecutionUpdateEvent) Type() EventType + type ToolInfo struct + Description string + Name string + Parameters ai.JSONSchema + PromptGuidelines []string + SourceInfo SourceInfo + type ToolRenderContext struct + Args any + ArgsComplete bool + CWD string + ExecutionStarted bool + Expanded bool + Invalidate func() + IsError bool + IsPartial bool + LastComponent Component + ShowImages bool + State map[string]any + ToolCallID string + type ToolRenderResultOptions struct + Expanded bool + IsPartial bool + type ToolResultEvent struct + Content ai.ToolResultContent + Details any + Input map[string]any + IsError bool + ToolCallID string + ToolName string + Usage *ai.Usage + func (ToolResultEvent) Type() EventType + type ToolResultResult struct + Content *ai.ToolResultContent + Details *any + IsError *bool + Usage *ai.Usage + type TreePreparation struct + CommonAncestorID *string + CustomInstructions *string + EntriesToSummarize []session.SessionEntry + Label *string + OldLeafID *string + ReplaceInstructions bool + TargetID string + UserWantsSummary bool + type TreeSummary struct + Details any + Summary string + Usage *ai.Usage + type TrustUI interface + Confirm func(context.Context, string, string, *DialogOptions) (bool, error) + Input func(context.Context, string, *string, *DialogOptions) (string, bool, error) + Notify func(string, NotificationType) + Select func(context.Context, string, []string, *DialogOptions) (string, bool, error) + type TurnEndEvent struct + Message agent.AgentMessage + ToolResults []*ai.ToolResultMessage + TurnIndex int + func (TurnEndEvent) Type() EventType + type TurnStartEvent struct + Timestamp int64 + TurnIndex int + func (TurnStartEvent) Type() EventType + type UI interface + AddAutocompleteProvider func(AutocompleteProviderFactory) + Custom func(context.Context, CustomFactory, *CustomOptions) (any, bool, error) + Editor func(context.Context, string, *string) (string, bool, error) + GetAllThemes func() []ThemeInfo + GetEditorComponent func() EditorFactory + GetEditorText func() string + GetTheme func(string) Theme + GetToolsExpanded func() bool + OnTerminalInput func(TerminalInputHandler) func() + PasteToEditor func(string) + SetEditorComponent func(EditorFactory) + SetEditorText func(string) + SetFooter func(FooterFactory) + SetHeader func(HeaderFactory) + SetHiddenThinkingLabel func(*string) + SetStatus func(string, *string) + SetTheme func(any) ThemeSetResult + SetTitle func(string) + SetToolsExpanded func(bool) + SetWidget func(string, *Widget, *WidgetOptions) + SetWorkingIndicator func(*WorkingIndicatorOptions) + SetWorkingMessage func(*string) + SetWorkingVisible func(bool) + Theme func() Theme + func NewNoopUI() UI + type UIHost interface + Height func() int + Invalidate func() + Width func() int + type UserBashEvent struct + CWD string + Command string + ExcludeFromContext bool + func (UserBashEvent) Type() EventType + type UserBashResult struct + Operations tools.BashOperations + Result *BashResult + type Widget struct + Factory ComponentFactory + Lines []string + type WidgetOptions struct + Placement WidgetPlacement + type WidgetPlacement string + const WidgetAboveEditor + const WidgetBelowEditor + type WorkingIndicatorOptions struct + Frames []string + IntervalMS int64