feat(schema): register AGENT_SUSPENDED / AGENT_BLOCKED error codes#3881
Closed
bokelley wants to merge 1 commit into
Closed
feat(schema): register AGENT_SUSPENDED / AGENT_BLOCKED error codes#3881bokelley wants to merge 1 commit into
bokelley wants to merge 1 commit into
Conversation
…buyer-agent status docs Closes #3871 - Add AGENT_SUSPENDED (terminal) and AGENT_BLOCKED (terminal) to error-code.json enum with full enumDescriptions + enumMetadata entries and oracle-clamp normative language - New error-details/agent-suspended.json and error-details/agent-blocked.json (additionalProperties: false, intentionally empty — no commercial-state oracle leakage) - New "Buyer-agent status" subsection in error-handling.mdx with normative requirements, clamped-details rule, and dispatch example distinguishing from BILLING_NOT_PERMITTED_FOR_AGENT - Add third on-wire consequence bullet to accounts-and-agents.mdx Buyer-agent identity section https://claude.ai/code/session_01PSMBCdaXGreRTfZ7AXbKgT
Closed
3 tasks
Contributor
Author
|
Closing — superseded. |
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 #3871
Summary
Extends the error-code vocabulary with two new codes for the buyer-agent commercial-relationship rejection surface introduced by
BuyerAgentRegistry(adcp-client#1269). Without standard codes, every SDK and seller invents its own discriminator for "this buyer agent is not in good standing." The JS SDK is currently usingPERMISSION_DENIED + scope:'agent'as a non-standard placeholder.Non-breaking justification: Adds two new string enum values appended at the end of
error-code.json(no reordering or removal) and two newerror-details/schemas (new files). Existing consumers that handle unknown codes via therecoveryfallback (spec-required behavior) are unaffected.Changes
static/schemas/source/enums/error-code.json—AGENT_SUSPENDED(recovery: terminal) andAGENT_BLOCKED(recovery: terminal) appended to enum, with fullenumDescriptionsandenumMetadataentries including oracle-clamp normative language.static/schemas/source/error-details/agent-suspended.json— new. Intentionally empty (properties: {},additionalProperties: false). Sellers MUST NOT include suspension reason, contract dates, or any per-agent commercial state.static/schemas/source/error-details/agent-blocked.json— new. Same clamp; no per-agent commercial state.docs/building/implementation/error-handling.mdx— new "Buyer-agent status" subsection with normative oracle-clamp rule, clamped-details requirement, and dispatch example distinguishing the two new codes fromBILLING_NOT_PERMITTED_FOR_AGENT.docs/building/integration/accounts-and-agents.mdx— added third on-wire consequence bullet in the "Buyer-agent identity" section (billing gate + agent-status gate + per-agent defaults).Design choices vs. issue proposal
The issue proposed standardizing
error.details.scopeas a shared vocabulary (extendingbilling-not-supported.json's["capability", "account"]to include"agent"). Expert consultation ruled this out: neither new code has a gate-split to dispatch on (scopedisambiguates two gates onBILLING_NOT_SUPPORTED;AGENT_SUSPENDEDandAGENT_BLOCKEDare already distinct codes). Standalone per-code schemas matching thebilling-not-permitted-for-agent.jsonpattern are the correct shape. The issue'sscopeframing is noted in the changeset for the follow-up author.Pre-PR review
minorcorrect. Fixed header casing (sentence case), addeddefault:arm to dispatch example, added cross-reference bullet toaccounts-and-agents.mdx.BILLING_NOT_PERMITTED_FOR_AGENT; scope omission is correct (no gate-split exists); both codes terminal is correct (re-onboarding is human-driven, not auto-retry); changeset level sound.Build note
node_modulesare not installed in the triage execution environment sonpm run buildcould not run. JSON syntax verified programmatically (all three files parse cleanly). The schema additions are JSON-only (no TypeScript) — thetscfailures in build output are pre-existing missing-dependency errors unrelated to this diff.Follow-up
Conformance fixtures for the oracle clamp are a follow-up (same pattern as
billing-gate-conformance-and-resolver-naming.mdfollowing #3831).Session: https://claude.ai/code/session_01PSMBCdaXGreRTfZ7AXbKgT
Generated by Claude Code