This PR adds backend to make Onboarding UI added in
https://github.com/Significant-Gravitas/AutoGPT/pull/9485 functional and
adds missing confetti screen at the end of Onboarding.
*Make sure to have at least any 2 agents in store when testing locally.*
Otherwise the onboarding will finish without showing agents.
Visit `/onboarding/reset` to reset onboarding state, otherwise it'll
always redirect to `/library` once finished.
### Changes 🏗️
- Onboarding opens automatically on sign up and login (if unfinished)
for all users
- Update db schema to add `UserOnboarding` and add migration
- Add GET and PATCH `/onboarding` endpoints and logic to retrieve and
update data Onboarding for a user
- Update `POST /library/agents` endpoint
(`addMarketplaceAgentToLibrary`), so it includes input and output nodes;
these are needed to know input schema for the Onboarding
- Use new endpoints during onboarding to fetch and update data
- Use agents from the marketplace and their input schema for the
onboarding
- Add algorithm to choose store agents based on user answers and related
endpoint `GET /onboarding/agents`
- Redirect outside onboarding if finished and resume on proper page
- Add `canvas-confetti` and `@types/canvas-confetti` frontend packages
- Add and show congrats confetti screen when user runs and agent and
before opening library
- Minor design updates and onboarding fixes
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Redirect to `/onboarding/*` on sign up and sign in (if onboarding
unfinished)
- [x] Onboarding works and can be finished
- [x] Agent runs on finish
- [x] Onboarding state is saved and logging out or refreshing page
restores correct state (user choices)
- [x] When onboarding finished, trying to go into `/onboarding`
redirects to `/library`
---------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>