Repository navigation
refactor(topup-agent): the simulated rail speaks its own vocabulary; the rail is named simulated-pull - #137
Merged
Merged
Conversation
…the rail is named simulated-pull The offline simulation of the bank and the rail over it now use the kit's own words instead of a provider's: - Statuses: an authorization is waiting, approved, rejected, expired, revoked, cancelled or error; a payment is pending, completed, rejected, expired, cancelled or error. Rejection codes become reasons (not_approved_in_time, declined_by_person). - Requests carry reference, payee and the two limits (totalLimitMinor, perPullLimitMinor); answers carry consentId, consentUrl and reason. The fields the simulation never used (tax id, trigger, participant, device signals, redirect URL) are gone, and so is their config. - The rail is named simulated-pull, in the module and in the core's PaymentRail union. - Core comments, the two consent-step tests and the exfiltration eval input describe the pull without a provider name. - runtime: a unit test for resolveRailKind, the apiRailKey "none" branch included. - README: the limit variables are TOPUP_TOTAL_CENTS / TOPUP_TX_LIMIT_CENTS. The hosted catalog does not carry the rail name and does not change. Co-Authored-By: Claude Opus 5.5 <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.
What
The offline simulation of the bank in
agents/topup-agent, and the rail over it, now use the kit's own vocabulary.waiting,approved,rejected,expired,revoked,cancelledorerror; a payment ispending,completed,rejected,expired,cancelledorerror. Rejection codes become reasons (not_approved_in_time,declined_by_person).reference,payeeand the two limits (totalLimitMinor,perPullLimitMinor); an answer carriesconsentId,consentUrlandreason. Fields the simulation never used (tax id, trigger, participant, device signals, redirect URL) are removed, along with their config.simulated-pull, in the module and in the core'sPaymentRailunion (one-line change).resolveRailKind, including theapiRailKey: "none"branch, which had no test.TOPUP_TOTAL_CENTS/TOPUP_TX_LIMIT_CENTS.The rail keeps its guarantees: one pull per approved execution, the marker written before the payment request, no consent link in state.db. The hosted catalog does not carry the rail name and does not change.
Tests
npm run typechecknpm run checkagents/topup-agent,packages/agent-core,packages/agent-runtime(593 passed, 1 skipped)npm run eval --workspace=agents/topup-agent(7 adversarial, 13 scenario runs)npm test(CI)🤖 Generated with Claude Code