mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-22 21:48:12 -05:00
a37f7efbdf0242233d0afe81908217039baa7dad
7747 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a37f7efbdf | feat(frontend): refactor chat UX | ||
|
|
e2ae6086c9 | chore: improvements | ||
|
|
1108f74359 | Merge remote-tracking branch 'origin/dev' into fix/frontend-chat-things | ||
|
|
c1a1767034 |
feat(docs): Add block documentation auto-generation system (#11707)
- Add generate_block_docs.py script that introspects block code to
generate markdown
- Support manual content preservation via <!-- MANUAL: --> markers
- Add migrate_block_docs.py to preserve existing manual content from git
HEAD
- Add CI workflow (docs-block-sync.yml) to fail if docs drift from code
- Add Claude PR review workflow (docs-claude-review.yml) for doc changes
- Add manual LLM enhancement workflow (docs-enhance.yml)
- Add GitBook configuration (.gitbook.yaml, SUMMARY.md)
- Fix non-deterministic category ordering (categories is a set)
- Add comprehensive test suite (32 tests)
- Generate docs for 444 blocks with 66 preserved manual sections
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
<!-- 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] Extensively test code generation for the docs pages
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces an automated documentation pipeline for blocks and
integrates it into CI.
>
> - Adds `scripts/generate_block_docs.py` (+ tests) to introspect blocks
and generate `docs/integrations/**`, preserving `<!-- MANUAL: -->`
sections
> - New CI workflows: **docs-block-sync** (fails if docs drift),
**docs-claude-review** (AI review for block/docs PRs), and
**docs-enhance** (optional LLM improvements)
> - Updates existing Claude workflows to use `CLAUDE_CODE_OAUTH_TOKEN`
instead of `ANTHROPIC_API_KEY`
> - Improves numerous block descriptions/typos and links across backend
blocks to standardize docs output
> - Commits initial generated docs including
`docs/integrations/README.md` and many provider/category pages
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
1b56ff13d9 | test | ||
|
|
9b98b2df40 | chore: wip | ||
|
|
f31c160043 |
feat(platform): add endedAt field and fix execution analytics timestamps (#11759)
## Summary
This PR adds proper execution end time tracking and fixes timestamp
handling throughout the execution analytics system.
### Key Changes
1. **Added `endedAt` field to database schema** - Executions now have a
dedicated field for tracking when they finish
2. **Fixed timestamp nullable handling** - `started_at` and `ended_at`
are now properly nullable in types
3. **Fixed chart aggregation** - Reduced threshold from ≥3 to ≥1
executions per day
4. **Improved timestamp display** - Moved timestamps to expandable
details section in analytics table
5. **Fixed nullable timestamp bugs** - Updated all frontend code to
handle null timestamps correctly
## Problem Statement
### Issue 1: Missing Execution End Times
Previously, executions used `updatedAt` (last DB update) as a proxy for
"end time". This broke when adding correctness scores retroactively -
the end time would change to whenever the score was added, not when the
execution actually finished.
### Issue 2: Chart Shows Only One Data Point
The accuracy trends chart showed only one data point despite having
executions across multiple days. Root cause: aggregation required ≥3
executions per day.
### Issue 3: Incorrect Type Definitions
Manually maintained types defined `started_at` and `ended_at` as
non-nullable `Date`, contradicting reality where QUEUED executions
haven't started yet.
## Solution
### Database Schema (`schema.prisma`)
```prisma
model AgentGraphExecution {
// ...
startedAt DateTime?
endedAt DateTime? // NEW FIELD
// ...
}
```
### Execution Lifecycle
- **QUEUED**: `startedAt = null`, `endedAt = null` (not started)
- **RUNNING**: `startedAt = set`, `endedAt = null` (in progress)
- **COMPLETED/FAILED/TERMINATED**: `startedAt = set`, `endedAt = set`
(finished)
### Migration Strategy
```sql
-- Add endedAt column
ALTER TABLE "AgentGraphExecution" ADD COLUMN "endedAt" TIMESTAMP(3);
-- Backfill ONLY terminal executions (prevents marking RUNNING executions as ended)
UPDATE "AgentGraphExecution"
SET "endedAt" = "updatedAt"
WHERE "endedAt" IS NULL
AND "executionStatus" IN ('COMPLETED', 'FAILED', 'TERMINATED');
```
## Changes by Component
### Backend
**`schema.prisma`**
- Added `endedAt` field to `AgentGraphExecution`
**`execution.py`**
- Made `started_at` and `ended_at` optional with Field descriptions
- Updated `from_db()` to use `endedAt` instead of `updatedAt`
- `update_graph_execution_stats()` sets `endedAt` when status becomes
terminal
**`execution_analytics_routes.py`**
- Removed `created_at`/`updated_at` from `ExecutionAnalyticsResult` (DB
metadata, not execution data)
- Kept only `started_at`/`ended_at` (actual execution runtime)
- Made settings global (avoid recreation)
- Moved OpenAI key validation to `_process_batch` (only check when LLM
actually runs)
**`analytics.py`**
- Fixed aggregation: `COUNT(*) >= 1` (was 3) - include all days with ≥1
execution
- Uses `createdAt` for chart grouping (when execution was queued)
**`late_execution_monitor.py`**
- Handle optional `started_at` with fallback to `datetime.min` for
sorting
- Display "Not started" when `started_at` is null
### Frontend
**Type Definitions**
- Fixed manually maintained `types.ts`: `started_at: Date | null` (was
non-nullable)
- Generated types were already correct
**Analytics Components**
- `AnalyticsResultsTable.tsx`: Show only `started_at`/`ended_at` in
2-column expandable grid
- `ExecutionAnalyticsForm.tsx`: Added filter explanation UI
**Monitoring Components** - Fixed null handling bugs:
- `OldAgentLibraryView.tsx`: Handle null in reduce function
- `agent-runs-selector-list.tsx`: Safe sorting with `?.getTime() ?? 0`
- `AgentFlowList.tsx`: Filter/sort with null checks
- `FlowRunsStatus.tsx`: Filter null timestamps
- `FlowRunsTimeline.tsx`: Filter executions with null timestamps before
rendering
- `monitoring/page.tsx`: Safe sorting
- `ActivityItem.tsx`: Fallback to "recently" for null timestamps
## Benefits
✅ **Accurate End Times**: `endedAt` is frozen when execution finishes,
not updated later
✅ **Type Safety**: Nullable types match reality, exposing real bugs
✅ **Better UX**: Chart shows all days with data (not just days with ≥3
executions)
✅ **Bug Fixes**: 7+ frontend components now handle null timestamps
correctly
✅ **Documentation**: Field descriptions explain when timestamps are null
## Testing
### Backend
```bash
cd autogpt_platform/backend
poetry run format # ✅ All checks passed
poetry run lint # ✅ All checks passed
```
### Frontend
```bash
cd autogpt_platform/frontend
pnpm format # ✅ All checks passed
pnpm lint # ✅ All checks passed
pnpm types # ✅ All type errors fixed
```
### Test Data Generation
Created script to generate 35 test executions across 7 days with
correctness scores:
```bash
poetry run python scripts/generate_test_analytics_data.py
```
## Migration Notes
⚠️ **Important**: The migration only backfills `endedAt` for executions
with terminal status (COMPLETED, FAILED, TERMINATED). Active executions
(QUEUED, RUNNING) correctly keep `endedAt = null`.
## Breaking Changes
None - this is backward compatible:
- `endedAt` is nullable, existing code that doesn't use it is unaffected
- Frontend already used generated types which were correct
- Migration safely backfills historical data
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces explicit execution end-time tracking and normalizes
timestamp handling across backend and frontend.
>
> - Adds `endedAt` to `AgentGraphExecution` (schema + migration);
backfills terminal executions; sets `endedAt` on terminal status updates
> - Makes `GraphExecutionMeta.started_at/ended_at` optional; updates
`from_db()` to use DB `endedAt`; exposes timestamps in
`ExecutionAnalyticsResult`
> - Moves OpenAI key validation into batch processing; instantiates
`Settings` once
> - Accuracy trends: reduce daily aggregation threshold to `>= 1`;
optional historical series
> - Monitoring/analytics UI: results table shows/export
`started_at`/`ended_at`; adds chart filter explainer
> - Frontend null-safety: update types (`Date | null`) and fix
sorting/filtering/rendering for nullable timestamps across monitoring
and library views
> - Late execution monitor: safe sorting/display when `started_at` is
null
> - OpenAPI specs updated for new/nullable fields
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
06550a87eb |
feat(backend): add missed default credentials (#11760)
### Changes 🏗️
**Fixed missing default credentials and provider name mismatch in the
credentials store:**
1. **Provider name correction** (`credentials_store.py:97-103`)
- Changed `provider="unreal"` → `provider="unreal_speech"` to match the
existing `unreal_speech_api_key` setting and block usage
- Updated title from "Use Credits for Unreal" → "Use Credits for Unreal
Speech" for clarity
2. **Added missing OpenWeatherMap credentials**
(`credentials_store.py:219-226`)
- New `openweathermap_credentials` definition with `APIKeyCredentials`
- Uses existing `settings.secrets.openweathermap_api_key` setting that
was previously defined but had no credential object
- Added to `DEFAULT_CREDENTIALS` list
3. **Fixed credentials not exposed in `get_all_creds()`**
(`credentials_store.py:343-354`)
- Added `llama_api_credentials` conditional append (was defined but not
returned to users)
- Added `v0_credentials` conditional append (was defined but not
returned to users)
- Added `openweathermap_credentials` conditional append
### 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 provider name `unreal_speech` matches block usage in
`text_to_speech_block.py`
- [x] Confirmed `openweathermap_api_key` setting exists in secrets
- [x] Confirmed `llama_api_key` and `v0_api_key` settings exist in
secrets
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Aligns backend credential definitions and exposes missing system
creds; updates frontend to hide new built-ins.
>
> - Backend `credentials_store.py`:
> - Corrects `provider` to `unreal_speech` and updates title
> - Adds `openweathermap_credentials`; includes in `DEFAULT_CREDENTIALS`
and `get_all_creds()` when key present
> - Ensures `llama_api_credentials` and `v0_credentials` are returned by
`get_all_creds()`
> - Frontend `integrations/page.tsx`:
> - Extends `hiddenCredentials` with IDs for `v0`, `webshare_proxy`, and
`openweathermap`
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
088b9998dc |
fix(frontend): Fix flaky agent-activity tests by targeting correct agent (#11790)
This PR fixes flaky agent-activity Playwright tests that were failing intermittently in CI. Closes #11789 ### Changes 🏗️ - **Navigate to specific agent by name**: Replace `LibraryPage.clickFirstAgent(page)` with `LibraryPage.navigateToAgentByName(page, "Test Agent")` to ensure we're testing the correct agent rather than relying on the first agent in the list - **Add retry mechanism for async data loading**: Replace direct visibility check with `expect(...).toPass({ timeout: 15000 })` pattern to properly handle asynchronous agent data fetching - **Increase timeout**: Extended timeout from 8000ms to 15000ms to accommodate slower CI environments ### 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 the test file syntax is correct - [x] Changes target the correct file (`autogpt_platform/frontend/src/tests/agent-activity.spec.ts`) - [x] The retry mechanism follows Playwright best practices using `toPass()` #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes (N/A - no config changes) - [x] `docker-compose.yml` is updated or already compatible with my changes (N/A - no config changes) - [x] I have included a list of my configuration changes in the PR description (under **Changes**) (N/A - no config changes) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Nicholas Tindle <ntindle@users.noreply.github.com> |
||
|
|
05c89fa5c0 | feat(claude): add vercel-react-best-practices skill (#11777) | ||
|
|
8cc8295f14 |
feat(backend): add agent generator tools for chat copilot (#11781)
This PR adds the ability to create and edit agents from natural language descriptions in the chat copilot. ### Changes 🏗️ - Added `agent_generator/` module with: - LLM client for OpenAI API calls - Core generation logic for decomposing goals and generating agent JSON - Fixer module to correct common LLM generation errors - Validator to ensure generated agents are structurally valid - Prompts for goal decomposition and agent generation - Utility functions for blocks info and agent saving - Added `CreateAgentTool` - creates new agents from natural language descriptions - Added `EditAgentTool` - edits existing agents using natural language patches - Added response models: `AgentPreviewResponse`, `AgentSavedResponse`, `ClarificationNeededResponse` - Registered new tools in the tools registry ### 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 `poetry run format` to ensure code passes linting - [x] Test creating an agent via chat with a natural language description - [x] Test editing an existing agent via chat |
||
|
|
e55f05c7a8 |
feat(backend): add chat search tools and BM25 reranking (#11782)
This PR adds new chat tools for searching blocks and documentation, along with BM25 reranking for improved search relevance. ### Changes 🏗️ **New Chat Tools:** - `find_block` - Search for available blocks by name/description using hybrid search - `run_block` - Execute a block directly with provided inputs and credentials - `search_docs` - Search documentation with section-level granularity - `get_doc_page` - Retrieve full documentation page content **Search Improvements:** - Added BM25 reranking to hybrid search for better lexical relevance - Documentation handler now chunks markdown by headings (##) for finer-grained embeddings - Section-based content IDs (`doc_path::section_index`) for precise doc retrieval - Startup embedding backfill in scheduler for immediate searchability **Other Changes:** - New response models for block and documentation search results - Updated orphan cleanup to handle section-based doc embeddings - Added `rank-bm25` dependency for BM25 scoring - Removed max message limit check in chat service ### 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 find_block tool to search for blocks (e.g., "current time") - [x] Run run_block tool to execute a found block - [x] Run search_docs tool to search documentation - [x] Run get_doc_page tool to retrieve full doc content - [x] Verify BM25 reranking improves search relevance for exact term matches - [x] Verify documentation sections are properly chunked and embedded #### 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**) **Dependencies added:** `rank-bm25` for BM25 scoring algorithm |
||
|
|
4a9b13acb6 |
feat(frontend): extract frontend changes from hackathon/copilot branch (#11717)
Frontend changes extracted from the hackathon/copilot branch for the copilot feature development. ### Changes 🏗️ - New Chat system with contextual components (`Chat`, `ChatDrawer`, `ChatContainer`, `ChatMessage`, etc.) - Form renderer system with RJSF v6 integration and new input renderers - Enhanced credentials management with improved OAuth flow and credential selection - New output renderers for various content types (Code, Image, JSON, Markdown, Text, Video) - Scrollable tabs component for better UI organization - Marketplace update notifications and publishing workflow improvements - Draft recovery feature with IndexedDB persistence - Safe mode toggle functionality - Various UI/UX improvements across the platform ### 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: - [ ] Test new Chat components functionality - [ ] Verify form renderer with various input types - [ ] Test credential management flows - [ ] Verify output renderers display correctly - [ ] Test draft recovery feature #### 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**) --------- Co-authored-by: Lluis Agusti <hi@llu.lu> |
||
|
|
5ff669e999 |
fix(backend): Make Redis connection lazy in cache module (#11775)
## Summary - Makes Redis connection lazy in the cache module - connection is only established when `shared_cache=True` is actually used - Fixes DatabaseManager failing to start because it imports `onboarding.py` which imports `cache.py`, triggering Redis connection at module load time even though it only uses in-memory caching ## Root Cause Commit `b01ea3fcb` (merged today) added `increment_onboarding_runs` to DatabaseManager, which imports from `onboarding.py`. That module imports `@cached` decorator from `cache.py`, which was creating a Redis connection at module import time: ```python # Old code - ran at import time! redis = Redis(connection_pool=_get_cache_pool()) ``` Since `onboarding.py` only uses `@cached(shared_cache=False)` (in-memory caching), it doesn't actually need Redis. But the import triggered the connection attempt. ## Changes - Wrapped Redis connection in a singleton class with lazy initialization - Connection is only established when `_get_redis()` is first called (i.e., when `shared_cache=True` is used) - Services using only in-memory caching can now import `cache.py` without Redis configuration ## Test plan - [ ] Services using `shared_cache=False` work without Redis configured - [ ] Services using `shared_cache=True` still work correctly with Redis - [ ] Existing cache tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
ec03a13e26 |
fix(frontend): improve history tracking, error handling (#11786)
### Changes 🏗️
- **Improved Error Handling**: Enhanced error handling in
`useRunInputDialog.ts` to properly handle cases where node errors are
empty or undefined
- **Fixed Node Collision Resolution**: Updated `Flow.tsx` to use the
current state from the store instead of stale props
- **Enhanced History Management**:
- Added proper state tracking for edge removal operations
- Improved undo/redo functionality to prevent duplicate states
- Fixed edge case where history wasn't properly tracked during node
dragging
- **UI Improvements**:
- Fixed potential null reference in NodeHeader when accessing agent_name
- Added placeholder for GoogleDrivePicker in INPUT mode
- Fixed spacing in ArrayFieldTemplate
- **Bug Fixes**:
- Added proper state tracking before modifying nodes/edges
- Fixed history tracking to avoid redundant states
- Improved collision detection and resolution
### 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 undo/redo functionality after adding, removing, and moving
nodes
- [x] Test edge creation and deletion with history tracking
- [x] Verify error handling when graph validation fails
- [x] Test Google Drive picker in different UI modes
- [x] Verify node collision resolution works correctly
|
||
|
|
b08851f5d7 |
feat(frontend): improve GoogleDrivePickerField with input mode support and array field spacing (#11780)
### Changes 🏗️ - Added a placeholder UI for Google Drive Picker in INPUT block type - Improved detection of Google Drive file objects in schema validation - Extracted `isGoogleDrivePickerSchema` function for better code organization - Added spacing between array field elements with a gap-2 class - Added debug logging for preprocessed schema in FormRenderer ### 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 Google Drive Picker shows placeholder in INPUT blocks - [x] Confirmed array field elements have proper spacing - [x] Tested that Google Drive file objects are properly detected |
||
|
|
8b1720e61d |
feat(frontend): improve graph validation error handling and node navigation (#11779)
### Changes 🏗️ - Enhanced error handling for graph validation failures with detailed user feedback - Added automatic viewport navigation to the first node with errors when validation fails - Improved node title display to prioritize agent_name from hardcoded values - Removed console.log debugging statement from OutputHandler - Added ApiError import and improved error type handling - Reorganized imports for better code organization ### 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 intentional validation errors and verify error messages display correctly - [x] Verify the viewport automatically navigates to the first node with errors - [x] Check that node titles correctly display customized names or agent names - [x] Test error recovery by fixing validation errors and successfully running the graph |
||
|
|
aa5a039c5e |
feat(frontend): add special rendering for NOTE UI type in FieldTemplate (#11771)
### Changes 🏗️ Added support for Note blocks in the FieldTemplate component by: - Importing the BlockUIType enum from the build components types - Extracting the uiType from the registry.formContext - Adding a conditional rendering check that returns children directly when the uiType is BlockUIType.NOTE This change allows Note blocks to render without the standard field template wrapper, providing a cleaner display for note-type content.  ### 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] Created a Note block and verified it renders correctly without field template wrapper - [x] Confirmed other block types still render with proper field template - [x] Verified that Note blocks maintain proper functionality in the node graph |
||
|
|
8b83bb8647 |
feat(backend): unified hybrid search with embedding backfill for all content types (#11767)
## Summary This PR extends the embedding system to support **blocks** and **documentation** content types in addition to store agents, and introduces **unified hybrid search** across all content types using a single `UnifiedContentEmbedding` table. ### Key Changes 1. **Unified Hybrid Search Architecture** - Added `search` tsvector column to `UnifiedContentEmbedding` table - New `unified_hybrid_search()` function searches across all content types (agents, blocks, docs) - Updated `hybrid_search()` for store agents to use `UnifiedContentEmbedding.search` - Removed deprecated `search` column from `StoreListingVersion` table 2. **Pluggable Content Handler Architecture** - Created abstract `ContentHandler` base class for extensibility - Implemented handlers: `StoreAgentHandler`, `BlockHandler`, `DocumentationHandler` - Registry pattern for easy addition of new content types 3. **Block Embeddings** - Discovers all blocks using `get_blocks()` - Extracts searchable text from: name, description, categories, input/output schemas 4. **Documentation Embeddings** - Scans `/docs/` directory for `.md` and `.mdx` files - Extracts title from first `#` heading or uses filename as fallback 5. **Hybrid Search Graceful Degradation** - Falls back to lexical-only search if query embedding generation fails - Redistributes semantic weight proportionally to other components - Logs warning instead of throwing error 6. **Database Migrations** - `20260115200000_add_unified_search_tsvector`: Adds search column to UnifiedContentEmbedding with auto-update trigger - `20260115210000_remove_storelistingversion_search`: Removes deprecated search column and updates StoreAgent view 7. **Orphan Cleanup** - `cleanup_orphaned_embeddings()` removes embeddings for deleted content - Always runs after backfill, even at 100% coverage ### Review Comments Addressed - ✅ SQL parameter index bug when user_id provided (embeddings.py) - ✅ Early return skipping cleanup at 100% coverage (scheduler.py) - ✅ Inconsistent return structure across code paths (scheduler.py) - ✅ SQL UNION syntax error - added parentheses for ORDER BY/LIMIT (hybrid_search.py) - ✅ Version numeric ordering in aggregations (migration) - ✅ Embedding dimension uses EMBEDDING_DIM constant ### Files Changed - `backend/api/features/store/content_handlers.py` (NEW): Handler architecture - `backend/api/features/store/embeddings.py`: Refactored to use handlers - `backend/api/features/store/hybrid_search.py`: Unified search + graceful degradation - `backend/executor/scheduler.py`: Process all content types, consistent returns - `migrations/20260115200000_add_unified_search_tsvector/`: Add tsvector to unified table - `migrations/20260115210000_remove_storelistingversion_search/`: Remove old search column - `schema.prisma`: Updated UnifiedContentEmbedding and StoreListingVersion models - `*_test.py`: Added tests for unified_hybrid_search ## Test Plan 1. ✅ All tests passing on Python 3.11, 3.12, 3.13 2. ✅ Types check passing 3. ✅ CodeRabbit and Sentry reviews addressed 4. Deploy to staging and verify: - Backfill job processes all content types - Search results include blocks and docs - Search works without OpenAI API (graceful degradation) 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Swifty <craigswift13@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
e80e4d9cbb |
ci: update dev from gitbook (#11757)
<!-- Clearly explain the need for these changes: -->
gitbook changes via ui
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Docs sync from GitBook**
>
> - Updates `docs/home/README.md` with a new Developer Platform landing
page (cards, links to Platform, Integrations, Contribute, Discord,
GitHub) and metadata/cover settings
> - Adds `docs/home/SUMMARY.md` defining the table of contents linking
to `README.md`
> - No application/runtime code changes
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
375d33cca9 |
fix(frontend): agent credentials improvements (#11763)
## Changes 🏗️ ### System credentials in Run Modal We had the issue that "system" credentials were mixed with "user" credentials in the run agent modal: #### Before <img width="400" height="466" alt="Screenshot 2026-01-14 at 19 05 56" src="https://github.com/user-attachments/assets/9d1ee766-5004-491f-ae14-a0cf89a9118e" /> This created confusion among the users. This "system" credentials are supplied by AutoGPT ( _most of the time_ ) and a user running an agent should not bother with them ( _unless they want to change them_ ). For example in this case, the credential that matters is the **Google** one 🙇🏽 ### After <img width="400" height="350" alt="Screenshot 2026-01-14 at 19 04 12" src="https://github.com/user-attachments/assets/e2bbc015-ce4c-496c-a76f-293c01a11c6f" /> <img width="400" height="672" alt="Screenshot 2026-01-14 at 19 04 19" src="https://github.com/user-attachments/assets/d704dae2-ecb2-4306-bd04-3d812fed4401" /> "System" credentials are collapsed by default, reducing noise in the Task Credentials section. The user can still see and change them by expanding the accordion. <img width="400" height="190" alt="Screenshot 2026-01-14 at 19 04 27" src="https://github.com/user-attachments/assets/edc69612-4588-48e4-981a-f59c26cfa390" /> If some "system" credentials are missing, there is a red label indicating so, it wasn't that obvious with the previous implementation, <img width="400" height="309" alt="Screenshot 2026-01-14 at 19 04 30" src="https://github.com/user-attachments/assets/f27081c7-40ad-4757-97b3-f29636616fc2" /> ### New endpoint There is a new REST endpoint, `GET /providers/system`, to list system credential providers so it is easy to access in the Front-end to group them together vs user ones. ### Other improvements #### `<CredentialsInput />` refinements <img width="715" height="200" alt="Screenshot 2026-01-14 at 19 09 31" src="https://github.com/user-attachments/assets/01b39b16-25f3-428d-a6c8-da608038a38b" /> Use a normal browser `<select>` for the Credentials Dropdown ( _when you have more than 1 for a provider_ ). This simplifies the UI shennagians a lot and provides a better UX in 📱 ( _eventually we should move all our selects to the native ones as they are much better for mobile and touch screens and less code to maintain our end_ ). I also renamed some files for clarity and tidied up some of the existing logic. #### Other - Fix **Open telemetry** warnings on the server console by making the packages external - Fix `require-in-the-middle` console warnings - Prettier tidy ups ## 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 the above |
||
|
|
3b1b2fe30c |
feat(backend): Extract backend copilot/chat enhancements from hackathon (#11719)
This PR extracts backend changes from the hackathon/copilot branch, adding enhanced chat capabilities, agent management tools, store embeddings, and hybrid search functionality. ### Changes 🏗️ **Chat Features:** - Added chat database layer (`db.py`) for conversation and message persistence - Extended chat models with new types and response structures - New onboarding system prompt for guided user experiences - Enhanced chat routes with additional endpoints - Expanded chat service with more capabilities **Chat Agent Tools:** - `agent_output.py` - Handle agent execution outputs - `create_agent.py` - Tool for creating new agents via chat - `edit_agent.py` - Tool for modifying existing agents - `find_library_agent.py` - Search and discover library agents - Enhanced `run_agent.py` with additional functionality - New `models.py` for shared tool types **Store Enhancements:** - `embeddings.py` - Vector embeddings support for semantic search - `hybrid_search.py` - Combined keyword and semantic search - `backfill_embeddings.py` - Utility for backfilling existing data - Updated store database operations **Admin:** - Enhanced store admin routes **Data Layer:** - New `understanding.py` module for agent understanding/context **Database Migrations:** - `add_chat_tables` - Chat conversation and message tables - `add_store_embeddings` - Embeddings storage for store items - `enhance_search` - Search index improvements ### 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] Chat endpoints respond correctly - [x] Agent tools (create/edit/find/run) function properly - [x] Store embeddings and hybrid search work - [x] Database migrations apply cleanly #### 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**) --------- Co-authored-by: Torantulino <40276179@live.napier.ac.uk> |
||
|
|
af63b3678e |
feat(frontend): hide children of connected array and object fields
(#11770) ### Changes 🏗️ - Added conditional rendering for array and object field children based on connection status - Implemented `shouldShowChildren` logic in `ArrayFieldTemplate` and `ObjectFieldTemplate` components - Modified the `shouldShowChildren` condition in `FieldTemplate` to handle different schema types - Imported and utilized `cleanUpHandleId` and `useEdgeStore` to check if inputs are connected - Added connection status checks to hide form fields when their inputs are connected to other nodes  ### 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 that object and array fields hide their children when connected to other nodes - [x] Confirmed that unconnected fields display their children properly - [x] Tested with various schema types to ensure correct rendering behavior - [x] Checked that the connection status is properly detected and applied |
||
|
|
631f1bd50a |
feat(frontend): add interactive tutorial for the new builder interface (#11458)
### Changes 🏗️ This PR adds a comprehensive interactive tutorial for the new Builder UI to help users learn how to create agents. Key changes include: - Added a tutorial button to the canvas controls that launches a step-by-step guide - Created a Shepherd.js-based tutorial with multiple steps covering: - Adding blocks from the Block Menu - Understanding input and output handles - Configuring block values - Connecting blocks together - Saving and running agents - Added data-id attributes to key UI elements for tutorial targeting - Implemented tutorial state management with a new tutorialStore - Added helper functions for tutorial navigation and block manipulation - Created CSS styles for tutorial tooltips and highlights - Integrated with the Run Input dialog to support tutorial flow - Added prefetching of tutorial blocks for better performance https://github.com/user-attachments/assets/3db964b3-855c-4fcc-aa5f-6cd74ab33d7d ### 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] Complete the tutorial from start to finish - [x] Test tutorial on different screen sizes - [x] Verify all tutorial steps work correctly - [x] Ensure tutorial can be canceled and restarted - [x] Check that tutorial doesn't interfere with normal builder functionality |
||
|
|
5ac941fe2f |
feat(backend): add hybrid search for store listings, docs and blocks (#11721)
This PR adds hybrid search functionality combining semantic embeddings with traditional text search for improved store listing discovery. ### Changes 🏗️ - Add `embeddings.py` - OpenAI-based embedding generation and similarity search - Add `hybrid_search.py` - Combines vector similarity with text matching for better search results - Add `backfill_embeddings.py` - Script to generate embeddings for existing store listings - Update `db.py` - Integrate hybrid search into store database queries - Update `schema.prisma` - Add embedding storage fields and indexes - Add migrations for embedding columns and HNSW index for vector search ### Architecture Decisions 🏛️ **Fail-Fast Approach (No Silent Fallbacks)** We explicitly chose NOT to implement graceful degradation when hybrid search fails. Here's why: ✅ **Benefits:** - Errors surface immediately → faster fixes - Tests verify hybrid search actually works (not just fallback) - Consistent search quality for all users - Forces proper infrastructure setup (API keys, database) ❌ **Why Not Fallback:** - Silent degradation hides production issues - Users get inconsistent results without knowing why - Tests can pass even when hybrid search is broken - Reduces operational visibility **How We Prevent Failures:** 1. Embedding generation in approval flow (db.py:1545) 2. Error logging with `logger.error` (not warning) 3. Clear error messages (ValueError explains what's wrong) 4. Comprehensive test coverage (9/9 tests passing) If embeddings fail, it indicates a real infrastructure issue (missing API key, OpenAI down, database issues) that needs immediate attention, not silent degradation. ### Test Coverage ✅ **All tests passing (1625 total):** - 9/9 hybrid_search tests (including fail-fast validation) - 3/3 db search integration tests - Full schema compatibility (public/platform schemas) - Error handling verification ### 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 hybrid search returns relevant results - [x] Test embedding generation for new listings - [x] Test backfill script on existing data - [x] Verify search performance with embeddings - [x] Test fail-fast behavior when embeddings unavailable #### 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] Configuration: Requires `openai_internal_api_key` in secrets --------- Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
b01ea3fcbd |
fix(backend/executor): Centralize increment_runs calls & make add_graph_execution more robust (#11764)
[OPEN-2946: \[Scheduler\] Error executing graph <graph_id> after 19.83s: ClientNotConnectedError: Client is not connected to the query engine, you must call `connect()` before attempting to query data.](https://linear.app/autogpt/issue/OPEN-2946) - Follow-up to #11375 <sub>(broken `increment_runs` call)</sub> - Follow-up to #11380 <sub>(direct `get_graph_execution` call)</sub> ### Changes 🏗️ - Move `increment_runs` call from `scheduler._execute_graph` to `executor.utils.add_graph_execution` so it can be made through `DatabaseManager` - Add `increment_onboarding_runs` to `DatabaseManager` - Remove now-redundant `increment_onboarding_runs` calls in other places - Make `add_graph_execution` more resilient - Split up large try/except block - Fix direct `get_graph_execution` call ### 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: - CI + a thorough review |
||
|
|
3b09a94e3f |
feat(frontend/builder): Add sub-graph update UX (#11631)
[OPEN-2743: Ability to Update Sub-Agents in Graph (Without Re-Adding)](https://linear.app/autogpt/issue/OPEN-2743/ability-to-update-sub-agents-in-graph-without-re-adding) Updating sub-graphs is a cumbersome experience at the moment, this should help. :) Demo in Builder v2: https://github.com/user-attachments/assets/df564f32-4d1d-432c-bb91-fe9065068360 https://github.com/user-attachments/assets/f169471a-1f22-46e9-a958-ddb72d3f65af ### Changes 🏗️ - Add sub-graph update banner with I/O incompatibility notification and resolution mode - Red visual indicators for broken inputs/outputs and edges - Update bars and tooltips show compatibility details - Sub-agent update UI with compatibility checks, incompatibility dialog, and guided resolution workflow - Resolution mode banner guiding users to remove incompatible connections - Visual controls to stage/apply updates and auto-apply when broken connections are fixed Technical: - Builder v1: Add `CustomNode` > `IncompatibilityDialog` + `SubAgentUpdateBar` sub-components - Builder v2: Add `SubAgentUpdateFeature` + `ResolutionModeBar` + `IncompatibleUpdateDialog` + `useSubAgentUpdateState` sub-components - Add `useSubAgentUpdate` hook - Related fixes in Builder v1: - Fix static edges not rendering as such - Fix edge styling not applying - Related fixes in Builder v2: - Fix excess spacing for nested node input fields Other: - "Retry" button in error view now reloads the page instead of navigating to `/marketplace` ### 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: - CI for existing frontend UX flows - [x] Updating to a new sub-agent version with compatibility issues: UX flow works - [x] Updating to a new sub-agent version with *no* compatibility issues: works - [x] Designer approves of the look --------- Co-authored-by: abhi1992002 <abhimanyu1992002@gmail.com> Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com>autogpt-platform-beta-v0.6.42 |
||
|
|
61efee4139 |
fix(frontend): Remove hardcoded bypass of billing feature flag (#11762)
## Summary
Fixes a critical security issue where the billing button in the settings
sidebar was always visible to all users, bypassing the
`ENABLE_PLATFORM_PAYMENT` feature flag.
## Changes 🏗️
- Removed hardcoded `|| true` condition in
`frontend/src/app/(platform)/profile/(user)/layout.tsx:32` that was
bypassing the feature flag check
- The billing button is now properly gated by the
`ENABLE_PLATFORM_PAYMENT` feature flag as intended
## Root Cause
The `|| true` was accidentally left in commit
|
||
|
|
e539280e98 |
fix(blocks): set User-Agent header and URL-encode topic in GetWikipediaSummaryBlock (#11754)
The GetWikipediaSummaryBlock was returning HTTP 403 errors from Wikipedia's API because it wasn't explicitly setting a User-Agent header that complies with https://wikitech.wikimedia.org/wiki/Robot_policy. Additionally, topics with spaces or special characters would cause malformed URLs. Fixes: OPEN-2889 Changes 🏗️ - URL-encode the topic parameter using urllib.parse.quote() to handle spaces and special characters - Explicitly set required headers per Wikimedia robot policy: - User-Agent: Platform default user agent (includes app name, URL, and contact email) - Accept-Encoding: gzip, deflate: Recommended by Wikimedia to reduce bandwidth - Updated test mock to match the new function signature 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 code passes syntax check - [x] Verify code passes ruff linting - [x] Create an agent using GetWikipediaSummaryBlock with a topic containing spaces (e.g., "Artificial Intelligence") - [x] Verify the block returns a Wikipedia summary without 403 errors For configuration changes: - .env.default is updated or already compatible with my changes - docker-compose.yml is updated or already compatible with my changes - I have included a list of my configuration changes in the PR description (under Changes) . N/A - No configuration changes required. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved Wikipedia API requests by adding compatible request headers (including a proper user agent and encoding acceptance) for more reliable responses. * Enhanced handling of search topics by URL-encoding terms so queries with spaces or special characters return correct results. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
db8b43bb3d |
feat(blocks): Add WordPress Get All Posts block and Publish Post draft toggle (#11003)
**Implements issue #11002**
This PR adds WordPress post management functionality and improves error
handling in DataForSEO blocks.
### Changes 🏗️
1. **New WordPress Blocks:**
- Added `WordPressGetAllPostsBlock` - Fetches posts from WordPress sites
with filtering and pagination support
- Enhanced `WordPressCreatePostBlock` with `publish_as_draft` toggle to
control post publication status
2. **WordPress API Enhancements:**
- Added `get_posts()` function in `_api.py` to retrieve posts with
filtering by status
- Added `PostsResponse` model for handling WordPress posts list API
responses
- Support for pagination with `number` and `offset` parameters (max 100
posts per 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:
**Test Plan:**
- [x] Test `WordPressGetAllPostsBlock` with valid WordPress credentials
- [x] Verify filtering posts by status (publish, draft, pending, etc.)
- [x] Test pagination with different number and offset values
- [x] Test `WordPressCreatePostBlock` with publish_as_draft=True to
create draft posts
- [x] Test `WordPressCreatePostBlock` with publish_as_draft=False to
publish posts publicly
#### 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**)
**Note:** No configuration changes were required for this PR.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a WordPress “Get All Posts” block to fetch posts with optional
status filtering and pagination; returns total found and post details.
* **Enhancements**
* WordPress “Create Post” block now supports a “Publish as draft”
option, allowing posts to be created as drafts or published immediately.
* WordPress blocks are now surfaced consistently in the block catalog
for easier use.
* **Error Handling**
* Clearer error messages when fetching posts fails, aiding
troubleshooting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces WordPress post listing and improves post creation and API
robustness.
>
> - Adds `WordPressGetAllPostsBlock` to fetch posts with optional
`status` filter and pagination (`number`, `offset`); outputs `found`,
`posts`, and streams each `post`
> - Enhances `WordPressCreatePostBlock` with `publish_as_draft` input
and adds `site` to outputs; sets `status` accordingly
> - WordPress API updates in `_api.py`: new `get_posts`, `Post`,
`PostsResponse`, and `normalize_site`; apply
`Requests(raise_for_status=False)` across OAuth/token/info and post
creation; better error propagation
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
923d8baedc |
feat(frontend): add JsonTextField component for complex nested form data (#11752)
### Changes 🏗️ - Added a new `JsonTextField` component to handle complex nested JSON types (objects/arrays inside other objects/arrays) - Created helper functions for JSON parsing, validation, and formatting - Implemented `useJsonTextField` hook to manage state and validation - Enhanced `generateUiSchemaForCustomFields` to detect nested complex types and render them as JSON text fields - Updated `TextInputExpanderModal` to support JSON-specific styling - Added `JSON_TEXT_FIELD_ID` constant to custom registry for field identification This change improves the user experience by preventing deeply nested form UIs. Instead, complex nested structures are presented as editable JSON text fields with proper validation and formatting. ### Before  ### After  ### 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 with simple JSON objects in forms - [x] Test with nested arrays and objects - [x] Test with anyOf/oneOf schemas containing complex types - [x] Test the expander modal with JSON content <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * New JSON text field with expandable modal editor, inline validation, and helpful placeholders. * Complex nested objects/arrays now render as JSON fields to simplify editing. * Modal editor uses monospace, smaller text when editing JSON for improved readability. * **Chores** * Added a non-functional runtime debug log (no user-facing behavior changes). <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a55b2e02dc |
feat(frontend): enhance CredentialsInput and CredentialRow components with variant support (#11753)
### Changes 🏗️ - Added a new `variant` prop to `CredentialsInput` component with options "default" or "node" - Implemented compact styling for the "node" variant in `CredentialRow` component - Modified layout and overflow handling for credential display in node context - Added conditional rendering of masked key display based on variant - Passed the variant prop through the component hierarchy - Applied the "node" variant to the `CredentialsField` component with appropriate styling Before  After  ### 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 credential selection works correctly in node context - [x] Confirmed compact styling is applied properly in node variant - [x] Tested overflow handling for long credential names - [x] Verified both default and node variants display correctly <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Credential input and selection components now support multiple configurable visual variants, enabling better text display handling, optimized layouts, and improved visual consistency across different application contexts and specific use cases. * **Style** * Credential field displays now feature enhanced text truncation and overflow management for a more polished and consistent user interface experience. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6b6648b290 |
feat(frontend): add Table component with TableField renderer for tabular data input (#11751)
### Changes 🏗️ - Added a new `Table` component for handling tabular data input - Created supporting hooks and helper functions for the Table component - Added Storybook stories to showcase different Table configurations - Implemented a custom `TableField` renderer for JSON Schema forms - Updated type display info to support the new "table" format - Added schema matcher to detect and render table fields appropriately   ### 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 Table component renders correctly with various configurations - [x] Tested adding and removing rows in the Table - [x] Confirmed data changes are properly tracked and reported via onChange - [x] Verified TableField renderer works with JSON Schema forms - [x] Checked that table format is properly detected in the schema <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added a Table component for displaying and editing tabular data with support for adding/deleting rows, read-only mode, and customizable labels. * Added support for rendering array fields as tables in form inputs with configurable columns and values. * **Tests** * Added comprehensive Storybook stories demonstrating various Table configurations and behaviors. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c0a9c0410b |
feat(frontend): add MultiSelectField component and improve node title cursor styling (#11744)
## Changes 🏗️ - Added a new `MultiSelectField` component for handling multiple boolean selections in a dropdown format - Implemented `useMultiSelectField` hook to manage the state and logic of the multi-select component - Added support for custom fields in `AnyOfField` by checking if the option schema matches a custom field - Added `isMultiSelectSchema` utility function to detect schemas suitable for the multi-select component - Added hover cursor styling to node headers to indicate text editability  ### 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 that multi-select fields render correctly in the UI - [x] Confirmed that selecting multiple options works as expected - [x] Tested that the node header shows the text cursor on hover - [x] Verified that AnyOf fields correctly use custom field renderers when applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a multi-select field allowing selection of multiple options with improved selection UI. * AnyOf options can now resolve and render custom field types, improving form composition when schemas map to custom controls. * **Style** * Tooltip header cursor updated for clearer hover feedback. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
17a77b02c7 |
fix(frontend): exclude schemas with enum from anyOf detection (#11743)
### Changes 🏗️ Fixed the `isAnyOfSchema` function in schema-utils.ts to exclude schemas that have an `enum` property. This prevents incorrect schema processing for enums that also have anyOf definitions. Added a console.log statement in FormRenderer.tsx to help debug schema preprocessing. ### 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 that forms with enum values render correctly - [x] Confirmed that anyOf schemas are properly identified and processed - [x] Tested with various schema combinations to ensure the fix doesn't break existing functionality <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Bug Fixes * Improved validation logic for form field schemas to correctly handle edge cases when multiple constraint types are defined. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
701fce83ca |
fix(backend): add missing metadata attribute to mock nodes in SmartDecisionMaker tests (#11750)
This PR fixes failing SmartDecisionMaker tests by adding missing
`metadata` attribute to mock nodes.
### Changes 🏗️
Mock nodes in SmartDecisionMaker tests were missing the `metadata = {}`
attribute, which was introduced in commit
|
||
|
|
78d89d0faf | Merge branch 'master' of github.com:Significant-Gravitas/AutoGPT into dev | ||
|
|
f482eb668b |
hotfix(backend): resolve tool pin name mismatch in SmartDecisionMakerBlock (#11749)
## Root Cause
Execution a40bdb4a-964d-4684-94e8-b148eb6bcfc2 and all similar
executions have been failing since Nov 12, 2025 when tool pin routing
was refactored to use node IDs. The SmartDecisionMakerBlock was
double-sanitizing field names when emitting tool call outputs:
```python
# Original field name from link: "Max Keyword Difficulty"
original_field_name = field_mapping.get(clean_arg_name) # ✅ Retrieved correctly
sanitized_arg_name = self.cleanup(original_field_name) # ❌ Sanitized AGAIN!
emit_key = f"tools_^_{node_id}_~_{sanitized_arg_name}" # Emits "max_keyword_difficulty"
```
But the parser expected original names from graph links:
```python
# Parser expects: "Max Keyword Difficulty" (from link.sink_name)
# Emit provides: "max_keyword_difficulty" (sanitized)
# Result: Mismatch → Tool never executes
```
### Changes 🏗️
**1. Fixed Emit Logic** (`smart_decision_maker.py` line 1135)
- Removed double sanitization: `sanitized_arg_name =
self.cleanup(original_field_name)`
- Now emits with original field names: `emit_key =
f"tools_^_{node_id}_~_{original_field_name}"`
**2. Made Agent Nodes Consistent** (`smart_decision_maker.py` lines
497-530)
- Added `field_mapping` to agent function signatures (was missing)
- Agent signatures now sanitize property keys for Anthropic API (like
block signatures)
- Stores field_mapping for use during emit
### Impact
**Fixes:**
- ✅ All graphs with multi-word field names (e.g., "Max Keyword
Difficulty", "Minimum Volume")
- ✅ All graphs with special characters in field names (e.g., "API-Key")
- ✅ Both block nodes AND agent nodes now work consistently
**Unaffected:**
- Single-word lowercase field names (e.g., "keyword", "url") - these
were already working
### 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 parse_execution_output handles exact match correctly
- [x] Verified emit uses original field names
- [x] Verified field_mapping works for both block and agent nodes
- [x] Re-run execution a40bdb4a-964d-4684-94e8-b148eb6bcfc2 after
deployment to verify fix
#### For configuration changes:
- [x] `.env.default` is updated or already compatible with my changes
(no changes)
- [x] `docker-compose.yml` is updated or already compatible with my
changes (no changes)
- [x] No configuration changes in this PR
### Test Plan
1. **Unit test validation** (completed):
- Field name cleanup: "Max Keyword Difficulty" →
"max_keyword_difficulty" ✅
- Parse with exact match: Success ✅
- Parse with mismatch: Returns None ✅
2. **Production validation** (to be done after deployment):
- Re-run execution a40bdb4a-964d-4684-94e8-b148eb6bcfc2
- Verify AgentExecutor (node 767682f5-694f-4b2a-bf52-fbdcad6a4a4f)
executes successfully
- Verify execution completes with high correctness score (not 0.20)
- Monitor for any regressions in existing graphs
### Files Changed
- `backend/blocks/smart_decision_maker.py`: Remove double sanitization,
add agent field_mapping
### Related Issues
- Resolves execution failure a40bdb4a-964d-4684-94e8-b148eb6bcfc2
- Fixes bug introduced in commit
|
||
|
|
4a52b7eca0 |
fix(backend): use customized block names in smart decision maker
The SmartDecisionMakerBlock now respects the customized_name field from node metadata when generating tool function signatures for the LLM. Previously, the block always used the static block.name from the block class definition, ignoring any custom names users set in the builder UI. Changes: - _create_block_function_signature: Check sink_node.metadata for customized_name before falling back to block.name - _create_agent_function_signature: Check sink_node.metadata for customized_name before falling back to sink_graph_meta.name - Added 4 unit tests for the customized_name feature Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
97847f59f7 |
feat(backend): add human-in-the-loop review system for blocks requiring approval (#11732)
## Summary Introduces a comprehensive Human-In-The-Loop (HITL) review system that allows any block to require human approval before execution. This extends the existing HITL infrastructure to support automatic review requests for potentially dangerous operations. ## 🚀 Key Features ### **Automatic HITL for Any Block** - **Simple opt-in**: Set `self.requires_human_review = True` in any block constructor - **Safe mode integration**: Only activates when `execution_context.safe_mode = True` - **Seamless workflow**: Blocks pause execution → Human reviews via existing UI → Execution continues or stops ### **Unified Review Infrastructure** - **Shared HITLReviewHelper**: Clean, reusable helper class for all review operations - **Single API**: `handle_review_decision()` method with structured return type - **Type-safe**: Proper typing with non-nullable `ReviewDecision.review_result` ### **Smart Graph Detection** - **Updated `has_human_in_the_loop`**: Now detects both dedicated HITL blocks and blocks with `requires_human_review = True` - **Frontend awareness**: UI can properly indicate graphs requiring human intervention ## 🏗️ Implementation ### **Block Usage** ```python class MyBlock(Block): def __init__(self): super().__init__(...) self.requires_human_review = True # Enable automatic HITL async def run(self, input_data, **kwargs): # If we reach here, either safe mode is off OR human approved # No additional HITL code needed - handled automatically by base class yield "result", "Operation completed" ``` ### **Review Workflow** 1. **Block execution starts** → Base class checks `requires_human_review` flag 2. **Safe mode enabled** → Creates review entry, pauses execution 3. **Human reviews** → Uses existing review UI to approve/reject 4. **Execution resumes** → Continues if approved, raises error if rejected 5. **Safe mode disabled** → Executes normally without review ## 🔧 Technical Improvements ### **Code Quality Enhancements** - **Better naming**: `risky_block` → `requires_human_review` (clearer intent) - **Type safety**: Non-nullable `ReviewDecision.review_result` (eliminates Optional checks) - **Exhaustive handling**: Proper error handling for unexpected review statuses - **Clean exception handling**: Removed redundant try-catch-log-reraise patterns ### **Architecture Fixes** - **Circular import resolution**: Fixed `ExecutionContext` import issues breaking 444+ block tests - **Early returns**: Cleaner control flow without nested conditionals - **Defensive programming**: Handles edge cases with clear error messages ## 📊 Changes Made ### **Core Files** - **`Block.requires_human_review`**: New flag for marking blocks requiring approval - **`HITLReviewHelper`**: Shared helper class with clean, testable API - **`HumanInTheLoopBlock`**: Refactored to use shared infrastructure - **`Graph.has_human_in_the_loop`**: Updated to include review-requiring blocks ### **Quality Improvements** - **Type hints**: Proper typing throughout with runtime compatibility - **Error handling**: Exhaustive status handling with descriptive errors - **Code reduction**: -16 lines through removal of redundant exception handling - **Test compatibility**: All 444/445 block tests pass ## ✅ Testing & Validation - **All tests pass**: 444/445 block tests passing ✅ - **Type checking**: All pyright/mypy checks pass ✅ - **Formatting**: All linting and formatting checks pass ✅ - **Circular imports**: Resolved import issues that were breaking tests ✅ - **Backward compatibility**: Existing HITL functionality unchanged ✅ ## 🎯 Use Cases This enables automatic human oversight for blocks performing: - **File operations**: Deletion, modification, system access - **External API calls**: Payments, data modifications, destructive operations - **System commands**: Shell execution, configuration changes - **Data processing**: Sensitive data handling, compliance-required operations ## 🔄 Migration Path **Existing code**: No changes required - fully backward compatible **New blocks**: Simply set `self.requires_human_review = True` to enable automatic HITL **Safe mode**: Controls whether review requests are created (production vs development) --- This creates a robust, type-safe foundation for human oversight in automated workflows while maintaining the existing HITL user experience and API compatibility. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Human-in-the-loop review support so executions can pause for human review and resume based on decisions. * **Improvements** * Blocks can opt into requiring human review and will use reviewed input when proceeding. * Unified review decision flow with clearer approved/rejected outcomes and messaging. * Graph detection expanded to recognize nodes that require human review. * **Chores** * Test config adjusted to avoid pytest plugin conflicts. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
22ca8955c5 |
fix(backend): library agent creation and version update improvements (#11731)
## Summary
Fixes library agent creation and version update logic to properly handle
both user-created and marketplace agents.
## Changes
- **Remove useGraphIsActiveVersion filter** from
`update_agent_version_in_library` to allow both manual and auto updates
- **Set useGraphIsActiveVersion correctly**:
- `False` for marketplace agents (require manual updates to avoid
breaking workflows)
- `True` for user-created agents (can safely auto-update since user
controls source)
- Update function documentation to reflect new behavior
## Problem Solved
- Marketplace agents can now be updated manually via API
- User-created agents maintain auto-update capability
- Resolves Sentry error AUTOGPT-SERVER-722 about "Expected a record,
found none"
- Fixes store submission modal issues
## Test Plan
- [x] Verify marketplace agents are created with
`useGraphIsActiveVersion: False`
- [x] Verify user agents are created with `useGraphIsActiveVersion:
True`
- [x] Confirm `update_agent_version_in_library` works for both types
- [x] Test store submission flow works without modal issues
## Review Notes
This change ensures proper separation between user-controlled agents
(auto-update) and marketplace agents (manual update), while allowing the
API to service both use cases.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **New Features**
* Enhanced agent publishing workflow with improved version tracking and
change detection for marketplace updates
* **Bug Fixes**
* Improved error handling when updating agent versions in the library
* Better detection of unpublished changes before publishing agents
* **Improvements**
* Changes Summary field now supports longer descriptions (up to 500
characters) with multi-line editing capability
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
43cbe2e011 |
feat!(blocks): Add Reddit OAuth2 integration and advanced Reddit blocks (#11623)
Replaces user/password Reddit credentials with OAuth2, adds
RedditOAuthHandler, and updates Reddit blocks to support OAuth2
authentication. Introduces new blocks for creating posts, fetching post
details, searching, editing posts, and retrieving subreddit info.
Updates test credentials and input handling to use OAuth2 tokens.
<!-- Clearly explain the need for these changes: -->
### Changes 🏗️
Rebuild the reddit blocks to support oauth2 rather than requiring users
to provide their password and username.
This is done via a swap from script based to web based authentication on
the reddit side faciliatated by the approval of an oauth app by reddit
on the account `ntindle`
<!-- 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] Build a super agent
- [x] Upload the super agent and a video of it working
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces full Reddit OAuth2 support and substantially expands Reddit
capabilities across the platform.
>
> - Adds `RedditOAuthHandler` with token exchange, refresh, revoke;
registers handler in `integrations/oauth/__init__.py`
> - Refactors Reddit blocks to use `OAuth2Credentials` and `praw` via
refresh tokens; updates models (e.g., `post_id`, richer outputs) and
adds `strip_reddit_prefix`
> - New blocks: create/edit/delete posts, post/get/delete comments,
reply to comments, get post details, user posts (self/others), search,
inbox, subreddit info/rules/flairs, send messages
> - Updates default `settings.config.reddit_user_agent` and test
credentials; minor `.branchlet.json` addition
> - Docs: clarifies block error-handling with
`BlockInputError`/`BlockExecutionError` guidance
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
a318832414 |
feat(docs): update dev from gitbook changes (#11740)
<!-- Clearly explain the need for these changes: -->
gitbook branch has changes that need synced to dev
### Changes 🏗️
Pull changes from gitbook into dev
<!-- Concisely describe all of the changes made in this pull request:
-->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Migrates documentation to GitBook and removes the old MkDocs setup.
>
> - Removes MkDocs configuration and infra: `docs/mkdocs.yml`,
`docs/netlify.toml`, `docs/overrides/main.html`,
`docs/requirements.txt`, and JS assets (`_javascript/mathjax.js`,
`_javascript/tablesort.js`)
> - Updates `docs/content/contribute/index.md` to describe GitBook
workflow (gitbook branch, editing, previews, and `SUMMARY.md`)
> - Adds GitBook navigation file `docs/platform/SUMMARY.md` and a new
platform overview page `docs/platform/what-is-autogpt-platform.md`
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
843c487500 |
feat(backend): add prisma types stub generator for pyright compatibility (#11736)
Prisma's generated `types.py` file is 57,000+ lines with complex recursive TypedDict definitions that exhaust Pyright's type inference budget. This causes random type errors and makes the type checker unreliable. ### Changes 🏗️ - Add `gen_prisma_types_stub.py` script that generates a lightweight `.pyi` stub file - The stub preserves safe types (Literal, TypeVar) while collapsing complex TypedDicts to `dict[str, Any]` - Integrate stub generation into all workflows that run `prisma generate`: - `platform-backend-ci.yml` - `claude.yml` - `claude-dependabot.yml` - `copilot-setup-steps.yml` - `docker-compose.platform.yml` - `Dockerfile` - `Makefile` (migrate & reset-db targets) - `linter.py` (lint & format commands) - Add `gen-prisma-stub` poetry script entry - Fix two pre-existing type errors that were previously masked: - `store/db.py`: Replace private type `_StoreListingVersion_version_OrderByInput` with dict literal - `airtable/_webhook.py`: Add cast for `Serializable` type ### 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 `poetry run format` - passes with 0 errors (down from 57+) - [x] Run `poetry run lint` - passes with 0 errors - [x] Run `poetry run gen-prisma-stub` - generates stub successfully - [x] Verify stub file is created at correct location with proper content #### 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**) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added a lightweight Prisma type-stub generator and integrated it into build, lint, CI/CD, and container workflows. * Build, migration, formatting, and lint steps now generate these stubs to improve type-checking performance and reduce overhead during builds and deployments. * Exposed a project command to run stub generation manually. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
47a3a5ef41 |
feat(backend,frontend): optional credentials flag for blocks at agent level (#11716)
This feature allows agent makers to mark credential fields as optional.
When credentials are not configured for an optional block, the block
will be skipped during execution rather than causing a validation error.
**Use case:** An agent with multiple notification channels (Discord,
Twilio, Slack) where the user only needs to configure one - unconfigured
channels are simply skipped.
### Changes 🏗️
#### Backend
**Data Model Changes:**
- `backend/data/graph.py`: Added `credentials_optional` property to
`Node` model that reads from node metadata
- `backend/data/execution.py`: Added `nodes_to_skip` field to
`GraphExecutionEntry` model to track nodes that should be skipped
**Validation Changes:**
- `backend/executor/utils.py`:
- Updated `_validate_node_input_credentials()` to return a tuple of
`(credential_errors, nodes_to_skip)`
- Nodes with `credentials_optional=True` and missing credentials are
added to `nodes_to_skip` instead of raising validation errors
- Updated `validate_graph_with_credentials()` to propagate
`nodes_to_skip` set
- Updated `validate_and_construct_node_execution_input()` to return
`nodes_to_skip`
- Updated `add_graph_execution()` to pass `nodes_to_skip` to execution
entry
**Execution Changes:**
- `backend/executor/manager.py`:
- Added skip logic in `_on_graph_execution()` dispatch loop
- When a node is in `nodes_to_skip`, it is marked as `COMPLETED` without
execution
- No outputs are produced, so downstream nodes won't trigger
#### Frontend
**Node Store:**
- `frontend/src/app/(platform)/build/stores/nodeStore.ts`:
- Added `credentials_optional` to node metadata serialization in
`convertCustomNodeToBackendNode()`
- Added `getCredentialsOptional()` and `setCredentialsOptional()` helper
methods
**Credential Field Component:**
-
`frontend/src/components/renderers/input-renderer/fields/CredentialField/CredentialField.tsx`:
- Added "Optional - skip block if not configured" switch toggle
- Switch controls the `credentials_optional` metadata flag
- Placeholder text updates based on optional state
**Credential Field Hook:**
-
`frontend/src/components/renderers/input-renderer/fields/CredentialField/useCredentialField.ts`:
- Added `disableAutoSelect` parameter
- When credentials are optional, auto-selection of credentials is
disabled
**Feature Flags:**
- `frontend/src/services/feature-flags/use-get-flag.ts`: Minor refactor
(condition ordering)
### 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] Build an agent using smart decision maker and down stream blocks
to test this
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces optional credentials across graph execution and UI,
allowing nodes to be skipped (no outputs, no downstream triggers) when
their credentials are not configured.
>
> - Backend
> - Adds `Node.credentials_optional` (from node `metadata`) and computes
required credential fields in `Graph.credentials_input_schema` based on
usage.
> - Validates credentials with `_validate_node_input_credentials` →
returns `(errors, nodes_to_skip)`; plumbs `nodes_to_skip` through
`validate_graph_with_credentials`,
`_construct_starting_node_execution_input`,
`validate_and_construct_node_execution_input`, and `add_graph_execution`
into `GraphExecutionEntry`.
> - Executor: dispatch loop skips nodes in `nodes_to_skip` (marks
`COMPLETED`); `execute_node`/`on_node_execution` accept `nodes_to_skip`;
`SmartDecisionMakerBlock.run` filters tool functions whose
`_sink_node_id` is in `nodes_to_skip` and errors only if all tools are
filtered.
> - Models: `GraphExecutionEntry` gains `nodes_to_skip` field. Tests and
snapshots updated accordingly.
>
> - Frontend
> - Builder: credential field uses `custom/credential_field` with an
"Optional – skip block if not configured" toggle; `nodeStore` persists
`credentials_optional` and history; UI hides optional toggle in run
dialogs.
> - Run dialogs: compute required credentials from
`credentials_input_schema.required`; allow selecting "None"; avoid
auto-select for optional; filter out incomplete creds before execute.
> - Minor schema/UI wiring updates (`uiSchema`, form context flags).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
ec00aa951a |
fix(frontend): agent favorites layout (#11733)
## Changes 🏗️ <img width="800" height="744" alt="Screenshot 2026-01-09 at 16 07 08" src="https://github.com/user-attachments/assets/034c97e2-18f3-441c-a13d-71f668ad672f" /> - Remove feature flag for agent favourites ( _keep it always visible_ ) - Fix the layout on the card so the ❤️ icon appears next to the `...` menu - Remove icons on 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 the app locally and check the above <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Favorites now respond to the current search term and are available to all users (no feature-flag). * **UI/UX Improvements** * Redesigned Favorites section with simplified header, inline agent counts, updated spacing/dividers, and removal of skeleton placeholders. * Favorite button repositioned and visually simplified on agent cards. * Toast visuals simplified by removing per-type icons and adjusting close-button positioning. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
36fb1ea004 |
fix(platform): store submission validation and marketplace improvements (#11706)
## Summary Major improvements to AutoGPT Platform store submission deletion, creator detection, and marketplace functionality. This PR addresses critical issues with submission management and significantly improves performance. ### 🔧 **Store Submission Deletion Issues Fixed** **Problems Solved**: - ❌ **Wrong deletion granularity**: Deleting entire `StoreListing` (all versions) when users expected to delete individual submissions - ❌ **"Graph not found" errors**: Cascade deletion removing AgentGraphs that were still referenced - ❌ **Multiple submissions deleted**: When removing one submission, all submissions for that agent were removed - ❌ **Deletion of approved content**: Users could accidentally remove live store content **Solutions Implemented**: - ✅ **Granular deletion**: Now deletes individual `StoreListingVersion` records instead of entire listings - ✅ **Protected approved content**: Prevents deletion of approved submissions to keep store content safe - ✅ **Automatic cleanup**: Empty listings are automatically removed when last version is deleted - ✅ **Simplified logic**: Reduced deletion function from 85 lines to 32 lines for better maintainability ### 🔧 **Creator Detection Performance Issues Fixed** **Problems Solved**: - ❌ **Inefficient API calls**: Fetching ALL user submissions just to check if they own one specific agent - ❌ **Complex logic**: Convoluted creator detection requiring multiple database queries - ❌ **Performance impact**: Especially bad for non-creators who would never need this data **Solutions Implemented**: - ✅ **Added `owner_user_id` field**: Direct ownership reference in `LibraryAgent` model - ✅ **Simple ownership check**: `owner_user_id === user.id` instead of complex submission fetching - ✅ **90%+ performance improvement**: Massive reduction in unnecessary API calls for non-creators - ✅ **Optimized data fetching**: Only fetch submissions when user is creator AND has marketplace listing ### 🔧 **Original Store Submission Validation Issues (BUILDER-59F)** Fixes "Agent not found for this user. User ID: ..., Agent ID: , Version: 0" errors: - **Backend validation**: Added Pydantic validation for `agent_id` (min_length=1) and `agent_version` (>0) - **Frontend validation**: Pre-submission validation with user-friendly error messages - **Agent selection flow**: Fixed `agentId` not being set from `selectedAgentId` - **State management**: Prevented state reset conflicts clearing selected agent ### 🔧 **Marketplace Display Improvements** Enhanced version history and changelog display: - Updated title from "Changelog" to "Version history" - Added "Last updated X ago" with proper relative time formatting - Display version numbers as "Version X.0" format - Replaced all hardcoded values with dynamic API data - Improved text sizes and layout structure ### 📁 **Files Changed** **Backend Changes**: - `backend/api/features/store/db.py` - Simplified deletion logic, added approval protection - `backend/api/features/store/model.py` - Added `listing_id` field, Pydantic validation - `backend/api/features/library/model.py` - Added `owner_user_id` field for efficient creator detection - All test files - Updated with new required fields **Frontend Changes**: - `useMarketplaceUpdate.ts` - Optimized creator detection logic - `MainDashboardPage.tsx` - Added `listing_id` mapping for proper type safety - `useAgentTableRow.ts` - Updated deletion logic to use `store_listing_version_id` - `usePublishAgentModal.ts` - Fixed state reset conflicts - Marketplace components - Enhanced version history display ### ✅ **Benefits** **Performance**: - 🚀 **90%+ reduction** in unnecessary API calls for creator detection - 🚀 **Instant ownership checks** (no database queries needed) - 🚀 **Optimized submissions fetching** (only when needed) **User Experience**: - ✅ **Granular submission control** (delete individual versions, not entire listings) - ✅ **Protected approved content** (prevents accidental store content removal) - ✅ **Better error prevention** (no more "Graph not found" errors) - ✅ **Clear validation messages** (user-friendly error feedback) **Code Quality**: - ✅ **Simplified deletion logic** (85 lines → 32 lines) - ✅ **Better type safety** (proper `listing_id` field usage) - ✅ **Cleaner creator detection** (explicit ownership vs inferred) - ✅ **Automatic cleanup** (empty listings removed automatically) ### 🧪 **Testing** - [x] Backend validation rejects empty agent_id and zero agent_version - [x] Frontend TypeScript compilation passes - [x] Store submission works from both creator dashboard and "become a creator" flows - [x] Granular submission deletion works correctly - [x] Approved submissions are protected from deletion - [x] Creator detection is fast and accurate - [x] Marketplace displays version history correctly **Breaking Changes**: None - All changes are additive and backwards compatible. Fixes critical submission deletion issues, improves performance significantly, and enhances user experience across the platform. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Agent ownership is now tracked and exposed across the platform. * Store submissions and versions now include a required listing_id to preserve listing linkage. * **Bug Fixes** * Prevent deletion of APPROVED submissions; remove empty listings after deletions. * Edits restricted to PENDING submissions with clearer invalid-operation messages. * **Improvements** * Stronger publish validation and UX guards; deduplicated images and modal open/reset refinements. * Version history shows relative "Last updated" times and version badges. * **Tests** * E2E tests updated to target pending-submission flows for edit/delete. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
a81ac150da |
fix(frontend): add word wrapping to CodeRenderer and improve output actions visibility (#11724)
## Changes 🏗️ - Updated the `CodeRenderer` component to add `whitespace-pre-wrap` and `break-words` CSS classes to the `<code>` element - This enables proper wrapping of long code lines while preserving whitespace formatting Before  After  ### 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 code with long lines wraps correctly - [x] Confirmed whitespace and indentation are preserved - [x] Tested code display in various viewport sizes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Code blocks now preserve whitespace and wrap long lines for improved readability. * Output action controls are hidden when there is only a single output item, reducing unnecessary UI elements. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
49ee087496 |
feat(frontend): add new integration images for Webshare and WordPress (#11725)
### Changes 🏗️ Added two new integration icons to the frontend: - `webshare_proxy.png` - Icon for WebShare Proxy integration - `wordpress.png` - Icon for WordPress integration ### 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 both icons display correctly in the integrations section - [x] Confirmed icons render properly at different screen sizes - [x] Checked that the icons maintain quality when scaled #### 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 |
||
|
|
fc25e008b3 |
feat(frontend): update library agent cards to use DS (#11720)
## Changes 🏗️ <img width="700" height="838" alt="Screenshot 2026-01-07 at 16 11 04" src="https://github.com/user-attachments/assets/0b38d2e1-d4a8-4036-862c-b35c82c496c2" /> - Update the agent library cards to new designs - Update page to use Design System components - Allow to edit/delete/duplicate agents on the library list page - Add missing actions on library agent detail page ## 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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Marketplace info shown on agent cards and improved favoriting with optimistic UI and feedback. * Delete agent and delete schedule flows with confirmation dialogs. * **Refactor** * New composable form system, modernized upload dialog, streamlined search bar, and multiple library components converted to named exports with layout tweaks. * New agent card menu and favorite button UI. * **Chores** * Removed notification UI and dropped a drag-drop dependency. * **Tests** * Increased timeouts and stabilized upload/pagination flows. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |