mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-05 05:14:14 -05:00
master
7650 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4a7bc006a8 |
hotfix(frontend): chat should be disabled by default (#11639)
### Changes 🏗️ Chat should be disabled by default; otherwise, it flashes, and if Launch Darkly fails to fail, it is dangerous. ### 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] Run locally with Launch Darkly disabled and test the above |
||
|
|
f121a22544 |
hotfix: update next (#11612)
Update next to `15.4.10` |
||
|
|
152e747ea6 | Merge branch 'master' into dev autogpt-platform-beta-v0.6.40 | ||
|
|
4d4741d558 |
fix(frontend/library): Transition from empty tasks view on task init (#11600)
- Resolves #11599 ### Changes 🏗️ - Manually update item counts when initiating a task from `EmptyTasks` view - Other improvements made while debugging ### 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] `NewAgentLibraryView` transitions to full layout when a first task is created - [x] `NewAgentLibraryView` transitions to full layout when a first trigger is set up |
||
|
|
bd37fe946d |
feat(platform): Builder search history (#11457)
Preserve user searches in the new builder and cache search results for more efficiency. Search is saved, so the user can see their previous searches. ### Changes 🏗️ - Add `BuilderSearch` column&migration to save user search (with all filters) - Builder `db.py` now caches all search results using `@cached` and returns paginated results, so following pages are returned much quicker - Score and sort results - Update models&routes - Update frontend, so it works properly with modified endpoints - Frontend: store `serachId` and use it for subsequent searches, so we don't save partial searches (e.g. "b", "bl", ..., "block"). Search id is reset when user clears the search field. - Add clickable chips to the Suggestions builder tab - Add `HorizontalScroll` component (chips use it) ### 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] Search works and is cached - [x] Search sorts results - [x] Searches are preserved properly --------- Co-authored-by: Reinier van der Leer <pwuts@agpt.co> |
||
|
|
7ff282c908 |
fix(frontend): Disable single dollar sign LaTeX mode in markdown rend… (#11598)
Single dollar signs ($10, $variable) are commonly used in content and were being incorrectly interpreted as inline LaTeX math delimiters. This change disables that behavior while keeping double dollar sign ($$...$$) math blocks working. ## Changes 🏗️ • Configure remarkMath plugin with singleDollarTextMath: false in MarkdownRenderer.tsx • Double dollar sign display math ($$...$$) continues to work as expected • Single dollar signs are no longer interpreted as inline math delimiters ## 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] Verify content with dollar amounts (e.g., “$100”) renders as plain text -[x] Verify double dollar sign math blocks ($$x^2$$) still render as LaTeX -[x] Verify other markdown features (code blocks, tables, links) still work correctly Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
117bb05438 |
fix(frontend/library): Fix trigger UX flows in v3 library (#11589)
- Resolves #11586 - Follow-up to #11580 ### Changes 🏗️ - Fix logic to include manual triggers as a possibility - Fix input render logic to use trigger setup schema if applicable - Fix rendering payload input for externally triggered runs - Amend `RunAgentModal` to load preset inputs+credentials if selected - Amend `SelectedTemplateView` to use modified input for run (if applicable) - Hide non-applicable buttons in `SelectedRunView` for externally triggered runs - Implement auto-navigation to `SelectedTriggerView` on trigger setup ### 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] Can set up manual triggers - [x] Navigates to trigger view after setup - [x] Can set up automatic triggers - [x] Can create templates from runs - [x] Can run templates - [x] Can run templates with modified input |
||
|
|
979d7c3b74 |
feat(blocks): Add 4 new GitHub webhook trigger blocks (#11588)
I want to be able to automate some actions on social media or our sevrver in response to actions from discord <!-- Clearly explain the need for these changes: --> ### Changes 🏗️ Add trigger blocks for common GitHub events to enable OSS automation: - GithubReleaseTriggerBlock: Trigger on release events (published, etc.) - GithubStarTriggerBlock: Trigger on star events for milestone celebrations - GithubIssuesTriggerBlock: Trigger on issue events for triage/notifications - GithubDiscussionTriggerBlock: Trigger on discussion events for Q&A sync <!-- 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 - [x] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [x] Test Stars - [x] Test Discussions - [x] Test Issues - [x] Test Release 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
95200b67f8 |
feat(blocks): add many new spreadsheet blocks (#11574)
<!-- Clearly explain the need for these changes: -->
We have lots we want to do with google sheets and we don't want a lack
of blocks to be a limiter so I pre-ddi a lot of blocks!
### Changes 🏗️
Adds 24 new blocks for google sheets (tested and working)
```
|-----|-------------------------------------------|----------------------------------------|
| 1 | GoogleSheetsFilterRowsBlock | Filter rows based on column conditions | ✅ |
| 2 | GoogleSheetsLookupRowBlock | VLOOKUP-style row lookup | ✅ |
| 3 | GoogleSheetsDeleteRowsBlock | Delete rows from a sheet | ✅ |
| 4 | GoogleSheetsGetColumnBlock | Get data from a specific column | ✅ |
| 5 | GoogleSheetsSortBlock | Sort sheet data | ✅ |
| 6 | GoogleSheetsGetUniqueValuesBlock | Get unique values from a column | ✅ |
| 7 | GoogleSheetsInsertRowBlock | Insert rows into a sheet | ✅ |
| 8 | GoogleSheetsAddColumnBlock | Add a new column | ✅ |
| 9 | GoogleSheetsGetRowCountBlock | Get the number of rows | ✅ |
| 10 | GoogleSheetsRemoveDuplicatesBlock | Remove duplicate rows | ✅ |
| 11 | GoogleSheetsUpdateRowBlock | Update an existing row | ✅ |
| 12 | GoogleSheetsGetRowBlock | Get a specific row by index | ✅ |
| 13 | GoogleSheetsDeleteColumnBlock | Delete a column | ✅ |
| 14 | GoogleSheetsCreateNamedRangeBlock | Create a named range | ✅ |
| 15 | GoogleSheetsListNamedRangesBlock | List all named ranges | ✅ |
| 16 | GoogleSheetsAddDropdownBlock | Add dropdown validation to cells | ✅ |
| 17 | GoogleSheetsCopyToSpreadsheetBlock | Copy sheet to another spreadsheet | ✅ |
| 18 | GoogleSheetsProtectRangeBlock | Protect a range from editing | ✅ |
| 19 | GoogleSheetsExportCsvBlock | Export sheet as CSV | ✅ |
| 20 | GoogleSheetsImportCsvBlock | Import CSV data | ✅ |
| 21 | GoogleSheetsAddNoteBlock | Add notes to cells | ✅ |
| 22 | GoogleSheetsGetNotesBlock | Get notes from cells | ✅ |
| 23 | GoogleSheetsShareSpreadsheetBlock | Share spreadsheet with users | ✅ |
| 24 | GoogleSheetsSetPublicAccessBlock | Set public access permissions | ✅ |
```
<!-- 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
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] Tested using the attached agent
[super test for
spreadsheets_v9.json](https://github.com/user-attachments/files/24041582/super.test.for.spreadsheets_v9.json)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces a large suite of Google Sheets blocks for row/column ops,
filtering/sorting/lookup, CSV import/export, notes, named ranges,
protections, sheet copy, and sharing/public access, plus refactors
append to a simpler single-row append.
>
> - **Google Sheets blocks (new)**:
> - **Data ops**: `GoogleSheetsFilterRowsBlock`,
`GoogleSheetsLookupRowBlock`, `GoogleSheetsDeleteRowsBlock`,
`GoogleSheetsGetColumnBlock`, `GoogleSheetsSortBlock`,
`GoogleSheetsGetUniqueValuesBlock`, `GoogleSheetsInsertRowBlock`,
`GoogleSheetsAddColumnBlock`, `GoogleSheetsGetRowCountBlock`,
`GoogleSheetsRemoveDuplicatesBlock`, `GoogleSheetsUpdateRowBlock`,
`GoogleSheetsGetRowBlock`, `GoogleSheetsDeleteColumnBlock`.
> - **Named ranges & validation**: `GoogleSheetsCreateNamedRangeBlock`,
`GoogleSheetsListNamedRangesBlock`, `GoogleSheetsAddDropdownBlock`.
> - **Sheet/admin**: `GoogleSheetsCopyToSpreadsheetBlock`,
`GoogleSheetsProtectRangeBlock`.
> - **CSV & notes**: `GoogleSheetsExportCsvBlock`,
`GoogleSheetsImportCsvBlock`, `GoogleSheetsAddNoteBlock`,
`GoogleSheetsGetNotesBlock`.
> - **Sharing**: `GoogleSheetsShareSpreadsheetBlock`,
`GoogleSheetsSetPublicAccessBlock`.
> - **Refactor**:
> - Rename and simplify append: `GoogleSheetsAppendRowBlock` (replaces
multi-row/dict input with single `row`), fixed insert option to
`INSERT_ROWS` and streamlined response.
> - **Utilities/Enums**:
> - Add helpers (`_column_letter_to_index`, `_index_to_column_letter`,
`_apply_filter`) and enums (`FilterOperator`, `SortOrder`, `ShareRole`,
`PublicAccessRole`).
> - Drive/Sheets service builders and file validation reused across new
blocks.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
f8afc6044e |
fix(frontend): prevent file upload buttons from triggering form submission (#11576)
<!-- Clearly explain the need for these changes: --> In the File Widget, the upload button was incorrectly behaving like a submit button. When users clicked it, the rjsf library immediately triggered form validation and displayed validation errors, even though the user was only trying to upload a file. This happened because HTML buttons inside a form default to `type="submit"`, which triggers form submission on click. By explicitly setting `type="button"` on all file-related buttons, we prevent them from submitting the form while still allowing them to trigger the file input dialog. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - Added `type="button"` attribute to the clear button in the compact variant - Added `type="button"` attribute to the upload button in the compact variant - Added `type="button"` attribute to the "Browse File" button in the default variant This ensures that clicking any of these buttons only triggers the intended file selection/upload action without causing unwanted form validation or submission. ### 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] Tested clicking the upload button in a form with File Widget - form should not submit or show validation errors - [x] Tested clicking the clear button - should clear the file without triggering form validation - [x] Tested clicking the "Browse File" button - should open file dialog without triggering form validation - [x] Verified file upload functionality still works correctly after selecting a file |
||
|
|
7edf01777e |
fix(frontend): sync flowVersion to URL when loading graph from Library (#11585)
<!-- Clearly explain the need for these changes: --> When opening a graph from the Library, the `flowVersion` query parameter was not being set in the URL. This caused issues when the graph data didn't contain an internal `graphVersion`, resulting in the builder failing and graphs breaking when running. The `useGetV1GetSpecificGraph` hook relies on the `flowVersion` query parameter to fetch the correct graph version. Without it being properly set in the URL, the graph loading logic fails when the version information is missing from the graph data itself. ### Changes 🏗️ - Added `setQueryStates` to the `useQueryStates` hook return value in `useFlow.ts` - Added logic to sync `flowVersion` to the URL query parameters when a graph is loaded - When `graph.version` is available, it now updates the `flowVersion` query parameter in the URL (defaults to `1` if version is undefined) This ensures the URL stays in sync with the loaded graph's version, preventing builder failures and execution issues. ### 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] Open a graph from the Library that doesn't have a version in the URL - [x] Verify that `flowVersion` is automatically added to the URL query parameters - [x] Verify that the graph loads correctly and can be executed - [x] Verify that graphs with existing `flowVersion` in URL continue to work correctly - [x] Verify that graphs opened from Library with version information sync correctly |
||
|
|
c9681f5d44 |
fix(frontend): library page adjustments (#11587)
## Changes 🏗️ ### Adjust layout and styles on mobile 📱 <img width="448" height="843" alt="Screenshot 2025-12-09 at 22 53 14" src="https://github.com/user-attachments/assets/159bdf4f-e6b2-42f5-8fdf-25f8a62c62d1" /> ### Make the sidebar cards have contextual actions <img width="486" height="243" alt="Screenshot 2025-12-09 at 22 53 27" src="https://github.com/user-attachments/assets/2f530168-3217-47c4-b08d-feccbb9e9152" /> Depending on the card type, different type of actions are shown... ### Make buttons in "About agent" card do something <img width="344" height="346" alt="Screenshot 2025-12-09 at 22 54 01" src="https://github.com/user-attachments/assets/47181f80-1f68-4ef1-aecc-bbadc7cc9c44" /> ### Other - Hide `Schedule` button for agents with trigger run type - Adjust secondary button background colour... - Make drawer content scrollable on mobile ## 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] Run locally and test the above Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
1305325813 |
fix(frontend): preserve button shape in credential select when content is long (#11577)
<!-- Clearly explain the need for these changes: --> When the content inside the credential select dropdown becomes too long, the adjacent link buttons lose their rounded shape and appear squarish. This happens when the text stretches the container or affects the layout of the buttons. The issue occurs because the button's width can shrink below its intended size when the flex container is stretched by long credential names. By adding an explicit minimum width constraint with `!min-w-8`, we ensure the button maintains its proper dimensions and rounded appearance regardless of the select dropdown's content length. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - Added `!min-w-8` to the external link button's className in `SelectCredential` component to enforce a minimum width of 2rem (8 * 0.25rem) - This ensures the button maintains its rounded shape even when the adjacent select dropdown contains long credential names ### 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] Tested credential select with short credential names - button should maintain rounded shape - [x] Tested credential select with very long credential names (e.g., long provider names, usernames, and hosts) - button should maintain rounded shape |
||
|
|
4f349281bd |
feat(frontend): switch copied graph storage from local storage to clipboard (#11578)
### Changes 🏗️ This PR migrates the copy/paste functionality for graph nodes and edges from local storage to the Clipboard API. This change addresses storage limitations and enables cross-tab copying. https://github.com/user-attachments/assets/6ef55713-ca5b-4562-bb54-4c12db241d30 **Key changes:** - Replaced `localStorage` with `navigator.clipboard` API for copy/paste operations - Added `CLIPBOARD_PREFIX` constant (`"autogpt-flow-data:"`) to identify our clipboard data and prevent conflicts with other clipboard content - Added toast notifications to provide user feedback when copying nodes - Added error handling for clipboard read/write operations with console error logging - Removed dependency on `@/services/storage/local-storage` for copied flow data - Updated `useCopyPaste` hook to use async clipboard operations with proper promise handling **Benefits:** - ✅ Removes local storage size limitations (5-10MB) - ✅ Enables copying nodes between browser tabs/windows - ✅ Provides better user feedback through toast notifications - ✅ More standard approach using native browser Clipboard API ### 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] Select one or more nodes in the flow editor - [x] Press `Ctrl+C` (or `Cmd+C` on Mac) to copy nodes - [x] Verify toast notification appears showing "Copied successfully" with node count - [x] Press `Ctrl+V` (or `Cmd+V` on Mac) to paste nodes - [x] Verify nodes are pasted at viewport center with new unique IDs - [x] Verify edges between copied nodes are also pasted correctly - [x] Test copying nodes in one browser tab and pasting in another tab (should work) - [x] Test copying non-flow data (e.g., text) and verify paste doesn't interfere with flow editor |
||
|
|
6c43b34dee |
feat(frontend): add templates/triggers to new Library page view (#11580)
## Changes 🏗️ Add Templates to the new Agent Library page: <img width="800" height="889" alt="Screenshot 2025-12-09 at 14 10 01" src="https://github.com/user-attachments/assets/85f0d478-f3f9-4ccf-81df-b9a7f4ae8849" /> - You can create a template from a run ( new action button ) - Templates are listed and can be selected on the sidebar - When viewing a template, you can edit it, create a task or delete it Add Triggers to the new Agent Library page: <img width="800" height="836" alt="Screenshot 2025-12-09 at 14 10 43" src="https://github.com/user-attachments/assets/c722f807-c72f-4a4d-8778-e36bea203f6e" /> - When an agent contains a trigger block, on the modal it will create a trigger - When there are triggers, they are listed on the sidebar - A trigger can be viewed and edited ## 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] Run the new page locally |
||
|
|
c1e21d07e6 |
feat(platform): add execution accuracy alert system (#11562)
## Summary <img width="1263" height="883" alt="image" src="https://github.com/user-attachments/assets/98d4f449-1897-4019-a599-846c27df4191" /> <img width="398" height="190" alt="image" src="https://github.com/user-attachments/assets/0138ac02-420d-4f96-b980-74eb41e3c968" /> - Add execution accuracy monitoring with moving averages and Discord alerts - Dashboard visualization for accuracy trends and alert detection - Hourly monitoring for marketplace agents (≥10 executions in 30 days) - Generated API client integration with type-safe models ## Features - **Moving Average Analysis**: 3-day vs 7-day comparison with configurable thresholds - **Discord Notifications**: Hourly alerts for accuracy drops ≥10% - **Dashboard UI**: Real-time trends visualization with alert status - **Type Safety**: Generated API hooks and models throughout - **Error Handling**: Graceful OpenAI configuration handling - **PostgreSQL Optimization**: Window functions for efficient trend queries ## Test plan - [x] Backend accuracy monitoring logic tested with sample data - [x] Frontend components using generated API hooks (no manual fetch) - [x] Discord notification integration working - [x] Admin authentication and authorization working - [x] All formatting and linting checks passing - [x] Error handling for missing OpenAI configuration - [x] Test data available with `test-accuracy-agent-001` 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
aaa8dcc5a8 |
feat(frontend): design updates run agent modal (#11570)
## Changes 🏗️ <img width="500" height="927" alt="Screenshot 2025-12-08 at 16 30 04" src="https://github.com/user-attachments/assets/97170302-50ae-4750-99e1-275861ee9e08" /> <img width="500" height="897" alt="Screenshot 2025-12-08 at 16 30 10" src="https://github.com/user-attachments/assets/0a7ac828-ebea-40de-a19e-fbf77b0c2eb7" /> Update the new **Run Agent Modal** as a new view. From now on, sections ( inputs, credentials, etc... ) are enclosed. Refactor all the existing code to be more readable and [adhere to code conventions](https://github.com/Significant-Gravitas/AutoGPT/blob/master/autogpt_platform/frontend/CONTRIBUTING.md). ### Other improvements - Refactor `<CredentialInputs />`: - to adhere to code conventions - to show all existing credentials for a given provider - to allow deletion of a given credential - to allow to select/switch credentials for a given task - Run Graph Errors: - when the run fails, show the errors nicely on the toast and link to the builder for further debugging - Design System: - secondary button colour has been updated - labels size for form fields has been updated ## 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] Run the app locally - [x] Test the above updates running agents from the new library page |
||
|
|
a46976decd |
fix(frontend): allow to close toasts (#11550)
## Changes 🏗️ <img width="795" height="275" alt="Screenshot 2025-12-04 at 21 05 55" src="https://github.com/user-attachments/assets/e7572635-3976-4822-89ea-3e5e26196ab8" /> Allow to close toasts 🍞 ## 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] Run Storybook locally - [x] Toast have a close button top-right --------- Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
c4eb7edb65 |
feat(platform): Improve Google Sheets/Drive integration with unified credentials (#11520)
Simplifies and improves the Google Sheets/Drive integration by merging
credentials with the file picker and using narrower OAuth scopes.
### Changes 🏗️
- Merge Google credentials and file picker into a single unified input
field for better UX
- Create spreadsheets using Drive API instead of Sheets API for proper
scope support
- Simplify Google Drive OAuth scope to only use `drive.file` (narrowest
permission needed)
- Clean up unused imports (NormalizedPickedFile)
### 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] Test creating a new Google Spreadsheet with
GoogleSheetsCreateSpreadsheetBlock
- [x] Test reading from existing spreadsheets with GoogleSheetsReadBlock
- [x] Test writing to spreadsheets with GoogleSheetsWriteBlock
- [x] Verify OAuth flow works with simplified scopes
- [x] Verify file picker works with merged credentials field
#### For configuration changes:
- [x] `.env.default` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Unifies Google Drive picker and credentials with auto-credentials
across backend and frontend, updates all Sheets blocks and execution to
use it, and adds Drive-based spreadsheet creation plus supporting tests
and UI fixes.
>
> - **Backend**:
> - **Google Drive model/field**: Introduce `GoogleDriveFile` (with
`_credentials_id`) and `GoogleDriveFileField()` for unified auth+picker
(`backend/blocks/google/_drive.py`).
> - **Sheets blocks**: Replace `GoogleDrivePickerField` and explicit
credentials with `GoogleDriveFileField` across all Sheets blocks;
preserve and emit credentials for chaining; add Drive service; create
spreadsheets via Drive API then manage via Sheets API.
> - **IO block**: Add `AgentGoogleDriveFileInputBlock` providing a Drive
picker input.
> - **Execution**: Support auto-generated credentials via
`BlockSchema.get_auto_credentials_fields()`; acquire/release multiple
credential locks; pass creds by `credentials_kwarg`
(`executor/manager.py`, `data/block.py`, `util/test.py`).
> - **Tests**: Add validation tests for duplicate/unique
`auto_credentials.kwarg_name` and defaults.
> - **Frontend**:
> - **Picker**: Enhance Google Drive picker to require/use saved
platform credentials, pass `_credentials_id`, validate scopes, and
manage dialog z-index/interaction; expose `requirePlatformCredentials`.
> - **UI**: Update dialogs/CSS to keep Google picker on top and prevent
overlay interactions.
> - **Types**: Extend `GoogleDrivePickerConfig` with `auto_credentials`
and related typings.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
3f690ea7b8 |
fix(platform/frontend): security upgrade next from 15.4.7 to 15.4.8 (#11536)

### Snyk has created this PR to fix 1 vulnerabilities in the yarn
dependencies of this project.
#### Snyk changed the following file(s):
- `autogpt_platform/frontend/package.json`
#### Note for
[zero-installs](https://yarnpkg.com/features/zero-installs) users
If you are using the Yarn feature
[zero-installs](https://yarnpkg.com/features/zero-installs) that was
introduced in Yarn V2, note that this PR does not update the
`.yarn/cache/` directory meaning this code cannot be pulled and
immediately developed on as one would expect for a zero-install project
- you will need to run `yarn` to update the contents of the
`./yarn/cache` directory.
If you are not using zero-install you can ignore this as your flow
should likely be unchanged.
<details>
<summary>⚠️ <b>Warning</b></summary>
```
Failed to update the yarn.lock, please update manually before merging.
```
</details>
#### Vulnerabilities that will be fixed with an upgrade:
| | Issue |
:-------------------------:|:-------------------------
 | Arbitrary Code Injection
<br/>[SNYK-JS-NEXT-14173355](https://snyk.io/vuln/SNYK-JS-NEXT-14173355)
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
> - This PR was automatically created by Snyk using the credentials of a
real user.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open fix PRs._
For more information: <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJhNDQzN2JlZC0wMjYxLTRhZmMtYmQxOS1hMTUwY2RhMDE3ZDciLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImE0NDM3YmVkLTAyNjEtNGFmYy1iZDE5LWExNTBjZGEwMTdkNyJ9fQ=="
width="0" height="0"/>
🧐 [View latest project
report](https://app.snyk.io/org/significant-gravitas/project/3d924968-0cf3-4767-9609-501fa4962856?utm_source=github&utm_medium=referral&page=fix-pr)
📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=github&utm_content=fix-pr-template)
🛠 [Adjust project
settings](https://app.snyk.io/org/significant-gravitas/project/3d924968-0cf3-4767-9609-501fa4962856?utm_source=github&utm_medium=referral&page=fix-pr/settings)
📚 [Read about Snyk's upgrade
logic](https://docs.snyk.io/scan-with-snyk/snyk-open-source/manage-vulnerabilities/upgrade-package-versions-to-fix-vulnerabilities?utm_source=github&utm_content=fix-pr-template)
---
**Learn how to fix vulnerabilities with free interactive lessons:**
🦉 [Arbitrary Code
Injection](https://learn.snyk.io/lesson/insecure-deserialization/?loc=fix-pr)
[//]: #
'snyk:metadata:{"breakingChangeRiskLevel":null,"FF_showPullRequestBreakingChanges":false,"FF_showPullRequestBreakingChangesWebSearch":false,"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"next","from":"15.4.7","to":"15.4.8"}],"env":"prod","issuesToFix":["SNYK-JS-NEXT-14173355"],"prId":"a4437bed-0261-4afc-bd19-a150cda017d7","prPublicId":"a4437bed-0261-4afc-bd19-a150cda017d7","packageManager":"yarn","priorityScoreList":[null],"projectPublicId":"3d924968-0cf3-4767-9609-501fa4962856","projectUrl":"https://app.snyk.io/org/significant-gravitas/project/3d924968-0cf3-4767-9609-501fa4962856?utm_source=github&utm_medium=referral&page=fix-pr","prType":"fix","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["updated-fix-title","pr-warning-shown"],"type":"auto","upgrade":["SNYK-JS-NEXT-14173355"],"vulns":["SNYK-JS-NEXT-14173355"],"patch":[],"isBreakingChange":false,"remediationStrategy":"vuln"}'
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Upgrades Next.js from 15.4.7 to 15.4.8 in the frontend and updates
lockfile/transitive references accordingly.
>
> - **Dependencies**:
> - Bump `next` to `15.4.8` in `autogpt_platform/frontend/package.json`.
> - Update lockfile to align, including `@next/*` SWC binaries and
packages that peer-depend on `next` (e.g., `@sentry/nextjs`,
`@storybook/nextjs`, `@vercel/*`, `geist`, `nuqs`,
`@next/third-parties`).
> - Minor transitive tweak: `sharp` dependency `semver` updated to
`7.7.3`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
8be3c88711 |
feat(backend): add default store agents for seeding test databases (#11552)
This PR adds a collection of pre-built store agents that can be loaded into test databases for development and testing purposes. ### Changes 🏗️ - Add 17 exported agent JSON files in `backend/agents/` directory - Add `StoreAgent_rows.csv` containing store listing metadata (titles, descriptions, categories, images) - Add `load_store_agents.py` script to load agents into the test database - Add `load-store-agents` Makefile target for easy execution **Included Agents:** - Flux AI Image Generator - YouTube Transcription Scraper - Decision Maker Lead Finder - Smart Meeting Prep - Automated Support Agent - Unspirational Poster Maker - AI Video Generator - Automated SEO Blog Writer - Lead Finder (Local Businesses) - LinkedIn Post Generator - YouTube to LinkedIn Post Converter - Personal Newsletter - Email Scout - Contact Finder Assistant - YouTube Video to SEO Blog Writer - AI Webpage Copy Improver - Domain Name Finder - AI Function ### 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] Run `make load-store-agents` and verify agents are loaded into the database - [x] Verify store listings appear correctly with metadata from CSV - [x] Confirm no sensitive information (API keys, secrets) is included in the exported agents #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) No configuration changes required - this only adds test data and a loading script. |
||
|
|
e4d0dbc283 |
feat(platform): add Agent Output Demo field to marketplace submission form (#11538)
## Summary - Add Agent Output Demo field to marketplace agent submission form, positioned below the Description field - Store agent output demo URLs in database for future CoPilot integration - Implement proper video/image ordering on marketplace pages - Add shared YouTube URL validation utility to eliminate code duplication ## Changes Made ### Frontend - **Agent submission form**: Added Agent Output Demo field with YouTube URL validation - **Edit agent form**: Added Agent Output Demo field for existing submissions - **Marketplace display**: Implemented proper video/image ordering: 1. YouTube/Overview video (if exists) 2. First image (hero) 3. Agent Output Demo (if exists) 4. Additional images - **Shared utilities**: Created `validateYouTubeUrl` function in `src/lib/utils.ts` ### Backend - **Database schema**: Added `agentOutputDemoUrl` field to `StoreListingVersion` model - **Database views**: Updated `StoreAgent` view to include `agent_output_demo` field - **API models**: Added `agent_output_demo_url` to submission requests and `agent_output_demo` to responses - **Database migration**: Added migration to create new column and update view - **Test files**: Updated all test files to include the new required field ## Test Plan - [x] Frontend form validation works correctly for YouTube URLs - [x] Database migration applies successfully - [x] Backend API accepts and returns the new field - [x] Marketplace displays videos in correct order - [x] Both frontend and backend formatting/linting pass - [x] All test files include required field to prevent failures 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
8e476c3f8d |
fix(backend): pass credential type from SDK registry to integrations API (#11544)
### Changes 🏗️ This PR improves the `/integrations/providers` endpoint to dynamically determine supported authentication types from the SDK registry instead of using hardcoded values. **What changed:** - The `list_providers` function now looks up each provider in the `AutoRegistry` to get its `supported_auth_types` - If a provider has defined auth types in the SDK registry, those are used to set `supports_api_key`, `supports_user_password`, and `supports_host_scoped` flags - Falls back to legacy hardcoded behavior for providers not registered in the SDK (maintains backwards compatibility) **Why:** - Providers can now correctly declare their supported authentication methods via the SDK - Removes brittle hardcoded checks like `name in ("smtp",)` for specific providers - Makes the credential type system more extensible and maintainable ### 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] Verified providers with SDK-defined auth types return correct flags - [x] Verified legacy providers still work with fallback behavior - [x] Tested the `/integrations/providers` endpoint returns expected data #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) No configuration changes required for this PR. |
||
|
|
2f63defb53 |
fix(backend): Mark ValueError as known block errors (#11537)
### Changes 🏗️ Mark ValueError as known block errors ### 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: |
||
|
|
2934e9ea69 |
fix(backend): replace print() statements with proper logging (#11499)
- Replace print() with logger.info() in reddit.py for login message
- Replace print() with logger.debug() in airtable/_api.py for API params
- Replace print() with logger.debug() in _manual_base.py for webhook URL
- Add logging imports and logger initialization where missing
- Update FIXME to TODO with GitHub issue reference #8537
<!-- Clearly explain the need for these changes: -->
### Changes 🏗️
<!-- 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
- [x] I have tested my changes according to the test plan:
<!-- Put your test plan here: -->
- [x] test it still works
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Switch `print()` to `logger.info/debug()` across Airtable, Reddit, and
manual webhook modules; add logger initialization and clarify TODO with
issue reference.
>
> - **Backend**:
> - **Airtable (`backend/blocks/airtable/_api.py`)**:
> - Replace `print(params)` with `logger.debug` in `create_base`.
> - **Reddit (`backend/blocks/reddit.py`)**:
> - Add `logging` import and `logger` initialization.
> - Replace login `print` with `logger.info` in `get_praw`.
> - **Webhooks (`backend/integrations/webhooks/_manual_base.py`)**:
> - Replace `print` with `logger.debug` in `_register_webhook` and add
`logger`.
> - Update `FIXME` to `TODO` with GitHub issue reference `#8537`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
c880db439d |
feat(platform): Backend completion of Onboarding tasks (#11375)
Make onboarding task completion backend-authoritative which prevents cheating (previously users could mark all tasks as completed instantly and get rewards) and makes task completion more reliable. Completion of tasks is moved backend with exception of introductory onboarding tasks and visit-page type tasks. ### Changes 🏗️ - Move incrementing run counter backend and make webhook-triggered and scheduled task execution count as well - Use user timezone for calculating run streak - Frontend task completion is moved from update onboarding state to separate endpoint and guarded so only frontend tasks can be completed - Graph creation, execution and add marketplace agent to library accept `source`, so appropriate tasks can be completed - Replace `client.ts` api calls with orval generated and remove no longer used functions from `client.ts` - Add `resolveResponse` helper function that unwraps orval generated call result to 2xx response Small changes&bug fixes: - Make Redis notification bus serialize all payload fields - Fix confetti when group is finished - Collapse finished group when opening Wallet - Play confetti only for tasks that are listed in the Wallet UI ### 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] Onboarding can be finished - [x] All tasks can be finished and work properly - [x] Confetti works properly |
||
|
|
486099140d |
fix(platform/frontend): security upgrade next from 15.4.7 to 15.4.8 (#11536)

### Snyk has created this PR to fix 1 vulnerabilities in the yarn
dependencies of this project.
#### Snyk changed the following file(s):
- `autogpt_platform/frontend/package.json`
#### Note for
[zero-installs](https://yarnpkg.com/features/zero-installs) users
If you are using the Yarn feature
[zero-installs](https://yarnpkg.com/features/zero-installs) that was
introduced in Yarn V2, note that this PR does not update the
`.yarn/cache/` directory meaning this code cannot be pulled and
immediately developed on as one would expect for a zero-install project
- you will need to run `yarn` to update the contents of the
`./yarn/cache` directory.
If you are not using zero-install you can ignore this as your flow
should likely be unchanged.
<details>
<summary>⚠️ <b>Warning</b></summary>
```
Failed to update the yarn.lock, please update manually before merging.
```
</details>
#### Vulnerabilities that will be fixed with an upgrade:
| | Issue |
:-------------------------:|:-------------------------
 | Arbitrary Code Injection
<br/>[SNYK-JS-NEXT-14173355](https://snyk.io/vuln/SNYK-JS-NEXT-14173355)
---
> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - Max score is 1000. Note that the real score may have changed since
the PR was raised.
> - This PR was automatically created by Snyk using the credentials of a
real user.
---
**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open fix PRs._
For more information: <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJhNDQzN2JlZC0wMjYxLTRhZmMtYmQxOS1hMTUwY2RhMDE3ZDciLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImE0NDM3YmVkLTAyNjEtNGFmYy1iZDE5LWExNTBjZGEwMTdkNyJ9fQ=="
width="0" height="0"/>
🧐 [View latest project
report](https://app.snyk.io/org/significant-gravitas/project/3d924968-0cf3-4767-9609-501fa4962856?utm_source=github&utm_medium=referral&page=fix-pr)
📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=github&utm_content=fix-pr-template)
🛠 [Adjust project
settings](https://app.snyk.io/org/significant-gravitas/project/3d924968-0cf3-4767-9609-501fa4962856?utm_source=github&utm_medium=referral&page=fix-pr/settings)
📚 [Read about Snyk's upgrade
logic](https://docs.snyk.io/scan-with-snyk/snyk-open-source/manage-vulnerabilities/upgrade-package-versions-to-fix-vulnerabilities?utm_source=github&utm_content=fix-pr-template)
---
**Learn how to fix vulnerabilities with free interactive lessons:**
🦉 [Arbitrary Code
Injection](https://learn.snyk.io/lesson/insecure-deserialization/?loc=fix-pr)
[//]: #
'snyk:metadata:{"breakingChangeRiskLevel":null,"FF_showPullRequestBreakingChanges":false,"FF_showPullRequestBreakingChangesWebSearch":false,"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"next","from":"15.4.7","to":"15.4.8"}],"env":"prod","issuesToFix":["SNYK-JS-NEXT-14173355"],"prId":"a4437bed-0261-4afc-bd19-a150cda017d7","prPublicId":"a4437bed-0261-4afc-bd19-a150cda017d7","packageManager":"yarn","priorityScoreList":[null],"projectPublicId":"3d924968-0cf3-4767-9609-501fa4962856","projectUrl":"https://app.snyk.io/org/significant-gravitas/project/3d924968-0cf3-4767-9609-501fa4962856?utm_source=github&utm_medium=referral&page=fix-pr","prType":"fix","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["updated-fix-title","pr-warning-shown"],"type":"auto","upgrade":["SNYK-JS-NEXT-14173355"],"vulns":["SNYK-JS-NEXT-14173355"],"patch":[],"isBreakingChange":false,"remediationStrategy":"vuln"}'
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Upgrades Next.js from 15.4.7 to 15.4.8 in the frontend and updates
lockfile/transitive references accordingly.
>
> - **Dependencies**:
> - Bump `next` to `15.4.8` in `autogpt_platform/frontend/package.json`.
> - Update lockfile to align, including `@next/*` SWC binaries and
packages that peer-depend on `next` (e.g., `@sentry/nextjs`,
`@storybook/nextjs`, `@vercel/*`, `geist`, `nuqs`,
`@next/third-parties`).
> - Minor transitive tweak: `sharp` dependency `semver` updated to
`7.7.3`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
6d8906ced7 |
fix(frontend): summary card layout (#11556)
## Changes 🏗️ - Make it less verbose and adapt the summary card to the new design ## 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] Run locally and see summary displaying well |
||
|
|
bf32a76f49 |
fix(frontend): prevent NodeHandle error when array schema items is undefined (#11549)
- Added conditional rendering in `NodeArrayInput` component to only
render `NodeHandle` when `schema.items` is defined
- This prevents the error when array schemas don't have an `items`
property defined
- The input field rendering logic already had proper null checks, so
only the handle rendering needed to be fixed
### 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] Open the legacy builder and create a new agent
- [x] Add a Smart Decision block to the agent
- [x] Verify that the `conversation_history` field renders without
errors
- [x] Verify that array fields with defined `items` still render
correctly (e.g., test with other blocks that use arrays)
- [x] Verify that connecting/disconnecting handles to the
conversation_history field works correctly
- [x] Verify that the field can accept input values when not connected
|
||
|
|
f7a8e372dd |
feat(frontend): implement new actions sidebar + summary (#11545)
## Changes 🏗️ <img width="800" height="767" alt="Screenshot 2025-12-04 at 17 40 10" src="https://github.com/user-attachments/assets/37036246-bcdb-46eb-832c-f91fddfd9014" /> <img width="800" height="492" alt="Screenshot 2025-12-04 at 17 40 16" src="https://github.com/user-attachments/assets/ba547e54-016a-403c-9ab6-99465d01af6b" /> On the new Agent Library page: - Implement the new actions sidebar ( main change... ) - Refactor the layout/components to accommodate that - Implement the missing "Summary" functionality - Update icon buttons in Design system with new designs ## 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] Run the app locally and test it |
||
|
|
3ccc712463 |
feat(frontend): add host-scoped credentials support to CredentialField (#11546)
### Changes 🏗️ This PR adds support for `host_scoped` credential type in the new builder's `CredentialField` component. This enables blocks that require sensitive headers for custom API endpoints to configure host-scoped credentials directly from the credential field. <img width="745" height="843" alt="Screenshot 2025-12-04 at 4 31 09 PM" src="https://github.com/user-attachments/assets/d076b797-64c4-4c31-9c88-47a064814055" /> <img width="418" height="180" alt="Screenshot 2025-12-04 at 4 36 02 PM" src="https://github.com/user-attachments/assets/b4fa6d8d-d8f4-41ff-ab11-7c708017f8fd" /> **Key changes:** - **Added `HostScopedCredentialsModal` component** (`models/HostScopedCredentialsModal/`) - Modal dialog for creating host-scoped credentials with host pattern, optional title, and dynamic header pairs (key-value) - Auto-populates host from discriminator value (URL field) when available - Supports adding/removing multiple header pairs with validation - **Enhanced credential filtering logic** (`helpers.ts`) - Updated `filterCredentialsByProvider` to accept `schema` and `discriminatorValue` parameters - Added intelligent filtering for: - Credential types supported by the block - OAuth credentials with sufficient scopes - Host-scoped credentials matched by host from discriminator value - Extracted `getDiscriminatorValue` helper function for reusability - **Updated `CredentialField` component** - Added `supportsHostScoped` check in `useCredentialField` hook - Conditionally renders `HostScopedCredentialsModal` when `supportsHostScoped && discriminatorValue` is true - Exports `discriminatorValue` for use in child components - **Updated `useCredentialField` hook** - Calculates `discriminatorValue` using new `getDiscriminatorValue` helper - Passes `schema` and `discriminatorValue` to enhanced `filterCredentialsByProvider` function - Returns `supportsHostScoped` and `discriminatorValue` for component consumption **Technical details:** - Host extraction uses `getHostFromUrl` utility to parse host from discriminator value (URL) - Header pairs are managed as state with add/remove functionality - Form validation uses `react-hook-form` with `zod` schema - Credential creation integrates with existing API endpoints and query invalidation ### Checklist 📋 - [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] Verify `HostScopedCredentialsModal` appears when block supports `host_scoped` credentials and discriminator value is present - [x] Test host auto-population from discriminator value (URL field) - [x] Test manual host entry when discriminator value is not available - [x] Test adding/removing multiple header pairs - [x] Test form validation (host required, empty header pairs filtered out) - [x] Test credential creation and successful toast notification - [x] Verify credentials list refreshes after creation - [x] Test host-scoped credential filtering matches credentials by host from URL - [x] Verify existing credential types (api_key, oauth2, user_password) still work correctly - [x] Test OAuth scope filtering still works as expected - [x] Verify modal only shows when `supportsHostScoped && discriminatorValue` conditions are met |
||
|
|
2b9816cfa5 |
fix(frontend): ensure node selection state is set before copying in context menu (#11535)
<!-- Clearly explain the need for these changes: -->
Fixes an issue where copying a node via the context menu dialog fails on
the first attempt in a new session. The problem occurs because the node
selection state update and the copy operation happen in quick
succession, causing a race condition where `copySelectedNodes()` reads
the store before the selection state is properly updated.
### Checklist 📋
- [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] Start a new browser session (or clear storage)
- [x] Open the flow editor
- [x] Right-click on a node and select "Copy Node" from the context menu
- [x] Verify the node is successfully copied on the first attempt
|
||
|
|
4e87f668e3 |
feat(frontend): add file input widget with variants and base64 support (#11533)
<!-- Clearly explain the need for these changes: --> This PR enhances the FileInput component to support multiple variants and modes, and integrates it into the form renderer as a file widget. The changes enable a more flexible file input experience with both server upload and local base64 conversion capabilities. ### Compact one <img width="354" height="91" alt="Screenshot 2025-12-03 at 8 05 51 PM" src="https://github.com/user-attachments/assets/1295a34f-4d9f-4a65-89f2-4b6516f176ff" /> <img width="386" height="96" alt="Screenshot 2025-12-03 at 8 06 11 PM" src="https://github.com/user-attachments/assets/3c10e350-8ddc-43ff-bf0a-68b23f8db394" /> ## Default one <img width="671" height="165" alt="Screenshot 2025-12-03 at 8 05 08 PM" src="https://github.com/user-attachments/assets/bd17c5f1-8cdb-4818-9850-a9e61252d8c1" /> <img width="656" height="141" alt="Screenshot 2025-12-03 at 8 05 21 PM" src="https://github.com/user-attachments/assets/1edf260f-6245-44b9-bd3e-dd962f497413" /> ### Changes 🏗️ #### FileInput Component Enhancements - **Added variant support**: Introduced `default` and `compact` variants - `default`: Full-featured UI with drag & drop, progress bar, and storage note - `compact`: Minimal inline design suitable for tight spaces like node inputs - **Added mode support**: Introduced `upload` and `base64` modes - `upload`: Uploads files to server (requires `onUploadFile` and `uploadProgress`) - `base64`: Converts files to base64 locally without server upload - **Improved type safety**: Refactored props using discriminated unions (`UploadModeProps | Base64ModeProps`) to ensure type-safe usage - **Enhanced file handling**: Added `getFileLabelFromValue` helper to extract file labels from base64 data URIs or file paths - **Better UX**: Added `showStorageNote` prop to control visibility of storage disclaimer #### FileWidget Integration - **Replaced legacy Input**: Migrated from legacy `Input` component to new `FileInput` component - **Smart variant selection**: Automatically selects `default` or `compact` variant based on form context size - **Base64 mode**: Uses base64 mode for form inputs, eliminating need for server uploads in builder context - **Improved accessibility**: Better disabled/readonly state handling with visual feedback #### Form Renderer Updates - **Disabled validation**: Added `noValidate={true}` and `liveValidate={false}` to prevent premature form validation #### Storybook Updates - **Expanded stories**: Added comprehensive stories for all variant/mode combinations: - `Default`: Default variant with upload mode - `Compact`: Compact variant with base64 mode - `CompactWithUpload`: Compact variant with upload mode - `DefaultWithBase64`: Default variant with base64 mode - **Improved documentation**: Updated component descriptions to clearly explain variants and modes ### 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] Test FileInput component in Storybook with all variant/mode combinations - [x] Test file upload flow in default variant with upload mode - [x] Test base64 conversion in compact variant with base64 mode - [x] Test file widget in form renderer (node inputs) - [x] Test file type validation (accept prop) - [x] Test file size validation (maxFileSize prop) - [x] Test error handling for invalid files - [x] Test disabled and readonly states - [x] Test file clearing/removal functionality - [x] Verify compact variant renders correctly in tight spaces - [x] Verify default variant shows storage note only in upload mode - [x] Test drag & drop functionality in default variant |
||
|
|
729400dbe1 |
feat(frontend): display graph validation errors inline on node fields (#11524)
When running a graph in the new builder, validation errors were only displayed in toast notifications, making it difficult for users to identify which specific fields had errors. Users needed to see validation errors directly next to the problematic fields within each node for better UX and faster debugging. <img width="1319" height="953" alt="Screenshot 2025-12-03 at 12 48 15 PM" src="https://github.com/user-attachments/assets/d444bc71-9bee-4fa7-8b7f-33339bd0cb24" /> ### Changes 🏗️ - **Error handling in graph execution** (`useRunGraph.ts`): - Added detection for graph validation errors using `ApiError.isGraphValidationError()` - Parse and store node-level errors from backend validation response - Clear all node errors on successful graph execution - Enhanced toast messages to guide users to fix validation errors on highlighted nodes - **Node store error management** (`nodeStore.ts`): - Added `errors` field to node data structure - Implemented `updateNodeErrors()` to set errors for a specific node - Implemented `clearNodeErrors()` to remove errors from a specific node - Implemented `getNodeErrors()` to retrieve errors for a specific node - Implemented `setNodeErrorsForBackendId()` to set errors by backend ID (supports matching by `metadata.backend_id` or node `id`) - Implemented `clearAllNodeErrors()` to clear all node errors across the graph - **Visual error indication** (`CustomNode.tsx`, `NodeContainer.tsx`): - Added error detection logic to identify both configuration errors and output errors - Applied error styling to nodes with validation errors (using `FAILED` status styling) - Nodes with errors now display with red border/ring to visually indicate issues - **Field-level error display** (`FieldTemplate.tsx`): - Fetch node errors from store for the current node - Match field IDs with error keys (handles both underscore and dot notation) - Display field-specific error messages below each field in red text - Added helper function `getFieldErrorKey()` to normalize field IDs for error matching - **Utility helpers** (`helpers.ts`): - Created `getFieldErrorKey()` function to extract field key from field ID (removes `root_` prefix) ### 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] Create a graph with multiple nodes and intentionally leave required fields empty - [x] Run the graph and verify that validation errors appear in toast notification - [x] Verify that nodes with errors are highlighted with red border/ring styling - [x] Verify that field-specific error messages appear below each problematic field in red text - [x] Verify that error messages handle both underscore and dot notation in field keys - [x] Fix validation errors and run graph again - verify errors are cleared - [x] Verify that successful graph execution clears all node errors - [x] Test with nodes that have `backend_id` in metadata vs nodes without - [x] Verify that nodes without errors don't show error styling - [x] Test with nested fields and array fields to ensure error matching works correctly |
||
|
|
f6608e99c8 |
feat(frontend): add expandable text input modal for better editing experience (#11510)
Text inputs in the form builder can be difficult to edit when dealing with longer content. Users need a way to expand text inputs into a larger, more comfortable editing interface, especially for multi-line text, passwords, and longer string values. https://github.com/user-attachments/assets/443bf4eb-c77c-4bf6-b34c-77091e005c6d ### Changes 🏗️ - **Added `InputExpanderModal` component**: A new modal component that provides a larger textarea (300px min-height) for editing text inputs with the following features: - Copy-to-clipboard functionality with visual feedback (checkmark icon) - Toast notification on successful copy - Auto-focus on open for better UX - Proper state management to reset values when modal opens/closes - **Enhanced `TextInputWidget`**: - Added expand button (ArrowsOutIcon) with tooltip for text, password, and textarea input types - Button appears inline next to the input field - Integrated the new `InputExpanderModal` component - Improved layout with flexbox to accommodate the expand button - Added padding-right to input when expand button is visible to prevent text overlap - **Refactored file structure**: - Moved `TextInputWidget.tsx` into `TextInputWidget/` directory - Updated import path in `widgets/index.ts` - **UX improvements**: - Expand button only shows for applicable input types (text, password, textarea) - Number and integer inputs don't show expand button (not needed) - Modal preserves schema title, description, and placeholder for context ### 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] Test expand button appears for text input fields - [x] Test expand button appears for password input fields - [x] Test expand button appears for textarea fields - [x] Test expand button does NOT appear for number/integer inputs - [x] Test clicking expand button opens modal with current value - [x] Test editing text in modal and saving updates the input field - [x] Test cancel button closes modal without saving changes - [x] Test copy-to-clipboard button copies text and shows success state - [x] Test toast notification appears on successful copy - [x] Test modal resets to original value when reopened - [x] Test modal auto-focuses textarea on open - [x] Test expand button tooltip displays correctly - [x] Test input field layout with expand button (no text overlap) |
||
|
|
78c2245269 |
feat(frontend): add automatic collision resolution for flow editor nodes (#11506)
When users drag and drop nodes in the new flow editor, nodes can overlap with each other, making the graph difficult to read and interact with. This PR adds an automatic collision resolution algorithm that runs when a node is dropped, ensuring nodes are automatically separated to prevent overlaps and maintain a clean, readable graph layout. ### Changes 🏗️ - **Added collision resolution algorithm** (`resolve-collision.ts`): - Implements an iterative collision detection and resolution system using Flatbush for efficient spatial indexing - Automatically resolves overlaps by moving nodes apart along the axis with the smallest overlap - Configurable options: `maxIterations`, `overlapThreshold`, and `margin` - Uses actual node dimensions (`width`, `height`, or `measured` values) when available - **Integrated collision resolution into Flow component**: - Added `onNodeDragStop` callback that triggers collision resolution after a node is dropped - Configured with `maxIterations: Infinity`, `overlapThreshold: 0.5`, and `margin: 15px` - **Enhanced node dimension handling**: - Updated `nodeStore.ts` to prioritize actual node dimensions (`node.width`, `node.measured.width`) over hardcoded defaults when calculating positions - Ensures collision detection uses accurate node sizes - **Added dependency**: - Added `flatbush@4.5.0` for efficient spatial indexing and collision detection ### 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] Drag a node and drop it on top of another node - verify nodes automatically separate - [x] Drag multiple nodes to create overlapping clusters - verify all overlaps are resolved - [x] Drag nodes with different sizes (NOTE blocks vs regular blocks) - verify collision detection uses correct dimensions - [x] Drag nodes near the edge of the canvas - verify nodes don't get pushed off-screen - [x] Test with a graph containing many nodes (20+) - verify performance is acceptable - [x] Verify nodes maintain their positions when no collisions occur - [x] Test with nodes that have custom measured dimensions - verify accurate collision detection |
||
|
|
113df689dc |
feat(platform): Improve Google Sheets/Drive integration with unified credentials (#11520)
Simplifies and improves the Google Sheets/Drive integration by merging
credentials with the file picker and using narrower OAuth scopes.
### Changes 🏗️
- Merge Google credentials and file picker into a single unified input
field for better UX
- Create spreadsheets using Drive API instead of Sheets API for proper
scope support
- Simplify Google Drive OAuth scope to only use `drive.file` (narrowest
permission needed)
- Clean up unused imports (NormalizedPickedFile)
### 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] Test creating a new Google Spreadsheet with
GoogleSheetsCreateSpreadsheetBlock
- [x] Test reading from existing spreadsheets with GoogleSheetsReadBlock
- [x] Test writing to spreadsheets with GoogleSheetsWriteBlock
- [x] Verify OAuth flow works with simplified scopes
- [x] Verify file picker works with merged credentials field
#### For configuration changes:
- [x] `.env.default` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Unifies Google Drive picker and credentials with auto-credentials
across backend and frontend, updates all Sheets blocks and execution to
use it, and adds Drive-based spreadsheet creation plus supporting tests
and UI fixes.
>
> - **Backend**:
> - **Google Drive model/field**: Introduce `GoogleDriveFile` (with
`_credentials_id`) and `GoogleDriveFileField()` for unified auth+picker
(`backend/blocks/google/_drive.py`).
> - **Sheets blocks**: Replace `GoogleDrivePickerField` and explicit
credentials with `GoogleDriveFileField` across all Sheets blocks;
preserve and emit credentials for chaining; add Drive service; create
spreadsheets via Drive API then manage via Sheets API.
> - **IO block**: Add `AgentGoogleDriveFileInputBlock` providing a Drive
picker input.
> - **Execution**: Support auto-generated credentials via
`BlockSchema.get_auto_credentials_fields()`; acquire/release multiple
credential locks; pass creds by `credentials_kwarg`
(`executor/manager.py`, `data/block.py`, `util/test.py`).
> - **Tests**: Add validation tests for duplicate/unique
`auto_credentials.kwarg_name` and defaults.
> - **Frontend**:
> - **Picker**: Enhance Google Drive picker to require/use saved
platform credentials, pass `_credentials_id`, validate scopes, and
manage dialog z-index/interaction; expose `requirePlatformCredentials`.
> - **UI**: Update dialogs/CSS to keep Google picker on top and prevent
overlay interactions.
> - **Types**: Extend `GoogleDrivePickerConfig` with `auto_credentials`
and related typings.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
f1c6c94636 |
ci(frontend): fix concurrency groups (#11551)
## Changes 🏗️ Fix concurrency grouping on Front-end workflows. ## 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] We will see once merged |
||
|
|
6588110bf2 |
fix(frontend): forward X-API-Key header through proxy (#11530)
The Next.js API proxy was stripping the X-API-Key header when forwarding requests to the backend, causing API key authentication to fail in environments where requests go through the proxy (e.g., dev environment). ### Changes 🏗️ - Updated `createRequestHeaders()` in `frontend/src/lib/autogpt-server-api/helpers.ts` to forward the `X-API-Key` header from the original request to the backend ### 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] Verify API key authentication works when requests go through the Next.js proxy - [x] Verify existing authentication (Authorization header) still works - [x] Verify admin impersonation header forwarding still works #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) No configuration changes required. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
bfbd4eee53 |
ci(frontend): concurrency optimizations (#11525)
## Changes 🏗️ Added the same concurrency optimisation to the Front-end and Fullstack CI workflows. It will: - Cancel in-progress runs when a new workflow starts for the same branch/PR - Reduce CI costs by avoiding redundant runs - Ensure only the latest workflow runs - Both workflows now use the same concurrency strategy to optimise CI billing. ## 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] We will see as we push commits... |
||
|
|
7b93600973 | fix duplicate promethues metrics | ||
|
|
02d9ff8db2 |
fix(frontend): improve error message extraction in agent execution error handler (#11527)
When agent execution fails, the error toast was only showing `error.message`, which often lacks detail. The API returns more specific error messages in `error.response.detail.message`, but these weren't being displayed to users, making debugging harder. <img width="1018" height="796" alt="Screenshot 2025-12-03 at 2 14 17 PM" src="https://github.com/user-attachments/assets/6a93aed9-9e18-450a-9995-8760d7d5ca35" /> ### Changes 🏗️ - Updated error message extraction in `useAgentRunModal` to check `error.response.detail.message` first, then fall back to `error.message`, then to the default message - This ensures users see the most specific error message available from the API response ### 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] Triggered an agent execution error (e.g., invalid inputs) and verified the toast shows the detailed error message from `error.response.detail.message` - [x] Verified fallback to `error.message` when `error.response.detail.message` is not available - [x] Verified fallback to default message when neither is available |
||
|
|
b4a69c49a1 |
feat(frontend): use websockets on new library page + fixes (#11526)
## Changes 🏗️ <img width="800" height="614" alt="Screenshot 2025-12-03 at 14 52 46" src="https://github.com/user-attachments/assets/c7012d7a-96d4-4268-a53b-27f2f7322a39" /> - Create a new `useExecutionEvents()` hook that can be used to subscribe to agent executions - now both the **Activity Dropdown** and the new **Library Agent Page** use that - so subscribing to executions is centralised on a single place - Apply a couple of design fixes - Fix not being able to select the new templates tab ## 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] Run the app locally and verify the above |
||
|
|
e62a8fb572 |
feat(frontend): design updates on new library page... (#11522)
## Changes 🏗️ ### Design updates Design updates on the new Library page. New empty views with illustration and overall changes on the sidebar and selected run sections... <img width="800" height="871" alt="Screenshot 2025-12-03 at 14 03 45" src="https://github.com/user-attachments/assets/6970af99-dda8-4cd8-a9b5-97fe5ee2032e" /> <img width="800" height="844" alt="Screenshot 2025-12-03 at 14 03 52" src="https://github.com/user-attachments/assets/92e6af79-db9f-4098-961f-9ae3b3300ffa" /> <img width="800" height="816" alt="Screenshot 2025-12-03 at 14 03 57" src="https://github.com/user-attachments/assets/7e23e612-b446-4c53-8ea2-f0e2b1574ec3" /> <img width="800" height="862" alt="Screenshot 2025-12-03 at 14 04 07" src="https://github.com/user-attachments/assets/e3398232-e74b-4a06-8702-30a96862dc00" /> ### Architecture - Make selected tabs/items synced with the URL via `?activeTab=` and `?activeItem=`, so it is easy and predictable to change their state... - Some minor updates on the design system I missed on previous PRs ... ## 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] Run the app locally and check the new page ( still wip ) |
||
|
|
233ff40a24 |
fix(frontend/marketplace): Fix rendering creator links without schema (#11516)
- [OPEN-2871: TypeError: URL constructor: www.agpt.co is not a valid URL.](https://linear.app/autogpt/issue/OPEN-2871/typeerror-url-constructor-wwwagptco-is-not-a-valid-url) - [Sentry Issue BUILDER-56D: TypeError: URL constructor: www.agpt.co is not a valid URL.](https://significant-gravitas.sentry.io/issues/7081476631/) ### Changes 🏗️ - Amend URL handling in `CreatorLinks` to correctly handle URLs with implicit schema ### 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: - Trivial change, CI is sufficientautogpt-platform-beta-v0.6.39 |
||
|
|
fa567991b3 |
fix(backend): Handle HTTP errors in HTTP block by returning response objects (#11515)
### Changes 🏗️
- Modify the HTTP block to handle HTTP errors (4xx, 5xx) by returning
response objects instead of raising exceptions.
- This allows proper handling of client_error and server_error outputs.
Fixes
[AUTOGPT-SERVER-6VP](https://sentry.io/organizations/significant-gravitas/issues/7023985892/).
The issue was that: HTTP errors are raised as exceptions by `Requests`
default behavior, bypassing the block's intended error output handling,
resulting in `BlockUnknownError`.
This fix was generated by Seer in Sentry, triggered by Nicholas Tindle.
👁️ Run ID: 4902617
Not quite right? [Click here to continue debugging with
Seer.](https://sentry.io/organizations/significant-gravitas/issues/7023985892/?seerDrawer=true)
### 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:
<!-- Put your test plan here: -->
- [x] Tested with a service that will return 4XX and 5XX errors to make
sure the correct paths are followed
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> HTTP block now returns 4xx/5xx responses instead of raising, and
Requests gains retry_max_attempts with last-result handling.
>
> - **Backend**
> - **HTTP block (`backend/blocks/http.py`)**:
> - Use `Requests(raise_for_status=False, retry_max_attempts=1)` so
4xx/5xx return response objects and route to
`client_error`/`server_error` outputs.
> - **HTTP client util (`backend/util/request.py`)**:
> - Add `retry_max_attempts` option with `stop_after_attempt` and
`_return_last_result` to return the final response when retries stop.
> - Build `tenacity` retry config dynamically in `Requests.request()`;
validate `retry_max_attempts >= 1` when provided.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
2cb6fd581c |
feat(platform): Integration management from external api (#11472)
Allow the external api to manage credentials
### Changes 🏗️
- add ability to external api to manage credentials
### 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:
<!-- Put your test plan here: -->
- [x] tested it works
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces external API endpoints to manage integrations (OAuth
initiation/completion and credential CRUD), adds external OAuth state
fields, and new API key permissions/config.
>
> - **External API – Integrations**:
> - Add router `backend/server/external/routes/integrations.py` with
endpoints to:
> - `GET /v1/integrations/providers` list providers (incl. default
scopes)
> - `POST /v1/integrations/{provider}/oauth/initiate` and `POST
/oauth/complete` for external OAuth (custom callback, state)
> - `GET /v1/integrations/credentials` and `GET /{provider}/credentials`
to list credentials
> - `POST /{provider}/credentials` to create `api_key`, `user_password`,
`host_scoped` creds; `DELETE /{provider}/credentials/{cred_id}` to
delete
> - Wire router in `backend/server/external/api.py`.
> - **Auth/Permissions**:
> - Add `APIKeyPermission` values: `MANAGE_INTEGRATIONS`,
`READ_INTEGRATIONS`, `DELETE_INTEGRATIONS` (schema + migration +
OpenAPI).
> - **Data model / Store**:
> - Extend `OAuthState` with external-flow fields: `callback_url`,
`state_metadata`, `api_key_id`, `is_external`.
> - Update `IntegrationCredentialsStore.store_state_token(...)` to
accept/store external OAuth metadata.
> - **OAuth providers**:
> - Set GitHub handler `DEFAULT_SCOPES = ["repo"]` in
`integrations/oauth/github.py`.
> - **Config**:
> - Add `config.external_oauth_callback_origins` in
`backend/util/settings.py` to validate allowed OAuth callback origins.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
55af799083 |
fix(blocks): clamp Twitter search start_time to 10 seconds before now (#11461)
## Summary - Clamp `start_time` to at least 10 seconds before request time (Twitter API requirement) - Update input description to document this automatic adjustment - Fix `serialize_list` to handle `None` data gracefully (exposed by the fix) ## Background Twitter API returns `400 Bad Request` when `start_time` is less than 10 seconds before the request time. Users providing current/future times would hit this error. **Sentry Issue:** [BUILDER-3PG](https://significant-gravitas.sentry.io/issues/6919685270/) ## Affected Blocks - `TwitterSearchRecentTweetsBlock` - `TwitterGetUserMentionsBlock` - `TwitterGetHomeTimelineBlock` - `TwitterGetUserTweetsBlock` ## Test plan - [x] Tested `TwitterSearchRecentTweetsBlock` with current time as `start_time` - [x] Verified clamping works and API call succeeds - [x] Verified "No tweets found" is returned correctly when search window has no results 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
6590fcb76f |
fix(backend): fix broken update_agent_version_in_library and reduce the method code duplication (#11514)
## Summary
Fix broken `update_agent_version_in_library` functionality by eagerly
loading `AgentGraph` while loading the library, also consolidating
duplicate code that updates agent version in library and configures HITL
safe mode settings.
## Problem
The `update_agent_version_in_library` is currently failed with this
error:
```
File "/Users/abhi/Documents/AutoGPT/autogpt_platform/backend/backend/server/v2/library/model.py", line 110, in from_db
raise ValueError("Associated Agent record is required.")
ValueError: Associated Agent record is required.
```
also logic was duplicated across two router endpoints with identical
implementations, creating maintenance burden and potential for
inconsistencies.
## Changes Made
### Created Helper Method
- Add `_update_library_agent_version_and_settings()` helper function
- Fixes broken `update_agent_version_in_library` by centralizing the
logic
- Uses proper error handling and settings merging with `model_copy()`
### Replaced Duplicate Code
- **In `update_graph` function** (v1.py:863) - replaced 13 lines with
single helper call
- **In `set_graph_active_version` function** (v1.py:920) - replaced 13
lines with single helper call
### Benefits
- **Fixes broken functionality**: Centralizes
`update_agent_version_in_library` logic
- **DRY Principle**: Eliminates code duplication across two router
endpoints
- **Maintainability**: Single place to modify the library agent update
logic
- **Consistency**: Ensures both endpoints use identical logic for HITL
safe mode configuration
- **Readability**: Cleaner, more focused endpoint implementations
## Technical Details
The helper method fixes broken `update_agent_version_in_library` by
handling:
1. Updating agent version in library via
`update_agent_version_in_library()`
2. Conditionally setting `human_in_the_loop_safe_mode: true` if graph
has HITL blocks and setting is not already configured
3. Proper settings merging to preserve existing configuration
## Testing
- [x] Code compiles and passes type checking
- [x] Pre-commit hooks pass (linting, formatting, type checking)
- [x] Both affected endpoints maintain same functionality with cleaner
implementation
Fixes broken duplicate code identified in v1.py router endpoints for
`update_agent_version_in_library`.
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
f987937046 |
fix(frontend): prune empty values from node inputs and fix object editor connection detection (#11507)
This PR addresses two issues: 1. **Empty values being sent to backend**: Node inputs were including empty strings, null, and undefined values when converting to backend format, causing unnecessary data to be sent. 2. **Incorrect connection detection in ObjectEditor**: The component was checking if the parent field was connected instead of checking individual key-value pairs, causing incorrect UI state for dynamic properties. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - **nodeStore.ts**: Added `pruneEmptyValues` utility to remove empty/null/undefined values from `hardcodedValues` before converting nodes to backend format. This ensures only meaningful input values are sent to the backend API. - **ObjectEditorWidget.tsx**: - Removed unused `fieldKey` prop from component interface - Fixed connection detection logic to check individual key-value handle IDs instead of the parent field key, ensuring correct connection state for each dynamic property in object editors ### 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] Create a node with object input fields and verify empty values are not sent to backend - [x] Add multiple key-value pairs to an object editor widget - [x] Connect individual key-value pairs via handles and verify connection state is correctly displayed - [x] Disconnect a key-value pair and verify the input field becomes editable - [x] Save and reload an agent with object inputs to verify empty values are pruned correctly - [x] Verify that non-empty values are still correctly preserved and sent to backend |