Skip to content

Commit 4761fe2

Browse files
authored
refactor: drop hidden bub message CLI alias (#144)
1 parent 4cd5d8b commit 4761fe2

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Builtin `BuiltinImpl` behavior includes:
4949
- `build_prompt`: supports comma command mode; non-command text may include `context_str`.
5050
- `run_model`: delegates to `Agent.run()`.
5151
- `system_prompt`: combines a default prompt with workspace `AGENTS.md`.
52-
- `register_cli_commands`: installs `run`, `gateway`, `chat`, plus hidden compatibility/diagnostic commands.
52+
- `register_cli_commands`: installs `run`, `gateway`, `chat`, plus hidden diagnostic commands.
5353
- `provide_channels`: returns `telegram` and `cli` channel adapters.
5454
- `provide_tape_store`: returns a file-backed tape store under `~/.bub/tapes`.
5555

docs/channels/cli.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CLI
22

3-
`bub` exposes four main commands (`run`, `gateway`, `chat`, `login`) plus two hidden ones (`hooks` for diagnostics, `message` as a compatibility alias for `gateway`).
3+
`bub` exposes four main commands (`run`, `gateway`, `chat`, `login`) plus one hidden one (`hooks` for diagnostics).
44

55
## `bub run`
66

@@ -56,8 +56,6 @@ Enable only selected channels:
5656
uv run bub gateway --enable-channel telegram
5757
```
5858

59-
`bub message` is kept as a hidden compatibility alias and forwards to the same command implementation.
60-
6159
## `bub chat`
6260

6361
Start an interactive REPL session via the `cli` channel.

src/bub/builtin/hook_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def register_cli_commands(self, app: typer.Typer) -> None:
117117
app.command("chat")(cli.chat)
118118
app.add_typer(cli.login_app)
119119
app.command("hooks", hidden=True)(cli.list_hooks)
120-
app.command("message", hidden=True)(app.command("gateway")(cli.gateway))
120+
app.command("gateway")(cli.gateway)
121121

122122
def _read_agents_file(self, state: State) -> str:
123123
workspace = state.get("_runtime_workspace", str(Path.cwd()))

tests/test_framework.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,19 @@ def system_prompt(self, prompt: str, state: dict[str, str]) -> str | None:
9494
assert prompt == "low\n\nhigh"
9595

9696

97-
def test_builtin_cli_exposes_login_and_keeps_message_hidden_alias() -> None:
97+
def test_builtin_cli_exposes_login_and_gateway_command() -> None:
9898
framework = BubFramework()
9999
framework.load_hooks()
100100
app = framework.create_cli_app()
101101
runner = CliRunner()
102102

103103
help_result = runner.invoke(app, ["--help"])
104-
alias_result = runner.invoke(app, ["message", "--help"])
104+
gateway_result = runner.invoke(app, ["gateway", "--help"])
105105

106106
assert help_result.exit_code == 0
107107
assert "login" in help_result.stdout
108108
assert "gateway" in help_result.stdout
109109
assert "│ message" not in help_result.stdout
110-
assert alias_result.exit_code == 0
111-
assert "bub message" in alias_result.stdout
112-
assert "Start message listeners" in alias_result.stdout
110+
assert gateway_result.exit_code == 0
111+
assert "bub gateway" in gateway_result.stdout
112+
assert "Start message listeners" in gateway_result.stdout

0 commit comments

Comments
 (0)