Summary
The ambient-api-server has no version endpoint. The Makefile already injects Version and BuildTime via ldflags, but the target Go variables don't exist yet. No changes to rh-trex-ai are needed.
Proposed Change
Add GET /version as an unauthenticated endpoint returning:
{"version": "<git-sha>", "build_time": "<timestamp>", "api_version": "v1"}
Five files touched:
pkg/api/api.go — declare Version and BuildTime vars (ldflags targets)
pkg/middleware/bearer_token.go — add /version to auth bypass
plugins/proxy/plugin.go — add /version to native paths
plugins/version/plugin.go — new plugin serving the endpoint via RegisterPreAuthMiddleware
cmd/ambient-api-server/main.go — import the version plugin
cc @markturansky
Summary
The ambient-api-server has no version endpoint. The Makefile already injects
VersionandBuildTimevia ldflags, but the target Go variables don't exist yet. No changes to rh-trex-ai are needed.Proposed Change
Add
GET /versionas an unauthenticated endpoint returning:{"version": "<git-sha>", "build_time": "<timestamp>", "api_version": "v1"}Five files touched:
pkg/api/api.go— declareVersionandBuildTimevars (ldflags targets)pkg/middleware/bearer_token.go— add/versionto auth bypassplugins/proxy/plugin.go— add/versionto native pathsplugins/version/plugin.go— new plugin serving the endpoint viaRegisterPreAuthMiddlewarecmd/ambient-api-server/main.go— import the version plugincc @markturansky