feat(hyperguild): brain query subcommand
Adds 'hyperguild brain query <topic>' against the brain HTTP REST /query endpoint. Default human output prints path + score + title; --json passes through the response envelope. --limit overrides the default 5-result cap. runBrainWrite remains a stub for Task 5.
This commit is contained in:
@@ -35,8 +35,7 @@ func TestDispatch_UnknownSubcommand_ReturnsTwo(t *testing.T) {
|
||||
|
||||
func TestDispatch_KnownSubcommand_RoutesAndReturnsExitCode(t *testing.T) {
|
||||
var out, errBuf bytes.Buffer
|
||||
code := dispatch(context.Background(), []string{"brain"}, strings.NewReader(""), &out, &errBuf)
|
||||
// At this point, brain still returns the not-implemented error → exit 1.
|
||||
code := dispatch(context.Background(), []string{"mode"}, strings.NewReader(""), &out, &errBuf)
|
||||
assert.Equal(t, 1, code)
|
||||
assert.Contains(t, errBuf.String(), "not implemented")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user