Commit Graph

5797 Commits (zamilmajdy/security-update-upgrade-next)

Author SHA1 Message Date
Zamil Majdy 4782f4383c fix(rnd): string to list auto-conversion 2024-08-13 18:08:24 +02:00
Zamil Majdy 2b60a392fb fix(rnd): Fix broken test 2024-08-13 17:51:59 +02:00
Konstantinos Voulgaropoulos f30b2cdf25
inclusion of poetry run prisma generate in the documentation (#7790) 2024-08-13 10:46:28 -05:00
Zamil Majdy 9084c31662
fix(rnd): Make discord bot continuously running (#7792) 2024-08-13 10:39:39 -05:00
SwiftyOS 183c72b2d0 fix typo 2024-08-13 15:07:57 +02:00
Swifty 55e100ee1e
tweak(builder) Changes to transparency, connector color and title boldness (#7766)
Changes to transparency, connector color and title boldness
2024-08-13 15:07:07 +02:00
Toran Bruce Richards 82c5cd2d79
Add Advanced Chatbot with History using Discord (#7786)
* Add Advanced Chatbot with History using Discord

* Update Discord Chatbot with History_v145.json

update is_active to false and is_template to true

---------

Co-authored-by: Bently <tomnoon9@gmail.com>
2024-08-13 09:03:14 +01:00
Aarushi f0ab795248
fix(builder,server) Add missing create user calls (#7784)
* fix missing create user calls

* formating and linting
2024-08-09 16:49:21 +01:00
Zamil Majdy 5b9caa4345
fix(rnd): Added run-time implicit type conversion on agent node execution (#7775)
The execution graph is supposed to be typed, but there are cases where generic types like Any were used, and there are cases, where incompatible data passed into the wrong type. 

If such a thing happens on runtime, we should do the best-effort conversion instead of breaking the run. E.g.: try to json-stringify the object to str input, or try to parse number in the string to int input, etc.
2024-08-09 20:38:33 +07:00
Bently 1e054064f6
Feat(Builder): Allow for zooming out more on builder UI (#7760)
add min and max zoom
2024-08-09 07:43:06 -05:00
Aarushi 646d98470f
fix(builder): Temporarily disbale TS checks (#7777)
* disable ts checks temporarily

* prettier
2024-08-09 09:59:39 +01:00
Reinier van der Leer 5a68be5419
refactor(server, builder): Remove unused/duplicate WebSocket endpoints (#7740)
* Remove WS API method `runGraph` in favor of REST method `executeGraph`

* Remove unused WebSocket methods from `autogpt_server.server`
2024-08-08 17:01:37 +02:00
Reinier van der Leer 2ff8a0743a
fix(server): Make `userId` required on DB entities and apply default ID to existing entries (#7755)
* Make `userId` required on DB entities `AgentGraph`, `AgentGraphExecution`, and `AgentGraphExecutionSchedule`

* Add SQLite and Postgres migrations to make `userId` required and set `userId` to `3e53486c-cf57-477e-ba2a-cb02dc828e1a` on existing entries without `userId`

* Amend `create_graph` endpoint and `.data.graph`, `.data.execution` methods to handle required `user_id`

* Add `.data.user.DEFAULT_USER_ID` constant to replace hardcoded literals
2024-08-08 16:57:59 +02:00
Reinier van der Leer 582571631e
fix+refactor(builder): Sort out `FlowEditor`+`ReactFlow` state management (#7737)
* refactor(builder): Migrate `FlowEditor` to use ReactFlow's state management system

  We have been keeping two copies of node and edge data: one inside ReactFlow and one outside.
  It works, but it's accidental and implicit and there is no reason to be using shadow copies rather than a single data source.

  - Replace `useNodesState` and `useEdgesState` with `useReactFlow` hook
  - Use `addNodes`, `addEdges`, and `deleteElements` where appropriate instead of `setNodes`/`setEdges` to allow use of event hooks
  - Consolidate all edge -> node state sync logic into `onEdgesChange` event handler
    This replaces `updateNodesOnEdgeChange`, part of `onConnect`, and `onEdgesDelete`.
  - Move node deletion logic from `CustomNode` to `FlowEditor:onNodesChange`

* fix(builder): Refactor and fix copy-paste mechanism
  - Rename variables for readability
  - Use an ID map to correctly set the source and target IDs for the pasted edges
2024-08-08 16:18:15 +02:00
Reinier van der Leer bf10df612e
feat(builder): Move `/monitor` to `/` (#7769)
- Move `monitor/page.tsx` to `page.tsx`
- Remove redirect from `/` to `/build`
- Set temporary redirect from `/monitor` to `/` to prevent breaking UX (may be removed after a grace period, e.g. 2024-09-01)
2024-08-08 16:07:12 +02:00
SwiftyOS c577d04692 Changed background to white and add an effect on it 2024-08-08 15:50:59 +02:00
Swifty 85d895ef77
tweak(builder): Node styling (#7763)
* wix width

* teak(builder): blocks control styling

* tweak node styling

* formatting
2024-08-08 13:16:38 +01:00
Swifty deacc2bd8f
tweak(builder) block control styling (#7762)
* wix width

* teak(builder): blocks control styling
2024-08-08 13:15:04 +01:00
Swifty 3eb0d73461
fix(builder): Fix the control panel being too narrow for its elements (#7758)
wix width
2024-08-08 13:38:40 +02:00
Swifty be0f6498ed
fix(builder): Added header background and moved some styling to tailwind (#7756)
Added header background and moved some styling to tailwind
2024-08-08 12:12:20 +01:00
Swifty 0bab2714e9
feat(market): Agent Submission Process (#7718)
* adding auth to store

* Add ability to submit agents and review them before being added to the market

* Added auth decorator

* Added auth to market api client

* fix(builder): Fix drag-select behavior on `NodeKeyValueInput`

* fix(github): Added in fallback variables for postgres testing (#7715)

Co-authored-by: Leslie Cruz <lelcruz@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>

* feat(builder): basic tally feedback form (#7725)

* removed database changes

* moved auth to libs project

* fixed formatting

* cleaned up auth

* Added tests and database migration

* delete decorator
2024-08-08 11:12:35 +02:00
Aarushi 9c74d76a3a
fix(tests): Ensure user ID is not None on schedule in tests (#7749)
* ensure user id is never None on schedule

* remove comment
2024-08-08 11:11:57 +02:00
Bently 78e96f8a1a
Feat(Builder): Add TimerBlock (#7728) 2024-08-08 09:59:06 +01:00
Bently 904b444b13
Feat(Builder): Add email sending block (#7736) 2024-08-08 10:57:39 +02:00
Andy Hooker 3cad0f89ee
feat(builder): Standardize icons and integrate with ControlPanel and NavBar (#7743)
* feat(builder): Add new icons and integrate with ControlPanel

Introduce SVG icons and replace ControlPanel dependencies with new icons. The ControlPanel component now uses the new icon components for improved consistency.

* feat(builder): add additional icon and update icons in NavBar

Introduced the new icon with relevant documentation and examples. Replaced existing icon imports with the newly defined icons in the NavBar component for consistency.

* feat(builder): Add icon for megaphone and replace usage

Introduced the IconMegaphone for reuse across the application. Updated TallyPopup to utilize IconMegaphone instead of the previous Megaphone icon from lucide-react.

* fix(builder): Running prettier to format changed files.

Adjusted various files for consistent code formatting. Ensured proper spacing and alignment of imports, JSX tags, and object properties to enhance readability and maintain coding standards. No functional changes made.
2024-08-08 10:55:57 +02:00
lelcruz 8131fc385b
fix(builder): Added option to pan view to center agents on build screen (#7742)
Co-authored-by: Leslie Cruz <lelcruz@users.noreply.github.com>
Co-authored-by: Bently <tomnoon9@gmail.com>
2024-08-08 10:54:37 +02:00
Reinier van der Leer 335fea8605
fix(builder): Always show connected optional pins on node (#7724)
- Always show connected optional pins on node
- Refactor `hasOptionalFields()` to a constant `hasOptionalFields`
2024-08-08 10:48:14 +02:00
Reinier van der Leer 55d32f0324
fix(builder): Automatically (re)connect websocket when sending message (#7739)
- Amend `AutoGPTServerAPI.sendWebSocketMessage(..)` to automatically (re)connect the websocket if disconnected
- Amend `AutoGPTServerAPI.connectWebSocket()` to prevent race conditions
2024-08-08 09:09:50 +01:00
Swifty 56ce7ac628
feat(market): Added Auth to Market and Protect routes (#7717)
* adding auth to store

* Added auth decorator

* Added auth to market api client

* removed database changes

* moved auth to libs project

* fixed formatting

* Switched to using fastapi dependencies

* Return a user object

* removed logging of the token

* Added tests
2024-08-08 09:28:44 +02:00
Zamil Majdy 81adf84032
fix(rnd): Fix flaky CurrentDateAndTimeBlock test (#7741)
### Background

CurrentDateAndTimeBlock would fail if the test is not complete within 1-second wall-time.
In the case a test started at the second 01:59:59, it becomes flaky.

We can change the test to only assert the type. But this is also a good chance to add more assertion options for Block: a custom function.

### Changes 🏗️

Change assertion for the time block using an additional margin of error.
2024-08-07 23:44:47 -05:00
Aarushi f8d07a27af
feat(builder): Add jwt support on websockets (#7734)
add jwt support on websockets
2024-08-07 14:47:35 +01:00
Aarushi 1bad26657c
feat(rnd): Add user management (#7663)
* add user management support

* fixing tests

* fix formatting and linting

* default user, formatting & linting

* remove unused code

* remove default creation when auth enabled

* add client side calls

* addressing feedback

* prettier

* add defaults for websockets

* linting

---------

Co-authored-by: Swifty <craigswift13@gmail.com>
2024-08-07 14:15:29 +01:00
Nicholas Tindle 31dbb543a2
feat(builder): basic tally feedback form (#7725) 2024-08-07 09:14:18 +02:00
lelcruz 60d25135e6
fix(github): Added in fallback variables for postgres testing (#7715)
Co-authored-by: Leslie Cruz <lelcruz@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-08-06 15:09:02 -05:00
Reinier van der Leer 4678ed2e57
fix(builder): Fix drag-select behavior on `NodeKeyValueInput` 2024-08-06 20:53:22 +02:00
Nicholas Tindle 98a07f1265
Add new agent ideas to docs (#7716) 2024-08-06 13:45:28 -05:00
Bently 5e8ff5e3ed
Feat(Builder): Add discord bot templates (#7711)
Add discord bot templates
2024-08-06 19:44:43 +01:00
Bently 89adcefd63
Feat(Builder): added time blocks (#7710)
* added time blocks

* lint & format
2024-08-06 13:43:43 -05:00
Reinier van der Leer d82e577196
feat(builder): Rewrite & split up node inputs (#7722)
- feat(builder): Rewrite & split up `NodeInputField`
  - Create `NodeObjectInputTree`
  - Create `NodeGenericInputField`
  - Create `NodeKeyValueInput`
  - Create `NodeArrayInput`
  - Create `NodeStringInput`
  - Create `NodeNumberInput`
  - Create `NodeBooleanInput`
  - Create `NodeFallbackInput`
  - Create `ClickableInput` from `renderClickableInput(..)`
  - Amend usage in `CustomNode`
  - Remove deprecated/unused styling from `flow.css` and `customnode.css`
  - Fix alignment between `NodeHandle` and `NodeInputField`
  - Split up `BlockIOSchema` & rename to `BlockIOSubSchema`
    - Create `BlockIOObjectSubSchema`
    - Create `BlockIOKVSubSchema`
    - Create `BlockIOArraySubSchema`
    - Create `BlockIOStringSubSchema`
    - Create `BlockIONumberSubSchema`
    - Create `BlockIOBooleanSubSchema`
    - Create `BlockIONullSubSchema`
  - Install `Select` component from shad/cn

- refactor(builder): Replace boilerplate `button` styling with `Button` components

- refactor(builder): Move `NodeInputField.tsx` to `node-input-components.tsx`

---------

Co-authored-by: Krzysztof Czerwinski <kpczerwinski@gmail.com>
2024-08-06 20:32:49 +02:00
Andy Hooker e6cc8687a5
feat(builder): Refactor components and types for monitoring page streamlining (#7714) 2024-08-05 21:13:08 -05:00
Aarushi fbad0d01ee
feat(rnd, infra): Add deployment for frontend (#7705)
* add helm charts

* dont check in secrets
2024-08-05 21:12:57 +01:00
Zamil Majdy fe5c1968bc
fix(rnd): Cleanup block names and add explicit block name check (#7709) 2024-08-05 17:58:03 +00:00
Swifty 951abf6d5b
feat(rnd) Agent Marketplace MVP (#7657)
* Added listing, sorting, filtering and ordering of agents

* feat(market): general upkeep for vscode and small docs

* feat(market): most of search

* fix(market): hinting on the sort was weird + linting

* feat(market): migrations and schema updates

* lint(market): autolint

* feat(market): better search

* feat(market): file download

* feat(market): analytics of downloads

* Added tracking of views

* changed all imports to be fully qualified

* Upgrade sentry sdk

* Added an admin endpoint to submit new agents

* fixes

* Added endpoint that just tracks download

* Starting adding the marketplace page

* Marketplace client

* Create template of the marketplace page

* Updated client

* fix(market): debug port

* feat(market): agents by downloads

* fix(market, builder): hook up frontend and backend

* feat(builder, market): build a "better" market page that loads data

* feat(builder): updated search (working) and page (kinda working)

* feat(builder): add a feature agents ui (not backed yet)

* feat(builder): improve detail page content

* Added run script

* Added pre populate database command

* Add AnalyticsTracker on create agent

* Add download counts for top agents

* Add hb page prometheus metrics

* Added featured agents funcitonality

* renamed endpoint to health

* Adding download flow

* normalised api routes

* update readme

* feat(market) : default featured

* formatting

* revert changes to autogpt and forge

* Updated Readme

* Eerror when creating an agent from a template installed from (#7697)

fix creating graph from template

* Add dockerfile

* z level fix

* Updated env vars

* updated populate url

* formatting

* fixed linting error

* Set defaults

* Allow only next.js dev server

* fixed url

* removed graph reassignment as due to change in master

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-08-05 16:51:17 +02:00
SwiftyOS 9ae6389c6c fix(autogpt_server): Incorrect graph reassignment 2024-08-05 16:16:56 +02:00
Zamil Majdy 4cf1dd30f1
feat(rnd): Introduce Sub-Graph on Agent Server (#7693)
### Background

This change brings the capability to decompose a graph into sub-graphs. The objective of this feature is to allow a user to build a visually modular, and easier-to-understand graph. Also, allowing you to import a graph into your existing graph, without decluttering your existing graph.

This feature will require more implementation on the UI side, to allow the grouping of subgraph to be represented as a node in the builder.

### Changes 🏗️

Introduced a subgraph functionality with the following property:

* Sub-graph is simply a set of nodes that are grouped together, making it representable as a node.
* Sub-graph input & output pins/schema are the `InputBlock` / `OutputBlock` nodes present in the subgraph.
* The previous point implies that connecting two nodes from different sub-graphs, other than input/output nodes, is not allowed.
* Graph can be nested, but defined flatly, e.g.: graph is now only represented by three components: nodes, links, and subgraphs (a set of list of nodes). A nested subgraph is simply connecting a node inside a subgraph into another `InputBlock` node of another subgraph.
2024-08-05 16:48:14 +07:00
Swifty c7fdfa0f77
fix(builder): Apply Prettier Formatting (#7695)
formatting
2024-08-05 09:18:08 +02:00
Andy Hooker 6fa7d22c91
feat(builder): Addition of prettier for aligned of development styles (#7629)
* fix(builder): Adding prettier configuration files and to package.

* fix(builder): Running script "format" added to the package.json

* feat(builder): Adding a job to the yaml file. This job will run "format" which leverages prettier.

* feat(builder): Running script "format" and merging master

* feat(builder): Setting configuration to prettier defaults in .prettierrc.json, and adding a requested newline in the .prettierignore

* feat(builder): Updating the CI to not add a job for prettier but instead add a check to verify prettier was run before commiting.

* feat(builder): Confirming CI update fails when user does not run prettier first. Updating with file changes after prettier

* feat(builder): Running prettier write to fix warnings

* fix(builder): Removing .prett
per PR change request

* fix(builder): Running prettier formatter

* fix(builder): Running prettier formatter check found additional files

* fix(builder): Running prettier format

* fix(builder): Removing running "format" command from PR due to a change request.

* fix(builder): Removing running "format" command from PR due to a change request.

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-08-05 09:14:02 +02:00
Amelia Bruno 52bd033a02
tweak(setup): Improvements to setup script (#7469)
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
2024-08-05 00:13:25 -05:00
Andy Hooker bb5baadeb2
feat(builder): Implementation of UI / UX improvement to editor (#7690)
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-08-05 00:09:31 -05:00
Andy Hooker db97b24518
feat(builder): Addition of blocks control component (#7688)
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-08-04 23:58:12 -05:00