apiserver

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package apiserver assembles the conversations aggregated API server: the runtime scheme/codecs for the assistant group and the generic apiserver wiring that installs the bespoke Conversation REST (a read view over the shared history store) — no etcd, no generic registry. It also installs the conversations/sendmessage subresource, the one write/execution path in this otherwise read-only apiserver: it drives a live agent turn and streams the result back as Server-Sent Events (see registry/conversation).

Index

Constants

This section is empty.

Variables

Scheme and Codecs hold the assistant group's internal + versioned types and their serializers, shared by the options (legacy codec) and the installed API group.

Functions

This section is empty.

Types

type CompletedConfig

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

CompletedConfig is a Config that has been defaulted and is ready to build a server; the embedded pointer prevents copying an incomplete config.

func (CompletedConfig) New

func (c CompletedConfig) New() (*ConversationServer, error)

New builds the generic server and installs the assistant API group with the bespoke Conversation storage (list/get) and the messages subresource.

type Config

type Config struct {
	GenericConfig *genericapiserver.RecommendedConfig
	ExtraConfig   ExtraConfig
}

Config is the conversations apiserver config: the generic recommended config plus our ExtraConfig.

func (*Config) Complete

func (cfg *Config) Complete() CompletedConfig

Complete fills in defaults and returns a config that can build a server.

type ConversationServer

type ConversationServer struct {
	GenericAPIServer *genericapiserver.GenericAPIServer
}

ConversationServer is the assembled apiserver.

type ExtraConfig

type ExtraConfig struct {
	Reader     history.Reader
	GapReports gapreport.Store
	// PublicBaseURL is the address the service advertises to clients
	// (PUBLIC_BASE_URL), served through the assistantendpoints resource so a
	// client can discover where to send A2A traffic. Empty is reported as
	// empty, never guessed.
	PublicBaseURL string
	// Runner drives one agent turn for the conversations/sendmessage
	// subresource — the same [a2a.AgentRunner] seam cmd/assistant's A2A
	// executor drives, built by the same internal/agentwiring constructor, so
	// browser (SSE) and A2A traffic run identical agent wiring. Required for
	// that subresource to be usable; a nil Runner makes Connect fail per-call
	// rather than at startup, since ExtraConfig has no validation hook.
	Runner a2a.AgentRunner
}

ExtraConfig carries the assistant-group backends into New(): the read-only views over the shared conversation store and the shared gap-report store.

Directories

Path Synopsis
registry
capabilitygapreport
Package capabilitygapreport is the bespoke read-only REST storage backing the conversations aggregated apiserver's capabilitygapreports resource.
Package capabilitygapreport is the bespoke read-only REST storage backing the conversations aggregated apiserver's capabilitygapreports resource.
conversation
Package conversation is the bespoke read-only REST storage backing the conversations aggregated apiserver.
Package conversation is the bespoke read-only REST storage backing the conversations aggregated apiserver.
endpoint
Package endpoint is the read-only REST storage backing the aggregated apiserver's assistantendpoints resource: it tells a client where to send A2A traffic.
Package endpoint is the read-only REST storage backing the aggregated apiserver's assistantendpoints resource: it tells a client where to send A2A traffic.

Jump to

Keyboard shortcuts

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