nonforwardable

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package nonforwardable defines the trusted producer contract for tagging client-visible messages as never_backend.

The Registrar is an explicitly constructed trusted service bound to an authoritative A-leg scope at composition time. It is never exposed through client frontends or a global service locator. All identifiers and reasons are bounded ascii identifiers; message identity is a replay-stable digest carried in MessageRef.

Index

Constants

View Source
const (
	MaxReasonCodeBytes = 64
	MaxALegIDBytes     = 256
	MaxIdentityBytes   = 512
)

Bounds: mirror internal/core/conversationview limits.

Variables

This section is empty.

Functions

This section is empty.

Types

type ALegRef

type ALegRef struct {
	ID string
}

ALegRef is a trusted reference to an authoritative A-leg.

func (ALegRef) Validate

func (a ALegRef) Validate() error

Validate reports whether the A-leg reference is well-formed.

type MessageRef

type MessageRef struct {
	Identity string
}

MessageRef carries the replay-stable semantic identity of a complete message. Identity is a versioned digest (e.g. v1:sha256:...) precomputed by the caller via the conversationview identity service. Index is the normalized position in the ingress call and is informational only; the identity is authoritative.

func (MessageRef) Validate

func (m MessageRef) Validate() error

Validate reports whether the message reference is well-formed.

type ReasonCode

type ReasonCode string

ReasonCode is a bounded non-secret identifier for diagnostics.

func (ReasonCode) Validate

func (r ReasonCode) Validate() error

Validate reports whether the reason code is a bounded ascii identifier.

type Registrar

type Registrar interface {
	TagMessages(ctx context.Context, aLeg ALegRef, msgs []MessageRef, reason ReasonCode) error
}

Registrar is the trusted narrow port for tagging A-leg-visible messages as never_backend. Implementations are explicitly constructed with an authoritative A-leg scope and must not be exposed to client frontends or retrieved via a global registry.

Jump to

Keyboard shortcuts

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