config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides configuration for the controller server path.

Index

Constants

View Source
const (

	// Harness IDs reserved for AX's built-in harnesses.
	AntigravityHarnessID             = "antigravity"
	AntigravityInteractionsHarnessID = "antigravity-interactions"
	// AntigravityHarnessTemplate is the substrate ActorTemplate that runs the
	// Antigravity harness.
	AntigravityHarnessTemplate = "ax-harness-antigravity-template"
	// AntigravityInteractionsTemplate is the substrate ActorTemplate that runs
	// the Antigravity Interactions harness.
	AntigravityInteractionsTemplate = "ax-harness-interactions-template"
)

Variables

This section is empty.

Functions

func AXAssetsDir added in v0.2.0

func AXAssetsDir() (string, error)

Types

type AntigravityHarnessConfig added in v0.2.0

type AntigravityHarnessConfig struct {
	Default  bool   `yaml:"default,omitempty"`
	Endpoint string `yaml:"endpoint,omitempty"` // HarnessService address
}

AntigravityHarnessConfig registers the built-in Antigravity harness.

type AntigravityInteractionsHarnessConfig added in v0.2.0

type AntigravityInteractionsHarnessConfig struct {
	Default bool   `yaml:"default,omitempty"` // Default harness or not
	Agent   string `yaml:"agent,omitempty"`   // Interactions API agent (default: antigravityinteractions.DefaultAgent)
	// SystemInstruction is a free-form system prompt sent on every turn.
	SystemInstruction string `yaml:"system_instruction,omitempty"`
}

AntigravityInteractionsHarnessConfig registers the built-in Antigravity Interactions harness (over the Vertex GenAI Interactions API).

type Config

type Config struct {
	Version   string          `yaml:"version"`
	Server    ServerConfig    `yaml:"server"`
	EventLog  EventLogConfig  `yaml:"eventlog"`
	Harnesses HarnessesConfig `yaml:"harnesses,omitempty"`
	// Skills sources skills from the Gemini Enterprise Skill Registry into on-disk folders
	// before the harness starts. It is harness-agnostic: each actor runs exactly
	// one harness, which consumes the materialized folder(s). Optional; disabled
	// when no registry is enabled.
	Skills    SkillsConfig    `yaml:"skills,omitempty"`
	Telemetry TelemetryConfig `yaml:"telemetry,omitempty"`
}

Config represents the main configuration for the AX harness server.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a configuration with default values set.

func LoadFromBytes added in v0.2.0

func LoadFromBytes(data []byte) (*Config, error)

LoadFromBytes parses configuration from YAML bytes and applies defaults.

func LoadFromFile

func LoadFromFile(path string) (*Config, error)

LoadFromFile loads configuration from a YAML file.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration.

type EventLogConfig

type EventLogConfig struct {
	SQLiteConfig   SQLiteConfig   `yaml:"sqlite,omitempty"`
	PostgresConfig PostgresConfig `yaml:"postgres,omitempty"`
}

EventLogConfig configures the event log storage.

type HarnessesConfig added in v0.2.0

type HarnessesConfig struct {
	Antigravity             AntigravityHarnessConfig             `yaml:"antigravity,omitempty"`
	AntigravityInteractions AntigravityInteractionsHarnessConfig `yaml:"antigravity-interactions,omitempty"`
	Substrate               []SubstrateHarnessConfig             `yaml:"substrate,omitempty"`
}

HarnessesConfig groups harnesses to serve by type. There are two categories:

  • Built-in harnesses (e.g. Antigravity, AntigravityInteractions) whose implementation and container image are provided by AX.
  • Custom harnesses on substrate whose implementation and container image are provided by the user via their own ActorTemplate.

type OTLPConfig added in v0.2.0

type OTLPConfig struct {
	Enabled  bool   `yaml:"enabled,omitempty"`
	Endpoint string `yaml:"endpoint,omitempty"` // OTLP collector endpoint (e.g., "localhost:4317")
}

OTLPConfig configures the OTLP exporter.

type PostgresConfig added in v0.2.0

type PostgresConfig struct {
	DSN string `yaml:"dsn"` // Postgres connection DSN
}

