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

hermes

package
v0.17.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// DashboardPasswordLoginPath is the browser entry that works with Hermes
	// basic-auth. Hermes root "/" auto-redirects to
	// /auth/login?provider=basic, which raises
	// NotImplementedError: BasicAuthProvider is password-only (HTTP 500).
	// See docs/guides/hermes-dashboard-login.md.
	DashboardPasswordLoginPath = "/auth/password-login"

	// DashboardBasicAuthUsername is the fixed username Obol wires into
	// HERMES_DASHBOARD_BASIC_AUTH_USERNAME. The password is the agent API
	// token (same value as HERMES_DASHBOARD_BASIC_AUTH_PASSWORD / API_SERVER_KEY).
	DashboardBasicAuthUsername = "obol"
)
View Source
const AgentEnvVar = "OBOL_AGENT"

AgentEnvVar selects the Hermes instance for `obol hermes` when no leading --agent is given.

Variables

This section is empty.

Functions

func BackupWalletCmd

func BackupWalletCmd(cfg *config.Config, id string, opts BackupWalletOptions, u *ui.UI) error

BackupWalletCmd creates a backup of the Hermes instance's remote-signer wallet. Instance names and namespace scoping are not part of the backup payload, so it restores into any instance (also v0.15 OpenClaw backups).

func CLI

func CLI(cfg *config.Config, id string, args []string) error

func Delete

func Delete(cfg *config.Config, id string, force bool, u *ui.UI) error

func DeploymentPath

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

func FindInstancesWithWallets

func FindInstancesWithWallets(cfg *config.Config) []string

FindInstancesWithWallets returns Hermes instance IDs that have wallet metadata on disk. Used by purge prompts.

func ImageRef

func ImageRef() string

ImageRef returns the upstream Hermes container image ref. Used by stack.devPreloadImages so `obol stack up` preloads the image through the k3s node's CRI before the first Hermes pod starts — otherwise the first pod stalls waiting for the registry mirror to serve a cold pull, which has caused flow-14 step 32 timeouts in the past.

func ImportPrivateKeyWalletCmd

func ImportPrivateKeyWalletCmd(cfg *config.Config, id string, opts ImportPrivateKeyWalletOptions, u *ui.UI) error

ImportPrivateKeyWalletCmd imports an existing private key as the remote-signer wallet for a Hermes instance.

func ListWallets

func ListWallets(cfg *config.Config, id string, u *ui.UI) error

func Onboard

func Onboard(cfg *config.Config, opts OnboardOptions, u *ui.UI) error

func RegenerateToken

func RegenerateToken(cfg *config.Config, id string, u *ui.UI) (string, error)

func ResolveCLIInvocation

func ResolveCLIInvocation(cfg *config.Config, args []string) (string, []string, error)

func ResolveInstanceNamespace

func ResolveInstanceNamespace(cfg *config.Config) (string, error)

func ResolveWalletAddress

func ResolveWalletAddress(cfg *config.Config) (string, error)

func RestoreWalletCmd

func RestoreWalletCmd(cfg *config.Config, id string, opts RestoreWalletOptions, u *ui.UI) error

RestoreWalletCmd restores a Hermes wallet from a backup file (wire format in walletbackup).

func Setup

func Setup(cfg *config.Config, id string, _ SetupOptions, u *ui.UI) error

func SetupDefault

func SetupDefault(cfg *config.Config, u *ui.UI) error

func Sync

func Sync(cfg *config.Config, id string, u *ui.UI) error

func SyncDefaultModels

func SyncDefaultModels(cfg *config.Config, u *ui.UI) error

func SyncSkills added in v0.16.0

func SyncSkills(cfg *config.Config, id string, u *ui.UI) error

SyncSkills re-installs a Hermes instance's skills (built-in plus its opt-in skills) without re-rendering or restarting it; new conversations pick them up.

func Token

func Token(cfg *config.Config, id string, u *ui.UI) error

func WriteWalletMetadata

func WriteWalletMetadata(deploymentDir string, wallet *WalletInfo) error

Types

type BackupWalletOptions

type BackupWalletOptions struct {
	Output      string
	Passphrase  string
	HasPassFlag bool
}

BackupWalletOptions holds options for `obol agent wallet backup`.

type DashboardOptions

type DashboardOptions struct {
	Port      int
	NoBrowser bool
}

type HostWallet added in v0.17.0

type HostWallet struct {
	Namespace   string // hermes-<id> / openclaw-<id>
	Instance    string // instance id recorded in the backup file
	DeployDir   string
	KeystoreDir string
}

HostWallet locates one host-side remote-signer wallet: its metadata (wallet.json) and keystore password (values-remote-signer.yaml) under the instance's deployment dir, its V3 keystore under the namespace's remote-signer-keystores data dir. The layout is the same for Hermes instances and OpenClaw instances left over from <= v0.15.

func HermesHostWallet added in v0.17.0

func HermesHostWallet(cfg *config.Config, id string) HostWallet

HermesHostWallet returns the HostWallet of Hermes instance id.

type ImportPrivateKeyWalletOptions

type ImportPrivateKeyWalletOptions struct {
	PrivateKeyFile string
	Force          bool
	ApplyCluster   bool
}

ImportPrivateKeyWalletOptions holds options for importing a raw private key as a Hermes remote-signer wallet.

type KeystoreRoute added in v0.17.0

type KeystoreRoute string

KeystoreRoute records how a keystore file was read for a backup.

const (
	// KeystoreRouteHost: read directly from the host data dir.
	KeystoreRouteHost KeystoreRoute = "host"
	// KeystoreRouteK3dNode: the host copy is not readable by this user (on
	// Linux the remote-signer pod owns it as UID 65532, mode 0700/0600), so
	// it was read through the k3d server node container instead.
	KeystoreRouteK3dNode KeystoreRoute = "k3d-node"
)

func BuildHostWalletBackup added in v0.17.0

func BuildHostWalletBackup(cfg *config.Config, w HostWallet) (*walletbackup.File, KeystoreRoute, error)

BuildHostWalletBackup assembles the walletbackup.File for one host wallet without writing it anywhere. It reports which route read the keystore.

type OnboardOptions

type OnboardOptions struct {
	ID        string
	Force     bool
	Sync      bool
	IsDefault bool
	AgentMode bool
}

type RestoreWalletOptions

type RestoreWalletOptions struct {
	Input        string
	Passphrase   string
	HasPassFlag  bool
	Force        bool
	ApplyCluster bool
}

RestoreWalletOptions holds options for `obol agent wallet restore`.

type SetupOptions

type SetupOptions struct{}

type WalletInfo

type WalletInfo struct {
	Address      string `json:"address"`
	PublicKey    string `json:"publicKey"`
	KeystoreUUID string `json:"keystore_uuid"`
	KeystorePath string `json:"keystore_path"`
	CreatedAt    string `json:"createdAt"`
	Password     string `json:"-"`
}

func GenerateWallet

func GenerateWallet(cfg *config.Config, id string, u *ui.UI) (*WalletInfo, error)

func ImportWalletFromPrivateKey

func ImportWalletFromPrivateKey(cfg *config.Config, id, privateKeyHex string, u *ui.UI) (*WalletInfo, error)

ImportWalletFromPrivateKey provisions an existing Ethereum private key as the remote-signer wallet for a Hermes instance.

func ReadWalletMetadata

func ReadWalletMetadata(deploymentDir string) (*WalletInfo, error)

Jump to

Keyboard shortcuts

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