solutions: the guide is its own program, not part of yet
Default program name in messages is yetano-solutions; comments no longer describe mounting the commands into yet (owner decision 2026-12-01, docs/knowledge-solutions ADR-0006 in the meta-repo). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2481a0dd27
commit
4fb9bf9a5a
3 files changed
+11
-15
No files matched your search
+5
-10
@@ -1,12 +1,7 @@
|
||||
// Package cli implements the guide's commands -- solution, task,
|
||||
// knowledge and open -- with yet's conventions (stdlib flag, --json on
|
||||
// every command, data on stdout, messages on stderr, stable exit codes),
|
||||
// so yet mounts them with one case in its dispatcher:
|
||||
//
|
||||
// case "solution", "task", "knowledge", "open":
|
||||
// return cli.Run(ctx, args, env)
|
||||
//
|
||||
// The same package backs the standalone yetano-solutions binary.
|
||||
// every command, data on stdout, messages on stderr, stable exit codes).
|
||||
// The guide's own program calls Run from main; yet does not embed it.
|
||||
package cli
|
||||
|
||||
import (
|
||||
@@ -45,7 +40,7 @@ type Env struct {
|
||||
// Interactive: stdin and stdout are a terminal. Without it no command
|
||||
// ever waits for input (CLI-03).
|
||||
Interactive bool
|
||||
// Program is the command name in messages ("yet" or "yetano-solutions").
|
||||
// Program is the command name in messages.
|
||||
Program string
|
||||
// Catalogs are default catalog directories (an installed knowledge
|
||||
// bundle); --catalog and $YETANO_SOLUTIONS_CATALOG come first.
|
||||
@@ -86,7 +81,7 @@ func Run(ctx context.Context, args []string, env Env) int {
|
||||
env.Getenv = os.Getenv
|
||||
}
|
||||
if env.Program == "" {
|
||||
env.Program = "yet"
|
||||
env.Program = "yetano-solutions"
|
||||
}
|
||||
if env.Stdin == nil {
|
||||
env.Stdin = os.Stdin
|
||||
@@ -160,7 +155,7 @@ func (a *app) dispatch(args []string) error {
|
||||
return a.usage(cmd)
|
||||
}
|
||||
|
||||
// Usage is the help text (also for yet's usage()).
|
||||
// Usage is the help text.
|
||||
const Usage = `Solutions Guide -- describe what you want to achieve, get native configuration:
|
||||
|
||||
solution list|search|show|setup|generate|validate|plan|doctor
|
||||
|
||||
@@ -20,7 +20,7 @@ func run(t *testing.T, store string, args ...string) result {
|
||||
var out, errb bytes.Buffer
|
||||
code := Run(context.Background(), args, Env{
|
||||
Stdin: strings.NewReader(""), Stdout: &out, Stderr: &errb,
|
||||
Program: "yet", StoreDir: store, Catalogs: []string{"../engine/testdata/cat"},
|
||||
Program: "yetano-solutions", StoreDir: store, Catalogs: []string{"../engine/testdata/cat"},
|
||||
Getenv: func(string) string { return "" },
|
||||
})
|
||||
return result{code, out.String(), errb.String()}
|
||||
@@ -132,7 +132,7 @@ func TestInteractiveWizard(t *testing.T) {
|
||||
// size: Enter (default small), hosts: a.example.org, then actions: 6 export, 8 quit
|
||||
in := strings.NewReader("\na.example.org\n6\n8\n")
|
||||
code := Run(context.Background(), []string{"solution", "setup", "app-run", "--output", out}, Env{
|
||||
Stdin: in, Stdout: &o, Stderr: &e, Interactive: true, Program: "yet", StoreDir: store,
|
||||
Stdin: in, Stdout: &o, Stderr: &e, Interactive: true, Program: "yetano-solutions", StoreDir: store,
|
||||
Catalogs: []string{"../engine/testdata/cat"}, Getenv: func(string) string { return "" },
|
||||
})
|
||||
if code != 0 {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Command yetano-solutions runs the Solutions Guide commands on their own
|
||||
// (CI of the catalog, development). In a normal installation the same
|
||||
// commands are part of yet: yet solution, yet task, yet knowledge, yet open.
|
||||
// Command yetano-solutions runs the Solutions Guide commands (CI of the
|
||||
// catalog, development). The guide is deliberately not part of yet, which
|
||||
// stays a general tool; the full program with TUI and GUI moves to its
|
||||
// own repository (docs/knowledge-solutions ADR-0006).
|
||||
//
|
||||
// yetano-solutions solution list --catalog assets/solutions
|
||||
package main
|
||||
|
||||
Reference in new issue
Block a user