oracletools

package
v1.0.0-rc.14 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ToolNameSubmitVerdict = "submit_verdict"

	ToolNameVerdictState = "verdict_state"
)
View Source
const ToolsProviderName = "oracle"

Variables

This section is empty.

Functions

func New

func New(resolver Resolver) taskengine.ToolsRepo

func WithBinding

func WithBinding(ctx context.Context, b *AskBinding) context.Context

Types

type AskBinding

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

func BindingFromContext

func BindingFromContext(ctx context.Context) *AskBinding

func NewAskBinding

func NewAskBinding(askID string, kind AskKind, input string) *AskBinding

func (*AskBinding) Answer

func (b *AskBinding) Answer() string

func (*AskBinding) AskID

func (b *AskBinding) AskID() string

func (*AskBinding) Guidance

func (b *AskBinding) Guidance() string

func (*AskBinding) Kind

func (b *AskBinding) Kind() AskKind

func (*AskBinding) Outcome

func (b *AskBinding) Outcome() Outcome

func (*AskBinding) WithResolver

func (b *AskBinding) WithResolver(r Resolver) *AskBinding

type AskKind

type AskKind string
const (
	AskKindPermission AskKind = "permission"

	AskKindAttention AskKind = "attention"
)

type Outcome

type Outcome string
const (
	OutcomeNone Outcome = ""

	OutcomeWait Outcome = "wait"

	OutcomeAnswered Outcome = "answered"

	OutcomeApproved Outcome = "approved"

	OutcomeDenied Outcome = "denied"
)

type RefusedError

type RefusedError struct{ Reason string }

func (*RefusedError) Error

func (e *RefusedError) Error() string

type Resolver

type Resolver interface {
	Answer(ctx context.Context, askID, text string) error

	Decide(ctx context.Context, askID string, approve bool, guidance string) error
}

Jump to

Keyboard shortcuts

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