mcp: response projection and summaries in list_resources

Đang mở
#4 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api, backend

Hướng nghiên cứu

Start by locating the existing list_resources and get_resource entry points and examining how label and field selectors are passed through to kcp. Define the behavior for fields, limit/continue pagination, and conditionSummary, then validate projections, pagination, and condition reduction against the live-deployment scenarios described in the issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Motivation

list_resources returns full objects. For agent use this is the biggest cost driver: a question like "which of my resources aren't ready" pulls every manifest into the model context when one line per resource would do.

Proposal

Additions to list_resources (and get_resource where it applies):

  • fields: a list of JSONPath-like projections, for example metadata.name, spec.kubernetes.version. The response contains only those fields per item.
  • limit and continue: standard list pagination passed through to kcp.
  • conditionSummary: opt-in flag that reduces each item to name, namespace and its failing or unknown conditions (type, reason, message). Ready resources are returned as a count.

Server-side projection keeps responses compact regardless of the model or client. Label and field selectors already exist, this completes the story for read-heavy agent workloads.

Validation notes

Verified against a live deployment: the data needed for fleet-wide checks (status conditions, spec fields) is all present in responses today, but only as full manifests.
Typical agent questions ("do all my X run multi-zone", "which resources aren't ready", "what versions are my X on") need only two or three fields per item.

Ngôn ngữ chính
Go
Star
1
Fork
2
Merge trung bình
8 giờ 16 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của kcp-dev/contrib-virtual-workspaces

Tất cả issue của kcp-dev/contrib-virtual-workspaces

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.