Skip to content

@agent-score/commerce 1.8.0 — signer field + signer_sanctions surface - #18

Merged
vvillait88 merged 6 commits into
mainfrom
tec-295-signer-sanctions
May 11, 2026
Merged

@agent-score/commerce 1.8.0 — signer field + signer_sanctions surface#18
vvillait88 merged 6 commits into
mainfrom
tec-295-signer-sanctions

Conversation

@vvillait88

@vvillait88 vvillait88 commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Mirrors the api change in the API repo and the SDK update in agentscore/node-sdk#30. Switches the SDK call inside verifyWalletSignerMatch to use the renamed signer field and widens the response type to include signer_sanctions.

  • core.ts: sdk.assess({..., resolveSigner})sdk.assess({..., signer})
  • Response type widened to include signer_sanctions — comes through the same single round trip; zero new API calls
  • @agent-score/sdk peer-dep ^2.2.1^2.3.0
  • Version 1.7.01.8.0

CI install will fail until node-sdk 2.3.0 publishes. Local tests pass via bun link.

Out of scope

Renaming verifyWalletSignerMatchgetSignerVerdict(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 lint clean
  • bun run typecheck clean
  • CI green (after node-sdk 2.3.0 publishes)
  • Publish 1.8.0 once node-sdk 2.3.0 is live (unblocks downstream consumers)

🤖 Generated with Claude Code

vvillait88 and others added 2 commits May 11, 2026 08:25
…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>
vvillait88 and others added 2 commits May 11, 2026 09:23
…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.
@vvillait88
vvillait88 merged commit 90cad09 into main May 11, 2026
6 checks passed
@vvillait88
vvillait88 deleted the tec-295-signer-sanctions branch May 11, 2026 19:45
@vvillait88 vvillait88 changed the title @agent-score/commerce 1.8.0 — signer field + signer_sanctions surface (TEC-295 Phase 2c) @agent-score/commerce 1.8.0 — signer field + signer_sanctions surface May 12, 2026
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