Versions in this module Expand all Collapse all v0 v0.2.25 Nov 4, 2026 v0.2.24 Nov 3, 2026 Changes in this version type Config + Sandbox sandbox.Runtime type CustomShell + Commands map[string]string + NetworkTargets []string v0.2.23 Nov 3, 2026 v0.2.22 Nov 3, 2026 v0.2.21 Nov 2, 2026 v0.2.20 Oct 31, 2026 Changes in this version + func EasyRoot(shell *CustomShell, name string) (root *os.Root, rel string, err error) + func ParseModelRef(ref string) (model, effort string) type Agent + ApproverModel string + ApproverPrompt string + Commands map[string]string + DelegatedFrom []string + Mode AgentMode + NetworkTargets []string + Routines []AgentRoutine + SecretsARN []string + Subagents []string + TagGroups [][]string + Tools []string + WorkingDirectory string + type AgentLoadConfig struct + MCPToolGroups map[string]map[string][]string + Providers []string + Skills fs.FS + type AgentMode string + const AgentModeAdvanced + const AgentModeEasy + type AgentRoutine struct + Instruction string + Schedule string type Config + OriginHeader string type CustomShell + Dir string + ReadOnly []string + Secrets map[string]string type PermissionSet + Easy bool type SubagentWrite + Model string + Tools []string v0.2.19 Oct 31, 2026 Changes in this version + const AllowBackgroundSubject + const ChatResponseAssistantCommentary + const ChatResponseAssistantMessage + const ChatResponseAssistantTool + const ChatResponseReasoningSummary + const MaxCodeModeCalls + const TurnBoundRefused + var ErrBackgroundKilled = errors.New("background job killed") + var ErrShutdown = errors.New("shutdown") + func BashPermissionSubjects(command string) []string + func CallKey(turnID, callID string) string + func CheckNestedPermission(ctx context.Context, toolName, permission, subject string, args map[string]any) error + func CheckNestedToolCall(ctx context.Context, toolName string, tool *looperTool, args json.RawMessage) error + func CodeModeOnlyHostTool(name string) bool + func CompactionCheckpointText(compaction *responses.ResponseCompactionItemParam) string + func InterpolatePermissions(agent *Agent, env []string) + func RemapReplayAttribution(ranges []ReplayAttribution, boundaries []int) + func ReplayInputFromParams(items []responses.ResponseInputItemUnionParam) ([]json.RawMessage, error) + func ReplayInputRawKind(raw json.RawMessage) string + func ReplayInputToParams(raw []json.RawMessage) ([]responses.ResponseInputItemUnionParam, error) + func ReviewKey(turnID, callID string) string + func ReviewTurn(callKey string) string + func SweepRetainedResults(root *os.Root, dir string) + func TaskResult(answer string) string + func ToolCallKey(ctx context.Context) string + type Agent struct + CustomShell CustomShell + Description string + FileMode fs.FileMode + Frontmatter map[string]any + FrontmatterNode *yaml.Node + Location string + MaxRecursion *int + Model string + Name string + OutputSchema map[string]any + Permission PermissionSet + Prompt string + ReasoningEffort string + Space string + Verbosity string + func ToolCallAgent(ctx context.Context) (Agent, bool) + type AgentLoadResult struct + Agents Agents + Errors []error + func LoadAgents(fsys fs.FS, models agentModelRenderer) AgentLoadResult + type AgentMaxRecursionError struct + Err error + Location string + func (e *AgentMaxRecursionError) Error() string + func (e *AgentMaxRecursionError) Unwrap() error + type Agents struct + Items map[string]Agent + func (a Agents) PrimaryNames() []string + func (a Agents) ShadowNames(parent string) []string + type Attachment struct + Filename string + MIME string + URL string + type BackgroundJob struct + Agent string + CallID string + Detached bool + ID string + Kind BackgroundKind + Label string + SubagentKey string + type BackgroundJobs interface + Enabled func() bool + Run func(ctx context.Context, job *BackgroundJob, work BackgroundWork) (BackgroundResult, error) + type BackgroundKind string + const BackgroundKindExecute + const BackgroundKindTask + type BackgroundResult struct + Moved bool + Output string + type BackgroundWork interface + Detach func() bool + RunBackground func(ctx context.Context) (string, error) + type BashResult struct + ErrorCode string + Output string + Success bool + func (r BashResult) String() string + type ChatResponse struct + Kind string + Provider *ProviderDiagnostic + Subagent *SubagentDiagnostic + Text string + Tool *ToolDiagnostic + type ChildKey struct + Call string + Parent string + Path string + Turn string + type ChildSessions interface + AppendChildEntry func(ctx context.Context, key ChildKey, entry *SessionEntry) error + AwaitSubagent func(ctx context.Context, key, callKey string) (string, ReplayAttribution, error) + WriteSubagent func(ctx context.Context, write *SubagentWrite) (steered bool, err error) + type CodeModeCall struct + Arguments string + Key string + Name string + Outcome permissionReviewOutcome + ParentCallID string + Reason string + Status codeModeCallStatus + Summary string + Type string + func CodeModeCallsFromTrace(traces []json.RawMessage) []CodeModeCall + func (r *CodeModeCall) String() string + type Config struct + AutoApprovePermissions bool + AutoApproverModel shared.ResponsesModel + BackgroundJobs BackgroundJobs + ChildContext []SessionEntry + ChildSessions ChildSessions + CompactThreshold int64 + CompactionSteering string + CustomTools []Tool + Diagnostics bool + ExpandPromptShellCommands PromptShellCommandExpansion + ExperimentalStrongerSkills bool + Journal Journal + MCPServers map[string]mcpclient.ServerConfig + MCPWorkspace string + Model shared.ResponsesModel + Observability ObservabilityConfig + ParallelToolCalls int + ReasoningEffort shared.ReasoningEffort + RetainedResultDir string + ShellCommand shellCommander + ShellEnv map[string]string + ShellTempDir string + SpillDir string + type ContinueMode string + const ContinueEnqueue + const ContinueSteer + const ContinueStop + type CustomShell struct + Emulated bool + Path string + Setup json.RawMessage + type DefaultShellCommand struct + func (DefaultShellCommand) Command(command string) (path string, args []string) + type InertBackgroundJobs struct + func (InertBackgroundJobs) Enabled() bool + func (InertBackgroundJobs) Run(ctx context.Context, _ *BackgroundJob, work BackgroundWork) (BackgroundResult, error) + type InertChildSessions struct + func (InertChildSessions) AppendChildEntry(context.Context, ChildKey, *SessionEntry) error + func (InertChildSessions) AwaitSubagent(context.Context, string, string) (string, ReplayAttribution, error) + func (InertChildSessions) WriteSubagent(context.Context, *SubagentWrite) (bool, error) + type InertJournal struct + func (InertJournal) CodeModeCalls(context.Context, string) ([]json.RawMessage, error) + func (InertJournal) Items(context.Context, string, TurnList) ([]json.RawMessage, error) + func (InertJournal) Load(context.Context, string) (value json.RawMessage, found bool, err error) + func (InertJournal) Save(context.Context, string, json.RawMessage) error + func (InertJournal) SaveCodeModeCall(context.Context, string, string, json.RawMessage) error + func (InertJournal) SaveTrace(context.Context, string, []json.RawMessage) error + func (InertJournal) SaveTurn(context.Context, string, json.RawMessage, []TurnItems) error + type InertSteerDrain struct + func (InertSteerDrain) Drain(context.Context, string, TurnPhase, []string) ([]PromptInput, error) + type Journal interface + CodeModeCalls func(ctx context.Context, turnID string) ([]json.RawMessage, error) + Items func(ctx context.Context, turnID string, list TurnList) ([]json.RawMessage, error) + Load func(ctx context.Context, key string) (json.RawMessage, bool, error) + Save func(ctx context.Context, key string, value json.RawMessage) error + SaveCodeModeCall func(ctx context.Context, turnID, key string, record json.RawMessage) error + SaveTrace func(ctx context.Context, turnID string, trace []json.RawMessage) error + SaveTurn func(ctx context.Context, turnID string, step json.RawMessage, lists []TurnItems) error + type Looper interface + Loop func(ctx context.Context, input <-chan PromptInput, ...) error + type ModelResolver interface + Resolve func(model string) (*openai.Client, ProviderOrigin, error) + type ObservabilityConfig struct + Enabled bool + TraceConfig instrumentation.TraceConfig + Tracer trace.Tracer + type PermissionAction string + const PermissionAllow + const PermissionAuto + const PermissionDeny + type PermissionBucket struct + Name string + Rules []PermissionRule + type PermissionReview struct + Outcome permissionReviewOutcome + Rationale string + func (r PermissionReview) CodeModeCall(e *SessionEntry) (CodeModeCall, bool) + type PermissionRule struct + Action PermissionAction + Pattern string + Reviewer string + type PermissionSet struct + Buckets []PermissionBucket + Sudo bool + func (ps *PermissionSet) Allow(permission, pattern string) error + func (ps *PermissionSet) Deny(permission, pattern string) error + func (ps *PermissionSet) Set(permission, pattern string, action PermissionAction) error + func (ps PermissionSet) Enabled(permission, subject string) bool + func (ps PermissionSet) Evaluate(permission, subject string) (action PermissionAction, matched bool) + type PromptInput struct + Agent string + Attachments []Attachment + DirectSkill *PromptInputDirectSkill + ExpandShellCommands bool + Header string + ID string + Responses chan<- ChatResponse + Role PromptInputRole + Texts []string + TurnID string + type PromptInputDirectSkill struct + Arguments string + Name string + type PromptInputRole string + const PromptInputRoleDeveloper + const PromptInputRoleUser + type PromptShellCommandExpansion struct + InputPrompts bool + PrimaryPrompts bool + SkillPrompts bool + SubagentPrompts bool + type ProviderDiagnostic struct + Attempt int + Code string + HTTPStatus int + Headers map[string]string + Message string + Model string + Phase string + Provider string + ResponseID string + ResponseStatus string + RetryAfter string + Type string + type ProviderOrigin struct + CompactThreshold int64 + Model string + PromptCacheMarkersRelativePosition *int + Provider string + type Providers struct + OpenAI *openai.Client + type PublicProgress struct + Agent string + ID string + Kind PublicProgressKind + Model string + ParentID string + State PublicProgressState + SubagentKey string + Text string + func PublicProgressFromTrace(traces []json.RawMessage) []PublicProgress + type PublicProgressKind string + const PublicProgressDelegation + const PublicProgressText + const PublicProgressTool + type PublicProgressState string + const PublicProgressBackground + const PublicProgressBlocked + const PublicProgressCompleted + const PublicProgressFailed + const PublicProgressReview + const PublicProgressStopped + const PublicProgressWorking + type ReplayAttribution struct + Agent string + End int + Model string + ReasoningEffort *string + Start int + type ReplayDecodeError struct + Cause error + EntryIndex int + ItemIndex int + Kind string + func (e *ReplayDecodeError) Error() string + func (e *ReplayDecodeError) Unwrap() error + type Runtime = looper + func NewWithModelResolver(resolver ModelResolver, configInput *Config, root *os.Root, agents Agents, ...) (*Runtime, error) + func NewWithProviders(providers Providers, configInput *Config, root *os.Root, agents Agents, ...) (*Runtime, error) + func (r *Runtime) RestrictTools(names []string) error + type SessionEntry struct + Agent string + Model string + OutputTrace []json.RawMessage + ReasoningEffort *string + ReplayAttribution []ReplayAttribution + ReplayInput []json.RawMessage + ResponseID string + Timestamp time.Time + TokenUsage *TokenUsage + TurnID string + Type string + Version int + func (e *SessionEntry) AttributionAt(index int) ReplayAttribution + func (e *SessionEntry) PermissionReviewDecision() PermissionReview + type Skill struct + Compatibility string + Content string + Description string + License string + Location string + Metadata map[string]any + Name string + type SkillLoadResult struct + Errors []error + Skills Skills + func LoadSkills(fsys fs.FS, root string) SkillLoadResult + type Skills struct + Dirs []string + Items map[string]Skill + Root string + func (s Skills) Available(agent *Agent) []Skill + func (s Skills) Find(query string) string + func (s Skills) FindAvailable(query string, agent *Agent) string + type SteerDrain interface + Drain func(ctx context.Context, responseID string, phase TurnPhase, applied []string) ([]PromptInput, error) + type SubagentDiagnostic struct + Index int + Label string + Name string + Provider *ProviderDiagnostic + Subagent *SubagentDiagnostic + Text string + Tool *ToolDiagnostic + Total int + type SubagentWrite struct + Agent string + CallKey string + Delegator string + Key ChildKey + Mode ContinueMode + Prompt string + type TokenUsage struct + CompletionReasoningTokens int64 + CompletionTokens int64 + PromptCacheReadTokens int64 + PromptCacheWriteTokens int64 + PromptTokens int64 + TotalTokens int64 + type Tool struct + Call func(context.Context, json.RawMessage, chan<- ChatResponse) (ToolResult, error) + Description string + Name string + Parameters map[string]any + Permission string + Resumable bool + Subjects func(json.RawMessage) ([]string, error) + TurnBound bool + VisibilitySubjects []string + type ToolDiagnostic struct + Action json.RawMessage + Arguments json.RawMessage + Name string + Phase string + Result string + Status string + type ToolResult struct + Attachments []Attachment + Data any + Output string + func TextToolResult(output string) ToolResult + type TracelessJournal struct + Parent Journal + func (TracelessJournal) CodeModeCalls(context.Context, string) ([]json.RawMessage, error) + func (TracelessJournal) SaveCodeModeCall(context.Context, string, string, json.RawMessage) error + func (TracelessJournal) SaveTrace(context.Context, string, []json.RawMessage) error + func (j TracelessJournal) Items(ctx context.Context, turnID string, list TurnList) ([]json.RawMessage, error) + func (j TracelessJournal) Load(ctx context.Context, key string) (value json.RawMessage, found bool, err error) + func (j TracelessJournal) Save(ctx context.Context, key string, value json.RawMessage) error + func (j TracelessJournal) SaveTurn(ctx context.Context, turnID string, step json.RawMessage, lists []TurnItems) error + type TurnItems struct + From int + Items []json.RawMessage + List TurnList + type TurnList string + const TurnOutputTrace + const TurnReplayInput + const TurnTrace + type TurnPhase int + const TurnPhaseFinalAnswer + const TurnPhaseToolLoop + const TurnPhaseUnclassified