CLI: Update hypeman SDK to 508a8c69feb30aa3e3ce115b4037b564ad9a3cda and add new commands/flags#43
Conversation
…nd add new commands/flags Bump the CLI to the latest hypeman-go revision and expand command/flag coverage for newly exposed SDK methods, including snapshots, instance stats/update, memory reclaim, and tag/compression options. Made-with: Cursor
|
QA summary:
|
|
renamed to |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| compression.Algorithm = parsedAlgorithm | ||
| } | ||
| params.Compression = compression | ||
| } |
There was a problem hiding this comment.
Compression config logic triplicated across three commands
Low Severity
The compression config building block (SnapshotCompressionConfigParam construction with the Enabled-defaulting-to-true logic, level parsing, and algorithm parsing) is copy-pasted across handleStandby, handleRun, and handleSnapshotCreate. The three copies already diverge in error handling — run.go double-wraps the algorithm error with fmt.Errorf("invalid snapshot compression algorithm: %w", err) while the other two return err directly. A shared helper accepting flag-name prefixes would eliminate the duplication and the inconsistency.


This PR updates the Hypeman Go SDK to 508a8c69feb30aa3e3ce115b4037b564ad9a3cda and adds CLI commands/flags for new SDK methods.
SDK Update
Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods and CLI commands.
New Commands
hypeman image createforclient.Images.New()hypeman updateforclient.Instances.Update()hypeman statsforclient.Instances.Stats()hypeman snapshot create|restore|list|get|delete|forkfor snapshot SDK methodshypeman resources reclaim-memoryforclient.Resources.ReclaimMemory()New Flags
--tagfilters/metadata flags across list/create commands (images, volumes, devices, ingresses, builds, run, ps)--snapshot-compression-*onhypeman runandhypeman standby--network-egress-enabled,--network-egress-mode, and--credentials-jsononhypeman runTriggered by: kernel/hypeman-go@508a8c6
Reviewer: @sjmiller609
Made with Cursor
Note
Medium Risk
Medium risk due to broad CLI surface-area expansion and new instance/network/snapshot policy parameters being sent to the API. Most changes are additive but could alter behavior for
run,standby, and list filtering if flags are misused or parsed differently.Overview
Updates
github.com/kernel/hypeman-goto a newer commit and wires the CLI to newly available SDK endpoints.Adds new top-level commands:
hypeman snapshot(create/restore/list/get/delete/fork),hypeman stats(instance live stats), andhypeman update egress-credentials(rotate env-backed egress credentials). Addshypeman resources reclaim-memoryto request guest memory reclaim and report the plan/results.Introduces a shared
--tag KEY=VALUEparsing helper and applies it broadly for tagging on create operations and tag-based filtering on list operations (builds, images, volumes, devices, ingresses, instances viaps, and instance creation viarun). Extendsrunwith--credentials-json, network egress policy flags, and snapshot compression policy flags; extendsstandbywith snapshot compression options passed through to the API.Written by Cursor Bugbot for commit f918848. This will update automatically on new commits. Configure here.