feat: improvements for CLI based agent interface, TUI dashboard#8
Open
giolaq wants to merge 13 commits into
Open
feat: improvements for CLI based agent interface, TUI dashboard#8giolaq wants to merge 13 commits into
giolaq wants to merge 13 commits into
Conversation
For agents that prefer CLI shell invocation over MCP protocol: - bee --describe: JSON blob of all commands for agent discovery - bee validate <cmd>: pre-check auth + command existence without executing - Structured exit codes: 0=ok, 1=general, 2=auth, 3=args, 4=network, 5=rate-limit - BEE_OUTPUT_FORMAT=json: structured JSON errors on stderr (not usage text) Two agent paths now coexist: - MCP agents: bee mcp (native protocol, tool discovery via list_tools) - Shell agents: bee --describe + validate + exit codes + JSON stderr
- sources/utils/format.test.ts: 7 tests for resolveOutputFormat (flags, env var, precedence, defaults) - sources/errors.test.ts: 6 tests for typed error classes (exit codes, recoverable, suggestions, names) - sources/commands/validate/index.test.ts: 3 tests for validate (valid command, unknown command, no command) - Fix: validate skips token check in proxy mode Total: 313 tests passing (was 297)
--describe now outputs flag names, types (int/string/bool/boolString), positionals (with required flag), and side_effects for all 40 commands. Shell agents can construct valid command invocations without guessing.
…./sources/main.ts
- Replace Handlebars with 3-line renderTemplate() regex in stream command - Remove handlebars from package.json dependencies - Use ValidationError (exit code 3) instead of generic Error in: changed (--cursor, unknown option, unexpected args) login (--token, --proxy, --token-stdin, unknown option, unexpected args) mcp (missing subcommand)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three capabilities on top of v0.7.1 without changing existing command behavior:
Shell Agent Features
bee --describe— JSON schema of all 40 commands with parameter names, types, and side-effect flagsbee validate <command>— pre-check auth/command existence without executingBEE_OUTPUT_FORMAT=json— structured JSON errors on stderr instead of usage textComplements existing MCP providing two paths for agents:
bee mcp(protocol-native)bee --describe+validate+ exit codesTUI Dashboard
bee dashboard(alias:bee ui) persistent two-pane terminal interfaceNO_COLORenv var supportCode Quality
ValidationErrorin all commands (changed, login, mcp) for consistent exit codesTest plan
bee --describereturns JSON with all commands and parametersbee validate facts listreturns{"valid":true}bee validate boguscmdexits 3 with structured errorBEE_OUTPUT_FORMAT=json bee facts createreturns JSON error on stderrbee dashboardopens interactive TUI, navigable with arrow keysbee dashboardexits cleanly withqbun testpasses (313 tests)bun run buildcompiles