Repository navigation
Answer checkout forms with typed fields and protected inputs - #2
Merged
Merged
Conversation
Agent Checkouts replaced JSON Schema forms and the separate password
request with typed fields. Each field is standard or protected, and a form
is answered once, with every field. A protected field takes only the
{ protectedInputId } that Crossmint's protected field returns.
- core: typed fields on PendingUserAction, submitResponse with answers,
and a flat RenderedField with select, multiselect and protected kinds.
protectedResponse and the protected interaction are gone.
- server: protectedRequest replaces passwordRequest. A protected field
answered with a plain value, or a required one left out, is refused
with 409 protected_input_required.
- ui: PendingActionForm renders every field kind and collects each
protected field with CrossmintProtectedInput (client SDK 4.9.0) on
submit. AnswerProtectedRequest replaces AnswerPasswordRequest. It reads
the form from the checkout, and a resend with the same answers keeps
the same message id.
- web chat: awaiting_protected_input replaces awaiting_password. The
model answers standard fields by key and never a protected one.
- mcp and cli: a protected form is never shown to the agent as a form;
the agent gets the link to the checkout's page.
- docs, the skill and the build prompt follow.
The payment step's merchant is read as name and url, as the API sends it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ed ids - A checkout stretch that stops for secure input no longer shows its last step as failed. - A disabled option the store preselected is locked in, not unavailable: a choice of one can pick it, and a choice of many keeps it checked. - A protected input id on a standard field is refused with 409 not_a_protected_field. The stale not_a_protected_request code is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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
Agent Checkouts replaced JSON Schema forms and the separate password request with typed fields (UC #1156, Crossmint #31268). This PR moves the sample app to the new contract.
standardorprotected. A form is answered once, with every field keyed by itskey. A protected field takes only the{ protectedInputId }that Crossmint's protected field returns.protectedRequestreplacespasswordRequestinCheckoutView. It lists the protected fields and gives the link to the checkout's page. A protected field answered with a plain value, or a required one left out, is refused with409 protected_input_required. Thepassword_in_formguard stays for a standard field that looks like a password.PendingActionFormrenders text, number, whole number, boolean, choice of one and choice of many. Each protected field isCrossmintProtectedInput(@crossmint/client-sdk-react-ui4.9.0), collected on submit. An optional protected field is left out until the user adds it.AnswerProtectedRequestreplacesAnswerPasswordRequest: it reads the form from the checkout, and a resend with the same answers keeps the same message id.awaiting_protected_inputreplacesawaiting_password. The model answers standard fields by key and can never send a protected answer. The card and dialog wording fit any secret, not only a password.protected_input_needed.docs/API.md, the skill (synced copies), the tool docs and the build prompt follow.nameandurl, as the API sends it. It was read asdomain, which never came. The approval text now reads "Purchase at ".Rollout
Deploy after UC #1156 is deployed. The old and new form formats do not mix.
Chats saved before this change that hold an
awaiting_passwordorresponseSchemaresult fail history validation when continued (400). A new chat works. No compatibility code was added.Test plan
pnpm turbo run build --filter='./packages/*',typecheck,test,lintand the web build, as in CI: 158 tests pass (core 35, server 67, ui 6, mcp 15, cli 32, auth 3).In
--jsonmode the CLI still prints the server's full view, which for a protected form includes the field descriptors (labels and types, never values).🤖 Generated with Claude Code