Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

agents/ability-call should only dispatch abilities that opt into an external surface

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/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ệ
php
Lĩnh vực
api, security

Hướng nghiên cứu

Start by locating the agents/ability-call and agents/ability-search implementations and the agents_ability_call_permission filter. Trace how registered ability metadata is read and how dispatchability is decided, then check the related tests. Done means calls and search results follow the external-surface rule by default, hosts can override it with a filter, and the permission callback receives the target name and metadata.

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

Mô tả

Summary

agents/ability-call executes any registered ability by name and checks only the target ability's permission_callback. It ignores the target's exposure metadata (show_in_rest, mcp.public).

Many plugins register in-process primitives with show_in_rest: false and a permissive permission callback. They expect only trusted server-side PHP to call them, and in the ecosystem "not REST-exposed" is commonly treated as "internal". When a host widens agents_ability_call_permission for non-administrators, which is the documented extension point, every such primitive becomes callable by those users. agents/ability-call is itself show_in_rest: true, so that includes calls through core /wp-abilities/v1.

Proposal

  • By default, agents/ability-call (and agents/ability-search results) only dispatch abilities that opt into an external surface: meta.show_in_rest === true or meta.mcp.public === true. This matches the WordPress MCP adapter convention.
  • Add a filter, e.g. agents_ability_call_dispatchable, for hosts that need a different rule.
  • Pass the target ability name and meta into agents_ability_call_permission, so hosts can make per-target decisions without re-reading the registry.

Context

The Extra Chill MCP worked around this at the host layer (Extra-Chill/extrachill-mcp#24). The fix belongs in the substrate so every host gets a safe default.

🤖 AI-generated (Extra Chill Bot / Pi).

Ngôn ngữ chính
PHP
Star
33
Fork
9
Merge trung bình
36 phút
Pull request đã merge (30 ngày)
13

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 Automattic/agents-api

Tất cả issue của Automattic/agents-api

Issue tương tự

Thêm issue về PHP

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.