refusal

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 1 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

Overview

Package refusal is a leaf so every domain package can return refusals without importing internal/cli.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code string
const (
	Usage         Code = "usage"
	NoRun         Code = "no-run"
	Record        Code = "record"
	Origin        Code = "origin"
	PR            Code = "pr"
	SameHead      Code = "same-head"
	Auth          Code = "auth"
	Token         Code = "token"
	Input         Code = "input"
	Location      Code = "location"
	Markdown      Code = "markdown"
	Version       Code = "version"
	Count         Code = "count"
	NotFound      Code = "not-found"
	Lock          Code = "lock"
	TTY           Code = "tty"
	HeadMoved     Code = "head-moved"
	OwnPR         Code = "own-pr"
	Blocking      Code = "blocking"
	NotReady      Code = "not-ready"
	Empty         Code = "empty"
	Attempt       Code = "attempt"
	Changed       Code = "changed"
	PreviousMoved Code = "previous-moved"
	// PreviousUnreadable is a previous loupe review that exists, or may, but cannot be read back, as distinct from
	// not-found, which a caller reads as there being no earlier findings to carry.
	PreviousUnreadable Code = "previous-unreadable"
	Sticky             Code = "sticky"
	Viewer             Code = "viewer"
	Timeout            Code = "timeout"
	GitHub             Code = "github"
	NoPaneHost         Code = "no-pane-host"
	PaneFailed         Code = "pane-failed"
	ReviewOpen         Code = "review-open"
	Returned           Code = "returned"
	WrongMode          Code = "wrong-mode"
	UpdateUnsupported  Code = "update-unsupported"
	Download           Code = "download"
	InstallFailed      Code = "install-failed"
	Internal           Code = "internal"
)

Codes are exactly the error table in specs/001-loupe-v1/contracts/cli.md; agents branch on them.

type Error

type Error struct {
	Code    Code
	Message string
	Fix     string
	Details map[string]any
}

func As

func As(err error) (*Error, bool)

func New

func New(code Code, message, fix string) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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