fix(tui): rename internal bash tool to terminal for cross-platform accuracy
Issue for this PR
Closes #1070
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
This renames the internal bash tool to terminal across the codebase.
Calling the shell tool "bash" was misleading on platforms like Windows where the shell is usually PowerShell or CMD. This updates the tool IDs, exported classes (BashTool -> TerminalTool), and UI labels to be shell-agnostic.
(Note: Because this is a core tool rename, this PR unavoidably touches a large number of files—over 90—but the vast majority of these changes are simple 1-to-1 string and import renames).
I also added a backward compatibility layer in packages/core/src/v1/config/permission.ts and next.ts. This remaps the legacy bash key to terminal during config parsing, so existing users' altimate-code.json permission rules won't break. If a user happens to define both bash and terminal in their config, terminal takes precedence.
How did you verify your code works?
I ran bun run typecheck and bun test across the monorepo to ensure everything still builds and all snapshot/permission tests pass. I also verified that the module exports (like TerminalTool.layer) resolve correctly without circular dependencies.
Screenshots / recordings
N/A
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Summary by cubic
Renamed the internal bash tool to terminal for cross‑platform accuracy and clearer UX. Legacy bash configs, events, and messages are transparently mapped to terminal, with terminal taking precedence (closes #1070). Added tests to confirm legacy bash session parts are claimed correctly without duplicate commits.
-
Refactors
- Tool ID and exports:
bash->terminal(BashTool->TerminalTool); registry defaults, API/specs, and UI labels updated. Shell IDs now default toterminalwithbashkept as an alias. - Permissions:
PermissionV1/PermissionNext.fromConfigremapbashtoterminal; if both are defined,terminalwins.disabled()and evaluation treatbashasterminal. - Runtime/UX: CLI/TUI, session data/replay, telemetry, and observability accept legacy
bashparts but renderterminal. Strengthened tests around session data claiming and replay to avoid duplicate shell-start commits.
- Tool ID and exports:
-
Migration
- No action required for existing
altimate-code.json;bashcontinues to work. - For new code/plugins, import
TerminalTooland use theterminalpermission key.
- No action required for existing
Summary by CodeRabbit
- New Features
- Renamed the built-in shell command tool from “Bash” to “Terminal” across the CLI, TUI, API, and tool listings.
- Terminal commands now appear consistently in output, session history, tracing, and observability views.
- Updated terminal guidance and examples, including GitHub workflow instructions.
- Bug Fixes
- Preserved compatibility with legacy “bash” permission settings while prioritizing explicit “terminal” rules.
- Maintained existing command safety behavior: destructive commands remain denied, while permitted commands continue to prompt or run as configured.