@agent-score/commerce 1.8.0 — signer field + signer_sanctions surface - #18
Merged
Conversation
…e 2c)
Phase 2c of TEC-295. The minimum-viable wire change: switch the SDK
call inside verifyWalletSignerMatch to use the renamed `signer` field
that the api change in agentscore/core#TBD requires. Also pulls
`signer_sanctions` through the assess call type signature so the
verdict surfaces from the same single round trip.
* core.ts: sdk.assess({..., resolveSigner}) -> sdk.assess({..., signer})
to match @agent-score/sdk 2.3.0's renamed option
* core.ts: response type widened to include signer_sanctions; reads
through the same primary assess call (zero new round trips)
* @agent-score/sdk peer-dep bumped ^2.2.1 -> ^2.3.0 (blocked on
agentscore/node-sdk#TBD publishing)
Version 1.7.0 -> 1.8.0 (minor). 834/834 tests pass with the linked
local sdk (the breaking field rename catches at the type layer; the
rename + new optional response field are otherwise backward-compatible
in shape for SDK consumers).
Out of scope for this PR (separate follow-up):
* Rename verifyWalletSignerMatch -> getSignerVerdict synchronous getter
reading off cached assess response. The architectural refactor needs
per-adapter changes across 10 files + cache-shape evolution; ships
as its own minor bump once the wire contract is settled.
Deps: vitest + @vitest/coverage-v8 ^4.1.6, mppx ^0.6.19 (patch refresh).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
5 tasks
…r pre-assess (TEC-295 Phase 2c)
Architectural completion: gate middleware extracts signer pre-evaluate;
API composes signer_match + signer_sanctions in one round trip. Drops
verifyWalletSignerMatch / VerifyWalletSignerMatchOptions / extractPaymentSignerAddress
/ signerMatchBySigner cache / resolveWalletToOperator (all dead code now).
Adds extractPaymentSignerFromAuth (synthetic-Request helper for adapters
without Web Fetch Request). Adds getSignerVerdict(c) synchronous getter
across all 5 adapters returning { signer_match, signer_sanctions }.
Under policy.require_sanctions_clear, OFAC SDN hits + unavailable lookups
flip gate decision to deny inline; merchant code never sees those.
Tests: signer-match.test.ts deleted (tested deleted helpers); signer.test.ts
updated for {address, network} return shape. 806/806 pass. Lint + typecheck
clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops the api_error variant from VerifyWalletSignerResult (cache-read verdict has no fresh-call failure surface) and rewords doc-comments that still referenced the retired verifyWalletSignerMatch 2-call pattern. Adds per-adapter coverage for getSignerVerdict (hono, express, fastify). Examples/README/CLAUDE.md migrated to the get-signer-verdict flow.
vvillait88
added a commit
to agentscore/python-commerce
that referenced
this pull request
May 11, 2026
…TEC-295 Phase 2c) (#19) ## Summary Python-side mirror of agentscore/node-commerce#18. Switches the assess call inside `verify_wallet_signer_match` (sync + async) to use the renamed `signer` field. * `identity/client.py`: `assess(..., resolve_signer=...)` → `assess(..., signer=...)` * `agentscore-py` peer-dep `>=2.1.0` → `>=2.2.0` * Version `1.7.0` → `1.8.0` * `[tool.uv.sources]` block routes uv to editable `../python-sdk` for stacked-dev resolution (drops in a follow-up once python-sdk 2.2.0 publishes) CI install will fail until python-sdk 2.2.0 publishes. Local tests pass via the editable source. ## Out of scope Renaming `verify_wallet_signer_match` → `get_signer_verdict()` synchronous getter is a deeper architectural refactor (6 framework adapters × cache evolution) and ships as its own minor bump once this wire contract settles. ## Test plan - [x] `uv run pytest tests/` — 902/902 pass (with `--all-extras`) - [x] `uv run ruff check .` clean - [x] `uv run ty check agentscore_commerce/` clean - [ ] CI green (after python-sdk 2.2.0 publishes) - [ ] Publish 1.8.0 once python-sdk 2.2.0 is live (unblocks store dep bump) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bumps @agent-score/sdk to 2.3.0 (just published with the signer surface), plus within-range bumps: typescript-eslint 8.59.3, vitest + coverage-v8 4.1.6, mppx 0.6.19. Lockfile now points at the published 2.3.0 instead of 2.2.1.
Adds 6 test cases that exercise core's projectSignerMatch (the camelCase projection function) + getSignerVerdict cache-read for all 3 signer_match kinds, the no-verdict/no-signer-match paths, and the linked_wallets array filtering. Brings function coverage 94.6% -> 96.07% and branch coverage 89.78% -> 91.89%, both back above CI thresholds.
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.
Summary
Mirrors the api change in the API repo and the SDK update in agentscore/node-sdk#30. Switches the SDK call inside
verifyWalletSignerMatchto use the renamedsignerfield and widens the response type to includesigner_sanctions.core.ts:sdk.assess({..., resolveSigner})→sdk.assess({..., signer})signer_sanctions— comes through the same single round trip; zero new API calls@agent-score/sdkpeer-dep^2.2.1→^2.3.01.7.0→1.8.0CI install will fail until node-sdk 2.3.0 publishes. Local tests pass via
bun link.Out of scope
Renaming
verifyWalletSignerMatch→getSignerVerdict(c)synchronous getter is a deeper architectural refactor (5 adapters × cache evolution) and ships as its own minor bump once this wire contract settles.Test plan
bun run test— 834/834 pass (linked local sdk)bun run lintcleanbun run typecheckclean🤖 Generated with Claude Code