feat(cli): add version diagnostics and build-aware start

This commit is contained in:
2026-08-15 23:35:55 +02:00
parent 9a8755e4c3
commit 7ac99b4f7e
11 changed files with 989 additions and 306 deletions
+30
View File
@@ -0,0 +1,30 @@
// Package version exposes host CLI build identity without requiring an installation descriptor.
package version
import "runtime"
var (
semanticVersion = "0.0.0-dev"
commit = "unknown"
buildTime = "unknown"
)
// Info is the stable, machine-readable identity of the host-side CLI.
type Info struct {
Version string `json:"version"`
Commit string `json:"commit"`
BuildTime string `json:"buildTime"`
OS string `json:"os"`
Arch string `json:"arch"`
}
// Current returns linker-overridable build metadata plus the executing host platform.
func Current() Info {
return Info{
Version: semanticVersion,
Commit: commit,
BuildTime: buildTime,
OS: runtime.GOOS,
Arch: runtime.GOARCH,
}
}