version

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version holds the build-time version for all AgentBox components.

The Version variable is set at compile time via:

go build -ldflags="-X github.com/scitix/agent-sandbox/pkg/version.Version=x.y.z"

When not set (e.g. `go run`), it defaults to "0.0.0".

Index

Constants

View Source
const EnvVersion = "AGENTBOX_VERSION"

EnvVersion overrides the compiled-in version at startup. Deployments set it from the container image tag, which answers the question an operator is actually asking when they read a version off the console: which build is running right now. A semver alone cannot say that — several images ship under one version number — and it is only as accurate as the build's -ldflags.

Variables

View Source
var Version = "0.0.0"

Version is the semantic version of this build. Set via -ldflags at compile time; defaults to "0.0.0" for development builds.

Functions

func Resolve added in v0.0.11

func Resolve() string

Resolve returns the version to report to clients: the AGENTBOX_VERSION environment variable when set, otherwise the compiled-in Version.

The result is free-form — an image tag like "develop-abc1234" is a valid answer. Nothing parses it as semver: it travels only in the X-AgentBox-Server-Version response header, which clients display and probe for presence. Client version negotiation compares a different header against its own constant (pkg/apiserver/router/middleware/version.go).

Types

This section is empty.

Jump to

Keyboard shortcuts

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