Repository navigation
[RELEASE 11-11] DO NOT MERGE without maintainer go - #134
Merged
Merged
Conversation
…e over the local network scripts/whatsapp-emulator.mjs passes --host to `dyvit-wa-sim serve` (the published 0.3.0 already accepts it). The default stays 127.0.0.1: the emulator answers every origin with a development app secret, so binding every interface is a choice made for a demo on a trusted network. The webhook stays on 127.0.0.1. The topup-agent runbook gains "On a phone": the simulator page and the emulator on the PC's address, the URL to type in the simulator's live mode, and a CORS check. EMULATOR_VERSION is not bumped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
…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>
…attempts; the row keeps has_consent_url The link carries its credential (a PAR request_uri, a JWT). stubRailPut and stubRailReplace write consent_url null and has_consent_url true, as the events already do. The executions row is unchanged here: the first presentation and the hosted runtime read the link from it (README, Stubs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; it reads it again from the bank while it waits
auth_url leaves the PullRecord (a legacy one is dropped at its next write).
The link lives in memory for the process, and GET /sweeping/authorizations/{id}
answers it again while AWAITING_AUTHORISATION (sandbox, 2026-10-29), so a
restart or npm run poll still has it. The fixture answers it the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s in one attempt (consent_step)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sandbox, with no local path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 9, 2026
Closed
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.
Release branch for review. Do not merge without the maintainer's go. It merges three PRs, one
--no-ffmerge commit each, plus three small cleanup commits.What changes for someone using the kit
npm run whatsapp:emulator -- --host 0.0.0.0listens on every interface, so the simulator's page on a phone on the same network can reach it. The default stays127.0.0.1, and--hostwith no value exits 2. Because of CORS*and the development app secret, use it only on a trusted network.agents/topup-agent/runbook.mdgains an "On a phone" section.ChargeInstrument.consent_step?: "enroll" | "sign"lets a rail hand the payer two pages in one attempt, such as registering a passkey and then signing the payment. Each page is shown once, in order, with its own words and button (consentWordsin agent-core,consentCtafor WhatsApp), and each is logged as its owncharge.instrumentevent. A rail with a single consent page sets no step, so its keys, its words and the markers already in astate.dbstay the same.channel.jsonl(feat(runtime): a pull may hand the payer two consent pages in one attempt (consent_step) #110). The person still receives the whole link. The log keeps origin and path only: the query, the fragment and any token-like path segment are dropped.stub_rail_attemptstable writesconsent_url: nullandhas_consent_url: trueinstead of the link. The topup-agent's sweeping rail keeps the link in memory only. After a restart, or undernpm run poll, it reads the link again from the bank while the authorization waits. A record written by an earlier version loses the link at its next write. Theexecutionsrow still holds the link (seepackages/agent-core/README.md, "Stubs").No tool, payee or mandate is widened. No pin changes. Nothing here decides money.
Checked locally
On this branch:
npm ci,npm run typecheck,npm run check, vitest forpackages/agent-core,packages/agent-runtimeandagents/topup-agent(589 passed, 2 skipped),npm run eval --workspace=agents/topup-agent(7 adversarial cases, 13 scenario runs) andnode scripts/secret-scan.mjs: all green. After the cleanup commits:npm run check,tscfor topup-agent and its sweeping tests, green again.One merge conflict, in
packages/agent-core/src/types.ts: #110 and #130 each add an optional field toChargeInstrumentat the same place. Both are kept.🤖 Generated with Claude Code