https://github.com/Significant-Gravitas/AutoGPT/issues/8739 causes input
fields that are supposed to be an advanced field end up being a
mandatory field:
![image](https://github.com/user-attachments/assets/1cb41a79-fe85-4012-91b8-861bd5f9a0ca)
*See the retry count field here.
### Changes 🏗️
Set the `advanced` field on each input field, and set the default value
using this logic:
* If it has a default value, set it to True.
* otherwise, False.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
---------
Co-authored-by: Swifty <craigswift13@gmail.com>
max_overflow parameter description:
```
:param max_overflow=10: the number of connections to allow in
connection pool "overflow", that is connections that can be
opened above and beyond the pool_size setting, which defaults
to five. this is only used with :class:`~sqlalchemy.pool.QueuePool`.
```
### Changes 🏗️
* Prevent additional db connections from being created in addition to
the pool size for the scheduler.
* Make the pool size configurable.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
Co-authored-by: Swifty <craigswift13@gmail.com>
Addresses:
https://github.com/Significant-Gravitas/AutoGPT/security/advisories/GHSA-4c8v-hwxc-2356
Currently, no IPv6 is used by default on this system. However, the lack
of block HTTP access prevention to internal systems with IPv6 could be a
potential SSRF.
### Changes 🏗️
Prevent internal IPv6 address access on HTTP request blocks.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
Croniter is unused, and it will be deprecated soon.
### Changes 🏗️
Remove croniter.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
Co-authored-by: Swifty <craigswift13@gmail.com>
https://github.com/Significant-Gravitas/AutoGPT/pull/9097/files#diff-ef176e50a6a65af5df2182626ea868ce77b76de447c816fb4f80fb4d376c3049R7-R41
introduced styling changes to block UI layout which causes the block
layout broken:
![image](https://github.com/user-attachments/assets/0d3d6e61-1acc-440c-9c7b-8cc473b457ea)
This PR minimally reverts the styling change.
### Changes 🏗️
Minimal CSS revert to make the block UI layout back to normal.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
Exception:
```
nid:ce829f66-14b0-4bd3-b748-791e46666cb6|-] Failed node execution ce829f66-14b0-4bd3-b748-791e46666cb6: Cannot release an unlocked lock {}\u001b[0m",
Traceback (most recent call last):\n File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 145, in _locked\n yield\n File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 115, in acquire\n lock = self._acquire_lock(user_id, credentials_id)",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 139, in _acquire_lock",
return self._locks.acquire(key)",
^^^^^^^^^^^^^^^^^^^^^^^^",
File \"/app/autogpt_platform/autogpt_libs/autogpt_libs/utils/synchronize.py\", line 44, in acquire",
lock.acquire()",
File \"/usr/local/lib/python3.11/site-packages/redis/lock.py\", line 218, in acquire",
mod_time.sleep(sleep)",
File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 471, in <lambda>",
signal.SIGTERM, lambda _, __: cls.on_node_executor_sigterm()",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 498, in on_node_executor_sigterm",
sys.exit(0)",
SystemExit: 0",
During handling of the above exception, another exception occurred:",
Traceback (most recent call last):\n File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 539, in _on_node_execution\n for execution in execute_node(\n File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 175, in execute_node\n credentials, creds_lock = creds_manager.acquire(user_id, credentials_meta.id)",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 114, in acquire",
with self._locked(user_id, credentials_id, \"!time_sensitive\"):",
File \"/usr/local/lib/python3.11/contextlib.py\", line 158, in __exit__",
self.gen.throw(typ, value, traceback)",
File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 147, in _locked",
lock.release()",
File \"/usr/local/lib/python3.11/site-packages/redis/lock.py\", line 254, in release",
raise LockError(\"Cannot release an unlocked lock\", lock_name=self.name)",
redis.exceptions.LockError: Cannot release an unlocked lock",
```
### Changes 🏗️
```
try:
lock.acquire()
...
finally:
lock.release()
```
pattern can cause an error where the lock is already released due to
timeout.
The scope of the change is to manually check the lock status before
releasing.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
There are UX and design issues with current auth pages; `login`,
`signup` and `reset_password` (including change password).
### Changes 🏗️
![auth](https://github.com/user-attachments/assets/56dfbae3-5c12-4324-a29a-846d091d9501)
*Missing `s` on the login's password error is fixed.
Important changes in bold.
#### All auth pages
- **Split `/login` into `/signup`**
- UI Redesign that adheres to Figma designs
- General code cleanup and improvements
- Fix feedback: it's now shown when needed and clear (e.g. "~~String~~
Password must be...")
- All action functions use `Sentry.withServerActionInstrumentation`
- `PasswordInput` "eye button" shows password only when mouse button is
hold and doesn't capture tab
#### Login page
- **Removed agree to terms checkbox** (it's only on signup now)
- Move provider login function to `actions.ts`
#### Signup page
- **Requires to type password twice**
- Shows waitlist information on *any* database error
#### Reset password page
- **Password update requires to type password twice**
- **When request to send email is processed then the feedback is:
Password reset email sent if user exists. Please check your email.**
- Email sent feedback is black, error is red
- Move send email and update password functions to `actions.ts`
- Disable button when email is sent
#### Other
- Update zod schema objects and move them to `types/auth`
- Move `components/PasswordInput.tsx` to `/components/auth`
- Make common UI elements separate components in `components/auth`
- Update `yarn.lock` (supabase packages)
- Remove redundant letter in `client.ts`
- Don't log error when user auth is missing in `useSupabase`; user is
simply not logged in
### 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] Form feedback:
- [x] Login works
- [x] Signup works
- [x] Reset email works
- [x] Change password works
- [x] Login works
- [x] Signup works
- [x] Reset email is sent
- [x] Reset email logs user in and redirects to `/reset_password`
- [x] Change password works
- [x] Logout works
- [x] All links across auth pages work
Note: OAuth login providers are disabled and so untested.
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
---------
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
### Changes 🏗️
- Redirect to the marketplace.
- Ensure that the store agent uses agent graph data instead of store
listing data.
- Don’t export agent input values.
- URL sanitization: We can’t open an agent if it has a colon in its
name.
- Show all top agents.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Fixes#9086
### Changes 🏗️
Added styling to the div that encapsulates the description that takes
white space into account
### Checklist 📋
#### 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:
<summary>The test plan was to just make changes to profile bio and check
the creator page to see if new lines were generated properly</summary>
Below is what the new change looks like:
<img width="882" alt="Screenshot 2024-12-20 at 12 21 09 pm"
src="https://github.com/user-attachments/assets/6d396ec7-96f8-4c9c-9d1f-a5bd75c6dc86"
/>
becomes...
<img width="468" alt="Screenshot 2024-12-20 at 12 21 15 pm"
src="https://github.com/user-attachments/assets/9dbe256b-5800-4f17-91c2-4ecffcffbc0b"
/>
Update Marketplace Image generation Prompt and Model
**Changes:**
- Updated the image generation prompt for Marketplace to better
highlight agent functionality:
```
Create a visually engaging app store thumbnail for the AI agent that
highlights what it does in a clear and captivating way:
- **Name**: {agent.name}
- **Description**: {agent.description}
Focus on showcasing its core functionality with an appealing design.
```
- Changed the model to `black-forest-labs/flux-1.1-pro` for improved
results.
Revamp the Exa search block and add two more for Content and Similarity
search.
### Changes 🏗️
- Updated the exa search block input names to be snakecase not camel
case
- Added Advanced to non required fields
- Pulled Content settings into helpers for reuse across blocks
- Updated customnode.css to handle long inputs, especially in the case
of the date input
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<!-- Clearly explain the need for these changes: -->
### Changes 🏗️
swaps context menu for dropdown menu
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
When the agent submission was filled out incorrectly, there was no error
pop up. It just did nothing.
### Changes 🏗️
Created an array to track which fields are missing
If this array is not empty, a toast is displayed to show which fields
are missing.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
---------
Co-authored-by: Swifty <craigswift13@gmail.com>
The clickable area on the navbar was very small and the icons were not
clickable
### Changes 🏗️
Wrap the icons as well in Link
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
---------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Now agent can be saved multiple times.
### Changes 🏗️
Disable agent save button when saving or running.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
### Changes 🏗️
This is for [Credential ID Exports into Agent JSON #8919
](https://github.com/Significant-Gravitas/AutoGPT/issues/8919)
I have added a new function ``removeCredentials`` into
[``utils.ts``](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...bently/open-2153-credential-id-exports-into-agent-json?expand=1#diff-db26a69e6fb7546dc621634f3c8ee6efa3639e72e02837f753af18b2fdddf7be)
which will go through and look for any "credentials" that are in the
JSON during a agent export, this will then remove them and let the user
download the file.
I have also added the same function to the importing of agents for old
agents that where exported that still contain the credentials, this
means that old agents can be imported with out breaking/causing issues.
When I say it looks for credentials I dont mean actual credentials like
api keys them self, in the JSON that is exported it contains the
following, this needs removing
```
"credentials": {
"id": "6767232a-3407-4c34-85a3-6887d4969f0c",
"title": "Anthropic Toran",
"provider": "anthropic",
"type": "api_key"
},
```
If there is a better way to go about this let me know!
- Resolves#8748
The webhooks system as is works really well for full blown enterprise
webhooks managed via a UI. It does not work for more "chill guy" webhook
tools that just send notifications sometimes.
## Changes 🏗️
- feat(blocks): Add Compass transcription trigger block
- feat(backend): Amend webhooks system to support manual-set-up webhooks
- Make event filter input optional on webhook-triggered nodes
- Make credentials optional on webhook-triggered nodes
- Add code path to re-use existing manual webhook on graph update
- Add `ManualWebhookManagerBase`
- feat(frontend): Add UI to pass webhook URL to user on manual-set-up
webhook blocks
![image](https://github.com/user-attachments/assets/1c35f161-7fe4-4916-8506-5ca9a838f398)
- fix(backend): Strip webhook info from node objects for graph export
- refactor(backend): Rename `backend.integrations.webhooks.base` to
`._base`
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Currently there are random issues (logout, auth desync) and
inconveniences with how Supabase and backend API works.
Resolves:
- https://github.com/Significant-Gravitas/AutoGPT/issues/9006
- https://github.com/Significant-Gravitas/AutoGPT/issues/8912
### Changes 🏗️
This PR streamlines how the Supabase and backend API is used to fix
current errors with auth, remove unnecessary code and make it easier to
use Supabase and backend API.
- Add `getServerSupabase` for server side that returns `SupabaseClient`.
- Add `Spinner` component that is used for loading animation.
- Remove redundant `useUser`, user is fetched in `useSupabase` already.
- Replace most Supabase `create*Client` to `getSupabaseServer` and
`useSupabase`.
- Remove redundant `AutoGPTServerAPI` class and rename
`BaseAutoGPTServerAPI` to `BackendAPI` and use it instead.
- Remove `SupabaseProvider` context; supabase caches internally what's
possible already.
- Move `useSupabase` hook to its own file and update it.
### Helpful table
| Next.js usage | Server | Client |
|---|---|---|
| API | `new BackendAPI();` | `new BackendAPI();`* or `useBackendAPI()`
|
| Supabase | `getServerSupabase();` | `useSupabase();` |
| user, user.role | `getServerUser();`** | `useSupabase();` |
\* `BackendAPI` automatically chooses correct Supabase client, so while
it's recommended to use `useBackendAPI()`, it's ok to use `new
BackendAPI();` in client components and even memoize it: `useMemo(() =>
new BackendAPI(), [])`.
** The reason user isn't returned in `getServerSupabase` is because it
forces async fetch but creating supabase doesn't, so it'd force
`getServerSupabase` to be async or return `{ supabase: SupabaseClient,
user: Promise<User> | null }`. For the same reason `useSupabase`
provides access to `supabase` immediately but `user` *may* be loading,
so there's `isUserLoading` provided as well.
### Checklist 📋
#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [ ] ...
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
---------
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Currently, users have no way to reset their password.
### Changes 🏗️
Add `reset_password` page that displays either form to send reset
password email or lets logged in user change their password. Login page
now shows clickable "Forgot your password?" link. After updating
password user is logged out and redirected to login page.
Note: Link provided in the email just logs user in and redirects to
reset password form but password update isn't enforced.
<img width="279" alt="Screenshot 2024-12-14 at 1 28 39 PM"
src="https://github.com/user-attachments/assets/c7ada10c-74e5-4be3-8033-0912eb5b38f2"
/>
### 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] Email is sent
- [x] Link in the email logs user in and redirects to reset password
form
- [x] Reset password form works
<details>
<summary>Example test plan</summary>
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
</details>
#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)
<details>
<summary>Examples of configuration changes</summary>
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
</details>
The tutorial was a bit harder than we expected to completely automate.
Along the way though, we made these functions so lets keep em in for
future use
<!-- Clearly explain the need for these changes: -->
### Changes 🏗️
- Adds a few more functions for the build automation pages
<!-- Concisely describe all of the changes made in this pull request:
-->
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [ ] I have tested my changes according to the test plan: Writing tests