PostgresConfig configures the Postgres event log.

type SQLiteConfig

type SQLiteConfig struct {
	Filename string `yaml:"filename"` // SQLite file for event log storage
}

SQLiteConfig configures the SQLite event log file.

type ServerConfig

type ServerConfig struct {
	Address string `yaml:"address"` // Server address to listen on (e.g., ":8494")
}

ServerConfig configures the gRPC server.

type SkillRefConfig added in v0.2.0

type SkillRefConfig struct {
	ID       string `yaml:"id"`
	Revision string `yaml:"revision,omitempty"`
}

SkillRefConfig identifies a skill to materialize, optionally pinned.

type SkillsConfig added in v0.2.0

type SkillsConfig struct {
	Registries []SkillsRegistryConfig `yaml:"registries,omitempty"`
}

SkillsConfig configures optional skill sources (top-level, harness-agnostic). Today the only source type is the Gemini Enterprise Skill Registry; it may source from more than one registry (e.g. a shared org-wide registry plus a team-specific one), each with its own project/location, selection, and target directory.

func (SkillsConfig) Validate added in v0.2.0

func (s SkillsConfig) Validate() error

Validate checks the (top-level) skills config.

type SkillsQueryConfig added in v0.2.0

type SkillsQueryConfig struct {
	// Text is the semantic search string (required for query selection).
	Text string `yaml:"text"`
	// TopK bounds the number of matches (<=0 uses the server default).
	TopK int `yaml:"top_k,omitempty"`
}

SkillsQueryConfig selects skills by semantic search.

type SkillsRegistryConfig added in v0.2.0

type SkillsRegistryConfig struct {
	Enabled bool `yaml:"enabled,omitempty"`
	// Project owns the skills (projects/{Project}/locations/{Location}/skills).
	// Empty falls back to the GOOGLE_CLOUD_PROJECT environment variable.
	Project string `yaml:"project,omitempty"`
	// Location is the registry region, e.g. "us-central1". Empty falls back to
	// GOOGLE_CLOUD_LOCATION, then a built-in default.
	Location string `yaml:"location,omitempty"`

	// Skills is an explicit allowlist of skills, each optionally pinned to a
	// revision. Takes precedence over Query and All.
	Skills []SkillRefConfig `yaml:"skills,omitempty"`
	// Query is a semantic search selection; its top matches are materialized.
	// TopK lives inside it because it only has meaning for a query.
	Query *SkillsQueryConfig `yaml:"query,omitempty"`
	// All materializes every skill in the project/location (used when neither
	// Skills nor Query is set; can also be set explicitly).
	All bool `yaml:"all,omitempty"`

	// TargetDir is the base directory skills are materialized into: each skill
	// is written to <TargetDir>/<skill-id>/. Required when Enabled.
	TargetDir string `yaml:"target_dir,omitempty"`
}

SkillsRegistryConfig sources agentskills.io skills from the Gemini Skill Registry. When Enabled, exactly one selection mode should be set (Skills, Query, or All); if none is set, all skills are materialized.

type SubstrateHarnessConfig added in v0.2.0

type SubstrateHarnessConfig struct {
	ID        string `yaml:"id"`                // Unique harness identifier
	Namespace string `yaml:"namespace"`         // ActorTemplate namespace (user-owned, not "ax")
	Template  string `yaml:"template"`          // ActorTemplate name
	Port      int    `yaml:"port,omitempty"`    // HarnessService port
	Default   bool   `yaml:"default,omitempty"` // Default harness or not
}

SubstrateHarnessConfig registers a custom harness deployed on substrate from a user-provided container image.

func (SubstrateHarnessConfig) NewHarness added in v0.2.0

func (c SubstrateHarnessConfig) NewHarness(endpoint string) (harness.Harness, error)

NewHarness builds the custom harness. Custom harnesses always run as substrate actors from the user's own ActorTemplate.

type TelemetryConfig added in v0.2.0

type TelemetryConfig struct {
	OTLP OTLPConfig `yaml:"otlp,omitempty"`
}

TelemetryConfig configures telemetry options.

Jump to

Keyboard shortcuts

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