Skip to content

--help-json schema omits several mail commands #25

Description

@bscott

The --help-json output is the documented contract for agent integration (AGENTS.md), but extractMailCommands in internal/cli/help.go covers only a subset of what MailCmd actually defines.

Missing entirely:

  • mail download
  • mail attachments
  • mail watch
  • mail reply
  • mail forward
  • mail thread

An agent reading the schema cannot discover these commands or their flags, so they are effectively invisible to the integration path the project is built around.

Surfaced during the 0.2.6 security review. Not a vulnerability, which is why it was not fixed in that round — but it undercuts the --help-json guarantee.

Worth considering while fixing: the schema is hand-maintained in parallel with the Kong structs in cli.go, which is why it drifts. #16 added three flags without updating it, and #21 added --force to mail download, which has no entry at all. Generating the schema from the Kong AST — or a test asserting every cmd:"" field has a schema entry — would stop the drift at the source rather than requiring reviewers to catch it each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions