Cloudflare Agents: Agent Safe policy for `withX402Client`
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- blockchain, typescript
- 领域
- blockchain, payments
调研方向
Start by reading the Cloudflare x402 docs to see what the withX402Client confirmation callback receives, then check whether it exposes the origin. The work goes in examples/cloudflare-agents/, with a test against the SDK's mock merchant. Done means one allowed payment passes, and a swapped payee is refused with nothing signed. Comment on the issue before starting, since the maintainers ask for discussion first.
由索引模型根据 Issue 内容生成。
描述
Cloudflare's Agents SDK pays x402 through withX402Client (see the docs). It takes a confirmation callback that decides whether a payment goes ahead. A budget or payee check could live there.
What: investigate what that callback receives. Does it get the payment requirements, and the URL or tool that triggered the payment? Then build the smallest adapter that runs Agent Safe's policy in it: payee pinned per origin, price pin, sealed plan and budget. If the callback can't see the origin, document that limit and use the guard's fixed origin option where one URL is known.
Acceptance:
- An example in
examples/cloudflare-agents/plus a test against the SDK's mock merchant: one allowed payment, and one swapped payee refused with nothing signed. - No new runtime dependency in the SDK.
New to the repo? Start with CONTRIBUTING.md. Every outside PR goes through the review gates in docs/REVIEWING.md. Please discuss any new dependency in this issue first. Comment here before starting, so two people don't build the same thing.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 3 小时 51 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DeepFirstHQ/deepfirstsearch 的其他 Issue
-
enhancement
难度 1/5 1 小时以内 新手友好度 35/100
-
help wanted integration
难度 3/5 3-5 天 新手友好度 45/100
-
help wanted integration
难度 3/5 1-2 天 新手友好度 45/100
-
enhancement good first issue
难度 3/5 1-2 天 新手友好度 48/100
-
documentation good first issue
难度 3/5 1-2 天 新手友好度 55/100
查看 DeepFirstHQ/deepfirstsearch 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
juice-shop/juice-shop#3686 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
dsh-market/dsh-market#877 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
ScottKirvan/GOMAC#61 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
stellar/stellar-dev-skill#151 ·
维护者通常 1 天内回复