feat: zero-setup onboarding (wallet login provisions everything)#123
Conversation
…her fields saveBuilderConfig now reads-merges-writes like saveOmsConfig, so existing fields (publishableKey, omsProjectId, polymarketPrivateKey) survive a provisioning write. Adds loadBuilderConfigRaw so the provisioning short-circuit can honor an existing project even when the encrypted privateKey blob is unreadable. Also normalizes non-Error throws in the provisioning catch blocks so failures report a real message instead of "undefined", and drops the now always-true guard around loadOmsConfig in bootstrapOmsConfig.
polygon-discovery's onboarding step still told agents to run setup with an OMS publishable key. Rewrites it to the current zero-setup flow: wallet login alone, since keys are defaulted and Builder credentials auto-provision. Also drops the two README references to a QUICKSTART.md guide that was never added, pointing at the real SKILL.md reference instead.
Code review1 issue found. Checked for bugs and CLAUDE.md compliance. Bug in The comment on line 153 says "provisioning retries on the next login" and the stderr message on line 159 tells users "it will retry on the next login." However, when a user runs Provisioning only retries if the user passes Suggested fix: Check for an existing Builder access key in the short-circuit path and call |
Summary
polygon-agent wallet loginis now the entire onboarding. No keys to obtain, nosetupstep.SEQUENCE_PUBLISHABLE_KEYenv, thenbuilder.json, then the baked default.setup --oms-publishable-keystays as the advanced override.setupalways used, relocated to run automatically) and saves it tobuilder.json. That key carries the per-user indexer and Trails quota.builderProvisioned: falsein the login JSON, and retry on the next login. Existing users with a populatedbuilder.jsonare untouched.saveBuilderConfignow merges instead of overwriting, fixing a review-caught critical where provisioning (orsetup --force) could silently wipepublishableKeyor a stored Polymarket private key.Spec:
docs/superpowers/specs/2026-07-14-zero-setup-onboarding-design.md. 21 CLI tests (8 new), full per-task and whole-branch reviews; all findings fixed in-branch.Verification still open
The live clean-profile e2e (fresh HOME, real browser login, then
balances+depositdry-run with zero env vars) needs a human sign-in and is being run alongside this PR; everything code-verifiable (clean-HOME smoke: default key constructs the client and prints the sign-in URL with no config present) already passed.Before production release (rolls up with PR #122's checklist)
Follow-ups (intentionally not here)
AbortSignal.timeout) on the Builder API fetchesalreadyLoggedInshort-circuit JSON omitsbuilderProvisioned(shape varies by path; document or unify)🤖 Generated with Claude Code