Help us shape the future of Go! Take the 2026 Go Developer Survey

agentruntime

package
v0.16.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Hermes Runtime = "hermes"

	DefaultDomain     = "obol.stack"
	DefaultInstanceID = "obol-agent"
)
View Source
const RemoteSignerChartVersion = "0.4.0"

RemoteSignerChartVersion is the single source of truth for the `remote-signer` Helm chart pin used by Hermes deployments. It MUST be updated as a single edit; bumping it here updates every consumer in lockstep.

Chart 0.4.0 ships remote-signer image `v0.4.0`, which honours `SIGNER__AUTH__TOKEN` (the bearer token the controller mints into the keystore Secret and injects via env). Canonical Ethereum recovery-id signatures (`v=27/28`) from `/sign/.../message`, `/sign/.../typed-data`, and `/sign/.../hash` have been the baseline since chart 0.3.2 / image v0.3.0 — earlier images returned `v=0/1` (alloy y-parity) and forced the buy.py caller to renormalize for EIP-712 / ERC-3009 verifiers like USDC `transferWithAuthorization`.

0.4.0 also renders `spec.strategy` from `.Values.strategy` (defaulting to `Recreate`), so the RWO-keystore singleton no longer needs an imperative post-sync `kubectl patch` to stay off RollingUpdate. `values-remote-signer.yaml` pins `strategy.type: Recreate` explicitly so the intent is visible at the obol-stack layer and survives any future change to the chart default.

renovate: datasource=helm depName=remote-signer registryUrl=https://obolnetwork.github.io/helm-charts/

View Source
const SoulTemplate = `` /* 1460-byte string literal not displayed */

SoulTemplate is the default system-prompt scaffold for sub-agents.

It is shipped with the binary, not the Agent CRD, so we can ratchet guardrails forward without bumping the CRD schema. The CRD only carries the operator's objective text, which is interpolated at the {{ .OperatorObjective }} placeholder.

Lifecycle: written exactly once by the seeder when SOUL.md does not yet exist on the agent's data PVC. After that the agent owns the file and can rewrite it freely.

Variables

This section is empty.

Functions

func BuildExecArgs added in v0.10.0

func BuildExecArgs(runtime Runtime, id string, argv []string, withTTY bool) []string

BuildExecArgs returns the kubectl argv for `kubectl exec` into the agent pod identified by (runtime, id), running argv inside it. Pure / testable — no side effects. argv is the full in-pod command vector; argv[0] is the binary (e.g. "python3" or a runtime CLI path), argv[1:] its args.

withTTY toggles the `-t` flag; callers usually pass shouldRequestTTY().

func CollectHostnames

func CollectHostnames(cfg *config.Config, include ...DeploymentRef) []string

func DashboardHostname

func DashboardHostname(runtime Runtime, id string) string

func DataRoot

func DataRoot(cfg *config.Config, runtime Runtime, id string) string

func DeploymentPath

func DeploymentPath(cfg *config.Config, runtime Runtime, id string) string

func ExecInPod added in v0.10.0

func ExecInPod(cfg *config.Config, runtime Runtime, id string, argv []string) error

ExecInPod runs argv inside the agent pod identified by (runtime, id) using the resolved kubectl binary, handing the terminal over to it (see internal/passthrough: on unix obol is replaced by kubectl, so TTY, signals and exit codes are native). `-t` is requested only when both stdin and stdout are terminals.

KUBECONFIG is always the stack kubeconfig (an ambient KUBECONFIG is ignored: the agent pod only exists in the stack). Exec into a pod always needs a cluster, so a missing stack kubeconfig is reported up front instead of letting kubectl fail. The in-pod exit status becomes obol's exit status.

func HomePath

func HomePath(cfg *config.Config, runtime Runtime, id string) string

func Hostname

func Hostname(runtime Runtime, id string) string

func Hostnames

func Hostnames(runtime Runtime, id string) []string

func KeystoreVolumePath

func KeystoreVolumePath(cfg *config.Config, runtime Runtime, id string) string

func ListInstanceIDs

func ListInstanceIDs(cfg *config.Config, runtime Runtime) ([]string, error)

func MaxIDLength added in v0.14.0

func MaxIDLength(runtime Runtime) int

MaxIDLength returns the longest id that keeps every DNS label this package derives from it (namespace/hostname "<runtime>-<id>", and for Hermes the "-ui" DashboardHostname suffix) within the 63-character DNS label limit. validate.Name alone allows ids up to 63 chars, which is too permissive here since Onboard prepends a runtime prefix before the id ever reaches a Kubernetes object.

func Namespace

func Namespace(runtime Runtime, id string) string

func RenderSoul added in v0.10.0

func RenderSoul(objective string) (string, error)

RenderSoul substitutes the operator's objective into the soul template. An empty objective renders the template verbatim — including a literal blank line where the objective would be — so callers can decide whether to enforce non-empty in their CRD validation.

func WorkspacePath

func WorkspacePath(cfg *config.Config, runtime Runtime, id string) string

Types

type DeploymentRef

type DeploymentRef struct {
	Runtime Runtime
	ID      string
}

type Descriptor

type Descriptor struct {
	Runtime       Runtime
	DisplayName   string
	ServiceName   string
	ConfigMapName string
	DataPVCName   string
	HomeDir       string
	DefaultPort   int
}

func Describe

func Describe(runtime Runtime) Descriptor

Describe returns the descriptor for runtime. Hermes is the only runtime (OpenClaw was removed in v0.16).

type Runtime

type Runtime string

Jump to

Keyboard shortcuts

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