Skip to content

Cli/breaking flag cleanup#167

Merged
simongdavies merged 3 commits into
hyperlight-dev:mainfrom
simongdavies:cli/breaking-flag-cleanup
May 21, 2026
Merged

Cli/breaking flag cleanup#167
simongdavies merged 3 commits into
hyperlight-dev:mainfrom
simongdavies:cli/breaking-flag-cleanup

Conversation

@simongdavies
Copy link
Copy Markdown
Member

This pull request introduces several new CLI features, environment variables, and important breaking changes to HyperAgent's configuration and output modes. The main highlights are the replacement of the misnamed --show-reasoning flag, the addition of --very-verbose for more detailed output, and a new --base-dir flag that auto-enables and configures the fs-read and fs-write plugins. Documentation and internal state handling are updated accordingly.

Breaking changes:

  • Removed the misnamed --show-reasoning/HYPERAGENT_SHOW_REASONING flag; use --reasoning-effort/HYPERAGENT_REASONING_EFFORT instead. The new flag has the same accepted levels and no fallback to the old name.

New features:

  • Added --very-verbose/-vv/HYPERAGENT_VERY_VERBOSE flag to print full result bodies for all tools, not just sandbox tools. This extends the output detail beyond what --verbose provides.
  • Introduced --base-dir <path>/HYPERAGENT_BASE_DIR to auto-enable and configure the fs-read and fs-write plugins with the specified directory, which is created if missing and rejects symlinks. This is independent of --auto-approve.

Output and event handling improvements:

  • Fixed --verbose so that it now prints sandbox tool bodies, and --very-verbose prints every tool body (previously, non-sandbox tools always rendered as a terse ✅ Done even in verbose mode).
  • Updated CLI/environment variable parsing and internal state to support the new flags and options, including correct implication of --verbose by --very-verbose.

Documentation updates:

  • Updated CHANGELOG.md and docs/USAGE.md to reflect the new flags, environment variables, and removed options.

… fix verbose tool-output gate

BREAKING CHANGE: --show-reasoning / HYPERAGENT_SHOW_REASONING removed.
Use --reasoning-effort / HYPERAGENT_REASONING_EFFORT instead. Same
accepted levels (low / medium / high / xhigh, default 'high' when the
flag is given without a value), same wiring into the Copilot SDK
session -- the old name is gone with no silent fallback.

Added:
- --very-verbose / -vv / HYPERAGENT_VERY_VERBOSE: extends --verbose so
  the full result body prints for *every* tool (audit progress, plugin
  enable/disable, module registration, intent reports, handler
  registration, etc.), not just sandbox tools. Plain --verbose keeps
  the leaner default (sandbox tool bodies only; one-line ✅ Done for
  everything else).
- --base-dir <path> / HYPERAGENT_BASE_DIR: auto-enables both the
  fs-read and fs-write plugins at startup with the supplied directory
  as their baseDir. Directory is created if missing; symlinks are
  still rejected. Independent of --auto-approve.

Fixed:
- --verbose was silently dropping non-sandbox tool result bodies. The
  event handler returned early for anything other than
  execute_javascript / execute_bash, so plugin_info, module_info,
  report_intent, register_handler, etc. always rendered as a terse
  ✅ Done even in verbose mode. The early-return is gone; --verbose
  now prints sandbox tool bodies and --very-verbose prints every tool
  body.

Tests: new tests/cli-parser.test.ts covers all new flags plus
rejection of the removed --show-reasoning. just check is green
(45 files, 2491 tests pass).

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
…se-dir, fix verbose tool-output gate

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 21, 2026 14:26
@simongdavies simongdavies added the bug Something isn't working label May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates HyperAgent’s CLI and runtime output behavior by replacing the removed --show-reasoning flag with --reasoning-effort, adding a stricter multi-level verbosity mode (--very-verbose / -vv), and introducing --base-dir to auto-configure and enable the fs-read/fs-write plugins at startup.

Changes:

  • Replaced --show-reasoning/HYPERAGENT_SHOW_REASONING with --reasoning-effort/HYPERAGENT_REASONING_EFFORT, including tests and documentation updates.
  • Added --very-verbose (-vv) and implemented tool-result body gating so --verbose shows sandbox tool bodies while --very-verbose shows bodies for all tools.
  • Added --base-dir/HYPERAGENT_BASE_DIR to auto-audit/approve/configure/enable fs-read and fs-write at startup, plus CLI parser tests and docs/changelog entries.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/cli-parser.test.ts Adds unit coverage for the new/removed CLI flags and env vars.
src/agent/state.ts Introduces veryVerboseOutput in agent state wired from CLI config.
src/agent/index.ts Sets new verbosity env var and applies --base-dir to fs plugins at startup; updates reasoning-effort wiring.
src/agent/event-handler.ts Implements verbose vs very-verbose gating for tool result bodies (sandbox-only vs all tools).
src/agent/commands.ts Updates /reasoning help text to reference --reasoning-effort.
src/agent/cli-parser.ts Renames/extends CLI config (reasoningEffort, veryVerbose, baseDir) and updates usage text + env var handling.
docs/USAGE.md Updates CLI and env var reference docs for the new flags and breaking change.
CHANGELOG.md Documents breaking removal of --show-reasoning and adds notes for --very-verbose and --base-dir.

Comment thread src/agent/cli-parser.ts
Comment thread src/agent/cli-parser.ts Outdated
Comment thread src/agent/index.ts
…se-dir, fix verbose tool-output gate

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
@simongdavies simongdavies merged commit 2d0e71d into hyperlight-dev:main May 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants