Versions in this module Expand all Collapse all v0 v0.2.0 Nov 21, 2026 v0.1.0 Oct 24, 2026 Changes in this version + const AskUserQuestionTool + const DefaultPermissionMode + const Name + const SessionMarkerEnv + const TestedVersion + func DeferToolUse(reason string) json.RawMessage + func ParseVersion(out string) (string, error) + func ResolveBinary(path string) (string, error) + func SessionFile(configDir, cwd, sessionID string) string + type ControlError struct + Message string + Subtype string + func (e *ControlError) Error() string + type Driver struct + AllowUntestedVersion bool + func New() *Driver + func (d *Driver) Name() string + func (d *Driver) Start(ctx context.Context, opts agent.Options) (agent.Session, error) + func (d *Driver) StartSession(ctx context.Context, opts agent.Options, extra Extra) (*Session, error) + func (d *Driver) Version(ctx context.Context, binary string, env []string) (string, error) + type Extra struct + Hooks map[string][]HookMatcher + InitTimeout time.Duration + ShutdownGrace time.Duration + type HookFunc func(ctx context.Context, in HookInput) (json.RawMessage, error) + type HookInput struct + CallbackID string + Input json.RawMessage + ToolUseID string + type HookMatcher struct + Callbacks []HookFunc + Matcher string + Timeout time.Duration + type Info struct + Binary string + Initialize json.RawMessage + PID int + PermissionMode string + Version string + VersionWarning string + type Session struct + func (s *Session) ClaudeInfo() Info + func (s *Session) Close() error + func (s *Session) CloseInput() error + func (s *Session) Done() <-chan struct{} + func (s *Session) Events() <-chan agent.Event + func (s *Session) Info() agent.SessionInfo + func (s *Session) Interrupt(ctx context.Context) error + func (s *Session) Request(ctx context.Context, fields map[string]any) (json.RawMessage, error) + func (s *Session) Send(ctx context.Context, msg agent.UserMessage) error + func (s *Session) SessionID() string + func (s *Session) SetModel(ctx context.Context, model string) error + func (s *Session) SetPermissionMode(ctx context.Context, mode string) error + func (s *Session) Wait() error + type VersionError struct + Binary string + Found string + Tested string + func (e *VersionError) Error() string