Repository navigation
Demo world, step 1: new look and chapter shell - #20
Merged
Merged
Conversation
The #demo routes now render a full-screen demo shell instead of the product console: a 72px top bar with five chapter tabs (#demo/bank, rules, post, pay, end), vault and wallet balances, and an exit link back to #agent-payments. Bare #demo opens #demo/post. Existing café features are regrouped into chapters with unchanged behaviour. Styles are scoped under body.demo-world so product views keep their look. Ask Dave is restyled inside the demo and shows an AI disclaimer there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Morning post becomes a mailbox of every invoice from the latest receive, including the one rejected at intake, all drawn the same way. The selected invoice opens as a paper document with exact BigInt line items, and "Hand all N to my agent" runs the existing Pay all. Agent pays lists one row per invoice in delivery order with PAID, STOPPED or REJECTED and a plain reason. Invoice names in results and ledger receipts open the same document in a dialog. The demo shows a status line only for errors. The demo receive step keeps a display copy of each delivered invoice (including the tampered payee and Milk Co's service week). Import and payment paths are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tampered invoice now pays bean5.test.near, a lookalike of Bean Co's payout that Ask Dave's existing lookalike check catches; it is still rejected at intake for its broken signature. The End of day card reads "bean5.test.near · not a supplier". Every invoice document, genuine or tampered, offers the same "Ask Dave: would you pay this account?" button. It runs the existing read-only account check (no model) on the invoice's Pay to account and shows the verdict in the Ask Dave panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Bank chapter now shows the two places Dave's money lives: his wallet (the owner account's live balance, with "Get 5 test NEAR") and the vault (with a chosen-amount "Deposit into vault" through the owner's existing fund call). The top-bar wallet balance is wired to the same live owner balance, and a "Today at the bank" list is kept in the café state file. Two demo route actions are added, wallet-faucet and deposit, both refused outside the local sandbox. Deposit amounts are validated in exact BigInt maths: above 0, at most the wallet minus a 0.5 NEAR gas reserve. The old one-click top-up still works but is not shown. Bank operations and setup wait for the owner's gas refunds to settle, so balances and deltas are exact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Your rules becomes an editable form (most per bill, daily budget, hours) that saves through the same setDeskPolicy operation as `agent:desk policy`, keeping the pinned suppliers and minimum. Values are checked in exact BigInt maths in the browser and again on the server, with the same messages. Expired rules show a banner with "Renew for 2 hours", which uses the existing renewal operation and keeps the limits. Approved suppliers and the Milk Co weekly service are shown read-only. Two demo route actions are added, set-rules and renew-rules, refused outside the local sandbox and sharing the one-at-a-time guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent pays now shows the run as it happens: the pile on the left, and results on the right appearing one at a time in processing order, each first as "Checking…" and then as PAID, STOPPED or REJECTED once the server reports that bill's real outcome. A counter shows paid, stopped and rejected totals and the vault change. Bills stopped only by the daily budget get "Try again", which goes through the existing resume path (no model call) via a guarded demo `retry` action. End of day becomes a summary: headline totals from the on-chain ledger, who got paid (each invoice opens the viewer), what was stopped and why, the lookalike account's balance, "Ask Dave how today went" and "Start a new day". The demo pay run reports each finished bill through the existing progress endpoint and records its processing order and the day's opening vault balance in the café state file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TheGaffer7839
marked this pull request as ready for review
November 13, 2026 11:39
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.
Turns the local "Demo café" into its own world: a full-screen, five-chapter walkthrough where a judge plays Dave. The product views (
#agent-payments,#ask-dave, tools) keep their look; all demo styles are scoped underbody.demo-world. There are no contract changes, and the agent payment logic is reused unchanged; the demo-only code lives inagent/demo-cafe.tsandapp/demo-route.ts.The five steps
f09e04c):#demo/*hides the product sidebar and header. It adds a 72px top bar with chapters 01–05, vault and wallet balances, and "Exit demo → Countersign app". Bare#demoopens#demo/post. The design is dark, uses Helvetica plus monospace, and has square corners.e9da565,aa86c0b):bean5.test.near, a lookalike ofbeans.test.near. Every invoice has "Ask Dave: would you pay this account?", the existing account check with no model call: suppliers return PAY (WARN before their first payment) and the lookalike returns STOP.34bf1d4): Dave's wallet (the live owner balance, "Get 5 test NEAR") and the vault ("Deposit into vault" through the owner'sfund), with "Your agent can only pay from the vault." Deposits are checked exactly: above 0 and at most the wallet minus a 0.5 NEAR gas reserve. A "Today at the bank" history list is kept. Bank operations wait for gas refunds so balances are exact.b5310dc): an editable per-bill limit, daily budget and duration (1–24 h, the limit of the shared CLI policy operation). It saves throughsetDeskPolicy, keeping the suppliers and minimum. When rules expire, a banner offers "Renew for 2 hours" through the existing renewal. Approved suppliers and the Milk Co weekly service are shown read-only.9feef40):Demo routes added
wallet-faucet,deposit,set-rules,renew-rulesandretry. They share the existing one-at-a-time guard, refuse anything outside the local sandbox, and validate their bodies strictly. The oldfaucetstill works but is not shown.Tests
npm run test:app82/82 ·npm test11/11 ·integration/demo-cafe.test.ts1/1.Live check (port 4417, no model calls)
Fresh café → receive 7 → Hand all: rows filled in over about 26 s. Result: 3 paid, 3 stopped, 1 rejected; vault 5 → 3.8.
I then raised the daily budget to 2 and pressed Try again on PASTRY-02, which paid (vault 3.3). End of day showed "Paid 1.7 NEAR to 3 suppliers · Stopped 2 · Rejected 1 · Vault 5 → 3.3". "Start a new day" reset the balances, rules, mailbox and ledger.
Screenshots (local)
~/Documents/Headquarters/Countersign-video/demo-world/step1/…step5/(1440×900 and 390×844 per step).🤖 Generated with Claude Code