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

dryRun in the CLI (`agent-pay check <url>`) and as a free MCP tool

Đang mở
#41 1 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
50/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ệ
typescript
Lĩnh vực
cli, payments

Hướng nghiên cứu

Start with the existing dryRun function in the agent-pay SDK and its live fixtures in sdk/test/dry-run.test.ts, then find where agent-pay-mcp registers its tools. Add a CLI check command that wraps dryRun, prints the verdict and chosen option, and exits non-zero on deny, plus a free check_price MCP tool that never sends a payment header. Done when both pass against those fixtures and one real seller, and the docs show them.

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

Mô tả

dryRun (agent-pay 0.10.0) answers "what would the policy do with this seller's answer?" with no key and nothing signed. It returns allow, deny with a code, no_challenge or invalid_402. Today you only get it from code.

Proposal:

  • CLI: npx @deepfirstsearch/agent-pay check <url> [--method POST --body …] --registry registry.json. It prints the verdict, the option it would pay, and why. It exits non-zero on deny, so it can gate CI or a cron.
  • MCP: a free check_price tool in agent-pay-mcp, so an agent can see the verdict (and the price) before it calls paid_fetch. It's useful for "is this worth paying for?" decisions and for showing the owner what a call would cost.

Notes:

  • no_challenge means "no terms shown to this caller now": a free route, a free trial or a 404. The tool should say that, not "free".
  • Never send a payment header from check.

Done when: both work against the live fixtures in sdk/test/dry-run.test.ts plus one real seller, and the docs show them.

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
3 giờ 51 phút
Pull request đã merge (30 ngày)
3

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

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 DeepFirstHQ/deepfirstsearch

Tất cả issue của DeepFirstHQ/deepfirstsearch

Issue tương tự

Thêm issue về TypeScript

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.