Skip to content

fix(agent): reject invalid output modes#50

Open
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/agent-output-validation
Open

fix(agent): reject invalid output modes#50
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/agent-output-validation

Conversation

@JerryNee

Copy link
Copy Markdown

Summary

  • validate testsprite agent ... --output <mode> against the supported json|text modes
  • return the existing local VALIDATION_ERROR shape instead of silently treating unsupported modes as text
  • add command-wiring coverage for agent list

Before

testsprite agent list --output yaml exited 0 and printed text output.

After

testsprite agent list --output yaml exits 5 with:

Error: Invalid request.
Flag `--output` is invalid: must be one of: json, text.

Verification

  • npm test -- src/commands/agent.test.ts
  • npm run lint
  • npm run typecheck
  • npm test
  • npm run build
  • node dist/index.js agent list --output yaml

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.

1 participant