Skip to content

Add JSON output format to aegisctl pending #77

@saivedant169

Description

@saivedant169

Problem

aegisctl pending currently prints a human-readable table. That is great for people, but it is painful to parse in scripts or CI.

Acceptance criteria

  • Adding --json to aegisctl pending prints the raw JSON array from the admin API
  • The default (no flag) still prints the table
  • Exit code is 0 when there are pending items, 0 when there are none
  • A unit test covers the JSON path in cmd/aegisctl/

Files to touch

  • cmd/aegisctl/main.go (the pending command handler)
  • Add a test file if one does not exist for this command

How to test locally

Start AegisFlow with a review-path rule, trigger a review, then:

./bin/aegisctl pending --json
# Expected: a JSON array, parseable with jq
./bin/aegisctl pending --json | jq '.[0].envelope.tool'

Notes

If you want to do the same for aegisctl approve, deny, and evidence export, that is welcome but please open a separate PR per command so each one is reviewable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions