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

permission

package
v0.4.45 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrokerFrom

func BrokerFrom(ctx context.Context) (capspermission.Broker, bool)

func Cancelled

func Cancelled(req capspermission.Request, reason string) capspermission.Result

func CapabilityFrom

func CapabilityFrom(ctx context.Context) capspermission.Capability

func DecodeReply

func DecodeReply(raw json.RawMessage) (capspermission.Reply, error)

func MarshalReply

func MarshalReply(reply capspermission.Reply) json.RawMessage

func MatchAllowDeny

func MatchAllowDeny(reply capspermission.Reply) capspermission.AllowDenyMatch

MatchAllowDeny parses a KindAllowDeny reply. Decision takes precedence; Text is a CLI fallback when Decision is empty.

func MatchReply

MatchReply resolves a KindQuestion reply against a question. Uses Selected and Text only; Decision is ignored.

func NoHuman

func NoHuman(req capspermission.Request, reason string) capspermission.Result

func Superseded

func Superseded(req capspermission.Request, reason string) capspermission.Result

func UnrecognizedAllowDenyReason

func UnrecognizedAllowDenyReason(reply capspermission.Reply) string

UnrecognizedAllowDenyReason formats a reason for an unrecognized allow/deny reply.

Types

type ParentBroker added in v0.4.39

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

ParentBroker forwards child approvals to the captured parent interaction. It owns correlation and delivery, never the parent broker's lifecycle.

func NewParentBroker added in v0.4.39

func NewParentBroker(parent context.Context, agentID agentkit.AgentID) *ParentBroker

func (*ParentBroker) Await added in v0.4.39

func (*ParentBroker) ParentPermissionBroker added in v0.4.39

func (b *ParentBroker) ParentPermissionBroker() *ParentBroker

ParentPermissionBroker also supports direct composition of approval proxies.

func (*ParentBroker) PermissionCapability added in v0.4.39

func (b *ParentBroker) PermissionCapability() permission.Capability

Jump to

Keyboard shortcuts

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