Skip to content

Normalize output-format parsing and rendering across builtin commands - #190

Open
Sneh30 wants to merge 8 commits into
agentrhq:mainfrom
Sneh30:issue-172-output-format-normalization
Open

Normalize output-format parsing and rendering across builtin commands#190
Sneh30 wants to merge 8 commits into
agentrhq:mainfrom
Sneh30:issue-172-output-format-normalization

Conversation

@Sneh30

@Sneh30 Sneh30 commented Aug 1, 2026

Copy link
Copy Markdown

What

Fixes #172: unify -f/--format parsing and rendering so every builtin command accepts and honors the same set of output formats, rejects unsupported values, and emits consistent structured output.

Single source of truth

  • src/command-surface.ts now owns the canonical formats (table, plain, json, yaml, md, csv), the aliases yml → yaml and markdown → md, the shared help text, and the parseOutputFormat/resolveOutputFormat validators (case-insensitive).
  • All -f/--format flags (builtin commands, auth status/refresh, adapter/hosted surfaces) advertise the same format list.

Behavior fixes

  • plugin list -f yaml now emits real YAML (previously a table); empty plugin list -f json emits [] instead of human guidance.
  • skills list, external list, plugin catalog list/add, plugin search, convention-audit, and auth status/refresh now honor all six formats with the correct explicit/implicit semantics (table in TTY, YAML outside TTY unless -f is given).
  • webcmd list, skills list, convention-audit, plugin commands, and auth reject unsupported formats (e.g. -f xml) with a usage error (exit 2) instead of silently rendering a table.
  • Aliases (yml, markdown) and case (-f YAML) are accepted and normalized everywhere.

Docs

  • docs/cli-reference.mdx and skills/webcmd-usage/SKILL.md updated to reflect the shared format behavior, rejection of unknown formats, aliases, and plugin list -f json[].

Testing

  • npm test: 5191 passed, 1 skipped (12 new tests).
  • npm run build OK; check:hosted-contract contract bytes unchanged; check:typed-error-lint 0 new.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🟢 No documentation gap found — medium confidence

The automated review found no documentation gap in the supplied changes.

This review is advisory and does not block merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize output-format parsing and rendering

1 participant