Documentation
¶
Index ¶
- Constants
- func BackupWalletCmd(cfg *config.Config, id string, opts BackupWalletOptions, u *ui.UI) error
- func CLI(cfg *config.Config, id string, args []string) error
- func Delete(cfg *config.Config, id string, force bool, u *ui.UI) error
- func DeploymentPath(cfg *config.Config, id string) string
- func FindInstancesWithWallets(cfg *config.Config) []string
- func ImageRef() string
- func ImportPrivateKeyWalletCmd(cfg *config.Config, id string, opts ImportPrivateKeyWalletOptions, u *ui.UI) error
- func ListWallets(cfg *config.Config, id string, u *ui.UI) error
- func Onboard(cfg *config.Config, opts OnboardOptions, u *ui.UI) error
- func RegenerateToken(cfg *config.Config, id string, u *ui.UI) (string, error)
- func ResolveCLIInvocation(cfg *config.Config, args []string) (string, []string, error)
- func ResolveInstanceNamespace(cfg *config.Config) (string, error)
- func ResolveWalletAddress(cfg *config.Config) (string, error)
- func RestoreWalletCmd(cfg *config.Config, id string, opts RestoreWalletOptions, u *ui.UI) error
- func Setup(cfg *config.Config, id string, _ SetupOptions, u *ui.UI) error
- func SetupDefault(cfg *config.Config, u *ui.UI) error
- func Sync(cfg *config.Config, id string, u *ui.UI) error
- func SyncDefaultModels(cfg *config.Config, u *ui.UI) error
- func SyncSkills(cfg *config.Config, id string, u *ui.UI) error
- func Token(cfg *config.Config, id string, u *ui.UI) error
- func WriteWalletMetadata(deploymentDir string, wallet *WalletInfo) error
- type BackupWalletOptions
- type DashboardOptions
- type HostWallet
- type ImportPrivateKeyWalletOptions
- type KeystoreRoute
- type OnboardOptions
- type RestoreWalletOptions
- type SetupOptions
- type WalletInfo
Constants ¶
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" )
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 ¶
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 FindInstancesWithWallets ¶
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 RegenerateToken ¶
func ResolveCLIInvocation ¶
func RestoreWalletCmd ¶
RestoreWalletCmd restores a Hermes wallet from a backup file (wire format in walletbackup).
func SyncSkills ¶ added in v0.16.0
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 WriteWalletMetadata ¶
func WriteWalletMetadata(deploymentDir string, wallet *WalletInfo) error
Types ¶
type BackupWalletOptions ¶
BackupWalletOptions holds options for `obol agent wallet backup`.
type DashboardOptions ¶
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 ¶
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 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 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)