architecture

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 15 Imported by: 1 module, 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 architecture owns the versioned structural definitions OpenRealtime can realise.

An architecture is not a model family and it is not a launch script. It is an immutable selection of subsystem owners, required capabilities, and an interaction boundary. A concrete deployment supplies model endpoints and credentials; a binding supplies the adapter machinery. Keeping those three concepts separate lets the same foreground participate in several evolving architectures without either renaming the model or adding another runtime.

Index

Constants

View Source
const CatalogVersion = 1

Variables

This section is empty.

Functions

func Bind

func Bind(definition Definition, inner binding.Binding) (binding.Binding, error)

Bind attaches an immutable architecture definition to the concrete binding that realises it. The inner binding name remains visible for adapter-level evidence; the architecture identity is added to every live session status.

Types

type ActHandoff

type ActHandoff string

ActHandoff says how a selected act reaches the foreground.

const (
	HandoffNone   ActHandoff = "none"
	HandoffDirect ActHandoff = "direct"
	HandoffTyped  ActHandoff = "typed"
)

type Catalog

type Catalog struct {
	Version       int          `json:"version"`
	Architectures []Definition `json:"architectures"`
}

Catalog is the complete immutable architecture graph known to a deployment.

func Decode

func Decode(payload []byte) (Catalog, error)

Decode strictly decodes and validates a catalog.

func Default

func Default() Catalog

Default returns a fresh copy of the repository-owned catalog.

func Read

func Read(path string) (Catalog, error)

Read loads a strict external catalog.

func (Catalog) Fingerprint

func (catalog Catalog) Fingerprint() string

Fingerprint identifies the whole catalog snapshot.

func (Catalog) LookupIdentity

func (catalog Catalog) LookupIdentity(identity binding.ArchitectureIdentity) (Definition, error)

LookupIdentity resolves and verifies an attested architecture identity.

func (Catalog) Resolve

func (catalog Catalog) Resolve(value string) (Definition, error)

Resolve looks up one exact id@revision.

func (Catalog) Sorted

func (catalog Catalog) Sorted() []Definition

Sorted returns definitions in stable family/id/revision order.

func (Catalog) Validate

func (catalog Catalog) Validate() error

Validate checks identities, immutable revision lineage, and graph cycles.

type Definition

type Definition struct {
	ID          string                    `json:"id"`
	Revision    int                       `json:"revision"`
	Family      string                    `json:"family"`
	Stage       Stage                     `json:"stage"`
	DerivedFrom []Ref                     `json:"derived_from,omitempty"`
	Summary     string                    `json:"summary"`
	Change      string                    `json:"change"`
	Ownership   binding.Ownership         `json:"ownership"`
	Requires    binding.StackCapabilities `json:"requires"`
	Interaction InteractionBoundary       `json:"interaction"`
}

Definition is an immutable architecture revision.

func (Definition) Fingerprint

func (definition Definition) Fingerprint() string

Fingerprint protects immutable revisions from in-place catalog edits.

func (Definition) Identity

func (definition Definition) Identity() binding.ArchitectureIdentity

Identity is the runtime-safe reference to this exact definition.

func (Definition) Ref

func (definition Definition) Ref() Ref

func (Definition) Topology

func (definition Definition) Topology() (Topology, error)

Topology derives which existing binding machinery can realise a definition.

func (Definition) Validate

func (definition Definition) Validate() error

Validate checks one complete definition independently of its catalog lineage.

func (Definition) ValidateRuntime

func (definition Definition) ValidateRuntime(ownership binding.Ownership, capabilities binding.StackCapabilities) error

ValidateRuntime proves that a concrete composition can realise this definition. Extra capabilities remain visible and are explicitly allowed.

func (Definition) ValidateStatus

func (definition Definition) ValidateStatus(status binding.Status) error

ValidateStatus checks the complete live structural boundary after provider negotiation. This is stronger than validating launch flags: sidecar capabilities and the accepted act protocol exist only after the handshake.

type EvidenceSource

type EvidenceSource string

EvidenceSource names the representation available to the interaction owner.

const (
	EvidenceAcousticPredicates EvidenceSource = "acoustic-predicates"
	EvidenceTranscript         EvidenceSource = "transcript"
	EvidenceNativeMultimodal   EvidenceSource = "native-multimodal"
	EvidenceRemoteMultimodal   EvidenceSource = "remote-multimodal"
)

type InteractionBoundary

type InteractionBoundary struct {
	Mode     InteractionMode `json:"mode"`
	Evidence EvidenceSource  `json:"evidence"`
	// EvidenceCapabilities is the exact selected input vector, rather than a
	// lower bound on what a model might be capable of seeing. A runtime with an
	// extra selected channel is a different architecture: direct vision, for
	// example, must never hide behind the same "transcript" label.
	//
	// The pointer is intentional. Revisions created before evidence vectors
	// existed retain nil and therefore retain their canonical fingerprints.
	// New revisions must set it and are eligible for evidence-controlled
	// experiments; legacy revisions remain runnable and inspectable but coarse.
	EvidenceCapabilities *binding.InteractionEvidenceCapabilities `json:"evidence_capabilities,omitempty"`
	Transport            string                                   `json:"transport"`
	ProtocolVersion      int                                      `json:"protocol_version,omitempty"`
	Handoff              ActHandoff                               `json:"handoff"`
	NativeSuppression    string                                   `json:"native_suppression,omitempty"`
	// Control is the exact selected-controller vector and arbitration rule.
	// It is optional only for immutable revisions authored before controller
	// composition was attested. New revisions set it so one architecture cannot
	// silently alternate between a predicate floor and a learned act floor.
	Control *binding.InteractionControl `json:"control,omitempty"`
}

InteractionBoundary is the complete structural control seam. Policy model, recognizer, and timeout identities belong to a deployment/experiment cell.

func (InteractionBoundary) UsesTextPolicy

func (boundary InteractionBoundary) UsesTextPolicy() bool

UsesTextPolicy reports whether the selected control composition contains an external text policy. Legacy revisions fall back to their coarse mode.

type InteractionMode

type InteractionMode string

InteractionMode selects where conversational acts are chosen.

const (
	InteractionPredicates InteractionMode = "predicates"
	InteractionTextPolicy InteractionMode = "text-policy"
	InteractionComposed   InteractionMode = "composed-policy"
	InteractionNative     InteractionMode = "native"
	InteractionRemote     InteractionMode = "remote"
)

type Ref

type Ref struct {
	ID       string `json:"id"`
	Revision int    `json:"revision"`
}

Ref is an exact architecture revision. There is intentionally no mutable "latest" reference in a runtime or benchmark artifact.

func ParseRef

func ParseRef(value string) (Ref, error)

ParseRef parses the exact external spelling id@revision.

func (Ref) String

func (ref Ref) String() string

type Stage

type Stage string

Stage says how much operational confidence a definition carries. It is not a performance ranking.

const (
	StageExperimental Stage = "experimental"
	StageCandidate    Stage = "candidate"
	StageStable       Stage = "stable"
	StageRetired      Stage = "retired"
)

type Topology

type Topology string

Topology names the provider placement implied by ownership. It is assembly machinery, not a model species: several architectures share each topology.

const (
	TopologyComponents Topology = "components"
	TopologySidecar    Topology = "sidecar"
	TopologyUpstream   Topology = "upstream"
)

Jump to

Keyboard shortcuts

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