Versions in this module Expand all Collapse all v1 v1.13.0 Nov 21, 2026 v1.12.1 Oct 30, 2026 v1.12.0 Oct 26, 2026 Changes in this version + func AllApprovals() (map[string]Approvals, error) + func PermissionsFile() string + func ProjectRoot(dir string) string + func UpdateApprovals(project string, change func(a *Approvals)) error + type Approvals struct + ApproveAll bool + Commands []string + MCP []string + Reads bool + Updated time.Time + Writes bool + func ProjectApprovals(project string) (Approvals, error) + func (a Approvals) Describe() []string + func (a Approvals) Empty() bool + type Background int + const AnswerBackground + const ChatBackground + const NoBackground + type Event struct + ID string + Text string + type Info struct + Command string + Description string + Ended time.Time + Exit int + How string + ID string + Left time.Duration + Log string + Monitor bool + Running bool + Started time.Time + func (i Info) Describe() string + func (i Info) Status() string + type Processes struct + Wake func() + func NewProcesses(wake func()) *Processes + func (ps *Processes) Adopt(r *shellRun, command string, started time.Time, before func() string) (Info, error) + func (ps *Processes) Close() int + func (ps *Processes) Drain() []Event + func (ps *Processes) Format(events []Event) string + func (ps *Processes) List() []Info + func (ps *Processes) Monitor(command, dir, desc string, timeout time.Duration) (Info, error) + func (ps *Processes) Output(id string, n int) (Info, string, error) + func (ps *Processes) Running() int + func (ps *Processes) Start(command, dir string, timeout time.Duration) (Info, error) + func (ps *Processes) Stop(id string, user bool) (Info, error) + func (ps *Processes) Unread(events []Event) type Session + MCP *mcp.Manager + Processes *Processes + Project string + func (s *Session) Forget(line string) error + func (s *Session) ForgetApprovals(flag bool) error + func (s *Session) LoadApprovals() (approveAll bool, err error) + func (s *Session) SetApproveAll(on bool) error type UI + func StderrUI() UI v1.11.0 Oct 25, 2026 v1.10.3 Oct 16, 2026 v1.10.2 Oct 16, 2026 v1.10.1 Oct 16, 2026 v1.10.0 Oct 16, 2026 v1.9.1 Oct 14, 2026 v1.9.0 Oct 6, 2026 v1.8.0 Oct 3, 2026 v1.7.0 Oct 3, 2026 Changes in this version + func Refused(result string) bool + func RunShell(ctx context.Context, show UI, command string) string + type Session struct + AutoApprove bool + Timeout time.Duration + UI UI + func (s *Session) Handle(ctx context.Context, cancel context.CancelFunc, tc docsgpt.ToolCall) string + type UI interface + Choose func(items []ui.Item) (string, error) + Close func(ok bool, status string) + Edit func(title, value string) (string, error) + Lines func(lines []string) + Open func(title, note string) + Output func() io.Writer v1.6.1 Sep 30, 2026 v1.6.0 Sep 21, 2026 Changes in this version + func IsSafe(command string) (bool, string) + func NormalizeName(name string) string + func ToolDefinitions() []api.Tool + func TruncateOutput(output string, maxBytes int) string + type ApprovalResult int + const Approved + const Denied + const Edited + func RequestApproval(toolName string, rawArgs string) (ApprovalResult, string, error) + type ToolResult struct + Error string + Output string + func Execute(name string, rawArgs string, timeout time.Duration) ToolResult + func (r ToolResult) String() string