From 6bbab88fdb096125f7c90c577f5ba39256f87773 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 16:00:57 +0000 Subject: [PATCH 1/4] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7081c11..0219fc6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-2d26027dfc3e310d3004f117e7a2834be18bdb5054b034262b2caa4c69b78f79.yml -openapi_spec_hash: 02e0e42393d3a95414878cdd23d1f5ad +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-5e2239ba23ac3dbbc95b8993a491e99e9fd23fed2e6ea9cecb81b83bf34a00ff.yml +openapi_spec_hash: 4708504f9119289926b3341d083a1814 config_hash: 35db4c99791f175865381f13a8ad6075 From cc1d17479467b19436346b30256f92d99474d9ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 17:45:27 +0000 Subject: [PATCH 2/4] feat(api): add exec --- .stats.yml | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- pkg/cmd/instance.go | 29 +++++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0219fc6..1eb1c77 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 18 +configured_endpoints: 19 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-5e2239ba23ac3dbbc95b8993a491e99e9fd23fed2e6ea9cecb81b83bf34a00ff.yml openapi_spec_hash: 4708504f9119289926b3341d083a1814 -config_hash: 35db4c99791f175865381f13a8ad6075 +config_hash: 45d3d945ce8eea7a52c8ead4c03fcf3c diff --git a/go.mod b/go.mod index f0be48a..37dbcb4 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/charmbracelet/x/term v0.2.1 github.com/itchyny/json2yaml v0.1.4 github.com/muesli/reflow v0.3.0 - github.com/onkernel/hypeman-go v0.0.3 + github.com/onkernel/hypeman-go v0.1.0 github.com/tidwall/gjson v1.18.0 github.com/tidwall/pretty v1.2.1 github.com/tidwall/sjson v1.2.5 diff --git a/go.sum b/go.sum index da50da2..8bc3e80 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= -github.com/onkernel/hypeman-go v0.0.3 h1:GXi3O8XHuMbXVc4F3gKpBiRAKnt5uVtLmUrrWgGchQg= -github.com/onkernel/hypeman-go v0.0.3/go.mod h1:pxRRFfVcLvafZpDD1O6IjwHnem3hKEuZTCClrnGiIKA= +github.com/onkernel/hypeman-go v0.1.0 h1:xaNn7iy+1Y0z1qsDlDy5e1tFTNedwsf/u5GAzeINvNA= +github.com/onkernel/hypeman-go v0.1.0/go.mod h1:pxRRFfVcLvafZpDD1O6IjwHnem3hKEuZTCClrnGiIKA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= diff --git a/pkg/cmd/instance.go b/pkg/cmd/instance.go index 3e099af..59128ac 100644 --- a/pkg/cmd/instance.go +++ b/pkg/cmd/instance.go @@ -81,6 +81,18 @@ var instancesDelete = cli.Command{ HideHelpCommand: true, } +var instancesExecuteCommand = cli.Command{ + Name: "execute-command", + Usage: "Upgrades to WebSocket for bidirectional streaming for shell access.", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "id", + }, + }, + Action: handleInstancesExecuteCommand, + HideHelpCommand: true, +} + var instancesPutInStandby = cli.Command{ Name: "put-in-standby", Usage: "Put instance in standby (pause, snapshot, delete VMM)", @@ -226,6 +238,23 @@ func handleInstancesDelete(ctx context.Context, cmd *cli.Command) error { ) } +func handleInstancesExecuteCommand(ctx context.Context, cmd *cli.Command) error { + client := hypeman.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + if !cmd.IsSet("id") && len(unusedArgs) > 0 { + cmd.Set("id", unusedArgs[0]) + unusedArgs = unusedArgs[1:] + } + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + return client.Instances.ExecuteCommand( + ctx, + cmd.Value("id").(string), + option.WithMiddleware(debugMiddleware(cmd.Bool("debug"))), + ) +} + func handleInstancesPutInStandby(ctx context.Context, cmd *cli.Command) error { client := hypeman.NewClient(getDefaultRequestOptions(cmd)...) unusedArgs := cmd.Args().Slice() From b6a0b186fb04cd8cb16955ef296c70a368f5c34c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 17:45:43 +0000 Subject: [PATCH 3/4] release: 0.3.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pkg/cmd/version.go | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 10f3091..6b7b74c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.2.0" + ".": "0.3.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a271424..23c8747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.3.0 (2025-11-26) + +Full Changelog: [v0.2.0...v0.3.0](https://github.com/onkernel/hypeman-cli/compare/v0.2.0...v0.3.0) + +### Features + +* **api:** add exec ([cc1d174](https://github.com/onkernel/hypeman-cli/commit/cc1d17479467b19436346b30256f92d99474d9ed)) + ## 0.2.0 (2025-11-26) Full Changelog: [v0.1.2...v0.2.0](https://github.com/onkernel/hypeman-cli/compare/v0.1.2...v0.2.0) diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index 10d2893..5266c84 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -2,4 +2,4 @@ package cmd -const Version = "0.2.0" // x-release-please-version +const Version = "0.3.0" // x-release-please-version From 6fe85ae5b6ce70a4e04b283cf61535b54599dab4 Mon Sep 17 00:00:00 2001 From: Steven Miller Date: Wed, 26 Nov 2025 12:49:16 -0500 Subject: [PATCH 4/4] bump sdk --- .gitignore | 1 + go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e8d1ec6..70126d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .prism.log dist/ /hypeman +.env diff --git a/go.mod b/go.mod index 37dbcb4..51ebf26 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/charmbracelet/x/term v0.2.1 github.com/itchyny/json2yaml v0.1.4 github.com/muesli/reflow v0.3.0 - github.com/onkernel/hypeman-go v0.1.0 + github.com/onkernel/hypeman-go v0.2.0 github.com/tidwall/gjson v1.18.0 github.com/tidwall/pretty v1.2.1 github.com/tidwall/sjson v1.2.5 diff --git a/go.sum b/go.sum index 8bc3e80..59f3008 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= -github.com/onkernel/hypeman-go v0.1.0 h1:xaNn7iy+1Y0z1qsDlDy5e1tFTNedwsf/u5GAzeINvNA= -github.com/onkernel/hypeman-go v0.1.0/go.mod h1:pxRRFfVcLvafZpDD1O6IjwHnem3hKEuZTCClrnGiIKA= +github.com/onkernel/hypeman-go v0.2.0 h1:wiDMSi7eGTKfVfdxhCg8vcFKa6xbXjWG2sSHk7EXi4Y= +github.com/onkernel/hypeman-go v0.2.0/go.mod h1:pxRRFfVcLvafZpDD1O6IjwHnem3hKEuZTCClrnGiIKA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=