Documentation
¶
Overview ¶
Package server supplies descriptor-locked server-realm plugins around the clean Realtime API. The application launcher starts a listener only after a compiled plugin profile exports an HTTP service; neither the graph runtime nor presentation clients own a built-in UI or privileged route.
Index ¶
- Constants
- func HTTPRoutesContract() plugin.Contract
- func ObservabilityEndpointsContract() plugin.Contract
- func RealtimeEndpointContract() plugin.Contract
- func RealtimeHTTPContract() plugin.Contract
- func SessionInspectionPlaneContract() plugin.Contract
- func SessionProviderContract() plugin.Contract
- type Bundle
- type BundleConfig
- type GatewayFactory
- type GatewayFactoryConfig
- type GraphBundle
- type GraphBundleConfig
- type HTTPRouterFactory
- type ObservabilityEndpoints
- type ObservabilityRouteFactory
- func (factory *ObservabilityRouteFactory) Descriptor() plugin.Descriptor
- func (factory *ObservabilityRouteFactory) Mount(_ context.Context, mount pluginruntime.MountContext) error
- func (factory *ObservabilityRouteFactory) PreMount(_ context.Context, candidate pluginruntime.CandidateContext) (pluginruntime.CandidateMount, error)
- type ProfileGraphBundleConfig
- type Realm
- type RealtimeEndpoint
- type RealtimeHTTP
- type RealtimeRouteFactory
- func (factory *RealtimeRouteFactory) Descriptor() plugin.Descriptor
- func (factory *RealtimeRouteFactory) Mount(_ context.Context, mount pluginruntime.MountContext) error
- func (factory *RealtimeRouteFactory) PreMount(_ context.Context, candidate pluginruntime.CandidateContext) (pluginruntime.CandidateMount, error)
- type SessionInspectionPlaneFactory
- func (factory *SessionInspectionPlaneFactory) Descriptor() plugin.Descriptor
- func (factory *SessionInspectionPlaneFactory) Mount(ctx context.Context, mount pluginruntime.MountContext) error
- func (factory *SessionInspectionPlaneFactory) PreMount(_ context.Context, _ pluginruntime.CandidateContext) (pluginruntime.CandidateMount, error)
- type SessionProvider
- type SessionProviderFactory
- func (factory *SessionProviderFactory) Descriptor() plugin.Descriptor
- func (factory *SessionProviderFactory) Mount(ctx context.Context, mount pluginruntime.MountContext) error
- func (factory *SessionProviderFactory) PreMount(_ context.Context, _ pluginruntime.CandidateContext) (pluginruntime.CandidateMount, error)
- type TokenResolver
Constants ¶
const ( // RealtimeHTTPExport is the conventional profile export consumed by an // application listener. Profiles may rename it explicitly. RealtimeHTTPExport = "realtime_http" )
Variables ¶
This section is empty.
Functions ¶
func HTTPRoutesContract ¶
func RealtimeHTTPContract ¶
func SessionProviderContract ¶
Types ¶
type Bundle ¶
type Bundle struct {
Profile plugin.Profile
Lock plugin.Lock
Plan plugin.Plan
// contains filtered or unexported fields
}
Bundle is a descriptor-locked server profile and its exact executable registrations. Constructing a Bundle compiles the entire dependency graph but acquires no provider resources and opens no listener.
func NewBundle ¶
func NewBundle(config BundleConfig) (*Bundle, error)
NewBundle compiles the canonical clean Realtime server composition. The profile name and revision are deployment identity, not display metadata, and are therefore required rather than synthesized from mutable process state.
type BundleConfig ¶
type BundleConfig struct {
ProfileName string
ProfileRevision uint64
Provider SessionProvider
Gateway gateway.Config
ProviderArtifact inspect.ArtifactIdentity
// GatewayArtifact identifies the linked server implementation containing
// the gateway, stable router, inspection authority, and route plugins. Each
// selected descriptor records it independently in live realm evidence.
GatewayArtifact inspect.ArtifactIdentity
}
BundleConfig is the complete, immutable input to one server composition. ProviderArtifact identifies the session provider. GatewayArtifact identifies the linked server implementation; each selected router, inspection, gateway, and route descriptor records that artifact independently in live evidence even when they share executable bytes.
type GatewayFactory ¶
type GatewayFactory struct {
// contains filtered or unexported fields
}
GatewayFactory mounts the OpenRealtime protocol renderer as a replaceable server plugin. It opens no socket and serves no UI; the application obtains the exported handler only after the whole realm mounts successfully.
func NewGatewayFactory ¶
func NewGatewayFactory(config GatewayFactoryConfig) (*GatewayFactory, error)
func (*GatewayFactory) Descriptor ¶
func (factory *GatewayFactory) Descriptor() plugin.Descriptor
func (*GatewayFactory) Mount ¶
func (factory *GatewayFactory) Mount( ctx context.Context, mount pluginruntime.MountContext, ) error
func (*GatewayFactory) PreMount ¶
func (factory *GatewayFactory) PreMount( _ context.Context, candidate pluginruntime.CandidateContext, ) (pluginruntime.CandidateMount, error)
type GatewayFactoryConfig ¶
GatewayFactoryConfig is private deployment configuration for the clean API gateway. Binding must remain nil because the compiled profile supplies the exact SessionProvider dependency. Other fields retain gateway's established compatibility, limits, telemetry, authorization, and management seams.
type GraphBundle ¶
type GraphBundle struct {
GraphPlan *graphconfig.Plan
Evidence graphevidence.Document
GraphCatalog graphcatalog.Document
ServerBundle *Bundle
Readiness []graphlaunch.ReadinessCheck
// contains filtered or unexported fields
}
GraphBundle is the immutable boundary between graph preparation and server composition. Constructing it acquires no graph resource and opens no listener. The graph plan, its single-entry immutable discovery catalog, and the server bundle retain independent fingerprints so inspection can attest each layer without collapsing their identities.
func NewGraphBundle ¶
func NewGraphBundle(ctx context.Context, config GraphBundleConfig) (*GraphBundle, error)
NewGraphBundle prepares the exact graph-native provider and compiles the server plugin realm around it. There is no legacy binding fallback: any graph, adapter, dependency, or server-profile mismatch fails before Mount.
func NewProfileGraphBundle ¶
func NewProfileGraphBundle( ctx context.Context, config ProfileGraphBundleConfig, ) (*GraphBundle, error)
NewProfileGraphBundle resolves a checked application plugin, seals its exact graph-native provider, resolves the optional server token, and then compiles the descriptor-locked server realm. It opens no listener and acquires no per-session graph resource.
func (*GraphBundle) OperatorAPIConfig ¶
func (bundle *GraphBundle) OperatorAPIConfig( authorizer management.Authorizer, ) (managementserver.OperatorAPIConfig, error)
OperatorAPIConfig binds the graph bundle's exact static and in-memory authoring services to a caller-owned authority. Mounting remains explicit so a headless profile that omits operator authority exposes no operator routes.
func (*GraphBundle) OperatorGrants ¶
func (bundle *GraphBundle) OperatorGrants() ([]management.Grant, error)
OperatorGrants returns the least-privilege process-lifetime authority for this exact graph's immutable catalog and the payload-only authoring API. It intentionally excludes session inspection, source I/O, and reconciliation.
type GraphBundleConfig ¶
type GraphBundleConfig struct {
Graph graphlaunch.Config
Server BundleConfig
}
GraphBundleConfig composes one exact graph-native session provider with the descriptor-locked Realtime server realm. Graph owns topology, values, deployment, adapter, and executable-element selection. Server owns only the stable protocol, management, observability, and listener-independent route profile.
Server.Provider must be empty. Accepting both a graph launch and an injected provider would create two competing sources of session authority.
type HTTPRouterFactory ¶
type HTTPRouterFactory struct {
// contains filtered or unexported fields
}
HTTPRouterFactory owns the stable route registry exported to a process listener. It contains no product routes. Server and management route plugins publish into the same atomic registry under distinct exact service contracts, so an unmounted route cannot be revealed through a hidden mux.
func NewHTTPRouterFactory ¶
func NewHTTPRouterFactory() *HTTPRouterFactory
func (*HTTPRouterFactory) Descriptor ¶
func (factory *HTTPRouterFactory) Descriptor() plugin.Descriptor
func (*HTTPRouterFactory) Mount ¶
func (factory *HTTPRouterFactory) Mount( ctx context.Context, mount pluginruntime.MountContext, ) error
func (*HTTPRouterFactory) PreMount ¶
func (factory *HTTPRouterFactory) PreMount( _ context.Context, _ pluginruntime.CandidateContext, ) (pluginruntime.CandidateMount, error)
type ObservabilityEndpoints ¶
type ObservabilityEndpoints interface {
HealthHandler() http.Handler
MetricsHandler() http.Handler
}
ObservabilityEndpoints supplies payload-only health and bounded telemetry handlers. Route ownership remains with the observability plugin.
type ObservabilityRouteFactory ¶
type ObservabilityRouteFactory struct {
// contains filtered or unexported fields
}
ObservabilityRouteFactory owns health and bounded telemetry as one independently selectable, UI-free operational surface.
func NewObservabilityRouteFactory ¶
func NewObservabilityRouteFactory() *ObservabilityRouteFactory
func (*ObservabilityRouteFactory) Descriptor ¶
func (factory *ObservabilityRouteFactory) Descriptor() plugin.Descriptor
func (*ObservabilityRouteFactory) Mount ¶
func (factory *ObservabilityRouteFactory) Mount( _ context.Context, mount pluginruntime.MountContext, ) error
func (*ObservabilityRouteFactory) PreMount ¶
func (factory *ObservabilityRouteFactory) PreMount( _ context.Context, candidate pluginruntime.CandidateContext, ) (pluginruntime.CandidateMount, error)
type ProfileGraphBundleConfig ¶
type ProfileGraphBundleConfig struct {
Profile launchprofile.Document
Applications *launchprofile.Registry
// GatewayArtifact is the host-installed executable identity. The profile
// selects it, but cannot attest its own installed bytes.
GatewayArtifact inspect.ArtifactIdentity
Gateway gateway.Config
ResolveToken TokenResolver
}
ProfileGraphBundleConfig composes a strict launch profile with a broad host plugin registry and non-behavioral observability hooks. Fields owned by the profile (provider, protocol identity, limits, validation, token, inspection plane, and effect authority) must remain empty in Gateway.
type Realm ¶
type Realm struct {
// contains filtered or unexported fields
}
Realm is one mounted clean-API server profile. A process listener consumes Handler; operators consume Live; Close releases the profile in reverse dependency order. No presentation or socket implementation is hidden here.
func (*Realm) Live ¶
func (realm *Realm) Live() pluginruntime.Live
type RealtimeEndpoint ¶
RealtimeEndpoint is the handler implementation consumed by the independently selected realtime route plugin. It deliberately carries no route pattern.
type RealtimeHTTP ¶
RealtimeHTTP is the only service an application listener needs. The plugin realm owns the gateway lifecycle; closing the realm revokes this handler's management resources before the listener itself is shut down.
type RealtimeRouteFactory ¶
type RealtimeRouteFactory struct {
// contains filtered or unexported fields
}
RealtimeRouteFactory owns only the public OpenAI-compatible WebSocket path.
func NewRealtimeRouteFactory ¶
func NewRealtimeRouteFactory() *RealtimeRouteFactory
func (*RealtimeRouteFactory) Descriptor ¶
func (factory *RealtimeRouteFactory) Descriptor() plugin.Descriptor
func (*RealtimeRouteFactory) Mount ¶
func (factory *RealtimeRouteFactory) Mount( _ context.Context, mount pluginruntime.MountContext, ) error
func (*RealtimeRouteFactory) PreMount ¶
func (factory *RealtimeRouteFactory) PreMount( _ context.Context, candidate pluginruntime.CandidateContext, ) (pluginruntime.CandidateMount, error)
type SessionInspectionPlaneFactory ¶
type SessionInspectionPlaneFactory struct {
// contains filtered or unexported fields
}
SessionInspectionPlaneFactory publishes one resource-free session inspection authority under the exact projections consumed by the gateway and canonical management API. Routes remain separate plugins.
func NewSessionInspectionPlaneFactory ¶
func NewSessionInspectionPlaneFactory( ttl time.Duration, ) (*SessionInspectionPlaneFactory, error)
func (*SessionInspectionPlaneFactory) Descriptor ¶
func (factory *SessionInspectionPlaneFactory) Descriptor() plugin.Descriptor
func (*SessionInspectionPlaneFactory) Mount ¶
func (factory *SessionInspectionPlaneFactory) Mount( ctx context.Context, mount pluginruntime.MountContext, ) error
func (*SessionInspectionPlaneFactory) PreMount ¶
func (factory *SessionInspectionPlaneFactory) PreMount( _ context.Context, _ pluginruntime.CandidateContext, ) (pluginruntime.CandidateMount, error)
type SessionProvider ¶
type SessionProvider interface {
Name() string
Start(context.Context, binding.Options) (binding.Runtime, error)
}
SessionProvider is the exported server-plugin boundary that creates one independent realtime session. It deliberately does not expose a concrete graph, legacy preset, model client, UI implementation, or lossy ownership and capability projection. Gateway validation obtains graph-native protocol facts from the provider's exact frozen adapter profile; retained legacy providers are handled by a separate compatibility check until their launch path is deleted.
type SessionProviderFactory ¶
type SessionProviderFactory struct {
// contains filtered or unexported fields
}
SessionProviderFactory publishes one already prepared session provider into a server realm. The implementation registry—not this descriptor—pins the executable artifact and permits a profile to replace the provider without changing the gateway plugin.
func NewSessionProviderFactory ¶
func NewSessionProviderFactory(provider SessionProvider) (*SessionProviderFactory, error)
func (*SessionProviderFactory) Descriptor ¶
func (factory *SessionProviderFactory) Descriptor() plugin.Descriptor
func (*SessionProviderFactory) Mount ¶
func (factory *SessionProviderFactory) Mount( ctx context.Context, mount pluginruntime.MountContext, ) error
func (*SessionProviderFactory) PreMount ¶
func (factory *SessionProviderFactory) PreMount( _ context.Context, _ pluginruntime.CandidateContext, ) (pluginruntime.CandidateMount, error)
type TokenResolver ¶
TokenResolver resolves one explicitly named secret only after the complete application profile and graph plan have passed exact identity validation. A launcher normally supplies an environment-backed implementation; the server package deliberately does not read process environment implicitly.