Repository navigation
Verdict tools for AI SDK and LangChain, current signing key, 0.2.0 - #1
Merged
Merged
Conversation
…rent signing key, 0.2.0 - predge_request_verdict: POST /v1/verdicts (or /v1/verdicts/large at $1+), x-predge-key from apiKey or PREDGE_KEY, x402 fallback from the account, capped by maxPaymentUsd - predge_get_verdict: free re-read by id, signature checked - pin kid 3b6551a6439b9bda; kid 13fa3d18a369e6c7 (revoked 2026-10-21) never verifies - fetchWithX402 accepts method/body for POST routes - package descriptions: dispute and refund verdicts for AI-agent payments; READMEs with verdict examples - @predge/ai-sdk and @predge/langchain 0.2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes distribution gap D: the framework packages could not ask for a verdict.
New tools (both packages)
predge_request_verdict(AI SDK keypredgeRequestVerdict):POST /v1/verdicts, or/v1/verdicts/largewhenpayment.amount_usd >= 1. Sendsx-predge-keyfromapiKeyorPREDGE_KEY(free pilot key at predge.io/start). Without a key, or when the key answers 402, pays over x402 from the configured account, never abovemaxPaymentUsd(the $0.50 large tier needsmaxPaymentUsd: 0.5). Request schema mirrorsparseVerdictRequestin predge-x402-api (job / delivery / payment, optional buyer_id, merchant_id, agent, provider_agent).predge_get_verdict(predgeGetVerdict): freeGET /v1/verdicts/:id, signature checked.predge_get_verdictis always returned.Signing key fix
0.1.0 pins kid
13fa3d18a369e6c7, which/.well-known/predge-keys.jsonlists as revoked (21 Oct). Live records are signed with3b6551a6439b9bda, so every signature check in 0.1.0 reportsvalid: false. Now pinned to3b6551a6439b9bda; a record or body signature under the revoked key never verifies, even if passed intrustedKeys.Other
fetchWithX402takes an optional{ method, body, headers }for paid POST routes.Checks:
npm run typecheck,npm test(27 tests, 12 new),npm run buildpass locally.Not published. After merge, from a clean main:
npm publish --workspace packages/ai-sdk --access public && npm publish --workspace packages/langchain --access public.