Repository navigation
Conversation
Contributor
Author
|
Added: |
…empt (consent_step) ChargeInstrument gains an optional consent_step, "enroll" or "sign", for a rail whose attempt has two pages to open: Iniciador JSR registers a passkey at the bank, then each payment is approved with it. markShown keys the step apart from the attempt, so the second page is shown after the first; with no step the key is the attempt's alone, so a sweeping pull and the markers already in a state.db read as before. The WhatsApp presenter picks the words and the button by step; every new button fits WhatsApp's 20 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s query A consent link's query is its credential: the sweeping PAR request_uri, and for the JSR signing page a JWT. The person still receives the whole link; the channel log records origin and path with "?<redacted>". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rapguit
force-pushed
the
feat/runtime-consent-step
branch
from
November 3, 2026 21:33
e854e77 to
8f42309
Compare
…sent_step) recordInstrument deduplicated on attempt, status and payable, so a JSR pull's sign page, which can share both with the enroll page, never reached the event log or the bundle: only the shown: cursor in state.db knew it came. The step is now part of the event id and of the payload; without a step the id is the one it always was. markShown takes ChargeInstrument["consent_step"] instead of a string. New test on the real engine (scripted looks: enroll, enroll, sign, sign): two instrument events with their steps, each page shown once. It fails with the engine change reverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hannel The step-to-words choice lived in the WhatsApp presenter, so the terminal copy in the topup-agent kept the bank's "about 1 minute" line for any consent link, its comment still calling itself the WhatsApp copy. consentWords(step, locale) is in agent-core next to the strings; consentCta is the channel's shape of it, and the terminal prints the step's lead line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…not only its query The redaction kept origin + path and replaced only the query, so a page that carries its key in the path (a JWT or a one-shot id) went into channel.jsonl whole; a link with only a fragment was logged as "?<redacted>"; and an unparseable link logged as "<link>" was drawn on the console as a code to copy. Now a path segment of 24 characters or more, or one that opens like a JWT, is "<redacted>"; the query and the fragment have their own markers; anything not http(s) is "<consent link, unreadable>", still drawn as a link. textOf runs once per line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… per instalment With consent_step a pull's two pages each reach onInstrument. The amount line before the sign page repeats the one before the enroll page by design: the sign page is the one that moves the money, and the person reads the amount right before signing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rapguit
added a commit
that referenced
this pull request
Nov 9, 2026
… two pages point to #110's consent_step Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rapguit
added a commit
that referenced
this pull request
Nov 11, 2026
…t links kept off the log and off disk (#109, #110, #130) (#134) One squash of the release branch. - #109: the WhatsApp emulator script takes --host. - #110: a pull may hand the payer two consent pages in one attempt (consent_step); consent links are redacted in channel.jsonl. - #130: a hosted consent link is not kept in stub_rail_attempts or the sweeping record. - Comment cleanup in the topup-agent's sweeping client and rail. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
Author
|
Landed on main via #134. |
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.
What
ChargeInstrument.consent_step?: "enroll" | "sign"(agent-coretypes.ts).ExecutionEngine.markShown(executionId, attemptId, consentStep?): the cursor isshown:<exe>:<attempt>:<step>when a step is given, andshown:<exe>:<attempt>(unchanged) when it is not.pollUntilClosedpasses the instrument's step tomarkShown.instrumentBodiespicks the CTA by step throughconsentCta: the bank's words with no step (as today), "Cadastre sua biometria no banco..." / "Cadastrar biometria" forenroll, "Confirme com a biometria do seu celular..." / "Confirmar biometria" forsign. The en copies too.Why
The topup-agent's next rail (Iniciador JSR, Pix with a passkey) hands the person two pages in one attempt: register the passkey, then sign the payment. Without this,
markShownpresents one instrument per attempt and the second link never reaches the conversation. The bank's copy ("Autorize no seu banco... cerca de 1 minuto") is also wrong for the signing page, which lasts about 10 minutes.Not changed
state.dbare unchanged.Note
The sign button is "Confirmar biometria" (19) rather than "Confirmar com biometria" (23): WhatsApp caps a
cta_urlbutton at 20 characters, and a test pins that for the new labels. The existing enconsentButton"Authorise at the bank" is 21 characters; left alone here (the adapter already falls back to a text link on a refused button).Checked
packages/agent-core/test/consent-step.test.ts(no step, enroll + sign, no cross-reading) andpackages/agent-runtime/test/consent-step.test.ts(the three CTAs, the 20-character cap, two pages in one attempt presented in order once each; that last one fails with thepoll.tschange reverted).npm run check,npm run eval --workspace=agents/topup-agent,npm run typecheck,npm test(99 files passed, 3 skipped): green.🤖 Generated with Claude Code