Demo saga followups: items #3–#7 from plan parking lot - #449
Merged
Conversation
Mirrors the renderVerificationBlock / renderPrepareReceiptBlock pattern
used by the real broadcast path: emits a verbatim-relayable markdown
block alongside the JSON simulation envelope so agents can show users
what the simulated send_transaction did without re-decoding the
unknown-shape simulation field.
Pattern-matches the four shapes simulation can take (viem
{ status: success | reverted }, our { simulationDeferredToPreview }
for Solana, our { simulationFailed | simulationSkipped, reason } for
unhandled-handle paths) and falls back to "see simulation field"
otherwise.
Closes plan-demo-saga-followups #3.
README: new "Demo mode" section between Setup and the MCP-client wiring, covering the post-#380 architecture — env activation, persona list, simulation envelope semantics (no signing, no broadcast), set_demo_wallet flow, set_helius_api_key runtime override, exit_demo_mode handoff guide, and the agent-loop-trap caveat for state-precondition flows. Also adds VAULTPILOT_DEMO to the env-var list. CONTRIBUTING: short "Testing demo mode locally" section pointing contributors at VAULTPILOT_DEMO + claude mcp add for the live-walkthrough checks that unit tests can't cover (persona drift, envelope UX, nudge timing). Closes plan-demo-saga-followups #4. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Out-of-tree weekly liveness check for src/demo/personas.ts cells. Runs cheap public-RPC / public-API queries against each non-null cell and exits non-zero when any address has confirmed-zero native balance or activity — the cheap proxy for "this wallet rotated and the persona description is now false." Three statuses: - alive: balance > 0 / tx count > 0 (the happy path) - drifted: confirmed empty (e.g. exchange wallet got rotated) — fails the run - inconclusive: rate-limit / network error from the public API — does NOT fail the run since it's noise, not signal Trigger: workflow_dispatch (manual) + Mondays 06:00 UTC weekly cron. Report uploaded as workflow artifact for 30d so a maintainer can review which cell needs refreshing. Closes plan-demo-saga-followups #5. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sets VAULTPILOT_DEMO=true before init when --demo is in argv. Lets users run `npx vaultpilot-mcp --demo` instead of the `--env VAULTPILOT_DEMO=true` env-var dance, and shortens the docs' recommended copy-paste. Idempotency: an explicit VAULTPILOT_DEMO env value (including the opt-out `false`) wins over the flag. The combination "--demo + VAULTPILOT_DEMO=false" is ambiguous, so we honor the explicit setting rather than silently overriding it. Closes plan-demo-saga-followups #6. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
defaultModeRefusalMessage now branches on persona-affinity, sourced from the persona matrix's rehearsableFlows so it auto-stays in sync with cell curation: - Single match: "Recommended persona: `defi-degen`" + others as fallback (e.g. prepare_aave_supply → only defi-degen rehearses aave_supply) - Multi match: "Recommended personas: `whale`, `defi-degen`" with the remaining personas marked as not-supporting-this-flow - All match: existing "Available personas" list (e.g. native_send) - No match: warning that the prepare may fail with a state-precondition error + pointer at exit_demo_mode (e.g. prepare_aave_borrow — gapped on every cell) Chain-aware: prepare_solana_native_send only searches solana cells, so it doesn't recommend staking-maxi (no solana cell) just because every EVM cell rehearses native_send. Closes plan-demo-saga-followups #7. Co-Authored-By: Claude Opus 4.7 <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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Implements items #3–#7 from plan-demo-saga-followups.md. Items #1 (manual smoke test, owner: maintainer) and #2 (Etherscan + Reservoir runtime overrides, blocked by #1) are deliberately deferred.
Five commits, one logical unit each:
#3 feat(demo): markdown-render the simulation envelope— addsrenderSimulationEnvelopeBlock(envelope)that emits a verbatim-relayable markdown block alongside the JSON envelope, mirroring therenderVerificationBlock/renderPrepareReceiptBlockpattern. Pattern-matches the four simulation shapes (viem{ status }, Solana deferred-to-preview, oursimulationFailed/simulationSkipped) with a fallback for unrecognized shapes.#4 docs(demo): document current demo model in README + CONTRIBUTING— new "Demo mode" section between Setup and the MCP-client wiring (env activation, persona list, simulation envelope semantics,set_demo_walletflow,set_helius_api_keyruntime override,exit_demo_modehandoff guide, agent-loop-trap caveat) +VAULTPILOT_DEMOin the env-var list. CONTRIBUTING gets a short "Testing demo mode locally" section.#5 ci(demo): persona address rotation watcher— out-of-treescripts/verify-personas.mjswith weeklyworkflow_dispatch+ cron trigger. Cheap public-RPC liveness checks; three statuses (alive / drifted / inconclusive — rate-limit transients don't fail the run). Smoke-tested locally: 9/10 cells alive, 1 inconclusive (TRON 429), 0 drifted.#6 feat(demo): --demo CLI alias—npx vaultpilot-mcp --demosetsVAULTPILOT_DEMO=truebefore init. Idempotent: an explicit env value (including the opt-outfalse) wins over the flag.#7 feat(demo): smart per-tool persona recommendations—defaultModeRefusalMessagenow branches on persona-affinity, sourced from the matrix'srehearsableFlowsso it auto-stays in sync with cell curation. Chain-aware:prepare_solana_native_sendonly searches solana cells.Test plan
tsc --noEmit)scripts/verify-personas.mjssmoke-tested against live public RPC (9/10 alive, exit 0)🤖 Generated with Claude Code