Help us shape the future of Go! Take the 2026 Go Developer Survey

gates

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package gates holds pause handlers for tool calls that need a person before they can finish. Each type implements pause.Handler and touches only loop2's public types, so any front end in this module (the CLI, a future server) can use it.

Index

Constants

View Source
const AskUserToolName = "ask_user"

AskUserToolName is the tool the model calls to ask the person a question.

Variables

This section is empty.

Functions

func AskUserToolInfo

func AskUserToolInfo() (*schema.ToolInfo, error)

AskUserToolInfo describes the ask_user tool to the model.

Types

type AskUser

type AskUser struct {
	// contains filtered or unexported fields
}

AskUser answers an ask_user call with the person's next reply.

func NewAskUser

func NewAskUser(humanAvailable bool) AskUser

func (AskUser) Handle

func (g AskUser) Handle(ctx context.Context, call pause.Call, s pause.Session) (string, bool)

type Confirm

type Confirm struct {
	// contains filtered or unexported fields
}

Confirm asks before running a tool marked confirm.

func NewConfirm

func NewConfirm(autoApprove, humanAvailable bool) Confirm

func (Confirm) Handle

func (g Confirm) Handle(ctx context.Context, call pause.Call, s pause.Session) (string, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL