Versions in this module Expand all Collapse all v1 v1.8.0 Oct 15, 2026 v1.5.0 Oct 12, 2026 Changes in this version + const APIChunkTypeContentBlockDelta + const APIChunkTypeContentBlockStart + const APIChunkTypeContentBlockStop + const APIChunkTypeError + const APIChunkTypeMessageDelta + const APIChunkTypeMessageStop + const APIProviderAnthropic + const APIProviderBedrock + const APIProviderCodex + const APIProviderDeepSeek + const APIProviderFoundry + const APIProviderGemini + const APIProviderKimi + const APIProviderMiniMax + const APIProviderMistral + const APIProviderOllama + const APIProviderOpenAI + const APIProviderOpenCode + const APIProviderOpenRouter + const APIProviderVertex + const APIProviderWorkersAI + const APIProviderZAi + const ExecutionOriginAutomation + const ExecutionOriginInteractive + const ExecutionOriginSkillAgent + const PermissionModeAcceptEdits + const PermissionModeAuto + const PermissionModeBypass + const PermissionModeGranular + const PermissionModeNever + const PermissionModeOnRequest + const PromptTypeConfirm + const RoleAssistant + const RoleSystem + const RoleUser + const RuntimeEventTypePromptRequired + const RuntimeEventTypeToolPermissionRequired + const StopReasonEndTurn + var RuntimeEventEmitterKey = internaltypes.RuntimeEventEmitterKey + func AgentUserIDFromContext(ctx context.Context) string + func SubAgentMaxDepthFromContext(ctx context.Context) int + func WebSearchRunnerFromContext(ctx context.Context) any + func WithAgentUserID(ctx context.Context, userID string) context.Context + func WithPromptFn(ctx context.Context, fn PromptFn) context.Context + func WithSubAgentMaxDepth(ctx context.Context, depth int) context.Context + func WithWebSearchRunner(ctx context.Context, fn any) context.Context + type APIChunkType = internaltypes.APIChunkType + type APIProvider = internaltypes.APIProvider + type APIRequest = internaltypes.APIRequest + type APIResponse = internaltypes.APIResponse + type APIResponseChunk = internaltypes.APIResponseChunk + type ContentBlock = internaltypes.ContentBlock + type ContextWindow = internaltypes.ContextWindow + func GetContextWindow(model ModelIdentifier) ContextWindow + type ExecutionOrigin = internaltypes.ExecutionOrigin + func NormalizeExecutionOrigin(raw string) ExecutionOrigin + type ImageContent = internaltypes.ImageContent + type Message = internaltypes.Message + func UserMessage(id string, content string) Message + type ModelIdentifier = internaltypes.ModelIdentifier + type PermissionMode = internaltypes.PermissionMode + func NormalizePermissionMode(raw string) (PermissionMode, bool) + func NormalizePermissionModeOrDefault(mode PermissionMode, fallback PermissionMode) PermissionMode + type PromptFn = internaltypes.PromptFn + func PromptFnFromContext(ctx context.Context) PromptFn + type PromptOption = internaltypes.PromptOption + type PromptRequest = internaltypes.PromptRequest + type PromptResponse = internaltypes.PromptResponse + type PromptType = internaltypes.PromptType + type Role = internaltypes.Role + type RuntimeEvent = internaltypes.RuntimeEvent + type RuntimeEventType = internaltypes.RuntimeEventType + type SessionID = internaltypes.SessionID + type TextContent = internaltypes.TextContent + type TokenUsage = internaltypes.TokenUsage + type ToolPermissionRequest = internaltypes.ToolPermissionRequest + type ToolResultContent = internaltypes.ToolResultContent + type ToolUseContent = internaltypes.ToolUseContent + type TurnID = internaltypes.TurnID