backend

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package backend maps a legalized consultation into canonical receipt evidence and the typed response expected by the native host.

Index

Constants

View Source
const (
	DecisionKindUnset        = waist.DecisionKindUnset
	DecisionProceed          = waist.DecisionProceed
	DecisionDeny             = waist.DecisionDeny
	DecisionRequireHuman     = waist.DecisionRequireHuman
	ReasonUnset              = waist.ReasonUnset
	ReasonLegal              = waist.ReasonLegal
	ReasonUnboundSession     = waist.ReasonUnboundSession
	ReasonStopLoopGuard      = waist.ReasonStopLoopGuard
	ReasonUnknownActor       = waist.ReasonUnknownActor
	ReasonNoActiveAssignment = waist.ReasonNoActiveAssignment
	ReasonRoleForbidsAction  = waist.ReasonRoleForbidsAction
	ReasonPhaseForbidsAction = waist.ReasonPhaseForbidsAction
	ReasonUnenforcedDeny     = waist.ReasonUnenforcedDeny
	ReasonEvaluationFault    = waist.ReasonEvaluationFault
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decision

type Decision = waist.Decision

func NewDecision added in v0.0.9

func NewDecision(kind DecisionKind, reason DecisionReason) (Decision, error)

type DecisionKind added in v0.0.9

type DecisionKind = waist.DecisionKind

Aliases preserve the backend API while the waist owns the one validator and codec that durable readers and evaluators must both use.

type DecisionReason added in v0.0.9

type DecisionReason = waist.DecisionReason

type HostResponse

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

HostResponse is one constructor-validated response to the native host.

func BuildConsultation

func BuildConsultation(interpreted receipt.Record, legalized legalize.Legalized) (receipt.ConsultationRecord, HostResponse, error)

BuildConsultation retains the genuine current Proceed default. It does not claim to have read assignment authority or evaluated future gate policy.

func BuildDecidedConsultation added in v0.0.9

func BuildDecidedConsultation(interpreted receipt.Record, legalized legalize.Legalized, decision Decision) (receipt.ConsultationRecord, HostResponse, error)

func NewEvaluationFaultResponse added in v0.0.9

func NewEvaluationFaultResponse() HostResponse

NewEvaluationFaultResponse constructs an unevaluated refusal, never a policy Decision. The native encoder must still prove channel support.

func NewHostResponse added in v0.0.9

func NewHostResponse(decision Decision) (HostResponse, error)

func (HostResponse) ConsultationResponse

func (HostResponse) ConsultationResponse()

func (HostResponse) Decision

func (r HostResponse) Decision() DecisionKind

func (HostResponse) IsEvaluationFault added in v0.0.9

func (r HostResponse) IsEvaluationFault() bool

func (HostResponse) IsValid

func (r HostResponse) IsValid() bool

func (HostResponse) MarshalJSON

func (r HostResponse) MarshalJSON() ([]byte, error)

MarshalJSON is the legacy host port, not the durable decision codec.

func (HostResponse) Reason added in v0.0.9

func (r HostResponse) Reason() DecisionReason

func (HostResponse) Value added in v0.0.9

func (r HostResponse) Value() (Decision, bool)

Jump to

Keyboard shortcuts

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