Skip to content

Add a zkfetch guide, quota billing links, and default attestor trust (0.1.47) - #24

Merged
predatorx7 merged 6 commits into
mainfrom
feat/zkfetch-tee-billing-link
Nov 11, 2026
Merged

predatorx7 merged 6 commits into
mainfrom
feat/zkfetch-tee-billing-link

Conversation

@predatorx7

Copy link
Copy Markdown
Collaborator

Problem

  • Agents had no guidance for zkFetch in Builder mode.
  • Quota refusals from Builder carried no link to the org's billing page, the client's error message was just "Too Many Requests", and a quota 429 was treated as retryable.
  • verifyRequestProof failed with attestor-trust-required unless the caller passed attestorJwksUrl or attestorAddresses, unlike the rest of the client, which trusts Builder by default.

Changes

  • Client: problem errors carry billingUrl, use the problem detail as the message, and a 429 with billingUrl isn't transient. Regenerated API types for the new Problem.billingUrl field (Builder PR below).
  • Client: verifyRequestProof defaults to Builder's JWKS. Only attestorAddresses → exactly those, no fetch. attestorJwksUrl still overrides.
  • Agent: new zkfetch topic in how_it_works, plus routing in builder-mode.md.
  • Release: 0.1.47 via npm run version:bump.

Testing

  • npm test --workspace=packages/client (134 pass), node --test packages/agent/tests/how-it-works.test.ts, npm run lint, npm run check.
  • Verified a live Builder-mode zkFetch proof (standard and TEE) with verifyRequestProof and Builder's JWKS.

Merge order

Merge this first. The Builder PR (quota billing links) points its submodule here and moves to the merge commit before it merges.

🤖 Generated with Claude Code

predatorx7 and others added 4 commits November 11, 2026 15:15
Builder now adds billingUrl to its 402 and 429 quota problems.

- Accept billingUrl in problem details and regenerate the API types.
- Use the problem detail as the error message, like Boom, so logging
  the error shows what happened and where to fix it.
- Stop treating a quota 429 as transient: retrying can't succeed until
  the period resets or the plan changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without attestorAddresses or attestorJwksUrl, verifyRequestProof failed
with attestor-trust-required, although the rest of the client already
trusts Builder by default. Now it reads Builder's JWKS. Passing only
attestorAddresses still pins exactly those attestors and fetches
nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
how_it_works({ topic: "zkfetch" }) covers proving a response the
developer's own server fetches: the org key, zkFetch in Builder mode,
verification with verifyRequestProof, quota and billing errors, and
performance. Builder-mode routing points server-side fetches to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@reclaim-pr-agent reclaim-pr-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Reclaim PR Agent after an automated GPT-5.6 Terra review.

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130446256882

Result Head Blocking findings Ponytail suggestions Check
Approved 1c33a284060e 0 0 View run

Reviewed all 1 diff chunks. No blocking defects found.

Ponytail: Lean already. Ship.

A Builder API error's message is now its detail, so errorAsToolText
repeated it ("detail: detail"). Lead with the problem title when the
message is the detail; a hand-thrown Boom keeps its own message. Update
the refresh test to the more specific expired-sign-in message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@reclaim-pr-agent reclaim-pr-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Reclaim PR Agent after an automated GPT-5.6 Terra review.

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130451109126

Result Head Blocking findings Ponytail suggestions Check
Approved 8b927a10d304 0 0 View run

Reviewed all 1 diff chunks. No blocking defects found.

Ponytail: Lean already. Ship.

zk-fetch now runs in a TEE by default (reclaimprotocol/zk-fetch#41).
Say when a request stays on the ZK path instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@reclaim-pr-agent reclaim-pr-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Reclaim PR Agent after an automated GPT-5.6 Terra review.

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130454677375

Result Head Blocking findings Ponytail suggestions Check
Approved 0cf820254ad7 0 1 View run

Reviewed all 1 diff chunks. No blocking defects found.

# Ponytail suggestion
1 packages/agent/src/tools/registry.ts:L79: shrink: temporary lead variable used once. Inline err.message === detail ? err.data.title : err.message in the return, 1 line.
Full findings and Ponytail review

Ponytail suggestions:

  • packages/agent/src/tools/registry.ts:L79: shrink: temporary lead variable used once. Inline err.message === detail ? err.data.title : err.message in the return, 1 line.

net: -1 lines possible.

@predatorx7
predatorx7 merged commit 5d0fc71 into main Nov 11, 2026
6 checks passed
@predatorx7
predatorx7 deleted the feat/zkfetch-tee-billing-link branch November 11, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant