chore: v2.0.1 — invalid_credential DenialCode + test fixture cleanups#19
Merged
vvillait88 merged 5 commits intomainfrom Apr 30, 2026
Merged
chore: v2.0.1 — invalid_credential DenialCode + test fixture cleanups#19vvillait88 merged 5 commits intomainfrom
vvillait88 merged 5 commits intomainfrom
Conversation
\`sanctions_check_pending\` isn't a real API code. The real codes are kyc_required, kyc_pending, kyc_failed, sanctions_flagged, age_insufficient, jurisdiction_restricted. Test passes either way (the SDK passes reasons through verbatim), but the fake string propagates misinformation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The commerce gate emits `invalid_credential` on 401 (separate from token_expired — permanent state, no auto-session). Tests already exercise this code path but the DenialCode literal was missing it; type checkers would flag any branch on this value as unreachable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Patch release for additive DenialCode union member (\`invalid_credential\`) and the \`opc_test_*\` test fixture cleanup. No breaking changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The SDK now wraps multiple AgentScore APIs (assess + sessions + credentials + captureWallet, etc.), not just the legacy trust+reputation endpoint. Update the package description, README tagline, CLAUDE.md, and class docstring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… node-sdk) Python's assess() / aassess() previously dropped \`refresh: False\` entirely (only sent when truthy). Node SDK includes whatever the consumer explicitly passed. This is a wire-format divergence: agents passing \`refresh=False\` expecting the field to be present (e.g., to signal "no refresh needed") got different payloads from the two SDKs. Change the signature to \`refresh: bool | None = None\` and include in body when not-None. Default (no kwarg) omits the field as before; explicit \`refresh=False\` now sends false. Matches node-sdk semantics exactly. Tests: - old: refresh=False expected to omit field - new: refresh=False sends false; default omits field Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
`sanctions_check_pending` isn't a real API code. The real codes the API emits are `kyc_required`, `kyc_pending`, `kyc_failed`, `sanctions_flagged`, `age_insufficient`, `jurisdiction_restricted` (see `core/api/src/routes/v1/assess.ts`). Test passes either way since the SDK passes reasons through verbatim, but the fake string propagates misinformation about API surface.
Test plan
🤖 Generated with Claude Code