profile

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 19 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 profile resolves a strict, immutable deployment profile through an explicitly installed graph-application plugin. The profile contains data and exact identities only; factories remain host registrations and graph construction remains resource-free until the selected SessionProvider is started.

Index

Constants

View Source
const (
	FormatVersion uint64 = 1
)

Variables

This section is empty.

Functions

func MarshalYAML

func MarshalYAML(document Document) ([]byte, error)

MarshalYAML returns deterministic, newline-terminated YAML for one already frozen profile. ParseYAML accepts the result without changing its identity.

Types

type AdapterSelection

type AdapterSelection struct {
	Reference       string                   `json:"reference" yaml:"reference"`
	RuntimeArtifact inspect.ArtifactIdentity `json:"runtime_artifact" yaml:"runtime_artifact"`
	ProfileName     string                   `json:"profile_name" yaml:"profile_name"`
	ProfileRevision uint64                   `json:"profile_revision" yaml:"profile_revision"`
}

AdapterSelection repeats the exact public projection expected from the application plugin. Resolve checks this before graph/launch invokes any adapter binder.

type Application

type Application struct {
	Selection
	Configuration json.RawMessage `json:"configuration" yaml:"-"`
}

Application selects the graph-application plugin and supplies its strict, plugin-owned configuration as canonical JSON. ParseYAML accepts a JSON-like YAML mapping, rejects ambiguous YAML features, and converts it to this form before the plugin sees it.

type ApplicationFactory

type ApplicationFactory func(context.Context, json.RawMessage) (graphlaunch.Config, error)

ApplicationFactory converts plugin-owned configuration into a complete, resource-free graph launch config. It must not resolve secrets, dial a provider, mount a graph, or acquire a listener.

type Document

type Document struct {
	FormatVersion uint64               `json:"format_version" yaml:"format_version"`
	Name          string               `json:"name" yaml:"name"`
	Revision      uint64               `json:"revision" yaml:"revision"`
	Fingerprint   string               `json:"fingerprint" yaml:"fingerprint"`
	Application   Application          `json:"application" yaml:"-"`
	Plan          graphconfig.Identity `json:"plan" yaml:"plan"`
	Adapter       AdapterSelection     `json:"adapter" yaml:"adapter"`
	Server        Server               `json:"server" yaml:"server"`
}

Document is one immutable graph/server launch intent. Plan records the complete source-to-resolution identity rather than only a graph name, so a values, deployment, lock, or selected-runtime change fails closed.

func Freeze

func Freeze(source Document) (Document, error)

Freeze validates a document, canonicalizes its plugin configuration, and binds its complete content to Fingerprint.

func ParseYAML

func ParseYAML(path string, source []byte) (Document, error)

ParseYAML decodes one strict YAML document and verifies its fingerprint. Application configuration is constrained to the JSON data model before it is delegated to the selected plugin.

func (Document) Clone

func (document Document) Clone() Document

Clone returns an independently owned document.

func (Document) Validate

func (document Document) Validate() error

Validate verifies structure, canonical plugin configuration, and the content fingerprint.

type Registration

type Registration struct {
	Reference        string
	Artifact         inspect.ArtifactIdentity
	ProviderArtifact inspect.ArtifactIdentity
	Factory          ApplicationFactory
}

Registration is one host-installed graph application plugin.

type Registry

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

Registry is an immutable, duplicate-free application-plugin inventory.

func NewRegistry

func NewRegistry(source []Registration) (*Registry, error)

NewRegistry snapshots and validates a broad host plugin inventory.

func (*Registry) Resolve

func (registry *Registry) Resolve(ctx context.Context, profile Document) (graphlaunch.Result, error)

Resolve exact-matches the selected application registration, validates its declared adapter selection, and invokes the generic graph launcher. No session resource is acquired by this operation.

type Selection

type Selection struct {
	Reference string                   `json:"reference" yaml:"reference"`
	Artifact  inspect.ArtifactIdentity `json:"artifact" yaml:"artifact"`
}

Selection pins one host-installed plugin registration. A symbolic reference without Artifact is deliberately insufficient: it would allow mutable installed code to retain the same deployment identity.

type Server

type Server struct {
	ProfileName     string `json:"profile_name" yaml:"profile_name"`
	ProfileRevision uint64 `json:"profile_revision" yaml:"profile_revision"`

	ProviderArtifact inspect.ArtifactIdentity `json:"provider_artifact" yaml:"provider_artifact"`
	GatewayArtifact  inspect.ArtifactIdentity `json:"gateway_artifact" yaml:"gateway_artifact"`

	Model                         string              `json:"model" yaml:"model"`
	TranscriptionModel            string              `json:"transcription_model" yaml:"transcription_model"`
	TokenEnvironment              string              `json:"token_environment,omitempty" yaml:"token_environment,omitempty"`
	OperatorCapabilityEnvironment string              `json:"operator_capability_environment,omitempty" yaml:"operator_capability_environment,omitempty"`
	ValidateWire                  bool                `json:"validate_wire" yaml:"validate_wire"`
	InspectionTokenTTLMS          uint64              `json:"inspection_token_ttl_ms" yaml:"inspection_token_ttl_ms"`
	MaxAudioFrameBytes            int                 `json:"max_audio_frame_bytes" yaml:"max_audio_frame_bytes"`
	VideoLimits                   openrealtime.Limits `json:"video_limits" yaml:"video_limits"`
}

Server declares the stable OpenAI-compatible protocol realm. It contains no listener or presentation setting: browser/native presentation hosts remain independent clients of the resulting Realtime and management APIs.

Jump to

Keyboard shortcuts

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