* feat(Block): Add AdvancedLlmCallBlock
Adds a block for handling advanced LLM calls, enabling messages to be handled within the AutoGPT builder.
* fix linting
* Super early version of the discord bots blocks
* updated to add secrets for token + other fixes
* lint & format
* rename DiscordBot to DiscordReader
* add discord-py
* fix poetry lock
* rm duplicated file
* updated name to add Block to end
* update .env.template to add DISCORD_BOT_TOKEN
* updates to add description Field
* swap channel name and message content + add field description
---------
Co-authored-by: Bently <bently@bentlybro.com>
- Merge `Flow.tsx:CustomNodeData` type definition into `CustomNode.tsx:CustomNodeData`
- Move `lib/types:BlockSchema` type definition into `lib/autogpt-server-api/types` in place of `ObjectSchema`
- Expand and rename `BlockSchema` -> `BlockIOSchema` + `BlockIORootSchema`
- Fix all `BlockIOSchema` related type narrowing checks
- Add warning messages to fallback cases in `NodeInputField` logic
Co-authored-by: Swifty <craigswift13@gmail.com>
* feat(Builder): Implement undo/redo functionality
* updates to work with latest UI
* add CTRL + Z & CTRL + Y support
* fixed undo/redo for inputs in nodes
* fix for deleting node
* fixes to make the undo/redo work better
* small fix
* Updates based on feedback
* add margin right to space out buttons
* added CTRL + SHIFT + Z for redo
This PR adds Supabase Auth (cloud) integration, login and profile UI, configures password login and three OAuth providers: Google, GitHub and Discord.
For `Account` button to show up and ability to login two env vars need to be set in `.env.local`: `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY`. OAuth providers are by the Supabase and don't require env vars.
Email confirmation (for email/password signup) is disabled because there's limit of 3 emails per hour without custom SMTP server configuration. [Link](https://supabase.com/dashboard/project/adfjtextkuilwuhzdjpf/auth/templates) to configure custom SMTP server and email template.
### Added dependencies:
- "@supabase/ssr": "^0.4.0"
- "@supabase/supabase-js": "^2.45.0"
- "react-icons": "^5.2.1"
### Added pages/routes:
- `app/auth/auth-code-error/page.tsx`: displayed when login using OAuth provider fails
- `app/auth/callback/route.ts`: route accessed when logging in using OAuth provider; it passes session code to Supabase
- `app/auth/confirm/route.ts`: accessed when confirming email, users will be directed here from email they get after signing in.
- `app/error/page.tsx`: Generic error page without explanation (any errors should be visible in the console)
- `app/login/page.tsx` and `app/login/actions.ts`: Login page and related login/signup server actions
- `app/profile/page.tsx`: Profile page, displays email address of the user and button to logout
### Changes
- Update `layout.tsx`: add `Log In` button and make icons consistent. The log in button shows up if user is logged out, avatar is shown when logged in, and if supabase is unavailable nothing shows up.
- Login form is verified using `zod` on the frontend (recommended by shadcn) and in case login fails feedback is displayed. On successful login users are redirected to `/profile`
- Add `PasswordInput` component, [source](https://gist.github.com/mjbalcueva/b21f39a8787e558d4c536bf68e267398)
- Add `SupabaseProvider` with context for Supabase accessed via hook `useSupabase(): { supabase: SupabaseClient | null, isLoading: boolean }`
- Add `useUser` hook to get `{ user, session, isLoading, error }` on the client
- Add `getServerUser`: async function to get `{ user: User | null, error: string | null }` on the server side
- Add `src/middleware.ts` and `client.ts`, `server.ts`, `middleware.ts` in `src/lib/supabase` which are utility functions and middleware to refresh auth token
### Background
We need an explicit block for providing input & output for the graph.
This will later allow us to build a subgraph with pre-declared input & output schema.
This will also allow us to set input for the node in the middle of the graph, and enable a graph to have output values.
### Changes 🏗️
* Add InputBlock & OutputBlock
* Add graph structure validation on the graph execution step that asserts the following property:
- All mandatory input pin, has to be connected or have a default value, except the `InputBlock` node.
- All links have to connect valid nodes, and the sink & source name using the valid block field.
* Feat(Builder): Clear Status and Output upon graph edit
* close output dropdown on graph edit
* make deleting edge clear block outputs
* make it so deleting nodes clears block output
### Background
Migration not being synced has caused issues and CI is not catching this yet.
### Changes 🏗️
* Added schema check in both sqlite & postgres prisma.schema on linting step.
* Introduced `poetry run schema` for syncing prisma.schema + generating migration in both files.
* Set up helm and tf for backend
* update helm charts and settings
* remove example files
* use latest tag
* delay and timeouts for probes
* env based pyro host
* default backend
* linting
* add helm linting in CI
* read from settings
* fix formatting
* update to use config
* Set up helm and tf for backend
* update helm charts and settings
* remove example files
* use latest tag
* delay and timeouts for probes
* env based pyro host
* default backend
* linting
* read from settings
* fix formatting
* update to use config
* fix(builder): Implementing a basic shadCn theme until color palette is decided upon
* feat(builder): Separating NavBar into its own component and providing a standard UI/UX Approach
* feat(builder): Removing old implementation of logo, removing excessive css implementation, updating styles to better support standard desktop views.
* feature(builder): Addition of UI component Sheet from ShadCn for update
### Background
Pyro for API Server is not using Prisma, but still holding a Prisma connection.
The fast-API thread is also holding a Prisma connection, making Prisma connected in two different loop within a single process.
### Changes 🏗️
Disable a Prisma connection on Pyro thread for Server API process.
Fix test flakiness issue due to concurrency issue.
### Background
Input from the input pin is consumed only once. While this is required in most of the use cases, there are some cases where the input can only be produced once, and that input needs to be re-used just like an input default value, that is passively providing input data, without triggering any execution. The scope of this change is providing that functionality in the link level, this property will be called **`static link`** in this system.
### Changes 🏗️
Provides a static link feature with the following behaviours:
* A link can be marked `static` to become a static link.
* Once a node produces an output it will persist the output data and propagate the output to the other nodes through the link, for a static link, instead of making the data queued in the input pin, it will override the default value.
* Any input executions still waiting for the input will be backfilled using this output produced by the static link.
* And any upcoming executions that will use the input will always reuse the output produced by the static link.
See the added test to see the expected usage.
* Update README.advanced.md
The copy .env command is wrong. it should be .env.example instead of env.example
* fix(server): extra space removal
---------
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
- Add `ajv` dependency to check values against json schema
- Add `errors` and `setErrors` to `CustomNodeData`
- Add `validateNodes` run before executing agent
- Add `*` on labels for required fields
- Add `setNestedProperty` and `removeEmptyStringsAndNulls` utility function
- Fix type signatures of `sendWebSocketMessage(..)`, `onWebSocketMessage(..)`, `runGraph(..)` in `autogpt-server-api/client`
- Add `WebsocketMessageTypeMap`
- Fix type signature of `updateNodesWithExecutionData` in `FlowEditor`
### Background
When multiple executors are executing the same node within the same graph execution, two node executions can read the same queue of input and read the same value—making the data that is supposed to be consumed once, consumed by two executions. The lack of lock & concurrency support for parallel execution within a single graph causes this issue.
Node concurrency also introduces poor UX in the current frontend implementation, when two nodes are executed in parallel, the current UI will not display its parallel execution update, but instead, it shows the updates that override each other. Until the execution observability is improved on the builder UI, this capability will be limited.
### Changes 🏗️
The scope of this change is to solve this issue by:
* Decouple Graph execution & Node execution, each has its own configured process pool.
* Make sure there is only 1 execution per node (we still allow parallel executions on different nodes) in a graph.
* Fixed concurrency issue by adding distributed lock API on agent_server.
* Few cleanups:
- Add more logging with geid & neid prefix on graph/node executions
- Moved execution status update to agent-server for a single source of status update (required by conn-manager/web-socket)
- Configured node parallelism to 10 & graph parallelism to 10 by default, so in the very rare worst-case, there can be 100 node executions.
- Re-use server resource for each integration test run