Skip to content

Add field selection and NDJSON streaming for list commands #2853

@vdemeester

Description

@vdemeester

Summary

AI agents pay per token and lose reasoning capacity with irrelevant output. List commands should support field selection and streaming to minimize context window usage.

Proposal

Field Selection

# Only return specific fields
tkn pipelinerun list --fields name,status,startTime --output json

NDJSON Streaming

# One JSON object per line, streamable
tkn pipelinerun list --output ndjson

This allows agents to process results incrementally without buffering large arrays, and to request only the fields they need.

Acceptance Criteria

  • --fields flag on list commands to select output fields
  • --output ndjson for newline-delimited JSON (one object per line)
  • Works with all resource list commands

/kind feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions