feat(hyperguild): tier subcommand
Adds the tier subcommand to the hyperguild CLI. Reuses internal/tier.Detect verbatim, sources probe URLs from ANTHROPIC_PROBE_URL (default https://api.anthropic.com) and LITELLM_BASE_URL (no default — empty triggers airplane). Human-readable output by default; --json emits the same Info struct as the supervisor's tier MCP returns. Tests cover all three tier states via httptest fakes.
This commit is contained in:
@@ -35,8 +35,8 @@ func TestDispatch_UnknownSubcommand_ReturnsTwo(t *testing.T) {
|
||||
|
||||
func TestDispatch_KnownSubcommand_RoutesAndReturnsExitCode(t *testing.T) {
|
||||
var out, errBuf bytes.Buffer
|
||||
code := dispatch(context.Background(), []string{"tier"}, strings.NewReader(""), &out, &errBuf)
|
||||
// At Task 1 time, tier returns the not-implemented error → exit 1.
|
||||
code := dispatch(context.Background(), []string{"brain"}, strings.NewReader(""), &out, &errBuf)
|
||||
// At this point, brain still returns the not-implemented error → exit 1.
|
||||
assert.Equal(t, 1, code)
|
||||
assert.Contains(t, errBuf.String(), "not implemented")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user