Skip to content

signer field + signer_sanctions verdict + 2.2.0 - #24

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

signer field + signer_sanctions verdict + 2.2.0#24
vvillait88 merged 6 commits into
mainfrom
tec-295-signer-sanctions

Conversation

@vvillait88

Copy link
Copy Markdown
Contributor

Summary

Python-side mirror of agentscore/node-sdk#30. Same breaking rename + new types.

  • assess(resolve_signer=...)assess(signer=...) on both sync + async
  • request body resolve_signersigner
  • ResolveSigner TypedDict → Signer
  • New SignerSanctions discriminated union: SignerSanctionsClear | SignerSanctionsHit | SignerSanctionsUnavailable
  • AssessResponse.signer_sanctions optional field
  • __init__.py exports ResolveSigner removed; Signer + SignerSanctions added

Version 2.1.2 → 2.2.0 minor bump.

Test plan

  • uv run pytest tests/ — 152/152 pass
  • uv run ruff check . clean
  • uv run ty check agentscore/ clean
  • CI green
  • Publish 2.2.0 via tag once merged (unblocks python-commerce + store downstream)

🤖 Generated with Claude Code

vvillait88 and others added 6 commits May 11, 2026 08:21
Python-side mirror of agentscore/node-sdk#TBD and the api change in
agentscore/core#TBD. Breaking field rename plus a new response type:

* assess(resolve_signer=...) -> assess(signer=...) on both sync + async
* request body field resolve_signer -> signer (snake_case wire)
* ResolveSigner type -> Signer
* New SignerSanctions discriminated union: SignerSanctionsClear |
  SignerSanctionsHit | SignerSanctionsUnavailable
* New AssessResponse.signer_sanctions optional field
* __init__.py exports updated; ResolveSigner removed from public API

No back-compat alias. Callers passing `resolve_signer=...` get a
TypeError at call time. The api silently ignores `resolve_signer`
request fields if any straggler send them; this SDK won't.

Version 2.1.2 -> 2.2.0. Minor bump rather than major because internal
consumers (agentscore-commerce + pay) are the primary users and the
TypedDict surface catches the rename at type-check time.

CLAUDE.md + README + tests updated. 152/152 tests pass; ruff +
ty + uv.lock clean. uv.lock refreshed via uv sync --upgrade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds 6 pytest tests covering the new signer surface end-to-end:
- assess(signer=...) forwards the signer in request body
- assess() without signer omits it
- response carries signer_match + signer_sanctions blocks together
- signer_sanctions clear variant
- signer_sanctions unavailable variant
- aassess(signer=...) async mirror

README + CLAUDE.md document the new signer request param and the
signer_sanctions discriminated-union response shape, including the
fail-closed policy.require_sanctions_clear semantics. SignerSanctionsHit
docstring now mentions both sanctions_flagged AND sanctions_check_unavailable
for parity with the node-sdk docstring.
… Literal[True]

Brings SignerMatch in line with node-sdk: `kind` is always emitted (it's the
discriminator) so it should be required; the other fields stay NotRequired
since they depend on which kind was emitted. Tightens AssociateWalletResponse
to match wire reality (API only emits true on 2xx; failures raise instead).

Adds 3 new tests:
- assess(signer={address: solana_base58}) preserves base58 case (no lowercasing)
- assess(signer={address: None}) for rails with no wallet signer
- TokenExpiredError raised on 401 even when signer was sent (signer still wired)
agentscore-py 2.2.1 was published in error and yanked on PyPI ("Incorrectly
Published"). 2.2.0 < 2.2.1 means downstream pip resolution would still see
the yank gap; jump straight to 2.3.0 to leapfrog the yanked number AND match
@agent-score/sdk's 2.3.0 cadence (same TEC-295 surface lands on both).
@vvillait88
vvillait88 merged commit 4646f87 into main May 11, 2026
7 checks passed
@vvillait88
vvillait88 deleted the tec-295-signer-sanctions branch May 11, 2026 18:45
@vvillait88 vvillait88 changed the title signer field + signer_sanctions verdict + 2.2.0 (TEC-295 Phase 2b) signer field + signer_sanctions verdict + 2.2.0 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