hostconfig

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package hostconfig defines the ACP process configuration shared by Agent definitions, runtime adapters, and native agent implementations. It contains no persisted service object or management lifecycle.

Index

Constants

View Source
const (
	CodexModeAdapter   = "adapter"
	CodexModeAppServer = "app_server"
)

Variables

This section is empty.

Functions

func ValidateCWDAllowed

func ValidateCWDAllowed(cwd string, roots []string) error

Types

type CodexConfig

type CodexConfig struct {
	Mode             string   `json:"mode,omitempty"`
	AdapterCommand   string   `json:"adapter_command,omitempty"`
	AdapterArgs      []string `json:"adapter_args,omitempty"`
	AppServerCommand string   `json:"app_server_command,omitempty"`
	AppServerArgs    []string `json:"app_server_args,omitempty"`
	DefaultProfile   string   `json:"default_profile,omitempty"`
	InitialAuthMode  string   `json:"initial_auth_mode,omitempty"`
	TraceJSON        bool     `json:"trace_json,omitempty"`
	RetryTurnOnCrash bool     `json:"retry_turn_on_crash,omitempty"`
}

type Config

type Config struct {
	OwnerID         string            `json:"-"`
	AgentType       string            `json:"agent_type"`
	CWD             string            `json:"cwd"`
	AllowedRoots    []string          `json:"allowed_roots,omitempty"`
	DefaultModel    string            `json:"default_model,omitempty"`
	Env             map[string]string `json:"env,omitempty"`
	ConfigOverrides map[string]string `json:"config_overrides,omitempty"`
	IdleTTL         time.Duration     `json:"idle_ttl,omitempty"`
	MaxInstances    int               `json:"max_instances,omitempty"`
	PermissionMode  string            `json:"permission_mode,omitempty"`
	Codex           *CodexConfig      `json:"codex,omitempty"`
}

Config is the process-facing ACP runtime configuration. OwnerID is assigned by the runtime adapter from the owning Agent and is never serialized as an independent management identity.

func (Config) Fingerprint

func (c Config) Fingerprint(ownerID string) (string, error)

Fingerprint returns a canonical process-config fingerprint. The Agent owner is validated but excluded from the serialized configuration.

func (*Config) Normalize

func (c *Config) Normalize()

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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