Compare commits

..

175 Commits

Author SHA1 Message Date
Nicholas Tindle
d5b8e2dae0 Merge branch 'dev' into abhi/fix-get-agent-db-function 2025-03-06 11:28:09 -06:00
Nicholas Tindle
da2aa34e3e docs(security): Update disclosure timeline (#9581)
<!-- Clearly explain the need for these changes: -->
Update the security.md based on some advice we got :)

### Changes 🏗️
- Adds an update time window and clarifies time spans
<!-- Concisely describe all of the changes made in this pull request:
-->
2025-03-06 15:59:07 +00:00
Toran Bruce Richards
bc71eac0ec Change agent cover Image gen aspect ratio to 16:9 2025-03-06 14:35:25 +00:00
Krzysztof Czerwinski
3cf198eea1 feat(platform): Onboarding flow backend (#9511)
This PR adds backend to make Onboarding UI added in
https://github.com/Significant-Gravitas/AutoGPT/pull/9485 functional and
adds missing confetti screen at the end of Onboarding.

*Make sure to have at least any 2 agents in store when testing locally.*
Otherwise the onboarding will finish without showing agents.
Visit `/onboarding/reset` to reset onboarding state, otherwise it'll
always redirect to `/library` once finished.

### Changes 🏗️

- Onboarding opens automatically on sign up and login (if unfinished)
for all users
- Update db schema to add `UserOnboarding` and add migration
- Add GET and PATCH `/onboarding` endpoints and logic to retrieve and
update data Onboarding for a user
- Update `POST /library/agents` endpoint
(`addMarketplaceAgentToLibrary`), so it includes input and output nodes;
these are needed to know input schema for the Onboarding
- Use new endpoints during onboarding to fetch and update data
- Use agents from the marketplace and their input schema for the
onboarding
- Add algorithm to choose store agents based on user answers and related
endpoint `GET /onboarding/agents`
- Redirect outside onboarding if finished and resume on proper page
- Add `canvas-confetti` and `@types/canvas-confetti` frontend packages
- Add and show congrats confetti screen when user runs and agent and
before opening library
- Minor design updates and onboarding fixes

### 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] Redirect to `/onboarding/*` on sign up and sign in (if onboarding
unfinished)
  - [x] Onboarding works and can be finished
  - [x] Agent runs on finish
- [x] Onboarding state is saved and logging out or refreshing page
restores correct state (user choices)
- [x] When onboarding finished, trying to go into `/onboarding`
redirects to `/library`

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-03-06 12:19:33 +00:00
Zamil Majdy
e5eadeace4 feat(backend): Improve SmartDecisionMaker Agent-loop capability & add Anthropics support (#9585)
### Changes 🏗️

There are a few agent-loop issues that this PR is addressing:
* There is a lack of support for agent-loop in Anthropic.
* Duplicated system & user prompt as the main objective prompt in the
agent loop.
* A long rendered text of conversation history by
SmartDecisionMakerBlock agent-loop in the UI.
* A lack of execution input being rendered in the execution list making
it harder to debug.



https://github.com/user-attachments/assets/be430000-bde0-40c6-8f2e-c97ce45b5ed1


### 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] Create from scratch and execute an agent with at least 3 blocks
using SmartDecisionMaker Block.
2025-03-06 12:07:41 +00:00
Reinier van der Leer
231775f4d4 fix(backend): Unbreak add_marketplace_agent_to_library (#9578)
- Fixes #9577

### Changes 🏗️

- Add the required include statements to `LibraryAgent` queries
- Make a `library_agent_include(user_id)` utility in
`backend.data.includes`

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  - Go to an agent in the Marketplace; click "Add To Library"
    - [ ] -> should work, not return an error
- [ ] -> should redirect to `/library/agents/[id]` -> should load
normally
2025-03-06 10:53:28 +00:00
Nicholas Tindle
498b3ea882 feat(blocks): add list comments and update comment blocks (#9583)
<!-- Clearly explain the need for these changes: -->
As part of the code review agent, I found these blocks would be useful,
but not required. Adds the ability to list comments on an issue and PR
as well as update comments on an issue, pr and discussion


### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds Listing comments block
- Adds updating comment block

### 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 all of the new blocks on #9582 . Review it for context

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Bentlybro <tomnoon9@gmail.com>
2025-03-06 07:51:27 +00:00
Nicholas Tindle
5b8947ed93 fix(backend): serialize the pydantic objects correctly for github checks and statuses (#9582)
<!-- Clearly explain the need for these changes: -->
Trying to run the GitHub Status blocks results in a serialization error

### Changes 🏗️
- Serializes the checks and blocks data objects correctly
<!-- 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] make a one block agent, test it and make sure it works
2025-03-05 22:04:28 +00:00
Reinier van der Leer
3b53c6953a feat(platform): Agent Run "Stop" + "Delete" functionality (#9547)
- Resolves #9542

### Changes 🏗️

- feat(platform): Add "Delete run" button on `/library/agents/[id]` w/
confirm dialog
  - Add `AgentGraphExecution.isDeleted` column for soft delete
  - Add `DELETE /api/executions/{graph_exec_id}` endpoint
- feat(frontend): Add "Stop run" button on `/library/agents/[id]`

Technical improvements:
- refactor(frontend): Generalize `AgentDeleteConfirmDialog` ->
`DeleteConfirmDialog`
- refactor(frontend): Brand `GraphExecution.execution_id` and
`Schedule.id` to prevent mixing

### 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:
  - Click "Delete run" under "Run actions" in the right sidebar
    - [x] -> Confirmation dialog should show
      - Click "Delete"
        - [x] -> run should disappear from list
        - [x] -> view should switch to "Draft new run" view
        - [x] -> refresh page -> run should not be in list
  - Click "Delete" in the menu on a run in the list
    - [x] -> Confirmation dialog should show
      - Click "Delete"
        - [x] -> run should disappear from list
        - [x] -> refresh page -> run should not be in list

---------

Co-authored-by: Krzysztof Czerwinski <34861343+kcze@users.noreply.github.com>
2025-03-05 16:14:59 +00:00
Reinier van der Leer
37331d09e4 Revert "fix(frontend): Consolidate Application Buttons to ShadcN Base Button Component" (#9575)
Reverts Significant-Gravitas/AutoGPT#9570

Some of the styling changes cause issues with existing parts of the
application, and I don't know if partially reverting would cause issues
with the other refactored components/elements.

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-03-05 15:42:26 +00:00
Reinier van der Leer
595d2020c9 feat(frontend): Loading indicator for button click handlers (#9573)
Show that something is happening when a click handler doesn't return
immediately.

### Changes 🏗️

- Show a loading indicator on buttons while their click handler is
running


https://github.com/user-attachments/assets/5878c5a4-cba2-4125-a101-21220d713232

### 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:
  - Go to `/library/agents/[id]`; click "Run again" on an existing run
    - [x] -> loading indicator should show
    - [x] -> button state should reset once the API request completes
- [x] Check that existing `Button` elements aren't adversely affected by
the styling changes, especially `overflow-hidden`
2025-03-05 14:56:52 +00:00
Zamil Majdy
c091a7be62 feat(backend): Integrate Ideogram for auto-generating created agent thumbnail (#9568)
### Changes 🏗️

Integrate Ideogram for auto-generating created agent thumbnail

![preview of the UI with a generated
image](https://github.com/user-attachments/assets/87fb4179-59e0-4109-b5aa-d45ebe9decf7)

**Note:** switching back to the "old" Replicate-based image generator is
possible by setting `USE_AGENT_IMAGE_GENERATION_V2=false`.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-03-05 14:41:42 +00:00
Bently
b50ecbf7e9 fix(frontend): Featured agents cards layout+sizing (#9482)
### Changes 🏗️

right now the featured agents cards dont have a set width/height, so
they change depending on the content, and the description is duplicated.
also, the "by {creator username}" was removed. currently it looks like
this:


![chrome_SBwRrkEN28](https://github.com/user-attachments/assets/1bff2206-ec80-46ee-8b84-e510de04b869)

with my changes, i set a fixed width and height so they dont change, the
description now only shows on hover and is truncated to 11 lines, and i
added back the "by {creator username}"


![chrome_qujRVF4LsX](https://github.com/user-attachments/assets/927629db-1bdd-426c-8d6d-d39a67152389)

---------

Co-authored-by: Andy Hooker <58448663+andrewhooker2@users.noreply.github.com>
2025-03-05 14:12:28 +00:00
Zamil Majdy
900a661266 fix(backend): Filter out empty object from conversation_history pin on SmartDecisionMakerBlock 2025-03-05 21:23:31 +07:00
Zamil Majdy
55d6495155 fix(backend): Increase logging level threshold of RPC service to WARNING (#9576)
Increase the logging threshold to WARNING to avoid chatty RPC service
request logs.

Before:
![RPC calls show up in backend
log](https://github.com/user-attachments/assets/70791f87-12ef-4a12-8343-4b8641302faa)
2025-03-05 12:35:43 +00:00
Andy Hooker
b5c100748f fix(library): Anchor message to bottom of page (#9572)
This PR fixes the layout of the Library page. It properly anchors the
'old experience' message to the bottom of the viewport and improves the
overall page structure using semantic HTML and Tailwind best practices.

Resolves: #9524 

### Changes 🏗️
- Restructured the LibraryPage component to use proper semantic HTML
with a `<main>` element
- Added a fixed Alert component at the bottom of the viewport with 8px
margin
- Used ShadcN Alert component for the 'old experience' message for UI
consistency
- Implemented responsive behavior to hide the alert on mobile screens
- Optimized Tailwind classes by using the `container` utility and
removing redundant styles
- Improved accessibility and UX by using appropriate semantic elements

### Screenshot
<img width="926" alt="image"
src="https://github.com/user-attachments/assets/e393007c-639e-4383-922c-41fa67133da8"
/>

### 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:

<details>
  <summary>Alert Message at Bottom of Library Page</summary>

- [ ] Visit the Library page and verify the alert appears fixed at the
bottom with 8px margin
- [ ] Resize browser window to various desktop sizes and confirm alert
remains centered
- [ ] Scroll through Library page content and verify the alert stays
fixed at the bottom
- [ ] Open developer tools and toggle to mobile view (width < 640px) to
confirm alert is hidden
- [ ] Test in both light and dark mode to ensure alert styling is
consistent with theme
- [ ] Click the "here" link in the alert and verify it navigates to the
monitoring page
- [ ] Verify that QuestionMarkCircled icon in the alert is properly
styled and visible

</details>

---------

Co-authored-by: Bentlybro <tomnoon9@gmail.com>
2025-03-05 10:11:21 +00:00
Libin Rahman
09494809c1 Enhance process management with error handling and lifecycle improvements (#9565)
Enhance process management with error handling, lifecycle improvements,
and better resource management

- Added robust error handling for process startup failures.
- Implemented proper cleanup of processes during failure scenarios.
- Added detailed error logging for process failures and cleanup
operations.
- Enhanced process lifecycle with health checks.
- Added success logging for process terminations.


These updates enhance the reliability and maintainability of the system.

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-03-05 07:44:42 +00:00
Andy Hooker
122be761b6 fix(frontend): Consolidate Application Buttons to ShadcN Base Button Component (#9570)
Our application currently uses multiple inconsistent button
implementations across the codebase.
This PR standardizes buttons to use our base Button component that
leverages ShadcN, improving UI consistency, maintainability, and
accessibility.

Resolves: #9567 

### Changes 🏗️

- Replaced custom button implementations in various components with our
base Button component and greatly reduced redundant overlapping styles.
- Paired with our designer to streamline our `globals.css` to match the
desired approach.
- Added button variant documentation in Storybook
- Deprecated the obsolete 'primary' class  and marked it.

### Screenshots 📷

#### Variants  
<img width="466" alt="image"
src="https://github.com/user-attachments/assets/9e4f6360-57ec-4f28-b702-e57252d67def"
/>

<img width="418" alt="image"
src="https://github.com/user-attachments/assets/a9af17dc-e8bc-429d-a9ac-8380e34b9089"
/>

<img width="129" alt="image"
src="https://github.com/user-attachments/assets/2df5d184-bb49-4640-bfb4-879360ca35e6"
/>

### 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:

<details>
  <summary>Button Consolidation Test Plan</summary>
 Visual Verification

- [ ] Verify all button variants (default, destructive, outline,
secondary, ghost, link) render correctly
- [ ] Confirm button styling is consistent across all themes (light,
dark, etc.)
- [ ] Validate that the rounded-full style is applied to appropriate
variants

 Functional Testing

- [ ]  Test click handlers continue to work on all migrated buttons
- [ ] Verify hover, focus, and active states display correctly on all
buttons
- [ ]  Confirm disabled states are working properly
- [ ]  Test loading state animations and behavior

 Responsive Testing

- [ ]  Verify button layouts on mobile devices (< 640px)
- [ ]  Confirm button layouts on tablet devices (640px - 1024px)
- [ ]  Test button layouts on desktop screens (> 1024px)
</details>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-03-05 07:01:11 +00:00
Zamil Majdy
3adc9724fe fix(backend): Error out execution when no starting node is available (#9566)
### Changes 🏗️

Prevent a graph being executed and do nothing by erroring out when no
starting node is available.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-03-05 06:58:57 +00:00
Zamil Majdy
e7888ddb9f feat(backend): Enable safe URL redirect on web requests for blocks (#9555)
We've disabled the request for security reasons, and the current request
library breaks on the 301 web response.

### Changes 🏗️

Add manually safe URL redirect on our web request layer.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-03-05 05:19:29 +00:00
Nicholas Tindle
265a9265f7 feat(backend): low balance notiifcation (#9534)
<!-- Clearly explain the need for these changes: -->
For emailing, we want the user to know when an agent stopped because
their balance was too low. This is the first step of that.

### Changes 🏗️
- Raise InsufficientBalanceError from credit system rather than value
error when user runs out of money
- Handle when an agent output isn't hooked up well
- Fix the contents of the email for low balance to be a bit more aligned
with the PRD
- expose the topup intent from the db manager
- objectify the execution stats so we can pass it around a bit more type
safe
- extract the notification stuff in manager into a function
<!-- 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] Set balance to $0.01
  - [x] Run an agent that costs something more than $0.01
  - [x] Check you get an email
  - [x] Check your top up link works

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-03-05 05:16:57 +00:00
Reinier van der Leer
27a5635607 feat(platform): Library Agent "Delete" functionality (#9546)
- Resolves #9545

### Changes 🏗️

- fix(platform): Make "Delete" button on `/monitoring` soft-delete the
`LibraryAgent` instead of hard-deleting the corresponding `AgentGraph`
- feat(frontend): Add "Delete agent" button on `/library/agents/[id]`

Technical:
- fix(backend): Accept partial input on `update_library_agent` endpoint
- feat(backend): Add `GET /api/library/agents/{library_agent_id}`
endpoint
- refactor(frontend): Replace use of `GraphMeta` by `LibraryAgent` where
possible on `/library/agents/[id]`

Also, out of scope but important:
- fix(frontend): Hide buttons that require direct graph access depending
on `agent.can_access_graph`

### 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:
  - Go to the Library and select an agent
    - [x] -> `/library/agents/[id]` should load normally
      - Save this URL for later (especially the ID)!
  - Click "Delete agent" on `/library/agents/[id]`
    - [x] -> should show a confirmation dialog
    - Click "Delete" to confirm
      - [x] -> should redirect back to `/library`
      - [x] -> deleted agent should no longer be listed in the Library
  - Click "Delete agent" on `/monitoring`
    - [x] -> should show a confirmation dialog
    - Click "Delete" to confirm
      - [x] -> agent should disappear from agent list
- [x] -> views should reset / deselect the deleted agent where
applicable
2025-03-03 16:49:44 +00:00
Zamil Majdy
ef00ab51e0 fix(backend): Cleanup on validation logic for AgentExecutorBlock & SmartDecisionMakerBlock 2025-03-02 18:17:01 +07:00
Zamil Majdy
36447a0c58 feat(backend): Add tool execution response on Smart Decision Block (#9552)
**Proposal / Request For Comments** 

The tool calling provided by the LLM provider requires an output
generated by the tool to be looped back as part of the conversation
history. The scope of this PR is trying to address the need to fulfill
the feature expectation.

### Changes 🏗️

* `Last Tool Output` is introduced to loop back the output of the tool
back to Smart Decision Block.
* Smart Decision Block execution will be pending unless the `Last Tool
Output` us provided where a pending tool call is present in the
conversation history.
* **Known hack**: The last tool output will prefill all the pending tool
calls from the conversation history.
* A few tweaks were required to allow a blocking loop to be executed
without awaiting on all the inbound links.

<img width="1395" alt="image"
src="https://github.com/user-attachments/assets/fdad4407-621b-45d0-a457-76b2d4c853b9"
/>


### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-03-02 10:46:41 +00:00
Zamil Majdy
1e31136358 fix(backend): Fix json to_dict method on string value 2025-03-02 09:33:16 +07:00
Zamil Majdy
a024b9a398 fix(backend): Fix conversation history propagation on SmartDecisionBlock & AIBlock 2025-03-02 05:49:40 +07:00
Zamil Majdy
83d879ea65 fix(backend): Use raw content from the LLM as conversation history (#9551)
### Changes 🏗️

Instead of parsing an LlmMessage by ourselves, we use raw content from
the LLM as conversation history and accept any format it introduces.

Example output:
```
[
  {
    "role": "system",
    "content": "Thinking carefully step by step decide which function to call. Always choose a function call from the list of function signatures. The test graph is basically an all knowing answer machine you can use it to get an answer"
  },
  {
    "role": "user",
    "content": "Hey how's the weather today"
  },
  {
    "role": "assistant",
    "audio": null,
    "content": null,
    "refusal": null,
    "tool_calls": [
      {
        "id": "call_Z7CKKIkldylmfWJdE6ZnDxjr",
        "type": "function",
        "function": {
          "name": "storevalueblock",
          "arguments": "{\"input\":\"I don't have context for your location. Could you provide one?\"}"
        }
      }
    ],
    "function_call": null
  }
]
```

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-03-01 20:41:38 +00:00
Zamil Majdy
d3b83b79f9 fix(backend): Append prompt into the conversations output & Remove unused output pin on SmartDecisionBlock (#9550)
### Changes 🏗️

Append prompt into the conversations output & Remove unused output pin
on SmartDecisionBlock.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-03-01 13:52:20 +00:00
Zamil Majdy
91b1cc90aa fix(backend): Fix failure of get_graph_metadata call on SmartDecisionMaker.py 2025-03-01 19:12:34 +07:00
Zamil Majdy
7747ad8f4c feat(backend): Add conversation history as Smart Decision Block output (#9540)
Now that the MVP for Smar Decision Block is available, we need to add
this info in the block output:

Messages (list) - The messages list sent to the LLM plus its generated
response as the latest assistant entry. This is a single list of
dictionaries in standard LLM API format).

### Changes 🏗️

* Add `conversations` output pin that populates the update
`conversation_history` input pin with the assistant response.
* Refactored `Smart Decision Block` to avoid downloading the whole graph
on each execution, remove code duplication, declutter data fetching.
* Minor UI issue on the smart decision block entry in the search bar. 

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

Co-authored-by: Swifty <craigswift13@gmail.com>
2025-02-28 15:03:34 +00:00
Reinier van der Leer
f6c93eeeff feat(platform): Cost indication for agent runs (#9527)
- Resolves #9181

### Changes 🏗️

- Add agent run cost indication to `/monitoring` and
`/library/agents/[id]`

Backend:
- Add `GraphExecutionMeta.cost` property - value sourced from
`AgentGraphExecution.stats["cost"]`

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  - Run an agent
- [ ] Check out the agent run on `/library/agents/[id]` -> should show
cost
  - [ ] Check out the agent run on `/monitoring` -> should show cost
2025-02-28 14:20:46 +00:00
Zamil Majdy
52ee7d150e fix(frontend): Remove unused Stripe on frontend (#9536)
### Changes 🏗️

Remove Stripe on frontend.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-27 11:13:53 +00:00
Zamil Majdy
c1b12d4a12 feat(backend): Add cost on node & graph execution stats (#9520)
<!-- Clearly explain the need for these changes: -->
We want the agent run data to be accurate, which means we need to
collect it in the right place and with the correct data

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Updates email templates
- Updates how we collect the data for the agent run event

### 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] Run agents and read the email we get

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-27 09:39:06 +00:00
Nicholas Tindle
d7cdf751a8 fix(backend): allow more than one arg on the tuple (#9535)
<!-- Clearly explain the need for these changes: -->
We allow tuples to be returned from exceptions, but pydantic restricts
their size to 1 b/c the typehint. This fixes that

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds `, ...` to the tuple type hint

### 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] Extracted from other pr where it was tested as part of an
exception
2025-02-27 09:18:14 +00:00
Zamil Majdy
58f6491496 feat(backend): Propagate error arguments on RPC exceptions (#9533)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

Exception can contain more than message, so we propagate the whole args
as long as it is serializable.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-27 06:58:25 +00:00
Swifty
1011b70d41 fix(platform): Add Block Costs for SDM Block (#9531)
The Smart Decision Maker block needs to have costs associated with it.

### Changes 🏗️

- Added config for SDM Block Costs
2025-02-26 22:07:32 +00:00
Zamil Majdy
538ad06547 fix(backend): Fix exception response on RPC error & Missing Graph Running Status (#9529)
HttpResponse error introduced by RPC is buggy since we are returning the
exception as is instead of the string version of it.
Also `RUNNING` status on the graph execution is missing.

### Changes 🏗️

* Refactored & fixed the exception return handling on RPC failure.
* Add `RUNNING` status update during the graph execution.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-26 20:23:33 +00:00
Reinier van der Leer
5f5d30a17a fix(backend): Use Pyro for RPC by default (#9528)
- Follow-up to #9508 

HTTP-based RPC has not been fully tested and should be disabled by
default.

### Changes 🏗️

- Disable HTTP-based RPC and use Pyro by default
2025-02-26 14:26:09 +00:00
Nicholas Tindle
af8ea93260 feat(backend): handle bounced emails from postmark (#9506)
<!-- Clearly explain the need for these changes: -->
If we bounce too many emails from Postmark, they will be really upset
with us, which is not so good. We need a way to react when we bounce
emails, so we set it up so they notify us via webhooks.

We also need to build authentication into those webhooks to prevent
random people from sending us fake webhooks.

All this together means we need a new route for the inbound webhook.

To do this, we need a way to track if the email address is valid. So,
after chatting with @itsababseh, we are adding a validated email field
that defaults to `True` because all the users are already validated in
prod. In dev, we may suffer.

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds special API Key auth handler to the libs so that we can easily
test stuff on the /docs endpoint and re-use it if needed
- Adds New Secret for this API key from postmark
- Adds a validatedEmail boolean to the`User` table
- Adds a postmark endpoint to the routers list for handling the inbound
webhook from Postmark
- "Handle" all the various things this endpoint could send us (most of
them we do nothing about)

### 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] Sign up with john@example.com email (the one postmark uses in
webhooks)
  - [x] Set email validation to true
  - [x] Send the bounce webhook notice
  - [x] Check it gets set to false

#### For configuration changes:
- [x] `.env.example` 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**)
2025-02-25 20:59:41 +00:00
Swifty
108b0aaa4c feat(blocks): Enabled block Usage for Smart Decision Maker Block (#9514)
Originally we did not allow Blocks to be used as tools due to the
limitations of communicating the correct tool function signatures.

It has however, been decided to allow them to be used knowing that there
are limitations with them.


### Changes 🏗️

- Added ability to execute blocks as tools

### Checklist 📋

<img width="613" alt="Screenshot 2025-02-25 at 12 49 26"
src="https://github.com/user-attachments/assets/e614f56d-2bdc-46c9-8c2c-e56f80343bde"
/>
 - create an agent with an SDM block and a block as a tool
 - run agent and make sure the block can be called as a tool

#### 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:

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-02-25 17:37:06 +00:00
Swifty
e752f0f342 feat(platform/library): Agent Library v2 (#9407)
- Resolves #8774
  - Resolves #8775
- Includes back-end work for #9168
- Partially implements #8776
- Partially implements #8777

### Changes 🏗️

- Add `/library` page
- Change target of "Library" navigation link from `/monitoring` to
`/library`
- Move `/agents/[id]` page to `/library/agents/[id]`
- Set application background color to `bg-neutral-50`
- Redirect to new library agent's "runs" page (`/library/agents/[id]`)
after adding from marketplace

Further (technical) frontend changes:
- Add types and client methods for all library API endpoints
- Added `primary` variant to `agptui/Button` component

Backend changes:
- Add functionality to library backend
  - Aggregate agent status
  - Image generation for use in library view
    - Add `LibraryAgent.imageUrl` column to DB schema
  - Sorting & pagination
  - Explicit relation between library agents and their graph's creator
- Refactor & update API endpoints for DX
- Other minor refactoring
- Add missing but required `MEDIA_GCS_BUCKET_NAME` to `.env.example`

### 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:
  - `/library`
    - [x] Create agent from scratch -> should show up on `/library`
- [x] Add agent to library from marketplace -> should show up on
`/library`
- [x] Click on agent in `/library` -> should go to
`/library/agents/[id]`
    - [x] Test sorting & pagination functionality
  - `/library/agents/[id]`
    - [x] Fill out inputs and click "Run" -> should run like normally
    - [x] Select completed agent run -> should show all inputs & outputs
- [x] Click "run again" on a completed agent run -> should run
successfully with same input
  - [x] `/monitoring` should still work the same as before

---------

Co-authored-by: abhi1992002 <abhimanyu1992002@gmail.com>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-25 17:29:15 +00:00
Swifty
b603ed2d2a feature(platform) Smart Decision Maker Block (#9490)
## Task

The SmartDecisionMakerBlock is a specialized block in a graph-based
system that leverages a language model (LLM) to make intelligent
decisions about which tools or functions to invoke based on a
user-provided prompt. It is designed to process input data, interact
with a language model, and dynamically determine the appropriate tools
to call from a set of available options, making it a powerful component
for AI-driven workflows.

## How It Works in Practice

- **Scenario:** Imagine a workflow where a user inputs, "Send an email
to John about the meeting." The SmartDecisionMakerBlock is connected to
tools like send_email, schedule_meeting, and search_contacts.
- **Execution:**
1. The block receives the prompt and system instructions (e.g., "Choose
a function to call").
2.It identifies the available tools from the graph and constructs their
signatures (e.g., send_email(recipient, subject, body)).
3. The LLM analyzes the prompt and decides to call send_email with
arguments like recipient: "John", subject: "Meeting", body: "Let’s
discuss...".
4. The block yields these tool-specific outputs, which can be picked up
by downstream nodes to execute the email-sending action.


## Changes 🏗️
- Add the Smart Decision Maker (SDM) block.
- Break circular imports in integration code.

![Screenshot 2025-02-21 at 10 23
25](https://github.com/user-attachments/assets/6fbfd875-fb1b-4d77-8051-a214c3c86082)


## Work in Progress

⚠️ **Important note this is a temporary UX for the system - UX will be
addressed in a future PR** ⚠️

### Current Status

I’m currently focused on the smart decision logic. The main additions in
the ongoing PR include:
- Defining function signatures for OpenAI function-calling schemas based
on node links and the linked blocks.
- Adding tests for function signature generation.
- Force all tool calls to be made via an agent. (Need to uncomment)
- Restrict each tool call entry to a single node.
- simplify the output emission process, to emit each parameter one at a
time.
- Change test to use agents and hardcode output how I think it should
work to test it does actually work
- Hook up openai, in a simplified way, to test the function calling
(mock for testing)
- Once all the above is working, use credentials system and build of
llm.py



### What’s Next

- Review Process

### Reviewers Phase 1

This PR is now ready for review, during the first phase of reviews I'm
looking for comments on approach and logic.

Out of scope:  code style and organization at this stage

### Reviewers Phase 2

Once we are all happy with the approach and logic. We can open the
review process to general code quality and nits, to be considered.

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-02-25 15:29:22 +01:00
Zamil Majdy
f1fa9009b3 fix(backend): Fix api host for FastAPI RPC Server 2025-02-25 17:04:45 +07:00
Zamil Majdy
d0d3cc07a3 fix(frontend): Minor UI changes; Align badges & buttons on LibraryV1 (#9512)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

While V2 Library is coming, this has been my pet peeve

<img width="1428" alt="image"
src="https://github.com/user-attachments/assets/39c0b84e-4dfe-44e1-b455-cd0330ae7222"
/>

to

<img width="1428" alt="image"
src="https://github.com/user-attachments/assets/ab41973b-8ce8-4772-a4ab-e0dcd8b75464"
/>


### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-25 09:37:01 +00:00
Zamil Majdy
1d59fc869d feat(backend): Pyro to FastAPI migration for micro service (#9508)
Due to legacy reasons, we've been using Pyro for our inter-process
communication channel. While it fulfilled our initial needs, there were
a few limitations that have been encountered:
* Each connection will reserve 1 thread, when the thread is running out
there will be no connection being accepted by the service.
* Lack of asynchronous execution mode, we are locked in the sync
execution which ended up wasting the I/O bound workload. Moving away
from this will unlock async execution support for agent blocks.
* Low throughput, while the database is still the main bottleneck, we've
started seeing instances where the service is being denied due to the
high traffic of the Pyro service.

### Changes 🏗️

Replace the usage of Pyro with the FastAPI Rest HTTP server and make the
code work.

Introduced the new config:
`use_http_based_rpc`: Whether to use HTTP-based RPC for communication
between services.

If it's enabled FastAPI will be used, if it's disabled existing Pyro
will be used.

### 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] Create from scratch and execute an agent with at least 3 blocks
with cost (AI blocks).
- [x] Import an agent from file upload, and confirm it executes
correctly

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [x] `.env.example` 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**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-25 05:04:10 +00:00
dependabot[bot]
a694cf1e9d chore(libs/deps-dev): bump ruff from 0.9.3 to 0.9.6 in /autogpt_platform/autogpt_libs in the development-dependencies group across 1 directory (#9454)
Bumps the development-dependencies group with 1 update in the
/autogpt_platform/autogpt_libs directory:
[ruff](https://github.com/astral-sh/ruff).

Updates `ruff` from 0.9.3 to 0.9.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.9.6</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Add <code>external_task.{ExternalTaskMarker,
ExternalTaskSensor}</code> for <code>AIR302</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16014">#16014</a>)</li>
<li>[<code>flake8-builtins</code>] Make strict module name comparison
optional (<code>A005</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15951">#15951</a>)</li>
<li>[<code>flake8-pyi</code>] Extend fix to Python &lt;= 3.9 for
<code>redundant-none-literal</code> (<code>PYI061</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16044">#16044</a>)</li>
<li>[<code>pylint</code>] Also report when the object isn't a literal
(<code>PLE1310</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15985">#15985</a>)</li>
<li>[<code>ruff</code>] Implement <code>indented-form-feed</code>
(<code>RUF054</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16049">#16049</a>)</li>
<li>[<code>ruff</code>] Skip type definitions for
<code>missing-f-string-syntax</code> (<code>RUF027</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16054">#16054</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-annotations</code>] Correct syntax for
<code>typing.Union</code> in suggested return type fixes for
<code>ANN20x</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16025">#16025</a>)</li>
<li>[<code>flake8-builtins</code>] Match upstream module name comparison
(<code>A005</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16006">#16006</a>)</li>
<li>[<code>flake8-comprehensions</code>] Detect overshadowed
<code>list</code>/<code>set</code>/<code>dict</code>, ignore variadics
and named expressions (<code>C417</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15955">#15955</a>)</li>
<li>[<code>flake8-pie</code>] Remove following comma correctly when the
unpacked dictionary is empty (<code>PIE800</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16008">#16008</a>)</li>
<li>[<code>flake8-simplify</code>] Only trigger <code>SIM401</code> on
known dictionaries (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15995">#15995</a>)</li>
<li>[<code>pylint</code>] Do not report calls when object type and
argument type mismatch, remove custom escape handling logic
(<code>PLE1310</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15984">#15984</a>)</li>
<li>[<code>pyupgrade</code>] Comments within parenthesized value ranges
should not affect applicability (<code>UP040</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16027">#16027</a>)</li>
<li>[<code>pyupgrade</code>] Don't introduce invalid syntax when
upgrading old-style type aliases with parenthesized multiline values
(<code>UP040</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16026">#16026</a>)</li>
<li>[<code>pyupgrade</code>] Ensure we do not rename two type parameters
to the same name (<code>UP049</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16038">#16038</a>)</li>
<li>[<code>pyupgrade</code>] [<code>ruff</code>] Don't apply renamings
if the new name is shadowed in a scope of one of the references to the
binding (<code>UP049</code>, <code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16032">#16032</a>)</li>
<li>[<code>ruff</code>] Update <code>RUF009</code> to behave similar to
<code>B008</code> and ignore attributes with immutable types (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16048">#16048</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Root exclusions in the server to project root (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16043">#16043</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>flake8-datetime</code>] Ignore <code>.replace()</code> calls
while looking for <code>.astimezone</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16050">#16050</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid <code>TC004</code> false
positive where the runtime definition is provided by
<code>__getattr__</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16052">#16052</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Improve <code>ruff-lsp</code> migration document (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16072">#16072</a>)</li>
<li>Undeprecate <code>ruff.nativeServer</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16039">#16039</a>)</li>
</ul>
<h2>Contributors</h2>
<ul>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/Daverball"><code>@​Daverball</code></a></li>
<li><a
href="https://github.com/InSyncWithFoo"><code>@​InSyncWithFoo</code></a></li>
<li><a href="https://github.com/Lee-W"><code>@​Lee-W</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/carlosgmartin"><code>@​carlosgmartin</code></a></li>
<li><a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a></li>
<li><a href="https://github.com/dylwil3"><code>@​dylwil3</code></a></li>
<li><a
href="https://github.com/junhsonjb"><code>@​junhsonjb</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.9.6</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Add <code>external_task.{ExternalTaskMarker,
ExternalTaskSensor}</code> for <code>AIR302</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16014">#16014</a>)</li>
<li>[<code>flake8-builtins</code>] Make strict module name comparison
optional (<code>A005</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15951">#15951</a>)</li>
<li>[<code>flake8-pyi</code>] Extend fix to Python &lt;= 3.9 for
<code>redundant-none-literal</code> (<code>PYI061</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16044">#16044</a>)</li>
<li>[<code>pylint</code>] Also report when the object isn't a literal
(<code>PLE1310</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15985">#15985</a>)</li>
<li>[<code>ruff</code>] Implement <code>indented-form-feed</code>
(<code>RUF054</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16049">#16049</a>)</li>
<li>[<code>ruff</code>] Skip type definitions for
<code>missing-f-string-syntax</code> (<code>RUF027</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16054">#16054</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-annotations</code>] Correct syntax for
<code>typing.Union</code> in suggested return type fixes for
<code>ANN20x</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16025">#16025</a>)</li>
<li>[<code>flake8-builtins</code>] Match upstream module name comparison
(<code>A005</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16006">#16006</a>)</li>
<li>[<code>flake8-comprehensions</code>] Detect overshadowed
<code>list</code>/<code>set</code>/<code>dict</code>, ignore variadics
and named expressions (<code>C417</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15955">#15955</a>)</li>
<li>[<code>flake8-pie</code>] Remove following comma correctly when the
unpacked dictionary is empty (<code>PIE800</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16008">#16008</a>)</li>
<li>[<code>flake8-simplify</code>] Only trigger <code>SIM401</code> on
known dictionaries (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15995">#15995</a>)</li>
<li>[<code>pylint</code>] Do not report calls when object type and
argument type mismatch, remove custom escape handling logic
(<code>PLE1310</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15984">#15984</a>)</li>
<li>[<code>pyupgrade</code>] Comments within parenthesized value ranges
should not affect applicability (<code>UP040</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16027">#16027</a>)</li>
<li>[<code>pyupgrade</code>] Don't introduce invalid syntax when
upgrading old-style type aliases with parenthesized multiline values
(<code>UP040</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16026">#16026</a>)</li>
<li>[<code>pyupgrade</code>] Ensure we do not rename two type parameters
to the same name (<code>UP049</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16038">#16038</a>)</li>
<li>[<code>pyupgrade</code>] [<code>ruff</code>] Don't apply renamings
if the new name is shadowed in a scope of one of the references to the
binding (<code>UP049</code>, <code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16032">#16032</a>)</li>
<li>[<code>ruff</code>] Update <code>RUF009</code> to behave similar to
<code>B008</code> and ignore attributes with immutable types (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16048">#16048</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Root exclusions in the server to project root (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16043">#16043</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>flake8-datetime</code>] Ignore <code>.replace()</code> calls
while looking for <code>.astimezone</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16050">#16050</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid <code>TC004</code> false
positive where the runtime definition is provided by
<code>__getattr__</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16052">#16052</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Improve <code>ruff-lsp</code> migration document (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16072">#16072</a>)</li>
<li>Undeprecate <code>ruff.nativeServer</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16039">#16039</a>)</li>
</ul>
<h2>0.9.5</h2>
<h3>Preview features</h3>
<ul>
<li>Recognize all symbols named <code>TYPE_CHECKING</code> for
<code>in_type_checking_block</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15719">#15719</a>)</li>
<li>[<code>flake8-comprehensions</code>] Handle builtins at top of file
correctly for <code>unnecessary-dict-comprehension-for-iterable</code>
(<code>C420</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15837">#15837</a>)</li>
<li>[<code>flake8-logging</code>] <code>.exception()</code> and
<code>exc_info=</code> outside exception handlers (<code>LOG004</code>,
<code>LOG014</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15799">#15799</a>)</li>
<li>[<code>flake8-pyi</code>] Fix incorrect behaviour of
<code>custom-typevar-return-type</code> preview-mode autofix if
<code>typing</code> was already imported (<code>PYI019</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15853">#15853</a>)</li>
<li>[<code>flake8-pyi</code>] Fix more complex cases
(<code>PYI019</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15821">#15821</a>)</li>
<li>[<code>flake8-pyi</code>] Make <code>PYI019</code> autofixable for
<code>.py</code> files in preview mode as well as stubs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15889">#15889</a>)</li>
<li>[<code>flake8-pyi</code>] Remove type parameter correctly when it is
the last (<code>PYI019</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15854">#15854</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="524cf6e515"><code>524cf6e</code></a>
Bump version to 0.9.6 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16074">#16074</a>)</li>
<li><a
href="857cf0deb0"><code>857cf0d</code></a>
Revert tailwindcss v4 update (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16075">#16075</a>)</li>
<li><a
href="0f1eb1e2fc"><code>0f1eb1e</code></a>
Improve migration document (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16072">#16072</a>)</li>
<li><a
href="b69eb9099a"><code>b69eb90</code></a>
Fix reference definition labels for backtick-quoted shortcut links (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16035">#16035</a>)</li>
<li><a
href="d2f661f795"><code>d2f661f</code></a>
RUF009 should behave similar to B008 and ignore attributes with
immutable typ...</li>
<li><a
href="07cf8852a3"><code>07cf885</code></a>
[<code>pylint</code>] Also report when the object isn't a literal
(<code>PLE1310</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15985">#15985</a>)</li>
<li><a
href="c08989692b"><code>c089896</code></a>
Update Rust crate rustc-hash to v2.1.1 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16060">#16060</a>)</li>
<li><a
href="869a9543e4"><code>869a954</code></a>
Root exclusions in the server to project root (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16043">#16043</a>)</li>
<li><a
href="cc0a5dd14a"><code>cc0a5dd</code></a>
Directly include <code>Settings</code> struct for the server (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16042">#16042</a>)</li>
<li><a
href="b54e390cb4"><code>b54e390</code></a>
Update Rust crate clap to v4.5.28 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16059">#16059</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.9.3...0.9.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.9.3&new-version=0.9.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bently <tomnoon9@gmail.com>
2025-02-24 09:02:25 +00:00
Zamil Majdy
cca99c850d fix(frontend): Minor UI tweak, fix non-accessible button on phone screen (#9504)
### Changes 🏗️
Fix these buttons:

![image](https://github.com/user-attachments/assets/bd6753a3-49b4-4d9b-8533-6d145dc8f387)
<img width="337" alt="image"
src="https://github.com/user-attachments/assets/702bf3e1-7168-4372-8dcf-71abdea0bc19"
/>
<img width="337" alt="image"
src="https://github.com/user-attachments/assets/362a5e44-3bd4-4849-ba92-8b21cfcfe767"
/>


### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com>
2025-02-24 09:01:22 +00:00
Tom Hu
bfcc0c93b3 feat: add Codecov test analytics for flaky and failed tests (#9420)
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-21 21:04:19 -06:00
dependabot[bot]
d310943f34 chore(backend/deps): bump websockets from 13.1 to 14.2 in /autogpt_platform/backend (#9398)
Bumps [websockets](https://github.com/python-websockets/websockets) from
13.1 to 14.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/python-websockets/websockets/releases">websockets's
releases</a>.</em></p>
<blockquote>
<h2>14.2</h2>
<p>See <a
href="https://websockets.readthedocs.io/en/stable/project/changelog.html">https://websockets.readthedocs.io/en/stable/project/changelog.html</a>
for details.</p>
<h2>14.1</h2>
<p>See <a
href="https://websockets.readthedocs.io/en/stable/project/changelog.html">https://websockets.readthedocs.io/en/stable/project/changelog.html</a>
for details.</p>
<h2>14.0</h2>
<p>See <a
href="https://websockets.readthedocs.io/en/stable/project/changelog.html">https://websockets.readthedocs.io/en/stable/project/changelog.html</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="624a36cc9c"><code>624a36c</code></a>
Release version 14.2.</li>
<li><a
href="c8242bbb3a"><code>c8242bb</code></a>
Add changelog for <a
href="https://redirect.github.com/python-websockets/websockets/issues/1566">#1566</a>.</li>
<li><a
href="17e309a830"><code>17e309a</code></a>
Mention another symptom in the changelog.</li>
<li><a
href="7de24bd087"><code>7de24bd</code></a>
Improve previous commit.</li>
<li><a
href="7e617b2a57"><code>7e617b2</code></a>
Add regex support in <code>ServerProtocol(origins=...)</code>.</li>
<li><a
href="613f3f0ef8"><code>613f3f0</code></a>
Prevent close() from blocking when reading is paused.</li>
<li><a
href="e7a098e1a0"><code>e7a098e</code></a>
Prevent AssertionError in the recv_events thread.</li>
<li><a
href="031ec31b70"><code>031ec31</code></a>
Prevent close() from blocking when reading is paused.</li>
<li><a
href="6317c00cc5"><code>6317c00</code></a>
Clarify behavior of <code>recv(timeout=0)</code> behavior.</li>
<li><a
href="b1e88fcb77"><code>b1e88fc</code></a>
Bump pypa/cibuildwheel from 2.21.3 to 2.22.0</li>
<li>Additional commits viewable in <a
href="https://github.com/python-websockets/websockets/compare/13.1...14.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=websockets&package-manager=pip&previous-version=13.1&new-version=14.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bentlybro <tomnoon9@gmail.com>
2025-02-22 00:08:08 +00:00
Krzysztof Czerwinski
0b992223df feat(frontend): Onboarding flow UI (#9485)
### Changes 🏗️
This PR adds interactive UI for the onboarding flow, without any
connection to the backend.
Visit `/onboarding` to see it!

- Add Onboarding pages to `app/onboarding/`
- Add Onboarding components to `components/onboarding`

Note:
- Backend isn't connected, so the agents won't run and state isn't
preserved
- Onboarding state is lost on refresh

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...
2025-02-21 16:07:27 +00:00
Krzysztof Czerwinski
70d095ba98 fix(frontend): Fix Run/Stop button on Builder page refresh (#9503)
When opened graph is running and Builder page is refreshed the bottom
says `Run` but should show `Stop` instead.

### Changes 🏗️

- Fix state on refresh, so that the bottom button is `Stop` if graph is
currently running

### 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] Refresh still retrieves past and ongoing execution updates
- [x] Bottom Builder button says `Stop` when page is refreshed and graph
is running
  - [x] `Stop` button works and terminates execution
2025-02-21 13:09:05 +00:00
Zamil Majdy
a692eedb1c feat(backend): Notification Integration for credits system (#9488)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

Add email notifications on refund events.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-20 12:19:58 +00:00
Nicholas Tindle
4ae016606b feat(backend): move failed messages into a dead letter queue (#9501)
<!-- Clearly explain the need for these changes: -->
When we fail to process something, we don't want to keep retrying
forever. We should store those and process them later

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Fix the type of the failed exchange from Direct to Topic to allow
filtering based on name (allows us later to do more advanced handling of
queue types)
- abstract processing the messages in a queue a bit to reduce repeated
code
- abstract how we check if a user wants a notification so that its a bit
easier to process
- Handle errors better
- Abstract model parsing

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

---------

Co-authored-by: Bently <tomnoon9@gmail.com>
2025-02-20 10:09:51 +00:00
Zamil Majdy
63005631f0 fix(frontend): Remove invalid font class names (#9499)
There are many occurrences in the UI code that we are defining the font
through class but it refers to the invalid font-family names. This
causes the component to end up rendering the text using Times New Roman.

### Changes 🏗️

Remove manual font definition through string font-family name.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-20 09:18:46 +00:00
Reinier van der Leer
296eee0b4f feat(platform/library): Library v2 > Agent Runs page (#9051)
- Resolves #8780
- Part of #8774

### Changes 🏗️

- Add new UI components
- Add `/agents/[id]` page, with sub-components:
  - `AgentRunsSelectorList`
    - `AgentRunSummaryCard`
      - `AgentRunStatusChip`
  - `AgentRunDetailsView`
  - `AgentRunDraftView`
  - `AgentScheduleDetailsView`

Backend improvements:
- Improve output of execution-related API endpoints: return
`GraphExecution` instead of `NodeExecutionResult[]`
- Reduce log spam from Prisma in tests

General frontend improvements:
- Hide nav link names on smaller screens to prevent navbar overflow
- Clean up styling and fix sizing of `agptui/Button`

Technical frontend improvements:
- Fix tailwind config size increments
- Rename `font-poppin` -> `font-poppins`
- Clean up component implementations and usages
   - Yeet all occurrences of `variant="default"`
- Remove `default` button variant as duplicate of `outline`; make
`outline` the default
- Fix minor typing issues

DX:
- Add front end type-check step to `pre-commit` config
- Fix logging setup in conftest.py

### 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:
  - `/agents/[id]` (new)
    - Go to page -> list of runs loads
    - Create new run -> runs; all I/O is visible
    - Click "Run again" -> runs again with same input
  - `/monitoring` (existing)
    - Go to page -> everything loads
    - Selecting agents and agent runs works

---------

Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Swifty <craigswift13@gmail.com>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-02-19 22:07:03 +00:00
Nicholas Tindle
f722c70c50 feat(blocks): add base for smartlead, apollo, and zerobounce blocks (#9387)
<!-- Clearly explain the need for these changes: -->
We want to support some more advanced search specific actions. These are
the base API layers and sample blocks for some of the services we need.

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- support pydantic models as an output format
- add apollo
- add smartlead
- add zerobounce

### 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] Built agents to test

---------

Co-authored-by: Krzysztof Czerwinski <34861343+kcze@users.noreply.github.com>
Co-authored-by: Bently <tomnoon9@gmail.com>
2025-02-19 16:30:46 +00:00
Andy Hooker
a0be165835 feat(settings): Rework user settings page with Form, loading skeleton… (#9476)
Implemented a fully functional user settings page allowing changes to
account details and notification preferences. This change uses a server
first approach and adds much needed form validation to this page.
This PR has added loading skeletons for better UX during data fetching.
Refactored related components to support these changes and finally
implemented server actions to streamline data ingestion.

## Note to developers:
At the moment the notification switches set back to default upon save.
We will want to pass in this information after the api is implemented.


## Changes 🏗️
Rebuilt / Refactored `SettingsFormInput` to `SettingsForm`:
- Implemented Form Validation 
- Implemented a form schema with Zod to validate user input
- Added toast messaging to properly inform the user if the form has been
successfully completed or if there is an error in thrown from the server
action.

Added `loading.tsx`
- Using `Skeletons` we can deliver a better loading UI for our users
causing less screen shifting.

Added `actions.ts`
- Added a server action for the settings page. This server action will
handle the updating of user's settings for this page. It handles the
interaction between the application and supabase. After this server
action is ran we revalidate the path for our settings page ensuring
proper data passed to our components.

There is an additional TODO for @ntindle for the api endpoint getting
created. This endpoint will cover the newly added notification switches
and it's toggles.

## Screenshots 📷
### Before Changes:
<img width="1083" alt="image"
src="https://github.com/user-attachments/assets/f5283fd5-705b-47cf-a7fa-4ca4d7f03444"
/>


### After Changes:
<img width="762" alt="image"
src="https://github.com/user-attachments/assets/20f96f01-b138-4eb7-8867-ce62a2d603d4"
/>

<img width="1083" alt="image"
src="https://github.com/user-attachments/assets/0ae363f5-068f-48e5-8b0f-c079a08f9242"
/>

<img width="1083" alt="image"
src="https://github.com/user-attachments/assets/8cb045ef-f322-4992-881e-fb92281c55cb"
/>

#### Form Validation
<img width="1083" alt="image"
src="https://github.com/user-attachments/assets/b78cfef6-94da-49f1-9c93-56cdb9ea4c96"
/>
<img width="1083" alt="image"
src="https://github.com/user-attachments/assets/ade5dce9-8c4b-40eb-aa0f-ff6d31bc3c3c"
/>
<img width="245" alt="image"
src="https://github.com/user-attachments/assets/88866bbf-4e33-43d9-b04a-b53ac848852d"
/>



### 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:


<details>
  <summary>Test Plan</summary>
 
  - [ ] Goto the route of `profile/settings`
  - [ ] Add an invalid email and notice the new validation messaging
- [ ] Add invalid passwords that do not match and or is under 8
characters notice the new validation messaging
- [ ] Select the cancel button and notice that the form has been set
back to the default values
- [ ] With the form untouched notice the `Save changes` button is
disabled. Toggle a switch and notice the `Save changes` button is now
enabled.
- [ ] Enter in a valid pair of new passwords in the `New Password` and
`Confirm New Password` input fields and select `Save changes`
- [ ] Enter in the same passwords again and notice that we will now be
shown an Error. This error is bubbling up from supabase in our backend
and is stating `New password should be different from the old password`
</details>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-02-19 14:51:37 +00:00
Reinier van der Leer
d1832ce10b fix(frontend): Fix return type and usage of api.listLibraryAgents() (#9498)
- Follow-up to #9258

The front end is fetching `/library/agents` -> `LibraryAgent[]` but
using the result as `GraphMeta[]`. This breaks a bunch of things.

### Changes 🏗️

Frontend:
- Add `LibraryAgent` type for `api.listLibraryAgents()`
- Amend all broken usages of `LibraryAgent` objects
- Introduce branded typing for `LibraryAgent.id` and `GraphMeta.id` to
disallow mixing them. This prevents incorrect use in the future, and
reduces the chance of this frontend issue accumulating interest on
existing open PRs.

Backend:
- Add a migration to create `LibraryAgent` objects for all existing
`AgentGraphs`


### 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] Check that all existing agents are listed in the agents list on
`/monitoring` (check against DB or `GET /api/graphs`)
  - [x] Check that all views of `/monitoring` work
  - [x] Try to run an agent and check its status
2025-02-18 17:39:44 +00:00
Nicholas Tindle
dcbbe11c53 fix(backend): correctly check if email service is set up (#9497)
<!-- Clearly explain the need for these changes: -->
I made a mistake in how we check if postmark exists

### Changes 🏗️
- adds a more explicit setting of postmark to none and extra checking to
prevent its use if it isn’t set

<!-- 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] I have no plan, it’s a simple logic bug so if it passes CI it’s
good
2025-02-18 14:33:26 +00:00
Zamil Majdy
43460b8553 feat(platform): Add Dispute & Refund resolution process (#9466)
### Changes 🏗️

Added the dispute & refund handling on the system.


https://github.com/user-attachments/assets/2d9c7b48-2ee1-401d-be65-5e9787c8130e




### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-18 09:20:46 +00:00
Zamil Majdy
0117006373 fix(backend): Fix failing poetry.lock validation on CI (#9489)
### Changes 🏗️

Poetry.lock is using the old version that the CI is not using.
Set the Poetry version to ^2.1.1.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-18 08:37:28 +00:00
Nicholas Tindle
e550846737 feat(backend): add ability to send emails to notification service (#9469)
<!-- Clearly explain the need for these changes: -->

We need a way to send emails for the email service to function. We will
depend on Postmark to do that.

This PR adds a simple email-sending service with the required settings
to make it work. It also builds on the previous agent run by sending the
emails that are in the immediate queue. Keep in mind that the email
template leaves a bit to be desired.

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Add `email.py` with the minimum required to send an email (plus type
handling)
- Add settings configs for the token and the send address to the
`settings.py` and `.env.example`
- Add a db call to get user email by ID since the `metadata` field of
`prisma.models.User` isn't serializable over our message bus tool `Pyro`
that the `DatabaseManager` uses
- Add a horrible `AgentRun` email template using `jinja2`
- Add `postmarker` to `pyproject.toml`

### 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 and run an agent and make sure it emails me (must be signed
into same domain as receiving address for now)


#### For configuration changes:
- [x] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have added a check that disables email if config is not set
correctly
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-02-14 17:55:30 +00:00
Nicholas Tindle
15275e2ce1 feat(backend): spawn the notifications service + basic test (#9464)
We want to send emails on a schedule, in response to events, and be
expandable without being overbearing on the amount of effort to
implement. We also want this to use rabbitmq and be easy for other
services to send messages into.

This PR adds the first use of the service to simply show a log message


### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds a new backend service for notifications
- Adds first notification into the service -> Agent Execution
- Adds spawning the notification service

Also 
- Adds RabbitMQ to CI so we can test stuff
- Adds a minor fix for one of the migrations that I thought was causing
failures, but isn't but the change is still useful


### 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] Built and ran an agent and ensured the following log line appeared
which shows the event would have sent an email
  ```
2025-02-10 15:52:02,232 INFO Processing notification:
user_id='96b8d2f5-a036-437f-bd8e-ba8856028553'
type=<NotificationType.AGENT_RUN: 'AGENT_RUN'>
data=AgentRunData(agent_name='CalculatorBlock', credits_used=0.0,
execution_time=0.0, graph_id='30e5f332-a092-4795-892a-b063a8c7bdd9',
node_count=1) created_at=datetime.datetime(2025, 2, 10, 15, 52, 2,
162865)
  ```

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

None of the other ports are configurable via .env.example listing so
left as is

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-02-14 03:58:12 +00:00
Reinier van der Leer
ce1d63c517 feat(backend): Library v2 Agents and Presets (#9258)
- Blocked by #9267

This re-introduces changes from the following PRs with fixes:
- #9218
- #9211

### Changes 🏗️

- See #9218
- See #9211

Fixes:
- Fix Prisma query statements in `v2.library.db`
- Fix creation of (library) agents
- Fix test cleanup of (library) agents
- Fix handling and passing of `node_input` parameters

### 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 & run a new agent
  - [x] Update & run an existing agent
2025-02-13 17:30:58 +00:00
Zamil Majdy
b5b9a008bf feat(backend): Migrate json encoded string columns into a native json column (#9475)
### Changes 🏗️

Due to the legacy of SQLite usage, some of the JSON columns are actually
a string column string a stringified JSON column.
The scope of this PR is migrating those columns into an actual JSON
column.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-13 12:02:53 +00:00
Nicholas Tindle
7e04fbd25f feat(backend): schema updates, migration, queries for Email Notification Service (#9445)
<!-- Clearly explain the need for these changes: -->

The email service has requirements to
- Email users when some activity has happened on their account on some
scheduled basis -> We need a way to get active users and the executions
that happened while they were active
- Allow users to configure what emails they get -> Need a user
preference
- Get User email by Id so that we can email them -> Pretty
self-explanatory

We need to add a few new backend queries + db models for the
notification to start handling these details. This is the first set of
those changes based on experience building the app service

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds a new DB Model, `UserNotificationPreferences,` with related
migration
- Adds a new DB Model `NotificationEvent` with related migration to
track what notifications we've sent and how many and such (how much we
add here is open to change depending on what limits on data we want)
- Adds a new DB Model `UserNotificationBatch` with related migration to
handle batching of like models
- Adds queries to get users and executions by `datetime` ranges as `ISO`
strings
- Adds new queries to the `DatabaseManager` and exposes them to the
other `AppService`s
- Exposes all new queries plus an existing one `get_user_by_id`

### 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] I extracted these changes from a working implementation of the
service, and tested they don't bring down the service by being uncalled
by running the standard agent tests we do on release

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-02-12 22:54:16 +00:00
Bently
016ec0ff6b fix(frontend) update PublishAgentAwaitingReview router push path (#9471)
Updates the PublishAgentAwaitingReview router.push path, it was going to
``/marketplace/dashboard`` it should be ``/profile/dashboard``

### Changes 🏗️


8181ee8cd1/autogpt_platform/frontend/src/components/agptui/composite/PublishAgentPopout.tsx (L265-L267)

to be

```tsx
		onViewProgress={() => {
		  router.push("/profile/dashboard");
		  handleClose();
		}}
```
2025-02-12 15:32:47 +00:00
Zamil Majdy
3b8cde6d11 feat(block): Add batch matched result and its count on ExtractTextInformationBlock (#9470)
### Changes 🏗️

Introduced `matched_result` & `matched_count` as a batch matched result
list and its count for the block execution of
ExtractTextInformationBlock.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-12 12:22:26 +00:00
Keith Webber
d050a3f77c docs: Provide feedback when cloning submodules (#9448)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️
Added `--progress` to the submodule update, so that cloning progress can
be tracked and does not appear to hang.
<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [x] No code change, just docs.
 

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [x] No configuration change, just docs.
 

<details>
  <summary> Provide feedback when cloning submodules </summary>

  -  now updating submodules shows the cloning repo's progress
 
</details>

Co-authored-by: Your Name <you@example.com>
2025-02-12 03:43:52 +00:00
Reinier van der Leer
1626bf9e16 fix(backend): Support Python 3.10 (#9468)
- Resolves #9467

### Changes 🏗️

- Loosen Python version requirement to include v3.10

Also, fixed a few issues in pyproject.toml:
- Re-sort dependency list
- Update `autogpt-platform-backend` package version to match latest
release
2025-02-12 02:02:00 +00:00
Andy Hooker
40613fe23e fix(frontend): Update user profile from marketplace to appropriate profile route (#9465)
### Background
Resolves: #9313

The application is incorrectly nesting the user's profile settings
within the route of `/marketplace` instead of the appropriate route of
`/profile`

This pr will modify the existing code to handle the relocation of the
(user) directory from the /marketplace to /profile.

### Changes 🏗️

1. Refactored directory of `(user)`:
- Moved the directory of (user) from `/marketplace/(user)` to
`profile/(user)`


2. Update Sidebar and Navbar components:
- Updating the existing code from the routing of market to profile by
modifying the existing routes.

### 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:

<details>
  <summary>Test Plan</summary>
  
  - [ ] Navigate to the route of `profile/` and observe the moved page.
- [ ] Navigate to the route of `profile/integrations` and observe the
moved page.
- [ ] Navigate to the route of `profile/api_keys` and observe the moved
page.
- [ ] Navigate to the route of `profile/profile` and observe the moved
page.
- [ ] Navigate to the route of `profile/settings` and observe the moved
page.
- [ ] Navigate to the route of `profile/credits` and observe the moved
page.
</details>
2025-02-11 11:25:15 +00:00
Andy Hooker
6eee9206f7 fix(market): Market featured agent card (#9463)
### Background
Resolves: #9313

The marketplace featured agent's section has a bug where if you hover
over a featured agent's card we are getting an incorrect background
color applied to the description.

### Changes 🏗️

1. Refactored `FeaturedStoreCard` to `FeaturedAgentCard`:
   - Condensed props and leverage StoreAgent type from api
- Removed onClick handler from props as this is not json serializable
and is not inline with NextJS best practices
- Used built in Card Components from ShadCN to minimize custom styling.
- Optimize images with implementation of the Image component from NextJS

2. Enhanced `FeaturedCardSection` components:
- Removing extensive prop passing and leverage the agent itself with the
StoreAgent type.
- Implemented Link from NextJS to better handler routing and remove the
`useRouter` implementation
   - Removed unnecessary handleCardClick method.

### 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
<details>
  <summary></summary>
 
  - [ ] Goto the landing page of the application or /marketplace 
  - [ ] Scroll to the featured agents section
- [ ] Move mouse over each of the cards and observe the image
disappearing and text being shown
- [ ] Observe the background color of the text that replaced the image
matches that of the card
</details>
2025-02-10 22:01:29 +00:00
Muhammad Safi
64050faef6 feature(block): Add XML Parser Block (#9450)
-Updated pyproject.toml for new dependency gravitasml
-Updated poetry.lock

<!-- Clearly explain the need for these changes: -->
- Issue no #9317 stated that, the addition of an XMLParserBlock is
required.
- It was suggested that the use of gravitasml as external package to be
used for parsing.
- Changes incorporated and tested as per requirements.
### Changes 🏗️
- Added xml_parser.py
- updated pyproject.toml
- updated poetry.lock for dependency 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: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-10 21:00:09 +00:00
Krzysztof Czerwinski
00c312d02c feat(platform): Schedule specific agent version (#9444)
Scheduling always takes the newest version of an agent.

### Changes 🏗️

This PR allows to schedule any graph version by adding number input to
schedule popup. Number is automatically set to the newest version when
agent is chosen.

<img width="533" alt="Screenshot 2025-02-07 at 5 05 56 PM"
src="https://github.com/user-attachments/assets/357b8810-6f02-4066-b7a3-824d9bfd62af"
/>

- Update API, so it accepts graph version
- Update schedule pop up, so it lets user input version number
- Open and schedule correct agent
- Add `Version` column to the schedules table

### 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 schedule version between 1 and max version
  - [x] Reject incorrect version
  - [x] Table shows proper version
  - [x] Removing schedule works
2025-02-10 13:24:25 +00:00
Nicholas Tindle
610be988c4 feat(backend): attach rabbitmq to the AppService (#9438)
### Changes 🏗️
For Emailing, we need to make a new App Service (NotificationManager)
that will require us to have rabbitmq as a dependency. This is the
backing data library to make that happen + registering it with the app
service base class and connecting when we spawn up a service

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds a rabbitmq library following the existing standard for redis
- Adds rabbitmq to the service
- Adds rabbitmq mgmt library (pika) so that we can connect to rabbitmq

### 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] I tested by adding the following to the executor `@expose
add_execution` and verifying via the UI that the messages show up in the
queue as expected + the agent executes and behaves as normal!

![image](https://github.com/user-attachments/assets/3ebfb850-d482-4b11-901c-d3bf3397a346)

```diff
      diff --git a/autogpt_platform/backend/backend/executor/manager.py b/autogpt_platform/backend/backend/executor/manager.py
index 1d965e012..4cd5b403c 100644
--- a/autogpt_platform/backend/backend/executor/manager.py
+++ b/autogpt_platform/backend/backend/executor/manager.py
@@ -18,7 +18,7 @@ if TYPE_CHECKING:
 from autogpt_libs.utils.cache import thread_cached
 
 from backend.blocks.agent import AgentExecutorBlock
-from backend.data import redis
+from backend.data import rabbitmq, redis
 from backend.data.block import (
     Block,
     BlockData,
@@ -750,6 +750,19 @@ class ExecutionManager(AppService):
     def __init__(self):
         super().__init__()
         self.use_redis = True
+        self.use_rabbitmq = rabbitmq.RabbitMQConfig(
+            exchanges=[
+                rabbitmq.Exchange(name="execution", type=rabbitmq.ExchangeType.FANOUT),
+            ],
+            queues=[
+                rabbitmq.Queue(
+                    name="execution",
+                    exchange=rabbitmq.Exchange(
+                        name="execution", type=rabbitmq.ExchangeType.FANOUT
+                    ),
+                ),
+            ],
+        )
         self.use_supabase = True
         self.pool_size = settings.config.num_graph_workers
         self.queue = ExecutionQueue[GraphExecutionEntry]()
@@ -876,6 +889,12 @@ class ExecutionManager(AppService):
         )
         self.queue.add(graph_exec)
 
+        # test rabbitmq
+        self.rabbit.publish_message(
+            exchange=self.rabbit_config.exchanges[0],
+            routing_key=self.rabbit_config.exchanges[0].name,
+            message=graph_exec_id,
+        )
         return graph_exec
 
     @expose
```
2025-02-08 21:30:30 +00:00
Nicholas Tindle
1a4ba533ca feat(infra): add rabbitmq to docker compose (#9437)
<!-- Clearly explain the need for these changes: -->
We want to use RabbitMQ for email (and executor in the future) to ensure
message delivery -- something we currently lack with Redis. This PR is
adding RabbitMQ to the docker-compose and setup details with defaults so
that when we start bringing services up, they have the backing to do so.

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds rabbitmq container (with exposed API and mgmt ports)
- Adds .env.example config for the backend
- Adds dockercompose config for the backend, and passes the variables
around as needed

### 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] Start the container using docker compose deps subset

#### For configuration changes:
- [x] `.env.example` 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**)
2025-02-07 15:40:17 +00:00
Krzysztof Czerwinski
56a307d048 fix(frontend): Fix beads when output is array (#9439)
Array output, e.g. `Item` in Step Through Items block doesn't output
correct number of beads, this PR fixes this issue.
2025-02-07 14:42:51 +00:00
Krzysztof Czerwinski
a5ad90f09b fix(frontend): Fix issue when pasting blocks (#9443)
When block is pasted the original block's inputs behave as disconnected:
the input is shown despite there being connection. This PR fixes this
issue.
2025-02-07 14:42:08 +00:00
Krzysztof Czerwinski
a315b3fc41 fix(frontend): Prevent exception when Stripe env var is missing (#9441)
Prevent exception when `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` is missing
and update state management in `useCredits`.
2025-02-07 12:37:06 +00:00
Krzysztof Czerwinski
1a1fe7c0b7 feat(platform): Support opening graphs with version and execution id (#9332)
Currently it's only possible to open latest graph from monitor and see
the node execution results only when manually running. This PR adds
ability to open running and finished graphs in builder.

### Changes 🏗️

Builder now handles graph version and execution ID in addition to graph
ID when opening a graph. When an execution ID is provided, node
execution results are fetched and subscribed to in real time. This makes
it possible to open a graph that is already executing and see both
existing node execution data and real-time updates (if it's still
running).

- Use graph version and execution id on the builder page and in
`useAgentGraph`
- Use graph version on the `execute_graph` endpoint
- Use graph version on the websockets to distinguish between versions
- Move `formatEdgeID` to utils; it's used in `useAgentGraph.ts` and in
`Flow.tsx`

### 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] Opening finished execution restores node results
- [x] Opening running execution restores results and continues to run
properly
  - [x] Results are separate for each graph across multiple tabs

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-02-07 10:16:30 +00:00
Swifty
c693875951 platform(fix): Improve performance of builder (#9435)
1. Remove isHovered / onMouseEnter / onMouseLeave state updates
2. Wrap Custom Node in React.memo
3. Avoid re-renders for context menus
2025-02-07 10:38:50 +01:00
Krzysztof Czerwinski
797916cf14 feat(frontend): Show toast on low credit balance, rename Credits page to Billing (#9428)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

- If a node fails to execute and error contains `Insufficient balance`
show toast with link to Billing page
- Rename `Credits` page to `Billing`
<img width="398" alt="Screenshot 2025-02-05 at 2 27 36 PM"
src="https://github.com/user-attachments/assets/6a5b4db0-a579-4607-a6bd-d5cf9229092f"
/>

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-02-06 16:12:56 +00:00
dependabot[bot]
5d8fe1e184 chore(backend/deps): bump google-cloud-storage from 2.19.0 to 3.0.0 in /autogpt_platform/backend (#9399)
Bumps
[google-cloud-storage](https://github.com/googleapis/python-storage)
from 2.19.0 to 3.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/python-storage/releases">google-cloud-storage's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h2><a
href="https://github.com/googleapis/python-storage/compare/v2.19.0...v3.0.0">3.0.0</a>
(2025-01-28)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<p>Please consult the README for details on this major version
release.</p>
<ul>
<li>The default checksum strategy for uploads has changed from None to
&quot;auto&quot; (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)</li>
<li>The default checksum strategy for downloads has changed from
&quot;md5&quot; to &quot;auto&quot; (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)</li>
<li>Deprecated positional argument &quot;num_retries&quot; has been
removed (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1377">#1377</a>)</li>
<li>Deprecated argument &quot;text_mode&quot; has been removed (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1379">#1379</a>)</li>
<li>Blob.download_to_filename() now deletes the empty destination file
on a 404 (<a
href="https://redirect.github.com/googleapis/python-storage/pull/1394">#1394</a>)</li>
<li>Media operations now use the same retry backoff, timeout and custom
predicate system as non-media operations, which may slightly impact
default retry behavior (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1385">#1385</a>)</li>
<li>Retries are now enabled by default for uploads, blob deletes and
blob metadata updates (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1400">#1400</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Add &quot;auto&quot; checksum option and make default (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)
(<a
href="5375fa0738">5375fa0</a>)</li>
<li>Blob.download_to_filename() deletes the empty destination file on a
404 (<a
href="https://redirect.github.com/googleapis/python-storage/pull/1394">#1394</a>)
(<a
href="066be2db78">066be2d</a>)</li>
<li>Enable custom predicates for media operations (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1385">#1385</a>)
(<a
href="f3517bfcb9">f3517bf</a>)</li>
<li>Integrate google-resumable-media (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1283">#1283</a>)
(<a
href="bd917b49d2">bd917b4</a>)</li>
<li>Retry by default for uploads, blob deletes, metadata updates (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1400">#1400</a>)
(<a
href="0426005175">0426005</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Cancel upload when BlobWriter exits with exception (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1243">#1243</a>)
(<a
href="df107d20a7">df107d2</a>)</li>
<li>Changed name of methods <code>Blob.from_string()</code> and
<code>Bucket.from_string()</code> to <code>from_uri()</code> (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1335">#1335</a>)
(<a
href="58c1d03819">58c1d03</a>)</li>
<li>Correctly calculate starting offset for retries of ranged reads (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1376">#1376</a>)
(<a
href="7b6c9a0fb3">7b6c9a0</a>)</li>
<li>Filter download_kwargs in BlobReader (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1411">#1411</a>)
(<a
href="0c21210450">0c21210</a>)</li>
<li>Remove deprecated num_retries argument (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1377">#1377</a>)
(<a
href="58b5040933">58b5040</a>)</li>
<li>Remove deprecated text_mode argument (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1379">#1379</a>)
(<a
href="4d20a8efa8">4d20a8e</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Correct formatting and update README.rst (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1427">#1427</a>)
(<a
href="2945853977">2945853</a>)</li>
<li>Fix issue with exceptions.py documentation (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1328">#1328</a>)
(<a
href="22b8c304af">22b8c30</a>)</li>
</ul>
<h2>v3.0.0rc1</h2>
<h2><a
href="https://github.com/googleapis/python-storage/compare/v2.19.0...v3.0.0rc1">3.0.0rc1</a>
(2024-12-12)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>The default checksum strategy for uploads has changed from None to
&quot;auto&quot; (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)
(5375fa0)</li>
<li>The default checksum strategy for downloads has changed from
&quot;md5&quot; to &quot;auto&quot; (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)
(5375fa0)</li>
<li>Deprecated positional argument &quot;num_retries&quot; has been
removed (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1377">#1377</a>)
(58b5040)</li>
<li>Deprecated argument &quot;text_mode&quot; has been removed (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1379">#1379</a>)
(4d20a8e)</li>
<li>Media operation retries now work identically to other retries, which
may impact default retry settings (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1385">#1385</a>)
(f3517bf)</li>
<li>Blob.download_to_filename() deletes the empty destination file on a
404</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/python-storage/blob/main/CHANGELOG.md">google-cloud-storage's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/googleapis/python-storage/compare/v2.19.0...v3.0.0">3.0.0</a>
(2025-01-28)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<p>Please consult the README for details on this major version
release.</p>
<ul>
<li>The default checksum strategy for uploads has changed from None to
&quot;auto&quot; (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)</li>
<li>The default checksum strategy for downloads has changed from
&quot;md5&quot; to &quot;auto&quot; (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)</li>
<li>Deprecated positional argument &quot;num_retries&quot; has been
removed (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1377">#1377</a>)</li>
<li>Deprecated argument &quot;text_mode&quot; has been removed (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1379">#1379</a>)</li>
<li>Blob.download_to_filename() now deletes the empty destination file
on a 404 (<a
href="https://redirect.github.com/googleapis/python-storage/pull/1394">#1394</a>)</li>
<li>Media operations now use the same retry backoff, timeout and custom
predicate system as non-media operations, which may slightly impact
default retry behavior (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1385">#1385</a>)</li>
<li>Retries are now enabled by default for uploads, blob deletes and
blob metadata updates (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1400">#1400</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Add &quot;auto&quot; checksum option and make default (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1383">#1383</a>)
(<a
href="5375fa0738">5375fa0</a>)</li>
<li>Blob.download_to_filename() deletes the empty destination file on a
404 (<a
href="https://redirect.github.com/googleapis/python-storage/pull/1394">#1394</a>)
(<a
href="066be2db78">066be2d</a>)</li>
<li>Enable custom predicates for media operations (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1385">#1385</a>)
(<a
href="f3517bfcb9">f3517bf</a>)</li>
<li>Integrate google-resumable-media (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1283">#1283</a>)
(<a
href="bd917b49d2">bd917b4</a>)</li>
<li>Retry by default for uploads, blob deletes, metadata updates (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1400">#1400</a>)
(<a
href="0426005175">0426005</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Cancel upload when BlobWriter exits with exception (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1243">#1243</a>)
(<a
href="df107d20a7">df107d2</a>)</li>
<li>Changed name of methods <code>Blob.from_string()</code> and
<code>Bucket.from_string()</code> to <code>from_uri()</code> (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1335">#1335</a>)
(<a
href="58c1d03819">58c1d03</a>)</li>
<li>Correctly calculate starting offset for retries of ranged reads (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1376">#1376</a>)
(<a
href="7b6c9a0fb3">7b6c9a0</a>)</li>
<li>Filter download_kwargs in BlobReader (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1411">#1411</a>)
(<a
href="0c21210450">0c21210</a>)</li>
<li>Remove deprecated num_retries argument (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1377">#1377</a>)
(<a
href="58b5040933">58b5040</a>)</li>
<li>Remove deprecated text_mode argument (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1379">#1379</a>)
(<a
href="4d20a8efa8">4d20a8e</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Correct formatting and update README.rst (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1427">#1427</a>)
(<a
href="2945853977">2945853</a>)</li>
<li>Fix issue with exceptions.py documentation (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1328">#1328</a>)
(<a
href="22b8c304af">22b8c30</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f2cc9c5a2b"><code>f2cc9c5</code></a>
chore(main): release 3.0.0 (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1393">#1393</a>)</li>
<li><a
href="71455bcc7f"><code>71455bc</code></a>
samples: add OTel Tracing quickstart (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1371">#1371</a>)</li>
<li><a
href="2945853977"><code>2945853</code></a>
Docs: Correct formatting and update README.rst (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1427">#1427</a>)</li>
<li><a
href="0426005175"><code>0426005</code></a>
feat: Retry by default for uploads, blob deletes, metadata updates (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1400">#1400</a>)</li>
<li><a
href="0c21210450"><code>0c21210</code></a>
fix: filter download_kwargs in BlobReader (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1411">#1411</a>)</li>
<li><a
href="c2a2ce58c7"><code>c2a2ce5</code></a>
chore(python): exclude .github/workflows/unittest.yml in renovate config
(<a
href="https://redirect.github.com/googleapis/python-storage/issues/1407">#1407</a>)</li>
<li><a
href="ffa0734708"><code>ffa0734</code></a>
chore(deps): update all dependencies (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1405">#1405</a>)</li>
<li><a
href="2e94ad0eba"><code>2e94ad0</code></a>
chore(python): Update the python version in docs presubmit to use 3.10
(<a
href="https://redirect.github.com/googleapis/python-storage/issues/1403">#1403</a>)</li>
<li><a
href="4e9a382dd9"><code>4e9a382</code></a>
feat!: Release as 3.0.0 (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1396">#1396</a>)</li>
<li><a
href="066be2db78"><code>066be2d</code></a>
feat: download_to_filename deletes the empty file on a 404 (<a
href="https://redirect.github.com/googleapis/python-storage/issues/1394">#1394</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/googleapis/python-storage/compare/v2.19.0...v3.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google-cloud-storage&package-manager=pip&previous-version=2.19.0&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-06 14:15:36 +00:00
Swifty
8181ee8cd1 platform(fix): Fix missing Profiles (#9424)
### What's This PR About?

This PR makes a few simple improvements to how user profiles are handled
in the app:

- **Always Have a Profile:**  
If a user doesn't already have a profile, the system now automatically
creates one with some default info (including a fun, randomly generated
username). This way, you never end up with a missing profile.

- **Better Profile Updates:**  
  Removes the creation of profiles on failed get requests
2025-02-06 11:20:32 +01:00
Zamil Majdy
6183ed5a63 fix(frontend): Add user note for automatic refill feature 2025-02-06 15:45:49 +07:00
dependabot[bot]
4b76aae1c9 chore(libs/deps): bump the production-dependencies group across 1 directory with 4 updates (#9432)
Bumps the production-dependencies group with 4 updates in the
/autogpt_platform/autogpt_libs directory:
[google-cloud-logging](https://github.com/googleapis/python-logging),
[pydantic](https://github.com/pydantic/pydantic),
[pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) and
[supabase](https://github.com/supabase/supabase-py).

Updates `google-cloud-logging` from 3.11.3 to 3.11.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/python-logging/releases">google-cloud-logging's
releases</a>.</em></p>
<blockquote>
<h2>v3.11.4</h2>
<h2><a
href="https://github.com/googleapis/python-logging/compare/v3.11.3...v3.11.4">3.11.4</a>
(2025-01-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Made <code>write_entries</code> raise <code>ValueError</code> on
<code>ParseError</code>s (<a
href="https://redirect.github.com/googleapis/python-logging/issues/958">#958</a>)
(<a
href="5309478c05">5309478</a>)</li>
<li>Require proto-plus &gt;= 1.25 for Python 3.13 (<a
href="https://redirect.github.com/googleapis/python-logging/issues/955">#955</a>)
(<a
href="7baed8e968">7baed8e</a>)</li>
<li>Require proto-plus &gt;= 1.25 for Python 3.13 (<a
href="https://redirect.github.com/googleapis/python-logging/issues/955">#955</a>)
(<a
href="002b1fcb39">002b1fc</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/python-logging/blob/main/CHANGELOG.md">google-cloud-logging's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/googleapis/python-logging/compare/v3.11.3...v3.11.4">3.11.4</a>
(2025-01-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Made <code>write_entries</code> raise <code>ValueError</code> on
<code>ParseError</code>s (<a
href="https://redirect.github.com/googleapis/python-logging/issues/958">#958</a>)
(<a
href="5309478c05">5309478</a>)</li>
<li>Require proto-plus &gt;= 1.25 for Python 3.13 (<a
href="https://redirect.github.com/googleapis/python-logging/issues/955">#955</a>)
(<a
href="7baed8e968">7baed8e</a>)</li>
<li>Require proto-plus &gt;= 1.25 for Python 3.13 (<a
href="https://redirect.github.com/googleapis/python-logging/issues/955">#955</a>)
(<a
href="002b1fcb39">002b1fc</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c47946fee0"><code>c47946f</code></a>
chore(main): release 3.11.4 (<a
href="https://redirect.github.com/googleapis/python-logging/issues/956">#956</a>)</li>
<li><a
href="5309478c05"><code>5309478</code></a>
fix: Made <code>write_entries</code> raise <code>ValueError</code> on
<code>ParseError</code>s (<a
href="https://redirect.github.com/googleapis/python-logging/issues/958">#958</a>)</li>
<li><a
href="dfcce1f5ed"><code>dfcce1f</code></a>
chore(python): exclude .github/workflows/unittest.yml in renovate config
(<a
href="https://redirect.github.com/googleapis/python-logging/issues/959">#959</a>)</li>
<li><a
href="8c2c5a798a"><code>8c2c5a7</code></a>
chore(python): update dependencies in .kokoro/docker/docs (<a
href="https://redirect.github.com/googleapis/python-logging/issues/957">#957</a>)</li>
<li><a
href="7baed8e968"><code>7baed8e</code></a>
fix: require proto-plus &gt;= 1.25 for Python 3.13 (<a
href="https://redirect.github.com/googleapis/python-logging/issues/955">#955</a>)</li>
<li><a
href="002b1fcb39"><code>002b1fc</code></a>
fix: require proto-plus &gt;= 1.25 for Python 3.13 (<a
href="https://redirect.github.com/googleapis/python-logging/issues/955">#955</a>)</li>
<li><a
href="439eaa5b2f"><code>439eaa5</code></a>
chore(python): update dependencies in .kokoro/docker/docs (<a
href="https://redirect.github.com/googleapis/python-logging/issues/954">#954</a>)</li>
<li>See full diff in <a
href="https://github.com/googleapis/python-logging/compare/v3.11.3...v3.11.4">compare
view</a></li>
</ul>
</details>
<br />

Updates `pydantic` from 2.10.5 to 2.10.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/releases">pydantic's
releases</a>.</em></p>
<blockquote>
<h2>v2.10.6 2025-01-23</h2>
<h2>What's Changed</h2>
<h3>Fixes</h3>
<ul>
<li>Fix JSON Schema reference collection with <code>'examples'</code>
keys by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/11325">#11325</a></li>
<li>Fix url python serialization by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11331">#11331</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic/compare/v2.10.5...v2.10.6">https://github.com/pydantic/pydantic/compare/v2.10.5...v2.10.6</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/blob/main/HISTORY.md">pydantic's
changelog</a>.</em></p>
<blockquote>
<h2>v2.10.6 (2025-01-23)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.10.6">GitHub
release</a></p>
<h3>What's Changed</h3>
<h4>Fixes</h4>
<ul>
<li>Fix JSON Schema reference collection with <code>'examples'</code>
keys by <a href="https://github.com/Viicos"><code>@​Viicos</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/11325">#11325</a></li>
<li>Fix url python serialization by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11331">#11331</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="df05e69a8a"><code>df05e69</code></a>
Bump version to v2.10.6 (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11334">#11334</a>)</li>
<li><a
href="416082625a"><code>4160826</code></a>
Fix url python serialization (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11331">#11331</a>)</li>
<li><a
href="f94e842692"><code>f94e842</code></a>
Fix JSON Schema reference collection with
<code>&quot;examples&quot;</code> keys (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11325">#11325</a>)</li>
<li>See full diff in <a
href="https://github.com/pydantic/pydantic/compare/v2.10.5...v2.10.6">compare
view</a></li>
</ul>
</details>
<br />

Updates `pytest-asyncio` from 0.25.2 to 0.25.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's
releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.25.3</h2>
<ul>
<li>Avoid errors in cleanup of async generators when event loop is
already closed <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1040">#1040</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7c501923b0"><code>7c50192</code></a>
fix: Avoid errors in cleanup of async generators when event loop is
already c...</li>
<li>See full diff in <a
href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.25.2...v0.25.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `supabase` from 2.11.0 to 2.13.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/supabase/supabase-py/releases">supabase's
releases</a>.</em></p>
<blockquote>
<h2>v2.13.0</h2>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.12.0...v2.13.0">2.13.0</a>
(2025-02-04)</h2>
<h3>Features</h3>
<ul>
<li><strong>realtime:</strong> bump realtime from 2.2.0 to 2.3.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1049">#1049</a>)
(<a
href="2347401770">2347401</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.11.2 to 2.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1051">#1051</a>)
(<a
href="4a2bb9e73e">4a2bb9e</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.9.2 to 0.9.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1052">#1052</a>)
(<a
href="29fed38015">29fed38</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.11.1 to 0.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1050">#1050</a>)
(<a
href="8c5d48f51f">8c5d48f</a>)</li>
<li>update SupabaseAuthClient to use super instead of calling base class
(<a
href="https://redirect.github.com/supabase/supabase-py/issues/1045">#1045</a>)
(<a
href="3efb4a678b">3efb4a6</a>)</li>
</ul>
<h2>v2.12.0</h2>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.11.0...v2.12.0">2.12.0</a>
(2025-01-24)</h2>
<h3>Features</h3>
<ul>
<li><strong>realtime:</strong> bump realtime from 2.1.0 to 2.2.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1037">#1037</a>)
(<a
href="0e5eed6f47">0e5eed6</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.11.1 to 2.11.2 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1036">#1036</a>)
(<a
href="f7c87b9010">f7c87b9</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.9.0 to 0.9.2 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1029">#1029</a>)
(<a
href="f53f7ff58c">f53f7ff</a>)</li>
<li><strong>postgrest:</strong> bump postgrest from 0.19.1 to 0.19.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1040">#1040</a>)
(<a
href="c117a57a3f">c117a57</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.11.0 to 0.11.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1035">#1035</a>)
(<a
href="17942a2a6a">17942a2</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/supabase/supabase-py/blob/main/CHANGELOG.md">supabase's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.12.0...v2.13.0">2.13.0</a>
(2025-02-04)</h2>
<h3>Features</h3>
<ul>
<li><strong>realtime:</strong> bump realtime from 2.2.0 to 2.3.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1049">#1049</a>)
(<a
href="2347401770">2347401</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.11.2 to 2.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1051">#1051</a>)
(<a
href="4a2bb9e73e">4a2bb9e</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.9.2 to 0.9.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1052">#1052</a>)
(<a
href="29fed38015">29fed38</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.11.1 to 0.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1050">#1050</a>)
(<a
href="8c5d48f51f">8c5d48f</a>)</li>
<li>update SupabaseAuthClient to use super instead of calling base class
(<a
href="https://redirect.github.com/supabase/supabase-py/issues/1045">#1045</a>)
(<a
href="3efb4a678b">3efb4a6</a>)</li>
</ul>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.11.0...v2.12.0">2.12.0</a>
(2025-01-24)</h2>
<h3>Features</h3>
<ul>
<li><strong>realtime:</strong> bump realtime from 2.1.0 to 2.2.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1037">#1037</a>)
(<a
href="0e5eed6f47">0e5eed6</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.11.1 to 2.11.2 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1036">#1036</a>)
(<a
href="f7c87b9010">f7c87b9</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.9.0 to 0.9.2 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1029">#1029</a>)
(<a
href="f53f7ff58c">f53f7ff</a>)</li>
<li><strong>postgrest:</strong> bump postgrest from 0.19.1 to 0.19.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1040">#1040</a>)
(<a
href="c117a57a3f">c117a57</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.11.0 to 0.11.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1035">#1035</a>)
(<a
href="17942a2a6a">17942a2</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c70802e55c"><code>c70802e</code></a>
chore(main): release 2.13.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1046">#1046</a>)</li>
<li><a
href="614cacc6a9"><code>614cacc</code></a>
chore(tests): increase coverage (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1053">#1053</a>)</li>
<li><a
href="29fed38015"><code>29fed38</code></a>
fix(functions): bump supafunc from 0.9.2 to 0.9.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1052">#1052</a>)</li>
<li><a
href="4a2bb9e73e"><code>4a2bb9e</code></a>
fix(auth): bump gotrue from 2.11.2 to 2.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1051">#1051</a>)</li>
<li><a
href="8c5d48f51f"><code>8c5d48f</code></a>
fix(storage): bump storage3 from 0.11.1 to 0.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1050">#1050</a>)</li>
<li><a
href="2347401770"><code>2347401</code></a>
feat(realtime): bump realtime from 2.2.0 to 2.3.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1049">#1049</a>)</li>
<li><a
href="4237977463"><code>4237977</code></a>
chore(deps-dev): bump black from 24.10.0 to 25.1.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1044">#1044</a>)</li>
<li><a
href="489043f03a"><code>489043f</code></a>
chore(deps-dev): bump pytest-asyncio from 0.25.2 to 0.25.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1043">#1043</a>)</li>
<li><a
href="b007da45c6"><code>b007da4</code></a>
chore(deps-dev): bump commitizen from 4.1.0 to 4.1.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1042">#1042</a>)</li>
<li><a
href="9a8713125e"><code>9a87131</code></a>
chore(ci): pipeline using same version of python for all tests (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1047">#1047</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/supabase/supabase-py/compare/v2.11.0...v2.13.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-05 22:39:04 +00:00
dependabot[bot]
f6e395f36e chore(frontend/deps-dev): bump the development-dependencies group in /autogpt_platform/frontend with 13 updates (#9401)
Bumps the development-dependencies group in /autogpt_platform/frontend
with 13 updates:

| Package | From | To |
| --- | --- | --- |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.50.0`
| `1.50.1` |
|
[@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y)
| `8.5.2` | `8.5.3` |
|
[@storybook/addon-essentials](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/essentials)
| `8.5.2` | `8.5.3` |
|
[@storybook/addon-interactions](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/interactions)
| `8.5.2` | `8.5.3` |
|
[@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/links)
| `8.5.2` | `8.5.3` |
|
[@storybook/addon-onboarding](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/onboarding)
| `8.5.2` | `8.5.3` |
|
[@storybook/blocks](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/blocks)
| `8.5.2` | `8.5.3` |
|
[@storybook/nextjs](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs)
| `8.5.2` | `8.5.3` |
|
[@storybook/react](https://github.com/storybookjs/storybook/tree/HEAD/code/renderers/react)
| `8.5.2` | `8.5.3` |
|
[@storybook/test](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/test)
| `8.5.2` | `8.5.3` |
|
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
| `22.10.10` | `22.13.0` |
| [chromatic](https://github.com/chromaui/chromatic-cli) | `11.25.1` |
`11.25.2` |
|
[storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/cli)
| `8.5.2` | `8.5.3` |

Updates `@playwright/test` from 1.50.0 to 1.50.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/playwright/releases"><code>@​playwright/test</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v1.50.1</h2>
<h3>Highlights</h3>
<p><a
href="https://redirect.github.com/microsoft/playwright/issues/34483">microsoft/playwright#34483</a>
- [Feature]: single aria snapshot for different engines/browsers
<a
href="https://redirect.github.com/microsoft/playwright/issues/34497">microsoft/playwright#34497</a>
- [Bug]: Firefox not handling keepalive: true fetch requests
<a
href="https://redirect.github.com/microsoft/playwright/issues/34504">microsoft/playwright#34504</a>
- [Bug]: update snapshots not creating good diffs
<a
href="https://redirect.github.com/microsoft/playwright/issues/34507">microsoft/playwright#34507</a>
- [Bug]: snapshotPathTemplate doesnt work when multiple projects
<a
href="https://redirect.github.com/microsoft/playwright/issues/34462">microsoft/playwright#34462</a>
- [Bug]: updateSnapshots &quot;changed&quot; throws an error</p>
<h2>Browser Versions</h2>
<ul>
<li>Chromium 133.0.6943.16</li>
<li>Mozilla Firefox 134.0</li>
<li>WebKit 18.2</li>
</ul>
<p>This version was also tested against the following stable
channels:</p>
<ul>
<li>Google Chrome 132</li>
<li>Microsoft Edge 132</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="dbc685ca98"><code>dbc685c</code></a>
chore: mark v1.50.1 (<a
href="https://redirect.github.com/microsoft/playwright/issues/34575">#34575</a>)</li>
<li><a
href="13d80f184e"><code>13d80f1</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34560">#34560</a>):
chore(docs): clarify connection method via BrowserType.c...</li>
<li><a
href="159210da82"><code>159210d</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34556">#34556</a>):
fix(toMatchAriaSnapshot): fail test run when updating mi...</li>
<li><a
href="fbad9f7ff7"><code>fbad9f7</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34537">#34537</a>):
feat: per-assertion snapshot path template in config (<a
href="https://redirect.github.com/microsoft/playwright/issues/3">#3</a>...</li>
<li><a
href="67313faaa7"><code>67313fa</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34550">#34550</a>):
roll follow-ups for .NET and Python</li>
<li><a
href="4b7794b37a"><code>4b7794b</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34544">#34544</a>):
fix(aria): disregard text area textContent</li>
<li><a
href="1efbedd3b3"><code>1efbedd</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34535">#34535</a>):
Revert &quot;Reapply &quot;fix(har timing): record connect timing
...</li>
<li><a
href="1e258e0894"><code>1e258e0</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34420">#34420</a>):
chore(deps): bump vite from 5.4.6 to 5.4.14 (<a
href="https://redirect.github.com/microsoft/playwright/issues/34539">#34539</a>)</li>
<li><a
href="7be4ef58de"><code>7be4ef5</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34522">#34522</a>):
test: fetch request through socks proxy over ipv4</li>
<li><a
href="7b3e590289"><code>7b3e590</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34530">#34530</a>):
fix(firefox): disable fetch keep-alive for now before a ...</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/playwright/compare/v1.50.0...v1.50.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-a11y` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-a11y</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-a11y</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/addons/a11y">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-essentials` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-essentials</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-essentials</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/addons/essentials">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-interactions` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-interactions</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-interactions</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/addons/interactions">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-links` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-links</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-links</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/addons/links">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-onboarding` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-onboarding</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-onboarding</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/addons/onboarding">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/blocks` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/blocks</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/blocks</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/lib/blocks">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/nextjs` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/nextjs</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/nextjs</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/frameworks/nextjs">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/react` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/react</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/react</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/renderers/react">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/test` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/test</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/test</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/lib/test">compare
view</a></li>
</ul>
</details>
<br />

Updates `@types/node` from 22.10.10 to 22.13.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />

Updates `chromatic` from 11.25.1 to 11.25.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/chromatic-cli/releases">chromatic's
releases</a>.</em></p>
<blockquote>
<h2>v11.25.2</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Add additional rspack builder entrypoint <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1147">#1147</a>
(<a href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
<li>Account for accessibility change counts in UI <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1145">#1145</a>
(<a href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>John Hobbs (<a
href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md">chromatic's
changelog</a>.</em></p>
<blockquote>
<h1>v11.25.2 (Thu Jan 30 2025)</h1>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Add additional rspack builder entrypoint <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1147">#1147</a>
(<a href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
<li>Account for accessibility change counts in UI <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1145">#1145</a>
(<a href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>John Hobbs (<a
href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9f1324772c"><code>9f13247</code></a>
Bump version to: 11.25.2 [skip ci]</li>
<li><a
href="00daacc6ad"><code>00daacc</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="9047fb72d6"><code>9047fb7</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/chromatic-cli/issues/1147">#1147</a>
from chromaui/jmhobbs/cap-2681-chromatic-fails-to-tr...</li>
<li><a
href="2dfe359084"><code>2dfe359</code></a>
Add additional rspack builder entrypoint</li>
<li><a
href="71abbccabe"><code>71abbcc</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/chromatic-cli/issues/1145">#1145</a>
from chromaui/jmhobbs/cap-2647-update-cli-messaging-...</li>
<li><a
href="7af2d57b81"><code>7af2d57</code></a>
Pluralize was/were on total changes.</li>
<li><a
href="33140257ec"><code>3314025</code></a>
Move to multiline format for changes.</li>
<li><a
href="28eaae5955"><code>28eaae5</code></a>
Account for accessibility change counts in UI</li>
<li>See full diff in <a
href="https://github.com/chromaui/chromatic-cli/compare/v11.25.1...v11.25.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `storybook` from 8.5.2 to 8.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases">storybook's
releases</a>.</em></p>
<blockquote>
<h2>v8.5.3</h2>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md">storybook's
changelog</a>.</em></p>
<blockquote>
<h2>8.5.3</h2>
<ul>
<li>Preview: Add <code>globals</code> to <code>extract()</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30415">#30415</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Vite: Fix add component UI invalidation - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30438">#30438</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81d183f3ab"><code>81d183f</code></a>
Bump version from &quot;8.5.2&quot; to &quot;8.5.3&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.3/code/lib/cli">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-05 22:08:15 +00:00
dependabot[bot]
9c2d19cdb5 chore(frontend/deps): bump the production-dependencies group in /autogpt_platform/frontend with 4 updates (#9400)
Bumps the production-dependencies group in /autogpt_platform/frontend
with 4 updates:
[@sentry/nextjs](https://github.com/getsentry/sentry-javascript),
[@stripe/stripe-js](https://github.com/stripe/stripe-js),
[launchdarkly-react-client-sdk](https://github.com/launchdarkly/react-client-sdk)
and [recharts](https://github.com/recharts/recharts).

Updates `@sentry/nextjs` from 8.51.0 to 8.54.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/releases"><code>@​sentry/nextjs</code>'s
releases</a>.</em></p>
<blockquote>
<h2>8.54.0</h2>
<ul>
<li>feat(v8/deps): Upgrade all OpenTelemetry dependencies (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15098">#15098</a>)</li>
<li>fix(node/v8): Add compatibility layer for Prisma v5 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15210">#15210</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/nwalters512"><code>@​nwalters512</code></a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>@​sentry/browser</code></td>
<td>23.3 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> - with treeshaking flags</td>
<td>23.17 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing)</td>
<td>35.9 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay)</td>
<td>73.27 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay) - with
treeshaking flags</td>
<td>66.71 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay with
Canvas)</td>
<td>77.57 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay, Feedback)</td>
<td>89.5 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Feedback)</td>
<td>39.51 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. sendFeedback)</td>
<td>27.91 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. FeedbackAsync)</td>
<td>32.71 KB</td>
</tr>
<tr>
<td><code>@​sentry/react</code></td>
<td>25.98 KB</td>
</tr>
<tr>
<td><code>@​sentry/react</code> (incl. Tracing)</td>
<td>38.71 KB</td>
</tr>
<tr>
<td><code>@​sentry/vue</code></td>
<td>27.58 KB</td>
</tr>
<tr>
<td><code>@​sentry/vue</code> (incl. Tracing)</td>
<td>37.75 KB</td>
</tr>
<tr>
<td><code>@​sentry/svelte</code></td>
<td>23.46 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.49 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.6 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.9 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>78.23 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>71.92 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.52 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>225.78 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td>
<td>238.88 KB</td>
</tr>
<tr>
<td><code>@​sentry/nextjs</code> (client)</td>
<td>38.96 KB</td>
</tr>
<tr>
<td><code>@​sentry/sveltekit</code> (client)</td>
<td>36.4 KB</td>
</tr>
<tr>
<td><code>@​sentry/node</code></td>
<td>162.85 KB</td>
</tr>
<tr>
<td><code>@​sentry/node</code> - without tracing</td>
<td>99.14 KB</td>
</tr>
<tr>
<td><code>@​sentry/aws-serverless</code></td>
<td>131.23 KB</td>
</tr>
</tbody>
</table>
<h2>8.53.0</h2>
<ul>
<li>feat(v8/nuxt): Add <code>url</code> to
<code>SourcemapsUploadOptions</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15202">#15202</a>)</li>
<li>fix(v8/react): <code>fromLocation</code> can be undefined in
Tanstack Router Instrumentation (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15237">#15237</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/tannerlinsley"><code>@​tannerlinsley</code></a>.
Thank you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>@​sentry/browser</code></td>
<td>23.3 KB</td>
</tr>
</tbody>
</table>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/blob/8.54.0/CHANGELOG.md"><code>@​sentry/nextjs</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.54.0</h2>
<ul>
<li>feat(v8/deps): Upgrade all OpenTelemetry dependencies (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15098">#15098</a>)</li>
<li>fix(node/v8): Add compatibility layer for Prisma v5 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15210">#15210</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/nwalters512"><code>@​nwalters512</code></a>.
Thank you for your contribution!</p>
<h2>8.53.0</h2>
<ul>
<li>feat(v8/nuxt): Add <code>url</code> to
<code>SourcemapsUploadOptions</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15202">#15202</a>)</li>
<li>fix(v8/react): <code>fromLocation</code> can be undefined in
Tanstack Router Instrumentation (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15237">#15237</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/tannerlinsley"><code>@​tannerlinsley</code></a>.
Thank you for your contribution!</p>
<h2>8.52.1</h2>
<ul>
<li>fix(v8/nextjs): Fix nextjs build warning (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15226">#15226</a>)</li>
<li>ref(v8/browser): Add protocol attributes to resource spans <a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15224">#15224</a></li>
<li>ref(v8/core): Don't set <code>this.name</code> to
<code>new.target.prototype.constructor.name</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15222">#15222</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/Zen-cronic"><code>@​Zen-cronic</code></a>.
Thank you for your contribution!</p>
<h2>8.52.0</h2>
<h3>Important Changes</h3>
<ul>
<li><strong>feat(solidstart): Add <code>withSentry</code> wrapper for
SolidStart config (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15135">#15135</a>)</strong></li>
</ul>
<p>To enable the SolidStart SDK, wrap your SolidStart Config with
<code>withSentry</code>. The <code>sentrySolidStartVite</code> plugin is
now automatically
added by <code>withSentry</code> and you can pass the Sentry build-time
options like this:</p>
<pre lang="js"><code>import { defineConfig } from
'@solidjs/start/config';
import { withSentry } from '@sentry/solidstart';
<p>export default defineConfig(<br />
withSentry(<br />
{<br />
/* Your SolidStart config options... */<br />
},<br />
{<br />
// Options for setting up source maps<br />
org: process.env.SENTRY_ORG,<br />
project: process.env.SENTRY_PROJECT,<br />
authToken: process.env.SENTRY_AUTH_TOKEN,<br />
},<br />
),<br />
);<br />
</code></pre></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e9a45fe6eb"><code>e9a45fe</code></a>
release: 8.54.0</li>
<li><a
href="ff4fb5ffed"><code>ff4fb5f</code></a>
meta(changelog): Update changelog for 8.54.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15261">#15261</a>)</li>
<li><a
href="b6a4a4a036"><code>b6a4a4a</code></a>
fix(node/v8): Add compatibility layer for Prisma v5 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15210">#15210</a>)</li>
<li><a
href="3673689441"><code>3673689</code></a>
feat(v8/deps): Upgrade all OpenTelemetry dependencies (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15098">#15098</a>)</li>
<li><a
href="13aadde725"><code>13aadde</code></a>
Merge branch 'release/8.53.0' into v8</li>
<li><a
href="3d8b132fda"><code>3d8b132</code></a>
release: 8.53.0</li>
<li><a
href="f08e6131da"><code>f08e613</code></a>
meta: Update Changelog for 8.53.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15243">#15243</a>)</li>
<li><a
href="ef4f210781"><code>ef4f210</code></a>
fix(v8/react): From location can be undefined in Tanstack Router
Instrumentat...</li>
<li><a
href="4df37594f6"><code>4df3759</code></a>
feat(v8/nuxt): Add <code>url</code> to
<code>SourcemapsUploadOptions</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15202">#15202</a>)</li>
<li><a
href="36bdc47676"><code>36bdc47</code></a>
Merge branch 'release/8.52.1' into v8</li>
<li>Additional commits viewable in <a
href="https://github.com/getsentry/sentry-javascript/compare/8.51.0...8.54.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@stripe/stripe-js` from 5.5.0 to 5.6.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/stripe/stripe-js/releases"><code>@​stripe/stripe-js</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v5.6.0</h2>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3>New features</h3>
<h3>Fixes</h3>
<ul>
<li>Fix runServerUpdate type (<a
href="https://redirect.github.com/stripe/stripe-js/issues/712">#712</a>)</li>
<li>Push release commit and tag before creating release (<a
href="https://redirect.github.com/stripe/stripe-js/issues/707">#707</a>)</li>
</ul>
<h3>Changed</h3>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="085deba188"><code>085deba</code></a>
v5.6.0</li>
<li><a
href="d337871030"><code>d337871</code></a>
Fix runServerUpdate type (<a
href="https://redirect.github.com/stripe/stripe-js/issues/712">#712</a>)</li>
<li><a
href="31aef3556c"><code>31aef35</code></a>
Push release commit and tag before creating release (<a
href="https://redirect.github.com/stripe/stripe-js/issues/707">#707</a>)</li>
<li><a
href="f93c985d67"><code>f93c985</code></a>
v5.5.0</li>
<li>See full diff in <a
href="https://github.com/stripe/stripe-js/compare/v5.5.0...v5.6.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `launchdarkly-react-client-sdk` from 3.6.0 to 3.6.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/launchdarkly/react-client-sdk/releases">launchdarkly-react-client-sdk's
releases</a>.</em></p>
<blockquote>
<h2>launchdarkly-react-client-sdk: v3.6.1</h2>
<h2><a
href="https://github.com/launchdarkly/react-client-sdk/compare/launchdarkly-react-client-sdk-v3.6.0...launchdarkly-react-client-sdk-v3.6.1">3.6.1</a>
(2025-01-30)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>update package.json to support react 19 (<a
href="https://redirect.github.com/launchdarkly/react-client-sdk/issues/341">#341</a>)
(<a
href="2c0fc335eb">2c0fc33</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/launchdarkly/react-client-sdk/blob/main/CHANGELOG.md">launchdarkly-react-client-sdk's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/launchdarkly/react-client-sdk/compare/launchdarkly-react-client-sdk-v3.6.0...launchdarkly-react-client-sdk-v3.6.1">3.6.1</a>
(2025-01-30)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>update package.json to support react 19 (<a
href="https://redirect.github.com/launchdarkly/react-client-sdk/issues/341">#341</a>)
(<a
href="2c0fc335eb">2c0fc33</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="090c8db0a2"><code>090c8db</code></a>
chore(main): release launchdarkly-react-client-sdk 3.6.1 (<a
href="https://redirect.github.com/launchdarkly/react-client-sdk/issues/344">#344</a>)</li>
<li><a
href="2c0fc335eb"><code>2c0fc33</code></a>
fix: update package.json to support react 19 (<a
href="https://redirect.github.com/launchdarkly/react-client-sdk/issues/341">#341</a>)</li>
<li>See full diff in <a
href="https://github.com/launchdarkly/react-client-sdk/compare/launchdarkly-react-client-sdk-v3.6.0...launchdarkly-react-client-sdk-v3.6.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `recharts` from 2.15.0 to 2.15.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/recharts/recharts/releases">recharts's
releases</a>.</em></p>
<blockquote>
<h2>v2.15.1</h2>
<h2>What's Changed</h2>
<p>Quick patch release, nothing crazy going on here.</p>
<p>In the meantime please help us test recharts 3.0 alpha <a
href="https://redirect.github.com/recharts/recharts/issues/5445">recharts/recharts#5445</a>
🚀</p>
<h4>Fix</h4>
<ul>
<li><code>Legend - Typescript</code>: add <code>dataKey</code> type to
legend formatter props by <a
href="https://github.com/lucasassisrosa"><code>@​lucasassisrosa</code></a>
in <a
href="https://redirect.github.com/recharts/recharts/pull/5511">recharts/recharts#5511</a>.
Fixes <a
href="https://redirect.github.com/recharts/recharts/issues/5508">recharts/recharts#5508</a></li>
</ul>
<h4>Chore</h4>
<ul>
<li>Make sure <code>react-smooth</code> version is up to date in
package.json for R19 support by <a
href="https://github.com/acomanescu"><code>@​acomanescu</code></a> in <a
href="https://redirect.github.com/recharts/recharts/pull/5422">recharts/recharts#5422</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/acomanescu"><code>@​acomanescu</code></a> made
their first contribution in <a
href="https://redirect.github.com/recharts/recharts/pull/5422">recharts/recharts#5422</a></li>
<li><a
href="https://github.com/lucasassisrosa"><code>@​lucasassisrosa</code></a>
made their first contribution in <a
href="https://redirect.github.com/recharts/recharts/pull/5511">recharts/recharts#5511</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/recharts/recharts/compare/v2.15.0...v2.15.1">https://github.com/recharts/recharts/compare/v2.15.0...v2.15.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3ecaab0e88"><code>3ecaab0</code></a>
2.15.1</li>
<li><a
href="786cda6f02"><code>786cda6</code></a>
feat: Add the dataKey type to legend formatter props (<a
href="https://redirect.github.com/recharts/recharts/issues/5511">#5511</a>)</li>
<li><a
href="a3cf0247f9"><code>a3cf024</code></a>
chore: update react-smooth version to support React 19 (<a
href="https://redirect.github.com/recharts/recharts/issues/5422">#5422</a>)</li>
<li>See full diff in <a
href="https://github.com/recharts/recharts/compare/v2.15.0...v2.15.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-05 22:07:52 +00:00
Aarushi
277a896a83 feat(platform/external-api): Enhance the output from the external API on agent output (#9430)
This PR does two main things: 

1) Fixes the nodes block to show the name of the pins, not the generic
word "output".
2) Addes an output block that shows the name and result of the agent
output blocks. This improves readability of the API.

### Changes 🏗️

1) Update nodes block to show the name of the input pin
2) Added an output block to show all the AgentOutputBlocks outputs
3) Added a status field on the agent graph


Example results:

```
{
    "execution_id": "ea6b12ac-36f5-4f19-bc94-0df36f028c29",
    "status": "COMPLETED",
    "nodes": [
        {
            "node_id": "83cd909d-ff35-43c2-bdc9-a2f5142bd145",
            "input": "what is the capital of australia?",
            "output": {
                "result": [
                    "what is the capital of australia?"
                ]
            }
        },
        {
            "node_id": "6bdf81fc-2d56-4e32-82d5-24f8c5645cb5",
            "input": {
                "model": "gpt-4o",
                "credentials": {
                    "id": "604d8e22-3e24-4451-93eb-b17a276d3b8c",
                    "title": "openai",
                    "provider": "openai",
                    "type": "api_key"
                },
                "prompt": "what is the capital of australia?"
            },
            "output": {
                "response": [
                    "The capital of Australia is Canberra."
                ],
                "prompt": [
                    "[{\"role\": \"user\", \"content\": \"what is the capital of australia?\"}]"
                ]
            }
        },
        {
            "node_id": "55aa132a-c298-4cb6-9afe-39a56e492ab6",
            "input": "The capital of Australia is Canberra.",
            "output": {
                "output": [
                    "The capital of Australia is Canberra."
                ],
                "name": [
                    "result"
                ]
            }
        }
    ],
    "output": [
        {
            "result": "The capital of Australia is Canberra."
        }
    ]
}
```

### Checklist 📋

#### For code changes:
Testing: 
Create an agent
Run it via the API
Fetch the results
2025-02-05 22:06:48 +00:00
dependabot[bot]
bd9c0d741a chore(backend/deps): bump the production-dependencies group across 1 directory with 5 updates (#9434)
Bumps the production-dependencies group with 5 updates in the
/autogpt_platform/backend directory:

| Package | From | To |
| --- | --- | --- |
| [e2b-code-interpreter](https://github.com/e2b-dev/code-interpreter) |
`1.0.4` | `1.0.5` |
| [fastapi](https://github.com/fastapi/fastapi) | `0.115.7` | `0.115.8`
|
| [groq](https://github.com/groq/groq-python) | `0.15.0` | `0.18.0` |
| [openai](https://github.com/openai/openai-python) | `1.60.2` |
`1.61.1` |
| [supabase](https://github.com/supabase/supabase-py) | `2.12.0` |
`2.13.0` |


Updates `e2b-code-interpreter` from 1.0.4 to 1.0.5
<details>
<summary>Commits</summary>
<ul>
<li><a
href="007e2e5ae1"><code>007e2e5</code></a>
Merge pull request <a
href="https://redirect.github.com/e2b-dev/code-interpreter/issues/54">#54</a>
from e2b-dev/fix-bug-in-e2b-incompability</li>
<li><a
href="54935958aa"><code>5493595</code></a>
Add changeset</li>
<li><a
href="1b76bbe059"><code>1b76bbe</code></a>
Remove init method</li>
<li><a
href="bfa11701e7"><code>bfa1170</code></a>
[skip ci]Bump package manually</li>
<li><a
href="83f08213fb"><code>83f0821</code></a>
Skip on package.json change - it's just version bump</li>
<li><a
href="f14a2a5f6f"><code>f14a2a5</code></a>
Add to_dict() method in python SDK</li>
<li><a
href="daba22b9c7"><code>daba22b</code></a>
[skip ci] Release new versions</li>
<li><a
href="f8493025c2"><code>f849302</code></a>
Merge pull request <a
href="https://redirect.github.com/e2b-dev/code-interpreter/issues/53">#53</a>
from e2b-dev/update-r-to-44-e2b-1449</li>
<li><a
href="31aabd355a"><code>31aabd3</code></a>
Update Dockerfile</li>
<li><a
href="33ff495b17"><code>33ff495</code></a>
Add changeset</li>
<li>Additional commits viewable in <a
href="https://github.com/e2b-dev/code-interpreter/compare/@e2b/code-interpreter@1.0.4...@e2b/code-interpreter-python@1.0.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `fastapi` from 0.115.7 to 0.115.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fastapi/fastapi/releases">fastapi's
releases</a>.</em></p>
<blockquote>
<h2>0.115.8</h2>
<h3>Fixes</h3>
<ul>
<li>🐛 Fix <code>OAuth2PasswordRequestForm</code> and
<code>OAuth2PasswordRequestFormStrict</code> fixed
<code>grant_type</code> &quot;password&quot; RegEx. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/9783">#9783</a>
by <a
href="https://github.com/skarfie123"><code>@​skarfie123</code></a>.</li>
</ul>
<h3>Refactors</h3>
<ul>
<li> Simplify tests for body_multiple_params . PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13237">#13237</a>
by <a
href="https://github.com/alejsdev"><code>@​alejsdev</code></a>.</li>
<li>♻️ Move duplicated code portion to a static method in the
<code>APIKeyBase</code> super class. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/3142">#3142</a>
by <a
href="https://github.com/ShahriyarR"><code>@​ShahriyarR</code></a>.</li>
<li> Simplify tests for request_files. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13182">#13182</a>
by <a
href="https://github.com/alejsdev"><code>@​alejsdev</code></a>.</li>
</ul>
<h3>Docs</h3>
<ul>
<li>📝 Change the word &quot;unwrap&quot; to &quot;unpack&quot; in
<code>docs/en/docs/tutorial/extra-models.md</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13061">#13061</a>
by <a
href="https://github.com/timothy-jeong"><code>@​timothy-jeong</code></a>.</li>
<li>📝 Update Request Body's <code>tutorial002</code> to deal with
<code>tax=0</code> case. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13230">#13230</a>
by <a href="https://github.com/togogh"><code>@​togogh</code></a>.</li>
<li>👥 Update FastAPI People - Experts. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13269">#13269</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Translations</h3>
<ul>
<li>🌐 Add Japanese translation for
<code>docs/ja/docs/environment-variables.md</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13226">#13226</a>
by <a
href="https://github.com/k94-ishi"><code>@​k94-ishi</code></a>.</li>
<li>🌐 Add Russian translation for
<code>docs/ru/docs/advanced/async-tests.md</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13227">#13227</a>
by <a
href="https://github.com/Rishat-F"><code>@​Rishat-F</code></a>.</li>
<li>🌐 Update Russian translation for
<code>docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md</code>.
PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13252">#13252</a>
by <a
href="https://github.com/Rishat-F"><code>@​Rishat-F</code></a>.</li>
<li>🌐 Add Russian translation for
<code>docs/ru/docs/tutorial/bigger-applications.md</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13154">#13154</a>
by <a href="https://github.com/alv2017"><code>@​alv2017</code></a>.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>⬆️ Add support for Python 3.13. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13274">#13274</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>⬆️ Upgrade AnyIO max version for tests, new range:
<code>&gt;=3.2.1,&lt;5.0.0</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13273">#13273</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🔧 Update Sponsors badges. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13271">#13271</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>♻️ Fix <code>notify_translations.py</code> empty env var handling
for PR label events vs workflow_dispatch. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13272">#13272</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>♻️ Refactor and move <code>scripts/notify_translations.py</code>, no
need for a custom GitHub Action. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13270">#13270</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🔨 Update FastAPI People Experts script, refactor and optimize data
fetching to handle rate limits. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13267">#13267</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>⬆ Bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13251">#13251</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7128971f1d"><code>7128971</code></a>
🔖 Release version 0.115.8</li>
<li><a
href="55f8a446c7"><code>55f8a44</code></a>
📝 Update release notes</li>
<li><a
href="83ab6ac957"><code>83ab6ac</code></a>
📝 Change the word &quot;unwrap&quot; to &quot;unpack&quot; in
`docs/en/docs/tutorial/extra-models...</li>
<li><a
href="3d02a920ab"><code>3d02a92</code></a>
📝 Update release notes</li>
<li><a
href="1b00f8ae78"><code>1b00f8a</code></a>
 Simplify tests for body_multiple_params (<a
href="https://redirect.github.com/fastapi/fastapi/issues/13237">#13237</a>)</li>
<li><a
href="d97647fd57"><code>d97647f</code></a>
📝 Update release notes</li>
<li><a
href="9667ce87a9"><code>9667ce8</code></a>
📝 Update Request Body's <code>tutorial002</code> to deal with
<code>tax=0</code> case (<a
href="https://redirect.github.com/fastapi/fastapi/issues/13230">#13230</a>)</li>
<li><a
href="0541693bc7"><code>0541693</code></a>
📝 Update release notes</li>
<li><a
href="041b2e1c46"><code>041b2e1</code></a>
📝 Update release notes</li>
<li><a
href="30b270be9a"><code>30b270b</code></a>
♻️ Move duplicated code portion to a static method in the
<code>APIKeyBase</code> super ...</li>
<li>Additional commits viewable in <a
href="https://github.com/fastapi/fastapi/compare/0.115.7...0.115.8">compare
view</a></li>
</ul>
</details>
<br />

Updates `groq` from 0.15.0 to 0.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/groq/groq-python/releases">groq's
releases</a>.</em></p>
<blockquote>
<h2>v0.18.0</h2>
<h2>0.18.0 (2025-02-05)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.17.0...v0.18.0">v0.17.0...v0.18.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> Add batch API (<a
href="https://redirect.github.com/groq/groq-python/issues/191">#191</a>)
(<a
href="367a744f46">367a744</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> bummp ruff dependency (<a
href="https://redirect.github.com/groq/groq-python/issues/190">#190</a>)
(<a
href="61678fc5fd">61678fc</a>)</li>
<li><strong>internal:</strong> change default timeout to an int (<a
href="https://redirect.github.com/groq/groq-python/issues/188">#188</a>)
(<a
href="348e152671">348e152</a>)</li>
</ul>
<h2>v0.17.0</h2>
<h2>0.17.0 (2025-02-03)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.16.0...v0.17.0">v0.16.0...v0.17.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/185">#185</a>)
(<a
href="e2373395cf">e237339</a>)</li>
</ul>
<h2>v0.16.0</h2>
<h2>0.16.0 (2025-01-29)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.15.0...v0.16.0">v0.15.0...v0.16.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/183">#183</a>)
(<a
href="a5cdbc5af7">a5cdbc5</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/177">#177</a>)
(<a
href="01e63041c8">01e6304</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/180">#180</a>)
(<a
href="5c8db1a979">5c8db1a</a>)</li>
<li><strong>internal:</strong> minor formatting changes (<a
href="https://redirect.github.com/groq/groq-python/issues/182">#182</a>)
(<a
href="2c4e409fe0">2c4e409</a>)</li>
<li><strong>internal:</strong> minor style changes (<a
href="https://redirect.github.com/groq/groq-python/issues/181">#181</a>)
(<a
href="77c752ab1a">77c752a</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>raw responses:</strong> fix duplicate <code>the</code> (<a
href="https://redirect.github.com/groq/groq-python/issues/179">#179</a>)
(<a
href="a28cbd863d">a28cbd8</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/groq/groq-python/blob/main/CHANGELOG.md">groq's
changelog</a>.</em></p>
<blockquote>
<h2>0.18.0 (2025-02-05)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.17.0...v0.18.0">v0.17.0...v0.18.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> Add batch API (<a
href="https://redirect.github.com/groq/groq-python/issues/191">#191</a>)
(<a
href="367a744f46">367a744</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> bummp ruff dependency (<a
href="https://redirect.github.com/groq/groq-python/issues/190">#190</a>)
(<a
href="61678fc5fd">61678fc</a>)</li>
<li><strong>internal:</strong> change default timeout to an int (<a
href="https://redirect.github.com/groq/groq-python/issues/188">#188</a>)
(<a
href="348e152671">348e152</a>)</li>
</ul>
<h2>0.17.0 (2025-02-03)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.16.0...v0.17.0">v0.16.0...v0.17.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/185">#185</a>)
(<a
href="e2373395cf">e237339</a>)</li>
</ul>
<h2>0.16.0 (2025-01-29)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.15.0...v0.16.0">v0.15.0...v0.16.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/183">#183</a>)
(<a
href="a5cdbc5af7">a5cdbc5</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/177">#177</a>)
(<a
href="01e63041c8">01e6304</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/180">#180</a>)
(<a
href="5c8db1a979">5c8db1a</a>)</li>
<li><strong>internal:</strong> minor formatting changes (<a
href="https://redirect.github.com/groq/groq-python/issues/182">#182</a>)
(<a
href="2c4e409fe0">2c4e409</a>)</li>
<li><strong>internal:</strong> minor style changes (<a
href="https://redirect.github.com/groq/groq-python/issues/181">#181</a>)
(<a
href="77c752ab1a">77c752a</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>raw responses:</strong> fix duplicate <code>the</code> (<a
href="https://redirect.github.com/groq/groq-python/issues/179">#179</a>)
(<a
href="a28cbd863d">a28cbd8</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b74ce9e301"><code>b74ce9e</code></a>
release: 0.18.0 (<a
href="https://redirect.github.com/groq/groq-python/issues/189">#189</a>)</li>
<li><a
href="3cee54eece"><code>3cee54e</code></a>
release: 0.17.0 (<a
href="https://redirect.github.com/groq/groq-python/issues/186">#186</a>)</li>
<li><a
href="10566c3847"><code>10566c3</code></a>
release: 0.16.0 (<a
href="https://redirect.github.com/groq/groq-python/issues/178">#178</a>)</li>
<li>See full diff in <a
href="https://github.com/groq/groq-python/compare/v0.15.0...v0.18.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `openai` from 1.60.2 to 1.61.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/releases">openai's
releases</a>.</em></p>
<blockquote>
<h2>v1.61.1</h2>
<h2>1.61.1 (2025-02-05)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.61.0...v1.61.1">v1.61.0...v1.61.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api/types:</strong> correct audio duration &amp; role types
(<a
href="https://redirect.github.com/openai/openai-python/issues/2091">#2091</a>)
(<a
href="afcea4891f">afcea48</a>)</li>
<li><strong>cli/chat:</strong> only send params when set (<a
href="https://redirect.github.com/openai/openai-python/issues/2077">#2077</a>)
(<a
href="688b223d9a">688b223</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> bummp ruff dependency (<a
href="https://redirect.github.com/openai/openai-python/issues/2080">#2080</a>)
(<a
href="b7a80b1994">b7a80b1</a>)</li>
<li><strong>internal:</strong> change default timeout to an int (<a
href="https://redirect.github.com/openai/openai-python/issues/2079">#2079</a>)
(<a
href="d3df1c6ca0">d3df1c6</a>)</li>
</ul>
<h2>v1.61.0</h2>
<h2>1.61.0 (2025-01-31)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.60.2...v1.61.0">v1.60.2...v1.61.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add o3-mini (<a
href="https://redirect.github.com/openai/openai-python/issues/2067">#2067</a>)
(<a
href="12b87a4a1e">12b87a4</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> correct metadata type + other fixes (<a
href="12b87a4a1e">12b87a4</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>helpers:</strong> section links (<a
href="ef8d3cce40">ef8d3cc</a>)</li>
<li><strong>types:</strong> fix Metadata types (<a
href="82d3156e74">82d3156</a>)</li>
<li>update api.md (<a
href="https://redirect.github.com/openai/openai-python/issues/2063">#2063</a>)
(<a
href="21964f00fb">21964f0</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>readme:</strong> current section links (<a
href="https://redirect.github.com/openai/openai-python/issues/2055">#2055</a>)
(<a
href="ef8d3cce40">ef8d3cc</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/blob/main/CHANGELOG.md">openai's
changelog</a>.</em></p>
<blockquote>
<h2>1.61.1 (2025-02-05)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.61.0...v1.61.1">v1.61.0...v1.61.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api/types:</strong> correct audio duration &amp; role types
(<a
href="https://redirect.github.com/openai/openai-python/issues/2091">#2091</a>)
(<a
href="afcea4891f">afcea48</a>)</li>
<li><strong>cli/chat:</strong> only send params when set (<a
href="https://redirect.github.com/openai/openai-python/issues/2077">#2077</a>)
(<a
href="688b223d9a">688b223</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> bummp ruff dependency (<a
href="https://redirect.github.com/openai/openai-python/issues/2080">#2080</a>)
(<a
href="b7a80b1994">b7a80b1</a>)</li>
<li><strong>internal:</strong> change default timeout to an int (<a
href="https://redirect.github.com/openai/openai-python/issues/2079">#2079</a>)
(<a
href="d3df1c6ca0">d3df1c6</a>)</li>
</ul>
<h2>1.61.0 (2025-01-31)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.60.2...v1.61.0">v1.60.2...v1.61.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add o3-mini (<a
href="https://redirect.github.com/openai/openai-python/issues/2067">#2067</a>)
(<a
href="12b87a4a1e">12b87a4</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> correct metadata type + other fixes (<a
href="12b87a4a1e">12b87a4</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>helpers:</strong> section links (<a
href="ef8d3cce40">ef8d3cc</a>)</li>
<li><strong>types:</strong> fix Metadata types (<a
href="82d3156e74">82d3156</a>)</li>
<li>update api.md (<a
href="https://redirect.github.com/openai/openai-python/issues/2063">#2063</a>)
(<a
href="21964f00fb">21964f0</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>readme:</strong> current section links (<a
href="https://redirect.github.com/openai/openai-python/issues/2055">#2055</a>)
(<a
href="ef8d3cce40">ef8d3cc</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7193688e36"><code>7193688</code></a>
release: 1.61.1</li>
<li><a
href="f344db250a"><code>f344db2</code></a>
fix(api/types): correct audio duration &amp; role types (<a
href="https://redirect.github.com/openai/openai-python/issues/2091">#2091</a>)</li>
<li><a
href="6afde0dc85"><code>6afde0d</code></a>
chore(internal): bummp ruff dependency (<a
href="https://redirect.github.com/openai/openai-python/issues/2080">#2080</a>)</li>
<li><a
href="5a1a412b77"><code>5a1a412</code></a>
chore(internal): change default timeout to an int (<a
href="https://redirect.github.com/openai/openai-python/issues/2079">#2079</a>)</li>
<li><a
href="c27e8cc997"><code>c27e8cc</code></a>
fix(cli/chat): only send params when set (<a
href="https://redirect.github.com/openai/openai-python/issues/2077">#2077</a>)</li>
<li><a
href="7a6517d81e"><code>7a6517d</code></a>
release: 1.61.0</li>
<li><a
href="b56b357e60"><code>b56b357</code></a>
chore(types): fix Metadata types</li>
<li><a
href="fdd52476b5"><code>fdd5247</code></a>
feat(api): add o3-mini (<a
href="https://redirect.github.com/openai/openai-python/issues/2067">#2067</a>)</li>
<li><a
href="a99096823a"><code>a990968</code></a>
Revert &quot;fix(parsing): don't validate input tools in the
asynchronous `.parse(...</li>
<li><a
href="d779e40bc9"><code>d779e40</code></a>
chore: update api.md (<a
href="https://redirect.github.com/openai/openai-python/issues/2063">#2063</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/openai/openai-python/compare/v1.60.2...v1.61.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `supabase` from 2.12.0 to 2.13.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/supabase/supabase-py/releases">supabase's
releases</a>.</em></p>
<blockquote>
<h2>v2.13.0</h2>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.12.0...v2.13.0">2.13.0</a>
(2025-02-04)</h2>
<h3>Features</h3>
<ul>
<li><strong>realtime:</strong> bump realtime from 2.2.0 to 2.3.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1049">#1049</a>)
(<a
href="2347401770">2347401</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.11.2 to 2.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1051">#1051</a>)
(<a
href="4a2bb9e73e">4a2bb9e</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.9.2 to 0.9.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1052">#1052</a>)
(<a
href="29fed38015">29fed38</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.11.1 to 0.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1050">#1050</a>)
(<a
href="8c5d48f51f">8c5d48f</a>)</li>
<li>update SupabaseAuthClient to use super instead of calling base class
(<a
href="https://redirect.github.com/supabase/supabase-py/issues/1045">#1045</a>)
(<a
href="3efb4a678b">3efb4a6</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/supabase/supabase-py/blob/main/CHANGELOG.md">supabase's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.12.0...v2.13.0">2.13.0</a>
(2025-02-04)</h2>
<h3>Features</h3>
<ul>
<li><strong>realtime:</strong> bump realtime from 2.2.0 to 2.3.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1049">#1049</a>)
(<a
href="2347401770">2347401</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.11.2 to 2.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1051">#1051</a>)
(<a
href="4a2bb9e73e">4a2bb9e</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.9.2 to 0.9.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1052">#1052</a>)
(<a
href="29fed38015">29fed38</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.11.1 to 0.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1050">#1050</a>)
(<a
href="8c5d48f51f">8c5d48f</a>)</li>
<li>update SupabaseAuthClient to use super instead of calling base class
(<a
href="https://redirect.github.com/supabase/supabase-py/issues/1045">#1045</a>)
(<a
href="3efb4a678b">3efb4a6</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c70802e55c"><code>c70802e</code></a>
chore(main): release 2.13.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1046">#1046</a>)</li>
<li><a
href="614cacc6a9"><code>614cacc</code></a>
chore(tests): increase coverage (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1053">#1053</a>)</li>
<li><a
href="29fed38015"><code>29fed38</code></a>
fix(functions): bump supafunc from 0.9.2 to 0.9.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1052">#1052</a>)</li>
<li><a
href="4a2bb9e73e"><code>4a2bb9e</code></a>
fix(auth): bump gotrue from 2.11.2 to 2.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1051">#1051</a>)</li>
<li><a
href="8c5d48f51f"><code>8c5d48f</code></a>
fix(storage): bump storage3 from 0.11.1 to 0.11.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1050">#1050</a>)</li>
<li><a
href="2347401770"><code>2347401</code></a>
feat(realtime): bump realtime from 2.2.0 to 2.3.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1049">#1049</a>)</li>
<li><a
href="4237977463"><code>4237977</code></a>
chore(deps-dev): bump black from 24.10.0 to 25.1.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1044">#1044</a>)</li>
<li><a
href="489043f03a"><code>489043f</code></a>
chore(deps-dev): bump pytest-asyncio from 0.25.2 to 0.25.3 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1043">#1043</a>)</li>
<li><a
href="b007da45c6"><code>b007da4</code></a>
chore(deps-dev): bump commitizen from 4.1.0 to 4.1.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1042">#1042</a>)</li>
<li><a
href="9a8713125e"><code>9a87131</code></a>
chore(ci): pipeline using same version of python for all tests (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1047">#1047</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/supabase/supabase-py/compare/v2.12.0...v2.13.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-02-05 21:52:03 +00:00
dependabot[bot]
c098a8d659 chore(frontend/deps): bump framer-motion from 11.16.0 to 12.0.11 in /autogpt_platform/frontend (#9403)
Bumps [framer-motion](https://github.com/motiondivision/motion) from
11.16.0 to 12.0.11.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/motiondivision/motion/blob/main/CHANGELOG.md">framer-motion's
changelog</a>.</em></p>
<blockquote>
<h2>[12.0.11] 2025-02-03</h2>
<h3>Fixed</h3>
<ul>
<li>Moving <code>updateSVGDimensions</code> to its own file to help with
tree-shaking.</li>
</ul>
<h2>[12.0.10] 2025-02-03</h2>
<h3>Fixed</h3>
<ul>
<li>Providing <code>MotionValue</code> to <code>motion</code> component
from <code>motion/react-client</code> entrypoint.</li>
</ul>
<h2>[12.0.9] 2025-02-03</h2>
<h3>Fixed</h3>
<ul>
<li>Removing React from bundle.</li>
</ul>
<h2>[12.0.8] 2025-02-03</h2>
<h3>Fixed</h3>
<ul>
<li>Infer type of <code>children</code> prop for
<code>motion.create</code>.</li>
</ul>
<h2>[12.0.7] 2025-01-28</h2>
<h3>Fixed</h3>
<ul>
<li>Fixed SVG transform animations via <code>animate</code>.</li>
</ul>
<h2>[12.0.6] 2025-01-27</h2>
<h3>Fixed</h3>
<ul>
<li>Discard layout projection snapshots if 0x0.</li>
</ul>
<h2>[12.0.5] 2025-01-24</h2>
<h3>Fixed</h3>
<ul>
<li>Fix scale correction for CSS variables.</li>
</ul>
<h2>[12.0.4] 2025-01-24</h2>
<h3>Fixed</h3>
<ul>
<li>Add scale correction for CSS variables.</li>
</ul>
<h2>[12.0.3] 2025-01-23</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ac626f5287"><code>ac626f5</code></a>
v12.0.11</li>
<li><a
href="f0172c942b"><code>f0172c9</code></a>
Latest</li>
<li><a
href="4855269501"><code>4855269</code></a>
Fixing type imports</li>
<li><a
href="553429c4c9"><code>553429c</code></a>
Latest</li>
<li><a
href="1b2e573055"><code>1b2e573</code></a>
v12.0.10</li>
<li><a
href="cfcfe30984"><code>cfcfe30</code></a>
Latest</li>
<li><a
href="97f7cb26fc"><code>97f7cb2</code></a>
Latest</li>
<li><a
href="cbeafb2aed"><code>cbeafb2</code></a>
v12.0.9</li>
<li><a
href="e70c1ba012"><code>e70c1ba</code></a>
Latest</li>
<li><a
href="90f083ed7b"><code>90f083e</code></a>
Latest (<a
href="https://redirect.github.com/motiondivision/motion/issues/3043">#3043</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/motiondivision/motion/compare/v11.16.0...v12.0.11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=framer-motion&package-manager=npm_and_yarn&previous-version=11.16.0&new-version=12.0.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-05 21:47:28 +00:00
Zamil Majdy
1d30e401fe fix(backend): Charge user credits before its block execution (#9427)
### Changes 🏗️

Instead of letting the user to execution the block then break it
post-execution.
We can charge the user first and execute it afterward.
The trade-offs:
* We can't charge a block that is charged based on the execution time.
* We will also charge failed block executions.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-05 15:39:41 +00:00
Zamil Majdy
22536de71f feat(backend): Avoid multiple auto-top-ups within the same execution (#9426)
### Changes 🏗️

This PR makes auto-top-up more reliable:
* Auto top-up will not be executed more than once within a single
execution.
* Auto top-up will always be executed even if it was previously failing.
* Auto top-up will never be called twice or triggered when the balance
is more than the threshold, even in the concurrent block executions
set-up.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-05 15:39:23 +00:00
Zamil Majdy
0915879049 feat(backend): Allow promo coupon for credits top-up 2025-02-05 18:28:01 +07:00
Zamil Majdy
243122311c feat(frontend): Use USD value instead of cents credit value (#9423)
The use of credit points (equivalent to cents) can cause confussion, the
scope of this PR is removing the use of it in the UI and using USD value
instead.

### Changes 🏗️

Show US values on:
* credit page
* block cost
* balance button in the navbar

<img width="1440" alt="image"
src="https://github.com/user-attachments/assets/2b6a18b0-f89d-48bf-84bd-0ea6aa9182f7"
/>

<img width="1440" alt="image"
src="https://github.com/user-attachments/assets/7545b496-0e7c-49ea-afc1-a3d1fd3289fb"
/>



### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-05 10:40:57 +00:00
Krzysztof Czerwinski
533d120e98 feat(backend): Update llm models (#9390)
There are some models missing and their metadata is incorrect.

### Changes 🏗️

- Add models, update metadata and pricing.
- Add `max_output_tokens` to metadata, `None` indicates that max tokes
are unspecified in provider docs
- Added models:
  - OpenAI `o3-mini` and `o1`
  - Anthropic `claude-3-5-haiku-latest`
  - Groq `llama-3.3-70b-versatile`, `deepseek-r1-distill-llama-70b`
  - Ollama `llama3.3`
- Use the max output tokens from the provider that handles the least (so
it works for all) for OpenRouter models
- Use `max_output_tokens` and 4096 if `None` as a fallback
- Removed models (no longer working):
  - `gemma-7b-it`
  - `llama-3.1-70b-versatile`
  - `llama-3.1-405b-reasoning`
-  Rename llm enum name from `GEMINI_FLASH_1_5_8B` to `GEMINI_FLASH_1_5`

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-02-05 09:53:34 +00:00
Zamil Majdy
58cadeb3b9 feat(frontend): Fix wordings for auto top-up feature (#9419)
### Changes

Make the auto top-up wordings clearer: 

<img width="547" alt="Screenshot 2025-02-05 at 1 38 16 AM"
src="https://github.com/user-attachments/assets/9a902442-1815-4a38-af39-d7d4b0e120f0"
/>

<img width="555" alt="Screenshot 2025-02-05 at 1 40 29 AM"
src="https://github.com/user-attachments/assets/4c9c9cdc-2d73-45f2-8a8d-f7ae7f97541b"
/>
es 🏗️

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-05 10:27:10 +07:00
Zamil Majdy
9151211d2a fix(backend): Set the minimum auto top-up amount to 500 credits (#9418)
### Changes 🏗️

* Set the minimum auto top-up amount to 500.
* Add description on minimum and dollar value in the input box.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-04 17:01:33 +00:00
Zamil Majdy
8e68e20fef fix(backend): Fix return URL of billing portal when platform_base_url != frontend_base_url (#9417)
### Changes 🏗️

Fix return URL of billing portal when platform_base_url !=
frontend_base_url.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-04 16:15:29 +00:00
Nicholas Tindle
a7d545cd5d Merge branch 'master' into dev 2025-02-04 08:45:34 -06:00
Nicholas Tindle
0fbabe690a Merge branch 'master' into dev 2025-02-04 08:43:52 -06:00
Zamil Majdy
cdd2d5696c fix(backend): Fix doubly reported produced output (#9412)
https://github.com/Significant-Gravitas/AutoGPT/pull/9340/files#diff-1b278ebf10a9da0fb5030010222b3a6df2b05a5463cad428cd6c38a1541b0f73R210-R219
introduced a bug where the spend_credit and update_execution is called
inside the loop instead of by the end of the execution.

### Changes 🏗️

Untabbed the `spend_credit` and `update_execution` code outside the
loop.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-04 14:42:19 +00:00
Zamil Majdy
f44453be6e fix(backend): Fix transaction history listing on older transaction with no metadata 2025-02-03 16:33:18 +01:00
Nicholas Tindle
4302c5d60a feat: add screenshotone block (#9308)
I want to be able to screenshot things

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
Adds ScreenshotOne blocks with the ability to screenshot stuff

### 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] Built agent with it

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-02-03 14:46:26 +00:00
Nicholas Tindle
53aea8908a fix(backend): fix missing agent object requirement (#9380) 2025-02-03 07:42:54 -06:00
Zamil Majdy
7b50e9bd77 fix(backend): Fix return url post top-up (#9392)
### Changes 🏗️

Fix return URL post-top-up, when FRONT_END_BASE_URL is used.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-03 12:31:33 +00:00
Zamil Majdy
3de982792e fix(backend): Fix broken top-up flow (#9391)
https://github.com/Significant-Gravitas/AutoGPT/pull/9296 caused these
errors:

<img width="440" alt="image"
src="https://github.com/user-attachments/assets/f100619b-1a4c-44fb-b961-e74210894a91"
/>

<img width="411" alt="image"
src="https://github.com/user-attachments/assets/0c1a8aff-b14f-4ea8-8ae9-b8928c8511cf"
/>



### Changes 🏗️

Removed customer email & return_url.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-03 10:58:48 +00:00
Krzysztof Czerwinski
74b8b45e0a fix(frontend): Fix typing for dict/dict[Any, Any] SchemaField (#9383)
Type system complains about this entry as impossible but this code path
is possible and without it some blocks are broken (e.g. `Step Through
Items`)

### Changes 🏗️

- Restore `case "object"` in `NodeGenericInputField` 
- Update `BlockIOKVSubSchema` type, so ts type checking doesn't complain

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-01 20:32:34 +00:00
Krzysztof Czerwinski
5bdd8c252e fix(frontend): Show feedback if user exists on sign up (#9389)
Currently if user tries to sign in with an email that is already
associated with a user they are redirected to login without any
feedback.

### Changes 🏗️

- Show feedback: "User with this email already exists" on signup when
user already registered
- Beta user waitlist message is shown otherwise as previously

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-02-01 15:15:17 +00:00
Muhammad Safi
8e33af6d99 Marketplace UI changes. (#9381)
<!-- Clearly explain the need for these changes: -->
- Consolidated PR #8967 and #8968.
- Fixed issues #9370 and #9371
- Fixed padding for StoreCard.

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Muhammad Safi <muhammadsafi@Muhammads-MacBook-Pro.local>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-01-31 09:45:36 +00:00
Muhammad Safi
f481de173d Fixed font for Heading Issue #8971 (#9358)
<!-- Clearly explain the need for these changes: -->
- Changed the Font weight to semibold.
- Adjusted size to 48px.
- Fixed line-height to 54px.
### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Muhammad Safi <muhammadsafi@Muhammads-MacBook-Pro.local>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-01-30 20:53:30 +00:00
Ethan Lee
24306a16bd Update README.md (#9379)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

update backend readme to be more clear on where to run docker

<!-- 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
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-30 18:04:58 +00:00
Abhimanyu Yadav
f5bf36cd97 feat(blocks) : Authentication for todoist block (#9319)
- resolves - #9303 

Implement OAuth authentication for Todoist with a basic authentication
mechanism for testing purposes. The basic authentication will be removed
in the next block pr.

> I’ve been using the official Python SDK for Todoist, called
todoist-api-python.
2025-01-30 16:09:00 +00:00
Zamil Majdy
1f83a8c61a feat(platform): Implement User Credit Transaction History (#9291)
<img width="1129" alt="image"
src="https://github.com/user-attachments/assets/94aab319-7755-413b-91e1-4ad1ba383b83"
/>


### Changes 🏗️

Add a transaction history table on the user credits page.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Krzysztof Czerwinski <kpczerwinski@gmail.com>
2025-01-30 21:15:04 +07:00
Abhimanyu Yadav
a44c9333d3 feat(block) : Todoist rest api blocks (#9369)
- Resolves - #9303 and #9304
- Depends on - https://github.com/Significant-Gravitas/AutoGPT/pull/9319

### Blocks list

Block Name | What It Does | Manually Tested
-- | -- | --
Todoist Create Label | Creates a new label in Todoist | 
Todoist List Labels | Retrieves all personal labels from Todoist | 
Todoist Get Label | Retrieves a specific label by ID | 
Todoist Create Task | Creates a new task in Todoist | 
Todoist Get Tasks | Retrieves active tasks from Todoist | 
Todoist Update Task | Updates an existing task | 
Todoist Close Task | Completes/closes a task | 
Todoist Reopen Task | Reopens a completed task | 
Todoist Delete Task | Permanently deletes a task | 
Todoist List Projects | Retrieves all projects from Todoist | 
Todoist Create Project | Creates a new project in Todoist | 
Todoist Get Project | Retrieves details for a specific project | 
Todoist Update Project | Updates an existing project | 
Todoist Delete Project | Deletes a project and its contents | 
Todoist List Collaborators | Retrieves collaborators on a project | 
Todoist List Sections | Retrieves sections from Todoist | 
Todoist Get Section | Retrieves details for a specific section | 
Todoist Delete Section | Deletes a section and its tasks | 
Todoist Create Comment | Creates a new comment on a task or project | 
Todoist Get Comments | Retrieves all comments for a task or project | 
Todoist Get Comment | Retrieves a specific comment by ID | 
Todoist Update Comment | Updates an existing comment | 
Todoist Delete Comment | Deletes a comment | 

> I’ve only created action blocks in Todoist because webhooks can only
be manually created [we can't do it programatically right now]. I’ve
already emailed Todoist for help, but they haven’t replied yet. Once I
receive a reply, I’ll create a pull request for webhook triggers in
Todoist.
2025-01-30 13:33:29 +00:00
Krzysztof Czerwinski
bd27ce5f26 fix(frontend): Center reset password page (#9377)
### Changes 🏗️

- Add `div` to recenter page elements

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-30 12:30:59 +00:00
Pratim Sadhu
e82df96e56 Fix: Allow further zooming out in the builder (#9325) (#9368)
<!-- Clearly explain the need for these changes: -->
The current minimum zoom level restricts zooming out fully. I reduced
the minZoom level to allow more flexible zooming out for users.

### Changes 🏗️
Reduced minZoom from 0.2 to 0.1 in the ReactFlow component to allow
further zooming out.

<!-- 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 with different elements and zoom ranges to confirm its a
smooth transition
- [ x ] Checked that canvas and all nodes remain unchanged and
interactive

Co-authored-by: Bently <tomnoon9@gmail.com>
2025-01-30 09:51:56 +00:00
Nicholas Tindle
b03e3e47a2 feat(blocks): add text replace block (#9366)
<!-- Clearly explain the need for these changes: -->
User in discord requested the replace text block

### Changes 🏗️
- Adds replace text block
<!-- 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] Passed unit tests

Co-authored-by: Bently <tomnoon9@gmail.com>
2025-01-30 09:33:59 +00:00
dependabot[bot]
a4b962462c chore(backend/deps): bump the production-dependencies group across 1 directory with 9 updates (#9364)
Bumps the production-dependencies group with 9 updates in the
/autogpt_platform/backend directory:

| Package | From | To |
| --- | --- | --- |
| [anthropic](https://github.com/anthropics/anthropic-sdk-python) |
`0.40.0` | `0.45.2` |
|
[google-api-python-client](https://github.com/googleapis/google-api-python-client)
| `2.159.0` | `2.160.0` |
| [groq](https://github.com/groq/groq-python) | `0.13.1` | `0.15.0` |
| [openai](https://github.com/openai/openai-python) | `1.60.0` |
`1.60.2` |
| [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) |
`0.25.2` | `0.25.3` |
| [sentry-sdk](https://github.com/getsentry/sentry-python) | `2.19.2` |
`2.20.0` |
| [stripe](https://github.com/stripe/stripe-python) | `11.4.1` |
`11.5.0` |
| [supabase](https://github.com/supabase/supabase-py) | `2.11.0` |
`2.12.0` |
| [mem0ai](https://github.com/mem0ai/mem0) | `0.1.44` | `0.1.48` |


Updates `anthropic` from 0.40.0 to 0.45.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/anthropic-sdk-python/releases">anthropic's
releases</a>.</em></p>
<blockquote>
<h2>v0.45.2</h2>
<h2>0.45.2 (2025-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.45.1...v0.45.2">v0.45.1...v0.45.2</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>streaming:</strong> avoid invalid deser type error (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/845">#845</a>)
(<a
href="72a2585680">72a2585</a>)</li>
</ul>
<h2>v0.45.1</h2>
<h2>0.45.1 (2025-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.45.0...v0.45.1">v0.45.0...v0.45.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>streaming:</strong> accumulate citations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/844">#844</a>)
(<a
href="e665f2fefd">e665f2f</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> updates (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/841">#841</a>)
(<a
href="fb10a7d658">fb10a7d</a>)</li>
</ul>
<h2>v0.45.0</h2>
<h2>0.45.0 (2025-01-23)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.44.0...v0.45.0">v0.44.0...v0.45.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add citations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/839">#839</a>)
(<a
href="2ec74b6ff1">2ec74b6</a>)</li>
<li><strong>client:</strong> support results endpoint (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/835">#835</a>)
(<a
href="5dd88bf2d2">5dd88bf</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> minor formatting changes (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/838">#838</a>)
(<a
href="31eb826deb">31eb826</a>)</li>
</ul>
<h2>v0.44.0</h2>
<h2>0.44.0 (2025-01-21)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.43.1...v0.44.0">v0.43.1...v0.44.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>streaming:</strong> add request_id getter (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/831">#831</a>)
(<a
href="fb397e0851">fb397e0</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md">anthropic's
changelog</a>.</em></p>
<blockquote>
<h2>0.45.2 (2025-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.45.1...v0.45.2">v0.45.1...v0.45.2</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>streaming:</strong> avoid invalid deser type error (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/845">#845</a>)
(<a
href="72a2585680">72a2585</a>)</li>
</ul>
<h2>0.45.1 (2025-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.45.0...v0.45.1">v0.45.0...v0.45.1</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>streaming:</strong> accumulate citations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/844">#844</a>)
(<a
href="e665f2fefd">e665f2f</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> updates (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/841">#841</a>)
(<a
href="fb10a7d658">fb10a7d</a>)</li>
</ul>
<h2>0.45.0 (2025-01-23)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.44.0...v0.45.0">v0.44.0...v0.45.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add citations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/839">#839</a>)
(<a
href="2ec74b6ff1">2ec74b6</a>)</li>
<li><strong>client:</strong> support results endpoint (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/835">#835</a>)
(<a
href="5dd88bf2d2">5dd88bf</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> minor formatting changes (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/838">#838</a>)
(<a
href="31eb826deb">31eb826</a>)</li>
</ul>
<h2>0.44.0 (2025-01-21)</h2>
<p>Full Changelog: <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.43.1...v0.44.0">v0.43.1...v0.44.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>streaming:</strong> add request_id getter (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/831">#831</a>)
(<a
href="fb397e0851">fb397e0</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>tests:</strong> make test_get_platform less flaky (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/830">#830</a>)
(<a
href="f2c10cae0c">f2c10ca</a>)</li>
</ul>
<h3>Chores</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0f9ccca8e2"><code>0f9ccca</code></a>
release: 0.45.2</li>
<li><a
href="37acfbcda5"><code>37acfbc</code></a>
fix(streaming): avoid invalid deser type error (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/845">#845</a>)</li>
<li><a
href="d0f98a4e6b"><code>d0f98a4</code></a>
release: 0.45.1</li>
<li><a
href="872c614851"><code>872c614</code></a>
fix(streaming): accumulate citations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/844">#844</a>)</li>
<li><a
href="14bf8fe88f"><code>14bf8fe</code></a>
chore(docs): updates (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/841">#841</a>)</li>
<li><a
href="c5102baffb"><code>c5102ba</code></a>
release: 0.45.0</li>
<li><a
href="67aa83e5d5"><code>67aa83e</code></a>
feat(api): add citations (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/839">#839</a>)</li>
<li><a
href="bb1f52bfba"><code>bb1f52b</code></a>
chore(internal): minor formatting changes (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/838">#838</a>)</li>
<li><a
href="4b9140284b"><code>4b91402</code></a>
feat(client): support results endpoint (<a
href="https://redirect.github.com/anthropics/anthropic-sdk-python/issues/835">#835</a>)</li>
<li><a
href="d212ec9f6d"><code>d212ec9</code></a>
release: 0.44.0</li>
<li>Additional commits viewable in <a
href="https://github.com/anthropics/anthropic-sdk-python/compare/v0.40.0...v0.45.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `google-api-python-client` from 2.159.0 to 2.160.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/google-api-python-client/releases">google-api-python-client's
releases</a>.</em></p>
<blockquote>
<h2>v2.160.0</h2>
<h2><a
href="https://github.com/googleapis/google-api-python-client/compare/v2.159.0...v2.160.0">2.160.0</a>
(2025-01-21)</h2>
<h3>Features</h3>
<ul>
<li><strong>accesscontextmanager:</strong> Update the api <a
href="8b40ee6938</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>adsenseplatform:</strong> Update the api <a
href="04355c7c7c</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>aiplatform:</strong> Update the api <a
href="24228d4886</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>analyticsadmin:</strong> Update the api <a
href="dff2a84a82</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>analyticshub:</strong> Update the api <a
href="0208b0b028</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>androidenterprise:</strong> Update the api <a
href="b7865bd3ff</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>classroom:</strong> Update the api <a
href="ef72b5f7f9</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>cloudbuild:</strong> Update the api <a
href="41e76d1b7e</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>compute:</strong> Update the api <a
href="48c508dffa</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>dialogflow:</strong> Update the api <a
href="6c3ff85115</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>discoveryengine:</strong> Update the api <a
href="9afd49fbbf</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>displayvideo:</strong> Update the api <a
href="63b01f3147</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>file:</strong> Update the api <a
href="e7bf3e1cc7</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>gkehub:</strong> Update the api <a
href="aa81a39a6f</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>integrations:</strong> Update the api <a
href="da21dd8beb</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>merchantapi:</strong> Update the api <a
href="c66e25ffad</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>migrationcenter:</strong> Update the api <a
href="06c1759266</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>monitoring:</strong> Update the api <a
href="6d1dc83375</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>netapp:</strong> Update the api <a
href="628b723392</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>networkmanagement:</strong> Update the api <a
href="45d70c19e9</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>redis:</strong> Update the api <a
href="a866933256</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>spanner:</strong> Update the api <a
href="9540ac50fc</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
<li><strong>websecurityscanner:</strong> Update the api <a
href="5eae43739b</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>secretmanager:</strong> Update the api <a
href="477de50ccc</a>
(<a
href="165d3b5ad0">165d3b5</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6ba5c06d12"><code>6ba5c06</code></a>
chore(main): release 2.160.0 (<a
href="https://redirect.github.com/googleapis/google-api-python-client/issues/2552">#2552</a>)</li>
<li><a
href="165d3b5ad0"><code>165d3b5</code></a>
chore: Update discovery artifacts (<a
href="https://redirect.github.com/googleapis/google-api-python-client/issues/2551">#2551</a>)</li>
<li><a
href="f4b3014212"><code>f4b3014</code></a>
chore(python): exclude .github/workflows/unittest.yml in renovate config
(<a
href="https://redirect.github.com/googleapis/google-api-python-client/issues/2546">#2546</a>)</li>
<li>See full diff in <a
href="https://github.com/googleapis/google-api-python-client/compare/v2.159.0...v2.160.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `groq` from 0.13.1 to 0.15.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/groq/groq-python/releases">groq's
releases</a>.</em></p>
<blockquote>
<h2>v0.15.0</h2>
<h2>0.15.0 (2025-01-11)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.14.0...v0.15.0">v0.14.0...v0.15.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/175">#175</a>)
(<a
href="61cffbc78a">61cffbc</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>correctly handle deserialising <code>cls</code> fields (<a
href="https://redirect.github.com/groq/groq-python/issues/174">#174</a>)
(<a
href="0b2e997ce4">0b2e997</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/172">#172</a>)
(<a
href="d6ecadaa24">d6ecada</a>)</li>
</ul>
<h2>v0.14.0</h2>
<h2>0.14.0 (2025-01-09)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.13.1...v0.14.0">v0.13.1...v0.14.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/163">#163</a>)
(<a
href="43a7a5b048">43a7a5b</a>)</li>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/167">#167</a>)
(<a
href="5016206e46">5016206</a>)</li>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/170">#170</a>)
(<a
href="2b35e952e1">2b35e95</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> only call .close() when needed (<a
href="https://redirect.github.com/groq/groq-python/issues/169">#169</a>)
(<a
href="6a0ec576de">6a0ec57</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li>add missing isclass check (<a
href="https://redirect.github.com/groq/groq-python/issues/166">#166</a>)
(<a
href="9cb1e72737">9cb1e72</a>)</li>
<li><strong>internal:</strong> bump httpx dependency (<a
href="https://redirect.github.com/groq/groq-python/issues/168">#168</a>)
(<a
href="c260ae969c">c260ae9</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/158">#158</a>)
(<a
href="85b5765b2b">85b5765</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/160">#160</a>)
(<a
href="8b87c4d657">8b87c4d</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/164">#164</a>)
(<a
href="d7b6be5f4b">d7b6be5</a>)</li>
<li><strong>internal:</strong> fix some typos (<a
href="https://redirect.github.com/groq/groq-python/issues/162">#162</a>)
(<a
href="32482ae691">32482ae</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>readme:</strong> example snippet for client context manager
(<a
href="https://redirect.github.com/groq/groq-python/issues/161">#161</a>)
(<a
href="b7bfd15768">b7bfd15</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/groq/groq-python/blob/main/CHANGELOG.md">groq's
changelog</a>.</em></p>
<blockquote>
<h2>0.15.0 (2025-01-11)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.14.0...v0.15.0">v0.14.0...v0.15.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/175">#175</a>)
(<a
href="61cffbc78a">61cffbc</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>correctly handle deserialising <code>cls</code> fields (<a
href="https://redirect.github.com/groq/groq-python/issues/174">#174</a>)
(<a
href="0b2e997ce4">0b2e997</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/172">#172</a>)
(<a
href="d6ecadaa24">d6ecada</a>)</li>
</ul>
<h2>0.14.0 (2025-01-09)</h2>
<p>Full Changelog: <a
href="https://github.com/groq/groq-python/compare/v0.13.1...v0.14.0">v0.13.1...v0.14.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/163">#163</a>)
(<a
href="43a7a5b048">43a7a5b</a>)</li>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/167">#167</a>)
(<a
href="5016206e46">5016206</a>)</li>
<li><strong>api:</strong> api update (<a
href="https://redirect.github.com/groq/groq-python/issues/170">#170</a>)
(<a
href="2b35e952e1">2b35e95</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> only call .close() when needed (<a
href="https://redirect.github.com/groq/groq-python/issues/169">#169</a>)
(<a
href="6a0ec576de">6a0ec57</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li>add missing isclass check (<a
href="https://redirect.github.com/groq/groq-python/issues/166">#166</a>)
(<a
href="9cb1e72737">9cb1e72</a>)</li>
<li><strong>internal:</strong> bump httpx dependency (<a
href="https://redirect.github.com/groq/groq-python/issues/168">#168</a>)
(<a
href="c260ae969c">c260ae9</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/158">#158</a>)
(<a
href="85b5765b2b">85b5765</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/160">#160</a>)
(<a
href="8b87c4d657">8b87c4d</a>)</li>
<li><strong>internal:</strong> codegen related update (<a
href="https://redirect.github.com/groq/groq-python/issues/164">#164</a>)
(<a
href="d7b6be5f4b">d7b6be5</a>)</li>
<li><strong>internal:</strong> fix some typos (<a
href="https://redirect.github.com/groq/groq-python/issues/162">#162</a>)
(<a
href="32482ae691">32482ae</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>readme:</strong> example snippet for client context manager
(<a
href="https://redirect.github.com/groq/groq-python/issues/161">#161</a>)
(<a
href="b7bfd15768">b7bfd15</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2b91340106"><code>2b91340</code></a>
release: 0.15.0 (<a
href="https://redirect.github.com/groq/groq-python/issues/173">#173</a>)</li>
<li><a
href="f6e2c46aa4"><code>f6e2c46</code></a>
release: 0.14.0 (<a
href="https://redirect.github.com/groq/groq-python/issues/159">#159</a>)</li>
<li>See full diff in <a
href="https://github.com/groq/groq-python/compare/v0.13.1...v0.15.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `openai` from 1.60.0 to 1.60.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/releases">openai's
releases</a>.</em></p>
<blockquote>
<h2>v1.60.2</h2>
<h2>1.60.2 (2025-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.60.1...v1.60.2">v1.60.1...v1.60.2</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>parsing:</strong> don't validate input tools in the
asynchronous <code>.parse()</code> method (<a
href="6fcfe73cd3">6fcfe73</a>)</li>
</ul>
<h2>v1.60.1</h2>
<h2>1.60.1 (2025-01-24)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.60.0...v1.60.1">v1.60.0...v1.60.1</a></p>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> minor formatting changes (<a
href="https://redirect.github.com/openai/openai-python/issues/2050">#2050</a>)
(<a
href="9c44192be5">9c44192</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>examples/azure:</strong> add async snippet (<a
href="https://redirect.github.com/openai/openai-python/issues/1787">#1787</a>)
(<a
href="f60eda1c1e">f60eda1</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/blob/main/CHANGELOG.md">openai's
changelog</a>.</em></p>
<blockquote>
<h2>1.60.2 (2025-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.60.1...v1.60.2">v1.60.1...v1.60.2</a></p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>parsing:</strong> don't validate input tools in the
asynchronous <code>.parse()</code> method (<a
href="6fcfe73cd3">6fcfe73</a>)</li>
</ul>
<h2>1.60.1 (2025-01-24)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v1.60.0...v1.60.1">v1.60.0...v1.60.1</a></p>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> minor formatting changes (<a
href="https://redirect.github.com/openai/openai-python/issues/2050">#2050</a>)
(<a
href="9c44192be5">9c44192</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>examples/azure:</strong> add async snippet (<a
href="https://redirect.github.com/openai/openai-python/issues/1787">#1787</a>)
(<a
href="f60eda1c1e">f60eda1</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d16e6edde5"><code>d16e6ed</code></a>
release: 1.60.2</li>
<li><a
href="257d79e8a0"><code>257d79e</code></a>
fix(parsing): don't validate input tools in the asynchronous
<code>.parse()</code> method</li>
<li><a
href="b95be16e7c"><code>b95be16</code></a>
release: 1.60.1</li>
<li><a
href="27d0e67b1d"><code>27d0e67</code></a>
chore(internal): minor formatting changes (<a
href="https://redirect.github.com/openai/openai-python/issues/2050">#2050</a>)</li>
<li><a
href="abc5459c75"><code>abc5459</code></a>
docs(examples/azure): add async snippet (<a
href="https://redirect.github.com/openai/openai-python/issues/1787">#1787</a>)</li>
<li>See full diff in <a
href="https://github.com/openai/openai-python/compare/v1.60.0...v1.60.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `pytest-asyncio` from 0.25.2 to 0.25.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's
releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.25.3</h2>
<ul>
<li>Avoid errors in cleanup of async generators when event loop is
already closed <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1040">#1040</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7c501923b0"><code>7c50192</code></a>
fix: Avoid errors in cleanup of async generators when event loop is
already c...</li>
<li>See full diff in <a
href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.25.2...v0.25.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `sentry-sdk` from 2.19.2 to 2.20.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-python/releases">sentry-sdk's
releases</a>.</em></p>
<blockquote>
<h2>2.20.0</h2>
<ul>
<li>
<p><strong>New integration:</strong> Add <a
href="https://typer.tiangolo.com/">Typer</a> integration (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3869">#3869</a>)
by <a
href="https://github.com/patrick91"><code>@​patrick91</code></a></p>
<p>For more information, see the documentation for the <a
href="https://docs.sentry.io/platforms/python/integrations/typer/">TyperIntegration</a>.</p>
</li>
<li>
<p><strong>New integration:</strong> Add <a
href="https://www.getunleash.io/">Unleash</a> feature flagging
integration (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3888">#3888</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
<p>For more information, see the documentation for the <a
href="https://docs.sentry.io/platforms/python/integrations/unleash/">UnleashIntegration</a>.</p>
</li>
<li>
<p>Add custom tracking of feature flag evaluations (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3860">#3860</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
</li>
<li>
<p>Feature Flags: Register LD hook in setup instead of init, and don't
check for initialization (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3890">#3890</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
</li>
<li>
<p>Feature Flags: Moved adding of <code>flags</code> context into Scope
(<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3917">#3917</a>)
by <a
href="https://github.com/antonpirker"><code>@​antonpirker</code></a></p>
</li>
<li>
<p>Create a separate group for feature flag test suites (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3911">#3911</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Fix flaky LaunchDarkly tests (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3896">#3896</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
</li>
<li>
<p>Fix LRU cache copying (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3883">#3883</a>)
by <a href="https://github.com/ffelixg"><code>@​ffelixg</code></a></p>
</li>
<li>
<p>Fix cache pollution from mutable reference (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3887">#3887</a>)
by <a
href="https://github.com/cmanallen"><code>@​cmanallen</code></a></p>
</li>
<li>
<p>Centralize minimum version checking (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3910">#3910</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Support SparkIntegration activation after SparkContext created (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3411">#3411</a>)
by <a
href="https://github.com/seyoon-lim"><code>@​seyoon-lim</code></a></p>
</li>
<li>
<p>Preserve ARQ enqueue_job <strong>kwdefaults</strong> after patching
(<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3903">#3903</a>)
by <a href="https://github.com/danmr"><code>@​danmr</code></a></p>
</li>
<li>
<p>Add Github workflow to comment on issues when a fix was released (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3866">#3866</a>)
by <a
href="https://github.com/antonpirker"><code>@​antonpirker</code></a></p>
</li>
<li>
<p>Update test matrix for Sanic (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3904">#3904</a>)
by <a
href="https://github.com/antonpirker"><code>@​antonpirker</code></a></p>
</li>
<li>
<p>Rename scripts (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3885">#3885</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Fix CI (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3878">#3878</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Treat <code>potel-base</code> as release branch in CI (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3912">#3912</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>build(deps): bump actions/create-github-app-token from 1.11.0 to
1.11.1 (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3893">#3893</a>)
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></p>
</li>
<li>
<p>build(deps): bump codecov/codecov-action from 5.0.7 to 5.1.1 (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3867">#3867</a>)
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></p>
</li>
<li>
<p>build(deps): bump codecov/codecov-action from 5.1.1 to 5.1.2 (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3892">#3892</a>)
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md">sentry-sdk's
changelog</a>.</em></p>
<blockquote>
<h2>2.20.0</h2>
<ul>
<li>
<p><strong>New integration:</strong> Add <a
href="https://typer.tiangolo.com/">Typer</a> integration (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3869">#3869</a>)
by <a
href="https://github.com/patrick91"><code>@​patrick91</code></a></p>
<p>For more information, see the documentation for the <a
href="https://docs.sentry.io/platforms/python/integrations/typer/">TyperIntegration</a>.</p>
</li>
<li>
<p><strong>New integration:</strong> Add <a
href="https://www.getunleash.io/">Unleash</a> feature flagging
integration (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3888">#3888</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
<p>For more information, see the documentation for the <a
href="https://docs.sentry.io/platforms/python/integrations/unleash/">UnleashIntegration</a>.</p>
</li>
<li>
<p>Add custom tracking of feature flag evaluations (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3860">#3860</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
</li>
<li>
<p>Feature Flags: Register LD hook in setup instead of init, and don't
check for initialization (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3890">#3890</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
</li>
<li>
<p>Feature Flags: Moved adding of <code>flags</code> context into Scope
(<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3917">#3917</a>)
by <a
href="https://github.com/antonpirker"><code>@​antonpirker</code></a></p>
</li>
<li>
<p>Create a separate group for feature flag test suites (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3911">#3911</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Fix flaky LaunchDarkly tests (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3896">#3896</a>)
by <a href="https://github.com/aliu39"><code>@​aliu39</code></a></p>
</li>
<li>
<p>Fix LRU cache copying (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3883">#3883</a>)
by <a href="https://github.com/ffelixg"><code>@​ffelixg</code></a></p>
</li>
<li>
<p>Fix cache pollution from mutable reference (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3887">#3887</a>)
by <a
href="https://github.com/cmanallen"><code>@​cmanallen</code></a></p>
</li>
<li>
<p>Centralize minimum version checking (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3910">#3910</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Support SparkIntegration activation after SparkContext created (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3411">#3411</a>)
by <a
href="https://github.com/seyoon-lim"><code>@​seyoon-lim</code></a></p>
</li>
<li>
<p>Preserve ARQ enqueue_job <strong>kwdefaults</strong> after patching
(<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3903">#3903</a>)
by <a href="https://github.com/danmr"><code>@​danmr</code></a></p>
</li>
<li>
<p>Add Github workflow to comment on issues when a fix was released (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3866">#3866</a>)
by <a
href="https://github.com/antonpirker"><code>@​antonpirker</code></a></p>
</li>
<li>
<p>Update test matrix for Sanic (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3904">#3904</a>)
by <a
href="https://github.com/antonpirker"><code>@​antonpirker</code></a></p>
</li>
<li>
<p>Rename scripts (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3885">#3885</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Fix CI (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3878">#3878</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>Treat <code>potel-base</code> as release branch in CI (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3912">#3912</a>)
by <a
href="https://github.com/sentrivana"><code>@​sentrivana</code></a></p>
</li>
<li>
<p>build(deps): bump actions/create-github-app-token from 1.11.0 to
1.11.1 (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3893">#3893</a>)
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></p>
</li>
<li>
<p>build(deps): bump codecov/codecov-action from 5.0.7 to 5.1.1 (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3867">#3867</a>)
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></p>
</li>
<li>
<p>build(deps): bump codecov/codecov-action from 5.1.1 to 5.1.2 (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3892">#3892</a>)
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4e0505ea5c"><code>4e0505e</code></a>
Updated changelog</li>
<li><a
href="ca68a7f3fb"><code>ca68a7f</code></a>
release: 2.20.0</li>
<li><a
href="2ee194c0d4"><code>2ee194c</code></a>
feat(flags): remove Unleash get_variant patching code (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3914">#3914</a>)</li>
<li><a
href="288f69a962"><code>288f69a</code></a>
Moved adding of <code>flags</code> context into Scope (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3917">#3917</a>)</li>
<li><a
href="9f9ff345c6"><code>9f9ff34</code></a>
tests: Create a separate group for feature flag suites (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3911">#3911</a>)</li>
<li><a
href="fa241c3425"><code>fa241c3</code></a>
Treat potel-base as release branch in CI (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3912">#3912</a>)</li>
<li><a
href="be5327356f"><code>be53273</code></a>
Centralize minimum version checking (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3910">#3910</a>)</li>
<li><a
href="4432e26a45"><code>4432e26</code></a>
Small contribution docs update (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3909">#3909</a>)</li>
<li><a
href="c6a89d64db"><code>c6a89d6</code></a>
feat(flags): add Unleash feature flagging integration (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3888">#3888</a>)</li>
<li><a
href="bf65ede421"><code>bf65ede</code></a>
ref(flags): Beter naming for featureflags module and identifier (<a
href="https://redirect.github.com/getsentry/sentry-python/issues/3902">#3902</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/getsentry/sentry-python/compare/2.19.2...2.20.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `stripe` from 11.4.1 to 11.5.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/stripe/stripe-python/releases">stripe's
releases</a>.</em></p>
<blockquote>
<h2>v11.5.0</h2>
<h2>11.5.0 - 2025-01-27</h2>
<ul>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1443">#1443</a>
Update generated code
<ul>
<li>Add support for <code>pay_by_bank_payments</code> on resource class
<code>stripe.Account.Capabilities</code> and parameter class
<code>stripe.Account.CreateParamsCapabilities</code></li>
<li>Add support for <code>directorship_declaration</code> on resource
class <code>stripe.Account.Company</code> and parameter classes
<code>stripe.Account.CreateParamsCompany</code> and
<code>stripe.Token.CreateParamsAccountCompany</code></li>
<li>Add support for <code>ownership_exemption_reason</code> on resource
class <code>stripe.Account.Company</code> and parameter classes
<code>stripe.Account.CreateParamsCompany</code> and
<code>stripe.Token.CreateParamsAccountCompany</code></li>
<li>Add support for <code>proof_of_ultimate_beneficial_ownership</code>
on parameter class
<code>stripe.Account.CreateParamsDocuments</code></li>
<li>Add support for <code>financial_account</code> on resource classes
<code>stripe.AccountSession.Components</code> and
<code>stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails</code>
and parameter class
<code>stripe.AccountSession.CreateParamsComponents</code></li>
<li>Add support for <code>issuing_card</code> on resource class
<code>stripe.AccountSession.Components</code> and parameter class
<code>stripe.AccountSession.CreateParamsComponents</code></li>
<li>Add support for <code>advice_code</code> on resource classes
<code>stripe.Charge.Outcome</code>,
<code>stripe.Invoice.LastFinalizationError</code>,
<code>stripe.PaymentIntent.LastPaymentError</code>,
<code>stripe.SetupAttempt.SetupError</code>, and
<code>stripe.SetupIntent.LastSetupError</code></li>
<li>Add support for <code>country</code> on resource classes
<code>stripe.Charge.PaymentMethodDetails.Paypal</code>,
<code>stripe.ConfirmationToken.PaymentMethodPreview.Paypal</code>, and
<code>stripe.PaymentMethod.Paypal</code></li>
<li>Add support for <code>pay_by_bank</code> on resource classes
<code>stripe.Charge.PaymentMethodDetails</code>,
<code>stripe.ConfirmationToken.PaymentMethodPreview</code>, and
<code>stripe.PaymentIntent.PaymentMethodOptions</code>, parameter
classes
<code>stripe.ConfirmationToken.CreateParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.ConfirmParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions</code>,
<code>stripe.PaymentIntent.CreateParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.CreateParamsPaymentMethodOptions</code>,
<code>stripe.PaymentIntent.ModifyParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.ModifyParamsPaymentMethodOptions</code>,
<code>stripe.PaymentMethod.CreateParams</code>,
<code>stripe.PaymentMethod.ModifyParams</code>,
<code>stripe.PaymentMethodConfiguration.CreateParams</code>,
<code>stripe.PaymentMethodConfiguration.ModifyParams</code>,
<code>stripe.SetupIntent.ConfirmParamsPaymentMethodData</code>,
<code>stripe.SetupIntent.CreateParamsPaymentMethodData</code>,
<code>stripe.SetupIntent.ModifyParamsPaymentMethodData</code>, and
<code>stripe.checkout.Session.CreateParamsPaymentMethodOptions</code>,
and resources <code>stripe.PaymentMethod</code> and
<code>stripe.PaymentMethodConfiguration</code></li>
<li>Add support for <code>phone_number_collection</code> on parameter
class <code>stripe.PaymentLink.ModifyParams</code></li>
<li>Add support for <code>discounts</code> on resource
<code>stripe.checkout.Session</code></li>
<li>Add support for <code>jpy</code> on parameter classes
<code>stripe.terminal.Configuration.CreateParamsTipping</code> and
<code>stripe.terminal.Configuration.ModifyParamsTipping</code> and
resource class <code>stripe.terminal.Configuration.Tipping</code></li>
<li>Add support for <code>nickname</code> on parameter classes
<code>stripe.treasury.FinancialAccount.CreateParams</code> and
<code>stripe.treasury.FinancialAccount.ModifyParams</code> and resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>forwarding_settings</code> on parameter class
<code>stripe.treasury.FinancialAccount.ModifyParams</code></li>
<li>Add support for <code>_cls_close</code> on resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>close</code> on resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>is_default</code> on resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>destination_payment_method_data</code> on
parameter class
<code>stripe.treasury.OutboundTransfer.CreateParams</code></li>
<li>Add support for <code>outbound_transfer</code> on resource class
<code>stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails</code></li>
<li>Add support for <code>SD</code> on enums
<code>stripe.checkout.Session.ShippingAddressCollection.allowed_countries</code>,
<code>stripe.checkout.Session.CreateParamsShippingAddressCollection.allowed_countries</code>,
<code>stripe.PaymentLink.ShippingAddressCollection.allowed_countries</code>,
<code>stripe.PaymentLink.CreateParamsShippingAddressCollection.allowed_countries</code>,
and
<code>stripe.PaymentLink.ModifyParamsShippingAddressCollection.allowed_countries</code></li>
<li>Add support for <code>pay_by_bank</code> on enums
<code>stripe.checkout.Session.CreateParams.payment_method_types</code>,
<code>stripe.ConfirmationToken.PaymentMethodPreview.type</code>,
<code>stripe.ConfirmationToken.CreateParamsPaymentMethodData.type</code>,
<code>stripe.Customer.ListPaymentMethodsParams.type</code>,
<code>stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type</code>,
<code>stripe.PaymentIntent.CreateParamsPaymentMethodData.type</code>,
<code>stripe.PaymentIntent.ModifyParamsPaymentMethodData.type</code>,
<code>stripe.PaymentLink.payment_method_types</code>,
<code>stripe.PaymentLink.CreateParams.payment_method_types</code>,
<code>stripe.PaymentLink.ModifyParams.payment_method_types</code>,
<code>stripe.PaymentMethod.type</code>,
<code>stripe.PaymentMethod.CreateParams.type</code>,
<code>stripe.PaymentMethod.ListParams.type</code>,
<code>stripe.SetupIntent.ConfirmParamsPaymentMethodData.type</code>,
<code>stripe.SetupIntent.CreateParamsPaymentMethodData.type</code>, and
<code>stripe.SetupIntent.ModifyParamsPaymentMethodData.type</code></li>
<li>Add support for <code>financial_account</code> on enum
<code>stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails.type</code></li>
<li>Add support for <code>outbound_transfer</code> on enums
<code>stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails.type</code>
and
<code>stripe.treasury.ReceivedCredit.ListParamsLinkedFlows.source_flow_type</code></li>
<li>Add support for <code>2025-01-27.acacia</code> on enum
<code>stripe.WebhookEndpoint.CreateParams.api_version</code></li>
<li>Change type of <code>pretax_credit_amounts</code> on
<code>stripe.CreditNote</code> and
<code>stripe.CreditNoteLineItem</code> from
<code>Optional[List[PretaxCreditAmount]]</code> to
<code>List[PretaxCreditAmount]</code></li>
</ul>
</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1451">#1451</a>
Upgrade to download-artifact@v4</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1448">#1448</a>
Updated upload artifact ci action</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1446">#1446</a>
add just to publish CI</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1444">#1444</a>
Added CONTRIBUTING.md file</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1445">#1445</a>
minor justfile fixes &amp; pin CI version</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1440">#1440</a>
add justfile, update readme, remove coveralls</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1442">#1442</a>
Fix V2 ListObject.data type hint
<ul>
<li>Change <code>stripe.v2.ListObject.data</code> type hint from
<code>List[StripeObject]</code> to <code>List[T]</code> where T is the
specific stripe object contained within the list</li>
</ul>
</li>
</ul>
<p>See <a
href="https://github.com/stripe/stripe-python/blob/v11.5.0b3/CHANGELOG.md">the
changelog for more details</a>.</p>
<h2>v11.5.0b3</h2>
<ul>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1447">#1447</a>
Update generated code for beta
<ul>
<li>Remove support for <code>stripe_account</code> on resource classes
<code>stripe.terminal.Reader.Action.CollectPaymentMethod</code>,
<code>stripe.terminal.Reader.Action.ConfirmPaymentIntent</code>,
<code>stripe.terminal.Reader.Action.ProcessPaymentIntent</code>, and
<code>stripe.terminal.Reader.Action.RefundPayment</code></li>
</ul>
</li>
</ul>
<p>See <a
href="https://github.com/stripe/stripe-python/blob/v11.5.0b3/CHANGELOG.md">the
changelog for more details</a>.</p>
<h2>v11.5.0b2</h2>
<ul>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1439">#1439</a>
Update generated code for beta
<ul>
<li>Add support for <code>pay_by_bank_payments</code> on resource class
<code>stripe.Account.Capabilities</code> and parameter class
<code>stripe.Account.CreateParamsCapabilities</code></li>
<li>Add support for <code>directorship_declaration</code> on parameter
classes <code>stripe.Account.CreateParamsCompany</code> and
<code>stripe.Token.CreateParamsAccountCompany</code></li>
<li>Add support for <code>proof_of_ultimate_beneficial_ownership</code>
on parameter class
<code>stripe.Account.CreateParamsDocuments</code></li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md">stripe's
changelog</a>.</em></p>
<blockquote>
<h2>11.5.0 - 2025-01-27</h2>
<ul>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1443">#1443</a>
Update generated code
<ul>
<li>Add support for <code>pay_by_bank_payments</code> on resource class
<code>stripe.Account.Capabilities</code> and parameter class
<code>stripe.Account.CreateParamsCapabilities</code></li>
<li>Add support for <code>directorship_declaration</code> on resource
class <code>stripe.Account.Company</code> and parameter classes
<code>stripe.Account.CreateParamsCompany</code> and
<code>stripe.Token.CreateParamsAccountCompany</code></li>
<li>Add support for <code>ownership_exemption_reason</code> on resource
class <code>stripe.Account.Company</code> and parameter classes
<code>stripe.Account.CreateParamsCompany</code> and
<code>stripe.Token.CreateParamsAccountCompany</code></li>
<li>Add support for <code>proof_of_ultimate_beneficial_ownership</code>
on parameter class
<code>stripe.Account.CreateParamsDocuments</code></li>
<li>Add support for <code>financial_account</code> on resource classes
<code>stripe.AccountSession.Components</code> and
<code>stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails</code>
and parameter class
<code>stripe.AccountSession.CreateParamsComponents</code></li>
<li>Add support for <code>issuing_card</code> on resource class
<code>stripe.AccountSession.Components</code> and parameter class
<code>stripe.AccountSession.CreateParamsComponents</code></li>
<li>Add support for <code>advice_code</code> on resource classes
<code>stripe.Charge.Outcome</code>,
<code>stripe.Invoice.LastFinalizationError</code>,
<code>stripe.PaymentIntent.LastPaymentError</code>,
<code>stripe.SetupAttempt.SetupError</code>, and
<code>stripe.SetupIntent.LastSetupError</code></li>
<li>Add support for <code>country</code> on resource classes
<code>stripe.Charge.PaymentMethodDetails.Paypal</code>,
<code>stripe.ConfirmationToken.PaymentMethodPreview.Paypal</code>, and
<code>stripe.PaymentMethod.Paypal</code></li>
<li>Add support for <code>pay_by_bank</code> on resource classes
<code>stripe.Charge.PaymentMethodDetails</code>,
<code>stripe.ConfirmationToken.PaymentMethodPreview</code>, and
<code>stripe.PaymentIntent.PaymentMethodOptions</code>, parameter
classes
<code>stripe.ConfirmationToken.CreateParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.ConfirmParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions</code>,
<code>stripe.PaymentIntent.CreateParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.CreateParamsPaymentMethodOptions</code>,
<code>stripe.PaymentIntent.ModifyParamsPaymentMethodData</code>,
<code>stripe.PaymentIntent.ModifyParamsPaymentMethodOptions</code>,
<code>stripe.PaymentMethod.CreateParams</code>,
<code>stripe.PaymentMethod.ModifyParams</code>,
<code>stripe.PaymentMethodConfiguration.CreateParams</code>,
<code>stripe.PaymentMethodConfiguration.ModifyParams</code>,
<code>stripe.SetupIntent.ConfirmParamsPaymentMethodData</code>,
<code>stripe.SetupIntent.CreateParamsPaymentMethodData</code>,
<code>stripe.SetupIntent.ModifyParamsPaymentMethodData</code>, and
<code>stripe.checkout.Session.CreateParamsPaymentMethodOptions</code>,
and resources <code>stripe.PaymentMethod</code> and
<code>stripe.PaymentMethodConfiguration</code></li>
<li>Add support for <code>phone_number_collection</code> on parameter
class <code>stripe.PaymentLink.ModifyParams</code></li>
<li>Add support for <code>discounts</code> on resource
<code>stripe.checkout.Session</code></li>
<li>Add support for <code>jpy</code> on parameter classes
<code>stripe.terminal.Configuration.CreateParamsTipping</code> and
<code>stripe.terminal.Configuration.ModifyParamsTipping</code> and
resource class <code>stripe.terminal.Configuration.Tipping</code></li>
<li>Add support for <code>nickname</code> on parameter classes
<code>stripe.treasury.FinancialAccount.CreateParams</code> and
<code>stripe.treasury.FinancialAccount.ModifyParams</code> and resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>forwarding_settings</code> on parameter class
<code>stripe.treasury.FinancialAccount.ModifyParams</code></li>
<li>Add support for <code>_cls_close</code> on resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>close</code> on resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>is_default</code> on resource
<code>stripe.treasury.FinancialAccount</code></li>
<li>Add support for <code>destination_payment_method_data</code> on
parameter class
<code>stripe.treasury.OutboundTransfer.CreateParams</code></li>
<li>Add support for <code>outbound_transfer</code> on resource class
<code>stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails</code></li>
<li>Add support for <code>SD</code> on enums
<code>stripe.checkout.Session.ShippingAddressCollection.allowed_countries</code>,
<code>stripe.checkout.Session.CreateParamsShippingAddressCollection.allowed_countries</code>,
<code>stripe.PaymentLink.ShippingAddressCollection.allowed_countries</code>,
<code>stripe.PaymentLink.CreateParamsShippingAddressCollection.allowed_countries</code>,
and
<code>stripe.PaymentLink.ModifyParamsShippingAddressCollection.allowed_countries</code></li>
<li>Add support for <code>pay_by_bank</code> on enums
<code>stripe.checkout.Session.CreateParams.payment_method_types</code>,
<code>stripe.ConfirmationToken.PaymentMethodPreview.type</code>,
<code>stripe.ConfirmationToken.CreateParamsPaymentMethodData.type</code>,
<code>stripe.Customer.ListPaymentMethodsParams.type</code>,
<code>stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type</code>,
<code>stripe.PaymentIntent.CreateParamsPaymentMethodData.type</code>,
<code>stripe.PaymentIntent.ModifyParamsPaymentMethodData.type</code>,
<code>stripe.PaymentLink.payment_method_types</code>,
<code>stripe.PaymentLink.CreateParams.payment_method_types</code>,
<code>stripe.PaymentLink.ModifyParams.payment_method_types</code>,
<code>stripe.PaymentMethod.type</code>,
<code>stripe.PaymentMethod.CreateParams.type</code>,
<code>stripe.PaymentMethod.ListParams.type</code>,
<code>stripe.SetupIntent.ConfirmParamsPaymentMethodData.type</code>,
<code>stripe.SetupIntent.CreateParamsPaymentMethodData.type</code>, and
<code>stripe.SetupIntent.ModifyParamsPaymentMethodData.type</code></li>
<li>Add support for <code>financial_account</code> on enum
<code>stripe.treasury.OutboundTransfer.DestinationPaymentMethodDetails.type</code></li>
<li>Add support for <code>outbound_transfer</code> on enums
<code>stripe.treasury.ReceivedCredit.LinkedFlows.SourceFlowDetails.type</code>
and
<code>stripe.treasury.ReceivedCredit.ListParamsLinkedFlows.source_flow_type</code></li>
<li>Add support for <code>2025-01-27.acacia</code> on enum
<code>stripe.WebhookEndpoint.CreateParams.api_version</code></li>
<li>Change type of <code>pretax_credit_amounts</code> on
<code>stripe.CreditNote</code> and
<code>stripe.CreditNoteLineItem</code> from
<code>Optional[List[PretaxCreditAmount]]</code> to
<code>List[PretaxCreditAmount]</code></li>
</ul>
</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1451">#1451</a>
Upgrade to download-artifact@v4</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1448">#1448</a>
Updated upload artifact ci action</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1446">#1446</a>
add just to publish CI</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1444">#1444</a>
Added CONTRIBUTING.md file</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1445">#1445</a>
minor justfile fixes &amp; pin CI version</li>
<li><a
href="https://redirect.github.com/stripe/stripe-python/pull/1440">#1440</a>
add justfile, update readme, remove coveralls</li>
<li><a href="https://redirect...

_Description has been truncated_

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-29 17:08:02 +00:00
Krzysztof Czerwinski
1b69bcbce2 fix(platform): PAYG system fixes (#9296)
1. Stripe is complaining about lack of return url in checkout.
2. Only frontend prevents users from topping-up amounts less than 5$.

### Changes 🏗️

- Set `return_url` and `customer_email` when creating checkout session.
- Change `amount` to `credit_amount` and use credits instead of USD for
clarity when requesting top up.
- Accept only top-ups of 500+ credits (5$) and multiples of 100 credits
*on the backend*.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-29 16:56:05 +00:00
dependabot[bot]
ef118eff34 chore(libs/deps-dev): bump ruff from 0.9.2 to 0.9.3 in /autogpt_platform/autogpt_libs in the development-dependencies group (#9343)
Bumps the development-dependencies group in
/autogpt_platform/autogpt_libs with 1 update:
[ruff](https://github.com/astral-sh/ruff).

Updates `ruff` from 0.9.2 to 0.9.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.9.3</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Argument <code>fail_stop</code> in DAG has
been renamed as <code>fail_fast</code> (<code>AIR302</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15633">#15633</a>)</li>
<li>[<code>airflow</code>] Extend <code>AIR303</code> with more symbols
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15611">#15611</a>)</li>
<li>[<code>flake8-bandit</code>] Report all references to suspicious
functions (<code>S3</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15541">#15541</a>)</li>
<li>[<code>flake8-pytest-style</code>] Do not emit diagnostics for empty
<code>for</code> loops (<code>PT012</code>, <code>PT031</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15542">#15542</a>)</li>
<li>[<code>flake8-simplify</code>] Avoid double negations
(<code>SIM103</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15562">#15562</a>)</li>
<li>[<code>pyflakes</code>] Fix infinite loop with unused local import
in <code>__init__.py</code> (<code>F401</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15517">#15517</a>)</li>
<li>[<code>pylint</code>] Do not report methods with only one
<code>EM101</code>-compatible <code>raise</code> (<code>PLR6301</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15507">#15507</a>)</li>
<li>[<code>pylint</code>] Implement
<code>redefined-slots-in-subclass</code> (<code>W0244</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9640">#9640</a>)</li>
<li>[<code>pyupgrade</code>] Add rules to use PEP 695 generics in
classes and functions (<code>UP046</code>, <code>UP047</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15565">#15565</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/15659">#15659</a>)</li>
<li>[<code>refurb</code>] Implement <code>for-loop-writes</code>
(<code>FURB122</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10630">#10630</a>)</li>
<li>[<code>ruff</code>] Implement <code>needless-else</code> clause
(<code>RUF047</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15051">#15051</a>)</li>
<li>[<code>ruff</code>] Implement <code>starmap-zip</code>
(<code>RUF058</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15483">#15483</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Do not raise error if keyword argument
is present and target-python version is less or equals than 3.9
(<code>B903</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15549">#15549</a>)</li>
<li>[<code>flake8-comprehensions</code>] strip parentheses around
generators in <code>unnecessary-generator-set</code> (<code>C401</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15553">#15553</a>)</li>
<li>[<code>flake8-pytest-style</code>] Rewrite references to
<code>.exception</code> (<code>PT027</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15680">#15680</a>)</li>
<li>[<code>flake8-simplify</code>] Mark fixes as unsafe
(<code>SIM201</code>, <code>SIM202</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15626">#15626</a>)</li>
<li>[<code>flake8-type-checking</code>] Fix some safe fixes being
labeled unsafe (<code>TC006</code>,<code>TC008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15638">#15638</a>)</li>
<li>[<code>isort</code>] Omit trailing whitespace in
<code>unsorted-imports</code> (<code>I001</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15518">#15518</a>)</li>
<li>[<code>pydoclint</code>] Allow ignoring one line docstrings for
<code>DOC</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/13302">#13302</a>)</li>
<li>[<code>pyflakes</code>] Apply redefinition fixes by source code
order (<code>F811</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15575">#15575</a>)</li>
<li>[<code>pyflakes</code>] Avoid removing too many imports in
<code>redefined-while-unused</code> (<code>F811</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15585">#15585</a>)</li>
<li>[<code>pyflakes</code>] Group redefinition fixes by source statement
(<code>F811</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15574">#15574</a>)</li>
<li>[<code>pylint</code>] Include name of base class in message for
<code>redefined-slots-in-subclass</code> (<code>W0244</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15559">#15559</a>)</li>
<li>[<code>ruff</code>] Update fix for <code>RUF055</code> to use
<code>var == value</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15605">#15605</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix bracket spacing for single-element tuples in f-string
expressions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15537">#15537</a>)</li>
<li>Fix unstable f-string formatting for expressions containing a
trailing comma (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15545">#15545</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Avoid quadratic membership check in import fixes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15576">#15576</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Allow <code>unsafe-fixes</code> settings for code actions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15666">#15666</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>flake8-bandit</code>] Add missing single-line/dotall regex
flag (<code>S608</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15654">#15654</a>)</li>
<li>[<code>flake8-import-conventions</code>] Fix infinite loop between
<code>ICN001</code> and <code>I002</code> (<code>ICN001</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15480">#15480</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.9.3</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Argument <code>fail_stop</code> in DAG has
been renamed as <code>fail_fast</code> (<code>AIR302</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15633">#15633</a>)</li>
<li>[<code>airflow</code>] Extend <code>AIR303</code> with more symbols
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15611">#15611</a>)</li>
<li>[<code>flake8-bandit</code>] Report all references to suspicious
functions (<code>S3</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15541">#15541</a>)</li>
<li>[<code>flake8-pytest-style</code>] Do not emit diagnostics for empty
<code>for</code> loops (<code>PT012</code>, <code>PT031</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15542">#15542</a>)</li>
<li>[<code>flake8-simplify</code>] Avoid double negations
(<code>SIM103</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15562">#15562</a>)</li>
<li>[<code>pyflakes</code>] Fix infinite loop with unused local import
in <code>__init__.py</code> (<code>F401</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15517">#15517</a>)</li>
<li>[<code>pylint</code>] Do not report methods with only one
<code>EM101</code>-compatible <code>raise</code> (<code>PLR6301</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15507">#15507</a>)</li>
<li>[<code>pylint</code>] Implement
<code>redefined-slots-in-subclass</code> (<code>W0244</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9640">#9640</a>)</li>
<li>[<code>pyupgrade</code>] Add rules to use PEP 695 generics in
classes and functions (<code>UP046</code>, <code>UP047</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15565">#15565</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/15659">#15659</a>)</li>
<li>[<code>refurb</code>] Implement <code>for-loop-writes</code>
(<code>FURB122</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10630">#10630</a>)</li>
<li>[<code>ruff</code>] Implement <code>needless-else</code> clause
(<code>RUF047</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15051">#15051</a>)</li>
<li>[<code>ruff</code>] Implement <code>starmap-zip</code>
(<code>RUF058</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15483">#15483</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Do not raise error if keyword argument
is present and target-python version is less or equals than 3.9
(<code>B903</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15549">#15549</a>)</li>
<li>[<code>flake8-comprehensions</code>] strip parentheses around
generators in <code>unnecessary-generator-set</code> (<code>C401</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15553">#15553</a>)</li>
<li>[<code>flake8-pytest-style</code>] Rewrite references to
<code>.exception</code> (<code>PT027</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15680">#15680</a>)</li>
<li>[<code>flake8-simplify</code>] Mark fixes as unsafe
(<code>SIM201</code>, <code>SIM202</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15626">#15626</a>)</li>
<li>[<code>flake8-type-checking</code>] Fix some safe fixes being
labeled unsafe (<code>TC006</code>,<code>TC008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15638">#15638</a>)</li>
<li>[<code>isort</code>] Omit trailing whitespace in
<code>unsorted-imports</code> (<code>I001</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15518">#15518</a>)</li>
<li>[<code>pydoclint</code>] Allow ignoring one line docstrings for
<code>DOC</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/13302">#13302</a>)</li>
<li>[<code>pyflakes</code>] Apply redefinition fixes by source code
order (<code>F811</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15575">#15575</a>)</li>
<li>[<code>pyflakes</code>] Avoid removing too many imports in
<code>redefined-while-unused</code> (<code>F811</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15585">#15585</a>)</li>
<li>[<code>pyflakes</code>] Group redefinition fixes by source statement
(<code>F811</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15574">#15574</a>)</li>
<li>[<code>pylint</code>] Include name of base class in message for
<code>redefined-slots-in-subclass</code> (<code>W0244</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15559">#15559</a>)</li>
<li>[<code>ruff</code>] Update fix for <code>RUF055</code> to use
<code>var == value</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15605">#15605</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix bracket spacing for single-element tuples in f-string
expressions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15537">#15537</a>)</li>
<li>Fix unstable f-string formatting for expressions containing a
trailing comma (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15545">#15545</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Avoid quadratic membership check in import fixes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15576">#15576</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Allow <code>unsafe-fixes</code> settings for code actions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15666">#15666</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>flake8-bandit</code>] Add missing single-line/dotall regex
flag (<code>S608</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15654">#15654</a>)</li>
<li>[<code>flake8-import-conventions</code>] Fix infinite loop between
<code>ICN001</code> and <code>I002</code> (<code>ICN001</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15480">#15480</a>)</li>
<li>[<code>flake8-simplify</code>] Do not emit diagnostics for
expressions inside string type annotations (<code>SIM222</code>,
<code>SIM223</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15405">#15405</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="90589372da"><code>9058937</code></a>
Fix grep for version number in docker build (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15699">#15699</a>)</li>
<li><a
href="b5ffb404de"><code>b5ffb40</code></a>
Bump version to 0.9.3 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15698">#15698</a>)</li>
<li><a
href="cffd1866ce"><code>cffd186</code></a>
Preserve raw string prefix and escapes (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15694">#15694</a>)</li>
<li><a
href="569060f46c"><code>569060f</code></a>
[<code>flake8-pytest-style</code>] Rewrite references to
<code>.exception</code> (<code>PT027</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15680">#15680</a>)</li>
<li><a
href="15394a8028"><code>15394a8</code></a>
[red-knot] MDTests: Do not depend on precise public-symbol type
inference (<a
href="https://redirect.github.com/astral-sh/ruff/issues/1">#1</a>...</li>
<li><a
href="fc2ebea736"><code>fc2ebea</code></a>
[red-knot] Make <code>infer.rs</code> unit tests independent of public
symbol inference ...</li>
<li><a
href="43160b4c3e"><code>43160b4</code></a>
Tidy knot CLI tests (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15685">#15685</a>)</li>
<li><a
href="0173738eef"><code>0173738</code></a>
[red-knot] Port comprehension tests to Markdown (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15688">#15688</a>)</li>
<li><a
href="05ea77b1d4"><code>05ea77b</code></a>
Create Unknown rule diagnostics with a source range (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15648">#15648</a>)</li>
<li><a
href="1e790d3885"><code>1e790d3</code></a>
[red-knot] Port 'deferred annotations' unit tests to Markdown (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15686">#15686</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.9.2...0.9.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.9.2&new-version=0.9.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-29 16:47:47 +00:00
Nicholas Tindle
f1bc9d1581 Update .deepsource.toml 2025-01-29 10:31:57 -06:00
Zamil Majdy
f67060fd8f fix(backend): Fix get balance error on user with null running balance (#9365)
### Changes 🏗️

The current state can cause this error:
```
    if (snapshot_time.year, snapshot_time.month) == (cur_time.year, cur_time.month):
        ^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'year'
```

Which is caused by the timestamp return value possibly a string.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-29 14:25:50 +00:00
Zamil Majdy
c31a2ec565 fix(backend): Remove hardcoded auto-top-up config definition on set_auto_top_up (#9361)
### Changes 🏗️

Make set_auto_top_up accepts AutoTopUpConfig & eliminate hardcoding of
json value.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-29 13:59:06 +00:00
Nicholas Tindle
97a26dba7e fix(frontend): add typechecks and fix existing type errors in frontend (#9336)
<!-- Clearly explain the need for these changes: -->
We want to be able to use typechecking and see errors before they occur.
This is a PR to help enable us to do so by fixing the existing errors
and hopefully not causing new ones.

### Changes 🏗️
- adds check to ci
- disables some code points
- fixes lots of type errors
- fixes a bunch of the stories

<!-- 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] added types
  - [x] Ran some of the stories
  - [x] Asked all the relevant parties for manual checks

---------

Co-authored-by: SwiftyOS <craigswift13@gmail.com>
2025-01-29 12:32:35 +00:00
Zamil Majdy
5e2043b774 fix(backend): Fix failing test_block_credit_reset when it's executed at the end of 31-days month (#9360)
Currently, the test is failing on Jan 29 because 29th Feb does not
exist.

### Changes 🏗️

Force use the first day of the month for getting the current time.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-29 12:17:40 +00:00
Nicholas Tindle
f37957d71f Merge branch 'master' into dev 2025-01-29 06:11:09 -06:00
Nicholas Tindle
e199e54791 ci(repo): deepsource config 2025-01-29 05:47:01 -06:00
Ritik Dutta
33c718a9d7 Fix broken connections when copying and pasting an agent (#9138)
### Summary
This pull request fixes the issue of broken connections when copying and
pasting an agent. The connections are now preserved during the
copy-paste operation.

### Changes
- Modified the `useCopyPaste.ts` file to ensure that connections are
preserved during the copy-paste operation.

### Steps to Reproduce
1. Copy a small section from an Agent that features links to outside the
area you're selecting (use shift + click & drag).
2. Go to a fresh builder canvas in a new tab.
3. Paste the copied section.
4. Try to save the Agent; previously, it would fail due to the outgoing
link being broken.

### Testing
- Verified that connections remain intact when copying and pasting
agents.
- Tested by saving the agent to ensure no broken links.

### Related Issue
Fixes
[#9137](https://github.com/Significant-Gravitas/AutoGPT/issues/9137)

### Notes
Please review the changes and let me know if any further adjustments are
needed.

---------

Co-authored-by: Swifty <craigswift13@gmail.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Bently <tomnoon9@gmail.com>
2025-01-28 15:49:06 +00:00
Nicholas Tindle
c5747c59d7 feat: mem0 ai memory block (#9285)
We want to have some more intelligent and less user managed memory
methods, so we add mem0


### Changes 🏗️

- Adds user_id to kwargs for blocks
- Add mem0 blocks

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

- [x] document adding user_id to kwargs for blocks
- [x] Add run and agent Id as optional checkboxes that will be passed
down to mem0

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
- [ ] Build and submit an agent to @Torantulino and the marketplace for
a personal AI tutor based on recommendations from the mem0 team

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-28 15:15:29 +00:00
dependabot[bot]
e3190b6234 chore(frontend/deps): bump the production-dependencies group across 1 directory with 19 updates (#9349)
Bumps the production-dependencies group with 18 updates in the
/autogpt_platform/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@faker-js/faker](https://github.com/faker-js/faker) | `9.3.0` |
`9.4.0` |
|
[@next/third-parties](https://github.com/vercel/next.js/tree/HEAD/packages/third-parties)
| `15.1.3` | `15.1.6` |
| [@radix-ui/react-alert-dialog](https://github.com/radix-ui/primitives)
| `1.1.4` | `1.1.5` |
| [@radix-ui/react-context-menu](https://github.com/radix-ui/primitives)
| `2.2.4` | `2.2.5` |
|
[@radix-ui/react-dropdown-menu](https://github.com/radix-ui/primitives)
| `2.1.4` | `2.1.5` |
| [@radix-ui/react-popover](https://github.com/radix-ui/primitives) |
`1.1.4` | `1.1.5` |
| [@radix-ui/react-select](https://github.com/radix-ui/primitives) |
`2.1.4` | `2.1.5` |
| [@radix-ui/react-toast](https://github.com/radix-ui/primitives) |
`1.2.4` | `1.2.5` |
| [@radix-ui/react-tooltip](https://github.com/radix-ui/primitives) |
`1.1.6` | `1.1.7` |
| [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) |
`8.48.0` | `8.51.0` |
| [@stripe/stripe-js](https://github.com/stripe/stripe-js) | `5.4.0` |
`5.5.0` |
| [@supabase/supabase-js](https://github.com/supabase/supabase-js) |
`2.47.10` | `2.48.1` |
|
[@xyflow/react](https://github.com/xyflow/xyflow/tree/HEAD/packages/react)
| `12.3.6` | `12.4.2` |
| [embla-carousel-react](https://github.com/davidjerleke/embla-carousel)
| `8.5.1` | `8.5.2` |
|
[lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react)
| `0.469.0` | `0.474.0` |
| [react-day-picker](https://github.com/gpbl/react-day-picker) | `9.5.0`
| `9.5.1` |
| [react-shepherd](https://github.com/shepherd-pro/shepherd) | `6.1.6` |
`6.1.7` |
| [uuid](https://github.com/uuidjs/uuid) | `11.0.4` | `11.0.5` |


Updates `@faker-js/faker` from 9.3.0 to 9.4.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/faker-js/faker/releases"><code>@​faker-js/faker</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v9.4.0</h2>
<h2>What's Changed</h2>
<ul>
<li>refactor: replace MersenneTwister implementation with a pure-rand
based one by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3288">faker-js/faker#3288</a></li>
<li>chore: improve variable naming of system module by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3315">faker-js/faker#3315</a></li>
<li>refactor(locale): re-moo-ved some incorrect <code>cow</code> data by
<a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3326">faker-js/faker#3326</a></li>
<li>refactor(locale): fix truncated song names with commas by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3327">faker-js/faker#3327</a></li>
<li>refactor(locale): fix bad uz street_name_part data by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3328">faker-js/faker#3328</a></li>
<li>docs(helpers): add missing example results to uniqueArray by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3321">faker-js/faker#3321</a></li>
<li>chore: align coding style of deprecated.ts by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3312">faker-js/faker#3312</a></li>
<li>refactor(locale): fix various locale data with trailing spaces by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3329">faker-js/faker#3329</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3331">faker-js/faker#3331</a></li>
<li>chore: align coding style of word module by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3319">faker-js/faker#3319</a></li>
<li>chore: align coding style of lorem module by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3313">faker-js/faker#3313</a></li>
<li>chore: improve parameter naming of internet module by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3317">faker-js/faker#3317</a></li>
<li>feat(finance): use fake patterns for transactionDescription by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3202">faker-js/faker#3202</a></li>
<li>feat(locale): add german animal types by <a
href="https://github.com/motz0815"><code>@​motz0815</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3334">faker-js/faker#3334</a></li>
<li>feat(internet): update to simplified modern user-agent list by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3324">faker-js/faker#3324</a></li>
<li>feat(location): add list of spoken languages by <a
href="https://github.com/UmairJibran"><code>@​UmairJibran</code></a> in
<a
href="https://redirect.github.com/faker-js/faker/pull/3333">faker-js/faker#3333</a></li>
<li>chore: improve variable naming of helpers module by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3316">faker-js/faker#3316</a></li>
<li>docs: fix link to randomizer guide by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3332">faker-js/faker#3332</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3337">faker-js/faker#3337</a></li>
<li>fix(finance): correct Discover card number format by <a
href="https://github.com/julsql"><code>@​julsql</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3336">faker-js/faker#3336</a></li>
<li>docs: improve examples for objectKey,objectValue,objectEntry by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3339">faker-js/faker#3339</a></li>
<li>infra(unicorn): prevent-abbreviations by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3320">faker-js/faker#3320</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3340">faker-js/faker#3340</a></li>
<li>fix: basic wildcard range handling + add more tests by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3322">faker-js/faker#3322</a></li>
<li>docs(api): add refresh button to examples by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3301">faker-js/faker#3301</a></li>
<li>fix(system): semver parts should not be limited to 0-9 by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3349">faker-js/faker#3349</a></li>
<li>fix(image): dataUri should return random type by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3347">faker-js/faker#3347</a></li>
<li>refactor(image): deprecate urlPlaceholder by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3341">faker-js/faker#3341</a></li>
<li>docs: fix examples which return string/number by <a
href="https://github.com/matthewmayer"><code>@​matthewmayer</code></a>
in <a
href="https://redirect.github.com/faker-js/faker/pull/3348">faker-js/faker#3348</a></li>
<li>docs(image): improve urlPlaceholder alternatives by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3351">faker-js/faker#3351</a></li>
<li>chore: update LICENSE file by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3350">faker-js/faker#3350</a></li>
<li>chore(deps): update
mcr.microsoft.com/devcontainers/typescript-node:22 docker digest to
9791f4a by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3354">faker-js/faker#3354</a></li>
<li>chore(deps): update dependency prettier to v3.4.2 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3355">faker-js/faker#3355</a></li>
<li>chore(deps): update all non-major dependencies by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3359">faker-js/faker#3359</a></li>
<li>chore(deps): update dependency ts-morph to v25 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3360">faker-js/faker#3360</a></li>
<li>chore(deps): update eslint by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3357">faker-js/faker#3357</a></li>
<li>chore(deps): update devdependencies by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3356">faker-js/faker#3356</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3353">faker-js/faker#3353</a></li>
<li>chore(deps): update vitest by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3358">faker-js/faker#3358</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3366">faker-js/faker#3366</a></li>
<li>docs(finance): add seeAlsos by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3344">faker-js/faker#3344</a></li>
<li>chore(deps): update eslint by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3369">faker-js/faker#3369</a></li>
<li>docs: use embedded build for preview examples by <a
href="https://github.com/ST-DDT"><code>@​ST-DDT</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3343">faker-js/faker#3343</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3370">faker-js/faker#3370</a></li>
<li>refactor(locales): fix chemical element names in zh_CN by <a
href="https://github.com/tuanzisama"><code>@​tuanzisama</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3371">faker-js/faker#3371</a></li>
<li>refactor(locale): improve product_name data in en and tr by <a
href="https://github.com/k-salih"><code>@​k-salih</code></a> in <a
href="https://redirect.github.com/faker-js/faker/pull/3372">faker-js/faker#3372</a></li>
<li>chore(release): 9.4.0 by <a
href="https://github.com/fakerjs-bot"><code>@​fakerjs-bot</code></a> in
<a
href="https://redirect.github.com/faker-js/faker/pull/3362">faker-js/faker#3362</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/faker-js/faker/blob/next/CHANGELOG.md"><code>@​faker-js/faker</code>'s
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/faker-js/faker/compare/v9.3.0...v9.4.0">9.4.0</a>
(2025-01-15)</h2>
<h3>Features</h3>
<ul>
<li><strong>finance:</strong> use fake patterns for
transactionDescription (<a
href="https://redirect.github.com/faker-js/faker/issues/3202">#3202</a>)
(<a
href="5ec4a6c9dd">5ec4a6c</a>)</li>
<li><strong>internet:</strong> update to simplified modern user-agent
list (<a
href="https://redirect.github.com/faker-js/faker/issues/3324">#3324</a>)
(<a
href="3c7abb55e6">3c7abb5</a>)</li>
<li><strong>location:</strong> add list of spoken languages (<a
href="https://redirect.github.com/faker-js/faker/issues/3333">#3333</a>)
(<a
href="ff6dda94dd">ff6dda9</a>)</li>
</ul>
<h3>Changed Locales</h3>
<ul>
<li><strong>locale:</strong> fix various locale data with trailing
spaces (<a
href="https://redirect.github.com/faker-js/faker/issues/3329">#3329</a>)
(<a
href="e5eec0ed84">e5eec0e</a>)</li>
<li><strong>locale:</strong> improve product_name data in en and tr (<a
href="https://redirect.github.com/faker-js/faker/issues/3372">#3372</a>)
(<a
href="773fc1f654">773fc1f</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>animal:</strong> re-moo-ved some incorrect cow data (<a
href="https://redirect.github.com/faker-js/faker/issues/3326">#3326</a>)
(<a
href="47f835bd0d">47f835b</a>)</li>
<li>basic wildcard range handling + add more tests (<a
href="https://redirect.github.com/faker-js/faker/issues/3322">#3322</a>)
(<a
href="817f8a01d9">817f8a0</a>)</li>
<li><strong>finance:</strong> update Discover card number format to
ensure accuracy (<a
href="https://redirect.github.com/faker-js/faker/issues/3336">#3336</a>)
(<a
href="69c006344b">69c0063</a>)</li>
<li><strong>image:</strong> dataUri should return random type (<a
href="https://redirect.github.com/faker-js/faker/issues/3347">#3347</a>)
(<a
href="eceb17d257">eceb17d</a>)</li>
<li><strong>locales:</strong> update chemical element names in zh_CN (<a
href="https://redirect.github.com/faker-js/faker/issues/3371">#3371</a>)
(<a
href="6ec6f84922">6ec6f84</a>)</li>
<li><strong>location:</strong> fix bad uz street_name_part data (<a
href="https://redirect.github.com/faker-js/faker/issues/3328">#3328</a>)
(<a
href="b6132cbee6">b6132cb</a>)</li>
<li><strong>music:</strong> fix truncated song names with commas (<a
href="https://redirect.github.com/faker-js/faker/issues/3327">#3327</a>)
(<a
href="f36fc71ac4">f36fc71</a>),
closes <a
href="https://redirect.github.com/faker-js/faker/issues/996">#996</a></li>
<li><strong>system:</strong> semver parts should not be limited to 0-9
(<a
href="https://redirect.github.com/faker-js/faker/issues/3349">#3349</a>)
(<a
href="c0d92b8fa8">c0d92b8</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="192b540d70"><code>192b540</code></a>
chore(release): 9.4.0 (<a
href="https://redirect.github.com/faker-js/faker/issues/3362">#3362</a>)</li>
<li><a
href="773fc1f654"><code>773fc1f</code></a>
refactor(locale): improve product_name data in en and tr (<a
href="https://redirect.github.com/faker-js/faker/issues/3372">#3372</a>)</li>
<li><a
href="6ec6f84922"><code>6ec6f84</code></a>
fix(locales): update chemical element names in zh_CN (<a
href="https://redirect.github.com/faker-js/faker/issues/3371">#3371</a>)</li>
<li><a
href="bddce72b49"><code>bddce72</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/faker-js/faker/issues/3370">#3370</a>)</li>
<li><a
href="3bb64a230a"><code>3bb64a2</code></a>
docs: use embedded build for preview examples (<a
href="https://redirect.github.com/faker-js/faker/issues/3343">#3343</a>)</li>
<li><a
href="d2c67636c0"><code>d2c6763</code></a>
chore(deps): update eslint (<a
href="https://redirect.github.com/faker-js/faker/issues/3369">#3369</a>)</li>
<li><a
href="5d4754c51e"><code>5d4754c</code></a>
docs(finance): add seeAlsos (<a
href="https://redirect.github.com/faker-js/faker/issues/3344">#3344</a>)</li>
<li><a
href="42dade59d3"><code>42dade5</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/faker-js/faker/issues/3366">#3366</a>)</li>
<li><a
href="ece4f16dd2"><code>ece4f16</code></a>
chore(deps): update vitest (<a
href="https://redirect.github.com/faker-js/faker/issues/3358">#3358</a>)</li>
<li><a
href="5b8356bbcb"><code>5b8356b</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/faker-js/faker/issues/3353">#3353</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/faker-js/faker/compare/v9.3.0...v9.4.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@next/third-parties` from 15.1.3 to 15.1.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases"><code>@​next/third-parties</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v15.1.6</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix: don't memory-leak promises passed to waitUntil (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/75041">#75041</a>)</li>
<li>backport: fix prerender issue with intercepting routes +
generateStaticParams (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/75170">#75170</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/lubieowoce"><code>@​lubieowoce</code></a> and
<a href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.5</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Fix missing revalidate with notFound() (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/75009">#75009</a>)</li>
<li>fix: when metadatabase is set we should not warn (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74840">#74840</a>)</li>
<li>Fix <code>@​vercel/og</code> license SPDX expression (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74745">#74745</a>)</li>
<li>fix: ts language server rule metadata should allow null (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74704">#74704</a>)</li>
<li>fix: eslint rule of using img in metadata routes (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74864">#74864</a>)</li>
<li>Fix presentation when onerror receives an event without error (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74643">#74643</a>)</li>
<li>fix fetch lock not being consistently released <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74623">#74623</a>
(<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/75028">#75028</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ijjk"><code>@​ijjk</code></a>, <a
href="https://github.com/huozhi"><code>@​huozhi</code></a>, <a
href="https://github.com/matmannion"><code>@​matmannion</code></a> and
<a href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.4</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>backport: force module format for virtual client-proxy (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74608">#74608</a>)</li>
<li>Fix prerender tags when notFound is called (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74607">#74607</a>)</li>
<li>Use provided waitUntil for pending revalidates (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74604">#74604</a>)</li>
<li>Feature: next/image: add support for images.qualities in next.config
(<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74588">#74588</a>)</li>
<li>Chore: docs: add missing search: '' on remotePatterns (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74587">#74587</a>)</li>
<li>Chore: docs: update version history of next/image (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/73923">#73923</a>)
(<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74570">#74570</a>)</li>
<li>Chore: next/image: improve imgopt api bypass detection for
unsupported images (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74569">#74569</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to @ and @ for helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="38a6d0177e"><code>38a6d01</code></a>
v15.1.6</li>
<li><a
href="47102cae01"><code>47102ca</code></a>
v15.1.5</li>
<li><a
href="48f2588b0f"><code>48f2588</code></a>
v15.1.4</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v15.1.6/packages/third-parties">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-alert-dialog` from 1.1.4 to 1.1.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-context-menu` from 2.2.4 to 2.2.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-dialog` from 1.1.4 to 1.1.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-dropdown-menu` from 2.1.4 to 2.1.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-popover` from 1.1.4 to 1.1.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-select` from 2.1.4 to 2.1.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-toast` from 1.2.4 to 1.2.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@radix-ui/react-tooltip` from 1.1.6 to 1.1.7
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `@sentry/nextjs` from 8.48.0 to 8.51.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/releases"><code>@​sentry/nextjs</code>'s
releases</a>.</em></p>
<blockquote>
<h2>8.51.0</h2>
<h3>Important Changes</h3>
<ul>
<li>
<p><strong>feat(v8/node): Add <code>prismaInstrumentation</code> option
to Prisma integration as escape hatch for all Prisma versions (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15128">#15128</a>)</strong></p>
<p>This release adds a compatibility API to add support for Prisma
version 6.
To capture performance data for Prisma version 6:</p>
<ol>
<li>
<p>Install the <code>@prisma/instrumentation</code> package on version
6.</p>
</li>
<li>
<p>Pass a <code>new PrismaInstrumentation()</code> instance as exported
from <code>@prisma/instrumentation</code> to the
<code>prismaInstrumentation</code> option:</p>
<pre lang="js"><code>import { PrismaInstrumentation } from
'@prisma/instrumentation';
<p>Sentry.init({
integrations: [
prismaIntegration({
// Override the default instrumentation that Sentry uses
prismaInstrumentation: new PrismaInstrumentation(),
}),
],
});
</code></pre></p>
<p>The passed instrumentation instance will override the default
instrumentation instance the integration would use, while the
<code>prismaIntegration</code> will still ensure data compatibility for
the various Prisma versions.</p>
</li>
<li>
<p>Remove the <code>previewFeatures = [&quot;tracing&quot;]</code>
option from the client generator block of your Prisma schema.</p>
</li>
</ol>
</li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>feat(v8/browser): Add <code>multiplexedtransport.js</code> CDN
bundle (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15046">#15046</a>)</li>
<li>feat(v8/browser): Add Unleash integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14948">#14948</a>)</li>
<li>feat(v8/deno): Deprecate Deno SDK as published on deno.land (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15121">#15121</a>)</li>
<li>feat(v8/sveltekit): Deprecate <code>fetchProxyScriptNonce</code>
option (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15011">#15011</a>)</li>
<li>fix(v8/aws-lambda): Avoid overwriting root span name (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15054">#15054</a>)</li>
<li>fix(v8/core): <code>fatal</code> events should set session as
crashed (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15073">#15073</a>)</li>
<li>fix(v8/node/nestjs): Use method on current fastify request (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15104">#15104</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/tjhiggins"><code>@​tjhiggins</code></a>, and <a
href="https://github.com/nwalters512"><code>@​nwalters512</code></a>.
Thank you for your contributions!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>@​sentry/browser</code></td>
<td>23.29 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> - with treeshaking flags</td>
<td>23.17 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing)</td>
<td>35.85 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay)</td>
<td>73.2 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay) - with
treeshaking flags</td>
<td>66.66 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay with
Canvas)</td>
<td>77.51 KB</td>
</tr>
</tbody>
</table>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/blob/8.51.0/CHANGELOG.md"><code>@​sentry/nextjs</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.51.0</h2>
<h3>Important Changes</h3>
<ul>
<li>
<p><strong>feat(v8/node): Add <code>prismaInstrumentation</code> option
to Prisma integration as escape hatch for all Prisma versions (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15128">#15128</a>)</strong></p>
<p>This release adds a compatibility API to add support for Prisma
version 6.
To capture performance data for Prisma version 6:</p>
<ol>
<li>
<p>Install the <code>@prisma/instrumentation</code> package on version
6.</p>
</li>
<li>
<p>Pass a <code>new PrismaInstrumentation()</code> instance as exported
from <code>@prisma/instrumentation</code> to the
<code>prismaInstrumentation</code> option:</p>
<pre lang="js"><code>import { PrismaInstrumentation } from
'@prisma/instrumentation';
<p>Sentry.init({
integrations: [
prismaIntegration({
// Override the default instrumentation that Sentry uses
prismaInstrumentation: new PrismaInstrumentation(),
}),
],
});
</code></pre></p>
<p>The passed instrumentation instance will override the default
instrumentation instance the integration would use, while the
<code>prismaIntegration</code> will still ensure data compatibility for
the various Prisma versions.</p>
</li>
<li>
<p>Remove the <code>previewFeatures = [&quot;tracing&quot;]</code>
option from the client generator block of your Prisma schema.</p>
</li>
</ol>
</li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>feat(v8/browser): Add <code>multiplexedtransport.js</code> CDN
bundle (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15046">#15046</a>)</li>
<li>feat(v8/browser): Add Unleash integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14948">#14948</a>)</li>
<li>feat(v8/deno): Deprecate Deno SDK as published on deno.land (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15121">#15121</a>)</li>
<li>feat(v8/sveltekit): Deprecate <code>fetchProxyScriptNonce</code>
option (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15011">#15011</a>)</li>
<li>fix(v8/aws-lambda): Avoid overwriting root span name (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15054">#15054</a>)</li>
<li>fix(v8/core): <code>fatal</code> events should set session as
crashed (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15073">#15073</a>)</li>
<li>fix(v8/node/nestjs): Use method on current fastify request (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/15104">#15104</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/tjhiggins"><code>@​tjhiggins</code></a>, and <a
href="https://github.com/nwalters512"><code>@​nwalters512</code></a>.
Thank you for your contributions!</p>
<h2>8.50.0</h2>
<ul>
<li>feat(v8/react): Add support for React Router
<code>createMemoryRouter</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14985">#14985</a>)</li>
</ul>
<h2>8.49.0</h2>
<ul>
<li>feat(v8/browser): Flush offline queue on flush and browser online
event (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14969">#14969</a>)</li>
<li>feat(v8/react): Add a <code>handled</code> prop to ErrorBoundary (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14978">#14978</a>)</li>
<li>fix(profiling/v8): Don't put <code>require</code>,
<code>__filename</code> and <code>__dirname</code> on global object (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14952">#14952</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3a0e160267"><code>3a0e160</code></a>
release: 8.51.0</li>
<li><a
href="e9a5f000d2"><code>e9a5f00</code></a>
meta: Update Changelog for 8.51.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15113">#15113</a>)</li>
<li><a
href="d9138ffabf"><code>d9138ff</code></a>
feat(node/v8): Add <code>prismaInstrumentation</code> option to Prisma
integration as es...</li>
<li><a
href="d7aa93f38b"><code>d7aa93f</code></a>
feat(v8/sveltekit): Deprecate <code>fetchProxyScriptNonce</code> option
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15011">#15011</a>)</li>
<li><a
href="79c2c2a9ee"><code>79c2c2a</code></a>
feat(deno): Deprecate Deno SDK as published on deno.land (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15121">#15121</a>)</li>
<li><a
href="b0dc860004"><code>b0dc860</code></a>
feat(flags/v8): Add Unleash integration (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14948">#14948</a>)</li>
<li><a
href="5f47fbbb2d"><code>5f47fbb</code></a>
chore(v8/deps): Deduplicate yarn.lock (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15094">#15094</a>)</li>
<li><a
href="8b870ba5b4"><code>8b870ba</code></a>
fix(v8/node/nestjs): Use method on current fastify request (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15104">#15104</a>)</li>
<li><a
href="d296ce0db3"><code>d296ce0</code></a>
fix(v8/core): <code>fatal</code> events should set session as crashed
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15073">#15073</a>)</li>
<li><a
href="dd2201e01e"><code>dd2201e</code></a>
chore(v8/deps): Upgrade to Vitest 2.1.8 and Vite 5.4.11 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/15038">#15038</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/getsentry/sentry-javascript/compare/8.48.0...8.51.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@stripe/stripe-js` from 5.4.0 to 5.5.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/stripe/stripe-js/releases"><code>@​stripe/stripe-js</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v5.5.0</h2>
<h3>New features</h3>
<ul>
<li>Add type definition for elements group update-end event (<a
href="https://redirect.github.com/stripe/stripe-js/issues/704">#704</a>)</li>
<li>Add paypal buttonType types (<a
href="https://redirect.github.com/stripe/stripe-js/issues/703">#703</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d251532cb4"><code>d251532</code></a>
Add type definition for elements group update-end event (<a
href="https://redirect.github.com/stripe/stripe-js/issues/704">#704</a>)</li>
<li><a
href="cf55c17944"><code>cf55c17</code></a>
Add paypal buttonType types (<a
href="https://redirect.github.com/stripe/stripe-js/issues/703">#703</a>)</li>
<li><a
href="e9989c66d7"><code>e9989c6</code></a>
v5.4.0</li>
<li>See full diff in <a
href="https://github.com/stripe/stripe-js/compare/v5.4.0...v5.5.0">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~bdaily-stripe">bdaily-stripe</a>, a new
releaser for <code>@​stripe/stripe-js</code> since your current
version.</p>
</details>
<br />

Updates `@supabase/supabase-js` from 2.47.10 to 2.48.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/supabase/supabase-js/releases"><code>@​supabase/supabase-js</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v2.48.1</h2>
<h2><a
href="https://github.com/supabase/supabase-js/compare/v2.48.0...v2.48.1">2.48.1</a>
(2025-01-24)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> bump postgrest-js 1.18.1 (<a
href="da9e26d748">da9e26d</a>),
closes <a
href="https://redirect.github.com/supabase/supabase-js/issues/1354">#1354</a></li>
</ul>
<h2>v2.48.0</h2>
<h1><a
href="https://github.com/supabase/supabase-js/compare/v2.47.16...v2.48.0">2.48.0</a>
(2025-01-20)</h1>
<h3>Features</h3>
<ul>
<li><strong>deps:</strong> bump postgrest-js to 1.18.0 (<a
href="4397e57a7c">4397e57</a>)</li>
</ul>
<h2>v2.47.16</h2>
<h2><a
href="https://github.com/supabase/supabase-js/compare/v2.47.15...v2.47.16">2.47.16</a>
(2025-01-17)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>🐛 Fix nullish coalescing operator issue in
hasCustomAuthorizationHeader (<a
href="e8cffdad0d">e8cffda</a>),
closes <a
href="https://redirect.github.com/supabase/supabase-js/issues/1338">#1338</a></li>
</ul>
<h2>v2.47.15</h2>
<h2><a
href="https://github.com/supabase/supabase-js/compare/v2.47.14...v2.47.15">2.47.15</a>
(2025-01-16)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Make the return value of accessToken nullable (<a
href="f8e48ffe87">f8e48ff</a>)</li>
</ul>
<h2>v2.47.14</h2>
<h2><a
href="https://github.com/supabase/supabase-js/compare/v2.47.13...v2.47.14">2.47.14</a>
(2025-01-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>bump postgrest-js to 1.17.11 (<a
href="6822cdc14c">6822cdc</a>)</li>
</ul>
<h2>v2.47.13</h2>
<h2><a
href="https://github.com/supabase/supabase-js/compare/v2.47.12...v2.47.13">2.47.13</a>
(2025-01-14)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>export PostgrestError as a class (<a
href="7ba8408183">7ba8408</a>)</li>
</ul>
<h2>v2.47.12</h2>
<h2><a
href="https://github.com/supabase/supabase-js/compare/v2.47.11...v2.47.12">2.47.12</a>
(2025-01-08)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3316f2426d"><code>3316f24</code></a>
Merge pull request <a
href="https://redirect.github.com/supabase/supabase-js/issues/1361">#1361</a>
from supabase/fix/chore-bump-postgrest-js-1-18-1</li>
<li><a
href="da9e26d748"><code>da9e26d</code></a>
fix(types): bump postgrest-js 1.18.1</li>
<li><a
href="07cf12d03e"><code>07cf12d</code></a>
Merge pull request <a
href="https://redirect.github.com/supabase/supabase-js/issues/1358">#1358</a>
from supabase/chore/bump-postgrest-js-1-18-0</li>
<li><a
href="4397e57a7c"><code>4397e57</code></a>
feat(deps): bump postgrest-js to 1.18.0</li>
<li><a
href="76217a46f6"><code>76217a4</code></a>
Merge pull request <a
href="https://redirect.github.com/supabase/supabase-js/issues/1344">#1344</a>
from raghavyuva/fix/nullish-coalescing-operator</li>
<li><a
href="a50725dd97"><code>a50725d</code></a>
Merge pull request <a
href="https://redirect.github.com/supabase/supabase-js/issues/1332">#1332</a>
from supabase/fix/nullable-accessToken</li>
<li><a
href="1661420e1b"><code>1661420</code></a>
Merge pull request <a
href="https://redirect.github.com/supabase/supabase-js/issues/1355">#1355</a>
from supabase/chore/bump-postgrest-js-1-17-11</li>
<li><a
href="6822cdc14c"><code>6822cdc</code></a>
fix: bump postgrest-js to 1.17.11</li>
<li><a
href="7ba8408183"><code>7ba8408</code></a>
fix: export PostgrestError as a class</li>
<li><a
href="80d3c76fa6"><code>80d3c76</code></a>
fix: Bump postgrest-js to 1.17.10</li>
<li>Additional commits viewable in <a
href="https://github.com/supabase/supabase-js/compare/v2.47.10...v2.48.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `@xyflow/react` from 12.3.6 to 12.4.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/xyflow/xyflow/releases"><code>@​xyflow/react</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.4.2</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4957">#4957</a> <a
href="fe843982bf"><code>fe843982</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! -
Narrow properties selected, selectable, deletable, draggable of
NodeProps type to be required.</p>
</li>
<li>
<p>Updated dependencies [<a
href="fe843982bf"><code>fe843982</code></a>,
<a
href="e73ef09fbc"><code>e73ef09f</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.50</li>
</ul>
</li>
</ul>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.4.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4949">#4949</a> <a
href="592c7eaf95"><code>592c7eaf</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Fix
useNodeConnection hook not returning all connected edges.</p>
</li>
<li>
<p>Updated dependencies [<a
href="592c7eaf95"><code>592c7eaf</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.49</li>
</ul>
</li>
</ul>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.4.0</h2>
<h3>Minor Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/xyflow/xyflow/pull/4725">#4725</a> <a
href="e10f53cf89"><code>e10f53cf</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Add
useNodeConnections hook to track all connections to a node. Can be
filtered by handleType and handleId.</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4947">#4947</a> <a
href="868aa3f3db"><code>868aa3f3</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Export ResizeControlVariant correctly as a value.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4880">#4880</a> <a
href="e2d849dca6"><code>e2d849dc</code></a>
Thanks <a href="https://github.com/crimx"><code>@​crimx</code></a>! -
Add type check for all event targets</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4929">#4929</a> <a
href="4947f683b7"><code>4947f683</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! -
Optimize selections and take into account if edges connected to selected
nodes are actually selectable.</p>
</li>
<li>
<p>Updated dependencies [<a
href="e2d849dca6"><code>e2d849dc</code></a>,
<a
href="e10f53cf89"><code>e10f53cf</code></a>,
<a
href="4947f683b7"><code>4947f683</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.48</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/xyflow/xyflow/blob/main/packages/react/CHANGELOG.md"><code>@​xyflow/react</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>12.4.2</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4957">#4957</a> <a
href="fe843982bf"><code>fe843982</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! -
Narrow properties selected, selectable, deletable, draggable of
NodeProps type to be required.</p>
</li>
<li>
<p>Updated dependencies [<a
href="fe843982bf"><code>fe843982</code></a>,
<a
href="e73ef09fbc"><code>e73ef09f</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.50</li>
</ul>
</li>
</ul>
<h2>12.4.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4949">#4949</a> <a
href="592c7eaf95"><code>592c7eaf</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Fix
useNodeConnection hook not returning all connected edges.</p>
</li>
<li>
<p>Updated dependencies [<a
href="592c7eaf95"><code>592c7eaf</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.49</li>
</ul>
</li>
</ul>
<h2>12.4.0</h2>
<h3>Minor Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/xyflow/xyflow/pull/4725">#4725</a> <a
href="e10f53cf89"><code>e10f53cf</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Add
useNodeConnections hook to track all connections to a node. Can be
filtered by handleType and handleId.</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4947">#4947</a> <a
href="868aa3f3db"><code>868aa3f3</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Export ResizeControlVariant correctly as a value.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4880">#4880</a> <a
href="e2d849dca6"><code>e2d849dc</code></a>
Thanks <a href="https://github.com/crimx"><code>@​crimx</code></a>! -
Add type check for all event targets</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/4929">#4929</a> <a
href="4947f683b7"><code>4947f683</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! -
Optimize selections and take into account if edges connected to selected
nodes are actually selectable.</p>
</li>
<li>
<p>Updated dependencies [<a
href="e2d849dca6"><code>e2d849dc</code></a>,
<a
href="e10f53cf89"><code>e10f53cf</code></a>,
<a
href="4947f683b7"><code>4947f683</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.48</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9ecb0bb6c7"><code>9ecb0bb</code></a>
chore(packages): bump</li>
<li><a
href="98b212f0d5"><code>98b212f</code></a>
Narrow NodeProps type properties selected, selectable, draggable and
deletabl...</li>
<li><a
href="562c9586d3"><code>562c958</code></a>
chore(packages): bump</li>
<li><a
href="dcf61e6042"><code>dcf61e6</code></a>
chore(packages): bump</li>
<li><a
href="bf7ef89bdb"><code>bf7ef89</code></a>
fix(types): export ResizeControlVariant correctly closes <a
href="https://github.com/xyflow/xyflow/tree/HEAD/packages/react/issues/4946">#4946</a></li>
<li><a
href="cdca1c55d1"><code>cdca1c5</code></a>
Merge pull request <a
href="https://github.com/xyflow/xyflow/tree/HEAD/packages/react/issues/4880">#4880</a>
from crimx/patch-2</li>
<li><a
href="78f9d4e645"><code>78f9d4e</code></a>
refactor(useNodeConnections): change param names</li>
<li><a
href="748c140146"><code>748c140</code></a>
fixes</li>
<li><a
href="228ea770a3"><code>228ea77</code></a>
let let be const</li>
<li><a
href="4947f683b7"><code>4947f68</code></a>
Move areSetsEqual to system</li>
<li>Additional commits viewable in <a
href="https://github.com/xyflow/xyflow/commits/@xyflow/react@12.4.2/packages/react">compare
view</a></li>
</ul>
</details>
<br />

Updates `embla-carousel-react` from 8.5.1 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/davidjerleke/embla-carousel/releases">embla-carousel-react's
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>Support</h2>
<p>Embla Carousel is an open source MIT licensed project. If you are
interested in <strong>supporting this project</strong> you can sponsor
it here:</p>
<ul>
<li><a href="https://github.com/sponsors/davidjerleke"><strong><code>💖
Sponsor</code></strong></a></li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>[Bug]: Offset by 1 issue for canScrollNext when tab size has
fractional width by <a
href="https://github.com/yasuhiro-yamamoto"><code>@​yasuhiro-yamamoto</code></a>
in <a
href="https://redirect.github.com/davidjerleke/embla-carousel/pull/1096">davidjerleke/embla-carousel#1096</a></li>
<li>[Bug]: Autoplay never starts if page with carousel is loaded in
inactive browser tab by <a
href="https://github.com/davidjerleke"><code>@​davidjerleke</code></a>
in <a
href="https://redirect.github.com/davidjerleke/embla-carousel/pull/1101">davidjerleke/embla-carousel#1101</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/yasuhiro-yamamoto"><code>@​yasuhiro-yamamoto</code></a>
made their first contribution in <a
href="https://redirect.github.com/davidjerleke/embla-carousel/pull/1096">davidjerleke/embla-carousel#1096</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/davidjerleke/embla-carousel/compare/v8.5.1...v8.5.2">https://github.com/davidjerleke/embla-carousel/compare/v8.5.1...v8.5.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5ee3c4ed02"><code>5ee3c4e</code></a>
8.5.2</li>
<li><a
href="acad2f5460"><code>acad2f5</code></a>
Merge pull request <a
href="https://redirect.github.com/davidjerleke/embla-carousel/issues/1101">#1101</a>
from davidjerleke/bug/<a
href="https://redirect.github.com/davidjerleke/embla-carousel/issues/1082">#1082</a></li>
<li><a
href="6727eed531"><code>6727eed</code></a>
Bug fix for <a
href="https://redirect.github.com/davidjerleke/embla-carousel/issues/1082">#1082</a>.</li>
<li><a
href="1b019396e2"><code>1b01939</code></a>
Merge pull request <a
href="https://redirect.github.com/davidjerleke/embla-carousel/issues/1096">#1096</a>
from yasuhiro-yamamoto/fix/issue-899</li>
<li><a
href="266ef1bac1"><code>266ef1b</code></a>
Bug fix for <a
href="https://redirect.github.com/davidjerleke/embla-carousel/issues/899">#899</a>.</li>
<li><a
href="ba2c14cd12"><code>ba2c14c</code></a>
Instantly start animation progress.</li>
<li><a
href="e32119ab93"><code>e32119a</code></a>
Build docs with v8.5.1.</li>
<li>See full diff in <a
href="https://github.com/davidjerleke/embla-carousel/compare/v8.5.1...v8.5.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `lucide-react` from 0.469.0 to 0.474.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lucide-icons/lucide/releases">lucide-react's
releases</a>.</em></p>
<blockquote>
<h2>New icons 0.474.0</h2>
<h2>Modified Icons 🔨</h2>
<ul>
<li><code>expand</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2677">#2677</a>)
by <a href="https://github.com/jguddas"><code>@​jguddas</code></a></li>
</ul>
<h2>New icons 0.473.0</h2>
<h2>Modified Icons 🔨</h2>
<ul>
<li><code>package</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2706">#2706</a>)
by <a href="https://github.com/sezze"><code>@​sezze</code></a></li>
</ul>
<h2>New icons 0.472.0</h2>
<h2>New icons 🎨</h2>
<ul>
<li><code>battery-plus</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2693">#2693</a>)
by <a
href="https://github.com/Footagesus"><code>@​Footagesus</code></a></li>
<li><code>map-plus</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2697">#2697</a>)
by <a
href="https://github.com/Seanw265"><code>@​Seanw265</code></a></li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>lucide-svelte: Make sure license ends up in SvelteKit bundles by <a
href="https://github.com/Lettnald"><code>@​Lettnald</code></a> in <a
href="https://redirect.github.com/lucide-icons/lucide/pull/2728">lucide-icons/lucide#2728</a></li>
<li>lucide-react: Fixes aliases imports.</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/lucide-icons/lucide/compare/0.471.1...0.472.0">https://github.com/lucide-icons/lucide/compare/0.471.1...0.472.0</a></p>
<h2>Hotfix Lucide React exports</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(lucide-react) Adds type module in package.json by <a
href="https://github.com/ericfennis"><code>@​ericfennis</code></a> in <a
href="https://redirect.github.com/lucide-icons/lucide/pull/2731">lucide-icons/lucide#2731</a></li>
</ul>
<h2>Dynamic Icon component Lucide React and new icons 0.471.0</h2>
<h2>New Dynamic Icon Component (lucide-react)</h2>
<p>This is an easier approach than the previous
<code>dynamicIconImports</code> we exported in the library. This one
supports all environments.
We removed the examples in the docs of how you can make a dynamic icon
yourself with a dedicated DynamicIcon component.
This one fetches the icon data itself and renders it instead of fetching
the Icon component from the library.
This makes it more flexible with all the frontend frameworks and
libraries that exist for React.</p>
<blockquote>
<p>🚨
Not recommended for regular applications that work fine with the regular
static icon components.
Using the dynamic icon component increases build time, separate bundles,
and separate network requests for each icon.</p>
</blockquote>
<h3>How to use</h3>
<p><code>DynamicIcon</code> is useful for applications that want to show
icons dynamically by icon name, for example when using a content
management system where icon names are stored in a database.</p>
<pre lang="jsx"><code>const App = () =&gt; (
&lt;DynamicIcon name=&quot;camera&quot; color=&quot;red&quot; size={48}
/&gt;
);
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="961404d5cc"><code>961404d</code></a>
replace <code>keyof ReactSVG</code> with <code>SVGElementType</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2668">#2668</a>)</li>
<li><a
href="31c3fefc17"><code>31c3fef</code></a>
fix(lucide-react) Adds type module in package.json (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2731">#2731</a>)</li>
<li><a
href="58c2e108c3"><code>58c2e10</code></a>
feat(lucide-react): Add DynamicIcon component (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2686">#2686</a>)</li>
<li>See full diff in <a
href="https://github.com/lucide-icons/lucide/commits/0.474.0/packages/lucide-react">compare
view</a></li>
</ul>
</details>
<br />

Updates `react-day-picker` from 9.5.0 to 9.5.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gpbl/react-day-picker/releases">react-day-picker's
releases</a>.</em></p>
<blockquote>
<h2>v9.5.1</h2>
<p>This release fixes the calendar breaking its layout when passing a
<code>month</code> not included between <code>startMonth</code> and
<code>endMonth</code> props.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: display calendar in a valid month when <code>month</code> prop
is invalid by <a
href="https://github.com/rodgobbi"><code>@​rodgobbi</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2672">gpbl/react-day-picker#2672</a></li>
<li>fix(test): using <code>new Date()</code> instead of
<code>today()</code> fails test by <a
href="https://github.com/gpbl"><code>@​gpbl</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2656">gpbl/react-day-picker#2656</a></li>
<li>chore(types): update <code>DateLib</code> to not import types from
date-fns by <a href="https://github.com/gpbl"><code>@​gpbl</code></a> in
<a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2655">gpbl/react-day-picker#2655</a></li>
<li>docs: fix broken <code>style.css</code> link by <a
href="https://github.com/jakedee"><code>@​jakedee</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2666">gpbl/react-day-picker#2666</a></li>
<li>docs: custom components guide to display better examples by <a
href="https://github.com/rodgobbi"><code>@​rodgobbi</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2668">gpbl/react-day-picker#2668</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/jakedee"><code>@​jakedee</code></a> made
their first contribution in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2666">gpbl/react-day-picker#2666</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gpbl/react-day-picker/compare/v9.5.0...v9.5.1">https://github.com/gpbl/react-day-picker/compare/v9.5.0...v9.5.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c1e49e606f"><code>c1e49e6</code></a>
build: bump v9.5.1</li>
<li><a
href="9fa2d26421"><code>9fa2d26</code></a>
fix: display calendar in a valid month when month prop is invalid (<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2672">#2672</a>)</li>
<li><a
href="553f702cc6"><code>553f702</code></a>
build: update dev dependencies (<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2670">#2670</a>)</li>
<li><a
href="0441d3e0e0"><code>0441d3e</code></a>
Merge branch 'main' of <a
href="https://github.com/gpbl/react-day-picker">https://github.com/gpbl/react-day-picker</a></li>
<li><a
href="fa66a33fa4"><code>fa66a33</code></a>
docs: update for shadcn/ui users</li>
<li><a
href="bf909c25f3"><code>bf909c2</code></a>
docs: fix custom components docs (<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2668">#2668</a>)</li>
<li><a
href="6b0abf9710"><code>6b0abf9</code></a>
docs: fix broken style.css link (<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2666">#2666</a>)</li>
<li><a
href="9ad9de48fb"><code>9ad9de4</code></a>
chore: upgrade copyright statements to 2025</li>
<li><a
href="1f070c3c7c"><code>1f070c3</code></a>
chore(types): update DateLib to not import types from date-fns (<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2655">#2655</a>)</li>
<li><a
href="c958dd089f"><code>c958dd0</code></a>
fix(test): using <code>new Date()</code> instead of <code>today()</code>
fails test (<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2656">#2656</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/gpbl/react-day-picker/compare/v9.5.0...v9.5.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `react-shepherd` from 6.1.6 to 6.1.7
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/shepherd-pro/shepherd/releases">react-shepherd's
releases</a>.</em></p>
<blockquote>
<h2>v6.1.7-react-shepherd</h2>
<h2>Release (2025-01-13)</h2>
<p>react-shepherd 6.1.7 (patch)
shepherd.js 14.4.0 (minor)</p>
<h4>🚀 Enhancement</h4>
<ul>
<li><code>shepherd.js</code>
<ul>
<li><a
href="https://redirect.github.com/shipshapecode/shepherd/pull/3068">#3068</a>
💄 Add reset for dialog element (<a
href="https://github.com/chuckcarpenter"><code>@​chuckcarpenter</code></a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>shepherd.js</code>, <code>cypress-tests</code>
<ul>
<li><a
href="https://redirect.github.com/shipshapecode/shepherd/pull/3083">#3083</a>
 Remove tabindex to reduce tabs for modal trap (<a
href="https://github.com/chuckcarpenter"><code>@​...

_Description has been truncated_

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 13:25:54 +00:00
dependabot[bot]
9845a8a22a chore(frontend/deps-dev): bump the development-dependencies group in /autogpt_platform/frontend with 15 updates (#9347)
Bumps the development-dependencies group in /autogpt_platform/frontend
with 15 updates:

| Package | From | To |
| --- | --- | --- |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.49.1`
| `1.50.0` |
|
[@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y)
| `8.5.0` | `8.5.2` |
|
[@storybook/addon-essentials](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/essentials)
| `8.5.0` | `8.5.2` |
|
[@storybook/addon-interactions](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/interactions)
| `8.5.0` | `8.5.2` |
|
[@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/links)
| `8.5.0` | `8.5.2` |
|
[@storybook/addon-onboarding](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/onboarding)
| `8.5.0` | `8.5.2` |
|
[@storybook/blocks](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/blocks)
| `8.5.0` | `8.5.2` |
|
[@storybook/nextjs](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs)
| `8.5.0` | `8.5.2` |
|
[@storybook/react](https://github.com/storybookjs/storybook/tree/HEAD/code/renderers/react)
| `8.5.0` | `8.5.2` |
|
[@storybook/test](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/test)
| `8.5.0` | `8.5.2` |
|
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
| `22.10.7` | `22.10.10` |
| [chromatic](https://github.com/chromaui/chromatic-cli) | `11.25.0` |
`11.25.1` |
|
[eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next)
| `15.1.5` | `15.1.6` |
|
[prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)
| `0.6.10` | `0.6.11` |
|
[storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/cli)
| `8.5.0` | `8.5.2` |

Updates `@playwright/test` from 1.49.1 to 1.50.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/playwright/releases"><code>@​playwright/test</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v1.50.0</h2>
<h2>Test runner</h2>
<ul>
<li>
<p>New option <a
href="https://playwright.dev/docs/api/class-test#test-step-option-timeout"><code>timeout</code></a>
allows specifying a maximum run time for an individual test step. A
timed-out step will fail the execution of the test.</p>
<pre lang="js"><code>test('some test', async ({ page }) =&gt; {
  await test.step('a step', async () =&gt; {
    // This step can time out separately from the test
  }, { timeout: 1000 });
});
</code></pre>
</li>
<li>
<p>New method <a
href="https://playwright.dev/docs/api/class-test#test-step-skip">test.step.skip()</a>
to disable execution of a test step.</p>
<pre lang="js"><code>test('some test', async ({ page }) =&gt; {
  await test.step('before running step', async () =&gt; {
    // Normal step
  });
<p>await test.step.skip('not yet ready', async () =&gt; {<br />
// This step is skipped<br />
});</p>
<p>await test.step('after running step', async () =&gt; {<br />
// This step still runs even though the previous one was skipped<br />
});<br />
});<br />
</code></pre></p>
</li>
<li>
<p>Expanded <a
href="https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot-2">expect(locator).toMatchAriaSnapshot()</a>
to allow storing of aria snapshots in separate YAML files.</p>
</li>
<li>
<p>Added method <a
href="https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-error-message">expect(locator).toHaveAccessibleErrorMessage()</a>
to assert the Locator points to an element with a given <a
href="https://w3c.github.io/aria/#aria-errormessage">aria
errormessage</a>.</p>
</li>
<li>
<p>Option <a
href="https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots">testConfig.updateSnapshots</a>
added the configuration enum <code>changed</code>. <code>changed</code>
updates only the snapshots that have changed, whereas <code>all</code>
now updates all snapshots, regardless of whether there are any
differences.</p>
</li>
<li>
<p>New option <a
href="https://playwright.dev/docs/api/class-testconfig#test-config-update-source-method">testConfig.updateSourceMethod</a>
defines the way source code is updated when <a
href="https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots">testConfig.updateSnapshots</a>
is configured. Added <code>overwrite</code> and <code>3-way</code> modes
that write the changes into source code, on top of existing
<code>patch</code> mode that creates a patch file.</p>
<pre lang="bash"><code>npx playwright test --update-snapshots=changed
--update-source-method=3way
</code></pre>
</li>
<li>
<p>Option <a
href="https://playwright.dev/docs/api/class-testconfig#test-config-web-server">testConfig.webServer</a>
added a <code>gracefulShutdown</code> field for specifying a process
kill signal other than the default <code>SIGKILL</code>.</p>
</li>
<li>
<p>Exposed <a
href="https://playwright.dev/docs/api/class-teststep#test-step-attachments">testStep.attachments</a>
from the reporter API to allow retrieval of all attachments created by
that step.</p>
</li>
</ul>
<h2>UI updates</h2>
<ul>
<li>Updated default HTML reporter to improve display of
attachments.</li>
<li>New button for picking elements to produce aria snapshots.</li>
<li>Additional details (such as keys pressed) are now displayed
alongside action API calls in traces.</li>
<li>Display of <code>canvas</code> content in traces is error-prone.
Display is now disabled by default, and can be enabled via the
<code>Display canvas content</code> UI setting.</li>
<li><code>Call</code> and <code>Network</code> panels now display
additional time information.</li>
</ul>
<h2>Breaking</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9d22178533"><code>9d22178</code></a>
chore: mark v1.50.0 (<a
href="https://redirect.github.com/microsoft/playwright/issues/34447">#34447</a>)</li>
<li><a
href="5d6ac9622d"><code>5d6ac96</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34442">#34442</a>):
fix(test runner): respect updateSourceMethod from the co...</li>
<li><a
href="97b76b46af"><code>97b76b4</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34440">#34440</a>):
chore(driver): roll driver to recent Node.js LTS version</li>
<li><a
href="7bbcc3c624"><code>7bbcc3c</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34353">#34353</a>):
chore: move attachment link back to tree item, make it f...</li>
<li><a
href="2811a1d4f5"><code>2811a1d</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34430">#34430</a>):
docs: switch gracefulShutdown to primarily mention SIGTE...</li>
<li><a
href="2b8d1ce260"><code>2b8d1ce</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34380">#34380</a>):
docs: release notes for v1.50 js (<a
href="https://redirect.github.com/microsoft/playwright/issues/34425">#34425</a>)</li>
<li><a
href="715eb250e7"><code>715eb25</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34409">#34409</a>):
fix(aria snapshot): make rebase work when options are sp...</li>
<li><a
href="6106ef020f"><code>6106ef0</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34410">#34410</a>):
fix(list reporter): do not break after output without tr...</li>
<li><a
href="09cd74f7b0"><code>09cd74f</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34407">#34407</a>):
fix(step.skip): show a skipped indicator in UI mode (<a
href="https://redirect.github.com/microsoft/playwright/issues/34">#34</a>...</li>
<li><a
href="cc6eb090ec"><code>cc6eb09</code></a>
cherry-pick(<a
href="https://redirect.github.com/microsoft/playwright/issues/34386">#34386</a>):
chore: step timeout improvements (<a
href="https://redirect.github.com/microsoft/playwright/issues/34387">#34387</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/playwright/compare/v1.49.1...v1.50.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-a11y` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-a11y</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-a11y</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/addons/a11y">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-essentials` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-essentials</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-essentials</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/addons/essentials">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-interactions` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-interactions</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-interactions</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/addons/interactions">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-links` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-links</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-links</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/addons/links">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-onboarding` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-onboarding</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-onboarding</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/addons/onboarding">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/blocks` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/blocks</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/blocks</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/lib/blocks">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/nextjs` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/nextjs</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/nextjs</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li><a
href="032a7658ed"><code>032a765</code></a>
Merge pull request <a
href="https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs/issues/30333">#30333</a>
from storybookjs/interactions-to-component-2</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/frameworks/nextjs">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/react` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/react</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/react</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li><a
href="032a7658ed"><code>032a765</code></a>
Merge pull request <a
href="https://github.com/storybookjs/storybook/tree/HEAD/code/renderers/react/issues/30333">#30333</a>
from storybookjs/interactions-to-component-2</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/renderers/react">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/test` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/test</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/test</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/lib/test">compare
view</a></li>
</ul>
</details>
<br />

Updates `@types/node` from 22.10.7 to 22.10.10
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />

Updates `chromatic` from 11.25.0 to 11.25.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/chromatic-cli/releases">chromatic's
releases</a>.</em></p>
<blockquote>
<h2>v11.25.1</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Don't normalize package.json fields <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1143">#1143</a>
(<a href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Cody Kaup (<a
href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md">chromatic's
changelog</a>.</em></p>
<blockquote>
<h1>v11.25.1 (Wed Jan 22 2025)</h1>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Don't normalize package.json fields <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1143">#1143</a>
(<a href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Cody Kaup (<a
href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="035a1bf6ef"><code>035a1bf</code></a>
Bump version to: 11.25.1 [skip ci]</li>
<li><a
href="f9af9e6ca4"><code>f9af9e6</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="e69d42b2f6"><code>e69d42b</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/chromatic-cli/issues/1143">#1143</a>
from chromaui/cody/cap-2409-cli-exits-silently-when-...</li>
<li><a
href="e9d7fa8a68"><code>e9d7fa8</code></a>
Don't normalize package.json fields</li>
<li>See full diff in <a
href="https://github.com/chromaui/chromatic-cli/compare/v11.25.0...v11.25.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `eslint-config-next` from 15.1.5 to 15.1.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">eslint-config-next's
releases</a>.</em></p>
<blockquote>
<h2>v15.1.6</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix: don't memory-leak promises passed to waitUntil (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/75041">#75041</a>)</li>
<li>backport: fix prerender issue with intercepting routes +
generateStaticParams (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/75170">#75170</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/lubieowoce"><code>@​lubieowoce</code></a> and
<a href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="38a6d0177e"><code>38a6d01</code></a>
v15.1.6</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v15.1.6/packages/eslint-config-next">compare
view</a></li>
</ul>
</details>
<br />

Updates `prettier-plugin-tailwindcss` from 0.6.10 to 0.6.11
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases">prettier-plugin-tailwindcss's
releases</a>.</em></p>
<blockquote>
<h2>v0.6.11</h2>
<ul>
<li>Support TypeScript configs and plugins when using v4 (<a
href="https://redirect.github.com/tailwindlabs/prettier-plugin-tailwindcss/pull/342">#342</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md">prettier-plugin-tailwindcss's
changelog</a>.</em></p>
<blockquote>
<h2>[0.6.11] - 2025-01-23</h2>
<ul>
<li>Support TypeScript configs and plugins when using v4 (<a
href="https://redirect.github.com/tailwindlabs/prettier-plugin-tailwindcss/pull/342">#342</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b5fb12c15b"><code>b5fb12c</code></a>
0.6.11</li>
<li><a
href="be269bd5e4"><code>be269bd</code></a>
Fix import</li>
<li><a
href="253033556b"><code>2530335</code></a>
Support loading TypeScript configs in v4 (<a
href="https://redirect.github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/342">#342</a>)</li>
<li><a
href="6d3fa0786f"><code>6d3fa07</code></a>
Update changelog</li>
<li><a
href="95fce37f64"><code>95fce37</code></a>
Update changelog</li>
<li><a
href="f8a2244735"><code>f8a2244</code></a>
Update changelog</li>
<li>See full diff in <a
href="https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.10...v0.6.11">compare
view</a></li>
</ul>
</details>
<br />

Updates `storybook` from 8.5.0 to 8.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases">storybook's
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md">storybook's
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7dac855e80"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="600af05703"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li>See full diff in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/lib/cli">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 13:21:24 +00:00
Abhimanyu Yadav
56dc5610e4 fix(frontend) : add default support in oneOf field (#9352)
- Adding support of default value in oneOf field in
`node-input-components.tsx` file
- Also I have manually tested it and it's working.
2025-01-28 12:48:53 +00:00
Mario Sacaj
8685df587b CodeExecutionBlock split into InstantiationBlock & StepExecutionBlock (#9158)
Especially in case of heavy sandbox customization we don't want to spawn
a new VM every time we need to execute code, especially in circumstances
when time of inactivity is negligible.

### Changes 🏗️

Added two now blocks inside
`autogpt_platform/backend/backend/blocks/code_executor.py` which split
the logic of the CodeExecutionBlock in two parts: InstantiationBlock and
StepExecutionBlock.

The overall setup shall be the done in the InstantiationBlock which then
passes as output the `sandbox_id` which identifies the sandbox instance.

At a later stage any line of code can be executed through
StepExecutionBlock inside the same instance using the e2b library
function `sandbox = Sandbox.connect(sandbox_id=sandbox_id,
api_key=api_key)`. Variables and memory form earlier executions or
instantiation are persisted.

Beware, this approach does not make use of the beta apis to pause and
resume an instance. By using the approach above the VM will likely be
killed after the timeout inactivity set at instantiation time.


### New Features:

* **InstantiationBlock Class**:
- Added a new class to instantiate an isolated sandbox environment with
internet access for code execution. This class includes input and output
schemas, methods for running and executing code, and handles sandbox
setup commands and code execution.

* **StepExecutionBlock Class**:
- Introduced a new class to execute code in a previously instantiated
sandbox environment. This class also includes input and output schemas,
methods for running and executing step code, and handles connecting to
an existing sandbox for code execution.

### Minor Changes:

* **ProgrammingLanguage Enum**:
- Added a blank line for better readability within the
`ProgrammingLanguage` enum definition.

---------

Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-01-28 12:45:18 +00:00
Nicholas Tindle
7609969169 feat(blocks): Add blocks for GitHub checks & statuses (#9271)
<!-- Clearly explain the need for these changes: -->
We really want to be able to automate with our agents some behaviors
that involve blocking PRs or unblocking them based on automations.

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds Status Blocks for github
- Modifies the pull requests block to not have include pr changes as
advanced because that's a wild place to hide it
- Adds some disabled checks blocks that require github app
- Added IfMatches Block to make using stuff easier

### 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] Built agent using

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-01-28 12:34:09 +00:00
Zamil Majdy
e0d153b284 fix(backend): Make spend credit failure as part of block execution failure (#9340)
<img width="1427" alt="image"
src="https://github.com/user-attachments/assets/de48ceb7-2a90-44e6-a687-d6759a1aa434"
/>

### Changes 🏗️

Block execution that cost credit can fail, the scope of this fix is
making this error as part of the node execution instead of a system
error.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-28 12:21:31 +00:00
Reinier van der Leer
0811e8a990 feat(backend): Enable executing store agents without agent ownership (#9267)
This re-introduces PR #9179 with some fixes.

This PR enables the execution of store agents even if they are not owned
by the user. Key changes include handling store-listed agents in the
`get_graph` logic, improving execution flow, and ensuring
version-specific handling. These updates support more flexible agent
execution.

### Changes 🏗️
(copied from #9179)

- **Graph Retrieval:** Updated `get_graph` to check store listings for
agents not owned by the user.
- **Version Handling:** Added `graph_version` to execution methods for
consistent version-specific execution.
- **Execution Flow:** Refactored `scheduler.py`, `rest_api.py`, and
other modules for clearer logic and better maintainability.
- **Testing:** Updated `test_manager.py` and other test cases to
validate execution of store-listed agents added test for accessing graph

Out-of-scope changes:
- Add logic to pretty-print Pydantic validation error responses to
backend API client in frontend

---------

Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Swifty <craigswift13@gmail.com>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-28 11:00:32 +00:00
Zamil Majdy
a7a59a26b9 feat(platform): Implement Auto-Top-Up credits capability (#9278)
<img width="1157" alt="image"
src="https://github.com/user-attachments/assets/5b70aa1e-876f-4163-b69e-c22bd21ea8d3"
/>

### Changes 🏗️

Added auto-top-up credits capability:
* Added autoTopUpConfig column on user
* Added autoTopUp form UI
* Added payment charge logic for top_up_credits 
* Added auto-top-up logic on spend_credits

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Krzysztof Czerwinski <kpczerwinski@gmail.com>
2025-01-28 10:18:29 +00:00
Bently
40897ce874 fix(blocks): add ollama_host to AIConversationBlock (#9351)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

In the AI Conversation block it uses
``AIStructuredResponseGeneratorBlock.input`` for the input but it is
missing ollama_host, this means that if i try to use ollama with this
block, ollama_host is not passed, this PR fixes that by simply adding
``ollama_host=input_data.ollama_host`` to the ``class
AIConversationBlock(AIBlockBase):``

```diff
AIStructuredResponseGeneratorBlock.Input(
    prompt="",
    credentials=input_data.credentials,
    model=input_data.model,
    conversation_history=input_data.messages,
    max_tokens=input_data.max_tokens,
    expected_format={},
++  ollama_host=input_data.ollama_host,
),
```

<!-- 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:
- [x] Run the AI Conversation block with a normal provider like GPT-4 to
see if it works like normal
- [x] Run the AI Conversation block with Ollama to make sure the changes
made work
2025-01-28 08:23:05 +00:00
Nicholas Tindle
ac8a466cda feat(platform): Add username+password credentials type; fix email and reddit blocks (#9113)
<!-- Clearly explain the need for these changes: -->
Update and adds a basic credential field for use in integrations like
reddit


### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Reddit
	- Drops the Username and Password for reddit from the .env
	- Updates Reddit block with modern provider and credential system
- moves clientid and secret to reading from `Settings().secrets` rather
than input on the block
	- moves user agent to `Settings().config`

- SMTP
  - update the block to support user password and modern credentials

- Add `UserPasswordCredentials`
	- Default API key expiry to None explicitly to help type cohesion
- add `UserPasswordCredentials` with a weird form of `bearer` which we
ideally remove because `basic` is a more appropriate name. This is
dependent on `Webhook _base` allowing a subset of `Credentials`
	- Update `Credentials` and `CredentialsType`
- Fix various `OAuth2Credentials | APIKeyCredentials` -> `Credentials`
mismatches between base and derived classes
- Replace `router/@post(create_api_key_credentials)` with
`create_credentials` which now takes a credential and is discriminated
by `type` provided by the credential

- UI/Frontend
- Updated various pages to have saved credential types, icons, and text
for User Pass Credentials
- Update credential input to have an input/modals/selects for user/pass
combos
- Update the types to support having user/pass credentials too (we
should make this more centralized)
	- Update Credential Providres to support user_password
- Update `client.ts` to support the new streamlined credential creation
method and endpoint

- DX
	- Sort the provider names **again**


TODO:
- [x] Reactivate Conditionally Disabling Reddit
~~- [ ] Look into moving Webhooks base to allow subset of `Credentials`
rather than requiring all webhooks to support the input of all valid
`Credentials` types~~ Out of scope
- [x] Figure out the `singleCredential` calculator in
`credentials-input.tsx` so that it also respects User Pass credentials
and isn't a logic mess

### 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 with agents

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-28 08:07:50 +00:00
abhi1992002
0be6ff45c7 fix lint 2025-01-28 11:12:28 +05:30
abhi1992002
c8b17c6d03 remove user_id from graph_data in download_agent_file route 2025-01-28 11:05:18 +05:30
abhi1992002
5a13db8054 remove raises and delattr on get agent db function 2025-01-28 10:44:50 +05:30
Nicholas Tindle
97ecaf5639 fix(test): timeout is causing intermittent failures (#9341)
<!-- Clearly explain the need for these changes: -->
Tests keep failing
### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- changes a 20 to 30
2025-01-27 21:09:59 +00:00
Nicholas Tindle
536bf8cdaf ci(repo): Update repo-close-stale-issues.yml (#9339)
<!-- Clearly explain the need for these changes: -->
We are making issues stale that aren’t. With the additions of more
careful project management this has become a hindrance rather than help.
### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- increases days until stale from 50 to 100
2025-01-27 08:55:35 +00:00
Zamil Majdy
bb3be444de feat(platform): Add multimedia file support & add basic Video blocks (#9320)
Currently, there is no support for passing files in the platform, each
generated file should be hosted somewhere.
This PR adds support of passing files temporarily during the execution
to open up more block that does multimedia operations.

<img width="583" alt="image"
src="https://github.com/user-attachments/assets/c285de5a-c2a9-41a0-9be1-305a316879d6"
/>

<img width="1291" alt="image"
src="https://github.com/user-attachments/assets/d7bcaf38-80fa-4b51-91da-b4eed80a02c1"
/>


### Changes 🏗️

* Add media support for passing files (local files, base64, URL) and
`FileStoreBlock` (file version of `StoreValueBlock`)
* Add initial multimedia blocks: `LoopVideoBlock` &
`AddAudioToVideoBlock`.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-26 16:08:05 +00:00
Nicholas Tindle
996efaf4fc fix: check if linear is enabled before showing blocks (#9338)
<!-- Clearly explain the need for these changes: -->
Linear blocks show up even if oauth isn't configured

### Changes 🏗️
disables the linear blocks if oauth isn't configured

<!-- 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] checked block list with and without oauth configured
2025-01-26 15:06:03 +00:00
Zamil Majdy
479a8470fe fix(block): Remove TwitterUnblockUserBlock & TwitterBlockUserBlock (#9337)
Twitter API v2 Client update:
```
    .. versionadded:: 4.0

    .. versionchanged:: 4.15
        Removed ``block`` and ``unblock`` methods, as the endpoints they use
        have been removed
```

### Changes 🏗️

Remove TwitterUnblockUserBlock & TwitterBlockUserBlock.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-26 14:06:39 +00:00
Azraf Nahian
12eb495b2c Added autocomplete (#9333)
**Clearly explain the need for these changes:**
The changes were made to enhance the usability and accessibility of the
login and signup forms. By adding appropriate `autocomplete` attributes,
the forms are now more compatible with browsers and password managers,
improving the user experience by supporting autofill, password
generation, and accessibility.

Additionally, the `yarn.lock` file was updated to reflect dependency
changes made during this work, ensuring consistent dependency resolution
across all environments.

This PR also resolves **issue #9312**, which addresses missing
`autocomplete` attributes on login and signup forms.

---

### **Changes 🏗️**
- Added `autocomplete="username"` to the email input field in both login
and signup forms.
- Added `autocomplete="current-password"` to the password input field in
the login form.
- Added `autocomplete="new-password"` to the password and confirm
password input fields in the signup form.
- Updated `yarn.lock` to reflect dependency updates.
- Improved browser compatibility and user accessibility.
- Enhanced support for autofill and password generation for better form
usability.

---

### **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] Verified the `autocomplete` attributes are present in the rendered
HTML using browser DevTools.
- [x] Tested the login form for autofill compatibility with email and
password.
- [x] Tested the signup form with password generation using a password
manager.
  - [x] Ensured no functionality or styling was affected by the changes.

<details>
  <summary>Example test plan</summary>
  
- [x] Open the login form and verify that email
(`autocomplete="username"`) and password
(`autocomplete="current-password"`) inputs work with browser autofill.
- [x] Open the signup form and confirm that the password manager
suggests generating a strong password for `autocomplete="new-password"`.
  - [x] Verify that form submissions work as expected with no errors.
</details>

---

#### For configuration changes:
- [x] `.env.example` 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**).

<details>
  <summary>Examples of configuration changes</summary>

No configuration changes were required for this PR.

</details> 

---

### **Issue Resolved:**
This pull request resolves **issue #9312** by adding the necessary
`autocomplete` attributes to the login and signup forms to improve
accessibility and compatibility with password managers.

---------

Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-26 04:19:41 +00:00
Zamil Majdy
d74e4ef1a8 feat(block): Add LLM prompt as the output pin (#9330)
### Changes 🏗️

To ease the debugging, we can expose the prompt sent to the LLM
provider.

<img width="418" alt="image"
src="https://github.com/user-attachments/assets/0c8d7502-4f87-4002-a498-331f341859bd"
/>


### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-25 12:33:41 +00:00
Ayush Mittal
5b7a491a36 Resolve for issue #9082: Marketplace - "Select All" doesn't work in Agent Dashboard (#9247)
### Changes 🏗️

I have done changes in AgentTable and AgentTableRow components present
in autogpt_platform/frontend directory. The selectedAgents state is
passed on to AgentTableRow component, so that when Select All is
checked, individual check boxes also get checked.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description


#### For configuration changes:
- [ ] `.env.example` was already compatible with my changes
- [ ] `docker-compose.yml` was already compatible with my changes

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-24 17:16:51 +00:00
dependabot[bot]
016b4a6313 chore(frontend/deps-dev): bump the development-dependencies group across 1 directory with 17 updates (#9298)
Bumps the development-dependencies group with 15 updates in the
/autogpt_platform/frontend directory:

| Package | From | To |
| --- | --- | --- |
|
[@chromatic-com/storybook](https://github.com/chromaui/addon-visual-tests)
| `3.2.3` | `3.2.4` |
|
[@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y)
| `8.4.7` | `8.5.0` |
|
[@storybook/addon-essentials](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/essentials)
| `8.4.7` | `8.5.0` |
|
[@storybook/addon-interactions](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/interactions)
| `8.4.7` | `8.5.0` |
|
[@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/links)
| `8.4.7` | `8.5.0` |
|
[@storybook/addon-onboarding](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/onboarding)
| `8.4.7` | `8.5.0` |
|
[@storybook/blocks](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/blocks)
| `8.4.7` | `8.5.0` |
|
[@storybook/nextjs](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs)
| `8.4.7` | `8.5.0` |
|
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
| `22.10.5` | `22.10.7` |
| [chromatic](https://github.com/chromaui/chromatic-cli) | `11.22.0` |
`11.25.0` |
|
[eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next)
| `15.1.3` | `15.1.5` |
| [postcss](https://github.com/postcss/postcss) | `8.4.49` | `8.5.1` |
|
[prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)
| `0.6.9` | `0.6.10` |
|
[storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/cli)
| `8.4.7` | `8.5.0` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.7.2` |
`5.7.3` |


Updates `@chromatic-com/storybook` from 3.2.3 to 3.2.4
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/addon-visual-tests/blob/v3.2.4/CHANGELOG.md"><code>@​chromatic-com/storybook</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>v3.2.4 (Fri Jan 17 2025)</h1>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Remove the connection timeout notification <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/351">#351</a>
(<a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>)</li>
<li>Set up Codecov <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/350">#350</a>
(<a
href="https://github.com/paulelliott"><code>@​paulelliott</code></a>)</li>
</ul>
<h4>Authors: 2</h4>
<ul>
<li>Paul Elliott (<a
href="https://github.com/paulelliott"><code>@​paulelliott</code></a>)</li>
<li>Valentin Palkovic (<a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a490548df4"><code>a490548</code></a>
Bump version to: 3.2.4 [skip ci]</li>
<li><a
href="d86ecff42c"><code>d86ecff</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="dcee16503c"><code>dcee165</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/addon-visual-tests/issues/351">#351</a>
from chromaui/valentin/remove-connection-timeout-noti...</li>
<li><a
href="127a468c9e"><code>127a468</code></a>
Remove the connection timeout notification</li>
<li><a
href="a7a43dae6d"><code>a7a43da</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/addon-visual-tests/issues/350">#350</a>
from chromaui/set-up-codecov</li>
<li><a
href="8499c6a425"><code>8499c6a</code></a>
Upload coverage reports to Codecov</li>
<li><a
href="476a673686"><code>476a673</code></a>
Set up vitest coverage reporting</li>
<li><a
href="74d3d8d575"><code>74d3d8d</code></a>
Update vitest to 2.1.8</li>
<li>See full diff in <a
href="https://github.com/chromaui/addon-visual-tests/compare/v3.2.3...v3.2.4">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-a11y` from 8.4.7 to 8.5.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-a11y</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.0</h2>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI</li>
<li>⚛️ React 19 support</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon Test: Clarify message when <code>vitest</code> detects missing
deps - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29763">#29763</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Clear coverage data when starting or watching - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30072">#30072</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu UI - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29727">#29727</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu updates - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30107">#30107</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Correctly stop Storybook when Vitest closes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30012">#30012</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Filter out falsy test results in TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30001">#30001</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix documentation links - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30128">#30128</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix duplicate <code>test.include</code> patterns - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30029">#30029</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix environment variable for Vitest Storybook
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30054">#30054</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix error reporting for <code>vitest</code> crashes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29751">#29751</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Fix generated path to <code>vitest.setup.js</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30233">#30233</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix indexing behavior - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29836">#29836</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix printing null% for coverage - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30061">#30061</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-a11y</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI⚛️</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon Test: Clarify message when <code>vitest</code> detects missing
deps - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29763">#29763</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Clear coverage data when starting or watching - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30072">#30072</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu UI - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29727">#29727</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu updates - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30107">#30107</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Correctly stop Storybook when Vitest closes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30012">#30012</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Filter out falsy test results in TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30001">#30001</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix documentation links - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30128">#30128</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix duplicate <code>test.include</code> patterns - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30029">#30029</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix environment variable for Vitest Storybook
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30054">#30054</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix error reporting for <code>vitest</code> crashes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29751">#29751</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Fix generated path to <code>vitest.setup.js</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30233">#30233</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix indexing behavior - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29836">#29836</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix printing null% for coverage - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30061">#30061</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Fix run request while booting or restarting Vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29829">#29829</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Handle undefined storyId - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29998">#29998</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="92770672e5"><code>9277067</code></a>
Bump version from &quot;8.5.0-beta.11&quot; to &quot;8.5.0&quot; [skip
ci]</li>
<li><a
href="d8fe93ac1b"><code>d8fe93a</code></a>
Bump version from &quot;8.5.0-beta.10&quot; to &quot;8.5.0-beta.11&quot;
[skip ci]</li>
<li><a
href="426586d37a"><code>426586d</code></a>
Bump version from &quot;8.5.0-beta.9&quot; to &quot;8.5.0-beta.10&quot;
[skip ci]</li>
<li><a
href="6b337506e7"><code>6b33750</code></a>
Addon A11y: Change default element selector</li>
<li><a
href="a6a633a61e"><code>a6a633a</code></a>
Merge branch 'next-release' into next</li>
<li><a
href="b607dbe575"><code>b607dbe</code></a>
Bump version from &quot;8.5.0-beta.8&quot; to &quot;8.5.0-beta.9&quot;
[skip ci]</li>
<li><a
href="7e75f73809"><code>7e75f73</code></a>
Merge remote-tracking branch 'origin/next' into
valentin/a11y-refactorings</li>
<li><a
href="3b979ee412"><code>3b979ee</code></a>
Bump version from &quot;8.5.0-beta.7&quot; to &quot;8.5.0-beta.8&quot;
[skip ci]</li>
<li><a
href="21b452ac9e"><code>21b452a</code></a>
Rename a11ytest tag to a11y-test</li>
<li><a
href="8de05db935"><code>8de05db</code></a>
Enhance post-install script to inherit stdio for better logging during
addon ...</li>
<li>Additional commits viewable in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.0/code/addons/a11y">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-essentials` from 8.4.7 to 8.5.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-essentials</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.0</h2>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI</li>
<li>⚛️ React 19 support</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon Test: Clarify message when <code>vitest</code> detects missing
deps - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29763">#29763</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Clear coverage data when starting or watching - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30072">#30072</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu UI - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29727">#29727</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu updates - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30107">#30107</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Correctly stop Storybook when Vitest closes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30012">#30012</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Filter out falsy test results in TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30001">#30001</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix documentation links - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30128">#30128</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix duplicate <code>test.include</code> patterns - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30029">#30029</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix environment variable for Vitest Storybook
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30054">#30054</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix error reporting for <code>vitest</code> crashes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29751">#29751</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Fix generated path to <code>vitest.setup.js</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30233">#30233</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix indexing behavior - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29836">#29836</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix printing null% for coverage - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30061">#30061</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-essentials</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI⚛️</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon Test: Clarify message when <code>vitest</code> detects missing
deps - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29763">#29763</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Clear coverage data when starting or watching - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30072">#30072</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu UI - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29727">#29727</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu updates - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30107">#30107</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Correctly stop Storybook when Vitest closes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30012">#30012</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Filter out falsy test results in TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30001">#30001</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix documentation links - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30128">#30128</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix duplicate <code>test.include</code> patterns - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30029">#30029</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix environment variable for Vitest Storybook
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30054">#30054</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix error reporting for <code>vitest</code> crashes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29751">#29751</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Fix generated path to <code>vitest.setup.js</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30233">#30233</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix indexing behavior - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29836">#29836</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix printing null% for coverage - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30061">#30061</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Fix run request while booting or restarting Vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29829">#29829</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Handle undefined storyId - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29998">#29998</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="92770672e5"><code>9277067</code></a>
Bump version from &quot;8.5.0-beta.11&quot; to &quot;8.5.0&quot; [skip
ci]</li>
<li><a
href="d8fe93ac1b"><code>d8fe93a</code></a>
Bump version from &quot;8.5.0-beta.10&quot; to &quot;8.5.0-beta.11&quot;
[skip ci]</li>
<li><a
href="426586d37a"><code>426586d</code></a>
Bump version from &quot;8.5.0-beta.9&quot; to &quot;8.5.0-beta.10&quot;
[skip ci]</li>
<li><a
href="b607dbe575"><code>b607dbe</code></a>
Bump version from &quot;8.5.0-beta.8&quot; to &quot;8.5.0-beta.9&quot;
[skip ci]</li>
<li><a
href="3b979ee412"><code>3b979ee</code></a>
Bump version from &quot;8.5.0-beta.7&quot; to &quot;8.5.0-beta.8&quot;
[skip ci]</li>
<li><a
href="2b9f1cfc16"><code>2b9f1cf</code></a>
Bump version from &quot;8.5.0-beta.6&quot; to &quot;8.5.0-beta.7&quot;
[skip ci]</li>
<li><a
href="91f53fdf55"><code>91f53fd</code></a>
Bump version from &quot;8.5.0-beta.5&quot; to &quot;8.5.0-beta.6&quot;
[skip ci]</li>
<li><a
href="ef9ee273d6"><code>ef9ee27</code></a>
Bump version from &quot;8.5.0-beta.4&quot; to &quot;8.5.0-beta.5&quot;
[skip ci]</li>
<li><a
href="cf555266f5"><code>cf55526</code></a>
Bump version from &quot;8.5.0-beta.3&quot; to &quot;8.5.0-beta.4&quot;
[skip ci]</li>
<li><a
href="df37d0880e"><code>df37d08</code></a>
Bump version from &quot;8.5.0-beta.2&quot; to &quot;8.5.0-beta.3&quot;
[skip ci]</li>
<li>Additional commits viewable in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.0/code/addons/essentials">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/addon-interactions` from 8.4.7 to 8.5.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases"><code>@​storybook/addon-interactions</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.5.0</h2>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI</li>
<li>⚛️ React 19 support</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon Test: Clarify message when <code>vitest</code> detects missing
deps - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29763">#29763</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Clear coverage data when starting or watching - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30072">#30072</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu UI - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29727">#29727</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu updates - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30107">#30107</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Correctly stop Storybook when Vitest closes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30012">#30012</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Filter out falsy test results in TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30001">#30001</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix documentation links - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30128">#30128</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix duplicate <code>test.include</code> patterns - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30029">#30029</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix environment variable for Vitest Storybook
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30054">#30054</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix error reporting for <code>vitest</code> crashes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29751">#29751</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Fix generated path to <code>vitest.setup.js</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30233">#30233</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix indexing behavior - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29836">#29836</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix printing null% for coverage - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30061">#30061</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md"><code>@​storybook/addon-interactions</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI⚛️</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon Test: Clarify message when <code>vitest</code> detects missing
deps - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29763">#29763</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Clear coverage data when starting or watching - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30072">#30072</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu UI - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29727">#29727</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu updates - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30107">#30107</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Correctly stop Storybook when Vitest closes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30012">#30012</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Filter out falsy test results in TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30001">#30001</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix documentation links - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30128">#30128</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix duplicate <code>test.include</code> patterns - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30029">#30029</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix environment variable for Vitest Storybook
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30054">#30054</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Fix error reporting for <code>vitest</code> crashes - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29751">#29751</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Fix generated path to <code>vitest.setup.js</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30233">#30233</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Fix indexing behavior - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29836">#29836</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Fix printing null% for coverage - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30061">#30061</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Fix run request while booting or restarting Vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29829">#29829</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Handle undefined storyId - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29998">#29998</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="92770672e5"><code>9277067</code></a>
Bump version from &quot;8.5.0-beta.11&quot; to &quot;8.5.0&quot; [skip
ci]</li>
<li><a
href="e447db6537"><code>e447db6</code></a>
Merge branch 'next' into jeppe/fix-interactions-removal</li>
<li><a
href="1a0d0eaa34"><code>1a0d0ea</code></a>
move addon order check from preset.js to dist/preset.js</li>
<li><a
href="d8fe93ac1b"><code>d8fe93a</code></a>
Bump version from &quot;8.5.0-beta.10&quot; to &quot;8.5.0-beta.11&quot;
[skip ci]</li>
<li><a
href="426586d37a"><code>426586d</code></a>
Bump version from &quot;8.5.0-beta.9&quot; to &quot;8.5.0-beta.10&quot;
[skip ci]</li>
<li><a
href="b607dbe575"><code>b607dbe</code></a>
Bump version from &quot;8.5.0-beta.8&quot; to &quot;8.5.0-beta.9&quot;
[skip ci]</li>
<li><a
href="3b979ee412"><code>3b979ee</code></a>
Bump version from &quot;8.5.0-beta.7&quot; to &quot;8.5.0-beta.8&quot;
[skip ci]</li>
<li><a
href="2b9f1cfc16"><code>2b9f1cf</code></a>
Bump version from &quot;8.5.0-beta.6&quot; to &quot;8.5.0-beta.7&quot;
[skip ci]</li>
<li><a
href="91f53fdf55"><code>91f53fd</code></a>
Bump version from &quot;8.5.0-beta.5&quot; to &quot;8.5.0-beta.6&quot;
[skip ci]</li>
<li><a
href="ef9ee273d6"><code>ef9ee27</code></a>
Bump version from &quot;8.5.0-beta.4&quot; to &quot;8.5.0-beta.5&quot;
[skip ci]</li>
<li>Additional ...

_Description has been truncated_

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-24 16:21:09 +00:00
dependabot[bot]
21337e6bc4 chore(libs/deps): bump the production-dependencies group across 1 directory with 4 updates (#9237)
Bumps the production-dependencies group with 4 updates in the
/autogpt_platform/autogpt_libs directory:
[pydantic](https://github.com/pydantic/pydantic),
[pydantic-settings](https://github.com/pydantic/pydantic-settings),
[pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) and
[supabase](https://github.com/supabase/supabase-py).

Updates `pydantic` from 2.10.3 to 2.10.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/releases">pydantic's
releases</a>.</em></p>
<blockquote>
<h2>v2.10.4 2024-12-18</h2>
<h2>What's Changed</h2>
<h3>Packaging</h3>
<ul>
<li>Bump <code>pydantic-core</code> to v2.27.2 by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/11138">#11138</a></li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Fix for comparison of <code>AnyUrl</code> objects by <a
href="https://github.com/alexprabhat99"><code>@​alexprabhat99</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11082">#11082</a></li>
<li>Properly fetch PEP 695 type params for functions, do not fetch
annotations from signature by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11093">#11093</a></li>
<li>Include JSON Schema input core schema in function schemas by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11085">#11085</a></li>
<li>Add <code>len</code> to <code>_BaseUrl</code> to avoid TypeError by
<a href="https://github.com/Kharianne"><code>@​Kharianne</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/11111">#11111</a></li>
<li>Make sure the type reference is removed from the seen references by
<a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11143">#11143</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/alexprabhat99"><code>@​alexprabhat99</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11082">#11082</a></li>
<li><a href="https://github.com/Kharianne"><code>@​Kharianne</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11111">#11111</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic/compare/v2.10.3...v2.10.4">https://github.com/pydantic/pydantic/compare/v2.10.3...v2.10.4</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/blob/main/HISTORY.md">pydantic's
changelog</a>.</em></p>
<blockquote>
<h2>v2.10.5 (2025-01-08)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.10.5">GitHub
release</a></p>
<h3>What's Changed</h3>
<ul>
<li>Remove custom MRO implementation of Pydantic models by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11184">#11184</a></li>
<li>Fix URL serialization for unions by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11233">#11233</a></li>
</ul>
<h2>v2.10.4 (2024-12-18)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.10.4">GitHub
release</a></p>
<h3>What's Changed</h3>
<h4>Packaging</h4>
<ul>
<li>Bump <code>pydantic-core</code> to v2.27.2 by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/11138">#11138</a></li>
</ul>
<h4>Fixes</h4>
<ul>
<li>Fix for comparison of <code>AnyUrl</code> objects by <a
href="https://github.com/alexprabhat99"><code>@​alexprabhat99</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11082">#11082</a></li>
<li>Properly fetch PEP 695 type params for functions, do not fetch
annotations from signature by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11093">#11093</a></li>
<li>Include JSON Schema input core schema in function schemas by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11085">#11085</a></li>
<li>Add <code>len</code> to <code>_BaseUrl</code> to avoid TypeError by
<a href="https://github.com/Kharianne"><code>@​Kharianne</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/11111">#11111</a></li>
<li>Make sure the type reference is removed from the seen references by
<a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11143">#11143</a></li>
</ul>
<h3>New Contributors</h3>
<ul>
<li><a href="https://github.com/FyZzyss"><code>@​FyZzyss</code></a> made
their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10789">#10789</a></li>
<li><a href="https://github.com/tamird"><code>@​tamird</code></a> made
their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10948">#10948</a></li>
<li><a href="https://github.com/felixxm"><code>@​felixxm</code></a> made
their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11077">#11077</a></li>
<li><a
href="https://github.com/alexprabhat99"><code>@​alexprabhat99</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11082">#11082</a></li>
<li><a href="https://github.com/Kharianne"><code>@​Kharianne</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/11111">#11111</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5d34efda82"><code>5d34efd</code></a>
Prepare release v2.10.5 (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11237">#11237</a>)</li>
<li><a
href="6e585f925e"><code>6e585f9</code></a>
Fix url serialization for unions (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11233">#11233</a>)</li>
<li><a
href="5a22e02608"><code>5a22e02</code></a>
Remove custom MRO implementation of Pydantic models (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11195">#11195</a>)</li>
<li><a
href="5bd3a6507b"><code>5bd3a65</code></a>
fix history.md</li>
<li><a
href="46f094569a"><code>46f0945</code></a>
Prepare for v2.10.4 (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11144">#11144</a>)</li>
<li><a
href="ea69e695f2"><code>ea69e69</code></a>
Make sure the type reference is removed from the seen references (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11145">#11145</a>)</li>
<li><a
href="a07c31e4a4"><code>a07c31e</code></a>
Include JSON Schema input core schema in function schemas (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11142">#11142</a>)</li>
<li><a
href="9166d55163"><code>9166d55</code></a>
Update <code>WithJsonSchema</code> documentation, add usage
documentation for `json_sche...</li>
<li><a
href="572f57de01"><code>572f57d</code></a>
Rewrite validators documentation (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11060">#11060</a>)</li>
<li><a
href="9faa8d9cbd"><code>9faa8d9</code></a>
Fix for comaparison of AnyUrl objects (<a
href="https://redirect.github.com/pydantic/pydantic/issues/11082">#11082</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pydantic/pydantic/compare/v2.10.3...v2.10.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `pydantic-settings` from 2.7.0 to 2.7.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic-settings/releases">pydantic-settings's
releases</a>.</em></p>
<blockquote>
<h2>v2.7.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Move preferred alias resolution to private method by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/507">pydantic/pydantic-settings#507</a></li>
<li>Prepare release 2.7.1 by <a
href="https://github.com/hramezani"><code>@​hramezani</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/511">pydantic/pydantic-settings#511</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic-settings/compare/v2.7.0...v2.7.1">https://github.com/pydantic/pydantic-settings/compare/v2.7.0...v2.7.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c989335d26"><code>c989335</code></a>
Prepare release 2.7.1 (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/511">#511</a>)</li>
<li><a
href="66ecc3adec"><code>66ecc3a</code></a>
Move preferred alias resolution to private method (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/507">#507</a>)</li>
<li>See full diff in <a
href="https://github.com/pydantic/pydantic-settings/compare/v2.7.0...v2.7.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `pytest-asyncio` from 0.25.0 to 0.25.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's
releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.25.2</h2>
<ul>
<li>Call <code>loop.shutdown_asyncgens()</code> before closing the event
loop to ensure async generators are closed in the same manner as
<code>asyncio.run</code> does <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/pull/1034">#1034</a></li>
</ul>
<h2>pytest-asyncio 0.25.1</h2>
<ul>
<li>Fixes an issue that caused a broken event loop when a
function-scoped test was executed in between two tests with wider loop
scope <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/950">#950</a></li>
<li>Improves test collection speed in auto mode <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/pull/1020">#1020</a></li>
<li>Corrects the warning that is emitted upon redefining the event_loop
fixture</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2188cdbbf7"><code>2188cdb</code></a>
build: Prepare release of v0.25.2.</li>
<li><a
href="c3ad6340b8"><code>c3ad634</code></a>
fix: Shutdown generators before closing event loops.</li>
<li><a
href="e8ffb10528"><code>e8ffb10</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="aae43d4f76"><code>aae43d4</code></a>
Build(deps): Bump hypothesis in /dependencies/default</li>
<li><a
href="941e8b5104"><code>941e8b5</code></a>
Build(deps): Bump pygments from 2.18.0 to 2.19.1 in
/dependencies/docs</li>
<li><a
href="623ab74b80"><code>623ab74</code></a>
docs: Prepare release of v0.25.1.</li>
<li><a
href="c236550e73"><code>c236550</code></a>
docs: Fix broken link to the pytest.mark.asyncio reference.</li>
<li><a
href="41c645b3b7"><code>41c645b</code></a>
fix: Correct warning message when redefining the event_loop
fixture.</li>
<li><a
href="2fd10f8243"><code>2fd10f8</code></a>
docs: Clarify deprecation of event_loop fixture.</li>
<li><a
href="a4e82ab25b"><code>a4e82ab</code></a>
docs: Added changelog entry for <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1020">#1020</a>.</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.25.0...v0.25.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `supabase` from 2.10.0 to 2.11.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/supabase/supabase-py/releases">supabase's
releases</a>.</em></p>
<blockquote>
<h2>v2.11.0</h2>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.10.0...v2.11.0">2.11.0</a>
(2024-12-30)</h2>
<h3>Features</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.11.0 to 2.11.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1021">#1021</a>)
(<a
href="17e8a662de">17e8a66</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.8.0 to 0.9.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1008">#1008</a>)
(<a
href="19ab5df525">19ab5df</a>)</li>
<li><strong>postgrest:</strong> bump postgrest from 0.19.0 to 0.19.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1022">#1022</a>)
(<a
href="9a8b72fe3d">9a8b72f</a>)</li>
<li><strong>realtime:</strong> bump realtime from 2.0.6 to 2.1.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1019">#1019</a>)
(<a
href="f251d520af">f251d52</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.10.0 to 0.11.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1020">#1020</a>)
(<a
href="fb7a7e1257">fb7a7e1</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>remove project reference (<a
href="https://redirect.github.com/supabase/supabase-py/issues/999">#999</a>)
(<a
href="e126d04d26">e126d04</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/supabase/supabase-py/blob/main/CHANGELOG.md">supabase's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/supabase/supabase-py/compare/v2.10.0...v2.11.0">2.11.0</a>
(2024-12-30)</h2>
<h3>Features</h3>
<ul>
<li><strong>auth:</strong> bump gotrue from 2.10.0 to 2.11.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1005">#1005</a>)
(<a
href="721de30e5b">721de30</a>)</li>
<li><strong>auth:</strong> bump gotrue from 2.11.0 to 2.11.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1021">#1021</a>)
(<a
href="17e8a662de">17e8a66</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.7.0 to 0.8.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1006">#1006</a>)
(<a
href="bfc4a5c1e3">bfc4a5c</a>)</li>
<li><strong>functions:</strong> bump supafunc from 0.8.0 to 0.9.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1008">#1008</a>)
(<a
href="19ab5df525">19ab5df</a>)</li>
<li><strong>postgrest:</strong> bump postgrest from 0.18.0 to 0.19.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1004">#1004</a>)
(<a
href="d7861b0c4d">d7861b0</a>)</li>
<li><strong>postgrest:</strong> bump postgrest from 0.19.0 to 0.19.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1022">#1022</a>)
(<a
href="9a8b72fe3d">9a8b72f</a>)</li>
<li><strong>realtime:</strong> bump realtime from 2.0.6 to 2.1.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1019">#1019</a>)
(<a
href="f251d520af">f251d52</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.10.0 to 0.11.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1020">#1020</a>)
(<a
href="fb7a7e1257">fb7a7e1</a>)</li>
<li><strong>storage:</strong> bump storage3 from 0.9.0 to 0.10.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1003">#1003</a>)
(<a
href="718edc3892">718edc3</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>remove project reference (<a
href="https://redirect.github.com/supabase/supabase-py/issues/999">#999</a>)
(<a
href="e126d04d26">e126d04</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6fed6d64a1"><code>6fed6d6</code></a>
chore(main): release 2.11.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1000">#1000</a>)</li>
<li><a
href="9a8b72fe3d"><code>9a8b72f</code></a>
feat(postgrest): bump postgrest from 0.19.0 to 0.19.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1022">#1022</a>)</li>
<li><a
href="17e8a662de"><code>17e8a66</code></a>
feat(auth): bump gotrue from 2.11.0 to 2.11.1 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1021">#1021</a>)</li>
<li><a
href="fb7a7e1257"><code>fb7a7e1</code></a>
feat(storage): bump storage3 from 0.10.0 to 0.11.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1020">#1020</a>)</li>
<li><a
href="f251d520af"><code>f251d52</code></a>
feat(realtime): bump realtime from 2.0.6 to 2.1.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1019">#1019</a>)</li>
<li><a
href="616bc21629"><code>616bc21</code></a>
chore(deps-dev): bump jinja2 from 3.1.4 to 3.1.5 in the pip group across
1 di...</li>
<li><a
href="4f68eee25b"><code>4f68eee</code></a>
chore: Add Coveralls to CI (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1018">#1018</a>)</li>
<li><a
href="7ecf6b62c7"><code>7ecf6b6</code></a>
chore(deps-dev): bump pytest-asyncio from 0.24.0 to 0.25.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1014">#1014</a>)</li>
<li><a
href="3fa4814937"><code>3fa4814</code></a>
chore: update httpx (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1013">#1013</a>)</li>
<li><a
href="c81ffbaac5"><code>c81ffba</code></a>
chore(deps-dev): bump commitizen from 4.0.0 to 4.1.0 (<a
href="https://redirect.github.com/supabase/supabase-py/issues/1012">#1012</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/supabase/supabase-py/compare/v2.10.0...v2.11.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-24 15:54:29 +00:00
Zamil Majdy
88f711e486 fix(backend): Make monthly top-up adjust the target balance instead of top-up the target amount (#9295)
To maintain the transaction running-balance integrity, the monthly
top-up balance has to adjust the top-up amount to maintain the balance
of the user to be at least X amount, instead of top-up the user balance
with a fixed X amount.

### Changes 🏗️

* Add an additional query to sum the remaining un-snapshotted balance
(if any).
* Monthly top-up transaction set the amount target_amount -
current_balance instead of fixed target_amount.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-24 14:43:43 +00:00
dependabot[bot]
56330b1dd3 chore(backend/deps-dev): bump the development-dependencies group across 1 directory with 5 updates (#9300)
Bumps the development-dependencies group with 5 updates in the
/autogpt_platform/backend directory:

| Package | From | To |
| --- | --- | --- |
| [poethepoet](https://github.com/nat-n/poethepoet) | `0.31.0` |
`0.32.1` |
| [ruff](https://github.com/astral-sh/ruff) | `0.8.3` | `0.9.2` |
| [pyright](https://github.com/RobertCraigie/pyright-python) | `1.1.389`
| `1.1.392.post0` |
| [aiohappyeyeballs](https://github.com/aio-libs/aiohappyeyeballs) |
`2.4.3` | `2.4.4` |
| [faker](https://github.com/joke2k/faker) | `33.1.0` | `33.3.1` |


Updates `poethepoet` from 0.31.0 to 0.32.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nat-n/poethepoet/releases">poethepoet's
releases</a>.</em></p>
<blockquote>
<h2>v0.32.1</h2>
<h2>Enhancements</h2>
<ul>
<li>feat: Upgrade poetry dependency to make the poetry plugin work with
poetry 2.0 by <a
href="https://github.com/nat-n"><code>@​nat-n</code></a> in <a
href="https://redirect.github.com/nat-n/poethepoet/pull/269">nat-n/poethepoet#269</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nat-n/poethepoet/compare/v0.32.0...v0.32.1">https://github.com/nat-n/poethepoet/compare/v0.32.0...v0.32.1</a></p>
<h2>0.32.0</h2>
<h2>Enhancements</h2>
<ul>
<li>
<p>Make command parsing support <em>default value</em> and <em>alternate
value</em> operations on param expansions by <a
href="https://github.com/nat-n"><code>@​nat-n</code></a> in <a
href="https://redirect.github.com/nat-n/poethepoet/pull/266">nat-n/poethepoet#266</a></p>
<ul>
<li>See feature <a
href="https://poethepoet.natn.io/tasks/task_types/cmd.html#parameter-expansion-operators">📖
documentation</a> for more details</li>
</ul>
</li>
<li>
<p>Explicitly disallow <code>capture_stdout</code> option on sequence
tasks by <a href="https://github.com/nat-n"><code>@​nat-n</code></a> in
<a
href="https://redirect.github.com/nat-n/poethepoet/pull/265">nat-n/poethepoet#265</a></p>
</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nat-n/poethepoet/compare/v0.31.1...v0.32.0">https://github.com/nat-n/poethepoet/compare/v0.31.1...v0.32.0</a></p>
<h2>0.31.1</h2>
<h2>Fixes</h2>
<ul>
<li>fix: Explicitly disallow capture_stdout option on sequence tasks by
<a href="https://github.com/nat-n"><code>@​nat-n</code></a> in <a
href="https://redirect.github.com/nat-n/poethepoet/pull/261">nat-n/poethepoet#261</a></li>
<li>fix: Allow env var defaults in included task files by <a
href="https://github.com/nat-n"><code>@​nat-n</code></a> in <a
href="https://redirect.github.com/nat-n/poethepoet/pull/263">nat-n/poethepoet#263</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nat-n/poethepoet/compare/v0.31.0...v0.31.1">https://github.com/nat-n/poethepoet/compare/v0.31.0...v0.31.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9997e878d4"><code>9997e87</code></a>
Bump version to 0.32.1</li>
<li><a
href="d2fa221f57"><code>d2fa221</code></a>
feat: Upgrade poetry dependency to work with 2.0 (<a
href="https://redirect.github.com/nat-n/poethepoet/issues/269">#269</a>)</li>
<li><a
href="0133c42752"><code>0133c42</code></a>
Fix docs publishing workflow</li>
<li><a
href="f199b1135d"><code>f199b11</code></a>
Bump version to 0.32.0</li>
<li><a
href="a72a19378f"><code>a72a193</code></a>
Remove dev dependency on bpython</li>
<li><a
href="68e9e9ba1a"><code>68e9e9b</code></a>
Make command parsing support operations on param expansions (<a
href="https://redirect.github.com/nat-n/poethepoet/issues/266">#266</a>)</li>
<li><a
href="eecbb96e09"><code>eecbb96</code></a>
feat: Explicitly disallow capture_stdout option on sequence tasks (<a
href="https://redirect.github.com/nat-n/poethepoet/issues/265">#265</a>)</li>
<li><a
href="3884fcd240"><code>3884fcd</code></a>
fix: Run CI on pushing a version tag</li>
<li><a
href="525a1ebcac"><code>525a1eb</code></a>
docs: Document compatibility with uv projects</li>
<li><a
href="03546b7af7"><code>03546b7</code></a>
Bump version to 0.31.1</li>
<li>Additional commits viewable in <a
href="https://github.com/nat-n/poethepoet/compare/v0.31.0...v0.32.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `ruff` from 0.8.3 to 0.9.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.9.2</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Fix typo &quot;security_managr&quot; to
&quot;security_manager&quot; (<code>AIR303</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15463">#15463</a>)</li>
<li>[<code>airflow</code>] extend and fix AIR302 rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15525">#15525</a>)</li>
<li>[<code>fastapi</code>] Handle parameters with <code>Depends</code>
correctly (<code>FAST003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15364">#15364</a>)</li>
<li>[<code>flake8-pytest-style</code>] Implement pytest.warns
diagnostics (<code>PT029</code>, <code>PT030</code>, <code>PT031</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15444">#15444</a>)</li>
<li>[<code>flake8-pytest-style</code>] Test function parameters with
default arguments (<code>PT028</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15449">#15449</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid false positives for
<code>|</code> in <code>TC008</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15201">#15201</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-todos</code>] Allow VSCode GitHub PR extension style
links in <code>missing-todo-link</code> (<code>TD003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15519">#15519</a>)</li>
<li>[<code>pyflakes</code>] Show syntax error message for
<code>F722</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15523">#15523</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix curly bracket spacing around f-string expressions containing
curly braces (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15471">#15471</a>)</li>
<li>Fix joining of f-strings with different quotes when using quote
style <code>Preserve</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15524">#15524</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Avoid indexing the same workspace multiple times (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15495">#15495</a>)</li>
<li>Display context for <code>ruff.configuration</code> errors (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15452">#15452</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Remove <code>flatten</code> to improve deserialization error
messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15414">#15414</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Parse triple-quoted string annotations as if parenthesized (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15387">#15387</a>)</li>
<li>[<code>fastapi</code>] Update <code>Annotated</code> fixes
(<code>FAST002</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15462">#15462</a>)</li>
<li>[<code>flake8-bandit</code>] Check for <code>builtins</code> instead
of <code>builtin</code> (<code>S102</code>, <code>PTH123</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15443">#15443</a>)</li>
<li>[<code>flake8-pathlib</code>] Fix <code>--select</code> for
<code>os-path-dirname</code> (<code>PTH120</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15446">#15446</a>)</li>
<li>[<code>ruff</code>] Fix false positive on global keyword
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15235">#15235</a>)</li>
</ul>
<h2>Contributors</h2>
<ul>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/BurntSushi"><code>@​BurntSushi</code></a></li>
<li><a
href="https://github.com/Daverball"><code>@​Daverball</code></a></li>
<li><a
href="https://github.com/Garrett-R"><code>@​Garrett-R</code></a></li>
<li><a
href="https://github.com/Glyphack"><code>@​Glyphack</code></a></li>
<li><a
href="https://github.com/InSyncWithFoo"><code>@​InSyncWithFoo</code></a></li>
<li><a href="https://github.com/Lee-W"><code>@​Lee-W</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/cake-monotone"><code>@​cake-monotone</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.9.2</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Fix typo &quot;security_managr&quot; to
&quot;security_manager&quot; (<code>AIR303</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15463">#15463</a>)</li>
<li>[<code>airflow</code>] extend and fix AIR302 rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15525">#15525</a>)</li>
<li>[<code>fastapi</code>] Handle parameters with <code>Depends</code>
correctly (<code>FAST003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15364">#15364</a>)</li>
<li>[<code>flake8-pytest-style</code>] Implement pytest.warns
diagnostics (<code>PT029</code>, <code>PT030</code>, <code>PT031</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15444">#15444</a>)</li>
<li>[<code>flake8-pytest-style</code>] Test function parameters with
default arguments (<code>PT028</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15449">#15449</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid false positives for
<code>|</code> in <code>TC008</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15201">#15201</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-todos</code>] Allow VSCode GitHub PR extension style
links in <code>missing-todo-link</code> (<code>TD003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15519">#15519</a>)</li>
<li>[<code>pyflakes</code>] Show syntax error message for
<code>F722</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15523">#15523</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix curly bracket spacing around f-string expressions containing
curly braces (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15471">#15471</a>)</li>
<li>Fix joining of f-strings with different quotes when using quote
style <code>Preserve</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15524">#15524</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Avoid indexing the same workspace multiple times (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15495">#15495</a>)</li>
<li>Display context for <code>ruff.configuration</code> errors (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15452">#15452</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Remove <code>flatten</code> to improve deserialization error
messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15414">#15414</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Parse triple-quoted string annotations as if parenthesized (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15387">#15387</a>)</li>
<li>[<code>fastapi</code>] Update <code>Annotated</code> fixes
(<code>FAST002</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15462">#15462</a>)</li>
<li>[<code>flake8-bandit</code>] Check for <code>builtins</code> instead
of <code>builtin</code> (<code>S102</code>, <code>PTH123</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15443">#15443</a>)</li>
<li>[<code>flake8-pathlib</code>] Fix <code>--select</code> for
<code>os-path-dirname</code> (<code>PTH120</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15446">#15446</a>)</li>
<li>[<code>ruff</code>] Fix false positive on global keyword
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15235">#15235</a>)</li>
</ul>
<h2>0.9.1</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>pycodestyle</code>] Run
<code>too-many-newlines-at-end-of-file</code> on each cell in notebooks
(<code>W391</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15308">#15308</a>)</li>
<li>[<code>ruff</code>] Omit diagnostic for shadowed private function
parameters in <code>used-dummy-variable</code> (<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15376">#15376</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Improve
<code>assert-raises-exception</code> message (<code>B017</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15389">#15389</a>)</li>
</ul>
<h3>Formatter</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0a39348381"><code>0a39348</code></a>
Include build binaries</li>
<li><a
href="027f8009e5"><code>027f800</code></a>
Comment out non-npm-publish jobs</li>
<li><a
href="425870df76"><code>425870d</code></a>
Upload npm publish logs when failed</li>
<li><a
href="c20255abe4"><code>c20255a</code></a>
Bump version to 0.9.2 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15529">#15529</a>)</li>
<li><a
href="420365811f"><code>4203658</code></a>
Fix joining of f-strings with different quotes when using quote style
`Preser...</li>
<li><a
href="fc9dd63d64"><code>fc9dd63</code></a>
[airflow] extend and fix AIR302 rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15525">#15525</a>)</li>
<li><a
href="79e52c7fdf"><code>79e52c7</code></a>
[<code>pyflakes</code>] Show syntax error message for <code>F722</code>
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/15523">#15523</a>)</li>
<li><a
href="cf4ab7cba1"><code>cf4ab7c</code></a>
Parse triple quoted string annotations as if parenthesized (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15387">#15387</a>)</li>
<li><a
href="d2656e88a3"><code>d2656e8</code></a>
[<code>flake8-todos</code>] Allow VSCode GitHub PR extension style links
in `missing-tod...</li>
<li><a
href="c53ee608a1"><code>c53ee60</code></a>
Typeshed-sync workflow: add appropriate labels, link directly to failing
run ...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.8.3...0.9.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `pyright` from 1.1.389 to 1.1.392.post0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="33dece9ee3"><code>33dece9</code></a>
chore: release v1.1.392.post0 (<a
href="https://redirect.github.com/RobertCraigie/pyright-python/issues/331">#331</a>)</li>
<li><a
href="f15e56f25d"><code>f15e56f</code></a>
feat: bundle pyright inside wheel (<a
href="https://redirect.github.com/RobertCraigie/pyright-python/issues/300">#300</a>)</li>
<li><a
href="f5c77313ff"><code>f5c7731</code></a>
[pyright updated to 1.1.392] Update Version (<a
href="https://redirect.github.com/RobertCraigie/pyright-python/issues/329">#329</a>)</li>
<li><a
href="08b251cffc"><code>08b251c</code></a>
CI: lower ubunutu version + bump macos + node 18 (<a
href="https://redirect.github.com/RobertCraigie/pyright-python/issues/330">#330</a>)</li>
<li><a
href="3356df1d40"><code>3356df1</code></a>
[pyright updated to 1.1.391] Update Version (<a
href="https://redirect.github.com/RobertCraigie/pyright-python/issues/327">#327</a>)</li>
<li><a
href="ee025bc694"><code>ee025bc</code></a>
Pyright NPM Package update to 1.1.390 (<a
href="https://redirect.github.com/RobertCraigie/pyright-python/issues/325">#325</a>)</li>
<li>See full diff in <a
href="https://github.com/RobertCraigie/pyright-python/compare/v1.1.389...v1.1.392.post0">compare
view</a></li>
</ul>
</details>
<br />

Updates `aiohappyeyeballs` from 2.4.3 to 2.4.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohappyeyeballs/releases">aiohappyeyeballs's
releases</a>.</em></p>
<blockquote>
<h1>v2.4.4 (2024-11-30)</h1>
<h2>Fix</h2>
<ul>
<li>fix: handle OSError on failure to close socket instead of raising
IndexError (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/114">#114</a>)</li>
</ul>
<p>Co-authored-by: pre-commit-ci[bot] &lt;66853113+pre-commit-ci[bot]<a
href="https://github.com/users"><code>@​users</code></a>.noreply.github.com&gt;
Co-authored-by: J. Nick Koston &lt;<a
href="mailto:nick@koston.org">nick@koston.org</a>&gt; (<a
href="c542f684d3"><code>c542f68</code></a>)</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohappyeyeballs/blob/main/CHANGELOG.md">aiohappyeyeballs's
changelog</a>.</em></p>
<blockquote>
<h2>v2.4.4 (2024-11-30)</h2>
<h3>Fix</h3>
<ul>
<li>Handle oserror on failure to close socket instead of raising
indexerror (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/114">#114</a>)
(<a
href="c542f684d3"><code>c542f68</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3c4f2a6892"><code>3c4f2a6</code></a>
2.4.4</li>
<li><a
href="c542f684d3"><code>c542f68</code></a>
fix: handle OSError on failure to close socket instead of raising
IndexError ...</li>
<li><a
href="fd90f564d5"><code>fd90f56</code></a>
chore(pre-commit.ci): pre-commit autoupdate (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/116">#116</a>)</li>
<li><a
href="0653807446"><code>0653807</code></a>
chore: bump codecov-action to 5.0.3 (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/115">#115</a>)</li>
<li><a
href="90e01edddd"><code>90e01ed</code></a>
chore(pre-commit.ci): pre-commit autoupdate (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/113">#113</a>)</li>
<li><a
href="31825f2a3c"><code>31825f2</code></a>
chore(pre-commit.ci): pre-commit autoupdate (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/111">#111</a>)</li>
<li><a
href="4c23bcad40"><code>4c23bca</code></a>
chore: add missing FUNDING.yml (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/110">#110</a>)</li>
<li><a
href="b5dfff592e"><code>b5dfff5</code></a>
chore(pre-commit.ci): pre-commit autoupdate (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/108">#108</a>)</li>
<li><a
href="5a3b4cb871"><code>5a3b4cb</code></a>
chore: fix docs (<a
href="https://redirect.github.com/aio-libs/aiohappyeyeballs/issues/106">#106</a>)</li>
<li>See full diff in <a
href="https://github.com/aio-libs/aiohappyeyeballs/compare/v2.4.3...v2.4.4">compare
view</a></li>
</ul>
</details>
<br />

Updates `faker` from 33.1.0 to 33.3.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/joke2k/faker/releases">faker's
releases</a>.</em></p>
<blockquote>
<h2>Release v33.3.1</h2>
<p>See <a
href="https://github.com/joke2k/faker/blob/refs/tags/v33.3.1/CHANGELOG.md">CHANGELOG.md</a>.</p>
<h2>Release v33.3.0</h2>
<p>See <a
href="https://github.com/joke2k/faker/blob/refs/tags/v33.3.0/CHANGELOG.md">CHANGELOG.md</a>.</p>
<h2>Release v33.2.0</h2>
<p>See <a
href="https://github.com/joke2k/faker/blob/refs/tags/v33.2.0/CHANGELOG.md">CHANGELOG.md</a>.</p>
<h2>Release v33.1.3</h2>
<p>See <a
href="https://github.com/joke2k/faker/blob/refs/tags/v33.1.3/CHANGELOG.md">CHANGELOG.md</a>.</p>
<h2>Release v33.1.2</h2>
<p>See <a
href="https://github.com/joke2k/faker/blob/refs/tags/v33.1.2/CHANGELOG.md">CHANGELOG.md</a>.</p>
<h2>Release v33.1.1</h2>
<p>See <a
href="https://github.com/joke2k/faker/blob/refs/tags/v33.1.1/CHANGELOG.md">CHANGELOG.md</a>.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/joke2k/faker/blob/master/CHANGELOG.md">faker's
changelog</a>.</em></p>
<blockquote>
<h3><a
href="https://github.com/joke2k/faker/compare/v33.3.0...v33.3.1">v33.3.1
- 2025-01-10</a></h3>
<ul>
<li>Fix <code>nl_BE</code> Bank Provider (BBAN, IBAN, SWIFT). Thanks <a
href="https://github.com/AliYmn"><code>@​AliYmn</code></a>.</li>
</ul>
<h3><a
href="https://github.com/joke2k/faker/compare/v33.2.3...v33.3.0">v33.3.0
- 2025-01-03</a></h3>
<ul>
<li>Add support for Zulu (<code>zu_ZA</code>) address provider and
corresponding tests. Thanks <a
href="https://github.com/AliYmn"><code>@​AliYmn</code></a>.</li>
</ul>
<h3><a
href="https://github.com/joke2k/faker/compare/v33.1.3...v33.2.0">v33.2.0
- 2025-01-03</a></h3>
<ul>
<li>Add currency provider for <code>uk_UA</code>. Thanks <a
href="https://github.com/SaulTigh"><code>@​SaulTigh</code></a>.</li>
</ul>
<h3><a
href="https://github.com/joke2k/faker/compare/v33.1.2...v33.1.3">v33.1.3
- 2025-01-03</a></h3>
<ul>
<li>Fix type annotation on Python 3.8.</li>
</ul>
<h3><a
href="https://github.com/joke2k/faker/compare/v33.1.1...v33.1.2">v33.1.2
- 2025-01-03</a></h3>
<ul>
<li>Fix <code>ru_RU</code> passport provider. Thanks <a
href="https://github.com/denisSurkov"><code>@​denisSurkov</code></a>.</li>
</ul>
<h3><a
href="https://github.com/joke2k/faker/compare/v33.1.0...v33.1.1">v33.1.1
- 2025-01-03</a></h3>
<ul>
<li>Fix address number output issue in <code>ko_KR</code> address
provider. Thanks <a
href="https://github.com/semi-yu"><code>@​semi-yu</code></a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bbcab85add"><code>bbcab85</code></a>
Bump version: 33.3.0 → 33.3.1</li>
<li><a
href="9130687455"><code>9130687</code></a>
📝 Update CHANGELOG.md</li>
<li><a
href="f4ad7754ea"><code>f4ad775</code></a>
Fix <code>nl_BE</code> Bank Provider (BBAN, IBAN, SWIFT) (<a
href="https://redirect.github.com/joke2k/faker/issues/2142">#2142</a>)</li>
<li><a
href="a21084461e"><code>a210844</code></a>
Bump version: 33.2.0 → 33.3.0</li>
<li><a
href="8ec1609428"><code>8ec1609</code></a>
📝 Update CHANGELOG.md</li>
<li><a
href="4e2839e93b"><code>4e2839e</code></a>
fix administrative units un <code>zu_ZA</code> address provider</li>
<li><a
href="d9d70c4602"><code>d9d70c4</code></a>
Add support for Zulu (<code>zu_ZA</code>) address provider and
corresponding tests (<a
href="https://redirect.github.com/joke2k/faker/issues/2143">#2143</a>)</li>
<li><a
href="858e31f94e"><code>858e31f</code></a>
Bump version: 33.1.3 → 33.2.0</li>
<li><a
href="27a7005ef4"><code>27a7005</code></a>
📝 Update CHANGELOG.md</li>
<li><a
href="d72db5473c"><code>d72db54</code></a>
feat: add currency provider for <code>uk_UA</code> (<a
href="https://redirect.github.com/joke2k/faker/issues/2141">#2141</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/joke2k/faker/compare/v33.1.0...v33.3.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-24 14:28:43 +00:00
Zamil Majdy
a584f1fdd2 feat(backend): Minimize the non caught error logic between graph exec creation and queueing (#9306)
There should be no possibly failing code between graph exec creation and
the actual queueing.
It could risk the graph execution being stuck on the QUEUED status.

### Changes 🏗️

Moved the node exec creation and status update to be inside the graph
execution logic.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-24 13:52:42 +00:00
Reinier van der Leer
da7aead361 fix(frontend): Fix page layouts (sizing + padding) (#9311)
- Resolves #9310

### Changes 🏗️

- Make base layout full width and fix its sizing behavior
  - Fix navbar overflowing on the right
- Set padding on `/monitoring`
- Make `/login` and `/signup` layouts self-center

### 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:
  - Check layouts of all pages
    - `/signup`
    - `/login`
    - `/build`
    - `/monitoring`
    - `/store`
    - `/store/profile`
    - `/store/dashboard`
    - `/store/settings`

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-24 13:17:46 +00:00
dependabot[bot]
5383e8ba27 chore(libs/deps-dev): bump ruff from 0.8.6 to 0.9.2 in /autogpt_platform/autogpt_libs in the development-dependencies group across 1 directory (#9299)
Bumps the development-dependencies group with 1 update in the
/autogpt_platform/autogpt_libs directory:
[ruff](https://github.com/astral-sh/ruff).

Updates `ruff` from 0.8.6 to 0.9.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.9.2</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Fix typo &quot;security_managr&quot; to
&quot;security_manager&quot; (<code>AIR303</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15463">#15463</a>)</li>
<li>[<code>airflow</code>] extend and fix AIR302 rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15525">#15525</a>)</li>
<li>[<code>fastapi</code>] Handle parameters with <code>Depends</code>
correctly (<code>FAST003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15364">#15364</a>)</li>
<li>[<code>flake8-pytest-style</code>] Implement pytest.warns
diagnostics (<code>PT029</code>, <code>PT030</code>, <code>PT031</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15444">#15444</a>)</li>
<li>[<code>flake8-pytest-style</code>] Test function parameters with
default arguments (<code>PT028</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15449">#15449</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid false positives for
<code>|</code> in <code>TC008</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15201">#15201</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-todos</code>] Allow VSCode GitHub PR extension style
links in <code>missing-todo-link</code> (<code>TD003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15519">#15519</a>)</li>
<li>[<code>pyflakes</code>] Show syntax error message for
<code>F722</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15523">#15523</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix curly bracket spacing around f-string expressions containing
curly braces (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15471">#15471</a>)</li>
<li>Fix joining of f-strings with different quotes when using quote
style <code>Preserve</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15524">#15524</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Avoid indexing the same workspace multiple times (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15495">#15495</a>)</li>
<li>Display context for <code>ruff.configuration</code> errors (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15452">#15452</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Remove <code>flatten</code> to improve deserialization error
messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15414">#15414</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Parse triple-quoted string annotations as if parenthesized (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15387">#15387</a>)</li>
<li>[<code>fastapi</code>] Update <code>Annotated</code> fixes
(<code>FAST002</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15462">#15462</a>)</li>
<li>[<code>flake8-bandit</code>] Check for <code>builtins</code> instead
of <code>builtin</code> (<code>S102</code>, <code>PTH123</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15443">#15443</a>)</li>
<li>[<code>flake8-pathlib</code>] Fix <code>--select</code> for
<code>os-path-dirname</code> (<code>PTH120</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15446">#15446</a>)</li>
<li>[<code>ruff</code>] Fix false positive on global keyword
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15235">#15235</a>)</li>
</ul>
<h2>Contributors</h2>
<ul>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/BurntSushi"><code>@​BurntSushi</code></a></li>
<li><a
href="https://github.com/Daverball"><code>@​Daverball</code></a></li>
<li><a
href="https://github.com/Garrett-R"><code>@​Garrett-R</code></a></li>
<li><a
href="https://github.com/Glyphack"><code>@​Glyphack</code></a></li>
<li><a
href="https://github.com/InSyncWithFoo"><code>@​InSyncWithFoo</code></a></li>
<li><a href="https://github.com/Lee-W"><code>@​Lee-W</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/cake-monotone"><code>@​cake-monotone</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.9.2</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Fix typo &quot;security_managr&quot; to
&quot;security_manager&quot; (<code>AIR303</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15463">#15463</a>)</li>
<li>[<code>airflow</code>] extend and fix AIR302 rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15525">#15525</a>)</li>
<li>[<code>fastapi</code>] Handle parameters with <code>Depends</code>
correctly (<code>FAST003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15364">#15364</a>)</li>
<li>[<code>flake8-pytest-style</code>] Implement pytest.warns
diagnostics (<code>PT029</code>, <code>PT030</code>, <code>PT031</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/15444">#15444</a>)</li>
<li>[<code>flake8-pytest-style</code>] Test function parameters with
default arguments (<code>PT028</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15449">#15449</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid false positives for
<code>|</code> in <code>TC008</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15201">#15201</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-todos</code>] Allow VSCode GitHub PR extension style
links in <code>missing-todo-link</code> (<code>TD003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15519">#15519</a>)</li>
<li>[<code>pyflakes</code>] Show syntax error message for
<code>F722</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15523">#15523</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix curly bracket spacing around f-string expressions containing
curly braces (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15471">#15471</a>)</li>
<li>Fix joining of f-strings with different quotes when using quote
style <code>Preserve</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15524">#15524</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Avoid indexing the same workspace multiple times (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15495">#15495</a>)</li>
<li>Display context for <code>ruff.configuration</code> errors (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15452">#15452</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Remove <code>flatten</code> to improve deserialization error
messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15414">#15414</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Parse triple-quoted string annotations as if parenthesized (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15387">#15387</a>)</li>
<li>[<code>fastapi</code>] Update <code>Annotated</code> fixes
(<code>FAST002</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15462">#15462</a>)</li>
<li>[<code>flake8-bandit</code>] Check for <code>builtins</code> instead
of <code>builtin</code> (<code>S102</code>, <code>PTH123</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15443">#15443</a>)</li>
<li>[<code>flake8-pathlib</code>] Fix <code>--select</code> for
<code>os-path-dirname</code> (<code>PTH120</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15446">#15446</a>)</li>
<li>[<code>ruff</code>] Fix false positive on global keyword
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15235">#15235</a>)</li>
</ul>
<h2>0.9.1</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>pycodestyle</code>] Run
<code>too-many-newlines-at-end-of-file</code> on each cell in notebooks
(<code>W391</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15308">#15308</a>)</li>
<li>[<code>ruff</code>] Omit diagnostic for shadowed private function
parameters in <code>used-dummy-variable</code> (<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15376">#15376</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Improve
<code>assert-raises-exception</code> message (<code>B017</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15389">#15389</a>)</li>
</ul>
<h3>Formatter</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0a39348381"><code>0a39348</code></a>
Include build binaries</li>
<li><a
href="027f8009e5"><code>027f800</code></a>
Comment out non-npm-publish jobs</li>
<li><a
href="425870df76"><code>425870d</code></a>
Upload npm publish logs when failed</li>
<li><a
href="c20255abe4"><code>c20255a</code></a>
Bump version to 0.9.2 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15529">#15529</a>)</li>
<li><a
href="420365811f"><code>4203658</code></a>
Fix joining of f-strings with different quotes when using quote style
`Preser...</li>
<li><a
href="fc9dd63d64"><code>fc9dd63</code></a>
[airflow] extend and fix AIR302 rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15525">#15525</a>)</li>
<li><a
href="79e52c7fdf"><code>79e52c7</code></a>
[<code>pyflakes</code>] Show syntax error message for <code>F722</code>
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/15523">#15523</a>)</li>
<li><a
href="cf4ab7cba1"><code>cf4ab7c</code></a>
Parse triple quoted string annotations as if parenthesized (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15387">#15387</a>)</li>
<li><a
href="d2656e88a3"><code>d2656e8</code></a>
[<code>flake8-todos</code>] Allow VSCode GitHub PR extension style links
in `missing-tod...</li>
<li><a
href="c53ee608a1"><code>c53ee60</code></a>
Typeshed-sync workflow: add appropriate labels, link directly to failing
run ...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.8.6...0.9.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.8.6&new-version=0.9.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 09:17:48 +00:00
Krzysztof Czerwinski
800625c952 fix(frontend): Change /store* url to /marketplace* (#9119)
We have branded it as "Marketplace", so the URL shouldn't be "store".

### Changes 🏗️

- Change frontend URLs from `/store*` to `/marketplace*`
- No API route changes to minimize bugs (follow up:
https://github.com/Significant-Gravitas/AutoGPT/issues/9118)
2025-01-18 17:49:41 +01:00
Nicholas Tindle
56612f16cf feat(platform): Linear integration (#9269)
<!-- Clearly explain the need for these changes: -->

I want to be able to do stuff with linear automatically

### Changes 🏗️
- Adds all the backing details to add linear auth and API access with
oauth (and prep for API key)

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-01-17 13:35:58 +00:00
Reinier van der Leer
0d2bb46786 fix(frontend): Unbreak save button after save error (#9290)
- Resolves #9253

### Changes 🏗️

- Update state when an error occurs on save, to re-enable the save
button

### 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:
- Try to save an agent with missing required fields -> should give an
error
  - Fill out the required fields and try saving again -> should work
2025-01-17 13:29:43 +00:00
Aarushi
c61317e448 feat(platform): Create external API (#9272)
We want to allow external api calls against our platform
We also want to keep it sep from internal platform calls for dev ex,
security and scale seperation of concerns

### Changes 🏗️

This PR adds the required external routes
It mounts the new routes on the same app 

Infra PR will seprate routing and domains

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-17 11:44:04 +00:00
Bently
3c30783b14 docs(Ollama): Remove steps about adding ollama credentials (#9288)
Since ["feat: no longer require ollama key
#9287"](https://github.com/Significant-Gravitas/AutoGPT/pull/9287) we no
longer need the steps for adding ollama credentials so this removes them
from the docs
2025-01-16 22:35:05 +00:00
Zamil Majdy
56b33327ab feat(platform): Add billing portal entry point (#9264)
<img width="1445" alt="image"
src="https://github.com/user-attachments/assets/5aeb7ee2-4d06-4a64-889b-599ad68c6dae"
/>


### Changes 🏗️

Added an entry point to open the Stripe billing portal.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Krzysztof Czerwinski <kpczerwinski@gmail.com>
2025-01-16 21:00:15 +00:00
Zamil Majdy
c36c239dd5 feat(backend): Add graph/node id & execution id on CreditTransaction table (#9217)
We need to be able to determine the cost of graph/node execution.

### Changes 🏗️

* Add these columns into CreditTransaction `metadata` column:
    - graph_id
    - node_id
    - graph_exec_id
    - node_exec_id
    - block_id
* Drop the `blockId` column and backfill the dropped value into
metadata->>block_id.
* Frequent queries on these values will require an index created on
demand through a migration, depending on the use case.

---------

Co-authored-by: Krzysztof Czerwinski <kpczerwinski@gmail.com>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-01-16 20:59:49 +00:00
Nicholas Tindle
e53f1eaf80 feat: no longer require ollama key (#9287)
<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-16 12:25:08 +00:00
Krzysztof Czerwinski
04915f2db0 feat(platform): Implement top-up flow for PAYG System (#9050)
This PR adds Stripe integration and payment processing for topping-up
user accounts with credits.

### Changes 🏗️

Includes:
- https://github.com/Significant-Gravitas/AutoGPT/pull/9176

#### Top-up flow

1. To top-up a user visits their settings and clicks `Credits` button
(it's unavailable if `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` isn't present)
2. User inputs top-up amount (min 5$ in 1$ increments) and click the
button to confirm.
3. Backend receives top-up request, creates database entry and requests
stripe to provide url for this specific checkout.
4. User gets redirected to externally hosted Stripe checkout page, after
payment (or cancelling) they get redirected back to Credits page.
5. In the meantime Stripe processes payment and sends webhook
confirmation to the backend, backend updates database to activate bought
credits.
6. Credits page shows success (or failure) information (by using url
param `topup=success|cancel`). Credit counter won't update without
refreshing the page unless payment was confirmed before user was back on
Credits page which is the case when testing checkout locally.

<img width="804" alt="Screenshot 2025-01-01 at 2 55 35 PM"
src="https://github.com/user-attachments/assets/22fb518d-b30b-4154-bb4b-edea1d57b6c2"
/>

#### Backend
- Add `stripe` package
- Add environment variables:
  - `STRIPE_API_KEY`
  - `STRIPE_WEBHOOK_SECRET`
- Add routes:
  - `POST /credits`: top-up request, returns Stripe checkout url.
- `POST /credits/stripe_webhook`: Stripe webhook endpoint to notify of
successful payment.
- `PATCH /credits`: prompts beckend to check payment status. It's an
additional failsafe in case webhook fails.
- Update `credit.py` and related files to handle top-up request and
payment confirmation

#### Frontend
- Add `stripe-js` package
- Add `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` environment variable
- Modify user settings sidebar to show `Credits` if
`NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` is available
- Add `store/credits` page where user can top-up their account, it shows
confirmation (or failure) after completing checkout.
- Add `useCredits` hook that returns user credits and allows to request
top-up.

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [x] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-15 23:46:52 +00:00
Nicholas Tindle
9d79bfadea [Snyk] Security upgrade next from 14.2.20 to 14.2.21 (#9243)
![snyk-top-banner](https://redirect.github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)

### 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`
- `autogpt_platform/frontend/yarn.lock`


#### 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.




#### Vulnerabilities that will be fixed with an upgrade:

|  | Issue |  
:-------------------------:|:-------------------------
![medium
severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png
'medium severity') | Allocation of Resources Without Limits or
Throttling
<br/>[SNYK-JS-NEXT-8602067](https://snyk.io/vuln/SNYK-JS-NEXT-8602067)




---

> [!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=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI4NWY3NDgyYy03NGFiLTQxNmYtYjQ4OC0wMTUwMDlmYzY5NzkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6Ijg1Zjc0ODJjLTc0YWItNDE2Zi1iNDg4LTAxNTAwOWZjNjk3OSJ9fQ=="
width="0" height="0"/>
🧐 [View latest project
report](https://app.snyk.io/org/significant-gravitas/project/3d924968-0cf3-4767-9609-501fa4962856?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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:**

🦉 [Allocation of Resources Without Limits or
Throttling](https://learn.snyk.io/lesson/no-rate-limiting/?loc&#x3D;fix-pr)

[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"next","from":"14.2.20","to":"14.2.21"}],"env":"prod","issuesToFix":["SNYK-JS-NEXT-8602067"],"prId":"85f7482c-74ab-416f-b488-015009fc6979","prPublicId":"85f7482c-74ab-416f-b488-015009fc6979","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"],"type":"auto","upgrade":["SNYK-JS-NEXT-8602067"],"vulns":["SNYK-JS-NEXT-8602067"],"patch":[],"isBreakingChange":false,"remediationStrategy":"vuln"}'

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2025-01-15 18:11:13 +00:00
Nicholas Tindle
5f50c4863d test(frontend): Re-enable the tests in monitor.spec.ts and then ensure they pass (#9248)
Enable the tests in `monitor.spec.ts`.

* Remove `test.describe.skip` to enable the tests.
* Ensure the tests are now running and passing successfully.

---

For more details, open the [Copilot Workspace
session](https://copilot-workspace.githubnext.com/Significant-Gravitas/AutoGPT/pull/9248?shareId=edbd64cc-ea19-477b-be06-5eea84c28665).
2025-01-15 09:41:41 +00:00
Aarushi
fe84cbe566 Revert "feature(backend): Add ability to execute store agents without agent ownership" (#9263)
Reverts Significant-Gravitas/AutoGPT#9179

This PR is preventing the running of agents in dev.
2025-01-13 18:34:17 +00:00
Aarushi
5618072375 fix(blocks/Exa): Fix exa contents block advanced toggle (#9255)
Toggling the advanced option on Exa Contents Block isn't working. It
throws a frontend error.

### Changes 🏗️

Remove Optional from ContentRetrievalSettings in exa/contents.py

### 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: -->
  - Add an ExaContentsBlock
  - Hit advanced


#### For configuration changes:
N/A
2025-01-13 16:35:14 +00:00
Reinier van der Leer
95b79abcfe Revert broken Library v2 DB stuff of #9218, #9211 (#9256)
- **Revert "feature(platform): Implement library add, update, remove,
archive functionality (#9218)"**
- **Revert "feat(backend): Add Support for Managing Agent Presets with
Pagination and Soft Delete (#9211)"**

These PRs contain untested changes to DB functions and cause issues in
production.
2025-01-13 16:08:58 +01:00
Swifty
fd6f28fa57 feature(platform): Implement library add, update, remove, archive functionality (#9218)
### Changes 🏗️

1. **Core Features**:
   - Add agents to the user's library.
   - Update library agents (auto-update, favorite, archive, delete).
   - Paginate library agents and presets.
   - Execute graphs using presets.

2. **Refactoring**:
   - Replaced `UserAgent` with `LibraryAgent`.
   - Separated routes for agents and presets.

3. **Schema Changes**:
- Added `LibraryAgent` table with fields like `isArchived`, `isDeleted`,
etc.
   - Soft delete functionality for `AgentPreset`.

4. **Testing**:
   - Updated tests for `LibraryAgent` operations.
   - Added edge case tests for deletion, archiving, and pagination.

5. **Database Migrations**:
   - Migration to drop `UserAgent` and add `LibraryAgent`.
   - Added fields for soft deletion and auto-update.


Note this includes the changes from the following PR's to avoid merge
conflicts with them:

#9179 
#9211

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-01-10 13:02:53 +01:00
Swifty
4b17cc9963 feat(backend): Add Support for Managing Agent Presets with Pagination and Soft Delete (#9211)
#### Summary
- **New Models**: Added `LibraryAgentPreset`,
`LibraryAgentPresetResponse`, `Pagination`, and
`CreateLibraryAgentPresetRequest`.
- **Database Changes**:
  - Added `isDeleted` column in `AgentPreset` for soft delete.
  - CRUD operations for `AgentPreset`:
    - `get_presets` with pagination.
    - `get_preset` by ID.
    - `create_or_update_preset` for upsert.
    - `delete_preset` to soft delete.
- **API Routes**:
  - `GET /presets`: Fetch paginated presets.
  - `GET /presets/{preset_id}`: Fetch a single preset.
  - `POST /presets`: Create a preset.
  - `PUT /presets/{preset_id}`: Update a preset.
  - `DELETE /presets/{preset_id}`: Soft delete a preset.
- **Tests**:
  - Coverage for models, CRUD operations, and pagination.
- **Migration**:
  - Added `isDeleted` field to support soft delete.

#### Review Notes
- Validate migration scripts and test coverage.
- Ensure API aligns with project standards.

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2025-01-10 12:57:35 +01:00
Swifty
00bb7c67b3 feature(backend): Add ability to execute store agents without agent ownership (#9179)
### Description

This PR enables the execution of store agents even if they are not owned
by the user. Key changes include handling store-listed agents in the
`get_graph` logic, improving execution flow, and ensuring
version-specific handling. These updates support more flexible agent
execution.

### Changes 🏗️

- **Graph Retrieval:** Updated `get_graph` to check store listings for
agents not owned by the user.
- **Version Handling:** Added `graph_version` to execution methods for
consistent version-specific execution.
- **Execution Flow:** Refactored `scheduler.py`, `rest_api.py`, and
other modules for clearer logic and better maintainability.
- **Testing:** Updated `test_manager.py` and other test cases to
validate execution of store-listed agents added test for accessing graph

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-10 12:39:06 +01:00
430 changed files with 33649 additions and 10997 deletions

18
.deepsource.toml Normal file
View File

@@ -0,0 +1,18 @@
version = 1
test_patterns = ["**/*.spec.ts","**/*_test.py","**/*_tests.py","**/test_*.py"]
exclude_patterns = ["classic/**"]
[[analyzers]]
name = "javascript"
[analyzers.meta]
plugins = ["react"]
environment = ["nodejs"]
[[analyzers]]
name = "python"
[analyzers.meta]
runtime_version = "3.x.x"

View File

@@ -115,6 +115,7 @@ jobs:
poetry run pytest -vv \
--cov=autogpt --cov-branch --cov-report term-missing --cov-report xml \
--numprocesses=logical --durations=10 \
--junitxml=junit.xml -o junit_family=legacy \
tests/unit tests/integration
env:
CI: true
@@ -124,8 +125,14 @@ jobs:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
- name: Upload test results to Codecov
if: ${{ !cancelled() }} # Run even if tests fail
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: autogpt-agent,${{ runner.os }}

View File

@@ -87,13 +87,20 @@ jobs:
poetry run pytest -vv \
--cov=agbenchmark --cov-branch --cov-report term-missing --cov-report xml \
--durations=10 \
--junitxml=junit.xml -o junit_family=legacy \
tests
env:
CI: true
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }} # Run even if tests fail
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: agbenchmark,${{ runner.os }}

View File

@@ -139,6 +139,7 @@ jobs:
poetry run pytest -vv \
--cov=forge --cov-branch --cov-report term-missing --cov-report xml \
--durations=10 \
--junitxml=junit.xml -o junit_family=legacy \
forge
env:
CI: true
@@ -148,8 +149,14 @@ jobs:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
- name: Upload test results to Codecov
if: ${{ !cancelled() }} # Run even if tests fail
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: forge,${{ runner.os }}

View File

@@ -42,6 +42,14 @@ jobs:
REDIS_PASSWORD: testpassword
ports:
- 6379:6379
rabbitmq:
image: rabbitmq:3.12-management
ports:
- 5672:5672
- 15672:15672
env:
RABBITMQ_DEFAULT_USER: ${{ env.RABBITMQ_DEFAULT_USER }}
RABBITMQ_DEFAULT_PASS: ${{ env.RABBITMQ_DEFAULT_PASS }}
steps:
- name: Checkout repository
@@ -139,6 +147,13 @@ jobs:
RUN_ENV: local
PORT: 8080
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# We know these are here, don't report this as a security vulnerability
# This is used as the default credential for the entire system's RabbitMQ instance
# If you want to replace this, you can do so by making our entire system generate
# new credentials for each local user and update the environment variables in
# the backend service, docker composes, and examples
RABBITMQ_DEFAULT_USER: 'rabbitmq_user_default'
RABBITMQ_DEFAULT_PASS: 'k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7'
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v4

View File

@@ -37,6 +37,25 @@ jobs:
run: |
yarn lint
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "21"
- name: Install dependencies
run: |
yarn install --frozen-lockfile
- name: Run tsc check
run: |
yarn type-check
test:
runs-on: ubuntu-latest
strategy:
@@ -58,8 +77,8 @@ jobs:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false # slow
docker-images: false # limited benefit
large-packages: false # slow
docker-images: false # limited benefit
- name: Copy default supabase .env
run: |
@@ -85,11 +104,12 @@ jobs:
run: yarn playwright install --with-deps ${{ matrix.browser }}
- name: Run tests
timeout-minutes: 20
run: |
yarn test --project=${{ matrix.browser }}
- name: Print Docker Compose logs in debug mode
if: runner.debug
- name: Print Final Docker Compose logs
if: always()
run: |
docker compose -f ../docker-compose.yml logs

View File

@@ -25,7 +25,7 @@ jobs:
close-issue-message: >
This issue was closed automatically because it has been stale for 10 days
with no activity.
days-before-stale: 50
days-before-stale: 100
days-before-close: 10
# Do not touch meta issues:
exempt-issue-labels: meta,fridge,project management

View File

@@ -170,6 +170,16 @@ repos:
files: ^classic/benchmark/(agbenchmark|tests)/((?!reports).)*[/.]
args: [--config=classic/benchmark/.flake8]
- repo: local
hooks:
- id: prettier
name: Format (Prettier) - AutoGPT Platform - Frontend
alias: format-platform-frontend
entry: bash -c 'cd autogpt_platform/frontend && npx prettier --write $(echo "$@" | sed "s|autogpt_platform/frontend/||g")' --
files: ^autogpt_platform/frontend/
types: [file]
language: system
- repo: local
# To have watertight type checking, we check *all* the files in an affected
# project. To trigger on poetry.lock we also reset the file `types` filter.
@@ -221,6 +231,16 @@ repos:
language: system
pass_filenames: false
- repo: local
hooks:
- id: tsc
name: Typecheck - AutoGPT Platform - Frontend
entry: bash -c 'cd autogpt_platform/frontend && npm run type-check'
files: ^autogpt_platform/frontend/
types: [file]
language: system
pass_filenames: false
- repo: local
hooks:
- id: pytest

View File

@@ -20,6 +20,7 @@ Instead, please report them via:
- Please provide detailed reports with reproducible steps
- Include the version/commit hash where you discovered the vulnerability
- Allow us a 90-day security fix window before any public disclosure
- After patch is released, allow 30 days for users to update before public disclosure (for a total of 120 days max between update time and fix time)
- Share any potential mitigations or workarounds if known
## Supported Versions

View File

@@ -22,7 +22,7 @@ To run the AutoGPT Platform, follow these steps:
2. Run the following command:
```
git submodule update --init --recursive
git submodule update --init --recursive --progress
```
This command will initialize and update the submodules in the repository. The `supabase` folder will be cloned to the root directory.

View File

@@ -1,7 +1,7 @@
from .config import Settings
from .depends import requires_admin_user, requires_user
from .jwt_utils import parse_jwt_token
from .middleware import auth_middleware
from .middleware import APIKeyValidator, auth_middleware
from .models import User
__all__ = [
@@ -9,6 +9,7 @@ __all__ = [
"parse_jwt_token",
"requires_user",
"requires_admin_user",
"APIKeyValidator",
"auth_middleware",
"User",
]

View File

@@ -1,7 +1,10 @@
import inspect
import logging
from typing import Any, Callable, Optional
from fastapi import HTTPException, Request
from fastapi.security import HTTPBearer
from fastapi import HTTPException, Request, Security
from fastapi.security import APIKeyHeader, HTTPBearer
from starlette.status import HTTP_401_UNAUTHORIZED
from .config import settings
from .jwt_utils import parse_jwt_token
@@ -29,3 +32,104 @@ async def auth_middleware(request: Request):
except ValueError as e:
raise HTTPException(status_code=401, detail=str(e))
return payload
class APIKeyValidator:
"""
Configurable API key validator that supports custom validation functions
for FastAPI applications.
This class provides a flexible way to implement API key authentication with optional
custom validation logic. It can be used for simple token matching
or more complex validation scenarios like database lookups.
Examples:
Simple token validation:
```python
validator = APIKeyValidator(
header_name="X-API-Key",
expected_token="your-secret-token"
)
@app.get("/protected", dependencies=[Depends(validator.get_dependency())])
def protected_endpoint():
return {"message": "Access granted"}
```
Custom validation with database lookup:
```python
async def validate_with_db(api_key: str):
api_key_obj = await db.get_api_key(api_key)
return api_key_obj if api_key_obj and api_key_obj.is_active else None
validator = APIKeyValidator(
header_name="X-API-Key",
validate_fn=validate_with_db
)
```
Args:
header_name (str): The name of the header containing the API key
expected_token (Optional[str]): The expected API key value for simple token matching
validate_fn (Optional[Callable]): Custom validation function that takes an API key
string and returns a boolean or object. Can be async.
error_status (int): HTTP status code to use for validation errors
error_message (str): Error message to return when validation fails
"""
def __init__(
self,
header_name: str,
expected_token: Optional[str] = None,
validate_fn: Optional[Callable[[str], bool]] = None,
error_status: int = HTTP_401_UNAUTHORIZED,
error_message: str = "Invalid API key",
):
# Create the APIKeyHeader as a class property
self.security_scheme = APIKeyHeader(name=header_name)
self.expected_token = expected_token
self.custom_validate_fn = validate_fn
self.error_status = error_status
self.error_message = error_message
async def default_validator(self, api_key: str) -> bool:
return api_key == self.expected_token
async def __call__(
self, request: Request, api_key: str = Security(APIKeyHeader)
) -> Any:
if api_key is None:
raise HTTPException(status_code=self.error_status, detail="Missing API key")
# Use custom validation if provided, otherwise use default equality check
validator = self.custom_validate_fn or self.default_validator
result = (
await validator(api_key)
if inspect.iscoroutinefunction(validator)
else validator(api_key)
)
if not result:
raise HTTPException(
status_code=self.error_status, detail=self.error_message
)
# Store validation result in request state if it's not just a boolean
if result is not True:
request.state.api_key = result
return result
def get_dependency(self):
"""
Returns a callable dependency that FastAPI will recognize as a security scheme
"""
async def validate_api_key(
request: Request, api_key: str = Security(self.security_scheme)
) -> Any:
return await self(request, api_key)
# This helps FastAPI recognize it as a security dependency
validate_api_key.__name__ = f"validate_{self.security_scheme.model.name}"
return validate_api_key

View File

@@ -13,7 +13,6 @@ from typing_extensions import ParamSpec
from .config import SETTINGS
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
P = ParamSpec("P")
T = TypeVar("T")

View File

@@ -18,7 +18,7 @@ ERROR_LOG_FILE = "error.log"
SIMPLE_LOG_FORMAT = "%(asctime)s %(levelname)s %(title)s%(message)s"
DEBUG_LOG_FORMAT = (
"%(asctime)s %(levelname)s %(filename)s:%(lineno)d" " %(title)s%(message)s"
"%(asctime)s %(levelname)s %(filename)s:%(lineno)d %(title)s%(message)s"
)

File diff suppressed because it is too large Load Diff

View File

@@ -9,19 +9,19 @@ packages = [{ include = "autogpt_libs" }]
[tool.poetry.dependencies]
colorama = "^0.4.6"
expiringdict = "^1.2.2"
google-cloud-logging = "^3.11.3"
pydantic = "^2.10.3"
pydantic-settings = "^2.7.0"
google-cloud-logging = "^3.11.4"
pydantic = "^2.10.6"
pydantic-settings = "^2.7.1"
pyjwt = "^2.10.1"
pytest-asyncio = "^0.25.0"
pytest-asyncio = "^0.25.3"
pytest-mock = "^3.14.0"
python = ">=3.10,<4.0"
python-dotenv = "^1.0.1"
supabase = "^2.10.0"
supabase = "^2.13.0"
[tool.poetry.group.dev.dependencies]
redis = "^5.2.1"
ruff = "^0.8.6"
ruff = "^0.9.6"
[build-system]
requires = ["poetry-core"]

View File

@@ -15,6 +15,9 @@ REDIS_PORT=6379
REDIS_PASSWORD=password
ENABLE_CREDIT=false
STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=
# What environment things should be logged under: local dev or prod
APP_ENV=local
# What environment to behave as: "local" or "cloud"
@@ -22,12 +25,26 @@ BEHAVE_AS=local
PYRO_HOST=localhost
SENTRY_DSN=
# Email For Postmark so we can send emails
POSTMARK_SERVER_API_TOKEN=
POSTMARK_SENDER_EMAIL=invalid@invalid.com
POSTMARK_WEBHOOK_TOKEN=
## User auth with Supabase is required for any of the 3rd party integrations with auth to work.
ENABLE_AUTH=true
SUPABASE_URL=http://localhost:8000
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q
SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long
# RabbitMQ credentials -- Used for communication between services
RABBITMQ_HOST=localhost
RABBITMQ_PORT=5672
RABBITMQ_DEFAULT_USER=rabbitmq_user_default
RABBITMQ_DEFAULT_PASS=k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7
## GCS bucket is required for marketplace and library functionality
MEDIA_GCS_BUCKET_NAME=
## For local development, you may need to set FRONTEND_BASE_URL for the OAuth flow
## for integrations to work. Defaults to the value of PLATFORM_BASE_URL if not set.
# FRONTEND_BASE_URL=http://localhost:3000
@@ -36,7 +53,7 @@ SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long
## to use the platform's webhook-related functionality.
## If you are developing locally, you can use something like ngrok to get a publc URL
## and tunnel it to your locally running backend.
PLATFORM_BASE_URL=https://your-public-url-here
PLATFORM_BASE_URL=http://localhost:3000
## == INTEGRATION CREDENTIALS == ##
# Each set of server side credentials is required for the corresponding 3rd party
@@ -72,6 +89,20 @@ GOOGLE_CLIENT_SECRET=
TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
# Linear App
# Make a new workspace for your OAuth APP -- trust me
# https://linear.app/settings/api/applications/new
# Callback URL: http://localhost:3000/auth/integrations/oauth_callback
LINEAR_CLIENT_ID=
LINEAR_CLIENT_SECRET=
# To obtain Todoist API credentials:
# 1. Create a Todoist account at todoist.com
# 2. Visit the Developer Console: https://developer.todoist.com/appconsole.html
# 3. Click "Create new app"
# 4. Once created, copy your Client ID and Client Secret below
TODOIST_CLIENT_ID=
TODOIST_CLIENT_SECRET=
## ===== OPTIONAL API KEYS ===== ##
@@ -82,10 +113,12 @@ GROQ_API_KEY=
OPEN_ROUTER_API_KEY=
# Reddit
# Go to https://www.reddit.com/prefs/apps and create a new app
# Choose "script" for the type
# Fill in the redirect uri as <your_frontend_url>/auth/integrations/oauth_callback, e.g. http://localhost:3000/auth/integrations/oauth_callback
REDDIT_CLIENT_ID=
REDDIT_CLIENT_SECRET=
REDDIT_USERNAME=
REDDIT_PASSWORD=
REDDIT_USER_AGENT="AutoGPT:1.0 (by /u/autogpt)"
# Discord
DISCORD_BOT_TOKEN=
@@ -130,9 +163,21 @@ EXA_API_KEY=
# E2B
E2B_API_KEY=
# Mem0
MEM0_API_KEY=
# Nvidia
NVIDIA_API_KEY=
# Apollo
APOLLO_API_KEY=
# SmartLead
SMARTLEAD_API_KEY=
# ZeroBounce
ZEROBOUNCE_API_KEY=
# Logging Configuration
LOG_LEVEL=INFO
ENABLE_CLOUD_LOGGING=false

View File

@@ -66,10 +66,17 @@ We use the Poetry to manage the dependencies. To set up the project, follow thes
### Starting the server without Docker
To run the server locally, start in the autogpt_platform folder:
```sh
cd ..
```
Run the following command to run database in docker but the application locally:
```sh
docker compose --profile local up deps --build --detach
cd backend
poetry run app
```

View File

@@ -1,22 +1,30 @@
import logging
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from backend.util.process import AppProcess
logger = logging.getLogger(__name__)
def run_processes(*processes: "AppProcess", **kwargs):
"""
Execute all processes in the app. The last process is run in the foreground.
Includes enhanced error handling and process lifecycle management.
"""
try:
# Run all processes except the last one in the background.
for process in processes[:-1]:
process.start(background=True, **kwargs)
# Run the last process in the foreground
# Run the last process in the foreground.
processes[-1].start(background=False, **kwargs)
finally:
for process in processes:
process.stop()
try:
process.stop()
except Exception as e:
logger.exception(f"[{process.service_name}] unable to stop: {e}")
def main(**kwargs):
@@ -25,6 +33,7 @@ def main(**kwargs):
"""
from backend.executor import DatabaseManager, ExecutionManager, ExecutionScheduler
from backend.notifications import NotificationManager
from backend.server.rest_api import AgentServer
from backend.server.ws_api import WebsocketServer
@@ -32,6 +41,7 @@ def main(**kwargs):
DatabaseManager(),
ExecutionManager(),
ExecutionScheduler(),
NotificationManager(),
WebsocketServer(),
AgentServer(),
**kwargs,

View File

@@ -1,4 +1,5 @@
import logging
from typing import Any
from autogpt_libs.utils.cache import thread_cached
@@ -13,6 +14,7 @@ from backend.data.block import (
)
from backend.data.execution import ExecutionStatus
from backend.data.model import SchemaField
from backend.util import json
logger = logging.getLogger(__name__)
@@ -42,6 +44,23 @@ class AgentExecutorBlock(Block):
input_schema: dict = SchemaField(description="Input schema for the graph")
output_schema: dict = SchemaField(description="Output schema for the graph")
@classmethod
def get_input_schema(cls, data: BlockInput) -> dict[str, Any]:
return data.get("input_schema", {})
@classmethod
def get_input_defaults(cls, data: BlockInput) -> BlockInput:
return data.get("data", {})
@classmethod
def get_missing_input(cls, data: BlockInput) -> set[str]:
required_fields = cls.get_input_schema(data).get("required", [])
return set(required_fields) - set(data)
@classmethod
def get_mismatch_error(cls, data: BlockInput) -> str | None:
return json.validate_with_jsonschema(cls.get_input_schema(data), data)
class Output(BlockSchema):
pass

View File

@@ -0,0 +1,108 @@
import logging
from typing import List
from backend.blocks.apollo._auth import ApolloCredentials
from backend.blocks.apollo.models import (
Contact,
Organization,
SearchOrganizationsRequest,
SearchOrganizationsResponse,
SearchPeopleRequest,
SearchPeopleResponse,
)
from backend.util.request import Requests
logger = logging.getLogger(name=__name__)
class ApolloClient:
"""Client for the Apollo API"""
API_URL = "https://api.apollo.io/api/v1"
def __init__(self, credentials: ApolloCredentials):
self.credentials = credentials
self.requests = Requests()
def _get_headers(self) -> dict[str, str]:
return {"x-api-key": self.credentials.api_key.get_secret_value()}
def search_people(self, query: SearchPeopleRequest) -> List[Contact]:
"""Search for people in Apollo"""
response = self.requests.get(
f"{self.API_URL}/mixed_people/search",
headers=self._get_headers(),
params=query.model_dump(exclude={"credentials", "max_results"}),
)
parsed_response = SearchPeopleResponse(**response.json())
if parsed_response.pagination.total_entries == 0:
return []
people = parsed_response.people
# handle pagination
if (
query.max_results is not None
and query.max_results < parsed_response.pagination.total_entries
and len(people) < query.max_results
):
while (
len(people) < query.max_results
and query.page < parsed_response.pagination.total_pages
and len(parsed_response.people) > 0
):
query.page += 1
response = self.requests.get(
f"{self.API_URL}/mixed_people/search",
headers=self._get_headers(),
params=query.model_dump(exclude={"credentials", "max_results"}),
)
parsed_response = SearchPeopleResponse(**response.json())
people.extend(parsed_response.people[: query.max_results - len(people)])
logger.info(f"Found {len(people)} people")
return people[: query.max_results] if query.max_results else people
def search_organizations(
self, query: SearchOrganizationsRequest
) -> List[Organization]:
"""Search for organizations in Apollo"""
response = self.requests.get(
f"{self.API_URL}/mixed_companies/search",
headers=self._get_headers(),
params=query.model_dump(exclude={"credentials", "max_results"}),
)
parsed_response = SearchOrganizationsResponse(**response.json())
if parsed_response.pagination.total_entries == 0:
return []
organizations = parsed_response.organizations
# handle pagination
if (
query.max_results is not None
and query.max_results < parsed_response.pagination.total_entries
and len(organizations) < query.max_results
):
while (
len(organizations) < query.max_results
and query.page < parsed_response.pagination.total_pages
and len(parsed_response.organizations) > 0
):
query.page += 1
response = self.requests.get(
f"{self.API_URL}/mixed_companies/search",
headers=self._get_headers(),
params=query.model_dump(exclude={"credentials", "max_results"}),
)
parsed_response = SearchOrganizationsResponse(**response.json())
organizations.extend(
parsed_response.organizations[
: query.max_results - len(organizations)
]
)
logger.info(f"Found {len(organizations)} organizations")
return (
organizations[: query.max_results] if query.max_results else organizations
)

View File

@@ -0,0 +1,35 @@
from typing import Literal
from pydantic import SecretStr
from backend.data.model import APIKeyCredentials, CredentialsField, CredentialsMetaInput
from backend.integrations.providers import ProviderName
ApolloCredentials = APIKeyCredentials
ApolloCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.APOLLO],
Literal["api_key"],
]
TEST_CREDENTIALS = APIKeyCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="apollo",
api_key=SecretStr("mock-apollo-api-key"),
title="Mock Apollo API key",
expires_at=None,
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
def ApolloCredentialsField() -> ApolloCredentialsInput:
"""
Creates a Apollo credentials input on a block.
"""
return CredentialsField(
description="The Apollo integration can be used with an API Key.",
)

View File

@@ -0,0 +1,543 @@
from enum import Enum
from typing import Any, Optional
from pydantic import BaseModel
from backend.data.model import SchemaField
class PrimaryPhone(BaseModel):
"""A primary phone in Apollo"""
number: str
source: str
sanitized_number: str
class SenorityLevels(str, Enum):
"""Seniority levels in Apollo"""
OWNER = "owner"
FOUNDER = "founder"
C_SUITE = "c_suite"
PARTNER = "partner"
VP = "vp"
HEAD = "head"
DIRECTOR = "director"
MANAGER = "manager"
SENIOR = "senior"
ENTRY = "entry"
INTERN = "intern"
class ContactEmailStatuses(str, Enum):
"""Contact email statuses in Apollo"""
VERIFIED = "verified"
UNVERIFIED = "unverified"
LIKELY_TO_ENGAGE = "likely_to_engage"
UNAVAILABLE = "unavailable"
class RuleConfigStatus(BaseModel):
"""A rule config status in Apollo"""
_id: str
created_at: str
rule_action_config_id: str
rule_config_id: str
status_cd: str
updated_at: str
id: str
key: str
class ContactCampaignStatus(BaseModel):
"""A contact campaign status in Apollo"""
id: str
emailer_campaign_id: str
send_email_from_user_id: str
inactive_reason: str
status: str
added_at: str
added_by_user_id: str
finished_at: str
paused_at: str
auto_unpause_at: str
send_email_from_email_address: str
send_email_from_email_account_id: str
manually_set_unpause: str
failure_reason: str
current_step_id: str
in_response_to_emailer_message_id: str
cc_emails: str
bcc_emails: str
to_emails: str
class Account(BaseModel):
"""An account in Apollo"""
id: str
name: str
website_url: str
blog_url: str
angellist_url: str
linkedin_url: str
twitter_url: str
facebook_url: str
primary_phone: PrimaryPhone
languages: list[str]
alexa_ranking: int
phone: str
linkedin_uid: str
founded_year: int
publicly_traded_symbol: str
publicly_traded_exchange: str
logo_url: str
chrunchbase_url: str
primary_domain: str
domain: str
team_id: str
organization_id: str
account_stage_id: str
source: str
original_source: str
creator_id: str
owner_id: str
created_at: str
phone_status: str
hubspot_id: str
salesforce_id: str
crm_owner_id: str
parent_account_id: str
sanitized_phone: str
# no listed type on the API docs
account_playbook_statues: list[Any]
account_rule_config_statuses: list[RuleConfigStatus]
existence_level: str
label_ids: list[str]
typed_custom_fields: Any
custom_field_errors: Any
modality: str
source_display_name: str
salesforce_record_id: str
crm_record_url: str
class ContactEmail(BaseModel):
"""A contact email in Apollo"""
email: str = ""
email_md5: str = ""
email_sha256: str = ""
email_status: str = ""
email_source: str = ""
extrapolated_email_confidence: str = ""
position: int = 0
email_from_customer: str = ""
free_domain: bool = True
class EmploymentHistory(BaseModel):
"""An employment history in Apollo"""
class Config:
extra = "allow"
arbitrary_types_allowed = True
from_attributes = True
populate_by_name = True
_id: Optional[str] = None
created_at: Optional[str] = None
current: Optional[bool] = None
degree: Optional[str] = None
description: Optional[str] = None
emails: Optional[str] = None
end_date: Optional[str] = None
grade_level: Optional[str] = None
kind: Optional[str] = None
major: Optional[str] = None
organization_id: Optional[str] = None
organization_name: Optional[str] = None
raw_address: Optional[str] = None
start_date: Optional[str] = None
title: Optional[str] = None
updated_at: Optional[str] = None
id: Optional[str] = None
key: Optional[str] = None
class Breadcrumb(BaseModel):
"""A breadcrumb in Apollo"""
label: Optional[str] = "N/A"
signal_field_name: Optional[str] = "N/A"
value: str | list | None = "N/A"
display_name: Optional[str] = "N/A"
class TypedCustomField(BaseModel):
"""A typed custom field in Apollo"""
id: Optional[str] = "N/A"
value: Optional[str] = "N/A"
class Pagination(BaseModel):
"""Pagination in Apollo"""
class Config:
extra = "allow" # Allow extra fields
arbitrary_types_allowed = True # Allow any type
from_attributes = True # Allow from_orm
populate_by_name = True # Allow field aliases to work both ways
page: int = 0
per_page: int = 0
total_entries: int = 0
total_pages: int = 0
class DialerFlags(BaseModel):
"""A dialer flags in Apollo"""
country_name: str
country_enabled: bool
high_risk_calling_enabled: bool
potential_high_risk_number: bool
class PhoneNumber(BaseModel):
"""A phone number in Apollo"""
raw_number: str = ""
sanitized_number: str = ""
type: str = ""
position: int = 0
status: str = ""
dnc_status: str = ""
dnc_other_info: str = ""
dailer_flags: DialerFlags = DialerFlags(
country_name="",
country_enabled=True,
high_risk_calling_enabled=True,
potential_high_risk_number=True,
)
class Organization(BaseModel):
"""An organization in Apollo"""
class Config:
extra = "allow"
arbitrary_types_allowed = True
from_attributes = True
populate_by_name = True
id: Optional[str] = "N/A"
name: Optional[str] = "N/A"
website_url: Optional[str] = "N/A"
blog_url: Optional[str] = "N/A"
angellist_url: Optional[str] = "N/A"
linkedin_url: Optional[str] = "N/A"
twitter_url: Optional[str] = "N/A"
facebook_url: Optional[str] = "N/A"
primary_phone: Optional[PrimaryPhone] = PrimaryPhone(
number="N/A", source="N/A", sanitized_number="N/A"
)
languages: list[str] = []
alexa_ranking: Optional[int] = 0
phone: Optional[str] = "N/A"
linkedin_uid: Optional[str] = "N/A"
founded_year: Optional[int] = 0
publicly_traded_symbol: Optional[str] = "N/A"
publicly_traded_exchange: Optional[str] = "N/A"
logo_url: Optional[str] = "N/A"
chrunchbase_url: Optional[str] = "N/A"
primary_domain: Optional[str] = "N/A"
sanitized_phone: Optional[str] = "N/A"
owned_by_organization_id: Optional[str] = "N/A"
intent_strength: Optional[str] = "N/A"
show_intent: bool = True
has_intent_signal_account: Optional[bool] = True
intent_signal_account: Optional[str] = "N/A"
class Contact(BaseModel):
"""A contact in Apollo"""
class Config:
extra = "allow"
arbitrary_types_allowed = True
from_attributes = True
populate_by_name = True
contact_roles: list[Any] = []
id: Optional[str] = None
first_name: Optional[str] = None
last_name: Optional[str] = None
name: Optional[str] = None
linkedin_url: Optional[str] = None
title: Optional[str] = None
contact_stage_id: Optional[str] = None
owner_id: Optional[str] = None
creator_id: Optional[str] = None
person_id: Optional[str] = None
email_needs_tickling: bool = True
organization_name: Optional[str] = None
source: Optional[str] = None
original_source: Optional[str] = None
organization_id: Optional[str] = None
headline: Optional[str] = None
photo_url: Optional[str] = None
present_raw_address: Optional[str] = None
linkededin_uid: Optional[str] = None
extrapolated_email_confidence: Optional[float] = None
salesforce_id: Optional[str] = None
salesforce_lead_id: Optional[str] = None
salesforce_contact_id: Optional[str] = None
saleforce_account_id: Optional[str] = None
crm_owner_id: Optional[str] = None
created_at: Optional[str] = None
emailer_campaign_ids: list[str] = []
direct_dial_status: Optional[str] = None
direct_dial_enrichment_failed_at: Optional[str] = None
email_status: Optional[str] = None
email_source: Optional[str] = None
account_id: Optional[str] = None
last_activity_date: Optional[str] = None
hubspot_vid: Optional[str] = None
hubspot_company_id: Optional[str] = None
crm_id: Optional[str] = None
sanitized_phone: Optional[str] = None
merged_crm_ids: Optional[str] = None
updated_at: Optional[str] = None
queued_for_crm_push: bool = True
suggested_from_rule_engine_config_id: Optional[str] = None
email_unsubscribed: Optional[str] = None
label_ids: list[Any] = []
has_pending_email_arcgate_request: bool = True
has_email_arcgate_request: bool = True
existence_level: Optional[str] = None
email: Optional[str] = None
email_from_customer: Optional[str] = None
typed_custom_fields: list[TypedCustomField] = []
custom_field_errors: Any = None
salesforce_record_id: Optional[str] = None
crm_record_url: Optional[str] = None
email_status_unavailable_reason: Optional[str] = None
email_true_status: Optional[str] = None
updated_email_true_status: bool = True
contact_rule_config_statuses: list[RuleConfigStatus] = []
source_display_name: Optional[str] = None
twitter_url: Optional[str] = None
contact_campaign_statuses: list[ContactCampaignStatus] = []
state: Optional[str] = None
city: Optional[str] = None
country: Optional[str] = None
account: Optional[Account] = None
contact_emails: list[ContactEmail] = []
organization: Optional[Organization] = None
employment_history: list[EmploymentHistory] = []
time_zone: Optional[str] = None
intent_strength: Optional[str] = None
show_intent: bool = True
phone_numbers: list[PhoneNumber] = []
account_phone_note: Optional[str] = None
free_domain: bool = True
is_likely_to_engage: bool = True
email_domain_catchall: bool = True
contact_job_change_event: Optional[str] = None
class SearchOrganizationsRequest(BaseModel):
"""Request for Apollo's search organizations API"""
organization_num_empoloyees_range: list[int] = SchemaField(
description="""The number range of employees working for the company. This enables you to find companies based on headcount. You can add multiple ranges to expand your search results.
Each range you add needs to be a string, with the upper and lower numbers of the range separated only by a comma.""",
default=[0, 1000000],
)
organization_locations: list[str] = SchemaField(
description="""The location of the company headquarters. You can search across cities, US states, and countries.
If a company has several office locations, results are still based on the headquarters location. For example, if you search chicago but a company's HQ location is in boston, any Boston-based companies will not appearch in your search results, even if they match other parameters.
To exclude companies based on location, use the organization_not_locations parameter.
""",
default=[],
)
organizations_not_locations: list[str] = SchemaField(
description="""Exclude companies from search results based on the location of the company headquarters. You can use cities, US states, and countries as locations to exclude.
This parameter is useful for ensuring you do not prospect in an undesirable territory. For example, if you use ireland as a value, no Ireland-based companies will appear in your search results.
""",
default=[],
)
q_organization_keyword_tags: list[str] = SchemaField(
description="""Filter search results based on keywords associated with companies. For example, you can enter mining as a value to return only companies that have an association with the mining industry."""
)
q_organization_name: str = SchemaField(
description="""Filter search results to include a specific company name.
If the value you enter for this parameter does not match with a company's name, the company will not appear in search results, even if it matches other parameters. Partial matches are accepted. For example, if you filter by the value marketing, a company called NY Marketing Unlimited would still be eligible as a search result, but NY Market Analysis would not be eligible."""
)
organization_ids: list[str] = SchemaField(
description="""The Apollo IDs for the companies you want to include in your search results. Each company in the Apollo database is assigned a unique ID.
To find IDs, identify the values for organization_id when you call this endpoint.""",
default=[],
)
max_results: int = SchemaField(
description="""The maximum number of results to return. If you don't specify this parameter, the default is 100.""",
default=100,
ge=1,
le=50000,
advanced=True,
)
page: int = SchemaField(
description="""The page number of the Apollo data that you want to retrieve.
Use this parameter in combination with the per_page parameter to make search results for navigable and improve the performance of the endpoint.""",
default=1,
)
per_page: int = SchemaField(
description="""The number of search results that should be returned for each page. Limited the number of results per page improves the endpoint's performance.
Use the page parameter to search the different pages of data.""",
default=100,
)
class SearchOrganizationsResponse(BaseModel):
"""Response from Apollo's search organizations API"""
breadcrumbs: list[Breadcrumb] = []
partial_results_only: bool = True
has_join: bool = True
disable_eu_prospecting: bool = True
partial_results_limit: int = 0
pagination: Pagination = Pagination(
page=0, per_page=0, total_entries=0, total_pages=0
)
# no listed type on the API docs
accounts: list[Any] = []
organizations: list[Organization] = []
models_ids: list[str] = []
num_fetch_result: Optional[str] = "N/A"
derived_params: Optional[str] = "N/A"
class SearchPeopleRequest(BaseModel):
"""Request for Apollo's search people API"""
person_titles: list[str] = SchemaField(
description="""Job titles held by the people you want to find. For a person to be included in search results, they only need to match 1 of the job titles you add. Adding more job titles expands your search results.
Results also include job titles with the same terms, even if they are not exact matches. For example, searching for marketing manager might return people with the job title content marketing manager.
Use this parameter in combination with the person_seniorities[] parameter to find people based on specific job functions and seniority levels.
""",
default=[],
placeholder="marketing manager",
)
person_locations: list[str] = SchemaField(
description="""The location where people live. You can search across cities, US states, and countries.
To find people based on the headquarters locations of their current employer, use the organization_locations parameter.""",
default=[],
)
person_seniorities: list[SenorityLevels] = SchemaField(
description="""The job seniority that people hold within their current employer. This enables you to find people that currently hold positions at certain reporting levels, such as Director level or senior IC level.
For a person to be included in search results, they only need to match 1 of the seniorities you add. Adding more seniorities expands your search results.
Searches only return results based on their current job title, so searching for Director-level employees only returns people that currently hold a Director-level title. If someone was previously a Director, but is currently a VP, they would not be included in your search results.
Use this parameter in combination with the person_titles[] parameter to find people based on specific job functions and seniority levels.""",
default=[],
)
organization_locations: list[str] = SchemaField(
description="""The location of the company headquarters for a person's current employer. You can search across cities, US states, and countries.
If a company has several office locations, results are still based on the headquarters location. For example, if you search chicago but a company's HQ location is in boston, people that work for the Boston-based company will not appear in your results, even if they match other parameters.
To find people based on their personal location, use the person_locations parameter.""",
default=[],
)
q_organization_domains: list[str] = SchemaField(
description="""The domain name for the person's employer. This can be the current employer or a previous employer. Do not include www., the @ symbol, or similar.
You can add multiple domains to search across companies.
Examples: apollo.io and microsoft.com""",
default=[],
)
contact_email_statuses: list[ContactEmailStatuses] = SchemaField(
description="""The email statuses for the people you want to find. You can add multiple statuses to expand your search.""",
default=[],
)
organization_ids: list[str] = SchemaField(
description="""The Apollo IDs for the companies (employers) you want to include in your search results. Each company in the Apollo database is assigned a unique ID.
To find IDs, call the Organization Search endpoint and identify the values for organization_id.""",
default=[],
)
organization_num_empoloyees_range: list[int] = SchemaField(
description="""The number range of employees working for the company. This enables you to find companies based on headcount. You can add multiple ranges to expand your search results.
Each range you add needs to be a string, with the upper and lower numbers of the range separated only by a comma.""",
default=[],
)
q_keywords: str = SchemaField(
description="""A string of words over which we want to filter the results""",
default="",
)
page: int = SchemaField(
description="""The page number of the Apollo data that you want to retrieve.
Use this parameter in combination with the per_page parameter to make search results for navigable and improve the performance of the endpoint.""",
default=1,
)
per_page: int = SchemaField(
description="""The number of search results that should be returned for each page. Limited the number of results per page improves the endpoint's performance.
Use the page parameter to search the different pages of data.""",
default=100,
)
max_results: int = SchemaField(
description="""The maximum number of results to return. If you don't specify this parameter, the default is 100.""",
default=100,
ge=1,
le=50000,
advanced=True,
)
class SearchPeopleResponse(BaseModel):
"""Response from Apollo's search people API"""
class Config:
extra = "allow" # Allow extra fields
arbitrary_types_allowed = True # Allow any type
from_attributes = True # Allow from_orm
populate_by_name = True # Allow field aliases to work both ways
breadcrumbs: list[Breadcrumb] = []
partial_results_only: bool = True
has_join: bool = True
disable_eu_prospecting: bool = True
partial_results_limit: int = 0
pagination: Pagination = Pagination(
page=0, per_page=0, total_entries=0, total_pages=0
)
contacts: list[Contact] = []
people: list[Contact] = []
model_ids: list[str] = []
num_fetch_result: Optional[str] = "N/A"
derived_params: Optional[str] = "N/A"

View File

@@ -0,0 +1,219 @@
from backend.blocks.apollo._api import ApolloClient
from backend.blocks.apollo._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
ApolloCredentials,
ApolloCredentialsInput,
)
from backend.blocks.apollo.models import (
Organization,
PrimaryPhone,
SearchOrganizationsRequest,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class SearchOrganizationsBlock(Block):
"""Search for organizations in Apollo"""
class Input(BlockSchema):
organization_num_empoloyees_range: list[int] = SchemaField(
description="""The number range of employees working for the company. This enables you to find companies based on headcount. You can add multiple ranges to expand your search results.
Each range you add needs to be a string, with the upper and lower numbers of the range separated only by a comma.""",
default=[0, 1000000],
)
organization_locations: list[str] = SchemaField(
description="""The location of the company headquarters. You can search across cities, US states, and countries.
If a company has several office locations, results are still based on the headquarters location. For example, if you search chicago but a company's HQ location is in boston, any Boston-based companies will not appearch in your search results, even if they match other parameters.
To exclude companies based on location, use the organization_not_locations parameter.
""",
default=[],
)
organizations_not_locations: list[str] = SchemaField(
description="""Exclude companies from search results based on the location of the company headquarters. You can use cities, US states, and countries as locations to exclude.
This parameter is useful for ensuring you do not prospect in an undesirable territory. For example, if you use ireland as a value, no Ireland-based companies will appear in your search results.
""",
default=[],
)
q_organization_keyword_tags: list[str] = SchemaField(
description="""Filter search results based on keywords associated with companies. For example, you can enter mining as a value to return only companies that have an association with the mining industry.""",
default=[],
)
q_organization_name: str = SchemaField(
description="""Filter search results to include a specific company name.
If the value you enter for this parameter does not match with a company's name, the company will not appear in search results, even if it matches other parameters. Partial matches are accepted. For example, if you filter by the value marketing, a company called NY Marketing Unlimited would still be eligible as a search result, but NY Market Analysis would not be eligible.""",
default="",
advanced=False,
)
organization_ids: list[str] = SchemaField(
description="""The Apollo IDs for the companies you want to include in your search results. Each company in the Apollo database is assigned a unique ID.
To find IDs, identify the values for organization_id when you call this endpoint.""",
default=[],
)
max_results: int = SchemaField(
description="""The maximum number of results to return. If you don't specify this parameter, the default is 100.""",
default=100,
ge=1,
le=50000,
advanced=True,
)
credentials: ApolloCredentialsInput = SchemaField(
description="Apollo credentials",
)
class Output(BlockSchema):
organizations: list[Organization] = SchemaField(
description="List of organizations found",
default=[],
)
organization: Organization = SchemaField(
description="Each found organization, one at a time",
)
error: str = SchemaField(
description="Error message if the search failed",
default="",
)
def __init__(self):
super().__init__(
id="3d71270d-599e-4148-9b95-71b35d2f44f0",
description="Search for organizations in Apollo",
categories={BlockCategory.SEARCH},
input_schema=SearchOrganizationsBlock.Input,
output_schema=SearchOrganizationsBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={"query": "Google", "credentials": TEST_CREDENTIALS_INPUT},
test_output=[
(
"organization",
Organization(
id="1",
name="Google",
website_url="https://google.com",
blog_url="https://google.com/blog",
angellist_url="https://angel.co/google",
linkedin_url="https://linkedin.com/company/google",
twitter_url="https://twitter.com/google",
facebook_url="https://facebook.com/google",
primary_phone=PrimaryPhone(
source="google",
number="1234567890",
sanitized_number="1234567890",
),
languages=["en"],
alexa_ranking=1000,
phone="1234567890",
linkedin_uid="1234567890",
founded_year=2000,
publicly_traded_symbol="GOOGL",
publicly_traded_exchange="NASDAQ",
logo_url="https://google.com/logo.png",
chrunchbase_url="https://chrunchbase.com/google",
primary_domain="google.com",
sanitized_phone="1234567890",
owned_by_organization_id="1",
intent_strength="strong",
show_intent=True,
has_intent_signal_account=True,
intent_signal_account="1",
),
),
(
"organizations",
[
Organization(
id="1",
name="Google",
website_url="https://google.com",
blog_url="https://google.com/blog",
angellist_url="https://angel.co/google",
linkedin_url="https://linkedin.com/company/google",
twitter_url="https://twitter.com/google",
facebook_url="https://facebook.com/google",
primary_phone=PrimaryPhone(
source="google",
number="1234567890",
sanitized_number="1234567890",
),
languages=["en"],
alexa_ranking=1000,
phone="1234567890",
linkedin_uid="1234567890",
founded_year=2000,
publicly_traded_symbol="GOOGL",
publicly_traded_exchange="NASDAQ",
logo_url="https://google.com/logo.png",
chrunchbase_url="https://chrunchbase.com/google",
primary_domain="google.com",
sanitized_phone="1234567890",
owned_by_organization_id="1",
intent_strength="strong",
show_intent=True,
has_intent_signal_account=True,
intent_signal_account="1",
),
],
),
],
test_mock={
"search_organizations": lambda *args, **kwargs: [
Organization(
id="1",
name="Google",
website_url="https://google.com",
blog_url="https://google.com/blog",
angellist_url="https://angel.co/google",
linkedin_url="https://linkedin.com/company/google",
twitter_url="https://twitter.com/google",
facebook_url="https://facebook.com/google",
primary_phone=PrimaryPhone(
source="google",
number="1234567890",
sanitized_number="1234567890",
),
languages=["en"],
alexa_ranking=1000,
phone="1234567890",
linkedin_uid="1234567890",
founded_year=2000,
publicly_traded_symbol="GOOGL",
publicly_traded_exchange="NASDAQ",
logo_url="https://google.com/logo.png",
chrunchbase_url="https://chrunchbase.com/google",
primary_domain="google.com",
sanitized_phone="1234567890",
owned_by_organization_id="1",
intent_strength="strong",
show_intent=True,
has_intent_signal_account=True,
intent_signal_account="1",
)
]
},
)
@staticmethod
def search_organizations(
query: SearchOrganizationsRequest, credentials: ApolloCredentials
) -> list[Organization]:
client = ApolloClient(credentials)
return client.search_organizations(query)
def run(
self, input_data: Input, *, credentials: ApolloCredentials, **kwargs
) -> BlockOutput:
query = SearchOrganizationsRequest(
**input_data.model_dump(exclude={"credentials"})
)
organizations = self.search_organizations(query, credentials)
for organization in organizations:
yield "organization", organization
yield "organizations", organizations

View File

@@ -0,0 +1,394 @@
from backend.blocks.apollo._api import ApolloClient
from backend.blocks.apollo._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
ApolloCredentials,
ApolloCredentialsInput,
)
from backend.blocks.apollo.models import (
Contact,
ContactEmailStatuses,
SearchPeopleRequest,
SenorityLevels,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class SearchPeopleBlock(Block):
"""Search for people in Apollo"""
class Input(BlockSchema):
person_titles: list[str] = SchemaField(
description="""Job titles held by the people you want to find. For a person to be included in search results, they only need to match 1 of the job titles you add. Adding more job titles expands your search results.
Results also include job titles with the same terms, even if they are not exact matches. For example, searching for marketing manager might return people with the job title content marketing manager.
Use this parameter in combination with the person_seniorities[] parameter to find people based on specific job functions and seniority levels.
""",
default=[],
advanced=False,
)
person_locations: list[str] = SchemaField(
description="""The location where people live. You can search across cities, US states, and countries.
To find people based on the headquarters locations of their current employer, use the organization_locations parameter.""",
default=[],
advanced=False,
)
person_seniorities: list[SenorityLevels] = SchemaField(
description="""The job seniority that people hold within their current employer. This enables you to find people that currently hold positions at certain reporting levels, such as Director level or senior IC level.
For a person to be included in search results, they only need to match 1 of the seniorities you add. Adding more seniorities expands your search results.
Searches only return results based on their current job title, so searching for Director-level employees only returns people that currently hold a Director-level title. If someone was previously a Director, but is currently a VP, they would not be included in your search results.
Use this parameter in combination with the person_titles[] parameter to find people based on specific job functions and seniority levels.""",
default=[],
advanced=False,
)
organization_locations: list[str] = SchemaField(
description="""The location of the company headquarters for a person's current employer. You can search across cities, US states, and countries.
If a company has several office locations, results are still based on the headquarters location. For example, if you search chicago but a company's HQ location is in boston, people that work for the Boston-based company will not appear in your results, even if they match other parameters.
To find people based on their personal location, use the person_locations parameter.""",
default=[],
advanced=False,
)
q_organization_domains: list[str] = SchemaField(
description="""The domain name for the person's employer. This can be the current employer or a previous employer. Do not include www., the @ symbol, or similar.
You can add multiple domains to search across companies.
Examples: apollo.io and microsoft.com""",
default=[],
advanced=False,
)
contact_email_statuses: list[ContactEmailStatuses] = SchemaField(
description="""The email statuses for the people you want to find. You can add multiple statuses to expand your search.""",
default=[],
advanced=False,
)
organization_ids: list[str] = SchemaField(
description="""The Apollo IDs for the companies (employers) you want to include in your search results. Each company in the Apollo database is assigned a unique ID.
To find IDs, call the Organization Search endpoint and identify the values for organization_id.""",
default=[],
advanced=False,
)
organization_num_empoloyees_range: list[int] = SchemaField(
description="""The number range of employees working for the company. This enables you to find companies based on headcount. You can add multiple ranges to expand your search results.
Each range you add needs to be a string, with the upper and lower numbers of the range separated only by a comma.""",
default=[],
advanced=False,
)
q_keywords: str = SchemaField(
description="""A string of words over which we want to filter the results""",
default="",
advanced=False,
)
max_results: int = SchemaField(
description="""The maximum number of results to return. If you don't specify this parameter, the default is 100.""",
default=100,
ge=1,
le=50000,
advanced=True,
)
credentials: ApolloCredentialsInput = SchemaField(
description="Apollo credentials",
)
class Output(BlockSchema):
people: list[Contact] = SchemaField(
description="List of people found",
default=[],
)
person: Contact = SchemaField(
description="Each found person, one at a time",
)
error: str = SchemaField(
description="Error message if the search failed",
default="",
)
def __init__(self):
super().__init__(
id="c2adb3aa-5aae-488d-8a6e-4eb8c23e2ed6",
description="Search for people in Apollo",
categories={BlockCategory.SEARCH},
input_schema=SearchPeopleBlock.Input,
output_schema=SearchPeopleBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={"credentials": TEST_CREDENTIALS_INPUT},
test_output=[
(
"person",
Contact(
contact_roles=[],
id="1",
name="John Doe",
first_name="John",
last_name="Doe",
linkedin_url="https://www.linkedin.com/in/johndoe",
title="Software Engineer",
organization_name="Google",
organization_id="123456",
contact_stage_id="1",
owner_id="1",
creator_id="1",
person_id="1",
email_needs_tickling=True,
source="apollo",
original_source="apollo",
headline="Software Engineer",
photo_url="https://www.linkedin.com/in/johndoe",
present_raw_address="123 Main St, Anytown, USA",
linkededin_uid="123456",
extrapolated_email_confidence=0.8,
salesforce_id="123456",
salesforce_lead_id="123456",
salesforce_contact_id="123456",
saleforce_account_id="123456",
crm_owner_id="123456",
created_at="2021-01-01",
emailer_campaign_ids=[],
direct_dial_status="active",
direct_dial_enrichment_failed_at="2021-01-01",
email_status="active",
email_source="apollo",
account_id="123456",
last_activity_date="2021-01-01",
hubspot_vid="123456",
hubspot_company_id="123456",
crm_id="123456",
sanitized_phone="123456",
merged_crm_ids="123456",
updated_at="2021-01-01",
queued_for_crm_push=True,
suggested_from_rule_engine_config_id="123456",
email_unsubscribed=None,
label_ids=[],
has_pending_email_arcgate_request=True,
has_email_arcgate_request=True,
existence_level=None,
email=None,
email_from_customer=None,
typed_custom_fields=[],
custom_field_errors=None,
salesforce_record_id=None,
crm_record_url=None,
email_status_unavailable_reason=None,
email_true_status=None,
updated_email_true_status=True,
contact_rule_config_statuses=[],
source_display_name=None,
twitter_url=None,
contact_campaign_statuses=[],
state=None,
city=None,
country=None,
account=None,
contact_emails=[],
organization=None,
employment_history=[],
time_zone=None,
intent_strength=None,
show_intent=True,
phone_numbers=[],
account_phone_note=None,
free_domain=True,
is_likely_to_engage=True,
email_domain_catchall=True,
contact_job_change_event=None,
),
),
(
"people",
[
Contact(
contact_roles=[],
id="1",
name="John Doe",
first_name="John",
last_name="Doe",
linkedin_url="https://www.linkedin.com/in/johndoe",
title="Software Engineer",
organization_name="Google",
organization_id="123456",
contact_stage_id="1",
owner_id="1",
creator_id="1",
person_id="1",
email_needs_tickling=True,
source="apollo",
original_source="apollo",
headline="Software Engineer",
photo_url="https://www.linkedin.com/in/johndoe",
present_raw_address="123 Main St, Anytown, USA",
linkededin_uid="123456",
extrapolated_email_confidence=0.8,
salesforce_id="123456",
salesforce_lead_id="123456",
salesforce_contact_id="123456",
saleforce_account_id="123456",
crm_owner_id="123456",
created_at="2021-01-01",
emailer_campaign_ids=[],
direct_dial_status="active",
direct_dial_enrichment_failed_at="2021-01-01",
email_status="active",
email_source="apollo",
account_id="123456",
last_activity_date="2021-01-01",
hubspot_vid="123456",
hubspot_company_id="123456",
crm_id="123456",
sanitized_phone="123456",
merged_crm_ids="123456",
updated_at="2021-01-01",
queued_for_crm_push=True,
suggested_from_rule_engine_config_id="123456",
email_unsubscribed=None,
label_ids=[],
has_pending_email_arcgate_request=True,
has_email_arcgate_request=True,
existence_level=None,
email=None,
email_from_customer=None,
typed_custom_fields=[],
custom_field_errors=None,
salesforce_record_id=None,
crm_record_url=None,
email_status_unavailable_reason=None,
email_true_status=None,
updated_email_true_status=True,
contact_rule_config_statuses=[],
source_display_name=None,
twitter_url=None,
contact_campaign_statuses=[],
state=None,
city=None,
country=None,
account=None,
contact_emails=[],
organization=None,
employment_history=[],
time_zone=None,
intent_strength=None,
show_intent=True,
phone_numbers=[],
account_phone_note=None,
free_domain=True,
is_likely_to_engage=True,
email_domain_catchall=True,
contact_job_change_event=None,
),
],
),
],
test_mock={
"search_people": lambda query, credentials: [
Contact(
id="1",
name="John Doe",
first_name="John",
last_name="Doe",
linkedin_url="https://www.linkedin.com/in/johndoe",
title="Software Engineer",
organization_name="Google",
organization_id="123456",
contact_stage_id="1",
owner_id="1",
creator_id="1",
person_id="1",
email_needs_tickling=True,
source="apollo",
original_source="apollo",
headline="Software Engineer",
photo_url="https://www.linkedin.com/in/johndoe",
present_raw_address="123 Main St, Anytown, USA",
linkededin_uid="123456",
extrapolated_email_confidence=0.8,
salesforce_id="123456",
salesforce_lead_id="123456",
salesforce_contact_id="123456",
saleforce_account_id="123456",
crm_owner_id="123456",
created_at="2021-01-01",
emailer_campaign_ids=[],
direct_dial_status="active",
direct_dial_enrichment_failed_at="2021-01-01",
email_status="active",
email_source="apollo",
account_id="123456",
last_activity_date="2021-01-01",
hubspot_vid="123456",
hubspot_company_id="123456",
crm_id="123456",
sanitized_phone="123456",
merged_crm_ids="123456",
updated_at="2021-01-01",
queued_for_crm_push=True,
suggested_from_rule_engine_config_id="123456",
email_unsubscribed=None,
label_ids=[],
has_pending_email_arcgate_request=True,
has_email_arcgate_request=True,
existence_level=None,
email=None,
email_from_customer=None,
typed_custom_fields=[],
custom_field_errors=None,
salesforce_record_id=None,
crm_record_url=None,
email_status_unavailable_reason=None,
email_true_status=None,
updated_email_true_status=True,
contact_rule_config_statuses=[],
source_display_name=None,
twitter_url=None,
contact_campaign_statuses=[],
state=None,
city=None,
country=None,
account=None,
contact_emails=[],
organization=None,
employment_history=[],
time_zone=None,
intent_strength=None,
show_intent=True,
phone_numbers=[],
account_phone_note=None,
free_domain=True,
is_likely_to_engage=True,
email_domain_catchall=True,
contact_job_change_event=None,
),
]
},
)
@staticmethod
def search_people(
query: SearchPeopleRequest, credentials: ApolloCredentials
) -> list[Contact]:
client = ApolloClient(credentials)
return client.search_people(query)
def run(
self,
input_data: Input,
*,
credentials: ApolloCredentials,
**kwargs,
) -> BlockOutput:
query = SearchPeopleRequest(**input_data.model_dump(exclude={"credentials"}))
people = self.search_people(query, credentials)
for person in people:
yield "person", person
yield "people", people

View File

@@ -1,13 +1,52 @@
import enum
from typing import Any, List
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema, BlockType
from backend.data.model import SchemaField
from backend.util.file import MediaFile, store_media_file
from backend.util.mock import MockObject
from backend.util.text import TextFormatter
from backend.util.type import convert
formatter = TextFormatter()
class FileStoreBlock(Block):
class Input(BlockSchema):
file_in: MediaFile = SchemaField(
description="The file to store in the temporary directory, it can be a URL, data URI, or local path."
)
class Output(BlockSchema):
file_out: MediaFile = SchemaField(
description="The relative path to the stored file in the temporary directory."
)
def __init__(self):
super().__init__(
id="cbb50872-625b-42f0-8203-a2ae78242d8a",
description="Stores the input file in the temporary directory.",
categories={BlockCategory.BASIC, BlockCategory.MULTIMEDIA},
input_schema=FileStoreBlock.Input,
output_schema=FileStoreBlock.Output,
static_output=True,
)
def run(
self,
input_data: Input,
*,
graph_exec_id: str,
**kwargs,
) -> BlockOutput:
file_path = store_media_file(
graph_exec_id=graph_exec_id,
file=input_data.file_in,
return_content=False,
)
yield "file_out", file_path
class StoreValueBlock(Block):
"""
This block allows you to provide a constant value as a block, in a stateless manner.
@@ -258,6 +297,7 @@ class AgentOutputBlock(Block):
class Output(BlockSchema):
output: Any = SchemaField(description="The value recorded as output.")
name: Any = SchemaField(description="The name of the value recorded as output.")
def __init__(self):
super().__init__(
@@ -309,6 +349,7 @@ class AgentOutputBlock(Block):
yield "output", f"Error: {e}, {input_data.value}"
else:
yield "output", input_data.value
yield "name", input_data.name
class AddToDictionaryBlock(Block):
@@ -469,6 +510,48 @@ class AddToListBlock(Block):
yield "updated_list", updated_list
class FindInListBlock(Block):
class Input(BlockSchema):
list: List[Any] = SchemaField(description="The list to search in.")
value: Any = SchemaField(description="The value to search for.")
class Output(BlockSchema):
index: int = SchemaField(description="The index of the value in the list.")
found: bool = SchemaField(
description="Whether the value was found in the list."
)
not_found_value: Any = SchemaField(
description="The value that was not found in the list."
)
def __init__(self):
super().__init__(
id="5e2c6d0a-1e37-489f-b1d0-8e1812b23333",
description="Finds the index of the value in the list.",
categories={BlockCategory.BASIC},
input_schema=FindInListBlock.Input,
output_schema=FindInListBlock.Output,
test_input=[
{"list": [1, 2, 3, 4, 5], "value": 3},
{"list": [1, 2, 3, 4, 5], "value": 6},
],
test_output=[
("index", 2),
("found", True),
("found", False),
("not_found_value", 6),
],
)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
try:
yield "index", input_data.list.index(input_data.value)
yield "found", True
except ValueError:
yield "found", False
yield "not_found_value", input_data.value
class NoteBlock(Block):
class Input(BlockSchema):
text: str = SchemaField(description="The text to display in the sticky note.")
@@ -590,3 +673,47 @@ class CreateListBlock(Block):
yield "list", input_data.values
except Exception as e:
yield "error", f"Failed to create list: {str(e)}"
class TypeOptions(enum.Enum):
STRING = "string"
NUMBER = "number"
BOOLEAN = "boolean"
LIST = "list"
DICTIONARY = "dictionary"
class UniversalTypeConverterBlock(Block):
class Input(BlockSchema):
value: Any = SchemaField(
description="The value to convert to a universal type."
)
type: TypeOptions = SchemaField(description="The type to convert the value to.")
class Output(BlockSchema):
value: Any = SchemaField(description="The converted value.")
def __init__(self):
super().__init__(
id="95d1b990-ce13-4d88-9737-ba5c2070c97b",
description="This block is used to convert a value to a universal type.",
categories={BlockCategory.BASIC},
input_schema=UniversalTypeConverterBlock.Input,
output_schema=UniversalTypeConverterBlock.Output,
)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
try:
converted_value = convert(
input_data.value,
{
TypeOptions.STRING: str,
TypeOptions.NUMBER: float,
TypeOptions.BOOLEAN: bool,
TypeOptions.LIST: list,
TypeOptions.DICTIONARY: dict,
}[input_data.type],
)
yield "value", converted_value
except Exception as e:
yield "error", f"Failed to convert value: {str(e)}"

View File

@@ -107,3 +107,83 @@ class ConditionBlock(Block):
yield "yes_output", yes_value
else:
yield "no_output", no_value
class IfInputMatchesBlock(Block):
class Input(BlockSchema):
input: Any = SchemaField(
description="The input to match against",
placeholder="For example: 10 or 'hello' or True",
)
value: Any = SchemaField(
description="The value to output if the input matches",
placeholder="For example: 'Greater' or 20 or False",
)
yes_value: Any = SchemaField(
description="The value to output if the input matches",
placeholder="For example: 'Greater' or 20 or False",
default=None,
)
no_value: Any = SchemaField(
description="The value to output if the input does not match",
placeholder="For example: 'Greater' or 20 or False",
default=None,
)
class Output(BlockSchema):
result: bool = SchemaField(
description="The result of the condition evaluation (True or False)"
)
yes_output: Any = SchemaField(
description="The output value if the condition is true"
)
no_output: Any = SchemaField(
description="The output value if the condition is false"
)
def __init__(self):
super().__init__(
id="6dbbc4b3-ca6c-42b6-b508-da52d23e13f2",
input_schema=IfInputMatchesBlock.Input,
output_schema=IfInputMatchesBlock.Output,
description="Handles conditional logic based on comparison operators",
categories={BlockCategory.LOGIC},
test_input=[
{
"input": 10,
"value": 10,
"yes_value": "Greater",
"no_value": "Not greater",
},
{
"input": 10,
"value": 20,
"yes_value": "Greater",
"no_value": "Not greater",
},
{
"input": 10,
"value": None,
"yes_value": "Yes",
"no_value": "No",
},
],
test_output=[
("result", True),
("yes_output", "Greater"),
("result", False),
("no_output", "Not greater"),
("result", False),
("no_output", "No"),
# ("result", True),
# ("yes_output", "Yes"),
],
)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
if input_data.input == input_data.value or input_data.input is input_data.value:
yield "result", True
yield "yes_output", input_data.yes_value
else:
yield "result", False
yield "no_output", input_data.no_value

View File

@@ -188,3 +188,270 @@ class CodeExecutionBlock(Block):
yield "stderr_logs", stderr_logs
except Exception as e:
yield "error", str(e)
class InstantiationBlock(Block):
class Input(BlockSchema):
credentials: CredentialsMetaInput[
Literal[ProviderName.E2B], Literal["api_key"]
] = CredentialsField(
description="Enter your api key for the E2B Sandbox. You can get it in here - https://e2b.dev/docs",
)
# Todo : Option to run commond in background
setup_commands: list[str] = SchemaField(
description=(
"Shell commands to set up the sandbox before running the code. "
"You can use `curl` or `git` to install your desired Debian based "
"package manager. `pip` and `npm` are pre-installed.\n\n"
"These commands are executed with `sh`, in the foreground."
),
placeholder="pip install cowsay",
default=[],
advanced=False,
)
setup_code: str = SchemaField(
description="Code to execute in the sandbox",
placeholder="print('Hello, World!')",
default="",
advanced=False,
)
language: ProgrammingLanguage = SchemaField(
description="Programming language to execute",
default=ProgrammingLanguage.PYTHON,
advanced=False,
)
timeout: int = SchemaField(
description="Execution timeout in seconds", default=300
)
template_id: str = SchemaField(
description=(
"You can use an E2B sandbox template by entering its ID here. "
"Check out the E2B docs for more details: "
"[E2B - Sandbox template](https://e2b.dev/docs/sandbox-template)"
),
default="",
advanced=True,
)
class Output(BlockSchema):
sandbox_id: str = SchemaField(description="ID of the sandbox instance")
response: str = SchemaField(description="Response from code execution")
stdout_logs: str = SchemaField(
description="Standard output logs from execution"
)
stderr_logs: str = SchemaField(description="Standard error logs from execution")
error: str = SchemaField(description="Error message if execution failed")
def __init__(self):
super().__init__(
id="ff0861c9-1726-4aec-9e5b-bf53f3622112",
description="Instantiate an isolated sandbox environment with internet access where to execute code in.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=InstantiationBlock.Input,
output_schema=InstantiationBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"setup_code": "print('Hello World')",
"language": ProgrammingLanguage.PYTHON.value,
"setup_commands": [],
"timeout": 300,
"template_id": "",
},
test_output=[
("sandbox_id", str),
("response", "Hello World"),
("stdout_logs", "Hello World\n"),
],
test_mock={
"execute_code": lambda setup_code, language, setup_commands, timeout, api_key, template_id: (
"sandbox_id",
"Hello World",
"Hello World\n",
"",
),
},
)
def run(
self, input_data: Input, *, credentials: APIKeyCredentials, **kwargs
) -> BlockOutput:
try:
sandbox_id, response, stdout_logs, stderr_logs = self.execute_code(
input_data.setup_code,
input_data.language,
input_data.setup_commands,
input_data.timeout,
credentials.api_key.get_secret_value(),
input_data.template_id,
)
if sandbox_id:
yield "sandbox_id", sandbox_id
else:
yield "error", "Sandbox ID not found"
if response:
yield "response", response
if stdout_logs:
yield "stdout_logs", stdout_logs
if stderr_logs:
yield "stderr_logs", stderr_logs
except Exception as e:
yield "error", str(e)
def execute_code(
self,
code: str,
language: ProgrammingLanguage,
setup_commands: list[str],
timeout: int,
api_key: str,
template_id: str,
):
try:
sandbox = None
if template_id:
sandbox = Sandbox(
template=template_id, api_key=api_key, timeout=timeout
)
else:
sandbox = Sandbox(api_key=api_key, timeout=timeout)
if not sandbox:
raise Exception("Sandbox not created")
# Running setup commands
for cmd in setup_commands:
sandbox.commands.run(cmd)
# Executing the code
execution = sandbox.run_code(
code,
language=language.value,
on_error=lambda e: sandbox.kill(), # Kill the sandbox if there is an error
)
if execution.error:
raise Exception(execution.error)
response = execution.text
stdout_logs = "".join(execution.logs.stdout)
stderr_logs = "".join(execution.logs.stderr)
return sandbox.sandbox_id, response, stdout_logs, stderr_logs
except Exception as e:
raise e
class StepExecutionBlock(Block):
class Input(BlockSchema):
credentials: CredentialsMetaInput[
Literal[ProviderName.E2B], Literal["api_key"]
] = CredentialsField(
description="Enter your api key for the E2B Sandbox. You can get it in here - https://e2b.dev/docs",
)
sandbox_id: str = SchemaField(
description="ID of the sandbox instance to execute the code in",
advanced=False,
)
step_code: str = SchemaField(
description="Code to execute in the sandbox",
placeholder="print('Hello, World!')",
default="",
advanced=False,
)
language: ProgrammingLanguage = SchemaField(
description="Programming language to execute",
default=ProgrammingLanguage.PYTHON,
advanced=False,
)
class Output(BlockSchema):
response: str = SchemaField(description="Response from code execution")
stdout_logs: str = SchemaField(
description="Standard output logs from execution"
)
stderr_logs: str = SchemaField(description="Standard error logs from execution")
error: str = SchemaField(description="Error message if execution failed")
def __init__(self):
super().__init__(
id="82b59b8e-ea10-4d57-9161-8b169b0adba6",
description="Execute code in a previously instantiated sandbox environment.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=StepExecutionBlock.Input,
output_schema=StepExecutionBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"sandbox_id": "sandbox_id",
"step_code": "print('Hello World')",
"language": ProgrammingLanguage.PYTHON.value,
},
test_output=[
("response", "Hello World"),
("stdout_logs", "Hello World\n"),
],
test_mock={
"execute_step_code": lambda sandbox_id, step_code, language, api_key: (
"Hello World",
"Hello World\n",
"",
),
},
)
def execute_step_code(
self,
sandbox_id: str,
code: str,
language: ProgrammingLanguage,
api_key: str,
):
try:
sandbox = Sandbox.connect(sandbox_id=sandbox_id, api_key=api_key)
if not sandbox:
raise Exception("Sandbox not found")
# Executing the code
execution = sandbox.run_code(code, language=language.value)
if execution.error:
raise Exception(execution.error)
response = execution.text
stdout_logs = "".join(execution.logs.stdout)
stderr_logs = "".join(execution.logs.stderr)
return response, stdout_logs, stderr_logs
except Exception as e:
raise e
def run(
self, input_data: Input, *, credentials: APIKeyCredentials, **kwargs
) -> BlockOutput:
try:
response, stdout_logs, stderr_logs = self.execute_step_code(
input_data.sandbox_id,
input_data.step_code,
input_data.language,
credentials.api_key.get_secret_value(),
)
if response:
yield "response", response
if stdout_logs:
yield "stdout_logs", stdout_logs
if stderr_logs:
yield "stderr_logs", stderr_logs
except Exception as e:
yield "error", str(e)

View File

@@ -1,22 +1,53 @@
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from typing import Literal
from pydantic import BaseModel, ConfigDict
from pydantic import BaseModel, ConfigDict, SecretStr
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import BlockSecret, SchemaField, SecretField
from backend.data.model import (
CredentialsField,
CredentialsMetaInput,
SchemaField,
UserPasswordCredentials,
)
from backend.integrations.providers import ProviderName
TEST_CREDENTIALS = UserPasswordCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="smtp",
username=SecretStr("mock-smtp-username"),
password=SecretStr("mock-smtp-password"),
title="Mock SMTP credentials",
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
SMTPCredentials = UserPasswordCredentials
SMTPCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.SMTP],
Literal["user_password"],
]
class EmailCredentials(BaseModel):
def SMTPCredentialsField() -> SMTPCredentialsInput:
return CredentialsField(
description="The SMTP integration requires a username and password.",
)
class SMTPConfig(BaseModel):
smtp_server: str = SchemaField(
default="smtp.gmail.com", description="SMTP server address"
default="smtp.example.com", description="SMTP server address"
)
smtp_port: int = SchemaField(default=25, description="SMTP port number")
smtp_username: BlockSecret = SecretField(key="smtp_username")
smtp_password: BlockSecret = SecretField(key="smtp_password")
model_config = ConfigDict(title="Email Credentials")
model_config = ConfigDict(title="SMTP Config")
class SendEmailBlock(Block):
@@ -30,10 +61,11 @@ class SendEmailBlock(Block):
body: str = SchemaField(
description="Body of the email", placeholder="Enter the email body"
)
creds: EmailCredentials = SchemaField(
description="SMTP credentials",
default=EmailCredentials(),
config: SMTPConfig = SchemaField(
description="SMTP Config",
default=SMTPConfig(),
)
credentials: SMTPCredentialsInput = SMTPCredentialsField()
class Output(BlockSchema):
status: str = SchemaField(description="Status of the email sending operation")
@@ -43,7 +75,6 @@ class SendEmailBlock(Block):
def __init__(self):
super().__init__(
disabled=True,
id="4335878a-394e-4e67-adf2-919877ff49ae",
description="This block sends an email using the provided SMTP credentials.",
categories={BlockCategory.OUTPUT},
@@ -53,25 +84,29 @@ class SendEmailBlock(Block):
"to_email": "recipient@example.com",
"subject": "Test Email",
"body": "This is a test email.",
"creds": {
"config": {
"smtp_server": "smtp.gmail.com",
"smtp_port": 25,
"smtp_username": "your-email@gmail.com",
"smtp_password": "your-gmail-password",
},
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[("status", "Email sent successfully")],
test_mock={"send_email": lambda *args, **kwargs: "Email sent successfully"},
)
@staticmethod
def send_email(
creds: EmailCredentials, to_email: str, subject: str, body: str
config: SMTPConfig,
to_email: str,
subject: str,
body: str,
credentials: SMTPCredentials,
) -> str:
smtp_server = creds.smtp_server
smtp_port = creds.smtp_port
smtp_username = creds.smtp_username.get_secret_value()
smtp_password = creds.smtp_password.get_secret_value()
smtp_server = config.smtp_server
smtp_port = config.smtp_port
smtp_username = credentials.username.get_secret_value()
smtp_password = credentials.password.get_secret_value()
msg = MIMEMultipart()
msg["From"] = smtp_username
@@ -86,10 +121,13 @@ class SendEmailBlock(Block):
return "Email sent successfully"
def run(self, input_data: Input, **kwargs) -> BlockOutput:
def run(
self, input_data: Input, *, credentials: SMTPCredentials, **kwargs
) -> BlockOutput:
yield "status", self.send_email(
input_data.creds,
input_data.to_email,
input_data.subject,
input_data.body,
config=input_data.config,
to_email=input_data.to_email,
subject=input_data.subject,
body=input_data.body,
credentials=credentials,
)

View File

@@ -1,4 +1,4 @@
from typing import List, Optional
from typing import List
from pydantic import BaseModel
@@ -13,12 +13,12 @@ from backend.util.request import requests
class ContentRetrievalSettings(BaseModel):
text: Optional[dict] = SchemaField(
text: dict = SchemaField(
description="Text content settings",
default={"maxCharacters": 1000, "includeHtmlTags": False},
advanced=True,
)
highlights: Optional[dict] = SchemaField(
highlights: dict = SchemaField(
description="Highlight settings",
default={
"numSentences": 3,
@@ -27,7 +27,7 @@ class ContentRetrievalSettings(BaseModel):
},
advanced=True,
)
summary: Optional[dict] = SchemaField(
summary: dict = SchemaField(
description="Summary settings",
default={"query": ""},
advanced=True,

View File

@@ -1,6 +1,9 @@
from urllib.parse import urlparse
from backend.blocks.github._auth import GithubCredentials
from backend.blocks.github._auth import (
GithubCredentials,
GithubFineGrainedAPICredentials,
)
from backend.util.request import Requests
@@ -30,12 +33,68 @@ def _convert_to_api_url(url: str) -> str:
def _get_headers(credentials: GithubCredentials) -> dict[str, str]:
return {
"Authorization": credentials.bearer(),
"Authorization": credentials.auth_header(),
"Accept": "application/vnd.github.v3+json",
}
def get_api(credentials: GithubCredentials, convert_urls: bool = True) -> Requests:
def convert_comment_url_to_api_endpoint(comment_url: str) -> str:
"""
Converts a GitHub comment URL (web interface) to the appropriate API endpoint URL.
Handles:
1. Issue/PR comments: #issuecomment-{id}
2. PR review comments: #discussion_r{id}
Returns the appropriate API endpoint path for the comment.
"""
# First, check if this is already an API URL
parsed_url = urlparse(comment_url)
if parsed_url.hostname == "api.github.com":
return comment_url
# Replace pull with issues for comment endpoints
if "/pull/" in comment_url:
comment_url = comment_url.replace("/pull/", "/issues/")
# Handle issue/PR comments (#issuecomment-xxx)
if "#issuecomment-" in comment_url:
base_url, comment_part = comment_url.split("#issuecomment-")
comment_id = comment_part
# Extract repo information from base URL
parsed_url = urlparse(base_url)
path_parts = parsed_url.path.strip("/").split("/")
owner, repo = path_parts[0], path_parts[1]
# Construct API URL for issue comments
return (
f"https://api.github.com/repos/{owner}/{repo}/issues/comments/{comment_id}"
)
# Handle PR review comments (#discussion_r)
elif "#discussion_r" in comment_url:
base_url, comment_part = comment_url.split("#discussion_r")
comment_id = comment_part
# Extract repo information from base URL
parsed_url = urlparse(base_url)
path_parts = parsed_url.path.strip("/").split("/")
owner, repo = path_parts[0], path_parts[1]
# Construct API URL for PR review comments
return (
f"https://api.github.com/repos/{owner}/{repo}/pulls/comments/{comment_id}"
)
# If no specific comment identifiers are found, use the general URL conversion
return _convert_to_api_url(comment_url)
def get_api(
credentials: GithubCredentials | GithubFineGrainedAPICredentials,
convert_urls: bool = True,
) -> Requests:
return Requests(
trusted_origins=["https://api.github.com", "https://github.com"],
extra_url_validator=_convert_to_api_url if convert_urls else None,

View File

@@ -22,6 +22,11 @@ GithubCredentialsInput = CredentialsMetaInput[
Literal["api_key", "oauth2"] if GITHUB_OAUTH_IS_CONFIGURED else Literal["api_key"],
]
GithubFineGrainedAPICredentials = APIKeyCredentials
GithubFineGrainedAPICredentialsInput = CredentialsMetaInput[
Literal[ProviderName.GITHUB], Literal["api_key"]
]
def GithubCredentialsField(scope: str) -> GithubCredentialsInput:
"""
@@ -37,6 +42,16 @@ def GithubCredentialsField(scope: str) -> GithubCredentialsInput:
)
def GithubFineGrainedAPICredentialsField(
scope: str,
) -> GithubFineGrainedAPICredentialsInput:
return CredentialsField(
required_scopes={scope},
description="The GitHub integration can be used with OAuth, "
"or any API key with sufficient permissions for the blocks it is used on.",
)
TEST_CREDENTIALS = APIKeyCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="github",
@@ -50,3 +65,18 @@ TEST_CREDENTIALS_INPUT = {
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.type,
}
TEST_FINE_GRAINED_CREDENTIALS = APIKeyCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="github",
api_key=SecretStr("mock-github-api-key"),
title="Mock GitHub API key",
expires_at=None,
)
TEST_FINE_GRAINED_CREDENTIALS_INPUT = {
"provider": TEST_FINE_GRAINED_CREDENTIALS.provider,
"id": TEST_FINE_GRAINED_CREDENTIALS.id,
"type": TEST_FINE_GRAINED_CREDENTIALS.type,
"title": TEST_FINE_GRAINED_CREDENTIALS.type,
}

View File

@@ -0,0 +1,360 @@
from enum import Enum
from typing import Optional
from pydantic import BaseModel
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
from ._api import get_api
from ._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
GithubCredentials,
GithubCredentialsField,
GithubCredentialsInput,
)
# queued, in_progress, completed, waiting, requested, pending
class ChecksStatus(Enum):
QUEUED = "queued"
IN_PROGRESS = "in_progress"
COMPLETED = "completed"
WAITING = "waiting"
REQUESTED = "requested"
PENDING = "pending"
class ChecksConclusion(Enum):
SUCCESS = "success"
FAILURE = "failure"
NEUTRAL = "neutral"
CANCELLED = "cancelled"
TIMED_OUT = "timed_out"
ACTION_REQUIRED = "action_required"
SKIPPED = "skipped"
class GithubCreateCheckRunBlock(Block):
"""Block for creating a new check run on a GitHub repository."""
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo:status")
repo_url: str = SchemaField(
description="URL of the GitHub repository",
placeholder="https://github.com/owner/repo",
)
name: str = SchemaField(
description="The name of the check run (e.g., 'code-coverage')",
)
head_sha: str = SchemaField(
description="The SHA of the commit to check",
)
status: ChecksStatus = SchemaField(
description="Current status of the check run",
default=ChecksStatus.QUEUED,
)
conclusion: Optional[ChecksConclusion] = SchemaField(
description="The final conclusion of the check (required if status is completed)",
default=None,
)
details_url: str = SchemaField(
description="The URL for the full details of the check",
default="",
)
output_title: str = SchemaField(
description="Title of the check run output",
default="",
)
output_summary: str = SchemaField(
description="Summary of the check run output",
default="",
)
output_text: str = SchemaField(
description="Detailed text of the check run output",
default="",
)
class Output(BlockSchema):
class CheckRunResult(BaseModel):
id: int
html_url: str
status: str
check_run: CheckRunResult = SchemaField(
description="Details of the created check run"
)
error: str = SchemaField(
description="Error message if check run creation failed"
)
def __init__(self):
super().__init__(
id="2f45e89a-3b7d-4f22-b89e-6c4f5c7e1234",
description="Creates a new check run for a specific commit in a GitHub repository",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubCreateCheckRunBlock.Input,
output_schema=GithubCreateCheckRunBlock.Output,
test_input={
"repo_url": "https://github.com/owner/repo",
"name": "test-check",
"head_sha": "ce587453ced02b1526dfb4cb910479d431683101",
"status": ChecksStatus.COMPLETED.value,
"conclusion": ChecksConclusion.SUCCESS.value,
"output_title": "Test Results",
"output_summary": "All tests passed",
"credentials": TEST_CREDENTIALS_INPUT,
},
# requires a github app not available to oauth in our current system
disabled=True,
test_credentials=TEST_CREDENTIALS,
test_output=[
(
"check_run",
{
"id": 4,
"html_url": "https://github.com/owner/repo/runs/4",
"status": "completed",
},
),
],
test_mock={
"create_check_run": lambda *args, **kwargs: {
"id": 4,
"html_url": "https://github.com/owner/repo/runs/4",
"status": "completed",
}
},
)
@staticmethod
def create_check_run(
credentials: GithubCredentials,
repo_url: str,
name: str,
head_sha: str,
status: ChecksStatus,
conclusion: Optional[ChecksConclusion] = None,
details_url: Optional[str] = None,
output_title: Optional[str] = None,
output_summary: Optional[str] = None,
output_text: Optional[str] = None,
) -> dict:
api = get_api(credentials)
class CheckRunData(BaseModel):
name: str
head_sha: str
status: str
conclusion: Optional[str] = None
details_url: Optional[str] = None
output: Optional[dict[str, str]] = None
data = CheckRunData(
name=name,
head_sha=head_sha,
status=status.value,
)
if conclusion:
data.conclusion = conclusion.value
if details_url:
data.details_url = details_url
if output_title or output_summary or output_text:
output_data = {
"title": output_title or "",
"summary": output_summary or "",
"text": output_text or "",
}
data.output = output_data
check_runs_url = f"{repo_url}/check-runs"
response = api.post(
check_runs_url, data=data.model_dump_json(exclude_none=True)
)
result = response.json()
return {
"id": result["id"],
"html_url": result["html_url"],
"status": result["status"],
}
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
try:
result = self.create_check_run(
credentials=credentials,
repo_url=input_data.repo_url,
name=input_data.name,
head_sha=input_data.head_sha,
status=input_data.status,
conclusion=input_data.conclusion,
details_url=input_data.details_url,
output_title=input_data.output_title,
output_summary=input_data.output_summary,
output_text=input_data.output_text,
)
yield "check_run", result
except Exception as e:
yield "error", str(e)
class GithubUpdateCheckRunBlock(Block):
"""Block for updating an existing check run on a GitHub repository."""
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo:status")
repo_url: str = SchemaField(
description="URL of the GitHub repository",
placeholder="https://github.com/owner/repo",
)
check_run_id: int = SchemaField(
description="The ID of the check run to update",
)
status: ChecksStatus = SchemaField(
description="New status of the check run",
)
conclusion: ChecksConclusion = SchemaField(
description="The final conclusion of the check (required if status is completed)",
)
output_title: Optional[str] = SchemaField(
description="New title of the check run output",
default=None,
)
output_summary: Optional[str] = SchemaField(
description="New summary of the check run output",
default=None,
)
output_text: Optional[str] = SchemaField(
description="New detailed text of the check run output",
default=None,
)
class Output(BlockSchema):
class CheckRunResult(BaseModel):
id: int
html_url: str
status: str
conclusion: Optional[str]
check_run: CheckRunResult = SchemaField(
description="Details of the updated check run"
)
error: str = SchemaField(description="Error message if check run update failed")
def __init__(self):
super().__init__(
id="8a23c567-9d01-4e56-b789-0c12d3e45678", # Generated UUID
description="Updates an existing check run in a GitHub repository",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubUpdateCheckRunBlock.Input,
output_schema=GithubUpdateCheckRunBlock.Output,
# requires a github app not available to oauth in our current system
disabled=True,
test_input={
"repo_url": "https://github.com/owner/repo",
"check_run_id": 4,
"status": ChecksStatus.COMPLETED.value,
"conclusion": ChecksConclusion.SUCCESS.value,
"output_title": "Updated Results",
"output_summary": "All tests passed after retry",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
(
"check_run",
{
"id": 4,
"html_url": "https://github.com/owner/repo/runs/4",
"status": "completed",
"conclusion": "success",
},
),
],
test_mock={
"update_check_run": lambda *args, **kwargs: {
"id": 4,
"html_url": "https://github.com/owner/repo/runs/4",
"status": "completed",
"conclusion": "success",
}
},
)
@staticmethod
def update_check_run(
credentials: GithubCredentials,
repo_url: str,
check_run_id: int,
status: ChecksStatus,
conclusion: Optional[ChecksConclusion] = None,
output_title: Optional[str] = None,
output_summary: Optional[str] = None,
output_text: Optional[str] = None,
) -> dict:
api = get_api(credentials)
class UpdateCheckRunData(BaseModel):
status: str
conclusion: Optional[str] = None
output: Optional[dict[str, str]] = None
data = UpdateCheckRunData(
status=status.value,
)
if conclusion:
data.conclusion = conclusion.value
if output_title or output_summary or output_text:
output_data = {
"title": output_title or "",
"summary": output_summary or "",
"text": output_text or "",
}
data.output = output_data
check_run_url = f"{repo_url}/check-runs/{check_run_id}"
response = api.patch(
check_run_url, data=data.model_dump_json(exclude_none=True)
)
result = response.json()
return {
"id": result["id"],
"html_url": result["html_url"],
"status": result["status"],
"conclusion": result.get("conclusion"),
}
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
try:
result = self.update_check_run(
credentials=credentials,
repo_url=input_data.repo_url,
check_run_id=input_data.check_run_id,
status=input_data.status,
conclusion=input_data.conclusion,
output_title=input_data.output_title,
output_summary=input_data.output_summary,
output_text=input_data.output_text,
)
yield "check_run", result
except Exception as e:
yield "error", str(e)

View File

@@ -1,3 +1,4 @@
import logging
from urllib.parse import urlparse
from typing_extensions import TypedDict
@@ -5,7 +6,7 @@ from typing_extensions import TypedDict
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
from ._api import get_api
from ._api import convert_comment_url_to_api_endpoint, get_api
from ._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
@@ -14,6 +15,8 @@ from ._auth import (
GithubCredentialsInput,
)
logger = logging.getLogger(__name__)
def is_github_url(url: str) -> bool:
return urlparse(url).netloc == "github.com"
@@ -108,6 +111,228 @@ class GithubCommentBlock(Block):
# --8<-- [end:GithubCommentBlockExample]
class GithubUpdateCommentBlock(Block):
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo")
comment_url: str = SchemaField(
description="URL of the GitHub comment",
placeholder="https://github.com/owner/repo/issues/1#issuecomment-123456789",
default="",
advanced=False,
)
issue_url: str = SchemaField(
description="URL of the GitHub issue or pull request",
placeholder="https://github.com/owner/repo/issues/1",
default="",
)
comment_id: str = SchemaField(
description="ID of the GitHub comment",
placeholder="123456789",
default="",
)
comment: str = SchemaField(
description="Comment to update",
placeholder="Enter your comment",
)
class Output(BlockSchema):
id: int = SchemaField(description="ID of the updated comment")
url: str = SchemaField(description="URL to the comment on GitHub")
error: str = SchemaField(
description="Error message if the comment update failed"
)
def __init__(self):
super().__init__(
id="b3f4d747-10e3-4e69-8c51-f2be1d99c9a7",
description="This block updates a comment on a specified GitHub issue or pull request.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubUpdateCommentBlock.Input,
output_schema=GithubUpdateCommentBlock.Output,
test_input={
"comment_url": "https://github.com/owner/repo/issues/1#issuecomment-123456789",
"comment": "This is an updated comment.",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("id", 123456789),
(
"url",
"https://github.com/owner/repo/issues/1#issuecomment-123456789",
),
],
test_mock={
"update_comment": lambda *args, **kwargs: (
123456789,
"https://github.com/owner/repo/issues/1#issuecomment-123456789",
)
},
)
@staticmethod
def update_comment(
credentials: GithubCredentials, comment_url: str, body_text: str
) -> tuple[int, str]:
api = get_api(credentials, convert_urls=False)
data = {"body": body_text}
url = convert_comment_url_to_api_endpoint(comment_url)
logger.info(url)
response = api.patch(url, json=data)
comment = response.json()
return comment["id"], comment["html_url"]
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
if (
not input_data.comment_url
and input_data.comment_id
and input_data.issue_url
):
parsed_url = urlparse(input_data.issue_url)
path_parts = parsed_url.path.strip("/").split("/")
owner, repo = path_parts[0], path_parts[1]
input_data.comment_url = f"https://api.github.com/repos/{owner}/{repo}/issues/comments/{input_data.comment_id}"
elif (
not input_data.comment_url
and not input_data.comment_id
and input_data.issue_url
):
raise ValueError(
"Must provide either comment_url or comment_id and issue_url"
)
id, url = self.update_comment(
credentials,
input_data.comment_url,
input_data.comment,
)
yield "id", id
yield "url", url
class GithubListCommentsBlock(Block):
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo")
issue_url: str = SchemaField(
description="URL of the GitHub issue or pull request",
placeholder="https://github.com/owner/repo/issues/1",
)
class Output(BlockSchema):
class CommentItem(TypedDict):
id: int
body: str
user: str
url: str
comment: CommentItem = SchemaField(
title="Comment", description="Comments with their ID, body, user, and URL"
)
comments: list[CommentItem] = SchemaField(
description="List of comments with their ID, body, user, and URL"
)
error: str = SchemaField(description="Error message if listing comments failed")
def __init__(self):
super().__init__(
id="c4b5fb63-0005-4a11-b35a-0c2467bd6b59",
description="This block lists all comments for a specified GitHub issue or pull request.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubListCommentsBlock.Input,
output_schema=GithubListCommentsBlock.Output,
test_input={
"issue_url": "https://github.com/owner/repo/issues/1",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
(
"comment",
{
"id": 123456789,
"body": "This is a test comment.",
"user": "test_user",
"url": "https://github.com/owner/repo/issues/1#issuecomment-123456789",
},
),
(
"comments",
[
{
"id": 123456789,
"body": "This is a test comment.",
"user": "test_user",
"url": "https://github.com/owner/repo/issues/1#issuecomment-123456789",
}
],
),
],
test_mock={
"list_comments": lambda *args, **kwargs: [
{
"id": 123456789,
"body": "This is a test comment.",
"user": "test_user",
"url": "https://github.com/owner/repo/issues/1#issuecomment-123456789",
}
]
},
)
@staticmethod
def list_comments(
credentials: GithubCredentials, issue_url: str
) -> list[Output.CommentItem]:
parsed_url = urlparse(issue_url)
path_parts = parsed_url.path.strip("/").split("/")
owner = path_parts[0]
repo = path_parts[1]
# GitHub API uses 'issues' for both issues and pull requests when it comes to comments
issue_number = path_parts[3] # Whether 'issues/123' or 'pull/123'
# Construct the proper API URL directly
api_url = f"https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}/comments"
# Set convert_urls=False since we're already providing an API URL
api = get_api(credentials, convert_urls=False)
response = api.get(api_url)
comments = response.json()
parsed_comments: list[GithubListCommentsBlock.Output.CommentItem] = [
{
"id": comment["id"],
"body": comment["body"],
"user": comment["user"]["login"],
"url": comment["html_url"],
}
for comment in comments
]
return parsed_comments
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
comments = self.list_comments(
credentials,
input_data.issue_url,
)
yield from (("comment", comment) for comment in comments)
yield "comments", comments
class GithubMakeIssueBlock(Block):
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo")

View File

@@ -200,6 +200,7 @@ class GithubReadPullRequestBlock(Block):
include_pr_changes: bool = SchemaField(
description="Whether to include the changes made in the pull request",
default=False,
advanced=False,
)
class Output(BlockSchema):

View File

@@ -0,0 +1,180 @@
from enum import Enum
from typing import Optional
from pydantic import BaseModel
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
from ._api import get_api
from ._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
GithubFineGrainedAPICredentials,
GithubFineGrainedAPICredentialsField,
GithubFineGrainedAPICredentialsInput,
)
class StatusState(Enum):
ERROR = "error"
FAILURE = "failure"
PENDING = "pending"
SUCCESS = "success"
class GithubCreateStatusBlock(Block):
"""Block for creating a commit status on a GitHub repository."""
class Input(BlockSchema):
credentials: GithubFineGrainedAPICredentialsInput = (
GithubFineGrainedAPICredentialsField("repo:status")
)
repo_url: str = SchemaField(
description="URL of the GitHub repository",
placeholder="https://github.com/owner/repo",
)
sha: str = SchemaField(
description="The SHA of the commit to set status for",
)
state: StatusState = SchemaField(
description="The state of the status (error, failure, pending, success)",
)
target_url: Optional[str] = SchemaField(
description="URL with additional details about this status",
default=None,
)
description: Optional[str] = SchemaField(
description="Short description of the status",
default=None,
)
check_name: Optional[str] = SchemaField(
description="Label to differentiate this status from others",
default="AutoGPT Platform Checks",
advanced=False,
)
class Output(BlockSchema):
class StatusResult(BaseModel):
id: int
url: str
state: str
context: str
description: Optional[str]
target_url: Optional[str]
created_at: str
updated_at: str
status: StatusResult = SchemaField(description="Details of the created status")
error: str = SchemaField(description="Error message if status creation failed")
def __init__(self):
super().__init__(
id="3d67f123-a4b5-4c89-9d01-2e34f5c67890", # Generated UUID
description="Creates a new commit status in a GitHub repository",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubCreateStatusBlock.Input,
output_schema=GithubCreateStatusBlock.Output,
test_input={
"repo_url": "https://github.com/owner/repo",
"sha": "ce587453ced02b1526dfb4cb910479d431683101",
"state": StatusState.SUCCESS.value,
"target_url": "https://example.com/build/status",
"description": "The build succeeded!",
"check_name": "continuous-integration/jenkins",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
(
"status",
{
"id": 1234567890,
"url": "https://api.github.com/repos/owner/repo/statuses/ce587453ced02b1526dfb4cb910479d431683101",
"state": "success",
"context": "continuous-integration/jenkins",
"description": "The build succeeded!",
"target_url": "https://example.com/build/status",
"created_at": "2024-01-21T10:00:00Z",
"updated_at": "2024-01-21T10:00:00Z",
},
),
],
test_mock={
"create_status": lambda *args, **kwargs: {
"id": 1234567890,
"url": "https://api.github.com/repos/owner/repo/statuses/ce587453ced02b1526dfb4cb910479d431683101",
"state": "success",
"context": "continuous-integration/jenkins",
"description": "The build succeeded!",
"target_url": "https://example.com/build/status",
"created_at": "2024-01-21T10:00:00Z",
"updated_at": "2024-01-21T10:00:00Z",
}
},
)
@staticmethod
def create_status(
credentials: GithubFineGrainedAPICredentials,
repo_url: str,
sha: str,
state: StatusState,
target_url: Optional[str] = None,
description: Optional[str] = None,
context: str = "default",
) -> dict:
api = get_api(credentials)
class StatusData(BaseModel):
state: str
target_url: Optional[str] = None
description: Optional[str] = None
context: str
data = StatusData(
state=state.value,
context=context,
)
if target_url:
data.target_url = target_url
if description:
data.description = description
status_url = f"{repo_url}/statuses/{sha}"
response = api.post(status_url, data=data.model_dump_json(exclude_none=True))
result = response.json()
return {
"id": result["id"],
"url": result["url"],
"state": result["state"],
"context": result["context"],
"description": result.get("description"),
"target_url": result.get("target_url"),
"created_at": result["created_at"],
"updated_at": result["updated_at"],
}
def run(
self,
input_data: Input,
*,
credentials: GithubFineGrainedAPICredentials,
**kwargs,
) -> BlockOutput:
try:
result = self.create_status(
credentials=credentials,
repo_url=input_data.repo_url,
sha=input_data.sha,
state=input_data.state,
target_url=input_data.target_url,
description=input_data.description,
context=input_data.check_name or "AutoGPT Platform Checks",
)
yield "status", result
except Exception as e:
yield "error", str(e)

View File

@@ -142,6 +142,16 @@ class IdeogramModelBlock(Block):
title="Color Palette Preset",
advanced=True,
)
custom_color_palette: Optional[list[str]] = SchemaField(
description=(
"Only available for model version V_2 or V_2_TURBO. Provide one or more color hex codes "
"(e.g., ['#000030', '#1C0C47', '#9900FF', '#4285F4', '#FFFFFF']) to define a custom color "
"palette. Only used if 'color_palette_name' is 'NONE'."
),
default=None,
title="Custom Color Palette",
advanced=True,
)
class Output(BlockSchema):
result: str = SchemaField(description="Generated image URL")
@@ -151,7 +161,7 @@ class IdeogramModelBlock(Block):
super().__init__(
id="6ab085e2-20b3-4055-bc3e-08036e01eca6",
description="This block runs Ideogram models with both simple and advanced settings.",
categories={BlockCategory.AI},
categories={BlockCategory.AI, BlockCategory.MULTIMEDIA},
input_schema=IdeogramModelBlock.Input,
output_schema=IdeogramModelBlock.Output,
test_input={
@@ -164,6 +174,13 @@ class IdeogramModelBlock(Block):
"style_type": StyleType.AUTO,
"negative_prompt": None,
"color_palette_name": ColorPalettePreset.NONE,
"custom_color_palette": [
"#000030",
"#1C0C47",
"#9900FF",
"#4285F4",
"#FFFFFF",
],
"credentials": TEST_CREDENTIALS_INPUT,
},
test_output=[
@@ -173,7 +190,7 @@ class IdeogramModelBlock(Block):
),
],
test_mock={
"run_model": lambda api_key, model_name, prompt, seed, aspect_ratio, magic_prompt_option, style_type, negative_prompt, color_palette_name: "https://ideogram.ai/api/images/test-generated-image-url.png",
"run_model": lambda api_key, model_name, prompt, seed, aspect_ratio, magic_prompt_option, style_type, negative_prompt, color_palette_name, custom_colors: "https://ideogram.ai/api/images/test-generated-image-url.png",
"upscale_image": lambda api_key, image_url: "https://ideogram.ai/api/images/test-upscaled-image-url.png",
},
test_credentials=TEST_CREDENTIALS,
@@ -195,6 +212,7 @@ class IdeogramModelBlock(Block):
style_type=input_data.style_type.value,
negative_prompt=input_data.negative_prompt,
color_palette_name=input_data.color_palette_name.value,
custom_colors=input_data.custom_color_palette,
)
# Step 2: Upscale the image if requested
@@ -217,6 +235,7 @@ class IdeogramModelBlock(Block):
style_type: str,
negative_prompt: Optional[str],
color_palette_name: str,
custom_colors: Optional[list[str]],
):
url = "https://api.ideogram.ai/generate"
headers = {
@@ -241,7 +260,11 @@ class IdeogramModelBlock(Block):
data["image_request"]["negative_prompt"] = negative_prompt
if color_palette_name != "NONE":
data["image_request"]["color_palette"] = {"name": color_palette_name}
data["color_palette"] = {"name": color_palette_name}
elif custom_colors:
data["color_palette"] = {
"members": [{"color_hex": color} for color in custom_colors]
}
try:
response = requests.post(url, json=data, headers=headers)
@@ -267,9 +290,7 @@ class IdeogramModelBlock(Block):
response = requests.post(
url,
headers=headers,
data={
"image_request": "{}", # Empty JSON object
},
data={"image_request": "{}"},
files=files,
)

View File

@@ -0,0 +1,272 @@
from __future__ import annotations
import json
from typing import Any, Dict, Optional
from backend.blocks.linear._auth import LinearCredentials
from backend.blocks.linear.models import (
CreateCommentResponse,
CreateIssueResponse,
Issue,
Project,
)
from backend.util.request import Requests
class LinearAPIException(Exception):
def __init__(self, message: str, status_code: int):
super().__init__(message)
self.status_code = status_code
class LinearClient:
"""Client for the Linear API
If you're looking for the schema: https://studio.apollographql.com/public/Linear-API/variant/current/schema
"""
API_URL = "https://api.linear.app/graphql"
def __init__(
self,
credentials: LinearCredentials | None = None,
custom_requests: Optional[Requests] = None,
):
if custom_requests:
self._requests = custom_requests
else:
headers: Dict[str, str] = {
"Content-Type": "application/json",
}
if credentials:
headers["Authorization"] = credentials.auth_header()
self._requests = Requests(
extra_headers=headers,
trusted_origins=["https://api.linear.app"],
raise_for_status=False,
)
def _execute_graphql_request(
self, query: str, variables: dict | None = None
) -> Any:
"""
Executes a GraphQL request against the Linear API and returns the response data.
Args:
query: The GraphQL query string.
variables (optional): Any GraphQL query variables
Returns:
The parsed JSON response data, or raises a LinearAPIException on error.
"""
payload: Dict[str, Any] = {"query": query}
if variables:
payload["variables"] = variables
response = self._requests.post(self.API_URL, json=payload)
if not response.ok:
try:
error_data = response.json()
error_message = error_data.get("errors", [{}])[0].get("message", "")
except json.JSONDecodeError:
error_message = response.text
raise LinearAPIException(
f"Linear API request failed ({response.status_code}): {error_message}",
response.status_code,
)
response_data = response.json()
if "errors" in response_data:
error_messages = [
error.get("message", "") for error in response_data["errors"]
]
raise LinearAPIException(
f"Linear API returned errors: {', '.join(error_messages)}",
response.status_code,
)
return response_data["data"]
def query(self, query: str, variables: Optional[dict] = None) -> dict:
"""Executes a GraphQL query.
Args:
query: The GraphQL query string.
variables: Query variables, if any.
Returns:
The response data.
"""
return self._execute_graphql_request(query, variables)
def mutate(self, mutation: str, variables: Optional[dict] = None) -> dict:
"""Executes a GraphQL mutation.
Args:
mutation: The GraphQL mutation string.
variables: Query variables, if any.
Returns:
The response data.
"""
return self._execute_graphql_request(mutation, variables)
def try_create_comment(self, issue_id: str, comment: str) -> CreateCommentResponse:
try:
mutation = """
mutation CommentCreate($input: CommentCreateInput!) {
commentCreate(input: $input) {
success
comment {
id
body
}
}
}
"""
variables = {
"input": {
"body": comment,
"issueId": issue_id,
}
}
added_comment = self.mutate(mutation, variables)
# Select the commentCreate field from the mutation response
return CreateCommentResponse(**added_comment["commentCreate"])
except LinearAPIException as e:
raise e
def try_get_team_by_name(self, team_name: str) -> str:
try:
query = """
query GetTeamId($searchTerm: String!) {
teams(filter: {
or: [
{ name: { eqIgnoreCase: $searchTerm } },
{ key: { eqIgnoreCase: $searchTerm } }
]
}) {
nodes {
id
name
key
}
}
}
"""
variables: dict[str, Any] = {
"searchTerm": team_name,
}
team_id = self.query(query, variables)
return team_id["teams"]["nodes"][0]["id"]
except LinearAPIException as e:
raise e
def try_create_issue(
self,
team_id: str,
title: str,
description: str | None = None,
priority: int | None = None,
project_id: str | None = None,
) -> CreateIssueResponse:
try:
mutation = """
mutation IssueCreate($input: IssueCreateInput!) {
issueCreate(input: $input) {
issue {
title
description
id
identifier
priority
}
}
}
"""
variables: dict[str, Any] = {
"input": {
"teamId": team_id,
"title": title,
}
}
if project_id:
variables["input"]["projectId"] = project_id
if description:
variables["input"]["description"] = description
if priority:
variables["input"]["priority"] = priority
added_issue = self.mutate(mutation, variables)
return CreateIssueResponse(**added_issue["issueCreate"])
except LinearAPIException as e:
raise e
def try_search_projects(self, term: str) -> list[Project]:
try:
query = """
query SearchProjects($term: String!, $includeComments: Boolean!) {
searchProjects(term: $term, includeComments: $includeComments) {
nodes {
id
name
description
priority
progress
content
}
}
}
"""
variables: dict[str, Any] = {
"term": term,
"includeComments": True,
}
projects = self.query(query, variables)
return [
Project(**project) for project in projects["searchProjects"]["nodes"]
]
except LinearAPIException as e:
raise e
def try_search_issues(self, term: str) -> list[Issue]:
try:
query = """
query SearchIssues($term: String!, $includeComments: Boolean!) {
searchIssues(term: $term, includeComments: $includeComments) {
nodes {
id
identifier
title
description
priority
}
}
}
"""
variables: dict[str, Any] = {
"term": term,
"includeComments": True,
}
issues = self.query(query, variables)
return [Issue(**issue) for issue in issues["searchIssues"]["nodes"]]
except LinearAPIException as e:
raise e

View File

@@ -0,0 +1,101 @@
from enum import Enum
from typing import Literal
from pydantic import SecretStr
from backend.data.model import (
APIKeyCredentials,
CredentialsField,
CredentialsMetaInput,
OAuth2Credentials,
)
from backend.integrations.providers import ProviderName
from backend.util.settings import Secrets
secrets = Secrets()
LINEAR_OAUTH_IS_CONFIGURED = bool(
secrets.linear_client_id and secrets.linear_client_secret
)
LinearCredentials = OAuth2Credentials | APIKeyCredentials
# LinearCredentialsInput = CredentialsMetaInput[
# Literal[ProviderName.LINEAR],
# Literal["oauth2", "api_key"] if LINEAR_OAUTH_IS_CONFIGURED else Literal["oauth2"],
# ]
LinearCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.LINEAR], Literal["oauth2"]
]
# (required) Comma separated list of scopes:
# read - (Default) Read access for the user's account. This scope will always be present.
# write - Write access for the user's account. If your application only needs to create comments, use a more targeted scope
# issues:create - Allows creating new issues and their attachments
# comments:create - Allows creating new issue comments
# timeSchedule:write - Allows creating and modifying time schedules
# admin - Full access to admin level endpoints. You should never ask for this permission unless it's absolutely needed
class LinearScope(str, Enum):
READ = "read"
WRITE = "write"
ISSUES_CREATE = "issues:create"
COMMENTS_CREATE = "comments:create"
TIME_SCHEDULE_WRITE = "timeSchedule:write"
ADMIN = "admin"
def LinearCredentialsField(scopes: list[LinearScope]) -> LinearCredentialsInput:
"""
Creates a Linear credentials input on a block.
Params:
scope: The authorization scope needed for the block to work. ([list of available scopes](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes))
""" # noqa
return CredentialsField(
required_scopes=set([LinearScope.READ.value]).union(
set([scope.value for scope in scopes])
),
description="The Linear integration can be used with OAuth, "
"or any API key with sufficient permissions for the blocks it is used on.",
)
TEST_CREDENTIALS_OAUTH = OAuth2Credentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="linear",
title="Mock Linear API key",
username="mock-linear-username",
access_token=SecretStr("mock-linear-access-token"),
access_token_expires_at=None,
refresh_token=SecretStr("mock-linear-refresh-token"),
refresh_token_expires_at=None,
scopes=["mock-linear-scopes"],
)
TEST_CREDENTIALS_API_KEY = APIKeyCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="linear",
title="Mock Linear API key",
api_key=SecretStr("mock-linear-api-key"),
expires_at=None,
)
TEST_CREDENTIALS_INPUT_OAUTH = {
"provider": TEST_CREDENTIALS_OAUTH.provider,
"id": TEST_CREDENTIALS_OAUTH.id,
"type": TEST_CREDENTIALS_OAUTH.type,
"title": TEST_CREDENTIALS_OAUTH.type,
}
TEST_CREDENTIALS_INPUT_API_KEY = {
"provider": TEST_CREDENTIALS_API_KEY.provider,
"id": TEST_CREDENTIALS_API_KEY.id,
"type": TEST_CREDENTIALS_API_KEY.type,
"title": TEST_CREDENTIALS_API_KEY.type,
}

View File

@@ -0,0 +1,83 @@
from backend.blocks.linear._api import LinearAPIException, LinearClient
from backend.blocks.linear._auth import (
LINEAR_OAUTH_IS_CONFIGURED,
TEST_CREDENTIALS_INPUT_OAUTH,
TEST_CREDENTIALS_OAUTH,
LinearCredentials,
LinearCredentialsField,
LinearCredentialsInput,
LinearScope,
)
from backend.blocks.linear.models import CreateCommentResponse
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class LinearCreateCommentBlock(Block):
"""Block for creating comments on Linear issues"""
class Input(BlockSchema):
credentials: LinearCredentialsInput = LinearCredentialsField(
scopes=[LinearScope.COMMENTS_CREATE],
)
issue_id: str = SchemaField(description="ID of the issue to comment on")
comment: str = SchemaField(description="Comment text to add to the issue")
class Output(BlockSchema):
comment_id: str = SchemaField(description="ID of the created comment")
comment_body: str = SchemaField(
description="Text content of the created comment"
)
error: str = SchemaField(description="Error message if comment creation failed")
def __init__(self):
super().__init__(
id="8f7d3a2e-9b5c-4c6a-8f1d-7c8b3e4a5d6c",
description="Creates a new comment on a Linear issue",
input_schema=self.Input,
output_schema=self.Output,
categories={BlockCategory.PRODUCTIVITY, BlockCategory.ISSUE_TRACKING},
test_input={
"issue_id": "TEST-123",
"comment": "Test comment",
"credentials": TEST_CREDENTIALS_INPUT_OAUTH,
},
disabled=not LINEAR_OAUTH_IS_CONFIGURED,
test_credentials=TEST_CREDENTIALS_OAUTH,
test_output=[("comment_id", "abc123"), ("comment_body", "Test comment")],
test_mock={
"create_comment": lambda *args, **kwargs: (
"abc123",
"Test comment",
)
},
)
@staticmethod
def create_comment(
credentials: LinearCredentials, issue_id: str, comment: str
) -> tuple[str, str]:
client = LinearClient(credentials=credentials)
response: CreateCommentResponse = client.try_create_comment(
issue_id=issue_id, comment=comment
)
return response.comment.id, response.comment.body
def run(
self, input_data: Input, *, credentials: LinearCredentials, **kwargs
) -> BlockOutput:
"""Execute the comment creation"""
try:
comment_id, comment_body = self.create_comment(
credentials=credentials,
issue_id=input_data.issue_id,
comment=input_data.comment,
)
yield "comment_id", comment_id
yield "comment_body", comment_body
except LinearAPIException as e:
yield "error", str(e)
except Exception as e:
yield "error", f"Unexpected error: {str(e)}"

View File

@@ -0,0 +1,189 @@
from backend.blocks.linear._api import LinearAPIException, LinearClient
from backend.blocks.linear._auth import (
LINEAR_OAUTH_IS_CONFIGURED,
TEST_CREDENTIALS_INPUT_OAUTH,
TEST_CREDENTIALS_OAUTH,
LinearCredentials,
LinearCredentialsField,
LinearCredentialsInput,
LinearScope,
)
from backend.blocks.linear.models import CreateIssueResponse, Issue
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class LinearCreateIssueBlock(Block):
"""Block for creating issues on Linear"""
class Input(BlockSchema):
credentials: LinearCredentialsInput = LinearCredentialsField(
scopes=[LinearScope.ISSUES_CREATE],
)
title: str = SchemaField(description="Title of the issue")
description: str | None = SchemaField(description="Description of the issue")
team_name: str = SchemaField(
description="Name of the team to create the issue on"
)
priority: int | None = SchemaField(
description="Priority of the issue",
default=None,
minimum=0,
maximum=4,
)
project_name: str | None = SchemaField(
description="Name of the project to create the issue on",
default=None,
)
class Output(BlockSchema):
issue_id: str = SchemaField(description="ID of the created issue")
issue_title: str = SchemaField(description="Title of the created issue")
error: str = SchemaField(description="Error message if issue creation failed")
def __init__(self):
super().__init__(
id="f9c68f55-dcca-40a8-8771-abf9601680aa",
description="Creates a new issue on Linear",
disabled=not LINEAR_OAUTH_IS_CONFIGURED,
input_schema=self.Input,
output_schema=self.Output,
categories={BlockCategory.PRODUCTIVITY, BlockCategory.ISSUE_TRACKING},
test_input={
"title": "Test issue",
"description": "Test description",
"team_name": "Test team",
"project_name": "Test project",
"credentials": TEST_CREDENTIALS_INPUT_OAUTH,
},
test_credentials=TEST_CREDENTIALS_OAUTH,
test_output=[("issue_id", "abc123"), ("issue_title", "Test issue")],
test_mock={
"create_issue": lambda *args, **kwargs: (
"abc123",
"Test issue",
)
},
)
@staticmethod
def create_issue(
credentials: LinearCredentials,
team_name: str,
title: str,
description: str | None = None,
priority: int | None = None,
project_name: str | None = None,
) -> tuple[str, str]:
client = LinearClient(credentials=credentials)
team_id = client.try_get_team_by_name(team_name=team_name)
project_id: str | None = None
if project_name:
projects = client.try_search_projects(term=project_name)
if projects:
project_id = projects[0].id
else:
raise LinearAPIException("Project not found", status_code=404)
response: CreateIssueResponse = client.try_create_issue(
team_id=team_id,
title=title,
description=description,
priority=priority,
project_id=project_id,
)
return response.issue.identifier, response.issue.title
def run(
self, input_data: Input, *, credentials: LinearCredentials, **kwargs
) -> BlockOutput:
"""Execute the issue creation"""
try:
issue_id, issue_title = self.create_issue(
credentials=credentials,
team_name=input_data.team_name,
title=input_data.title,
description=input_data.description,
priority=input_data.priority,
project_name=input_data.project_name,
)
yield "issue_id", issue_id
yield "issue_title", issue_title
except LinearAPIException as e:
yield "error", str(e)
except Exception as e:
yield "error", f"Unexpected error: {str(e)}"
class LinearSearchIssuesBlock(Block):
"""Block for searching issues on Linear"""
class Input(BlockSchema):
term: str = SchemaField(description="Term to search for issues")
credentials: LinearCredentialsInput = LinearCredentialsField(
scopes=[LinearScope.READ],
)
class Output(BlockSchema):
issues: list[Issue] = SchemaField(description="List of issues")
def __init__(self):
super().__init__(
id="b5a2a0e6-26b4-4c5b-8a42-bc79e9cb65c2",
description="Searches for issues on Linear",
input_schema=self.Input,
output_schema=self.Output,
disabled=not LINEAR_OAUTH_IS_CONFIGURED,
test_input={
"term": "Test issue",
"credentials": TEST_CREDENTIALS_INPUT_OAUTH,
},
test_credentials=TEST_CREDENTIALS_OAUTH,
test_output=[
(
"issues",
[
Issue(
id="abc123",
identifier="abc123",
title="Test issue",
description="Test description",
priority=1,
)
],
)
],
test_mock={
"search_issues": lambda *args, **kwargs: [
Issue(
id="abc123",
identifier="abc123",
title="Test issue",
description="Test description",
priority=1,
)
]
},
)
@staticmethod
def search_issues(
credentials: LinearCredentials,
term: str,
) -> list[Issue]:
client = LinearClient(credentials=credentials)
response: list[Issue] = client.try_search_issues(term=term)
return response
def run(
self, input_data: Input, *, credentials: LinearCredentials, **kwargs
) -> BlockOutput:
"""Execute the issue search"""
try:
issues = self.search_issues(credentials=credentials, term=input_data.term)
yield "issues", issues
except LinearAPIException as e:
yield "error", str(e)
except Exception as e:
yield "error", f"Unexpected error: {str(e)}"

View File

@@ -0,0 +1,41 @@
from pydantic import BaseModel
class Comment(BaseModel):
id: str
body: str
class CreateCommentInput(BaseModel):
body: str
issueId: str
class CreateCommentResponse(BaseModel):
success: bool
comment: Comment
class CreateCommentResponseWrapper(BaseModel):
commentCreate: CreateCommentResponse
class Issue(BaseModel):
id: str
identifier: str
title: str
description: str | None
priority: int
class CreateIssueResponse(BaseModel):
issue: Issue
class Project(BaseModel):
id: str
name: str
description: str
priority: int
progress: int
content: str

View File

@@ -0,0 +1,95 @@
from backend.blocks.linear._api import LinearAPIException, LinearClient
from backend.blocks.linear._auth import (
LINEAR_OAUTH_IS_CONFIGURED,
TEST_CREDENTIALS_INPUT_OAUTH,
TEST_CREDENTIALS_OAUTH,
LinearCredentials,
LinearCredentialsField,
LinearCredentialsInput,
LinearScope,
)
from backend.blocks.linear.models import Project
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class LinearSearchProjectsBlock(Block):
"""Block for searching projects on Linear"""
class Input(BlockSchema):
credentials: LinearCredentialsInput = LinearCredentialsField(
scopes=[LinearScope.READ],
)
term: str = SchemaField(description="Term to search for projects")
class Output(BlockSchema):
projects: list[Project] = SchemaField(description="List of projects")
error: str = SchemaField(description="Error message if issue creation failed")
def __init__(self):
super().__init__(
id="446a1d35-9d8f-4ac5-83ea-7684ec50e6af",
description="Searches for projects on Linear",
input_schema=self.Input,
output_schema=self.Output,
categories={BlockCategory.PRODUCTIVITY, BlockCategory.ISSUE_TRACKING},
test_input={
"term": "Test project",
"credentials": TEST_CREDENTIALS_INPUT_OAUTH,
},
disabled=not LINEAR_OAUTH_IS_CONFIGURED,
test_credentials=TEST_CREDENTIALS_OAUTH,
test_output=[
(
"projects",
[
Project(
id="abc123",
name="Test project",
description="Test description",
priority=1,
progress=1,
content="Test content",
)
],
)
],
test_mock={
"search_projects": lambda *args, **kwargs: [
Project(
id="abc123",
name="Test project",
description="Test description",
priority=1,
progress=1,
content="Test content",
)
]
},
)
@staticmethod
def search_projects(
credentials: LinearCredentials,
term: str,
) -> list[Project]:
client = LinearClient(credentials=credentials)
response: list[Project] = client.try_search_projects(term=term)
return response
def run(
self, input_data: Input, *, credentials: LinearCredentials, **kwargs
) -> BlockOutput:
"""Execute the project search"""
try:
projects = self.search_projects(
credentials=credentials,
term=input_data.term,
)
yield "projects", projects
except LinearAPIException as e:
yield "error", str(e)
except Exception as e:
yield "error", f"Unexpected error: {str(e)}"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,245 @@
import os
import tempfile
from typing import Literal, Optional
from moviepy.audio.io.AudioFileClip import AudioFileClip
from moviepy.video.fx.Loop import Loop
from moviepy.video.io.VideoFileClip import VideoFileClip
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
from backend.util.file import MediaFile, get_exec_file_path, store_media_file
class MediaDurationBlock(Block):
class Input(BlockSchema):
media_in: MediaFile = SchemaField(
description="Media input (URL, data URI, or local path)."
)
is_video: bool = SchemaField(
description="Whether the media is a video (True) or audio (False).",
default=True,
)
class Output(BlockSchema):
duration: float = SchemaField(
description="Duration of the media file (in seconds)."
)
error: str = SchemaField(
description="Error message if something fails.", default=""
)
def __init__(self):
super().__init__(
id="d8b91fd4-da26-42d4-8ecb-8b196c6d84b6",
description="Block to get the duration of a media file.",
categories={BlockCategory.MULTIMEDIA},
input_schema=MediaDurationBlock.Input,
output_schema=MediaDurationBlock.Output,
)
def run(
self,
input_data: Input,
*,
graph_exec_id: str,
**kwargs,
) -> BlockOutput:
# 1) Store the input media locally
local_media_path = store_media_file(
graph_exec_id=graph_exec_id,
file=input_data.media_in,
return_content=False,
)
media_abspath = get_exec_file_path(graph_exec_id, local_media_path)
# 2) Load the clip
if input_data.is_video:
clip = VideoFileClip(media_abspath)
else:
clip = AudioFileClip(media_abspath)
yield "duration", clip.duration
class LoopVideoBlock(Block):
"""
Block for looping (repeating) a video clip until a given duration or number of loops.
"""
class Input(BlockSchema):
video_in: MediaFile = SchemaField(
description="The input video (can be a URL, data URI, or local path)."
)
# Provide EITHER a `duration` or `n_loops` or both. We'll demonstrate `duration`.
duration: Optional[float] = SchemaField(
description="Target duration (in seconds) to loop the video to. If omitted, defaults to no looping.",
default=None,
ge=0.0,
)
n_loops: Optional[int] = SchemaField(
description="Number of times to repeat the video. If omitted, defaults to 1 (no repeat).",
default=None,
ge=1,
)
output_return_type: Literal["file_path", "data_uri"] = SchemaField(
description="How to return the output video. Either a relative path or base64 data URI.",
default="file_path",
)
class Output(BlockSchema):
video_out: str = SchemaField(
description="Looped video returned either as a relative path or a data URI."
)
error: str = SchemaField(
description="Error message if something fails.", default=""
)
def __init__(self):
super().__init__(
id="8bf9eef6-5451-4213-b265-25306446e94b",
description="Block to loop a video to a given duration or number of repeats.",
categories={BlockCategory.MULTIMEDIA},
input_schema=LoopVideoBlock.Input,
output_schema=LoopVideoBlock.Output,
)
def run(
self,
input_data: Input,
*,
node_exec_id: str,
graph_exec_id: str,
**kwargs,
) -> BlockOutput:
# 1) Store the input video locally
local_video_path = store_media_file(
graph_exec_id=graph_exec_id,
file=input_data.video_in,
return_content=False,
)
input_abspath = get_exec_file_path(graph_exec_id, local_video_path)
# 2) Load the clip
clip = VideoFileClip(input_abspath)
# 3) Apply the loop effect
looped_clip = clip
if input_data.duration:
# Loop until we reach the specified duration
looped_clip = looped_clip.with_effects([Loop(duration=input_data.duration)])
elif input_data.n_loops:
looped_clip = looped_clip.with_effects([Loop(n=input_data.n_loops)])
else:
raise ValueError("Either 'duration' or 'n_loops' must be provided.")
assert isinstance(looped_clip, VideoFileClip)
# 4) Save the looped output
output_filename = MediaFile(
f"{node_exec_id}_looped_{os.path.basename(local_video_path)}"
)
output_abspath = get_exec_file_path(graph_exec_id, output_filename)
looped_clip = looped_clip.with_audio(clip.audio)
looped_clip.write_videofile(output_abspath, codec="libx264", audio_codec="aac")
# Return as data URI
video_out = store_media_file(
graph_exec_id=graph_exec_id,
file=output_filename,
return_content=input_data.output_return_type == "data_uri",
)
yield "video_out", video_out
class AddAudioToVideoBlock(Block):
"""
Block that adds (attaches) an audio track to an existing video.
Optionally scale the volume of the new track.
"""
class Input(BlockSchema):
video_in: MediaFile = SchemaField(
description="Video input (URL, data URI, or local path)."
)
audio_in: MediaFile = SchemaField(
description="Audio input (URL, data URI, or local path)."
)
volume: float = SchemaField(
description="Volume scale for the newly attached audio track (1.0 = original).",
default=1.0,
)
output_return_type: Literal["file_path", "data_uri"] = SchemaField(
description="Return the final output as a relative path or base64 data URI.",
default="file_path",
)
class Output(BlockSchema):
video_out: MediaFile = SchemaField(
description="Final video (with attached audio), as a path or data URI."
)
error: str = SchemaField(
description="Error message if something fails.", default=""
)
def __init__(self):
super().__init__(
id="3503748d-62b6-4425-91d6-725b064af509",
description="Block to attach an audio file to a video file using moviepy.",
categories={BlockCategory.MULTIMEDIA},
input_schema=AddAudioToVideoBlock.Input,
output_schema=AddAudioToVideoBlock.Output,
)
def run(
self,
input_data: Input,
*,
node_exec_id: str,
graph_exec_id: str,
**kwargs,
) -> BlockOutput:
# 1) Store the inputs locally
local_video_path = store_media_file(
graph_exec_id=graph_exec_id,
file=input_data.video_in,
return_content=False,
)
local_audio_path = store_media_file(
graph_exec_id=graph_exec_id,
file=input_data.audio_in,
return_content=False,
)
abs_temp_dir = os.path.join(tempfile.gettempdir(), "exec_file", graph_exec_id)
video_abspath = os.path.join(abs_temp_dir, local_video_path)
audio_abspath = os.path.join(abs_temp_dir, local_audio_path)
# 2) Load video + audio with moviepy
video_clip = VideoFileClip(video_abspath)
audio_clip = AudioFileClip(audio_abspath)
# Optionally scale volume
if input_data.volume != 1.0:
audio_clip = audio_clip.with_volume_scaled(input_data.volume)
# 3) Attach the new audio track
final_clip = video_clip.with_audio(audio_clip)
# 4) Write to output file
output_filename = MediaFile(
f"{node_exec_id}_audio_attached_{os.path.basename(local_video_path)}"
)
output_abspath = os.path.join(abs_temp_dir, output_filename)
final_clip.write_videofile(output_abspath, codec="libx264", audio_codec="aac")
# 5) Return either path or data URI
video_out = store_media_file(
graph_exec_id=graph_exec_id,
file=output_filename,
return_content=input_data.output_return_type == "data_uri",
)
yield "video_out", video_out

View File

@@ -0,0 +1,338 @@
from typing import Any, Literal, Optional, Union
from mem0 import MemoryClient
from pydantic import BaseModel, SecretStr
from backend.data.block import Block, BlockOutput, BlockSchema
from backend.data.model import (
APIKeyCredentials,
CredentialsField,
CredentialsMetaInput,
SchemaField,
)
from backend.integrations.providers import ProviderName
TEST_CREDENTIALS = APIKeyCredentials(
id="ed55ac19-356e-4243-a6cb-bc599e9b716f",
provider="mem0",
api_key=SecretStr("mock-mem0-api-key"),
title="Mock Mem0 API key",
expires_at=None,
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
class Mem0Base:
"""Base class with shared utilities for Mem0 blocks"""
@staticmethod
def _get_client(credentials: APIKeyCredentials) -> MemoryClient:
"""Get initialized Mem0 client"""
return MemoryClient(api_key=credentials.api_key.get_secret_value())
Filter = dict[str, list[dict[str, str | dict[str, list[str]]]]]
class Conversation(BaseModel):
discriminator: Literal["conversation"]
messages: list[dict[str, str]]
class Content(BaseModel):
discriminator: Literal["content"]
content: str
class AddMemoryBlock(Block, Mem0Base):
"""Block for adding memories to Mem0
Always limited by user_id and optional graph_id and graph_exec_id"""
class Input(BlockSchema):
credentials: CredentialsMetaInput[
Literal[ProviderName.MEM0], Literal["api_key"]
] = CredentialsField(description="Mem0 API key credentials")
content: Union[Content, Conversation] = SchemaField(
discriminator="discriminator",
description="Content to add - either a string or list of message objects as output from an AI block",
default=Content(discriminator="content", content="I'm a vegetarian"),
)
metadata: dict[str, Any] = SchemaField(
description="Optional metadata for the memory", default={}
)
limit_memory_to_run: bool = SchemaField(
description="Limit the memory to the run", default=False
)
limit_memory_to_agent: bool = SchemaField(
description="Limit the memory to the agent", default=False
)
class Output(BlockSchema):
action: str = SchemaField(description="Action of the operation")
memory: str = SchemaField(description="Memory created")
error: str = SchemaField(description="Error message if operation fails")
def __init__(self):
super().__init__(
id="dce97578-86be-45a4-ae50-f6de33fc935a",
description="Add new memories to Mem0 with user segmentation",
input_schema=AddMemoryBlock.Input,
output_schema=AddMemoryBlock.Output,
test_input=[
{
"content": {
"discriminator": "conversation",
"messages": [{"role": "user", "content": "I'm a vegetarian"}],
},
"metadata": {"food": "vegetarian"},
"credentials": TEST_CREDENTIALS_INPUT,
},
{
"content": {
"discriminator": "content",
"content": "I am a vegetarian",
},
"metadata": {"food": "vegetarian"},
"credentials": TEST_CREDENTIALS_INPUT,
},
],
test_output=[("action", "NO_CHANGE"), ("action", "NO_CHANGE")],
test_credentials=TEST_CREDENTIALS,
test_mock={"_get_client": lambda credentials: MockMemoryClient()},
)
def run(
self,
input_data: Input,
*,
credentials: APIKeyCredentials,
user_id: str,
graph_id: str,
graph_exec_id: str,
**kwargs
) -> BlockOutput:
try:
client = self._get_client(credentials)
if isinstance(input_data.content, Conversation):
messages = input_data.content.messages
else:
messages = [{"role": "user", "content": input_data.content}]
params = {
"user_id": user_id,
"output_format": "v1.1",
"metadata": input_data.metadata,
}
if input_data.limit_memory_to_run:
params["run_id"] = graph_exec_id
if input_data.limit_memory_to_agent:
params["agent_id"] = graph_id
# Use the client to add memory
result = client.add(
messages,
**params,
)
if len(result.get("results", [])) > 0:
for result in result.get("results", []):
yield "action", result["event"]
yield "memory", result["memory"]
else:
yield "action", "NO_CHANGE"
except Exception as e:
yield "error", str(object=e)
class SearchMemoryBlock(Block, Mem0Base):
"""Block for searching memories in Mem0"""
class Input(BlockSchema):
credentials: CredentialsMetaInput[
Literal[ProviderName.MEM0], Literal["api_key"]
] = CredentialsField(description="Mem0 API key credentials")
query: str = SchemaField(
description="Search query",
advanced=False,
)
trigger: bool = SchemaField(
description="An unused field that is used to (re-)trigger the block when you have no other inputs",
default=False,
advanced=False,
)
categories_filter: list[str] = SchemaField(
description="Categories to filter by",
default=[],
advanced=True,
)
limit_memory_to_run: bool = SchemaField(
description="Limit the memory to the run", default=False
)
limit_memory_to_agent: bool = SchemaField(
description="Limit the memory to the agent", default=True
)
class Output(BlockSchema):
memories: Any = SchemaField(description="List of matching memories")
error: str = SchemaField(description="Error message if operation fails")
def __init__(self):
super().__init__(
id="bd7c84e3-e073-4b75-810c-600886ec8a5b",
description="Search memories in Mem0 by user",
input_schema=SearchMemoryBlock.Input,
output_schema=SearchMemoryBlock.Output,
test_input={
"query": "vegetarian preferences",
"credentials": TEST_CREDENTIALS_INPUT,
"top_k": 10,
"rerank": True,
},
test_output=[
("memories", [{"id": "test-memory", "content": "test content"}])
],
test_credentials=TEST_CREDENTIALS,
test_mock={"_get_client": lambda credentials: MockMemoryClient()},
)
def run(
self,
input_data: Input,
*,
credentials: APIKeyCredentials,
user_id: str,
graph_id: str,
graph_exec_id: str,
**kwargs
) -> BlockOutput:
try:
client = self._get_client(credentials)
filters: Filter = {
# This works with only one filter, so we can allow others to add on later
"AND": [
{"user_id": user_id},
]
}
if input_data.categories_filter:
filters["AND"].append(
{"categories": {"contains": input_data.categories_filter}}
)
if input_data.limit_memory_to_run:
filters["AND"].append({"run_id": graph_exec_id})
if input_data.limit_memory_to_agent:
filters["AND"].append({"agent_id": graph_id})
result: list[dict[str, Any]] = client.search(
input_data.query, version="v2", filters=filters
)
yield "memories", result
except Exception as e:
yield "error", str(e)
class GetAllMemoriesBlock(Block, Mem0Base):
"""Block for retrieving all memories from Mem0"""
class Input(BlockSchema):
credentials: CredentialsMetaInput[
Literal[ProviderName.MEM0], Literal["api_key"]
] = CredentialsField(description="Mem0 API key credentials")
trigger: bool = SchemaField(
description="An unused field that is used to trigger the block when you have no other inputs",
default=False,
advanced=False,
)
categories: Optional[list[str]] = SchemaField(
description="Filter by categories", default=None
)
limit_memory_to_run: bool = SchemaField(
description="Limit the memory to the run", default=False
)
limit_memory_to_agent: bool = SchemaField(
description="Limit the memory to the agent", default=False
)
class Output(BlockSchema):
memories: Any = SchemaField(description="List of memories")
error: str = SchemaField(description="Error message if operation fails")
def __init__(self):
super().__init__(
id="45aee5bf-4767-45d1-a28b-e01c5aae9fc1",
description="Retrieve all memories from Mem0 with pagination",
input_schema=GetAllMemoriesBlock.Input,
output_schema=GetAllMemoriesBlock.Output,
test_input={
"user_id": "test_user",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_output=[
("memories", [{"id": "test-memory", "content": "test content"}]),
],
test_credentials=TEST_CREDENTIALS,
test_mock={"_get_client": lambda credentials: MockMemoryClient()},
)
def run(
self,
input_data: Input,
*,
credentials: APIKeyCredentials,
user_id: str,
graph_id: str,
graph_exec_id: str,
**kwargs
) -> BlockOutput:
try:
client = self._get_client(credentials)
filters: Filter = {
"AND": [
{"user_id": user_id},
]
}
if input_data.limit_memory_to_run:
filters["AND"].append({"run_id": graph_exec_id})
if input_data.limit_memory_to_agent:
filters["AND"].append({"agent_id": graph_id})
if input_data.categories:
filters["AND"].append(
{"categories": {"contains": input_data.categories}}
)
memories: list[dict[str, Any]] = client.get_all(
filters=filters,
version="v2",
)
yield "memories", memories
except Exception as e:
yield "error", str(e)
# Mock client for testing
class MockMemoryClient:
"""Mock Mem0 client for testing"""
def add(self, *args, **kwargs):
return {"memory_id": "test-memory-id", "status": "success"}
def search(self, *args, **kwargs) -> list[dict[str, str]]:
return [{"id": "test-memory", "content": "test content"}]
def get_all(self, *args, **kwargs) -> list[dict[str, str]]:
return [{"id": "test-memory", "content": "test content"}]

View File

@@ -1,22 +1,48 @@
from datetime import datetime, timezone
from typing import Iterator
from typing import Iterator, Literal
import praw
from pydantic import BaseModel, ConfigDict
from pydantic import BaseModel, SecretStr
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import BlockSecret, SchemaField, SecretField
from backend.data.model import (
CredentialsField,
CredentialsMetaInput,
SchemaField,
UserPasswordCredentials,
)
from backend.integrations.providers import ProviderName
from backend.util.mock import MockObject
from backend.util.settings import Settings
RedditCredentials = UserPasswordCredentials
RedditCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.REDDIT],
Literal["user_password"],
]
class RedditCredentials(BaseModel):
client_id: BlockSecret = SecretField(key="reddit_client_id")
client_secret: BlockSecret = SecretField(key="reddit_client_secret")
username: BlockSecret = SecretField(key="reddit_username")
password: BlockSecret = SecretField(key="reddit_password")
user_agent: str = "AutoGPT:1.0 (by /u/autogpt)"
def RedditCredentialsField() -> RedditCredentialsInput:
"""Creates a Reddit credentials input on a block."""
return CredentialsField(
description="The Reddit integration requires a username and password.",
)
model_config = ConfigDict(title="Reddit Credentials")
TEST_CREDENTIALS = UserPasswordCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="reddit",
username=SecretStr("mock-reddit-username"),
password=SecretStr("mock-reddit-password"),
title="Mock Reddit credentials",
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
class RedditPost(BaseModel):
@@ -31,13 +57,16 @@ class RedditComment(BaseModel):
comment: str
settings = Settings()
def get_praw(creds: RedditCredentials) -> praw.Reddit:
client = praw.Reddit(
client_id=creds.client_id.get_secret_value(),
client_secret=creds.client_secret.get_secret_value(),
client_id=settings.secrets.reddit_client_id,
client_secret=settings.secrets.reddit_client_secret,
username=creds.username.get_secret_value(),
password=creds.password.get_secret_value(),
user_agent=creds.user_agent,
user_agent=settings.config.reddit_user_agent,
)
me = client.user.me()
if not me:
@@ -48,11 +77,11 @@ def get_praw(creds: RedditCredentials) -> praw.Reddit:
class GetRedditPostsBlock(Block):
class Input(BlockSchema):
subreddit: str = SchemaField(description="Subreddit name")
creds: RedditCredentials = SchemaField(
description="Reddit credentials",
default=RedditCredentials(),
subreddit: str = SchemaField(
description="Subreddit name, excluding the /r/ prefix",
default="writingprompts",
)
credentials: RedditCredentialsInput = RedditCredentialsField()
last_minutes: int | None = SchemaField(
description="Post time to stop minutes ago while fetching posts",
default=None,
@@ -70,20 +99,18 @@ class GetRedditPostsBlock(Block):
def __init__(self):
super().__init__(
disabled=True,
id="c6731acb-4285-4ee1-bc9b-03d0766c370f",
description="This block fetches Reddit posts from a defined subreddit name.",
categories={BlockCategory.SOCIAL},
disabled=(
not settings.secrets.reddit_client_id
or not settings.secrets.reddit_client_secret
),
input_schema=GetRedditPostsBlock.Input,
output_schema=GetRedditPostsBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={
"creds": {
"client_id": "client_id",
"client_secret": "client_secret",
"username": "username",
"password": "password",
"user_agent": "user_agent",
},
"credentials": TEST_CREDENTIALS_INPUT,
"subreddit": "subreddit",
"last_post": "id3",
"post_limit": 2,
@@ -103,7 +130,7 @@ class GetRedditPostsBlock(Block):
),
],
test_mock={
"get_posts": lambda _: [
"get_posts": lambda input_data, credentials: [
MockObject(id="id1", title="title1", selftext="body1"),
MockObject(id="id2", title="title2", selftext="body2"),
MockObject(id="id3", title="title2", selftext="body2"),
@@ -112,14 +139,18 @@ class GetRedditPostsBlock(Block):
)
@staticmethod
def get_posts(input_data: Input) -> Iterator[praw.reddit.Submission]:
client = get_praw(input_data.creds)
def get_posts(
input_data: Input, *, credentials: RedditCredentials
) -> Iterator[praw.reddit.Submission]:
client = get_praw(credentials)
subreddit = client.subreddit(input_data.subreddit)
return subreddit.new(limit=input_data.post_limit or 10)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
def run(
self, input_data: Input, *, credentials: RedditCredentials, **kwargs
) -> BlockOutput:
current_time = datetime.now(tz=timezone.utc)
for post in self.get_posts(input_data):
for post in self.get_posts(input_data=input_data, credentials=credentials):
if input_data.last_minutes:
post_datetime = datetime.fromtimestamp(
post.created_utc, tz=timezone.utc
@@ -141,9 +172,7 @@ class GetRedditPostsBlock(Block):
class PostRedditCommentBlock(Block):
class Input(BlockSchema):
creds: RedditCredentials = SchemaField(
description="Reddit credentials", default=RedditCredentials()
)
credentials: RedditCredentialsInput = RedditCredentialsField()
data: RedditComment = SchemaField(description="Reddit comment")
class Output(BlockSchema):
@@ -156,7 +185,15 @@ class PostRedditCommentBlock(Block):
categories={BlockCategory.SOCIAL},
input_schema=PostRedditCommentBlock.Input,
output_schema=PostRedditCommentBlock.Output,
test_input={"data": {"post_id": "id", "comment": "comment"}},
disabled=(
not settings.secrets.reddit_client_id
or not settings.secrets.reddit_client_secret
),
test_credentials=TEST_CREDENTIALS,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"data": {"post_id": "id", "comment": "comment"},
},
test_output=[("comment_id", "dummy_comment_id")],
test_mock={"reply_post": lambda creds, comment: "dummy_comment_id"},
)
@@ -170,5 +207,7 @@ class PostRedditCommentBlock(Block):
raise ValueError("Failed to post comment.")
return new_comment.id
def run(self, input_data: Input, **kwargs) -> BlockOutput:
yield "comment_id", self.reply_post(input_data.creds, input_data.data)
def run(
self, input_data: Input, *, credentials: RedditCredentials, **kwargs
) -> BlockOutput:
yield "comment_id", self.reply_post(credentials, input_data.data)

View File

@@ -131,7 +131,7 @@ class ReplicateFluxAdvancedModelBlock(Block):
super().__init__(
id="90f8c45e-e983-4644-aa0b-b4ebe2f531bc",
description="This block runs Flux models on Replicate with advanced settings.",
categories={BlockCategory.AI},
categories={BlockCategory.AI, BlockCategory.MULTIMEDIA},
input_schema=ReplicateFluxAdvancedModelBlock.Input,
output_schema=ReplicateFluxAdvancedModelBlock.Output,
test_input={

View File

@@ -0,0 +1,174 @@
from base64 import b64encode
from enum import Enum
from typing import Literal
from pydantic import SecretStr
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import (
APIKeyCredentials,
CredentialsField,
CredentialsMetaInput,
SchemaField,
)
from backend.integrations.providers import ProviderName
from backend.util.file import MediaFile, store_media_file
from backend.util.request import Requests
class Format(str, Enum):
PNG = "png"
JPEG = "jpeg"
WEBP = "webp"
class ScreenshotWebPageBlock(Block):
"""Block for taking screenshots using ScreenshotOne API"""
class Input(BlockSchema):
credentials: CredentialsMetaInput[
Literal[ProviderName.SCREENSHOTONE], Literal["api_key"]
] = CredentialsField(description="The ScreenshotOne API key")
url: str = SchemaField(
description="URL of the website to screenshot",
placeholder="https://example.com",
)
viewport_width: int = SchemaField(
description="Width of the viewport in pixels", default=1920
)
viewport_height: int = SchemaField(
description="Height of the viewport in pixels", default=1080
)
full_page: bool = SchemaField(
description="Whether to capture the full page length", default=False
)
format: Format = SchemaField(
description="Output format (png, jpeg, webp)", default=Format.PNG
)
block_ads: bool = SchemaField(description="Whether to block ads", default=True)
block_cookie_banners: bool = SchemaField(
description="Whether to block cookie banners", default=True
)
block_chats: bool = SchemaField(
description="Whether to block chat widgets", default=True
)
cache: bool = SchemaField(
description="Whether to enable caching", default=False
)
class Output(BlockSchema):
image: MediaFile = SchemaField(description="The screenshot image data")
error: str = SchemaField(description="Error message if the screenshot failed")
def __init__(self):
super().__init__(
id="3a7c4b8d-6e2f-4a5d-b9c1-f8d23c5a9b0e", # Generated UUID
description="Takes a screenshot of a specified website using ScreenshotOne API",
categories={BlockCategory.DATA},
input_schema=ScreenshotWebPageBlock.Input,
output_schema=ScreenshotWebPageBlock.Output,
test_input={
"url": "https://example.com",
"viewport_width": 1920,
"viewport_height": 1080,
"full_page": False,
"format": "png",
"block_ads": True,
"block_cookie_banners": True,
"block_chats": True,
"cache": False,
"credentials": {
"provider": "screenshotone",
"type": "api_key",
"id": "test-id",
"title": "Test API Key",
},
},
test_credentials=APIKeyCredentials(
id="test-id",
provider="screenshotone",
api_key=SecretStr("test-key"),
title="Test API Key",
expires_at=None,
),
test_output=[
(
"image",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAB5JREFUOE9jZPjP8J+BAsA4agDDaBgwjIYBw7AIAwCV5B/xAsMbygAAAABJRU5ErkJggg==",
),
],
test_mock={
"take_screenshot": lambda *args, **kwargs: {
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAB5JREFUOE9jZPjP8J+BAsA4agDDaBgwjIYBw7AIAwCV5B/xAsMbygAAAABJRU5ErkJggg==",
}
},
)
@staticmethod
def take_screenshot(
credentials: APIKeyCredentials,
graph_exec_id: str,
url: str,
viewport_width: int,
viewport_height: int,
full_page: bool,
format: Format,
block_ads: bool,
block_cookie_banners: bool,
block_chats: bool,
cache: bool,
) -> dict:
"""
Takes a screenshot using the ScreenshotOne API
"""
api = Requests(trusted_origins=["https://api.screenshotone.com"])
# Build API URL with parameters
params = {
"access_key": credentials.api_key.get_secret_value(),
"url": url,
"viewport_width": viewport_width,
"viewport_height": viewport_height,
"full_page": str(full_page).lower(),
"format": format.value,
"block_ads": str(block_ads).lower(),
"block_cookie_banners": str(block_cookie_banners).lower(),
"block_chats": str(block_chats).lower(),
"cache": str(cache).lower(),
}
response = api.get("https://api.screenshotone.com/take", params=params)
return {
"image": store_media_file(
graph_exec_id=graph_exec_id,
file=f"data:image/{format.value};base64,{b64encode(response.content).decode('utf-8')}",
return_content=True,
)
}
def run(
self,
input_data: Input,
*,
credentials: APIKeyCredentials,
graph_exec_id: str,
**kwargs,
) -> BlockOutput:
try:
screenshot_data = self.take_screenshot(
credentials=credentials,
graph_exec_id=graph_exec_id,
url=input_data.url,
viewport_width=input_data.viewport_width,
viewport_height=input_data.viewport_height,
full_page=input_data.full_page,
format=input_data.format,
block_ads=input_data.block_ads,
block_cookie_banners=input_data.block_cookie_banners,
block_chats=input_data.block_chats,
cache=input_data.cache,
)
yield "image", screenshot_data["image"]
except Exception as e:
yield "error", str(e)

View File

@@ -0,0 +1,498 @@
import logging
import re
from collections import Counter
from typing import TYPE_CHECKING, Any
from autogpt_libs.utils.cache import thread_cached
import backend.blocks.llm as llm
from backend.blocks.agent import AgentExecutorBlock
from backend.data.block import (
Block,
BlockCategory,
BlockInput,
BlockOutput,
BlockSchema,
BlockType,
get_block,
)
from backend.data.model import SchemaField
from backend.util import json
if TYPE_CHECKING:
from backend.data.graph import Link, Node
logger = logging.getLogger(__name__)
@thread_cached
def get_database_manager_client():
from backend.executor import DatabaseManager
from backend.util.service import get_service_client
return get_service_client(DatabaseManager)
def _get_tool_requests(entry: dict[str, Any]) -> list[str]:
"""
Return a list of tool_call_ids if the entry is a tool request.
Supports both OpenAI and Anthropics formats.
"""
tool_call_ids = []
if entry.get("role") != "assistant":
return tool_call_ids
# OpenAI: check for tool_calls in the entry.
calls = entry.get("tool_calls")
if isinstance(calls, list):
for call in calls:
if tool_id := call.get("id"):
tool_call_ids.append(tool_id)
# Anthropics: check content items for tool_use type.
content = entry.get("content")
if isinstance(content, list):
for item in content:
if item.get("type") != "tool_use":
continue
if tool_id := item.get("id"):
tool_call_ids.append(tool_id)
return tool_call_ids
def _get_tool_responses(entry: dict[str, Any]) -> list[str]:
"""
Return a list of tool_call_ids if the entry is a tool response.
Supports both OpenAI and Anthropics formats.
"""
tool_call_ids: list[str] = []
# OpenAI: a tool response message with role "tool" and key "tool_call_id".
if entry.get("role") == "tool":
if tool_call_id := entry.get("tool_call_id"):
tool_call_ids.append(str(tool_call_id))
# Anthropics: check content items for tool_result type.
if entry.get("role") == "user":
content = entry.get("content")
if isinstance(content, list):
for item in content:
if item.get("type") != "tool_result":
continue
if tool_call_id := item.get("tool_use_id"):
tool_call_ids.append(tool_call_id)
return tool_call_ids
def _create_tool_response(call_id: str, output: dict[str, Any]) -> dict[str, Any]:
"""
Create a tool response message for either OpenAI or Anthropics,
based on the tool_id format.
"""
content = output if isinstance(output, str) else json.dumps(output)
# Anthropics format: tool IDs typically start with "toolu_"
if call_id.startswith("toolu_"):
return {
"role": "user",
"type": "message",
"content": [
{"tool_use_id": call_id, "type": "tool_result", "content": content}
],
}
# OpenAI format: tool IDs typically start with "call_".
# Or default fallback (if the tool_id doesn't match any known prefix)
return {"role": "tool", "tool_call_id": call_id, "content": content}
def get_pending_tool_calls(conversation_history: list[Any]) -> dict[str, int]:
"""
All the tool calls entry in the conversation history requires a response.
This function returns the pending tool calls that has not generated an output yet.
Return: dict[str, int] - A dictionary of pending tool call IDs with their count.
"""
pending_calls = Counter()
for history in conversation_history:
for call_id in _get_tool_requests(history):
pending_calls[call_id] += 1
for call_id in _get_tool_responses(history):
pending_calls[call_id] -= 1
return {call_id: count for call_id, count in pending_calls.items() if count > 0}
class SmartDecisionMakerBlock(Block):
"""
A block that uses a language model to make smart decisions based on a given prompt.
"""
class Input(BlockSchema):
prompt: str = SchemaField(
description="The prompt to send to the language model.",
placeholder="Enter your prompt here...",
)
model: llm.LlmModel = SchemaField(
title="LLM Model",
default=llm.LlmModel.GPT4O,
description="The language model to use for answering the prompt.",
advanced=False,
)
credentials: llm.AICredentials = llm.AICredentialsField()
sys_prompt: str = SchemaField(
title="System Prompt",
default="Thinking carefully step by step decide which function to call. "
"Always choose a function call from the list of function signatures, "
"and always provide the complete argument provided with the type "
"matching the required jsonschema signature, no missing argument is allowed. "
"If you have already completed the task objective, you can end the task "
"by providing the end result of your work as a finish message. "
"Only provide EXACTLY one function call, multiple tool calls is strictly prohibited.",
description="The system prompt to provide additional context to the model.",
)
conversation_history: list[dict] = SchemaField(
default=[],
description="The conversation history to provide context for the prompt.",
)
last_tool_output: Any = SchemaField(
default=None,
description="The output of the last tool that was called.",
)
retry: int = SchemaField(
title="Retry Count",
default=3,
description="Number of times to retry the LLM call if the response does not match the expected format.",
)
prompt_values: dict[str, str] = SchemaField(
advanced=False,
default={},
description="Values used to fill in the prompt. The values can be used in the prompt by putting them in a double curly braces, e.g. {{variable_name}}.",
)
max_tokens: int | None = SchemaField(
advanced=True,
default=None,
description="The maximum number of tokens to generate in the chat completion.",
)
ollama_host: str = SchemaField(
advanced=True,
default="localhost:11434",
description="Ollama host for local models",
)
@classmethod
def get_missing_links(cls, data: BlockInput, links: list["Link"]) -> set[str]:
# conversation_history & last_tool_output validation is handled differently
return super().get_missing_links(
data,
[
link
for link in links
if link.sink_name
not in ["conversation_history", "last_tool_output"]
],
)
@classmethod
def get_missing_input(cls, data: BlockInput) -> set[str]:
if missing_input := super().get_missing_input(data):
return missing_input
conversation_history = data.get("conversation_history", [])
pending_tool_calls = get_pending_tool_calls(conversation_history)
last_tool_output = data.get("last_tool_output")
if not last_tool_output and pending_tool_calls:
return {"last_tool_output"}
return set()
class Output(BlockSchema):
error: str = SchemaField(description="Error message if the API call failed.")
tools: Any = SchemaField(description="The tools that are available to use.")
finished: str = SchemaField(
description="The finished message to display to the user."
)
conversations: list[Any] = SchemaField(
description="The conversation history to provide context for the prompt."
)
def __init__(self):
super().__init__(
id="3b191d9f-356f-482d-8238-ba04b6d18381",
description="Uses AI to intelligently decide what tool to use.",
categories={BlockCategory.AI},
block_type=BlockType.AI,
input_schema=SmartDecisionMakerBlock.Input,
output_schema=SmartDecisionMakerBlock.Output,
test_input={
"prompt": "Hello, World!",
"credentials": llm.TEST_CREDENTIALS_INPUT,
},
test_output=[],
test_credentials=llm.TEST_CREDENTIALS,
)
@staticmethod
def _create_block_function_signature(
sink_node: "Node", links: list["Link"]
) -> dict[str, Any]:
"""
Creates a function signature for a block node.
Args:
sink_node: The node for which to create a function signature.
links: The list of links connected to the sink node.
Returns:
A dictionary representing the function signature in the format expected by LLM tools.
Raises:
ValueError: If the block specified by sink_node.block_id is not found.
"""
block = get_block(sink_node.block_id)
if not block:
raise ValueError(f"Block not found: {sink_node.block_id}")
tool_function: dict[str, Any] = {
"name": re.sub(r"[^a-zA-Z0-9_-]", "_", block.name).lower(),
"description": block.description,
}
properties = {}
required = []
for link in links:
sink_block_input_schema = block.input_schema
description = (
sink_block_input_schema.model_fields[link.sink_name].description
if link.sink_name in sink_block_input_schema.model_fields
and sink_block_input_schema.model_fields[link.sink_name].description
else f"The {link.sink_name} of the tool"
)
properties[link.sink_name.lower()] = {
"type": "string",
"description": description,
}
tool_function["parameters"] = {
"type": "object",
"properties": properties,
"required": required,
"additionalProperties": False,
"strict": True,
}
return {"type": "function", "function": tool_function}
@staticmethod
def _create_agent_function_signature(
sink_node: "Node", links: list["Link"]
) -> dict[str, Any]:
"""
Creates a function signature for an agent node.
Args:
sink_node: The agent node for which to create a function signature.
links: The list of links connected to the sink node.
Returns:
A dictionary representing the function signature in the format expected by LLM tools.
Raises:
ValueError: If the graph metadata for the specified graph_id and graph_version is not found.
"""
graph_id = sink_node.input_default.get("graph_id")
graph_version = sink_node.input_default.get("graph_version")
if not graph_id or not graph_version:
raise ValueError("Graph ID or Graph Version not found in sink node.")
db_client = get_database_manager_client()
sink_graph_meta = db_client.get_graph_metadata(graph_id, graph_version)
if not sink_graph_meta:
raise ValueError(
f"Sink graph metadata not found: {graph_id} {graph_version}"
)
tool_function: dict[str, Any] = {
"name": re.sub(r"[^a-zA-Z0-9_-]", "_", sink_graph_meta.name).lower(),
"description": sink_graph_meta.description,
}
properties = {}
required = []
for link in links:
sink_block_input_schema = sink_node.input_default["input_schema"]
description = (
sink_block_input_schema["properties"][link.sink_name]["description"]
if "description"
in sink_block_input_schema["properties"][link.sink_name]
else f"The {link.sink_name} of the tool"
)
properties[link.sink_name.lower()] = {
"type": "string",
"description": description,
}
tool_function["parameters"] = {
"type": "object",
"properties": properties,
"required": required,
"additionalProperties": False,
"strict": True,
}
return {"type": "function", "function": tool_function}
@staticmethod
def _create_function_signature(node_id: str) -> list[dict[str, Any]]:
"""
Creates function signatures for tools linked to a specified node within a graph.
This method filters the graph links to identify those that are tools and are
connected to the given node_id. It then constructs function signatures for each
tool based on the metadata and input schema of the linked nodes.
Args:
node_id: The node_id for which to create function signatures.
Returns:
list[dict[str, Any]]: A list of dictionaries, each representing a function signature
for a tool, including its name, description, and parameters.
Raises:
ValueError: If no tool links are found for the specified node_id, or if a sink node
or its metadata cannot be found.
"""
db_client = get_database_manager_client()
tools = [
(link, node)
for link, node in db_client.get_connected_output_nodes(node_id)
if link.source_name.startswith("tools_^_") and link.source_id == node_id
]
if not tools:
raise ValueError("There is no next node to execute.")
return_tool_functions = []
grouped_tool_links: dict[str, tuple["Node", list["Link"]]] = {}
for link, node in tools:
if link.sink_id not in grouped_tool_links:
grouped_tool_links[link.sink_id] = (node, [link])
else:
grouped_tool_links[link.sink_id][1].append(link)
for sink_node, links in grouped_tool_links.values():
if not sink_node:
raise ValueError(f"Sink node not found: {links[0].sink_id}")
if sink_node.block_id == AgentExecutorBlock().id:
return_tool_functions.append(
SmartDecisionMakerBlock._create_agent_function_signature(
sink_node, links
)
)
else:
return_tool_functions.append(
SmartDecisionMakerBlock._create_block_function_signature(
sink_node, links
)
)
return return_tool_functions
def run(
self,
input_data: Input,
*,
credentials: llm.APIKeyCredentials,
graph_id: str,
node_id: str,
graph_exec_id: str,
node_exec_id: str,
user_id: str,
**kwargs,
) -> BlockOutput:
tool_functions = self._create_function_signature(node_id)
input_data.conversation_history = input_data.conversation_history or []
prompt = [json.to_dict(p) for p in input_data.conversation_history if p]
pending_tool_calls = get_pending_tool_calls(input_data.conversation_history)
if pending_tool_calls and not input_data.last_tool_output:
raise ValueError(f"Tool call requires an output for {pending_tool_calls}")
# Prefill all missing tool calls with the last tool output/
# TODO: we need a better way to handle this.
tool_output = [
_create_tool_response(pending_call_id, input_data.last_tool_output)
for pending_call_id, count in pending_tool_calls.items()
for _ in range(count)
]
# If the SDM block only calls 1 tool at a time, this should not happen.
if len(tool_output) > 1:
logger.warning(
f"[SmartDecisionMakerBlock-node_exec_id={node_exec_id}] "
f"Multiple pending tool calls are prefilled using a single output. "
f"Execution may not be accurate."
)
# Fallback on adding tool output in the conversation history as user prompt.
if len(tool_output) == 0:
logger.warning(
f"[SmartDecisionMakerBlock-node_exec_id={node_exec_id}] "
f"No pending tool calls found. This may indicate an issue with the "
f"conversation history, or an LLM calling two tools at the same time."
)
tool_output.append(
{
"role": "user",
"content": f"Last tool output: {json.dumps(input_data.last_tool_output)}",
}
)
prompt.extend(tool_output)
values = input_data.prompt_values
if values:
input_data.prompt = llm.fmt.format_string(input_data.prompt, values)
input_data.sys_prompt = llm.fmt.format_string(input_data.sys_prompt, values)
prefix = "[Main Objective Prompt]: "
if input_data.sys_prompt and not any(
p["role"] == "system" and p["content"].startswith(prefix) for p in prompt
):
prompt.append({"role": "system", "content": prefix + input_data.sys_prompt})
if input_data.prompt and not any(
p["role"] == "user" and p["content"].startswith(prefix) for p in prompt
):
prompt.append({"role": "user", "content": prefix + input_data.prompt})
response = llm.llm_call(
credentials=credentials,
llm_model=input_data.model,
prompt=prompt,
json_format=False,
max_tokens=input_data.max_tokens,
tools=tool_functions,
ollama_host=input_data.ollama_host,
)
if not response.tool_calls:
yield "finished", response.response
return
for tool_call in response.tool_calls:
tool_name = tool_call.function.name
tool_args = json.loads(tool_call.function.arguments)
for arg_name, arg_value in tool_args.items():
yield f"tools_^_{tool_name}_{arg_name}".lower(), arg_value
response.prompt.append(response.raw_response)
yield "conversations", response.prompt

View File

@@ -0,0 +1,97 @@
from backend.blocks.smartlead.models import (
AddLeadsRequest,
AddLeadsToCampaignResponse,
CreateCampaignRequest,
CreateCampaignResponse,
SaveSequencesRequest,
SaveSequencesResponse,
)
from backend.util.request import Requests
class SmartLeadClient:
"""Client for the SmartLead API"""
# This api is stupid and requires your api key in the url. DO NOT RAISE ERRORS FOR BAD REQUESTS.
# FILTER OUT THE API KEY FROM THE ERROR MESSAGE.
API_URL = "https://server.smartlead.ai/api/v1"
def __init__(self, api_key: str):
self.api_key = api_key
self.requests = Requests()
def _add_auth_to_url(self, url: str) -> str:
return f"{url}?api_key={self.api_key}"
def _handle_error(self, e: Exception) -> str:
return e.__str__().replace(self.api_key, "API KEY")
def create_campaign(self, request: CreateCampaignRequest) -> CreateCampaignResponse:
try:
response = self.requests.post(
self._add_auth_to_url(f"{self.API_URL}/campaigns/create"),
json=request.model_dump(),
)
response_data = response.json()
return CreateCampaignResponse(**response_data)
except ValueError as e:
raise ValueError(f"Invalid response format: {str(e)}")
except Exception as e:
raise ValueError(f"Failed to create campaign: {self._handle_error(e)}")
def add_leads_to_campaign(
self, request: AddLeadsRequest
) -> AddLeadsToCampaignResponse:
try:
response = self.requests.post(
self._add_auth_to_url(
f"{self.API_URL}/campaigns/{request.campaign_id}/leads"
),
json=request.model_dump(exclude={"campaign_id"}),
)
response_data = response.json()
response_parsed = AddLeadsToCampaignResponse(**response_data)
if not response_parsed.ok:
raise ValueError(
f"Failed to add leads to campaign: {response_parsed.error}"
)
return response_parsed
except ValueError as e:
raise ValueError(f"Invalid response format: {str(e)}")
except Exception as e:
raise ValueError(
f"Failed to add leads to campaign: {self._handle_error(e)}"
)
def save_campaign_sequences(
self, campaign_id: int, request: SaveSequencesRequest
) -> SaveSequencesResponse:
"""
Save sequences within a campaign.
Args:
campaign_id: ID of the campaign to save sequences for
request: SaveSequencesRequest containing the sequences configuration
Returns:
SaveSequencesResponse with the result of the operation
Note:
For variant_distribution_type:
- MANUAL_EQUAL: Equally distributes variants across leads
- AI_EQUAL: Requires winning_metric_property and lead_distribution_percentage
- MANUAL_PERCENTAGE: Requires variant_distribution_percentage in seq_variants
"""
try:
response = self.requests.post(
self._add_auth_to_url(
f"{self.API_URL}/campaigns/{campaign_id}/sequences"
),
json=request.model_dump(exclude_none=True),
)
return SaveSequencesResponse(**response.json())
except Exception as e:
raise ValueError(
f"Failed to save campaign sequences: {e.__str__().replace(self.api_key, 'API KEY')}"
)

View File

@@ -0,0 +1,35 @@
from typing import Literal
from pydantic import SecretStr
from backend.data.model import APIKeyCredentials, CredentialsField, CredentialsMetaInput
from backend.integrations.providers import ProviderName
SmartLeadCredentials = APIKeyCredentials
SmartLeadCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.SMARTLEAD],
Literal["api_key"],
]
TEST_CREDENTIALS = APIKeyCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="smartlead",
api_key=SecretStr("mock-smartlead-api-key"),
title="Mock SmartLead API key",
expires_at=None,
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
def SmartLeadCredentialsField() -> SmartLeadCredentialsInput:
"""
Creates a SmartLead credentials input on a block.
"""
return CredentialsField(
description="The SmartLead integration can be used with an API Key.",
)

View File

@@ -0,0 +1,326 @@
from backend.blocks.smartlead._api import SmartLeadClient
from backend.blocks.smartlead._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
SmartLeadCredentials,
SmartLeadCredentialsInput,
)
from backend.blocks.smartlead.models import (
AddLeadsRequest,
AddLeadsToCampaignResponse,
CreateCampaignRequest,
CreateCampaignResponse,
LeadInput,
LeadUploadSettings,
SaveSequencesRequest,
SaveSequencesResponse,
Sequence,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class CreateCampaignBlock(Block):
"""Create a campaign in SmartLead"""
class Input(BlockSchema):
name: str = SchemaField(
description="The name of the campaign",
)
credentials: SmartLeadCredentialsInput = SchemaField(
description="SmartLead credentials",
)
class Output(BlockSchema):
id: int = SchemaField(
description="The ID of the created campaign",
)
name: str = SchemaField(
description="The name of the created campaign",
)
created_at: str = SchemaField(
description="The date and time the campaign was created",
)
error: str = SchemaField(
description="Error message if the search failed",
default="",
)
def __init__(self):
super().__init__(
id="8865699f-9188-43c4-89b0-79c84cfaa03e",
description="Create a campaign in SmartLead",
categories={BlockCategory.CRM},
input_schema=CreateCampaignBlock.Input,
output_schema=CreateCampaignBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={"name": "Test Campaign", "credentials": TEST_CREDENTIALS_INPUT},
test_output=[
(
"id",
1,
),
(
"name",
"Test Campaign",
),
(
"created_at",
"2024-01-01T00:00:00Z",
),
],
test_mock={
"create_campaign": lambda name, credentials: CreateCampaignResponse(
ok=True,
id=1,
name=name,
created_at="2024-01-01T00:00:00Z",
)
},
)
@staticmethod
def create_campaign(
name: str, credentials: SmartLeadCredentials
) -> CreateCampaignResponse:
client = SmartLeadClient(credentials.api_key.get_secret_value())
return client.create_campaign(CreateCampaignRequest(name=name))
def run(
self,
input_data: Input,
*,
credentials: SmartLeadCredentials,
**kwargs,
) -> BlockOutput:
response = self.create_campaign(input_data.name, credentials)
yield "id", response.id
yield "name", response.name
yield "created_at", response.created_at
if not response.ok:
yield "error", "Failed to create campaign"
class AddLeadToCampaignBlock(Block):
"""Add a lead to a campaign in SmartLead"""
class Input(BlockSchema):
campaign_id: int = SchemaField(
description="The ID of the campaign to add the lead to",
)
lead_list: list[LeadInput] = SchemaField(
description="An array of JSON objects, each representing a lead's details. Can hold max 100 leads.",
max_length=100,
default=[],
advanced=False,
)
settings: LeadUploadSettings = SchemaField(
description="Settings for lead upload",
default=LeadUploadSettings(),
)
credentials: SmartLeadCredentialsInput = SchemaField(
description="SmartLead credentials",
)
class Output(BlockSchema):
campaign_id: int = SchemaField(
description="The ID of the campaign the lead was added to (passed through)",
)
upload_count: int = SchemaField(
description="The number of leads added to the campaign",
)
already_added_to_campaign: int = SchemaField(
description="The number of leads that were already added to the campaign",
)
duplicate_count: int = SchemaField(
description="The number of emails that were duplicates",
)
invalid_email_count: int = SchemaField(
description="The number of emails that were invalidly formatted",
)
is_lead_limit_exhausted: bool = SchemaField(
description="Whether the lead limit was exhausted",
)
lead_import_stopped_count: int = SchemaField(
description="The number of leads that were not added to the campaign because the lead import was stopped",
)
error: str = SchemaField(
description="Error message if the lead was not added to the campaign",
default="",
)
def __init__(self):
super().__init__(
id="fb8106a4-1a8f-42f9-a502-f6d07e6fe0ec",
description="Add a lead to a campaign in SmartLead",
categories={BlockCategory.CRM},
input_schema=AddLeadToCampaignBlock.Input,
output_schema=AddLeadToCampaignBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={
"campaign_id": 1,
"lead_list": [],
"credentials": TEST_CREDENTIALS_INPUT,
},
test_output=[
(
"campaign_id",
1,
),
(
"upload_count",
1,
),
],
test_mock={
"add_leads_to_campaign": lambda campaign_id, lead_list, credentials: AddLeadsToCampaignResponse(
ok=True,
upload_count=1,
already_added_to_campaign=0,
duplicate_count=0,
invalid_email_count=0,
is_lead_limit_exhausted=False,
lead_import_stopped_count=0,
error="",
total_leads=1,
block_count=0,
invalid_emails=[],
unsubscribed_leads=[],
bounce_count=0,
)
},
)
@staticmethod
def add_leads_to_campaign(
campaign_id: int, lead_list: list[LeadInput], credentials: SmartLeadCredentials
) -> AddLeadsToCampaignResponse:
client = SmartLeadClient(credentials.api_key.get_secret_value())
return client.add_leads_to_campaign(
AddLeadsRequest(
campaign_id=campaign_id,
lead_list=lead_list,
settings=LeadUploadSettings(
ignore_global_block_list=False,
ignore_unsubscribe_list=False,
ignore_community_bounce_list=False,
ignore_duplicate_leads_in_other_campaign=False,
),
),
)
def run(
self,
input_data: Input,
*,
credentials: SmartLeadCredentials,
**kwargs,
) -> BlockOutput:
response = self.add_leads_to_campaign(
input_data.campaign_id, input_data.lead_list, credentials
)
yield "campaign_id", input_data.campaign_id
yield "upload_count", response.upload_count
if response.already_added_to_campaign:
yield "already_added_to_campaign", response.already_added_to_campaign
if response.duplicate_count:
yield "duplicate_count", response.duplicate_count
if response.invalid_email_count:
yield "invalid_email_count", response.invalid_email_count
if response.is_lead_limit_exhausted:
yield "is_lead_limit_exhausted", response.is_lead_limit_exhausted
if response.lead_import_stopped_count:
yield "lead_import_stopped_count", response.lead_import_stopped_count
if response.error:
yield "error", response.error
if not response.ok:
yield "error", "Failed to add leads to campaign"
class SaveCampaignSequencesBlock(Block):
"""Save sequences within a campaign"""
class Input(BlockSchema):
campaign_id: int = SchemaField(
description="The ID of the campaign to save sequences for",
)
sequences: list[Sequence] = SchemaField(
description="The sequences to save",
default=[],
advanced=False,
)
credentials: SmartLeadCredentialsInput = SchemaField(
description="SmartLead credentials",
)
class Output(BlockSchema):
data: dict | str | None = SchemaField(
description="Data from the API",
default=None,
)
message: str = SchemaField(
description="Message from the API",
default="",
)
error: str = SchemaField(
description="Error message if the sequences were not saved",
default="",
)
def __init__(self):
super().__init__(
id="e7d9f41c-dc10-4f39-98ba-a432abd128c0",
description="Save sequences within a campaign",
categories={BlockCategory.CRM},
input_schema=SaveCampaignSequencesBlock.Input,
output_schema=SaveCampaignSequencesBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={
"campaign_id": 1,
"sequences": [],
"credentials": TEST_CREDENTIALS_INPUT,
},
test_output=[
(
"message",
"Sequences saved successfully",
),
],
test_mock={
"save_campaign_sequences": lambda campaign_id, sequences, credentials: SaveSequencesResponse(
ok=True,
message="Sequences saved successfully",
)
},
)
@staticmethod
def save_campaign_sequences(
campaign_id: int, sequences: list[Sequence], credentials: SmartLeadCredentials
) -> SaveSequencesResponse:
client = SmartLeadClient(credentials.api_key.get_secret_value())
return client.save_campaign_sequences(
campaign_id=campaign_id, request=SaveSequencesRequest(sequences=sequences)
)
def run(
self,
input_data: Input,
*,
credentials: SmartLeadCredentials,
**kwargs,
) -> BlockOutput:
response = self.save_campaign_sequences(
input_data.campaign_id, input_data.sequences, credentials
)
if response.data:
yield "data", response.data
if response.message:
yield "message", response.message
if response.error:
yield "error", response.error
if not response.ok:
yield "error", "Failed to save sequences"

View File

@@ -0,0 +1,147 @@
from enum import Enum
from pydantic import BaseModel
from backend.data.model import SchemaField
class CreateCampaignResponse(BaseModel):
ok: bool
id: int
name: str
created_at: str
class CreateCampaignRequest(BaseModel):
name: str
client_id: str | None = None
class AddLeadsToCampaignResponse(BaseModel):
ok: bool
upload_count: int
total_leads: int
block_count: int
duplicate_count: int
invalid_email_count: int
invalid_emails: list[str]
already_added_to_campaign: int
unsubscribed_leads: list[str]
is_lead_limit_exhausted: bool
lead_import_stopped_count: int
bounce_count: int
error: str | None = None
class LeadCustomFields(BaseModel):
"""Custom fields for a lead (max 20 fields)"""
fields: dict[str, str] = SchemaField(
description="Custom fields for a lead (max 20 fields)",
max_length=20,
default={},
)
class LeadInput(BaseModel):
"""Single lead input data"""
first_name: str
last_name: str
email: str
phone_number: str | None = None # Changed from int to str for phone numbers
company_name: str | None = None
website: str | None = None
location: str | None = None
custom_fields: LeadCustomFields | None = None
linkedin_profile: str | None = None
company_url: str | None = None
class LeadUploadSettings(BaseModel):
"""Settings for lead upload"""
ignore_global_block_list: bool = SchemaField(
description="Ignore the global block list",
default=False,
)
ignore_unsubscribe_list: bool = SchemaField(
description="Ignore the unsubscribe list",
default=False,
)
ignore_community_bounce_list: bool = SchemaField(
description="Ignore the community bounce list",
default=False,
)
ignore_duplicate_leads_in_other_campaign: bool = SchemaField(
description="Ignore duplicate leads in other campaigns",
default=False,
)
class AddLeadsRequest(BaseModel):
"""Request body for adding leads to a campaign"""
lead_list: list[LeadInput] = SchemaField(
description="List of leads to add to the campaign",
max_length=100,
default=[],
)
settings: LeadUploadSettings
campaign_id: int
class VariantDistributionType(str, Enum):
MANUAL_EQUAL = "MANUAL_EQUAL"
MANUAL_PERCENTAGE = "MANUAL_PERCENTAGE"
AI_EQUAL = "AI_EQUAL"
class WinningMetricProperty(str, Enum):
OPEN_RATE = "OPEN_RATE"
CLICK_RATE = "CLICK_RATE"
REPLY_RATE = "REPLY_RATE"
POSITIVE_REPLY_RATE = "POSITIVE_REPLY_RATE"
class SequenceDelayDetails(BaseModel):
delay_in_days: int
class SequenceVariant(BaseModel):
subject: str
email_body: str
variant_label: str
id: int | None = None # Optional for creation, required for updates
variant_distribution_percentage: int | None = None
class Sequence(BaseModel):
seq_number: int = SchemaField(
description="The sequence number",
default=1,
)
seq_delay_details: SequenceDelayDetails
id: int | None = None
variant_distribution_type: VariantDistributionType | None = None
lead_distribution_percentage: int | None = SchemaField(
None, ge=20, le=100
) # >= 20% for fair calculation
winning_metric_property: WinningMetricProperty | None = None
seq_variants: list[SequenceVariant] | None = None
subject: str = "" # blank makes the follow up in the same thread
email_body: str | None = None
class SaveSequencesRequest(BaseModel):
sequences: list[Sequence]
class SaveSequencesResponse(BaseModel):
ok: bool
message: str = SchemaField(
description="Message from the API",
default="",
)
data: dict | str | None = None
error: str | None = None

View File

@@ -78,7 +78,7 @@ class CreateTalkingAvatarVideoBlock(Block):
super().__init__(
id="98c6f503-8c47-4b1c-a96d-351fc7c87dab",
description="This block integrates with D-ID to create video clips and retrieve their URLs.",
categories={BlockCategory.AI},
categories={BlockCategory.AI, BlockCategory.MULTIMEDIA},
input_schema=CreateTalkingAvatarVideoBlock.Input,
output_schema=CreateTalkingAvatarVideoBlock.Output,
test_input={

View File

@@ -76,6 +76,8 @@ class ExtractTextInformationBlock(Block):
class Output(BlockSchema):
positive: str = SchemaField(description="Extracted text")
negative: str = SchemaField(description="Original text")
matched_results: list[str] = SchemaField(description="List of matched results")
matched_count: int = SchemaField(description="Number of matched results")
def __init__(self):
super().__init__(
@@ -103,13 +105,31 @@ class ExtractTextInformationBlock(Block):
},
],
test_output=[
# Test case 1
("positive", "World!"),
("matched_results", ["World!"]),
("matched_count", 1),
# Test case 2
("positive", "Hello, World!"),
("matched_results", ["Hello, World!"]),
("matched_count", 1),
# Test case 3
("negative", "Hello, World!"),
("matched_results", []),
("matched_count", 0),
# Test case 4
("positive", "Hello,"),
("matched_results", ["Hello,"]),
("matched_count", 1),
# Test case 5
("positive", "World!!"),
("matched_results", ["World!!"]),
("matched_count", 1),
# Test case 6
("positive", "World!!"),
("positive", "Earth!!"),
("matched_results", ["World!!", "Earth!!"]),
("matched_count", 2),
],
)
@@ -130,13 +150,16 @@ class ExtractTextInformationBlock(Block):
for match in re.finditer(input_data.pattern, txt, flags)
if input_data.group <= len(match.groups())
]
if not input_data.find_all:
matches = matches[:1]
for match in matches:
yield "positive", match
if not input_data.find_all:
return
if not matches:
yield "negative", input_data.text
yield "matched_results", matches
yield "matched_count", len(matches)
class FillTextTemplateBlock(Block):
class Input(BlockSchema):
@@ -212,3 +235,71 @@ class CombineTextsBlock(Block):
def run(self, input_data: Input, **kwargs) -> BlockOutput:
combined_text = input_data.delimiter.join(input_data.input)
yield "output", combined_text
class TextSplitBlock(Block):
class Input(BlockSchema):
text: str = SchemaField(description="The text to split.")
delimiter: str = SchemaField(description="The delimiter to split the text by.")
strip: bool = SchemaField(
description="Whether to strip the text.", default=True
)
class Output(BlockSchema):
texts: list[str] = SchemaField(
description="The text split into a list of strings."
)
def __init__(self):
super().__init__(
id="d5ea33c8-a575-477a-b42f-2fe3be5055ec",
description="This block is used to split a text into a list of strings.",
categories={BlockCategory.TEXT},
input_schema=TextSplitBlock.Input,
output_schema=TextSplitBlock.Output,
test_input=[
{"text": "Hello, World!", "delimiter": ","},
{"text": "Hello, World!", "delimiter": ",", "strip": False},
],
test_output=[
("texts", ["Hello", "World!"]),
("texts", ["Hello", " World!"]),
],
)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
if len(input_data.text) == 0:
yield "texts", []
else:
texts = input_data.text.split(input_data.delimiter)
if input_data.strip:
texts = [text.strip() for text in texts]
yield "texts", texts
class TextReplaceBlock(Block):
class Input(BlockSchema):
text: str = SchemaField(description="The text to replace.")
old: str = SchemaField(description="The old text to replace.")
new: str = SchemaField(description="The new text to replace with.")
class Output(BlockSchema):
output: str = SchemaField(description="The text with the replaced text.")
def __init__(self):
super().__init__(
id="7e7c87ab-3469-4bcc-9abe-67705091b713",
description="This block is used to replace a text with a new text.",
categories={BlockCategory.TEXT},
input_schema=TextReplaceBlock.Input,
output_schema=TextReplaceBlock.Output,
test_input=[
{"text": "Hello, World!", "old": "Hello", "new": "Hi"},
],
test_output=[
("output", "Hi, World!"),
],
)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
yield "output", input_data.text.replace(input_data.old, input_data.new)

View File

@@ -53,7 +53,7 @@ class UnrealTextToSpeechBlock(Block):
super().__init__(
id="4ff1ff6d-cc40-4caa-ae69-011daa20c378",
description="Converts text to speech using the Unreal Speech API",
categories={BlockCategory.AI, BlockCategory.TEXT},
categories={BlockCategory.AI, BlockCategory.TEXT, BlockCategory.MULTIMEDIA},
input_schema=UnrealTextToSpeechBlock.Input,
output_schema=UnrealTextToSpeechBlock.Output,
test_input={

View File

@@ -0,0 +1,61 @@
from typing import Literal
from pydantic import SecretStr
from backend.data.model import (
CredentialsField,
CredentialsMetaInput,
OAuth2Credentials,
ProviderName,
)
from backend.integrations.oauth.todoist import TodoistOAuthHandler
from backend.util.settings import Secrets
secrets = Secrets()
TODOIST_OAUTH_IS_CONFIGURED = bool(
secrets.todoist_client_id and secrets.todoist_client_secret
)
TodoistCredentials = OAuth2Credentials
TodoistCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.TODOIST], Literal["oauth2"]
]
def TodoistCredentialsField(scopes: list[str]) -> TodoistCredentialsInput:
"""
Creates a Todoist credentials input on a block.
Params:
scopes: The authorization scopes needed for the block to work.
"""
return CredentialsField(
required_scopes=set(TodoistOAuthHandler.DEFAULT_SCOPES + scopes),
description="The Todoist integration requires OAuth2 authentication.",
)
TEST_CREDENTIALS = OAuth2Credentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="todoist",
access_token=SecretStr("mock-todoist-access-token"),
refresh_token=None,
access_token_expires_at=None,
scopes=[
"task:add",
"data:read",
"data:read_write",
"data:delete",
"project:delete",
],
title="Mock Todoist OAuth2 Credentials",
username="mock-todoist-username",
refresh_token_expires_at=None,
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}

View File

@@ -0,0 +1,24 @@
from enum import Enum
class Colors(Enum):
berry_red = "berry_red"
red = "red"
orange = "orange"
yellow = "yellow"
olive_green = "olive_green"
lime_green = "lime_green"
green = "green"
mint_green = "mint_green"
teal = "teal"
sky_blue = "sky_blue"
light_blue = "light_blue"
blue = "blue"
grape = "grape"
violet = "violet"
lavender = "lavender"
magenta = "magenta"
salmon = "salmon"
charcoal = "charcoal"
grey = "grey"
taupe = "taupe"

View File

@@ -0,0 +1,439 @@
from typing import Literal, Union
from pydantic import BaseModel
from todoist_api_python.api import TodoistAPI
from typing_extensions import Optional
from backend.blocks.todoist._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
TodoistCredentials,
TodoistCredentialsField,
TodoistCredentialsInput,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class TaskId(BaseModel):
discriminator: Literal["task"]
task_id: str
class ProjectId(BaseModel):
discriminator: Literal["project"]
project_id: str
class TodoistCreateCommentBlock(Block):
"""Creates a new comment on a Todoist task or project"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
content: str = SchemaField(description="Comment content")
id_type: Union[TaskId, ProjectId] = SchemaField(
discriminator="discriminator",
description="Specify either task_id or project_id to comment on",
default=TaskId(discriminator="task", task_id=""),
advanced=False,
)
attachment: Optional[dict] = SchemaField(
description="Optional file attachment", default=None
)
class Output(BlockSchema):
id: str = SchemaField(description="ID of created comment")
content: str = SchemaField(description="Comment content")
posted_at: str = SchemaField(description="Comment timestamp")
task_id: Optional[str] = SchemaField(
description="Associated task ID", default=None
)
project_id: Optional[str] = SchemaField(
description="Associated project ID", default=None
)
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="1bba7e54-2310-4a31-8e6f-54d5f9ab7459",
description="Creates a new comment on a Todoist task or project",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistCreateCommentBlock.Input,
output_schema=TodoistCreateCommentBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"content": "Test comment",
"id_type": {"discriminator": "task", "task_id": "2995104339"},
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("id", "2992679862"),
("content", "Test comment"),
("posted_at", "2016-09-22T07:00:00.000000Z"),
("task_id", "2995104339"),
("project_id", None),
],
test_mock={
"create_comment": lambda content, credentials, task_id=None, project_id=None, attachment=None: {
"id": "2992679862",
"content": "Test comment",
"posted_at": "2016-09-22T07:00:00.000000Z",
"task_id": "2995104339",
"project_id": None,
}
},
)
@staticmethod
def create_comment(
credentials: TodoistCredentials,
content: str,
task_id: Optional[str] = None,
project_id: Optional[str] = None,
attachment: Optional[dict] = None,
):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
comment = api.add_comment(
content=content,
task_id=task_id,
project_id=project_id,
attachment=attachment,
)
return comment.__dict__
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
task_id = None
project_id = None
if isinstance(input_data.id_type, TaskId):
task_id = input_data.id_type.task_id
else:
project_id = input_data.id_type.project_id
comment_data = self.create_comment(
credentials,
input_data.content,
task_id=task_id,
project_id=project_id,
attachment=input_data.attachment,
)
if comment_data:
yield "id", comment_data["id"]
yield "content", comment_data["content"]
yield "posted_at", comment_data["posted_at"]
yield "task_id", comment_data["task_id"]
yield "project_id", comment_data["project_id"]
except Exception as e:
yield "error", str(e)
class TodoistGetCommentsBlock(Block):
"""Get all comments for a Todoist task or project"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
id_type: Union[TaskId, ProjectId] = SchemaField(
discriminator="discriminator",
description="Specify either task_id or project_id to get comments for",
default=TaskId(discriminator="task", task_id=""),
advanced=False,
)
class Output(BlockSchema):
comments: list = SchemaField(description="List of comments")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="9972d8ae-ddf2-11ef-a9b8-32d3674e8b7e",
description="Get all comments for a Todoist task or project",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetCommentsBlock.Input,
output_schema=TodoistGetCommentsBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"id_type": {"discriminator": "task", "task_id": "2995104339"},
},
test_credentials=TEST_CREDENTIALS,
test_output=[
(
"comments",
[
{
"id": "2992679862",
"content": "Test comment",
"posted_at": "2016-09-22T07:00:00.000000Z",
"task_id": "2995104339",
"project_id": None,
"attachment": None,
}
],
)
],
test_mock={
"get_comments": lambda credentials, task_id=None, project_id=None: [
{
"id": "2992679862",
"content": "Test comment",
"posted_at": "2016-09-22T07:00:00.000000Z",
"task_id": "2995104339",
"project_id": None,
"attachment": None,
}
]
},
)
@staticmethod
def get_comments(
credentials: TodoistCredentials,
task_id: Optional[str] = None,
project_id: Optional[str] = None,
):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
comments = api.get_comments(task_id=task_id, project_id=project_id)
return [comment.__dict__ for comment in comments]
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
task_id = None
project_id = None
if isinstance(input_data.id_type, TaskId):
task_id = input_data.id_type.task_id
else:
project_id = input_data.id_type.project_id
comments = self.get_comments(
credentials, task_id=task_id, project_id=project_id
)
yield "comments", comments
except Exception as e:
yield "error", str(e)
class TodoistGetCommentBlock(Block):
"""Get a single comment from Todoist using comment ID"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
comment_id: str = SchemaField(description="Comment ID to retrieve")
class Output(BlockSchema):
content: str = SchemaField(description="Comment content")
id: str = SchemaField(description="Comment ID")
posted_at: str = SchemaField(description="Comment timestamp")
project_id: Optional[str] = SchemaField(
description="Associated project ID", default=None
)
task_id: Optional[str] = SchemaField(
description="Associated task ID", default=None
)
attachment: Optional[dict] = SchemaField(
description="Optional file attachment", default=None
)
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="a809d264-ddf2-11ef-9764-32d3674e8b7e",
description="Get a single comment from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetCommentBlock.Input,
output_schema=TodoistGetCommentBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"comment_id": "2992679862",
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("content", "Test comment"),
("id", "2992679862"),
("posted_at", "2016-09-22T07:00:00.000000Z"),
("project_id", None),
("task_id", "2995104339"),
("attachment", None),
],
test_mock={
"get_comment": lambda credentials, comment_id: {
"content": "Test comment",
"id": "2992679862",
"posted_at": "2016-09-22T07:00:00.000000Z",
"project_id": None,
"task_id": "2995104339",
"attachment": None,
}
},
)
@staticmethod
def get_comment(credentials: TodoistCredentials, comment_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
comment = api.get_comment(comment_id=comment_id)
return comment.__dict__
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
comment_data = self.get_comment(
credentials, comment_id=input_data.comment_id
)
if comment_data:
yield "content", comment_data["content"]
yield "id", comment_data["id"]
yield "posted_at", comment_data["posted_at"]
yield "project_id", comment_data["project_id"]
yield "task_id", comment_data["task_id"]
yield "attachment", comment_data["attachment"]
except Exception as e:
yield "error", str(e)
class TodoistUpdateCommentBlock(Block):
"""Updates a Todoist comment"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
comment_id: str = SchemaField(description="Comment ID to update")
content: str = SchemaField(description="New content for the comment")
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the update was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="b773c520-ddf2-11ef-9f34-32d3674e8b7e",
description="Updates a Todoist comment",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistUpdateCommentBlock.Input,
output_schema=TodoistUpdateCommentBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"comment_id": "2992679862",
"content": "Need one bottle of milk",
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"update_comment": lambda credentials, comment_id, content: True},
)
@staticmethod
def update_comment(credentials: TodoistCredentials, comment_id: str, content: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
api.update_comment(comment_id=comment_id, content=content)
return True
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.update_comment(
credentials,
comment_id=input_data.comment_id,
content=input_data.content,
)
yield "success", success
except Exception as e:
yield "error", str(e)
class TodoistDeleteCommentBlock(Block):
"""Deletes a Todoist comment"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
comment_id: str = SchemaField(description="Comment ID to delete")
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the deletion was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="bda4c020-ddf2-11ef-b114-32d3674e8b7e",
description="Deletes a Todoist comment",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistDeleteCommentBlock.Input,
output_schema=TodoistDeleteCommentBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"comment_id": "2992679862",
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"delete_comment": lambda credentials, comment_id: True},
)
@staticmethod
def delete_comment(credentials: TodoistCredentials, comment_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
success = api.delete_comment(comment_id=comment_id)
return success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.delete_comment(credentials, comment_id=input_data.comment_id)
yield "success", success
except Exception as e:
yield "error", str(e)

View File

@@ -0,0 +1,557 @@
from todoist_api_python.api import TodoistAPI
from typing_extensions import Optional
from backend.blocks.todoist._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
TodoistCredentials,
TodoistCredentialsField,
TodoistCredentialsInput,
)
from backend.blocks.todoist._types import Colors
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class TodoistCreateLabelBlock(Block):
"""Creates a new label in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
name: str = SchemaField(description="Name of the label")
order: Optional[int] = SchemaField(description="Label order", default=None)
color: Optional[Colors] = SchemaField(
description="The color of the label icon", default=Colors.charcoal
)
is_favorite: bool = SchemaField(
description="Whether the label is a favorite", default=False
)
class Output(BlockSchema):
id: str = SchemaField(description="ID of the created label")
name: str = SchemaField(description="Name of the label")
color: str = SchemaField(description="Color of the label")
order: int = SchemaField(description="Label order")
is_favorite: bool = SchemaField(description="Favorite status")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="7288a968-de14-11ef-8997-32d3674e8b7e",
description="Creates a new label in Todoist, It will not work if same name already exists",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistCreateLabelBlock.Input,
output_schema=TodoistCreateLabelBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"name": "Test Label",
"color": Colors.charcoal.value,
"order": 1,
"is_favorite": False,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("id", "2156154810"),
("name", "Test Label"),
("color", "charcoal"),
("order", 1),
("is_favorite", False),
],
test_mock={
"create_label": lambda *args, **kwargs: {
"id": "2156154810",
"name": "Test Label",
"color": "charcoal",
"order": 1,
"is_favorite": False,
}
},
)
@staticmethod
def create_label(credentials: TodoistCredentials, name: str, **kwargs):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
label = api.add_label(name=name, **kwargs)
return label.__dict__
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
label_args = {
"order": input_data.order,
"color": (
input_data.color.value if input_data.color is not None else None
),
"is_favorite": input_data.is_favorite,
}
label_data = self.create_label(
credentials,
input_data.name,
**{k: v for k, v in label_args.items() if v is not None},
)
if label_data:
yield "id", label_data["id"]
yield "name", label_data["name"]
yield "color", label_data["color"]
yield "order", label_data["order"]
yield "is_favorite", label_data["is_favorite"]
except Exception as e:
yield "error", str(e)
class TodoistListLabelsBlock(Block):
"""Gets all personal labels from Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
class Output(BlockSchema):
labels: list = SchemaField(description="List of complete label data")
label_ids: list = SchemaField(description="List of label IDs")
label_names: list = SchemaField(description="List of label names")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="776dd750-de14-11ef-b927-32d3674e8b7e",
description="Gets all personal labels from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistListLabelsBlock.Input,
output_schema=TodoistListLabelsBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT},
test_credentials=TEST_CREDENTIALS,
test_output=[
(
"labels",
[
{
"id": "2156154810",
"name": "Test Label",
"color": "charcoal",
"order": 1,
"is_favorite": False,
}
],
),
("label_ids", ["2156154810"]),
("label_names", ["Test Label"]),
],
test_mock={
"get_labels": lambda *args, **kwargs: [
{
"id": "2156154810",
"name": "Test Label",
"color": "charcoal",
"order": 1,
"is_favorite": False,
}
]
},
)
@staticmethod
def get_labels(credentials: TodoistCredentials):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
labels = api.get_labels()
return [label.__dict__ for label in labels]
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
labels = self.get_labels(credentials)
yield "labels", labels
yield "label_ids", [label["id"] for label in labels]
yield "label_names", [label["name"] for label in labels]
except Exception as e:
yield "error", str(e)
class TodoistGetLabelBlock(Block):
"""Gets a personal label from Todoist by ID"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
label_id: str = SchemaField(description="ID of the label to retrieve")
class Output(BlockSchema):
id: str = SchemaField(description="ID of the label")
name: str = SchemaField(description="Name of the label")
color: str = SchemaField(description="Color of the label")
order: int = SchemaField(description="Label order")
is_favorite: bool = SchemaField(description="Favorite status")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="7f236514-de14-11ef-bd7a-32d3674e8b7e",
description="Gets a personal label from Todoist by ID",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetLabelBlock.Input,
output_schema=TodoistGetLabelBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"label_id": "2156154810",
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("id", "2156154810"),
("name", "Test Label"),
("color", "charcoal"),
("order", 1),
("is_favorite", False),
],
test_mock={
"get_label": lambda *args, **kwargs: {
"id": "2156154810",
"name": "Test Label",
"color": "charcoal",
"order": 1,
"is_favorite": False,
}
},
)
@staticmethod
def get_label(credentials: TodoistCredentials, label_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
label = api.get_label(label_id=label_id)
return label.__dict__
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
label_data = self.get_label(credentials, input_data.label_id)
if label_data:
yield "id", label_data["id"]
yield "name", label_data["name"]
yield "color", label_data["color"]
yield "order", label_data["order"]
yield "is_favorite", label_data["is_favorite"]
except Exception as e:
yield "error", str(e)
class TodoistUpdateLabelBlock(Block):
"""Updates a personal label in Todoist using ID"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
label_id: str = SchemaField(description="ID of the label to update")
name: Optional[str] = SchemaField(
description="New name of the label", default=None
)
order: Optional[int] = SchemaField(description="Label order", default=None)
color: Optional[Colors] = SchemaField(
description="The color of the label icon", default=None
)
is_favorite: bool = SchemaField(
description="Whether the label is a favorite (true/false)", default=False
)
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the update was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="8755614c-de14-11ef-9b56-32d3674e8b7e",
description="Updates a personal label in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistUpdateLabelBlock.Input,
output_schema=TodoistUpdateLabelBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"label_id": "2156154810",
"name": "Updated Label",
"color": Colors.charcoal.value,
"order": 2,
"is_favorite": True,
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"update_label": lambda *args, **kwargs: True},
)
@staticmethod
def update_label(credentials: TodoistCredentials, label_id: str, **kwargs):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
api.update_label(label_id=label_id, **kwargs)
return True
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
label_args = {}
if input_data.name is not None:
label_args["name"] = input_data.name
if input_data.order is not None:
label_args["order"] = input_data.order
if input_data.color is not None:
label_args["color"] = input_data.color.value
if input_data.is_favorite is not None:
label_args["is_favorite"] = input_data.is_favorite
success = self.update_label(
credentials,
input_data.label_id,
**{k: v for k, v in label_args.items() if v is not None},
)
yield "success", success
except Exception as e:
yield "error", str(e)
class TodoistDeleteLabelBlock(Block):
"""Deletes a personal label in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
label_id: str = SchemaField(description="ID of the label to delete")
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the deletion was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="901b8f86-de14-11ef-98b8-32d3674e8b7e",
description="Deletes a personal label in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistDeleteLabelBlock.Input,
output_schema=TodoistDeleteLabelBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"label_id": "2156154810",
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"delete_label": lambda *args, **kwargs: True},
)
@staticmethod
def delete_label(credentials: TodoistCredentials, label_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
success = api.delete_label(label_id=label_id)
return success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.delete_label(credentials, input_data.label_id)
yield "success", success
except Exception as e:
yield "error", str(e)
class TodoistGetSharedLabelsBlock(Block):
"""Gets all shared labels from Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
class Output(BlockSchema):
labels: list = SchemaField(description="List of shared label names")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="55fba510-de15-11ef-aed2-32d3674e8b7e",
description="Gets all shared labels from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetSharedLabelsBlock.Input,
output_schema=TodoistGetSharedLabelsBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT},
test_credentials=TEST_CREDENTIALS,
test_output=[("labels", ["Label1", "Label2", "Label3"])],
test_mock={
"get_shared_labels": lambda *args, **kwargs: [
"Label1",
"Label2",
"Label3",
]
},
)
@staticmethod
def get_shared_labels(credentials: TodoistCredentials):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
labels = api.get_shared_labels()
return labels
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
labels = self.get_shared_labels(credentials)
yield "labels", labels
except Exception as e:
yield "error", str(e)
class TodoistRenameSharedLabelsBlock(Block):
"""Renames all instances of a shared label"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
name: str = SchemaField(description="The name of the existing label to rename")
new_name: str = SchemaField(description="The new name for the label")
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the rename was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="9d63ad9a-de14-11ef-ab3f-32d3674e8b7e",
description="Renames all instances of a shared label",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistRenameSharedLabelsBlock.Input,
output_schema=TodoistRenameSharedLabelsBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"name": "OldLabel",
"new_name": "NewLabel",
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"rename_shared_labels": lambda *args, **kwargs: True},
)
@staticmethod
def rename_shared_labels(credentials: TodoistCredentials, name: str, new_name: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
success = api.rename_shared_label(name=name, new_name=new_name)
return success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.rename_shared_labels(
credentials, input_data.name, input_data.new_name
)
yield "success", success
except Exception as e:
yield "error", str(e)
class TodoistRemoveSharedLabelsBlock(Block):
"""Removes all instances of a shared label"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
name: str = SchemaField(description="The name of the label to remove")
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the removal was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="a6c5cbde-de14-11ef-8863-32d3674e8b7e",
description="Removes all instances of a shared label",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistRemoveSharedLabelsBlock.Input,
output_schema=TodoistRemoveSharedLabelsBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "name": "LabelToRemove"},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"remove_shared_label": lambda *args, **kwargs: True},
)
@staticmethod
def remove_shared_label(credentials: TodoistCredentials, name: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
success = api.remove_shared_label(name=name)
return success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.remove_shared_label(credentials, input_data.name)
yield "success", success
except Exception as e:
yield "error", str(e)

View File

@@ -0,0 +1,566 @@
from todoist_api_python.api import TodoistAPI
from typing_extensions import Optional
from backend.blocks.todoist._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
TodoistCredentials,
TodoistCredentialsField,
TodoistCredentialsInput,
)
from backend.blocks.todoist._types import Colors
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class TodoistListProjectsBlock(Block):
"""Gets all projects for a Todoist user"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
class Output(BlockSchema):
names_list: list[str] = SchemaField(description="List of project names")
ids_list: list[str] = SchemaField(description="List of project IDs")
url_list: list[str] = SchemaField(description="List of project URLs")
complete_data: list[dict] = SchemaField(
description="Complete project data including all fields"
)
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="5f3e1d5b-6bc5-40e3-97ee-1318b3f38813",
description="Gets all projects and their details from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistListProjectsBlock.Input,
output_schema=TodoistListProjectsBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("names_list", ["Inbox"]),
("ids_list", ["220474322"]),
("url_list", ["https://todoist.com/showProject?id=220474322"]),
(
"complete_data",
[
{
"id": "220474322",
"name": "Inbox",
"url": "https://todoist.com/showProject?id=220474322",
}
],
),
],
test_mock={
"get_project_lists": lambda *args, **kwargs: (
["Inbox"],
["220474322"],
["https://todoist.com/showProject?id=220474322"],
[
{
"id": "220474322",
"name": "Inbox",
"url": "https://todoist.com/showProject?id=220474322",
}
],
None,
)
},
)
@staticmethod
def get_project_lists(credentials: TodoistCredentials):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
projects = api.get_projects()
names = []
ids = []
urls = []
complete_data = []
for project in projects:
names.append(project.name)
ids.append(project.id)
urls.append(project.url)
complete_data.append(project.__dict__)
return names, ids, urls, complete_data, None
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
names, ids, urls, data, error = self.get_project_lists(credentials)
if names:
yield "names_list", names
if ids:
yield "ids_list", ids
if urls:
yield "url_list", urls
if data:
yield "complete_data", data
except Exception as e:
yield "error", str(e)
class TodoistCreateProjectBlock(Block):
"""Creates a new project in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
name: str = SchemaField(description="Name of the project", advanced=False)
parent_id: Optional[str] = SchemaField(
description="Parent project ID", default=None, advanced=True
)
color: Optional[Colors] = SchemaField(
description="Color of the project icon",
default=Colors.charcoal,
advanced=True,
)
is_favorite: bool = SchemaField(
description="Whether the project is a favorite",
default=False,
advanced=True,
)
view_style: Optional[str] = SchemaField(
description="Display style (list or board)", default=None, advanced=True
)
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the creation was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="ade60136-de14-11ef-b5e5-32d3674e8b7e",
description="Creates a new project in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistCreateProjectBlock.Input,
output_schema=TodoistCreateProjectBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "name": "Test Project"},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"create_project": lambda *args, **kwargs: (True)},
)
@staticmethod
def create_project(
credentials: TodoistCredentials,
name: str,
parent_id: Optional[str],
color: Optional[Colors],
is_favorite: bool,
view_style: Optional[str],
):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
params = {"name": name, "is_favorite": is_favorite}
if parent_id is not None:
params["parent_id"] = parent_id
if color is not None:
params["color"] = color.value
if view_style is not None:
params["view_style"] = view_style
api.add_project(**params)
return True
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.create_project(
credentials=credentials,
name=input_data.name,
parent_id=input_data.parent_id,
color=input_data.color,
is_favorite=input_data.is_favorite,
view_style=input_data.view_style,
)
yield "success", success
except Exception as e:
yield "error", str(e)
class TodoistGetProjectBlock(Block):
"""Gets details for a specific Todoist project"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
project_id: str = SchemaField(
description="ID of the project to get details for", advanced=False
)
class Output(BlockSchema):
project_id: str = SchemaField(description="ID of project")
project_name: str = SchemaField(description="Name of project")
project_url: str = SchemaField(description="URL of project")
complete_data: dict = SchemaField(
description="Complete project data including all fields"
)
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="b435b5ea-de14-11ef-8b51-32d3674e8b7e",
description="Gets details for a specific Todoist project",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetProjectBlock.Input,
output_schema=TodoistGetProjectBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"project_id": "2203306141",
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("project_id", "2203306141"),
("project_name", "Shopping List"),
("project_url", "https://todoist.com/showProject?id=2203306141"),
(
"complete_data",
{
"id": "2203306141",
"name": "Shopping List",
"url": "https://todoist.com/showProject?id=2203306141",
},
),
],
test_mock={
"get_project": lambda *args, **kwargs: (
"2203306141",
"Shopping List",
"https://todoist.com/showProject?id=2203306141",
{
"id": "2203306141",
"name": "Shopping List",
"url": "https://todoist.com/showProject?id=2203306141",
},
)
},
)
@staticmethod
def get_project(credentials: TodoistCredentials, project_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
project = api.get_project(project_id=project_id)
return project.id, project.name, project.url, project.__dict__
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
project_id, project_name, project_url, data = self.get_project(
credentials=credentials, project_id=input_data.project_id
)
if project_id:
yield "project_id", project_id
if project_name:
yield "project_name", project_name
if project_url:
yield "project_url", project_url
if data:
yield "complete_data", data
except Exception as e:
yield "error", str(e)
class TodoistUpdateProjectBlock(Block):
"""Updates an existing project in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
project_id: str = SchemaField(
description="ID of project to update", advanced=False
)
name: Optional[str] = SchemaField(
description="New name for the project", default=None, advanced=False
)
color: Optional[Colors] = SchemaField(
description="New color for the project icon", default=None, advanced=True
)
is_favorite: Optional[bool] = SchemaField(
description="Whether the project should be a favorite",
default=None,
advanced=True,
)
view_style: Optional[str] = SchemaField(
description="Display style (list or board)", default=None, advanced=True
)
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the update was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="ba41a20a-de14-11ef-91d7-32d3674e8b7e",
description="Updates an existing project in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistUpdateProjectBlock.Input,
output_schema=TodoistUpdateProjectBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"project_id": "2203306141",
"name": "Things To Buy",
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"update_project": lambda *args, **kwargs: (True)},
)
@staticmethod
def update_project(
credentials: TodoistCredentials,
project_id: str,
name: Optional[str],
color: Optional[Colors],
is_favorite: Optional[bool],
view_style: Optional[str],
):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
params = {}
if name is not None:
params["name"] = name
if color is not None:
params["color"] = color.value
if is_favorite is not None:
params["is_favorite"] = is_favorite
if view_style is not None:
params["view_style"] = view_style
api.update_project(project_id=project_id, **params)
return True
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.update_project(
credentials=credentials,
project_id=input_data.project_id,
name=input_data.name,
color=input_data.color,
is_favorite=input_data.is_favorite,
view_style=input_data.view_style,
)
yield "success", success
except Exception as e:
yield "error", str(e)
class TodoistDeleteProjectBlock(Block):
"""Deletes a project and all of its sections and tasks"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
project_id: str = SchemaField(
description="ID of project to delete", advanced=False
)
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the deletion was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="c2893acc-de14-11ef-a113-32d3674e8b7e",
description="Deletes a Todoist project and all its contents",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistDeleteProjectBlock.Input,
output_schema=TodoistDeleteProjectBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"project_id": "2203306141",
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"delete_project": lambda *args, **kwargs: (True)},
)
@staticmethod
def delete_project(credentials: TodoistCredentials, project_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
success = api.delete_project(project_id=project_id)
return success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.delete_project(
credentials=credentials, project_id=input_data.project_id
)
yield "success", success
except Exception as e:
yield "error", str(e)
class TodoistListCollaboratorsBlock(Block):
"""Gets all collaborators for a Todoist project"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
project_id: str = SchemaField(
description="ID of the project to get collaborators for", advanced=False
)
class Output(BlockSchema):
collaborator_ids: list[str] = SchemaField(
description="List of collaborator IDs"
)
collaborator_names: list[str] = SchemaField(
description="List of collaborator names"
)
collaborator_emails: list[str] = SchemaField(
description="List of collaborator email addresses"
)
complete_data: list[dict] = SchemaField(
description="Complete collaborator data including all fields"
)
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="c99c804e-de14-11ef-9f47-32d3674e8b7e",
description="Gets all collaborators for a specific Todoist project",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistListCollaboratorsBlock.Input,
output_schema=TodoistListCollaboratorsBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"project_id": "2203306141",
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("collaborator_ids", ["2671362", "2671366"]),
("collaborator_names", ["Alice", "Bob"]),
("collaborator_emails", ["alice@example.com", "bob@example.com"]),
(
"complete_data",
[
{
"id": "2671362",
"name": "Alice",
"email": "alice@example.com",
},
{"id": "2671366", "name": "Bob", "email": "bob@example.com"},
],
),
],
test_mock={
"get_collaborators": lambda *args, **kwargs: (
["2671362", "2671366"],
["Alice", "Bob"],
["alice@example.com", "bob@example.com"],
[
{
"id": "2671362",
"name": "Alice",
"email": "alice@example.com",
},
{"id": "2671366", "name": "Bob", "email": "bob@example.com"},
],
)
},
)
@staticmethod
def get_collaborators(credentials: TodoistCredentials, project_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
collaborators = api.get_collaborators(project_id=project_id)
ids = []
names = []
emails = []
complete_data = []
for collaborator in collaborators:
ids.append(collaborator.id)
names.append(collaborator.name)
emails.append(collaborator.email)
complete_data.append(collaborator.__dict__)
return ids, names, emails, complete_data
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
ids, names, emails, data = self.get_collaborators(
credentials=credentials, project_id=input_data.project_id
)
if ids:
yield "collaborator_ids", ids
if names:
yield "collaborator_names", names
if emails:
yield "collaborator_emails", emails
if data:
yield "complete_data", data
except Exception as e:
yield "error", str(e)

View File

@@ -0,0 +1,306 @@
from todoist_api_python.api import TodoistAPI
from typing_extensions import Optional
from backend.blocks.todoist._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
TodoistCredentials,
TodoistCredentialsField,
TodoistCredentialsInput,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class TodoistListSectionsBlock(Block):
"""Gets all sections for a Todoist project"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
project_id: Optional[str] = SchemaField(
description="Optional project ID to filter sections"
)
class Output(BlockSchema):
names_list: list[str] = SchemaField(description="List of section names")
ids_list: list[str] = SchemaField(description="List of section IDs")
complete_data: list[dict] = SchemaField(
description="Complete section data including all fields"
)
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="d6a116d8-de14-11ef-a94c-32d3674e8b7e",
description="Gets all sections and their details from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistListSectionsBlock.Input,
output_schema=TodoistListSectionsBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"project_id": "2203306141",
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("names_list", ["Groceries"]),
("ids_list", ["7025"]),
(
"complete_data",
[
{
"id": "7025",
"project_id": "2203306141",
"order": 1,
"name": "Groceries",
}
],
),
],
test_mock={
"get_section_lists": lambda *args, **kwargs: (
["Groceries"],
["7025"],
[
{
"id": "7025",
"project_id": "2203306141",
"order": 1,
"name": "Groceries",
}
],
)
},
)
@staticmethod
def get_section_lists(
credentials: TodoistCredentials, project_id: Optional[str] = None
):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
sections = api.get_sections(project_id=project_id)
names = []
ids = []
complete_data = []
for section in sections:
names.append(section.name)
ids.append(section.id)
complete_data.append(section.__dict__)
return names, ids, complete_data
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
names, ids, data = self.get_section_lists(
credentials, input_data.project_id
)
if names:
yield "names_list", names
if ids:
yield "ids_list", ids
if data:
yield "complete_data", data
except Exception as e:
yield "error", str(e)
# Error in official todoist SDK. Will add this block using sync_api
# class TodoistCreateSectionBlock(Block):
# """Creates a new section in a Todoist project"""
# class Input(BlockSchema):
# credentials: TodoistCredentialsInput = TodoistCredentialsField([])
# name: str = SchemaField(description="Section name")
# project_id: str = SchemaField(description="Project ID this section should belong to")
# order: Optional[int] = SchemaField(description="Optional order among other sections", default=None)
# class Output(BlockSchema):
# success: bool = SchemaField(description="Whether section was successfully created")
# error: str = SchemaField(description="Error message if the request failed")
# def __init__(self):
# super().__init__(
# id="e3025cfc-de14-11ef-b9f2-32d3674e8b7e",
# description="Creates a new section in a Todoist project",
# categories={BlockCategory.PRODUCTIVITY},
# input_schema=TodoistCreateSectionBlock.Input,
# output_schema=TodoistCreateSectionBlock.Output,
# test_input={
# "credentials": TEST_CREDENTIALS_INPUT,
# "name": "Groceries",
# "project_id": "2203306141"
# },
# test_credentials=TEST_CREDENTIALS,
# test_output=[
# ("success", True)
# ],
# test_mock={
# "create_section": lambda *args, **kwargs: (
# {"id": "7025", "project_id": "2203306141", "order": 1, "name": "Groceries"},
# )
# },
# )
# @staticmethod
# def create_section(credentials: TodoistCredentials, name: str, project_id: str, order: Optional[int] = None):
# try:
# api = TodoistAPI(credentials.access_token.get_secret_value())
# section = api.add_section(name=name, project_id=project_id, order=order)
# return section.__dict__
# except Exception as e:
# raise e
# def run(
# self,
# input_data: Input,
# *,
# credentials: TodoistCredentials,
# **kwargs,
# ) -> BlockOutput:
# try:
# section_data = self.create_section(
# credentials,
# input_data.name,
# input_data.project_id,
# input_data.order
# )
# if section_data:
# yield "success", True
# except Exception as e:
# yield "error", str(e)
class TodoistGetSectionBlock(Block):
"""Gets a single section from Todoist by ID"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
section_id: str = SchemaField(description="ID of section to fetch")
class Output(BlockSchema):
id: str = SchemaField(description="ID of section")
project_id: str = SchemaField(description="Project ID the section belongs to")
order: int = SchemaField(description="Order of the section")
name: str = SchemaField(description="Name of the section")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="ea5580e2-de14-11ef-a5d3-32d3674e8b7e",
description="Gets a single section by ID from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetSectionBlock.Input,
output_schema=TodoistGetSectionBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "section_id": "7025"},
test_credentials=TEST_CREDENTIALS,
test_output=[
("id", "7025"),
("project_id", "2203306141"),
("order", 1),
("name", "Groceries"),
],
test_mock={
"get_section": lambda *args, **kwargs: {
"id": "7025",
"project_id": "2203306141",
"order": 1,
"name": "Groceries",
}
},
)
@staticmethod
def get_section(credentials: TodoistCredentials, section_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
section = api.get_section(section_id=section_id)
return section.__dict__
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
section_data = self.get_section(credentials, input_data.section_id)
if section_data:
yield "id", section_data["id"]
yield "project_id", section_data["project_id"]
yield "order", section_data["order"]
yield "name", section_data["name"]
except Exception as e:
yield "error", str(e)
class TodoistDeleteSectionBlock(Block):
"""Deletes a section and all its tasks from Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
section_id: str = SchemaField(description="ID of section to delete")
class Output(BlockSchema):
success: bool = SchemaField(
description="Whether section was successfully deleted"
)
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="f0e52eee-de14-11ef-9b12-32d3674e8b7e",
description="Deletes a section and all its tasks from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistDeleteSectionBlock.Input,
output_schema=TodoistDeleteSectionBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "section_id": "7025"},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"delete_section": lambda *args, **kwargs: (True)},
)
@staticmethod
def delete_section(credentials: TodoistCredentials, section_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
success = api.delete_section(section_id=section_id)
return success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.delete_section(credentials, input_data.section_id)
yield "success", success
except Exception as e:
yield "error", str(e)

View File

@@ -0,0 +1,660 @@
from datetime import datetime
from todoist_api_python.api import TodoistAPI
from todoist_api_python.models import Task
from typing_extensions import Optional
from backend.blocks.todoist._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
TodoistCredentials,
TodoistCredentialsField,
TodoistCredentialsInput,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class TodoistCreateTaskBlock(Block):
"""Creates a new task in a Todoist project"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
content: str = SchemaField(description="Task content", advanced=False)
description: Optional[str] = SchemaField(
description="Task description", default=None, advanced=False
)
project_id: Optional[str] = SchemaField(
description="Project ID this task should belong to",
default=None,
advanced=False,
)
section_id: Optional[str] = SchemaField(
description="Section ID this task should belong to",
default=None,
advanced=False,
)
parent_id: Optional[str] = SchemaField(
description="Parent task ID", default=None, advanced=True
)
order: Optional[int] = SchemaField(
description="Optional order among other tasks,[Non-zero integer value used by clients to sort tasks under the same parent]",
default=None,
advanced=True,
)
labels: Optional[list[str]] = SchemaField(
description="Task labels", default=None, advanced=True
)
priority: Optional[int] = SchemaField(
description="Task priority from 1 (normal) to 4 (urgent)",
default=None,
advanced=True,
)
due_date: Optional[datetime] = SchemaField(
description="Due date in YYYY-MM-DD format", advanced=True, default=None
)
deadline_date: Optional[datetime] = SchemaField(
description="Specific date in YYYY-MM-DD format relative to user's timezone",
default=None,
advanced=True,
)
assignee_id: Optional[str] = SchemaField(
description="Responsible user ID", default=None, advanced=True
)
duration_unit: Optional[str] = SchemaField(
description="Task duration unit (minute/day)", default=None, advanced=True
)
duration: Optional[int] = SchemaField(
description="Task duration amount, You need to selecct the duration unit first",
depends_on=["duration_unit"],
default=None,
advanced=True,
)
class Output(BlockSchema):
id: str = SchemaField(description="Task ID")
url: str = SchemaField(description="Task URL")
complete_data: dict = SchemaField(
description="Complete task data as dictionary"
)
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="fde4f458-de14-11ef-bf0c-32d3674e8b7e",
description="Creates a new task in a Todoist project",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistCreateTaskBlock.Input,
output_schema=TodoistCreateTaskBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"content": "Buy groceries",
"project_id": "2203306141",
"priority": 4,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("id", "2995104339"),
("url", "https://todoist.com/showTask?id=2995104339"),
(
"complete_data",
{
"id": "2995104339",
"project_id": "2203306141",
"url": "https://todoist.com/showTask?id=2995104339",
},
),
],
test_mock={
"create_task": lambda *args, **kwargs: (
"2995104339",
"https://todoist.com/showTask?id=2995104339",
{
"id": "2995104339",
"project_id": "2203306141",
"url": "https://todoist.com/showTask?id=2995104339",
},
)
},
)
@staticmethod
def create_task(credentials: TodoistCredentials, content: str, **kwargs):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
task = api.add_task(content=content, **kwargs)
task_dict = Task.to_dict(task)
return task.id, task.url, task_dict
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
due_date = (
input_data.due_date.strftime("%Y-%m-%d")
if input_data.due_date
else None
)
deadline_date = (
input_data.deadline_date.strftime("%Y-%m-%d")
if input_data.deadline_date
else None
)
task_args = {
"description": input_data.description,
"project_id": input_data.project_id,
"section_id": input_data.section_id,
"parent_id": input_data.parent_id,
"order": input_data.order,
"labels": input_data.labels,
"priority": input_data.priority,
"due_date": due_date,
"deadline_date": deadline_date,
"assignee_id": input_data.assignee_id,
"duration": input_data.duration,
"duration_unit": input_data.duration_unit,
}
id, url, complete_data = self.create_task(
credentials,
input_data.content,
**{k: v for k, v in task_args.items() if v is not None},
)
yield "id", id
yield "url", url
yield "complete_data", complete_data
except Exception as e:
yield "error", str(e)
class TodoistGetTasksBlock(Block):
"""Get active tasks from Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
project_id: Optional[str] = SchemaField(
description="Filter tasks by project ID", default=None, advanced=False
)
section_id: Optional[str] = SchemaField(
description="Filter tasks by section ID", default=None, advanced=True
)
label: Optional[str] = SchemaField(
description="Filter tasks by label name", default=None, advanced=True
)
filter: Optional[str] = SchemaField(
description="Filter by any supported filter, You can see How to use filters or create one of your one here - https://todoist.com/help/articles/introduction-to-filters-V98wIH",
default=None,
advanced=True,
)
lang: Optional[str] = SchemaField(
description="IETF language tag for filter language", default=None
)
ids: Optional[list[str]] = SchemaField(
description="List of task IDs to retrieve", default=None, advanced=False
)
class Output(BlockSchema):
ids: list[str] = SchemaField(description="Task IDs")
urls: list[str] = SchemaField(description="Task URLs")
complete_data: list[dict] = SchemaField(
description="Complete task data as dictionary"
)
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="0b706e86-de15-11ef-a113-32d3674e8b7e",
description="Get active tasks from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetTasksBlock.Input,
output_schema=TodoistGetTasksBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"project_id": "2203306141",
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("ids", ["2995104339"]),
("urls", ["https://todoist.com/showTask?id=2995104339"]),
(
"complete_data",
[
{
"id": "2995104339",
"project_id": "2203306141",
"url": "https://todoist.com/showTask?id=2995104339",
"is_completed": False,
}
],
),
],
test_mock={
"get_tasks": lambda *args, **kwargs: [
{
"id": "2995104339",
"project_id": "2203306141",
"url": "https://todoist.com/showTask?id=2995104339",
"is_completed": False,
}
]
},
)
@staticmethod
def get_tasks(credentials: TodoistCredentials, **kwargs):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
tasks = api.get_tasks(**kwargs)
return [Task.to_dict(task) for task in tasks]
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
task_filters = {
"project_id": input_data.project_id,
"section_id": input_data.section_id,
"label": input_data.label,
"filter": input_data.filter,
"lang": input_data.lang,
"ids": input_data.ids,
}
tasks = self.get_tasks(
credentials, **{k: v for k, v in task_filters.items() if v is not None}
)
yield "ids", [task["id"] for task in tasks]
yield "urls", [task["url"] for task in tasks]
yield "complete_data", tasks
except Exception as e:
yield "error", str(e)
class TodoistGetTaskBlock(Block):
"""Get an active task from Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
task_id: str = SchemaField(description="Task ID to retrieve")
class Output(BlockSchema):
project_id: str = SchemaField(description="Project ID containing the task")
url: str = SchemaField(description="Task URL")
complete_data: dict = SchemaField(
description="Complete task data as dictionary"
)
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="16d7dc8c-de15-11ef-8ace-32d3674e8b7e",
description="Get an active task from Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistGetTaskBlock.Input,
output_schema=TodoistGetTaskBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "task_id": "2995104339"},
test_credentials=TEST_CREDENTIALS,
test_output=[
("project_id", "2203306141"),
("url", "https://todoist.com/showTask?id=2995104339"),
(
"complete_data",
{
"id": "2995104339",
"project_id": "2203306141",
"url": "https://todoist.com/showTask?id=2995104339",
},
),
],
test_mock={
"get_task": lambda *args, **kwargs: {
"project_id": "2203306141",
"id": "2995104339",
"url": "https://todoist.com/showTask?id=2995104339",
}
},
)
@staticmethod
def get_task(credentials: TodoistCredentials, task_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
task = api.get_task(task_id=task_id)
return Task.to_dict(task)
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
task_data = self.get_task(credentials, input_data.task_id)
if task_data:
yield "project_id", task_data["project_id"]
yield "url", task_data["url"]
yield "complete_data", task_data
except Exception as e:
yield "error", str(e)
class TodoistUpdateTaskBlock(Block):
"""Updates an existing task in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
task_id: str = SchemaField(description="Task ID to update")
content: str = SchemaField(description="Task content", advanced=False)
description: Optional[str] = SchemaField(
description="Task description", default=None, advanced=False
)
project_id: Optional[str] = SchemaField(
description="Project ID this task should belong to",
default=None,
advanced=False,
)
section_id: Optional[str] = SchemaField(
description="Section ID this task should belong to",
default=None,
advanced=False,
)
parent_id: Optional[str] = SchemaField(
description="Parent task ID", default=None, advanced=True
)
order: Optional[int] = SchemaField(
description="Optional order among other tasks,[Non-zero integer value used by clients to sort tasks under the same parent]",
default=None,
advanced=True,
)
labels: Optional[list[str]] = SchemaField(
description="Task labels", default=None, advanced=True
)
priority: Optional[int] = SchemaField(
description="Task priority from 1 (normal) to 4 (urgent)",
default=None,
advanced=True,
)
due_date: Optional[datetime] = SchemaField(
description="Due date in YYYY-MM-DD format", advanced=True, default=None
)
deadline_date: Optional[datetime] = SchemaField(
description="Specific date in YYYY-MM-DD format relative to user's timezone",
default=None,
advanced=True,
)
assignee_id: Optional[str] = SchemaField(
description="Responsible user ID", default=None, advanced=True
)
duration_unit: Optional[str] = SchemaField(
description="Task duration unit (minute/day)", default=None, advanced=True
)
duration: Optional[int] = SchemaField(
description="Task duration amount, You need to selecct the duration unit first",
depends_on=["duration_unit"],
default=None,
advanced=True,
)
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the update was successful")
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="1eee6d32-de15-11ef-a2ff-32d3674e8b7e",
description="Updates an existing task in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistUpdateTaskBlock.Input,
output_schema=TodoistUpdateTaskBlock.Output,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"task_id": "2995104339",
"content": "Buy Coffee",
},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"update_task": lambda *args, **kwargs: True},
)
@staticmethod
def update_task(credentials: TodoistCredentials, task_id: str, **kwargs):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
is_success = api.update_task(task_id=task_id, **kwargs)
return is_success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
due_date = (
input_data.due_date.strftime("%Y-%m-%d")
if input_data.due_date
else None
)
deadline_date = (
input_data.deadline_date.strftime("%Y-%m-%d")
if input_data.deadline_date
else None
)
task_updates = {}
if input_data.content is not None:
task_updates["content"] = input_data.content
if input_data.description is not None:
task_updates["description"] = input_data.description
if input_data.project_id is not None:
task_updates["project_id"] = input_data.project_id
if input_data.section_id is not None:
task_updates["section_id"] = input_data.section_id
if input_data.parent_id is not None:
task_updates["parent_id"] = input_data.parent_id
if input_data.order is not None:
task_updates["order"] = input_data.order
if input_data.labels is not None:
task_updates["labels"] = input_data.labels
if input_data.priority is not None:
task_updates["priority"] = input_data.priority
if due_date is not None:
task_updates["due_date"] = due_date
if deadline_date is not None:
task_updates["deadline_date"] = deadline_date
if input_data.assignee_id is not None:
task_updates["assignee_id"] = input_data.assignee_id
if input_data.duration is not None:
task_updates["duration"] = input_data.duration
if input_data.duration_unit is not None:
task_updates["duration_unit"] = input_data.duration_unit
self.update_task(
credentials,
input_data.task_id,
**{k: v for k, v in task_updates.items() if v is not None},
)
yield "success", True
except Exception as e:
yield "error", str(e)
class TodoistCloseTaskBlock(Block):
"""Closes a task in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
task_id: str = SchemaField(description="Task ID to close")
class Output(BlockSchema):
success: bool = SchemaField(
description="Whether the task was successfully closed"
)
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="29fac798-de15-11ef-b839-32d3674e8b7e",
description="Closes a task in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistCloseTaskBlock.Input,
output_schema=TodoistCloseTaskBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "task_id": "2995104339"},
test_credentials=TEST_CREDENTIALS,
test_output=[("success", True)],
test_mock={"close_task": lambda *args, **kwargs: True},
)
@staticmethod
def close_task(credentials: TodoistCredentials, task_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
is_success = api.close_task(task_id=task_id)
return is_success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
is_success = self.close_task(credentials, input_data.task_id)
yield "success", is_success
except Exception as e:
yield "error", str(e)
class TodoistReopenTaskBlock(Block):
"""Reopens a task in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
task_id: str = SchemaField(description="Task ID to reopen")
class Output(BlockSchema):
success: bool = SchemaField(
description="Whether the task was successfully reopened"
)
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="2e6bf6f8-de15-11ef-ae7c-32d3674e8b7e",
description="Reopens a task in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistReopenTaskBlock.Input,
output_schema=TodoistReopenTaskBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "task_id": "2995104339"},
test_credentials=TEST_CREDENTIALS,
test_output=[
("success", True),
],
test_mock={"reopen_task": lambda *args, **kwargs: (True)},
)
@staticmethod
def reopen_task(credentials: TodoistCredentials, task_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
is_success = api.reopen_task(task_id=task_id)
return is_success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
is_success = self.reopen_task(credentials, input_data.task_id)
yield "success", is_success
except Exception as e:
yield "error", str(e)
class TodoistDeleteTaskBlock(Block):
"""Deletes a task in Todoist"""
class Input(BlockSchema):
credentials: TodoistCredentialsInput = TodoistCredentialsField([])
task_id: str = SchemaField(description="Task ID to delete")
class Output(BlockSchema):
success: bool = SchemaField(
description="Whether the task was successfully deleted"
)
error: str = SchemaField(description="Error message if request failed")
def __init__(self):
super().__init__(
id="33c29ada-de15-11ef-bcbb-32d3674e8b7e",
description="Deletes a task in Todoist",
categories={BlockCategory.PRODUCTIVITY},
input_schema=TodoistDeleteTaskBlock.Input,
output_schema=TodoistDeleteTaskBlock.Output,
test_input={"credentials": TEST_CREDENTIALS_INPUT, "task_id": "2995104339"},
test_credentials=TEST_CREDENTIALS,
test_output=[
("success", True),
],
test_mock={"delete_task": lambda *args, **kwargs: (True)},
)
@staticmethod
def delete_task(credentials: TodoistCredentials, task_id: str):
try:
api = TodoistAPI(credentials.access_token.get_secret_value())
is_success = api.delete_task(task_id=task_id)
return is_success
except Exception as e:
raise e
def run(
self,
input_data: Input,
*,
credentials: TodoistCredentials,
**kwargs,
) -> BlockOutput:
try:
is_success = self.delete_task(credentials, input_data.task_id)
yield "success", is_success
except Exception as e:
yield "error", str(e)

View File

@@ -92,7 +92,8 @@ class TwitterPostTweetBlock(Block):
attachment: Union[Media, DeepLink, Poll, Place, Quote] | None = SchemaField(
discriminator="discriminator",
description="Additional tweet data (media, deep link, poll, place or quote)",
advanced=True,
advanced=False,
default=Media(discriminator="media"),
)
exclude_reply_user_ids: Optional[List[str]] = SchemaField(

View File

@@ -23,71 +23,6 @@ from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class TwitterUnblockUserBlock(Block):
"""
Unblock a specific user on Twitter. The request succeeds with no action when the user sends a request to a user they're not blocking or have already unblocked.
"""
class Input(BlockSchema):
credentials: TwitterCredentialsInput = TwitterCredentialsField(
["block.write", "users.read", "offline.access"]
)
target_user_id: str = SchemaField(
description="The user ID of the user that you would like to unblock",
placeholder="Enter target user ID",
)
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the unblock was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="0f1b6570-a631-11ef-a3ea-230cbe9650dd",
description="This block unblocks a specific user on Twitter.",
categories={BlockCategory.SOCIAL},
input_schema=TwitterUnblockUserBlock.Input,
output_schema=TwitterUnblockUserBlock.Output,
test_input={
"target_user_id": "12345",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("success", True),
],
test_mock={"unblock_user": lambda *args, **kwargs: True},
)
@staticmethod
def unblock_user(credentials: TwitterCredentials, target_user_id: str):
try:
client = tweepy.Client(
bearer_token=credentials.access_token.get_secret_value()
)
client.unblock(target_user_id=target_user_id, user_auth=False)
return True
except tweepy.TweepyException:
raise
def run(
self,
input_data: Input,
*,
credentials: TwitterCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.unblock_user(credentials, input_data.target_user_id)
yield "success", success
except Exception as e:
yield "error", handle_tweepy_exception(e)
class TwitterGetBlockedUsersBlock(Block):
"""
Get a list of users who are blocked by the authenticating user
@@ -238,68 +173,3 @@ class TwitterGetBlockedUsersBlock(Block):
yield "next_token", next_token
except Exception as e:
yield "error", handle_tweepy_exception(e)
class TwitterBlockUserBlock(Block):
"""
Block a specific user on Twitter
"""
class Input(BlockSchema):
credentials: TwitterCredentialsInput = TwitterCredentialsField(
["block.write", "users.read", "offline.access"]
)
target_user_id: str = SchemaField(
description="The user ID of the user that you would like to block",
placeholder="Enter target user ID",
)
class Output(BlockSchema):
success: bool = SchemaField(description="Whether the block was successful")
error: str = SchemaField(description="Error message if the request failed")
def __init__(self):
super().__init__(
id="fc258b94-a630-11ef-abc3-df050b75b816",
description="This block blocks a specific user on Twitter.",
categories={BlockCategory.SOCIAL},
input_schema=TwitterBlockUserBlock.Input,
output_schema=TwitterBlockUserBlock.Output,
test_input={
"target_user_id": "12345",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("success", True),
],
test_mock={"block_user": lambda *args, **kwargs: True},
)
@staticmethod
def block_user(credentials: TwitterCredentials, target_user_id: str):
try:
client = tweepy.Client(
bearer_token=credentials.access_token.get_secret_value()
)
client.block(target_user_id=target_user_id, user_auth=False)
return True
except tweepy.TweepyException:
raise
def run(
self,
input_data: Input,
*,
credentials: TwitterCredentials,
**kwargs,
) -> BlockOutput:
try:
success = self.block_user(credentials, input_data.target_user_id)
yield "success", success
except Exception as e:
yield "error", handle_tweepy_exception(e)

View File

@@ -0,0 +1,37 @@
from gravitasml.parser import Parser
from gravitasml.token import tokenize
from backend.data.block import Block, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class XMLParserBlock(Block):
class Input(BlockSchema):
input_xml: str = SchemaField(description="input xml to be parsed")
class Output(BlockSchema):
parsed_xml: dict = SchemaField(description="output parsed xml to dict")
error: str = SchemaField(description="Error in parsing")
def __init__(self):
super().__init__(
id="286380af-9529-4b55-8be0-1d7c854abdb5",
description="Parses XML using gravitasml to tokenize and coverts it to dict",
input_schema=XMLParserBlock.Input,
output_schema=XMLParserBlock.Output,
test_input={"input_xml": "<tag1><tag2>content</tag2></tag1>"},
test_output=[
("parsed_xml", {"tag1": {"tag2": "content"}}),
],
)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
try:
tokens = tokenize(input_data.input_xml)
parser = Parser(tokens)
parsed_result = parser.parse()
yield "parsed_xml", parsed_result
except ValueError as val_e:
raise ValueError(f"Validation error for dict:{val_e}") from val_e
except SyntaxError as syn_e:
raise SyntaxError(f"Error in input xml syntax: {syn_e}") from syn_e

View File

@@ -0,0 +1,10 @@
from zerobouncesdk import ZBValidateResponse, ZeroBounce
class ZeroBounceClient:
def __init__(self, api_key: str):
self.api_key = api_key
self.client = ZeroBounce(api_key)
def validate_email(self, email: str, ip_address: str) -> ZBValidateResponse:
return self.client.validate(email, ip_address)

View File

@@ -0,0 +1,35 @@
from typing import Literal
from pydantic import SecretStr
from backend.data.model import APIKeyCredentials, CredentialsField, CredentialsMetaInput
from backend.integrations.providers import ProviderName
ZeroBounceCredentials = APIKeyCredentials
ZeroBounceCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.ZEROBOUNCE],
Literal["api_key"],
]
TEST_CREDENTIALS = APIKeyCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="zerobounce",
api_key=SecretStr("mock-zerobounce-api-key"),
title="Mock ZeroBounce API key",
expires_at=None,
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
def ZeroBounceCredentialsField() -> ZeroBounceCredentialsInput:
"""
Creates a ZeroBounce credentials input on a block.
"""
return CredentialsField(
description="The ZeroBounce integration can be used with an API Key.",
)

View File

@@ -0,0 +1,175 @@
from typing import Optional
from pydantic import BaseModel
from zerobouncesdk.zb_validate_response import (
ZBValidateResponse,
ZBValidateStatus,
ZBValidateSubStatus,
)
from backend.blocks.zerobounce._api import ZeroBounceClient
from backend.blocks.zerobounce._auth import (
TEST_CREDENTIALS,
TEST_CREDENTIALS_INPUT,
ZeroBounceCredentials,
ZeroBounceCredentialsInput,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class Response(BaseModel):
address: str = SchemaField(
description="The email address you are validating.", default="N/A"
)
status: ZBValidateStatus = SchemaField(
description="The status of the email address.", default=ZBValidateStatus.unknown
)
sub_status: ZBValidateSubStatus = SchemaField(
description="The sub-status of the email address.",
default=ZBValidateSubStatus.none,
)
account: Optional[str] = SchemaField(
description="The portion of the email address before the '@' symbol.",
default="N/A",
)
domain: Optional[str] = SchemaField(
description="The portion of the email address after the '@' symbol."
)
did_you_mean: Optional[str] = SchemaField(
description="Suggestive Fix for an email typo",
default=None,
)
domain_age_days: Optional[str] = SchemaField(
description="Age of the email domain in days or [null].",
default=None,
)
free_email: Optional[bool] = SchemaField(
description="Whether the email address is a free email provider.", default=False
)
mx_found: Optional[bool] = SchemaField(
description="Whether the MX record was found.", default=False
)
mx_record: Optional[str] = SchemaField(
description="The MX record of the email address.", default=None
)
smtp_provider: Optional[str] = SchemaField(
description="The SMTP provider of the email address.", default=None
)
firstname: Optional[str] = SchemaField(
description="The first name of the email address.", default=None
)
lastname: Optional[str] = SchemaField(
description="The last name of the email address.", default=None
)
gender: Optional[str] = SchemaField(
description="The gender of the email address.", default=None
)
city: Optional[str] = SchemaField(
description="The city of the email address.", default=None
)
region: Optional[str] = SchemaField(
description="The region of the email address.", default=None
)
zipcode: Optional[str] = SchemaField(
description="The zipcode of the email address.", default=None
)
country: Optional[str] = SchemaField(
description="The country of the email address.", default=None
)
class ValidateEmailsBlock(Block):
"""Search for people in Apollo"""
class Input(BlockSchema):
email: str = SchemaField(
description="Email to validate",
)
ip_address: str = SchemaField(
description="IP address to validate",
default="",
)
credentials: ZeroBounceCredentialsInput = SchemaField(
description="ZeroBounce credentials",
)
class Output(BlockSchema):
response: Response = SchemaField(
description="Response from ZeroBounce",
)
error: str = SchemaField(
description="Error message if the search failed",
default="",
)
def __init__(self):
super().__init__(
id="e3950439-fa0b-40e8-b19f-e0dca0bf5853",
description="Validate emails",
categories={BlockCategory.SEARCH},
input_schema=ValidateEmailsBlock.Input,
output_schema=ValidateEmailsBlock.Output,
test_credentials=TEST_CREDENTIALS,
test_input={
"credentials": TEST_CREDENTIALS_INPUT,
"email": "test@test.com",
},
test_output=[
(
"response",
Response(
address="test@test.com",
status=ZBValidateStatus.valid,
sub_status=ZBValidateSubStatus.allowed,
account="test",
domain="test.com",
did_you_mean=None,
domain_age_days=None,
free_email=False,
mx_found=False,
mx_record=None,
smtp_provider=None,
),
)
],
test_mock={
"validate_email": lambda email, ip_address, credentials: ZBValidateResponse(
data={
"address": email,
"status": ZBValidateStatus.valid,
"sub_status": ZBValidateSubStatus.allowed,
"account": "test",
"domain": "test.com",
"did_you_mean": None,
"domain_age_days": None,
"free_email": False,
"mx_found": False,
"mx_record": None,
"smtp_provider": None,
}
)
},
)
@staticmethod
def validate_email(
email: str, ip_address: str, credentials: ZeroBounceCredentials
) -> ZBValidateResponse:
client = ZeroBounceClient(credentials.api_key.get_secret_value())
return client.validate_email(email, ip_address)
def run(
self,
input_data: Input,
*,
credentials: ZeroBounceCredentials,
**kwargs,
) -> BlockOutput:
response: ZBValidateResponse = self.validate_email(
input_data.email, input_data.ip_address, credentials
)
response_model = Response(**response.__dict__)
yield "response", response_model

View File

@@ -221,7 +221,8 @@ def event():
@test.command()
@click.argument("server_address")
@click.argument("graph_id")
def websocket(server_address: str, graph_id: str):
@click.argument("graph_version")
def websocket(server_address: str, graph_id: str, graph_version: int):
"""
Tests the websocket connection.
"""
@@ -237,7 +238,9 @@ def websocket(server_address: str, graph_id: str):
try:
msg = WsMessage(
method=Methods.SUBSCRIBE,
data=ExecutionSubscription(graph_id=graph_id).model_dump(),
data=ExecutionSubscription(
graph_id=graph_id, graph_version=graph_version
).model_dump(),
).model_dump_json()
await websocket.send(msg)
print(f"Sending: {msg}")

View File

@@ -2,6 +2,7 @@ import inspect
from abc import ABC, abstractmethod
from enum import Enum
from typing import (
TYPE_CHECKING,
Any,
ClassVar,
Generator,
@@ -18,6 +19,7 @@ import jsonschema
from prisma.models import AgentBlock
from pydantic import BaseModel
from backend.data.model import NodeExecutionStats
from backend.util import json
from backend.util.settings import Config
@@ -28,6 +30,9 @@ from .model import (
is_credentials_field_name,
)
if TYPE_CHECKING:
from .graph import Link
app_config = Config()
BlockData = tuple[str, Any] # Input & Output data should be a tuple of (name, data).
@@ -44,6 +49,7 @@ class BlockType(Enum):
WEBHOOK = "Webhook"
WEBHOOK_MANUAL = "Webhook (manual)"
AGENT = "Agent"
AI = "AI"
class BlockCategory(Enum):
@@ -64,6 +70,9 @@ class BlockCategory(Enum):
SAFETY = (
"Block that provides AI safety mechanisms such as detecting harmful content"
)
PRODUCTIVITY = "Block that helps with productivity"
ISSUE_TRACKING = "Block that helps with issue tracking"
MULTIMEDIA = "Block that interacts with multimedia content"
def dict(self) -> dict[str, str]:
return {"category": self.name, "description": self.value}
@@ -106,6 +115,10 @@ class BlockSchema(BaseModel):
def validate_data(cls, data: BlockInput) -> str | None:
return json.validate_with_jsonschema(schema=cls.jsonschema(), data=data)
@classmethod
def get_mismatch_error(cls, data: BlockInput) -> str | None:
return cls.validate_data(data)
@classmethod
def validate_field(cls, field_name: str, data: BlockInput) -> str | None:
"""
@@ -183,6 +196,19 @@ class BlockSchema(BaseModel):
)
}
@classmethod
def get_input_defaults(cls, data: BlockInput) -> BlockInput:
return data # Return as is, by default.
@classmethod
def get_missing_links(cls, data: BlockInput, links: list["Link"]) -> set[str]:
input_fields_from_nodes = {link.sink_name for link in links}
return input_fields_from_nodes - set(data)
@classmethod
def get_missing_input(cls, data: BlockInput) -> set[str]:
return cls.get_required_fields() - set(data)
BlockSchemaInputType = TypeVar("BlockSchemaInputType", bound=BlockSchema)
BlockSchemaOutputType = TypeVar("BlockSchemaOutputType", bound=BlockSchema)
@@ -291,7 +317,7 @@ class Block(ABC, Generic[BlockSchemaInputType, BlockSchemaOutputType]):
self.static_output = static_output
self.block_type = block_type
self.webhook_config = webhook_config
self.execution_stats = {}
self.execution_stats: NodeExecutionStats = NodeExecutionStats()
if self.webhook_config:
if isinstance(self.webhook_config, BlockWebhookConfig):
@@ -348,6 +374,14 @@ class Block(ABC, Generic[BlockSchemaInputType, BlockSchemaOutputType]):
Run the block with the given input data.
Args:
input_data: The input data with the structure of input_schema.
Kwargs: Currently 14/02/2025 these include
graph_id: The ID of the graph.
node_id: The ID of the node.
graph_exec_id: The ID of the graph execution.
node_exec_id: The ID of the node execution.
user_id: The ID of the user.
Returns:
A Generator that yields (output_name, output_data).
output_name: One of the output name defined in Block's output_schema.
@@ -361,18 +395,29 @@ class Block(ABC, Generic[BlockSchemaInputType, BlockSchemaOutputType]):
return data
raise ValueError(f"{self.name} did not produce any output for {output}")
def merge_stats(self, stats: dict[str, Any]) -> dict[str, Any]:
for key, value in stats.items():
if isinstance(value, dict):
self.execution_stats.setdefault(key, {}).update(value)
elif isinstance(value, (int, float)):
self.execution_stats.setdefault(key, 0)
self.execution_stats[key] += value
elif isinstance(value, list):
self.execution_stats.setdefault(key, [])
self.execution_stats[key].extend(value)
def merge_stats(self, stats: NodeExecutionStats) -> NodeExecutionStats:
stats_dict = stats.model_dump()
current_stats = self.execution_stats.model_dump()
for key, value in stats_dict.items():
if key not in current_stats:
# Field doesn't exist yet, just set it, but this will probably
# not happen, just in case though so we throw for invalid when
# converting back in
current_stats[key] = value
elif isinstance(value, dict) and isinstance(current_stats[key], dict):
current_stats[key].update(value)
elif isinstance(value, (int, float)) and isinstance(
current_stats[key], (int, float)
):
current_stats[key] += value
elif isinstance(value, list) and isinstance(current_stats[key], list):
current_stats[key].extend(value)
else:
self.execution_stats[key] = value
current_stats[key] = value
self.execution_stats = NodeExecutionStats(**current_stats)
return self.execution_stats
@property

View File

@@ -15,6 +15,7 @@ from backend.blocks.llm import (
LlmModel,
)
from backend.blocks.replicate_flux_advanced import ReplicateFluxAdvancedModelBlock
from backend.blocks.smart_decision_maker import SmartDecisionMakerBlock
from backend.blocks.talking_head import CreateTalkingAvatarVideoBlock
from backend.blocks.text_to_speech_block import UnrealTextToSpeechBlock
from backend.data.block import Block
@@ -35,6 +36,8 @@ from backend.integrations.credentials_store import (
# =============== Configure the cost for each LLM Model call =============== #
MODEL_COST: dict[LlmModel, int] = {
LlmModel.O3_MINI: 2, # $1.10 / $4.40
LlmModel.O1: 16, # $15 / $60
LlmModel.O1_PREVIEW: 16,
LlmModel.O1_MINI: 4,
LlmModel.GPT4O_MINI: 1,
@@ -42,20 +45,21 @@ MODEL_COST: dict[LlmModel, int] = {
LlmModel.GPT4_TURBO: 10,
LlmModel.GPT3_5_TURBO: 1,
LlmModel.CLAUDE_3_5_SONNET: 4,
LlmModel.CLAUDE_3_5_HAIKU: 1, # $0.80 / $4.00
LlmModel.CLAUDE_3_HAIKU: 1,
LlmModel.LLAMA3_8B: 1,
LlmModel.LLAMA3_70B: 1,
LlmModel.MIXTRAL_8X7B: 1,
LlmModel.GEMMA_7B: 1,
LlmModel.GEMMA2_9B: 1,
LlmModel.LLAMA3_1_405B: 1,
LlmModel.LLAMA3_1_70B: 1,
LlmModel.LLAMA3_3_70B: 1, # $0.59 / $0.79
LlmModel.LLAMA3_1_8B: 1,
LlmModel.OLLAMA_LLAMA3_3: 1,
LlmModel.OLLAMA_LLAMA3_2: 1,
LlmModel.OLLAMA_LLAMA3_8B: 1,
LlmModel.OLLAMA_LLAMA3_405B: 1,
LlmModel.DEEPSEEK_LLAMA_70B: 1, # ? / ?
LlmModel.OLLAMA_DOLPHIN: 1,
LlmModel.GEMINI_FLASH_1_5_8B: 1,
LlmModel.GEMINI_FLASH_1_5: 1,
LlmModel.GROK_BETA: 5,
LlmModel.MISTRAL_NEMO: 1,
LlmModel.COHERE_COMMAND_R_08_2024: 1,
@@ -262,4 +266,5 @@ BLOCK_COSTS: dict[Type[Block], list[BlockCost]] = {
},
)
],
SmartDecisionMakerBlock: LLM_COST,
}

View File

@@ -10,7 +10,6 @@ class BlockCostType(str, Enum):
RUN = "run" # cost X credits per run
BYTE = "byte" # cost X credits per byte
SECOND = "second" # cost X credits per second
DOLLAR = "dollar" # cost X dollars per run
class BlockCost(BaseModel):

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
import logging
import os
import zlib
from contextlib import asynccontextmanager
from uuid import uuid4
@@ -54,6 +55,14 @@ async def transaction():
yield tx
@asynccontextmanager
async def locked_transaction(key: str):
lock_key = zlib.crc32(key.encode("utf-8"))
async with transaction() as tx:
await tx.execute_raw(f"SELECT pg_advisory_xact_lock({lock_key})")
yield tx
class BaseDbModel(BaseModel):
id: str = Field(default_factory=lambda: str(uuid4()))

View File

@@ -1,8 +1,9 @@
from collections import defaultdict
from datetime import datetime, timezone
from multiprocessing import Manager
from typing import Any, AsyncGenerator, Generator, Generic, TypeVar
from typing import Any, AsyncGenerator, Generator, Generic, Type, TypeVar
from prisma import Json
from prisma.enums import AgentExecutionStatus
from prisma.models import (
AgentGraphExecution,
@@ -13,8 +14,10 @@ from pydantic import BaseModel
from backend.data.block import BlockData, BlockInput, CompletedBlockOutput
from backend.data.includes import EXECUTION_RESULT_INCLUDE, GRAPH_EXECUTION_INCLUDE
from backend.data.model import GraphExecutionStats, NodeExecutionStats
from backend.data.queue import AsyncRedisEventBus, RedisEventBus
from backend.util import json, mock
from backend.server.v2.store.exceptions import DatabaseError
from backend.util import mock, type
from backend.util.settings import Config
@@ -22,6 +25,7 @@ class GraphExecutionEntry(BaseModel):
user_id: str
graph_exec_id: str
graph_id: str
graph_version: int
start_node_execs: list["NodeExecutionEntry"]
@@ -31,6 +35,7 @@ class NodeExecutionEntry(BaseModel):
graph_id: str
node_exec_id: str
node_id: str
block_id: str
data: BlockInput
@@ -98,16 +103,16 @@ class ExecutionResult(BaseModel):
def from_db(execution: AgentNodeExecution):
if execution.executionData:
# Execution that has been queued for execution will persist its data.
input_data = json.loads(execution.executionData, target_type=dict[str, Any])
input_data = type.convert(execution.executionData, dict[str, Any])
else:
# For incomplete execution, executionData will not be yet available.
input_data: BlockInput = defaultdict()
for data in execution.Input or []:
input_data[data.name] = json.loads(data.data)
input_data[data.name] = type.convert(data.data, Type[Any])
output_data: CompletedBlockOutput = defaultdict(list)
for data in execution.Output or []:
output_data[data.name].append(json.loads(data.data))
output_data[data.name].append(type.convert(data.data, Type[Any]))
graph_execution: AgentGraphExecution | None = execution.AgentGraphExecution
@@ -136,6 +141,7 @@ async def create_graph_execution(
graph_version: int,
nodes_input: list[tuple[str, BlockInput]],
user_id: str,
preset_id: str | None = None,
) -> tuple[str, list[ExecutionResult]]:
"""
Create a new AgentGraphExecution record.
@@ -154,7 +160,7 @@ async def create_graph_execution(
"executionStatus": ExecutionStatus.INCOMPLETE,
"Input": {
"create": [
{"name": name, "data": json.dumps(data)}
{"name": name, "data": Json(data)}
for name, data in node_input.items()
]
},
@@ -163,6 +169,7 @@ async def create_graph_execution(
]
},
"userId": user_id,
"agentPresetId": preset_id,
},
include=GRAPH_EXECUTION_INCLUDE,
)
@@ -206,7 +213,7 @@ async def upsert_execution_input(
order={"addedTime": "asc"},
include={"Input": True},
)
json_input_data = json.dumps(input_data)
json_input_data = Json(input_data)
if existing_execution:
await AgentNodeExecutionInputOutput.prisma().create(
@@ -218,7 +225,7 @@ async def upsert_execution_input(
)
return existing_execution.id, {
**{
input_data.name: json.loads(input_data.data)
input_data.name: type.convert(input_data.data, Type[Any])
for input_data in existing_execution.Input or []
},
input_name: input_data,
@@ -252,44 +259,54 @@ async def upsert_execution_output(
await AgentNodeExecutionInputOutput.prisma().create(
data={
"name": output_name,
"data": json.dumps(output_data),
"data": Json(output_data),
"referencedByOutputExecId": node_exec_id,
}
)
async def update_graph_execution_start_time(graph_exec_id: str):
await AgentGraphExecution.prisma().update(
async def update_graph_execution_start_time(graph_exec_id: str) -> ExecutionResult:
res = await AgentGraphExecution.prisma().update(
where={"id": graph_exec_id},
data={
"executionStatus": ExecutionStatus.RUNNING,
"startedAt": datetime.now(tz=timezone.utc),
},
)
async def update_graph_execution_stats(
graph_exec_id: str,
status: ExecutionStatus,
stats: dict[str, Any],
) -> ExecutionResult:
res = await AgentGraphExecution.prisma().update(
where={"id": graph_exec_id},
data={
"executionStatus": status,
"stats": json.dumps(stats),
},
)
if not res:
raise ValueError(f"Execution {graph_exec_id} not found.")
return ExecutionResult.from_graph(res)
async def update_node_execution_stats(node_exec_id: str, stats: dict[str, Any]):
async def update_graph_execution_stats(
graph_exec_id: str,
status: ExecutionStatus,
stats: GraphExecutionStats,
) -> ExecutionResult:
data = stats.model_dump()
if isinstance(data["error"], Exception):
data["error"] = str(data["error"])
res = await AgentGraphExecution.prisma().update(
where={"id": graph_exec_id},
data={
"executionStatus": status,
"stats": Json(data),
},
)
if not res:
raise ValueError(f"Execution {graph_exec_id} not found.")
return ExecutionResult.from_graph(res)
async def update_node_execution_stats(node_exec_id: str, stats: NodeExecutionStats):
data = stats.model_dump()
if isinstance(data["error"], Exception):
data["error"] = str(data["error"])
await AgentNodeExecution.prisma().update(
where={"id": node_exec_id},
data={"stats": json.dumps(stats)},
data={"stats": Json(data)},
)
@@ -309,8 +326,8 @@ async def update_execution_status(
**({"startedTime": now} if status == ExecutionStatus.RUNNING else {}),
**({"endedTime": now} if status == ExecutionStatus.FAILED else {}),
**({"endedTime": now} if status == ExecutionStatus.COMPLETED else {}),
**({"executionData": json.dumps(execution_data)} if execution_data else {}),
**({"stats": json.dumps(stats)} if stats else {}),
**({"executionData": Json(execution_data)} if execution_data else {}),
**({"stats": Json(stats)} if stats else {}),
}
res = await AgentNodeExecution.prisma().update(
@@ -324,6 +341,23 @@ async def update_execution_status(
return ExecutionResult.from_db(res)
async def delete_execution(
graph_exec_id: str, user_id: str, soft_delete: bool = True
) -> None:
if soft_delete:
deleted_count = await AgentGraphExecution.prisma().update_many(
where={"id": graph_exec_id, "userId": user_id}, data={"isDeleted": True}
)
else:
deleted_count = await AgentGraphExecution.prisma().delete_many(
where={"id": graph_exec_id, "userId": user_id}
)
if deleted_count < 1:
raise DatabaseError(
f"Could not delete graph execution #{graph_exec_id}: not found"
)
async def get_execution_results(graph_exec_id: str) -> list[ExecutionResult]:
executions = await AgentNodeExecution.prisma().find_many(
where={"agentGraphExecutionId": graph_exec_id},
@@ -337,13 +371,66 @@ async def get_execution_results(graph_exec_id: str) -> list[ExecutionResult]:
return res
async def get_executions_in_timerange(
user_id: str, start_time: str, end_time: str
) -> list[ExecutionResult]:
try:
executions = await AgentGraphExecution.prisma().find_many(
where={
"startedAt": {
"gte": datetime.fromisoformat(start_time),
"lte": datetime.fromisoformat(end_time),
},
"userId": user_id,
"isDeleted": False,
},
include=GRAPH_EXECUTION_INCLUDE,
)
return [ExecutionResult.from_graph(execution) for execution in executions]
except Exception as e:
raise DatabaseError(
f"Failed to get executions in timerange {start_time} to {end_time} for user {user_id}: {e}"
) from e
LIST_SPLIT = "_$_"
DICT_SPLIT = "_#_"
OBJC_SPLIT = "_@_"
def parse_execution_output(output: BlockData, name: str) -> Any | None:
# Allow extracting partial output data by name.
"""
Extracts partial output data by name from a given BlockData.
The function supports extracting data from lists, dictionaries, and objects
using specific naming conventions:
- For lists: <output_name>_$_<index>
- For dictionaries: <output_name>_#_<key>
- For objects: <output_name>_@_<attribute>
Args:
output (BlockData): A tuple containing the output name and data.
name (str): The name used to extract specific data from the output.
Returns:
Any | None: The extracted data if found, otherwise None.
Examples:
>>> output = ("result", [10, 20, 30])
>>> parse_execution_output(output, "result_$_1")
20
>>> output = ("config", {"key1": "value1", "key2": "value2"})
>>> parse_execution_output(output, "config_#_key1")
'value1'
>>> class Sample:
... attr1 = "value1"
... attr2 = "value2"
>>> output = ("object", Sample())
>>> parse_execution_output(output, "object_@_attr1")
'value1'
"""
output_name, output_data = output
if name == output_name:
@@ -372,11 +459,37 @@ def parse_execution_output(output: BlockData, name: str) -> Any | None:
def merge_execution_input(data: BlockInput) -> BlockInput:
"""
Merge all dynamic input pins which described by the following pattern:
- <input_name>_$_<index> for list input.
- <input_name>_#_<index> for dict input.
- <input_name>_@_<index> for object input.
This function will construct pins with the same name into a single list/dict/object.
Merges dynamic input pins into a single list, dictionary, or object based on naming patterns.
This function processes input keys that follow specific patterns to merge them into a unified structure:
- `<input_name>_$_<index>` for list inputs.
- `<input_name>_#_<index>` for dictionary inputs.
- `<input_name>_@_<index>` for object inputs.
Args:
data (BlockInput): A dictionary containing input keys and their corresponding values.
Returns:
BlockInput: A dictionary with merged inputs.
Raises:
ValueError: If a list index is not an integer.
Examples:
>>> data = {
... "list_$_0": "a",
... "list_$_1": "b",
... "dict_#_key1": "value1",
... "dict_#_key2": "value2",
... "object_@_attr1": "value1",
... "object_@_attr2": "value2"
... }
>>> merge_execution_input(data)
{
"list": ["a", "b"],
"dict": {"key1": "value1", "key2": "value2"},
"object": <MockObject attr1="value1" attr2="value2">
}
"""
# Merge all input with <input_name>_$_<index> into a single list.
@@ -420,8 +533,7 @@ async def get_latest_execution(node_id: str, graph_eid: str) -> ExecutionResult
where={
"agentNodeId": node_id,
"agentGraphExecutionId": graph_eid,
"executionStatus": {"not": ExecutionStatus.INCOMPLETE},
"executionData": {"not": None}, # type: ignore
"executionStatus": {"not": ExecutionStatus.INCOMPLETE}, # type: ignore
},
order={"queuedTime": "desc"},
include=EXECUTION_RESULT_INCLUDE,

View File

@@ -6,22 +6,32 @@ from datetime import datetime, timezone
from typing import Any, Literal, Optional, Type
import prisma
from prisma.models import AgentGraph, AgentGraphExecution, AgentNode, AgentNodeLink
from prisma import Json
from prisma.models import (
AgentGraph,
AgentGraphExecution,
AgentNode,
AgentNodeLink,
StoreListingVersion,
)
from prisma.types import AgentGraphWhereInput
from pydantic.fields import computed_field
from pydantic.fields import Field, computed_field
from backend.blocks.agent import AgentExecutorBlock
from backend.blocks.basic import AgentInputBlock, AgentOutputBlock
from backend.util import json
from backend.util import type
from .block import BlockInput, BlockType, get_block, get_blocks
from .db import BaseDbModel, transaction
from .execution import ExecutionStatus
from .execution import ExecutionResult, ExecutionStatus
from .includes import AGENT_GRAPH_INCLUDE, AGENT_NODE_INCLUDE
from .integrations import Webhook
logger = logging.getLogger(__name__)
_INPUT_BLOCK_ID = AgentInputBlock().id
_OUTPUT_BLOCK_ID = AgentOutputBlock().id
class Link(BaseDbModel):
source_id: str
@@ -62,14 +72,12 @@ class NodeModel(Node):
webhook: Optional[Webhook] = None
@staticmethod
def from_db(node: AgentNode):
if not node.AgentBlock:
raise ValueError(f"Invalid node {node.id}, invalid AgentBlock.")
def from_db(node: AgentNode) -> "NodeModel":
obj = NodeModel(
id=node.id,
block_id=node.AgentBlock.id,
input_default=json.loads(node.constantInput, target_type=dict[str, Any]),
metadata=json.loads(node.metadata, target_type=dict[str, Any]),
block_id=node.agentBlockId,
input_default=type.convert(node.constantInput, dict[str, Any]),
metadata=type.convert(node.metadata, dict[str, Any]),
graph_id=node.agentGraphId,
graph_version=node.agentGraphVersion,
webhook_id=node.webhookId,
@@ -100,42 +108,96 @@ class NodeModel(Node):
Webhook.model_rebuild()
class GraphExecution(BaseDbModel):
class GraphExecutionMeta(BaseDbModel):
execution_id: str
started_at: datetime
ended_at: datetime
cost: Optional[int] = Field(..., description="Execution cost in credits")
duration: float
total_run_time: float
status: ExecutionStatus
graph_id: str
graph_version: int
preset_id: Optional[str]
@staticmethod
def from_db(execution: AgentGraphExecution):
def from_db(_graph_exec: AgentGraphExecution):
now = datetime.now(timezone.utc)
start_time = execution.startedAt or execution.createdAt
end_time = execution.updatedAt or now
start_time = _graph_exec.startedAt or _graph_exec.createdAt
end_time = _graph_exec.updatedAt or now
duration = (end_time - start_time).total_seconds()
total_run_time = duration
try:
stats = json.loads(execution.stats or "{}", target_type=dict[str, Any])
stats = type.convert(_graph_exec.stats or {}, dict[str, Any])
except ValueError:
stats = {}
duration = stats.get("walltime", duration)
total_run_time = stats.get("nodes_walltime", total_run_time)
return GraphExecution(
id=execution.id,
execution_id=execution.id,
return GraphExecutionMeta(
id=_graph_exec.id,
execution_id=_graph_exec.id,
started_at=start_time,
ended_at=end_time,
cost=stats.get("cost", None),
duration=duration,
total_run_time=total_run_time,
status=ExecutionStatus(execution.executionStatus),
graph_id=execution.agentGraphId,
graph_version=execution.agentGraphVersion,
status=ExecutionStatus(_graph_exec.executionStatus),
graph_id=_graph_exec.agentGraphId,
graph_version=_graph_exec.agentGraphVersion,
preset_id=_graph_exec.agentPresetId,
)
class GraphExecution(GraphExecutionMeta):
inputs: dict[str, Any]
outputs: dict[str, list[Any]]
node_executions: list[ExecutionResult]
@staticmethod
def from_db(_graph_exec: AgentGraphExecution):
if _graph_exec.AgentNodeExecutions is None:
raise ValueError("Node executions must be included in query")
graph_exec = GraphExecutionMeta.from_db(_graph_exec)
node_executions = [
ExecutionResult.from_db(ne) for ne in _graph_exec.AgentNodeExecutions
]
inputs = {
**{
# inputs from Agent Input Blocks
exec.input_data["name"]: exec.input_data["value"]
for exec in node_executions
if exec.block_id == _INPUT_BLOCK_ID
},
**{
# input from webhook-triggered block
"payload": exec.input_data["payload"]
for exec in node_executions
if (block := get_block(exec.block_id))
and block.block_type in [BlockType.WEBHOOK, BlockType.WEBHOOK_MANUAL]
},
}
outputs: dict[str, list] = defaultdict(list)
for exec in node_executions:
if exec.block_id == _OUTPUT_BLOCK_ID:
outputs[exec.input_data["name"]].append(
exec.input_data.get("value", None)
)
return GraphExecution(
**{
field_name: getattr(graph_exec, field_name)
for field_name in graph_exec.model_fields
},
inputs=inputs,
outputs=outputs,
node_executions=node_executions,
)
@@ -254,16 +316,39 @@ class GraphModel(Graph):
def validate_graph(self, for_run: bool = False):
def sanitize(name):
return name.split("_#_")[0].split("_@_")[0].split("_$_")[0]
sanitized_name = name.split("_#_")[0].split("_@_")[0].split("_$_")[0]
if sanitized_name.startswith("tools_^_"):
return sanitized_name.split("_^_")[0]
return sanitized_name
# Validate smart decision maker nodes
smart_decision_maker_nodes = set()
agent_nodes = set()
nodes_block = {
node.id: block
for node in self.nodes
if (block := get_block(node.block_id)) is not None
}
for node in self.nodes:
if (block := nodes_block.get(node.id)) is None:
raise ValueError(f"Invalid block {node.block_id} for node #{node.id}")
# Smart decision maker nodes
if block.block_type == BlockType.AI:
smart_decision_maker_nodes.add(node.id)
# Agent nodes
elif block.block_type == BlockType.AGENT:
agent_nodes.add(node.id)
input_links = defaultdict(list)
for link in self.links:
input_links[link.sink_id].append(link)
# Nodes: required fields are filled or connected and dependencies are satisfied
for node in self.nodes:
block = get_block(node.block_id)
if block is None:
if (block := nodes_block.get(node.id)) is None:
raise ValueError(f"Invalid block {node.block_id} for node #{node.id}")
provided_inputs = set(
@@ -280,9 +365,12 @@ class GraphModel(Graph):
)
and (
for_run # Skip input completion validation, unless when executing.
or block.block_type == BlockType.INPUT
or block.block_type == BlockType.OUTPUT
or block.block_type == BlockType.AGENT
or block.block_type
in [
BlockType.INPUT,
BlockType.OUTPUT,
BlockType.AGENT,
]
)
):
raise ValueError(
@@ -331,20 +419,20 @@ class GraphModel(Graph):
for link in self.links:
source = (link.source_id, link.source_name)
sink = (link.sink_id, link.sink_name)
suffix = f"Link {source} <-> {sink}"
prefix = f"Link {source} <-> {sink}"
for i, (node_id, name) in enumerate([source, sink]):
node = node_map.get(node_id)
if not node:
raise ValueError(
f"{suffix}, {node_id} is invalid node id, available nodes: {node_map.keys()}"
f"{prefix}, {node_id} is invalid node id, available nodes: {node_map.keys()}"
)
block = get_block(node.block_id)
if not block:
blocks = {v().id: v().name for v in get_blocks().values()}
raise ValueError(
f"{suffix}, {node.block_id} is invalid block id, available blocks: {blocks}"
f"{prefix}, {node.block_id} is invalid block id, available blocks: {blocks}"
)
sanitized_name = sanitize(name)
@@ -352,18 +440,18 @@ class GraphModel(Graph):
if i == 0:
fields = (
block.output_schema.get_fields()
if block.block_type != BlockType.AGENT
if block.block_type not in [BlockType.AGENT]
else vals.get("output_schema", {}).get("properties", {}).keys()
)
else:
fields = (
block.input_schema.get_fields()
if block.block_type != BlockType.AGENT
if block.block_type not in [BlockType.AGENT]
else vals.get("input_schema", {}).get("properties", {}).keys()
)
if sanitized_name not in fields:
if sanitized_name not in fields and not name.startswith("tools_^_"):
fields_msg = f"Allowed fields: {fields}"
raise ValueError(f"{suffix}, `{name}` invalid, {fields_msg}")
raise ValueError(f"{prefix}, `{name}` invalid, {fields_msg}")
if is_static_output_block(link.source_id):
link.is_static = True # Each value block output should be static.
@@ -396,11 +484,9 @@ class GraphModel(Graph):
if for_export:
# Remove credentials from node input
if node.constantInput:
constant_input = json.loads(
node.constantInput, target_type=dict[str, Any]
)
constant_input = type.convert(node.constantInput, dict[str, Any])
constant_input = GraphModel._hide_node_input_credentials(constant_input)
node.constantInput = json.dumps(constant_input)
node.constantInput = Json(constant_input)
# Remove webhook info
node.webhookId = None
@@ -511,25 +597,81 @@ async def get_graphs(
return graph_models
async def get_executions(user_id: str) -> list[GraphExecution]:
# TODO: move execution stuff to .execution
async def get_graphs_executions(user_id: str) -> list[GraphExecutionMeta]:
executions = await AgentGraphExecution.prisma().find_many(
where={"userId": user_id},
where={"isDeleted": False, "userId": user_id},
order={"createdAt": "desc"},
)
return [GraphExecution.from_db(execution) for execution in executions]
return [GraphExecutionMeta.from_db(execution) for execution in executions]
async def get_graph_executions(graph_id: str, user_id: str) -> list[GraphExecutionMeta]:
executions = await AgentGraphExecution.prisma().find_many(
where={"agentGraphId": graph_id, "isDeleted": False, "userId": user_id},
order={"createdAt": "desc"},
)
return [GraphExecutionMeta.from_db(execution) for execution in executions]
async def get_execution_meta(
user_id: str, execution_id: str
) -> GraphExecutionMeta | None:
execution = await AgentGraphExecution.prisma().find_first(
where={"id": execution_id, "isDeleted": False, "userId": user_id}
)
return GraphExecutionMeta.from_db(execution) if execution else None
async def get_execution(user_id: str, execution_id: str) -> GraphExecution | None:
execution = await AgentGraphExecution.prisma().find_first(
where={"id": execution_id, "userId": user_id}
where={"id": execution_id, "isDeleted": False, "userId": user_id},
include={
"AgentNodeExecutions": {
"include": {"AgentNode": True, "Input": True, "Output": True},
"order_by": [
{"queuedTime": "asc"},
{ # Fallback: Incomplete execs has no queuedTime.
"addedTime": "asc"
},
],
},
},
)
return GraphExecution.from_db(execution) if execution else None
async def get_graph_metadata(graph_id: str, version: int | None = None) -> Graph | None:
where_clause: AgentGraphWhereInput = {
"id": graph_id,
}
if version is not None:
where_clause["version"] = version
graph = await AgentGraph.prisma().find_first(
where=where_clause,
include=AGENT_GRAPH_INCLUDE,
order={"version": "desc"},
)
if not graph:
return None
return Graph(
id=graph.id,
name=graph.name or "",
description=graph.description or "",
version=graph.version,
is_active=graph.isActive,
is_template=graph.isTemplate,
)
async def get_graph(
graph_id: str,
version: int | None = None,
template: bool = False,
template: bool = False, # note: currently not in use; TODO: remove from DB entirely
user_id: str | None = None,
for_export: bool = False,
) -> GraphModel | None:
@@ -543,21 +685,47 @@ async def get_graph(
where_clause: AgentGraphWhereInput = {
"id": graph_id,
}
if version is not None:
where_clause["version"] = version
elif not template:
where_clause["isActive"] = True
# TODO: Fix hack workaround to get adding store agents to work
if user_id is not None and not template:
where_clause["userId"] = user_id
graph = await AgentGraph.prisma().find_first(
where=where_clause,
include=AGENT_GRAPH_INCLUDE,
order={"version": "desc"},
)
return GraphModel.from_db(graph, for_export) if graph else None
# For access, the graph must be owned by the user or listed in the store
if graph is None or (
graph.userId != user_id
and not (
await StoreListingVersion.prisma().find_first(
where={
"agentId": graph_id,
"agentVersion": version or graph.version,
"isDeleted": False,
"StoreListing": {"is": {"isApproved": True}},
}
)
)
):
return None
return GraphModel.from_db(graph, for_export)
async def get_connected_output_nodes(node_id: str) -> list[tuple[Link, Node]]:
links = await AgentNodeLink.prisma().find_many(
where={"agentNodeSourceId": node_id},
include={"AgentNodeSink": {"include": AGENT_NODE_INCLUDE}}, # type: ignore
)
return [
(Link.from_db(link), NodeModel.from_db(link.AgentNodeSink))
for link in links
if link.AgentNodeSink
]
async def set_graph_active_version(graph_id: str, version: int, user_id: str) -> None:
@@ -612,7 +780,7 @@ async def create_graph(graph: Graph, user_id: str) -> GraphModel:
await __create_graph(tx, graph, user_id)
if created_graph := await get_graph(
graph.id, graph.version, graph.is_template, user_id=user_id
graph.id, graph.version, template=graph.is_template, user_id=user_id
):
return created_graph
@@ -634,8 +802,8 @@ async def __create_graph(tx, graph: Graph, user_id: str):
{
"id": node.id,
"agentBlockId": node.block_id,
"constantInput": json.dumps(node.input_default),
"metadata": json.dumps(node.metadata),
"constantInput": Json(node.input_default),
"metadata": Json(node.metadata),
}
for node in graph.nodes
]
@@ -697,9 +865,11 @@ async def fix_llm_provider_credentials():
store = IntegrationCredentialsStore()
broken_nodes = await prisma.get_client().query_raw(
"""
SELECT graph."userId" user_id,
broken_nodes = []
try:
broken_nodes = await prisma.get_client().query_raw(
"""
SELECT graph."userId" user_id,
node.id node_id,
node."constantInput" node_preset_input
FROM platform."AgentNode" node
@@ -708,8 +878,10 @@ async def fix_llm_provider_credentials():
WHERE node."constantInput"::jsonb->'credentials'->>'provider' = 'llm'
ORDER BY graph."userId";
"""
)
logger.info(f"Fixing LLM credential inputs on {len(broken_nodes)} nodes")
)
logger.info(f"Fixing LLM credential inputs on {len(broken_nodes)} nodes")
except Exception as e:
logger.error(f"Error fixing LLM credential inputs: {e}")
user_id: str = ""
user_integrations = None
@@ -722,7 +894,7 @@ async def fix_llm_provider_credentials():
raise RuntimeError(f"Impossible state while processing node {node}")
node_id: str = node["node_id"]
node_preset_input: dict = json.loads(node["node_preset_input"])
node_preset_input: dict = node["node_preset_input"]
credentials_meta: dict = node_preset_input["credentials"]
credentials = next(
@@ -758,5 +930,5 @@ async def fix_llm_provider_credentials():
store.update_creds(user_id, credentials)
await AgentNode.prisma().update(
where={"id": node_id},
data={"constantInput": json.dumps(node_preset_input)},
data={"constantInput": Json(node_preset_input)},
)

View File

@@ -32,3 +32,15 @@ GRAPH_EXECUTION_INCLUDE: prisma.types.AgentGraphExecutionInclude = {
INTEGRATION_WEBHOOK_INCLUDE: prisma.types.IntegrationWebhookInclude = {
"AgentNodes": {"include": AGENT_NODE_INCLUDE} # type: ignore
}
def library_agent_include(user_id: str) -> prisma.types.LibraryAgentInclude:
return {
"Agent": {
"include": {
**AGENT_GRAPH_INCLUDE,
"AgentGraphExecution": {"where": {"userId": user_id}},
}
},
"Creator": True,
}

View File

@@ -1,6 +1,8 @@
from __future__ import annotations
import base64
import logging
from datetime import datetime, timezone
from typing import (
TYPE_CHECKING,
Annotated,
@@ -16,6 +18,7 @@ from typing import (
)
from uuid import uuid4
from prisma.enums import CreditTransactionType
from pydantic import (
BaseModel,
ConfigDict,
@@ -199,27 +202,42 @@ class OAuth2Credentials(_BaseCredentials):
scopes: list[str]
metadata: dict[str, Any] = Field(default_factory=dict)
def bearer(self) -> str:
def auth_header(self) -> str:
return f"Bearer {self.access_token.get_secret_value()}"
class APIKeyCredentials(_BaseCredentials):
type: Literal["api_key"] = "api_key"
api_key: SecretStr
expires_at: Optional[int]
expires_at: Optional[int] = Field(
default=None,
description="Unix timestamp (seconds) indicating when the API key expires (if at all)",
)
"""Unix timestamp (seconds) indicating when the API key expires (if at all)"""
def bearer(self) -> str:
def auth_header(self) -> str:
return f"Bearer {self.api_key.get_secret_value()}"
class UserPasswordCredentials(_BaseCredentials):
type: Literal["user_password"] = "user_password"
username: SecretStr
password: SecretStr
def auth_header(self) -> str:
# Converting the string to bytes using encode()
# Base64 encoding it with base64.b64encode()
# Converting the resulting bytes back to a string with decode()
return f"Basic {base64.b64encode(f'{self.username.get_secret_value()}:{self.password.get_secret_value()}'.encode()).decode()}"
Credentials = Annotated[
OAuth2Credentials | APIKeyCredentials,
OAuth2Credentials | APIKeyCredentials | UserPasswordCredentials,
Field(discriminator="type"),
]
CredentialsType = Literal["api_key", "oauth2"]
CredentialsType = Literal["api_key", "oauth2", "user_password"]
class OAuthState(BaseModel):
@@ -347,3 +365,74 @@ def CredentialsField(
class ContributorDetails(BaseModel):
name: str = Field(title="Name", description="The name of the contributor.")
class AutoTopUpConfig(BaseModel):
amount: int
"""Amount of credits to top up."""
threshold: int
"""Threshold to trigger auto top up."""
class UserTransaction(BaseModel):
transaction_key: str = ""
transaction_time: datetime = datetime.min.replace(tzinfo=timezone.utc)
transaction_type: CreditTransactionType = CreditTransactionType.USAGE
amount: int = 0
balance: int = 0
description: str | None = None
usage_graph_id: str | None = None
usage_execution_id: str | None = None
usage_node_count: int = 0
usage_start_time: datetime = datetime.max.replace(tzinfo=timezone.utc)
class TransactionHistory(BaseModel):
transactions: list[UserTransaction]
next_transaction_time: datetime | None
class RefundRequest(BaseModel):
id: str
user_id: str
transaction_key: str
amount: int
reason: str
result: str | None = None
status: str
created_at: datetime
updated_at: datetime
class NodeExecutionStats(BaseModel):
"""Execution statistics for a node execution."""
class Config:
arbitrary_types_allowed = True
error: Optional[Exception | str] = None
walltime: float = 0
cputime: float = 0
cost: float = 0
input_size: int = 0
output_size: int = 0
llm_call_count: int = 0
llm_retry_count: int = 0
input_token_count: int = 0
output_token_count: int = 0
class GraphExecutionStats(BaseModel):
"""Execution statistics for a graph execution."""
class Config:
arbitrary_types_allowed = True
error: Optional[Exception | str] = None
walltime: float = 0
cputime: float = 0
nodes_walltime: float = 0
nodes_cputime: float = 0
node_count: int = 0
node_error_count: int = 0
cost: float = 0

View File

@@ -0,0 +1,406 @@
import logging
from datetime import datetime, timedelta
from enum import Enum
from typing import Annotated, Any, Generic, Optional, TypeVar, Union
from prisma import Json
from prisma.enums import NotificationType
from prisma.models import NotificationEvent, UserNotificationBatch
from prisma.types import UserNotificationBatchWhereInput
# from backend.notifications.models import NotificationEvent
from pydantic import BaseModel, EmailStr, Field, field_validator
from backend.server.v2.store.exceptions import DatabaseError
from .db import transaction
logger = logging.getLogger(__name__)
T_co = TypeVar("T_co", bound="BaseNotificationData", covariant=True)
class QueueType(Enum):
IMMEDIATE = "immediate" # Send right away (errors, critical notifications)
HOURLY = "hourly" # Batch for up to an hour (usage reports)
DAILY = "daily" # Daily digest (summary notifications)
BACKOFF = "backoff" # Backoff strategy (exponential backoff)
ADMIN = "admin" # Admin notifications (errors, critical notifications)
class BaseNotificationData(BaseModel):
pass
class AgentRunData(BaseNotificationData):
agent_name: str
credits_used: float
execution_time: float
node_count: int = Field(..., description="Number of nodes executed")
graph_id: str
outputs: list[dict[str, Any]] = Field(..., description="Outputs of the agent")
class ZeroBalanceData(BaseNotificationData):
last_transaction: float
last_transaction_time: datetime
top_up_link: str
class LowBalanceData(BaseNotificationData):
agent_name: str = Field(..., description="Name of the agent")
current_balance: float = Field(
..., description="Current balance in credits (100 = $1)"
)
billing_page_link: str = Field(..., description="Link to billing page")
shortfall: float = Field(..., description="Amount of credits needed to continue")
class BlockExecutionFailedData(BaseNotificationData):
block_name: str
block_id: str
error_message: str
graph_id: str
node_id: str
execution_id: str
class ContinuousAgentErrorData(BaseNotificationData):
agent_name: str
error_message: str
graph_id: str
execution_id: str
start_time: datetime
error_time: datetime
attempts: int = Field(..., description="Number of retry attempts made")
class BaseSummaryData(BaseNotificationData):
total_credits_used: float
total_executions: int
most_used_agent: str
total_execution_time: float
successful_runs: int
failed_runs: int
average_execution_time: float
cost_breakdown: dict[str, float]
class DailySummaryData(BaseSummaryData):
date: datetime
class WeeklySummaryData(BaseSummaryData):
start_date: datetime
end_date: datetime
week_number: int
year: int
class MonthlySummaryData(BaseSummaryData):
month: int
year: int
class RefundRequestData(BaseNotificationData):
user_id: str
user_name: str
user_email: str
transaction_id: str
refund_request_id: str
reason: str
amount: float
balance: int
NotificationData = Annotated[
Union[
AgentRunData,
ZeroBalanceData,
LowBalanceData,
BlockExecutionFailedData,
ContinuousAgentErrorData,
MonthlySummaryData,
WeeklySummaryData,
DailySummaryData,
RefundRequestData,
],
Field(discriminator="type"),
]
class NotificationEventDTO(BaseModel):
user_id: str
type: NotificationType
data: dict
created_at: datetime = Field(default_factory=datetime.now)
retry_count: int = 0
class NotificationEventModel(BaseModel, Generic[T_co]):
user_id: str
type: NotificationType
data: T_co
created_at: datetime = Field(default_factory=datetime.now)
@property
def strategy(self) -> QueueType:
return NotificationTypeOverride(self.type).strategy
@field_validator("type", mode="before")
def uppercase_type(cls, v):
if isinstance(v, str):
return v.upper()
return v
@property
def template(self) -> str:
return NotificationTypeOverride(self.type).template
def get_data_type(
notification_type: NotificationType,
) -> type[BaseNotificationData]:
return {
NotificationType.AGENT_RUN: AgentRunData,
NotificationType.ZERO_BALANCE: ZeroBalanceData,
NotificationType.LOW_BALANCE: LowBalanceData,
NotificationType.BLOCK_EXECUTION_FAILED: BlockExecutionFailedData,
NotificationType.CONTINUOUS_AGENT_ERROR: ContinuousAgentErrorData,
NotificationType.DAILY_SUMMARY: DailySummaryData,
NotificationType.WEEKLY_SUMMARY: WeeklySummaryData,
NotificationType.MONTHLY_SUMMARY: MonthlySummaryData,
NotificationType.REFUND_REQUEST: RefundRequestData,
NotificationType.REFUND_PROCESSED: RefundRequestData,
}[notification_type]
class NotificationBatch(BaseModel):
user_id: str
events: list[NotificationEvent]
strategy: QueueType
last_update: datetime = datetime.now()
class NotificationResult(BaseModel):
success: bool
message: Optional[str] = None
class NotificationTypeOverride:
def __init__(self, notification_type: NotificationType):
self.notification_type = notification_type
@property
def strategy(self) -> QueueType:
BATCHING_RULES = {
# These are batched by the notification service
NotificationType.AGENT_RUN: QueueType.IMMEDIATE,
# These are batched by the notification service, but with a backoff strategy
NotificationType.ZERO_BALANCE: QueueType.BACKOFF,
NotificationType.LOW_BALANCE: QueueType.IMMEDIATE,
NotificationType.BLOCK_EXECUTION_FAILED: QueueType.BACKOFF,
NotificationType.CONTINUOUS_AGENT_ERROR: QueueType.BACKOFF,
NotificationType.DAILY_SUMMARY: QueueType.DAILY,
NotificationType.WEEKLY_SUMMARY: QueueType.DAILY,
NotificationType.MONTHLY_SUMMARY: QueueType.DAILY,
NotificationType.REFUND_REQUEST: QueueType.ADMIN,
NotificationType.REFUND_PROCESSED: QueueType.ADMIN,
}
return BATCHING_RULES.get(self.notification_type, QueueType.IMMEDIATE)
@property
def template(self) -> str:
"""Returns template name for this notification type"""
return {
NotificationType.AGENT_RUN: "agent_run.html",
NotificationType.ZERO_BALANCE: "zero_balance.html",
NotificationType.LOW_BALANCE: "low_balance.html",
NotificationType.BLOCK_EXECUTION_FAILED: "block_failed.html",
NotificationType.CONTINUOUS_AGENT_ERROR: "agent_error.html",
NotificationType.DAILY_SUMMARY: "daily_summary.html",
NotificationType.WEEKLY_SUMMARY: "weekly_summary.html",
NotificationType.MONTHLY_SUMMARY: "monthly_summary.html",
NotificationType.REFUND_REQUEST: "refund_request.html",
NotificationType.REFUND_PROCESSED: "refund_processed.html",
}[self.notification_type]
@property
def subject(self) -> str:
return {
NotificationType.AGENT_RUN: "Agent Run Report",
NotificationType.ZERO_BALANCE: "You're out of credits!",
NotificationType.LOW_BALANCE: "Low Balance Warning!",
NotificationType.BLOCK_EXECUTION_FAILED: "Uh oh! Block Execution Failed",
NotificationType.CONTINUOUS_AGENT_ERROR: "Shoot! Continuous Agent Error",
NotificationType.DAILY_SUMMARY: "Here's your daily summary!",
NotificationType.WEEKLY_SUMMARY: "Look at all the cool stuff you did last week!",
NotificationType.MONTHLY_SUMMARY: "We did a lot this month!",
NotificationType.REFUND_REQUEST: "[ACTION REQUIRED] You got a ${{data.amount / 100}} refund request from {{data.user_name}}",
NotificationType.REFUND_PROCESSED: "Refund for ${{data.amount / 100}} to {{data.user_name}} has been processed",
}[self.notification_type]
class NotificationPreferenceDTO(BaseModel):
email: EmailStr = Field(..., description="User's email address")
preferences: dict[NotificationType, bool] = Field(
..., description="Which notifications the user wants"
)
daily_limit: int = Field(..., description="Max emails per day")
class NotificationPreference(BaseModel):
user_id: str
email: EmailStr
preferences: dict[NotificationType, bool] = Field(
default_factory=dict, description="Which notifications the user wants"
)
daily_limit: int = 10 # Max emails per day
emails_sent_today: int = 0
last_reset_date: datetime = Field(default_factory=datetime.now)
def get_batch_delay(notification_type: NotificationType) -> timedelta:
return {
NotificationType.AGENT_RUN: timedelta(seconds=1),
NotificationType.ZERO_BALANCE: timedelta(minutes=60),
NotificationType.LOW_BALANCE: timedelta(minutes=60),
NotificationType.BLOCK_EXECUTION_FAILED: timedelta(minutes=60),
NotificationType.CONTINUOUS_AGENT_ERROR: timedelta(minutes=60),
}[notification_type]
async def create_or_add_to_user_notification_batch(
user_id: str,
notification_type: NotificationType,
data: str, # type: 'NotificationEventModel'
) -> dict:
try:
logger.info(
f"Creating or adding to notification batch for {user_id} with type {notification_type} and data {data}"
)
notification_data = NotificationEventModel[
get_data_type(notification_type)
].model_validate_json(data)
# Serialize the data
json_data: Json = Json(notification_data.data.model_dump_json())
# First try to find existing batch
existing_batch = await UserNotificationBatch.prisma().find_unique(
where={
"userId_type": {
"userId": user_id,
"type": notification_type,
}
},
include={"notifications": True},
)
if not existing_batch:
async with transaction() as tx:
notification_event = await tx.notificationevent.create(
data={
"type": notification_type,
"data": json_data,
}
)
# Create new batch
resp = await tx.usernotificationbatch.create(
data={
"userId": user_id,
"type": notification_type,
"notifications": {"connect": [{"id": notification_event.id}]},
},
include={"notifications": True},
)
return resp.model_dump()
else:
async with transaction() as tx:
notification_event = await tx.notificationevent.create(
data={
"type": notification_type,
"data": json_data,
"UserNotificationBatch": {"connect": {"id": existing_batch.id}},
}
)
# Add to existing batch
resp = await tx.usernotificationbatch.update(
where={"id": existing_batch.id},
data={
"notifications": {"connect": [{"id": notification_event.id}]}
},
include={"notifications": True},
)
if not resp:
raise DatabaseError(
f"Failed to add notification event {notification_event.id} to existing batch {existing_batch.id}"
)
return resp.model_dump()
except Exception as e:
raise DatabaseError(
f"Failed to create or add to notification batch for user {user_id} and type {notification_type}: {e}"
) from e
async def get_user_notification_last_message_in_batch(
user_id: str,
notification_type: NotificationType,
) -> NotificationEvent | None:
try:
batch = await UserNotificationBatch.prisma().find_first(
where={"userId": user_id, "type": notification_type},
order={"createdAt": "desc"},
)
if not batch:
return None
if not batch.notifications:
return None
return batch.notifications[-1]
except Exception as e:
raise DatabaseError(
f"Failed to get user notification last message in batch for user {user_id} and type {notification_type}: {e}"
) from e
async def empty_user_notification_batch(
user_id: str, notification_type: NotificationType
) -> None:
try:
async with transaction() as tx:
await tx.notificationevent.delete_many(
where={
"UserNotificationBatch": {
"is": {"userId": user_id, "type": notification_type}
}
}
)
await tx.usernotificationbatch.delete_many(
where=UserNotificationBatchWhereInput(
userId=user_id,
type=notification_type,
)
)
except Exception as e:
raise DatabaseError(
f"Failed to empty user notification batch for user {user_id} and type {notification_type}: {e}"
) from e
async def get_user_notification_batch(
user_id: str,
notification_type: NotificationType,
) -> UserNotificationBatch | None:
try:
return await UserNotificationBatch.prisma().find_first(
where={"userId": user_id, "type": notification_type},
include={"notifications": True},
)
except Exception as e:
raise DatabaseError(
f"Failed to get user notification batch for user {user_id} and type {notification_type}: {e}"
) from e

View File

@@ -0,0 +1,247 @@
import re
from typing import Any, Optional
import prisma
import pydantic
from prisma import Json
from prisma.models import (
AgentGraph,
AgentGraphExecution,
StoreListingVersion,
UserOnboarding,
)
from prisma.types import UserOnboardingUpdateInput
from backend.server.v2.library.db import set_is_deleted_for_library_agent
from backend.server.v2.store.db import get_store_agent_details
from backend.server.v2.store.model import StoreAgentDetails
# Mapping from user reason id to categories to search for when choosing agent to show
REASON_MAPPING: dict[str, list[str]] = {
"content_marketing": ["writing", "marketing", "creative"],
"business_workflow_automation": ["business", "productivity"],
"data_research": ["data", "research"],
"ai_innovation": ["development", "research"],
"personal_productivity": ["personal", "productivity"],
}
class UserOnboardingUpdate(pydantic.BaseModel):
step: int
usageReason: Optional[str] = None
integrations: list[str] = pydantic.Field(default_factory=list)
otherIntegrations: Optional[str] = None
selectedAgentCreator: Optional[str] = None
selectedAgentSlug: Optional[str] = None
agentInput: Optional[dict[str, Any]] = None
isCompleted: bool = False
async def get_user_onboarding(user_id: str):
return await UserOnboarding.prisma().upsert(
where={"userId": user_id},
data={
"create": {"userId": user_id}, # type: ignore
"update": {},
},
)
async def update_user_onboarding(user_id: str, data: UserOnboardingUpdate):
# Get the user onboarding data
user_onboarding = await get_user_onboarding(user_id)
update: UserOnboardingUpdateInput = {
"step": data.step,
"isCompleted": data.isCompleted,
}
if data.usageReason:
update["usageReason"] = data.usageReason
if data.integrations:
update["integrations"] = data.integrations
if data.otherIntegrations:
update["otherIntegrations"] = data.otherIntegrations
if data.selectedAgentSlug and data.selectedAgentCreator:
update["selectedAgentSlug"] = data.selectedAgentSlug
update["selectedAgentCreator"] = data.selectedAgentCreator
# Check if slug changes
if (
user_onboarding.selectedAgentCreator
and user_onboarding.selectedAgentSlug
and user_onboarding.selectedAgentSlug != data.selectedAgentSlug
):
store_agent = await get_store_agent_details(
user_onboarding.selectedAgentCreator, user_onboarding.selectedAgentSlug
)
store_listing = await StoreListingVersion.prisma().find_unique_or_raise(
where={"id": store_agent.store_listing_version_id}
)
agent_graph = await AgentGraph.prisma().find_first(
where={"id": store_listing.agentId, "version": store_listing.version}
)
execution_count = await AgentGraphExecution.prisma().count(
where={
"userId": user_id,
"agentGraphId": store_listing.agentId,
"agentGraphVersion": store_listing.version,
}
)
# If there was no execution and graph doesn't belong to the user,
# mark the agent as deleted
if execution_count == 0 and agent_graph and agent_graph.userId != user_id:
await set_is_deleted_for_library_agent(
user_id, store_listing.agentId, store_listing.agentVersion, True
)
if data.agentInput:
update["agentInput"] = Json(data.agentInput)
return await UserOnboarding.prisma().upsert(
where={"userId": user_id},
data={
"create": {"userId": user_id, **update}, # type: ignore
"update": update,
},
)
def clean_and_split(text: str) -> list[str]:
"""
Removes all special characters from a string, truncates it to 100 characters,
and splits it by whitespace and commas.
Args:
text (str): The input string.
Returns:
list[str]: A list of cleaned words.
"""
# Remove all special characters (keep only alphanumeric and whitespace)
cleaned_text = re.sub(r"[^a-zA-Z0-9\s,]", "", text.strip()[:100])
# Split by whitespace and commas
words = re.split(r"[\s,]+", cleaned_text)
# Remove empty strings from the list
words = [word.lower() for word in words if word]
return words
def calculate_points(
agent, categories: list[str], custom: list[str], integrations: list[str]
) -> int:
"""
Calculates the total points for an agent based on the specified criteria.
Args:
agent: The agent object.
categories (list[str]): List of categories to match.
words (list[str]): List of words to match in the description.
Returns:
int: Total points for the agent.
"""
points = 0
# 1. Category Matches
matched_categories = sum(
1 for category in categories if category in agent.categories
)
points += matched_categories * 100
# 2. Description Word Matches
description_words = agent.description.split() # Split description into words
matched_words = sum(1 for word in custom if word in description_words)
points += matched_words * 100
matched_words = sum(1 for word in integrations if word in description_words)
points += matched_words * 50
# 3. Featured Bonus
if agent.featured:
points += 50
# 4. Rating Bonus
points += agent.rating * 10
# 5. Runs Bonus
runs_points = min(agent.runs / 1000 * 100, 100) # Cap at 100 points
points += runs_points
return int(points)
async def get_recommended_agents(user_id: str) -> list[StoreAgentDetails]:
user_onboarding = await get_user_onboarding(user_id)
categories = REASON_MAPPING.get(user_onboarding.usageReason or "", [])
where_clause: dict[str, Any] = {}
custom = clean_and_split((user_onboarding.usageReason or "").lower())
if categories:
where_clause["OR"] = [
{"categories": {"has": category}} for category in categories
]
else:
where_clause["OR"] = [
{"description": {"contains": word, "mode": "insensitive"}}
for word in custom
]
where_clause["OR"] += [
{"description": {"contains": word, "mode": "insensitive"}}
for word in user_onboarding.integrations
]
agents = await prisma.models.StoreAgent.prisma().find_many(
where=prisma.types.StoreAgentWhereInput(**where_clause),
order=[
{"featured": "desc"},
{"runs": "desc"},
{"rating": "desc"},
],
)
if len(agents) < 2:
agents += await prisma.models.StoreAgent.prisma().find_many(
where={
"listing_id": {"not_in": [agent.listing_id for agent in agents]},
},
order=[
{"featured": "desc"},
{"runs": "desc"},
{"rating": "desc"},
],
take=2 - len(agents),
)
# Calculate points for the first 30 agents and choose the top 2
agent_points = []
for agent in agents[:50]:
points = calculate_points(
agent, categories, custom, user_onboarding.integrations
)
agent_points.append((agent, points))
agent_points.sort(key=lambda x: x[1], reverse=True)
recommended_agents = [agent for agent, _ in agent_points[:2]]
return [
StoreAgentDetails(
store_listing_version_id=agent.storeListingVersionId,
slug=agent.slug,
agent_name=agent.agent_name,
agent_video=agent.agent_video or "",
agent_image=agent.agent_image,
creator=agent.creator_username,
creator_avatar=agent.creator_avatar,
sub_heading=agent.sub_heading,
description=agent.description,
categories=agent.categories,
runs=agent.runs,
rating=agent.rating,
versions=agent.versions,
last_updated=agent.updated_at,
)
for agent in recommended_agents
]

View File

@@ -0,0 +1,296 @@
import logging
from abc import ABC, abstractmethod
from enum import Enum
from typing import Awaitable, Optional
import aio_pika
import pika
import pika.adapters.blocking_connection
from pika.spec import BasicProperties
from pydantic import BaseModel
from backend.util.retry import conn_retry
from backend.util.settings import Settings
logger = logging.getLogger(__name__)
class ExchangeType(str, Enum):
DIRECT = "direct"
FANOUT = "fanout"
TOPIC = "topic"
HEADERS = "headers"
class Exchange(BaseModel):
name: str
type: ExchangeType
durable: bool = True
auto_delete: bool = False
class Queue(BaseModel):
name: str
durable: bool = True
auto_delete: bool = False
# Optional exchange binding configuration
exchange: Optional[Exchange] = None
routing_key: Optional[str] = None
arguments: Optional[dict] = None
class RabbitMQConfig(BaseModel):
"""Configuration for a RabbitMQ service instance"""
vhost: str = "/"
exchanges: list[Exchange]
queues: list[Queue]
class RabbitMQBase(ABC):
"""Base class for RabbitMQ connections with shared configuration"""
def __init__(self, config: RabbitMQConfig):
settings = Settings()
self.host = settings.config.rabbitmq_host
self.port = settings.config.rabbitmq_port
self.username = settings.secrets.rabbitmq_default_user
self.password = settings.secrets.rabbitmq_default_pass
self.config = config
self._connection = None
self._channel = None
@property
def is_connected(self) -> bool:
"""Check if we have a valid connection"""
return bool(self._connection)
@property
def is_ready(self) -> bool:
"""Check if we have a valid channel"""
return bool(self.is_connected and self._channel)
@abstractmethod
def connect(self) -> None | Awaitable[None]:
"""Establish connection to RabbitMQ"""
pass
@abstractmethod
def disconnect(self) -> None | Awaitable[None]:
"""Close connection to RabbitMQ"""
pass
@abstractmethod
def declare_infrastructure(self) -> None | Awaitable[None]:
"""Declare exchanges and queues for this service"""
pass
class SyncRabbitMQ(RabbitMQBase):
"""Synchronous RabbitMQ client"""
@property
def is_connected(self) -> bool:
return bool(self._connection and self._connection.is_open)
@property
def is_ready(self) -> bool:
return bool(self.is_connected and self._channel and self._channel.is_open)
@conn_retry("RabbitMQ", "Acquiring connection")
def connect(self) -> None:
if self.is_connected:
return
credentials = pika.PlainCredentials(self.username, self.password)
parameters = pika.ConnectionParameters(
host=self.host,
port=self.port,
virtual_host=self.config.vhost,
credentials=credentials,
heartbeat=600,
blocked_connection_timeout=300,
)
self._connection = pika.BlockingConnection(parameters)
self._channel = self._connection.channel()
self._channel.basic_qos(prefetch_count=1)
self.declare_infrastructure()
def disconnect(self) -> None:
if self._channel:
if self._channel.is_open:
self._channel.close()
self._channel = None
if self._connection:
if self._connection.is_open:
self._connection.close()
self._connection = None
def declare_infrastructure(self) -> None:
"""Declare exchanges and queues for this service"""
if not self.is_ready:
self.connect()
if self._channel is None:
raise RuntimeError("Channel should be established after connect")
# Declare exchanges
for exchange in self.config.exchanges:
self._channel.exchange_declare(
exchange=exchange.name,
exchange_type=exchange.type.value,
durable=exchange.durable,
auto_delete=exchange.auto_delete,
)
# Declare queues and bind them to exchanges
for queue in self.config.queues:
self._channel.queue_declare(
queue=queue.name,
durable=queue.durable,
auto_delete=queue.auto_delete,
arguments=queue.arguments,
)
if queue.exchange:
self._channel.queue_bind(
queue=queue.name,
exchange=queue.exchange.name,
routing_key=queue.routing_key or queue.name,
)
def publish_message(
self,
routing_key: str,
message: str,
exchange: Optional[Exchange] = None,
properties: Optional[BasicProperties] = None,
mandatory: bool = True,
) -> None:
if not self.is_ready:
self.connect()
if self._channel is None:
raise RuntimeError("Channel should be established after connect")
self._channel.basic_publish(
exchange=exchange.name if exchange else "",
routing_key=routing_key,
body=message.encode(),
properties=properties or BasicProperties(delivery_mode=2),
mandatory=mandatory,
)
def get_channel(self) -> pika.adapters.blocking_connection.BlockingChannel:
if not self.is_ready:
self.connect()
if self._channel is None:
raise RuntimeError("Channel should be established after connect")
return self._channel
class AsyncRabbitMQ(RabbitMQBase):
"""Asynchronous RabbitMQ client"""
@property
def is_connected(self) -> bool:
return bool(self._connection and not self._connection.is_closed)
@property
def is_ready(self) -> bool:
return bool(self.is_connected and self._channel and not self._channel.is_closed)
@conn_retry("AsyncRabbitMQ", "Acquiring async connection")
async def connect(self):
if self.is_connected:
return
self._connection = await aio_pika.connect_robust(
host=self.host,
port=self.port,
login=self.username,
password=self.password,
virtualhost=self.config.vhost.lstrip("/"),
)
self._channel = await self._connection.channel()
await self._channel.set_qos(prefetch_count=1)
await self.declare_infrastructure()
async def disconnect(self):
if self._channel:
await self._channel.close()
self._channel = None
if self._connection:
await self._connection.close()
self._connection = None
async def declare_infrastructure(self):
"""Declare exchanges and queues for this service"""
if not self.is_ready:
await self.connect()
if self._channel is None:
raise RuntimeError("Channel should be established after connect")
# Declare exchanges
for exchange in self.config.exchanges:
await self._channel.declare_exchange(
name=exchange.name,
type=exchange.type.value,
durable=exchange.durable,
auto_delete=exchange.auto_delete,
)
# Declare queues and bind them to exchanges
for queue in self.config.queues:
queue_obj = await self._channel.declare_queue(
name=queue.name,
durable=queue.durable,
auto_delete=queue.auto_delete,
arguments=queue.arguments,
)
if queue.exchange:
exchange = await self._channel.get_exchange(queue.exchange.name)
await queue_obj.bind(
exchange, routing_key=queue.routing_key or queue.name
)
async def publish_message(
self,
routing_key: str,
message: str,
exchange: Optional[Exchange] = None,
persistent: bool = True,
) -> None:
if not self.is_ready:
await self.connect()
if self._channel is None:
raise RuntimeError("Channel should be established after connect")
if exchange:
exchange_obj = await self._channel.get_exchange(exchange.name)
else:
exchange_obj = self._channel.default_exchange
await exchange_obj.publish(
aio_pika.Message(
body=message.encode(),
delivery_mode=(
aio_pika.DeliveryMode.PERSISTENT
if persistent
else aio_pika.DeliveryMode.NOT_PERSISTENT
),
),
routing_key=routing_key,
)
async def get_channel(self) -> aio_pika.abc.AbstractChannel:
if not self.is_ready:
await self.connect()
if self._channel is None:
raise RuntimeError("Channel should be established after connect")
return self._channel

View File

@@ -1,42 +1,78 @@
import logging
from datetime import datetime, timedelta
from typing import Optional, cast
from autogpt_libs.auth.models import DEFAULT_USER_ID
from fastapi import HTTPException
from prisma import Json
from prisma.enums import NotificationType
from prisma.models import User
from prisma.types import UserUpdateInput
from backend.data.db import prisma
from backend.data.model import UserIntegrations, UserMetadata, UserMetadataRaw
from backend.data.notifications import NotificationPreference, NotificationPreferenceDTO
from backend.server.v2.store.exceptions import DatabaseError
from backend.util.encryption import JSONCryptor
logger = logging.getLogger(__name__)
async def get_or_create_user(user_data: dict) -> User:
user_id = user_data.get("sub")
if not user_id:
raise HTTPException(status_code=401, detail="User ID not found in token")
try:
user_id = user_data.get("sub")
if not user_id:
raise HTTPException(status_code=401, detail="User ID not found in token")
user_email = user_data.get("email")
if not user_email:
raise HTTPException(status_code=401, detail="Email not found in token")
user_email = user_data.get("email")
if not user_email:
raise HTTPException(status_code=401, detail="Email not found in token")
user = await prisma.user.find_unique(where={"id": user_id})
if not user:
user = await prisma.user.create(
data={
"id": user_id,
"email": user_email,
"name": user_data.get("user_metadata", {}).get("name"),
}
)
return User.model_validate(user)
except Exception as e:
raise DatabaseError(f"Failed to get or create user {user_data}: {e}") from e
async def get_user_by_id(user_id: str) -> User:
user = await prisma.user.find_unique(where={"id": user_id})
if not user:
user = await prisma.user.create(
data={
"id": user_id,
"email": user_email,
"name": user_data.get("user_metadata", {}).get("name"),
}
)
raise ValueError(f"User not found with ID: {user_id}")
return User.model_validate(user)
async def get_user_by_id(user_id: str) -> Optional[User]:
user = await prisma.user.find_unique(where={"id": user_id})
return User.model_validate(user) if user else None
async def get_user_email_by_id(user_id: str) -> Optional[str]:
try:
user = await prisma.user.find_unique(where={"id": user_id})
return user.email if user else None
except Exception as e:
raise DatabaseError(f"Failed to get user email for user {user_id}: {e}") from e
async def get_user_by_email(email: str) -> Optional[User]:
try:
user = await prisma.user.find_unique(where={"email": email})
return User.model_validate(user) if user else None
except Exception as e:
raise DatabaseError(f"Failed to get user by email {email}: {e}") from e
async def update_user_email(user_id: str, email: str):
try:
await prisma.user.update(where={"id": user_id}, data={"email": email})
except Exception as e:
raise DatabaseError(
f"Failed to update user email for user {user_id}: {e}"
) from e
async def create_default_user() -> Optional[User]:
@@ -128,3 +164,173 @@ async def migrate_and_encrypt_user_integrations():
where={"id": user.id},
data={"metadata": Json(raw_metadata)},
)
async def get_active_user_ids_in_timerange(start_time: str, end_time: str) -> list[str]:
try:
users = await User.prisma().find_many(
where={
"AgentGraphExecutions": {
"some": {
"createdAt": {
"gte": datetime.fromisoformat(start_time),
"lte": datetime.fromisoformat(end_time),
}
}
}
},
)
return [user.id for user in users]
except Exception as e:
raise DatabaseError(
f"Failed to get active user ids in timerange {start_time} to {end_time}: {e}"
) from e
async def get_active_users_ids() -> list[str]:
user_ids = await get_active_user_ids_in_timerange(
(datetime.now() - timedelta(days=30)).isoformat(),
datetime.now().isoformat(),
)
return user_ids
async def get_user_notification_preference(user_id: str) -> NotificationPreference:
try:
user = await User.prisma().find_unique_or_raise(
where={"id": user_id},
)
# enable notifications by default if user has no notification preference (shouldn't ever happen though)
preferences: dict[NotificationType, bool] = {
NotificationType.AGENT_RUN: user.notifyOnAgentRun or False,
NotificationType.ZERO_BALANCE: user.notifyOnZeroBalance or False,
NotificationType.LOW_BALANCE: user.notifyOnLowBalance or False,
NotificationType.BLOCK_EXECUTION_FAILED: user.notifyOnBlockExecutionFailed
or False,
NotificationType.CONTINUOUS_AGENT_ERROR: user.notifyOnContinuousAgentError
or False,
NotificationType.DAILY_SUMMARY: user.notifyOnDailySummary or False,
NotificationType.WEEKLY_SUMMARY: user.notifyOnWeeklySummary or False,
NotificationType.MONTHLY_SUMMARY: user.notifyOnMonthlySummary or False,
}
daily_limit = user.maxEmailsPerDay or 3
notification_preference = NotificationPreference(
user_id=user.id,
email=user.email,
preferences=preferences,
daily_limit=daily_limit,
# TODO with other changes later, for now we just will email them
emails_sent_today=0,
last_reset_date=datetime.now(),
)
return NotificationPreference.model_validate(notification_preference)
except Exception as e:
raise DatabaseError(
f"Failed to upsert user notification preference for user {user_id}: {e}"
) from e
async def update_user_notification_preference(
user_id: str, data: NotificationPreferenceDTO
) -> NotificationPreference:
try:
update_data: UserUpdateInput = {}
if data.email:
update_data["email"] = data.email
if NotificationType.AGENT_RUN in data.preferences:
update_data["notifyOnAgentRun"] = data.preferences[
NotificationType.AGENT_RUN
]
if NotificationType.ZERO_BALANCE in data.preferences:
update_data["notifyOnZeroBalance"] = data.preferences[
NotificationType.ZERO_BALANCE
]
if NotificationType.LOW_BALANCE in data.preferences:
update_data["notifyOnLowBalance"] = data.preferences[
NotificationType.LOW_BALANCE
]
if NotificationType.BLOCK_EXECUTION_FAILED in data.preferences:
update_data["notifyOnBlockExecutionFailed"] = data.preferences[
NotificationType.BLOCK_EXECUTION_FAILED
]
if NotificationType.CONTINUOUS_AGENT_ERROR in data.preferences:
update_data["notifyOnContinuousAgentError"] = data.preferences[
NotificationType.CONTINUOUS_AGENT_ERROR
]
if NotificationType.DAILY_SUMMARY in data.preferences:
update_data["notifyOnDailySummary"] = data.preferences[
NotificationType.DAILY_SUMMARY
]
if NotificationType.WEEKLY_SUMMARY in data.preferences:
update_data["notifyOnWeeklySummary"] = data.preferences[
NotificationType.WEEKLY_SUMMARY
]
if NotificationType.MONTHLY_SUMMARY in data.preferences:
update_data["notifyOnMonthlySummary"] = data.preferences[
NotificationType.MONTHLY_SUMMARY
]
if data.daily_limit:
update_data["maxEmailsPerDay"] = data.daily_limit
user = await User.prisma().update(
where={"id": user_id},
data=update_data,
)
if not user:
raise ValueError(f"User not found with ID: {user_id}")
preferences: dict[NotificationType, bool] = {
NotificationType.AGENT_RUN: user.notifyOnAgentRun or True,
NotificationType.ZERO_BALANCE: user.notifyOnZeroBalance or True,
NotificationType.LOW_BALANCE: user.notifyOnLowBalance or True,
NotificationType.BLOCK_EXECUTION_FAILED: user.notifyOnBlockExecutionFailed
or True,
NotificationType.CONTINUOUS_AGENT_ERROR: user.notifyOnContinuousAgentError
or True,
NotificationType.DAILY_SUMMARY: user.notifyOnDailySummary or True,
NotificationType.WEEKLY_SUMMARY: user.notifyOnWeeklySummary or True,
NotificationType.MONTHLY_SUMMARY: user.notifyOnMonthlySummary or True,
}
notification_preference = NotificationPreference(
user_id=user.id,
email=user.email,
preferences=preferences,
daily_limit=user.maxEmailsPerDay or 3,
# TODO with other changes later, for now we just will email them
emails_sent_today=0,
last_reset_date=datetime.now(),
)
return NotificationPreference.model_validate(notification_preference)
except Exception as e:
raise DatabaseError(
f"Failed to update user notification preference for user {user_id}: {e}"
) from e
async def set_user_email_verification(user_id: str, verified: bool) -> None:
"""Set the email verification status for a user."""
try:
await User.prisma().update(
where={"id": user_id},
data={"emailVerified": verified},
)
except Exception as e:
raise DatabaseError(
f"Failed to set email verification status for user {user_id}: {e}"
) from e
async def get_user_email_verification(user_id: str) -> bool:
"""Get the email verification status for a user."""
try:
user = await User.prisma().find_unique_or_raise(
where={"id": user_id},
)
return user.emailVerified
except Exception as e:
raise DatabaseError(
f"Failed to get email verification status for user {user_id}: {e}"
) from e

View File

@@ -1,33 +1,40 @@
from functools import wraps
from typing import Any, Callable, Concatenate, Coroutine, ParamSpec, TypeVar, cast
from backend.data.credit import get_user_credit_model
from backend.data.execution import (
ExecutionResult,
NodeExecutionEntry,
RedisExecutionEventBus,
create_graph_execution,
get_execution_results,
get_incomplete_executions,
get_latest_execution,
update_execution_status,
update_graph_execution_start_time,
update_graph_execution_stats,
update_node_execution_stats,
upsert_execution_input,
upsert_execution_output,
)
from backend.data.graph import get_graph, get_node
from backend.data.graph import (
get_connected_output_nodes,
get_graph,
get_graph_metadata,
get_node,
)
from backend.data.user import (
get_user_integrations,
get_user_metadata,
update_user_integrations,
update_user_metadata,
)
from backend.util.service import AppService, expose, register_pydantic_serializers
from backend.util.service import AppService, expose, exposed_run_and_wait
from backend.util.settings import Config
P = ParamSpec("P")
R = TypeVar("R")
config = Config()
_user_credit_model = get_user_credit_model()
async def _spend_credits(entry: NodeExecutionEntry) -> int:
return await _user_credit_model.spend_credits(entry, 0, 0)
class DatabaseManager(AppService):
@@ -45,28 +52,15 @@ class DatabaseManager(AppService):
def send_execution_update(self, execution_result: ExecutionResult):
self.event_queue.publish(execution_result)
@staticmethod
def exposed_run_and_wait(
f: Callable[P, Coroutine[None, None, R]]
) -> Callable[Concatenate[object, P], R]:
@expose
@wraps(f)
def wrapper(self, *args: P.args, **kwargs: P.kwargs) -> R:
coroutine = f(*args, **kwargs)
res = self.run_and_wait(coroutine)
return res
# Register serializers for annotations on bare function
register_pydantic_serializers(f)
return wrapper
# Executions
create_graph_execution = exposed_run_and_wait(create_graph_execution)
get_execution_results = exposed_run_and_wait(get_execution_results)
get_incomplete_executions = exposed_run_and_wait(get_incomplete_executions)
get_latest_execution = exposed_run_and_wait(get_latest_execution)
update_execution_status = exposed_run_and_wait(update_execution_status)
update_graph_execution_start_time = exposed_run_and_wait(
update_graph_execution_start_time
)
update_graph_execution_stats = exposed_run_and_wait(update_graph_execution_stats)
update_node_execution_stats = exposed_run_and_wait(update_node_execution_stats)
upsert_execution_input = exposed_run_and_wait(upsert_execution_input)
@@ -75,17 +69,11 @@ class DatabaseManager(AppService):
# Graphs
get_node = exposed_run_and_wait(get_node)
get_graph = exposed_run_and_wait(get_graph)
get_connected_output_nodes = exposed_run_and_wait(get_connected_output_nodes)
get_graph_metadata = exposed_run_and_wait(get_graph_metadata)
# Credits
user_credit_model = get_user_credit_model()
get_or_refill_credit = cast(
Callable[[Any, str], int],
exposed_run_and_wait(user_credit_model.get_or_refill_credit),
)
spend_credits = cast(
Callable[[Any, str, int, str, dict[str, str], float, float], int],
exposed_run_and_wait(user_credit_model.spend_credits),
)
spend_credits = exposed_run_and_wait(_spend_credits)
# User + User Metadata + User Integrations
get_user_metadata = exposed_run_and_wait(get_user_metadata)

View File

@@ -8,12 +8,23 @@ import threading
from concurrent.futures import Future, ProcessPoolExecutor
from contextlib import contextmanager
from multiprocessing.pool import AsyncResult, Pool
from typing import TYPE_CHECKING, Any, Generator, TypeVar, cast
from typing import TYPE_CHECKING, Any, Generator, Optional, TypeVar, cast
from redis.lock import Lock as RedisLock
from backend.blocks.basic import AgentOutputBlock
from backend.data.model import GraphExecutionStats, NodeExecutionStats
from backend.data.notifications import (
AgentRunData,
LowBalanceData,
NotificationEventDTO,
NotificationType,
)
from backend.util.exceptions import InsufficientBalanceError
if TYPE_CHECKING:
from backend.executor import DatabaseManager
from backend.notifications.notifications import NotificationManager
from autogpt_libs.utils.cache import thread_cached
@@ -40,6 +51,7 @@ from backend.data.graph import GraphModel, Link, Node
from backend.integrations.creds_manager import IntegrationCredentialsManager
from backend.util import json
from backend.util.decorator import error_logged, time_measured
from backend.util.file import clean_exec_files
from backend.util.logging import configure_logging
from backend.util.process import set_service_name
from backend.util.service import (
@@ -108,7 +120,7 @@ def execute_node(
db_client: "DatabaseManager",
creds_manager: IntegrationCredentialsManager,
data: NodeExecutionEntry,
execution_stats: dict[str, Any] | None = None,
execution_stats: NodeExecutionStats | None = None,
) -> ExecutionStream:
"""
Execute a node in the graph. This will trigger a block execution on a node,
@@ -162,6 +174,7 @@ def execute_node(
# AgentExecutorBlock specially separate the node input_data & its input_default.
if isinstance(node_block, AgentExecutorBlock):
input_data = {**node.input_default, "data": input_data}
data.data = input_data
# Execute the node
input_data_str = json.dumps(input_data)
@@ -169,7 +182,15 @@ def execute_node(
log_metadata.info("Executed node with input", input=input_data_str)
update_execution(ExecutionStatus.RUNNING)
extra_exec_kwargs = {}
# Inject extra execution arguments for the blocks via kwargs
extra_exec_kwargs: dict = {
"graph_id": graph_id,
"node_id": node_id,
"graph_exec_id": graph_exec_id,
"node_exec_id": node_exec_id,
"user_id": user_id,
}
# Last-minute fetch credentials + acquire a system-wide read-write lock to prevent
# changes during execution. ⚠️ This means a set of credentials can only be used by
# one (running) block at a time; simultaneous execution of blocks using same
@@ -182,19 +203,20 @@ def execute_node(
extra_exec_kwargs[field_name] = credentials
output_size = 0
end_status = ExecutionStatus.COMPLETED
credit = db_client.get_or_refill_credit(user_id)
if credit < 0:
raise ValueError(f"Insufficient credit: {credit}")
cost = 0
try:
# Charge the user for the execution before running the block.
cost = db_client.spend_credits(data)
outputs: dict[str, Any] = {}
for output_name, output_data in node_block.execute(
input_data, **extra_exec_kwargs
):
output_data = json.convert_pydantic_to_json(output_data)
output_size += len(json.dumps(output_data))
log_metadata.info("Node produced output", **{output_name: output_data})
db_client.upsert_execution_output(node_exec_id, output_name, output_data)
outputs[output_name] = output_data
for execution in _enqueue_next_nodes(
db_client=db_client,
node=node,
@@ -206,11 +228,13 @@ def execute_node(
):
yield execution
# Update execution status and spend credits
update_execution(ExecutionStatus.COMPLETED)
except Exception as e:
end_status = ExecutionStatus.FAILED
error_msg = str(e)
log_metadata.exception(f"Node execution failed with error {error_msg}")
db_client.upsert_execution_output(node_exec_id, "error", error_msg)
update_execution(ExecutionStatus.FAILED)
for execution in _enqueue_next_nodes(
db_client=db_client,
@@ -226,28 +250,20 @@ def execute_node(
raise e
finally:
# Ensure credentials are released even if execution fails
if creds_lock:
if creds_lock and creds_lock.locked():
try:
creds_lock.release()
except Exception as e:
log_metadata.error(f"Failed to release credentials lock: {e}")
# Update execution status and spend credits
res = update_execution(end_status)
if end_status == ExecutionStatus.COMPLETED:
s = input_size + output_size
t = (
(res.end_time - res.start_time).total_seconds()
if res.end_time and res.start_time
else 0
)
db_client.spend_credits(user_id, credit, node_block.id, input_data, s, t)
# Update execution stats
if execution_stats is not None:
execution_stats.update(node_block.execution_stats)
execution_stats["input_size"] = input_size
execution_stats["output_size"] = output_size
execution_stats = execution_stats.model_copy(
update=node_block.execution_stats.model_dump()
)
execution_stats.input_size = input_size
execution_stats.output_size = output_size
execution_stats.cost = cost
def _enqueue_next_nodes(
@@ -260,7 +276,7 @@ def _enqueue_next_nodes(
log_metadata: LogMetadata,
) -> list[NodeExecutionEntry]:
def add_enqueued_execution(
node_exec_id: str, node_id: str, data: BlockInput
node_exec_id: str, node_id: str, block_id: str, data: BlockInput
) -> NodeExecutionEntry:
exec_update = db_client.update_execution_status(
node_exec_id, ExecutionStatus.QUEUED, data
@@ -272,6 +288,7 @@ def _enqueue_next_nodes(
graph_id=graph_id,
node_exec_id=node_exec_id,
node_id=node_id,
block_id=block_id,
data=data,
)
@@ -325,7 +342,12 @@ def _enqueue_next_nodes(
# Input is complete, enqueue the execution.
log_metadata.info(f"Enqueued {suffix}")
enqueued_executions.append(
add_enqueued_execution(next_node_exec_id, next_node_id, next_node_input)
add_enqueued_execution(
node_exec_id=next_node_exec_id,
node_id=next_node_id,
block_id=next_node.block_id,
data=next_node_input,
)
)
# Next execution stops here if the link is not static.
@@ -355,7 +377,12 @@ def _enqueue_next_nodes(
continue
log_metadata.info(f"Enqueueing static-link execution {suffix}")
enqueued_executions.append(
add_enqueued_execution(iexec.node_exec_id, next_node_id, idata)
add_enqueued_execution(
node_exec_id=iexec.node_exec_id,
node_id=next_node_id,
block_id=next_node.block_id,
data=idata,
)
)
return enqueued_executions
@@ -389,46 +416,30 @@ def validate_exec(
node_block: Block | None = get_block(node.block_id)
if not node_block:
return None, f"Block for {node.block_id} not found."
schema = node_block.input_schema
if isinstance(node_block, AgentExecutorBlock):
# Validate the execution metadata for the agent executor block.
try:
exec_data = AgentExecutorBlock.Input(**node.input_default)
except Exception as e:
return None, f"Input data doesn't match {node_block.name}: {str(e)}"
# Validation input
input_schema = exec_data.input_schema
required_fields = set(input_schema["required"])
input_default = exec_data.data
else:
# Convert non-matching data types to the expected input schema.
for name, data_type in node_block.input_schema.__annotations__.items():
if (value := data.get(name)) and (type(value) is not data_type):
data[name] = convert(value, data_type)
# Validation input
input_schema = node_block.input_schema.jsonschema()
required_fields = node_block.input_schema.get_required_fields()
input_default = node.input_default
# Convert non-matching data types to the expected input schema.
for name, data_type in schema.__annotations__.items():
if (value := data.get(name)) and (type(value) is not data_type):
data[name] = convert(value, data_type)
# Input data (without default values) should contain all required fields.
error_prefix = f"Input data missing or mismatch for `{node_block.name}`:"
input_fields_from_nodes = {link.sink_name for link in node.input_links}
if not input_fields_from_nodes.issubset(data):
return None, f"{error_prefix} {input_fields_from_nodes - set(data)}"
if missing_links := schema.get_missing_links(data, node.input_links):
return None, f"{error_prefix} unpopulated links {missing_links}"
# Merge input data with default values and resolve dynamic dict/list/object pins.
input_default = schema.get_input_defaults(node.input_default)
data = {**input_default, **data}
if resolve_input:
data = merge_execution_input(data)
# Input data post-merge should contain all required fields from the schema.
if not required_fields.issubset(data):
return None, f"{error_prefix} {required_fields - set(data)}"
if missing_input := schema.get_missing_input(data):
return None, f"{error_prefix} missing input {missing_input}"
# Last validation: Validate the input values against the schema.
if error := json.validate_with_jsonschema(schema=input_schema, data=data):
if error := schema.get_mismatch_error(data):
error_message = f"{error_prefix} {error}"
logger.error(error_message)
return None, error_message
@@ -509,7 +520,7 @@ class Executor:
cls,
q: ExecutionQueue[NodeExecutionEntry],
node_exec: NodeExecutionEntry,
) -> dict[str, Any]:
) -> NodeExecutionStats:
log_metadata = LogMetadata(
user_id=node_exec.user_id,
graph_eid=node_exec.graph_exec_id,
@@ -519,13 +530,15 @@ class Executor:
block_name="-",
)
execution_stats = {}
execution_stats = NodeExecutionStats()
timing_info, _ = cls._on_node_execution(
q, node_exec, log_metadata, execution_stats
)
execution_stats["walltime"] = timing_info.wall_time
execution_stats["cputime"] = timing_info.cpu_time
execution_stats.walltime = timing_info.wall_time
execution_stats.cputime = timing_info.cpu_time
if isinstance(execution_stats.error, Exception):
execution_stats.error = str(execution_stats.error)
cls.db_client.update_node_execution_stats(
node_exec.node_exec_id, execution_stats
)
@@ -538,19 +551,31 @@ class Executor:
q: ExecutionQueue[NodeExecutionEntry],
node_exec: NodeExecutionEntry,
log_metadata: LogMetadata,
stats: dict[str, Any] | None = None,
stats: NodeExecutionStats | None = None,
):
try:
log_metadata.info(f"Start node execution {node_exec.node_exec_id}")
for execution in execute_node(
cls.db_client, cls.creds_manager, node_exec, stats
db_client=cls.db_client,
creds_manager=cls.creds_manager,
data=node_exec,
execution_stats=stats,
):
q.add(execution)
log_metadata.info(f"Finished node execution {node_exec.node_exec_id}")
except Exception as e:
log_metadata.exception(
f"Failed node execution {node_exec.node_exec_id}: {e}"
)
# Avoid user error being marked as an actual error.
if isinstance(e, ValueError):
log_metadata.info(
f"Failed node execution {node_exec.node_exec_id}: {e}"
)
else:
log_metadata.exception(
f"Failed node execution {node_exec.node_exec_id}: {e}"
)
if stats is not None:
stats.error = e
@classmethod
def on_graph_executor_start(cls):
@@ -560,6 +585,7 @@ class Executor:
cls.db_client = get_db_client()
cls.pool_size = settings.config.num_node_workers
cls.pid = os.getpid()
cls.notification_service = get_notification_service()
cls._init_node_executor_pool()
logger.info(
f"Graph executor {cls.pid} started with {cls.pool_size} node workers"
@@ -597,12 +623,16 @@ class Executor:
node_eid="*",
block_name="-",
)
cls.db_client.update_graph_execution_start_time(graph_exec.graph_exec_id)
timing_info, (exec_stats, status, error) = cls._on_graph_execution(
graph_exec, cancel, log_metadata
)
exec_stats["walltime"] = timing_info.wall_time
exec_stats["cputime"] = timing_info.cpu_time
exec_stats["error"] = str(error) if error else None
exec_stats.walltime = timing_info.wall_time
exec_stats.cputime = timing_info.cpu_time
exec_stats.error = error
if isinstance(exec_stats.error, Exception):
exec_stats.error = str(exec_stats.error)
result = cls.db_client.update_graph_execution_stats(
graph_exec_id=graph_exec.graph_exec_id,
status=status,
@@ -610,6 +640,8 @@ class Executor:
)
cls.db_client.send_execution_update(result)
cls._handle_agent_run_notif(graph_exec, exec_stats)
@classmethod
@time_measured
def _on_graph_execution(
@@ -617,7 +649,7 @@ class Executor:
graph_exec: GraphExecutionEntry,
cancel: threading.Event,
log_metadata: LogMetadata,
) -> tuple[dict[str, Any], ExecutionStatus, Exception | None]:
) -> tuple[GraphExecutionStats, ExecutionStatus, Exception | None]:
"""
Returns:
dict: The execution statistics of the graph execution.
@@ -625,11 +657,7 @@ class Executor:
Exception | None: The error that occurred during the execution, if any.
"""
log_metadata.info(f"Start graph execution {graph_exec.graph_exec_id}")
exec_stats = {
"nodes_walltime": 0,
"nodes_cputime": 0,
"node_count": 0,
}
exec_stats = GraphExecutionStats()
error = None
finished = False
@@ -648,20 +676,33 @@ class Executor:
try:
queue = ExecutionQueue[NodeExecutionEntry]()
for node_exec in graph_exec.start_node_execs:
exec_update = cls.db_client.update_execution_status(
node_exec.node_exec_id, ExecutionStatus.QUEUED, node_exec.data
)
cls.db_client.send_execution_update(exec_update)
queue.add(node_exec)
running_executions: dict[str, AsyncResult] = {}
low_balance_error: Optional[InsufficientBalanceError] = None
def make_exec_callback(exec_data: NodeExecutionEntry):
node_id = exec_data.node_id
def callback(result: object):
running_executions.pop(node_id)
nonlocal exec_stats
if isinstance(result, dict):
exec_stats["node_count"] += 1
exec_stats["nodes_cputime"] += result.get("cputime", 0)
exec_stats["nodes_walltime"] += result.get("walltime", 0)
running_executions.pop(exec_data.node_id)
if not isinstance(result, NodeExecutionStats):
return
nonlocal exec_stats, low_balance_error
exec_stats.node_count += 1
exec_stats.nodes_cputime += result.cputime
exec_stats.nodes_walltime += result.walltime
exec_stats.cost += result.cost
if (err := result.error) and isinstance(err, Exception):
exec_stats.node_error_count += 1
if isinstance(err, InsufficientBalanceError):
low_balance_error = err
return callback
@@ -706,6 +747,16 @@ class Executor:
execution.wait(3)
log_metadata.info(f"Finished graph execution {graph_exec.graph_exec_id}")
if isinstance(low_balance_error, InsufficientBalanceError):
cls._handle_low_balance_notif(
graph_exec.user_id,
graph_exec.graph_id,
exec_stats,
low_balance_error,
)
raise low_balance_error
except Exception as e:
log_metadata.exception(
f"Failed graph execution {graph_exec.graph_exec_id}: {e}"
@@ -716,6 +767,7 @@ class Executor:
finished = True
cancel.set()
cancel_thread.join()
clean_exec_files(graph_exec.graph_exec_id)
return (
exec_stats,
@@ -723,6 +775,67 @@ class Executor:
error,
)
@classmethod
def _handle_agent_run_notif(
cls,
graph_exec: GraphExecutionEntry,
exec_stats: GraphExecutionStats,
):
metadata = cls.db_client.get_graph_metadata(
graph_exec.graph_id, graph_exec.graph_version
)
outputs = cls.db_client.get_execution_results(graph_exec.graph_exec_id)
named_outputs = [
{
key: value[0] if key == "name" else value
for key, value in output.output_data.items()
}
for output in outputs
if output.block_id == AgentOutputBlock().id
]
event = NotificationEventDTO(
user_id=graph_exec.user_id,
type=NotificationType.AGENT_RUN,
data=AgentRunData(
outputs=named_outputs,
agent_name=metadata.name if metadata else "Unknown Agent",
credits_used=exec_stats.cost,
execution_time=exec_stats.walltime,
graph_id=graph_exec.graph_id,
node_count=exec_stats.node_count,
).model_dump(),
)
cls.notification_service.queue_notification(event)
@classmethod
def _handle_low_balance_notif(
cls,
user_id: str,
graph_id: str,
exec_stats: GraphExecutionStats,
e: InsufficientBalanceError,
):
shortfall = e.balance - e.amount
metadata = cls.db_client.get_graph_metadata(graph_id)
base_url = (
settings.config.frontend_base_url or settings.config.platform_base_url
)
cls.notification_service.queue_notification(
NotificationEventDTO(
user_id=user_id,
type=NotificationType.LOW_BALANCE,
data=LowBalanceData(
current_balance=exec_stats.cost,
billing_page_link=f"{base_url}/profile/credits",
shortfall=shortfall,
agent_name=metadata.name if metadata else "Unknown Agent",
).model_dump(),
)
)
class ExecutionManager(AppService):
def __init__(self):
@@ -780,7 +893,8 @@ class ExecutionManager(AppService):
graph_id: str,
data: BlockInput,
user_id: str,
graph_version: int | None = None,
graph_version: Optional[int] = None,
preset_id: str | None = None,
) -> GraphExecutionEntry:
graph: GraphModel | None = self.db_client.get_graph(
graph_id=graph_id, user_id=user_id, version=graph_version
@@ -802,9 +916,9 @@ class ExecutionManager(AppService):
# Extract request input data, and assign it to the input pin.
if block.block_type == BlockType.INPUT:
name = node.input_default.get("name")
if name and name in data:
input_data = {"value": data[name]}
input_name = node.input_default.get("name")
if input_name and input_name in data:
input_data = {"value": data[input_name]}
# Extract webhook payload, and assign it to the input pin
webhook_payload_key = f"webhook_{node.webhook_id}_payload"
@@ -824,11 +938,17 @@ class ExecutionManager(AppService):
else:
nodes_input.append((node.id, input_data))
if not nodes_input:
raise ValueError(
"No starting nodes found for the graph, make sure an AgentInput or blocks with no inbound links are present as starting nodes."
)
graph_exec_id, node_execs = self.db_client.create_graph_execution(
graph_id=graph_id,
graph_version=graph.version,
nodes_input=nodes_input,
user_id=user_id,
preset_id=preset_id,
)
starting_node_execs = []
@@ -840,17 +960,15 @@ class ExecutionManager(AppService):
graph_id=node_exec.graph_id,
node_exec_id=node_exec.node_exec_id,
node_id=node_exec.node_id,
block_id=node_exec.block_id,
data=node_exec.input_data,
)
)
exec_update = self.db_client.update_execution_status(
node_exec.node_exec_id, ExecutionStatus.QUEUED, node_exec.input_data
)
self.db_client.send_execution_update(exec_update)
graph_exec = GraphExecutionEntry(
user_id=user_id,
graph_id=graph_id,
graph_version=graph_version or 0,
graph_exec_id=graph_exec_id,
start_node_execs=starting_node_execs,
)
@@ -946,6 +1064,13 @@ def get_db_client() -> "DatabaseManager":
return get_service_client(DatabaseManager)
@thread_cached
def get_notification_service() -> "NotificationManager":
from backend.notifications import NotificationManager
return get_service_client(NotificationManager)
@contextmanager
def synchronized(key: str, timeout: int = 60):
lock: RedisLock = redis.get_redis().lock(f"lock:{key}", timeout=timeout)

View File

@@ -63,7 +63,10 @@ def execute_graph(**kwargs):
try:
log(f"Executing recurring job for graph #{args.graph_id}")
get_execution_client().add_execution(
args.graph_id, args.input_data, args.user_id
graph_id=args.graph_id,
data=args.input_data,
user_id=args.user_id,
graph_version=args.graph_version,
)
except Exception as e:
logger.exception(f"Error executing graph {args.graph_id}: {e}")

View File

@@ -23,6 +23,15 @@ from backend.util.settings import Settings
settings = Settings()
# This is an overrride since ollama doesn't actually require an API key, but the creddential system enforces one be attached
ollama_credentials = APIKeyCredentials(
id="744fdc56-071a-4761-b5a5-0af0ce10a2b5",
provider="ollama",
api_key=SecretStr("FAKE_API_KEY"),
title="Use Credits for Ollama",
expires_at=None,
)
revid_credentials = APIKeyCredentials(
id="fdb7f412-f519-48d1-9b5f-d2f73d0e01fe",
provider="revid",
@@ -121,9 +130,47 @@ nvidia_credentials = APIKeyCredentials(
title="Use Credits for Nvidia",
expires_at=None,
)
screenshotone_credentials = APIKeyCredentials(
id="3b1bdd16-8818-4bc2-8cbb-b23f9a3439ed",
provider="screenshotone",
api_key=SecretStr(settings.secrets.screenshotone_api_key),
title="Use Credits for ScreenshotOne",
expires_at=None,
)
mem0_credentials = APIKeyCredentials(
id="ed55ac19-356e-4243-a6cb-bc599e9b716f",
provider="mem0",
api_key=SecretStr(settings.secrets.mem0_api_key),
title="Use Credits for Mem0",
expires_at=None,
)
apollo_credentials = APIKeyCredentials(
id="544c62b5-1d0f-4156-8fb4-9525f11656eb",
provider="apollo",
api_key=SecretStr(settings.secrets.apollo_api_key),
title="Use Credits for Apollo",
expires_at=None,
)
smartlead_credentials = APIKeyCredentials(
id="3bcdbda3-84a3-46af-8fdb-bfd2472298b8",
provider="smartlead",
api_key=SecretStr(settings.secrets.smartlead_api_key),
title="Use Credits for SmartLead",
expires_at=None,
)
zerobounce_credentials = APIKeyCredentials(
id="63a6e279-2dc2-448e-bf57-85776f7176dc",
provider="zerobounce",
api_key=SecretStr(settings.secrets.zerobounce_api_key),
title="Use Credits for ZeroBounce",
expires_at=None,
)
DEFAULT_CREDENTIALS = [
ollama_credentials,
revid_credentials,
ideogram_credentials,
replicate_credentials,
@@ -137,7 +184,12 @@ DEFAULT_CREDENTIALS = [
fal_credentials,
exa_credentials,
e2b_credentials,
mem0_credentials,
nvidia_credentials,
screenshotone_credentials,
apollo_credentials,
smartlead_credentials,
zerobounce_credentials,
]
@@ -169,6 +221,10 @@ class IntegrationCredentialsStore:
def get_all_creds(self, user_id: str) -> list[Credentials]:
users_credentials = self._get_user_integrations(user_id).credentials
all_credentials = users_credentials
# These will always be added
all_credentials.append(ollama_credentials)
# These will only be added if the API key is set
if settings.secrets.revid_api_key:
all_credentials.append(revid_credentials)
if settings.secrets.ideogram_api_key:
@@ -197,6 +253,16 @@ class IntegrationCredentialsStore:
all_credentials.append(e2b_credentials)
if settings.secrets.nvidia_api_key:
all_credentials.append(nvidia_credentials)
if settings.secrets.screenshotone_api_key:
all_credentials.append(screenshotone_credentials)
if settings.secrets.mem0_api_key:
all_credentials.append(mem0_credentials)
if settings.secrets.apollo_api_key:
all_credentials.append(apollo_credentials)
if settings.secrets.smartlead_api_key:
all_credentials.append(smartlead_credentials)
if settings.secrets.zerobounce_api_key:
all_credentials.append(zerobounce_credentials)
return all_credentials
def get_creds_by_id(self, user_id: str, credentials_id: str) -> Credentials | None:

View File

@@ -1,7 +1,10 @@
from typing import TYPE_CHECKING
from backend.integrations.oauth.todoist import TodoistOAuthHandler
from .github import GitHubOAuthHandler
from .google import GoogleOAuthHandler
from .linear import LinearOAuthHandler
from .notion import NotionOAuthHandler
from .twitter import TwitterOAuthHandler
@@ -17,6 +20,8 @@ HANDLERS_BY_NAME: dict["ProviderName", type["BaseOAuthHandler"]] = {
GoogleOAuthHandler,
NotionOAuthHandler,
TwitterOAuthHandler,
LinearOAuthHandler,
TodoistOAuthHandler,
]
}
# --8<-- [end:HANDLERS_BY_NAMEExample]

View File

@@ -0,0 +1,165 @@
import json
from typing import Optional
from urllib.parse import urlencode
from pydantic import SecretStr
from backend.blocks.linear._api import LinearAPIException
from backend.data.model import APIKeyCredentials, OAuth2Credentials
from backend.integrations.providers import ProviderName
from backend.util.request import requests
from .base import BaseOAuthHandler
class LinearOAuthHandler(BaseOAuthHandler):
"""
OAuth2 handler for Linear.
"""
PROVIDER_NAME = ProviderName.LINEAR
def __init__(self, client_id: str, client_secret: str, redirect_uri: str):
self.client_id = client_id
self.client_secret = client_secret
self.redirect_uri = redirect_uri
self.auth_base_url = "https://linear.app/oauth/authorize"
self.token_url = "https://api.linear.app/oauth/token" # Correct token URL
self.revoke_url = "https://api.linear.app/oauth/revoke"
def get_login_url(
self, scopes: list[str], state: str, code_challenge: Optional[str]
) -> str:
params = {
"client_id": self.client_id,
"redirect_uri": self.redirect_uri,
"response_type": "code", # Important: include "response_type"
"scope": ",".join(scopes), # Comma-separated, not space-separated
"state": state,
}
return f"{self.auth_base_url}?{urlencode(params)}"
def exchange_code_for_tokens(
self, code: str, scopes: list[str], code_verifier: Optional[str]
) -> OAuth2Credentials:
return self._request_tokens({"code": code, "redirect_uri": self.redirect_uri})
def revoke_tokens(self, credentials: OAuth2Credentials) -> bool:
if not credentials.access_token:
raise ValueError("No access token to revoke")
headers = {
"Authorization": f"Bearer {credentials.access_token.get_secret_value()}"
}
response = requests.post(self.revoke_url, headers=headers)
if not response.ok:
try:
error_data = response.json()
error_message = error_data.get("error", "Unknown error")
except json.JSONDecodeError:
error_message = response.text
raise LinearAPIException(
f"Failed to revoke Linear tokens ({response.status_code}): {error_message}",
response.status_code,
)
return True # Linear doesn't return JSON on successful revoke
def _refresh_tokens(self, credentials: OAuth2Credentials) -> OAuth2Credentials:
if not credentials.refresh_token:
raise ValueError(
"No refresh token available."
) # Linear uses non-expiring tokens
return self._request_tokens(
{
"refresh_token": credentials.refresh_token.get_secret_value(),
"grant_type": "refresh_token",
}
)
def _request_tokens(
self,
params: dict[str, str],
current_credentials: Optional[OAuth2Credentials] = None,
) -> OAuth2Credentials:
request_body = {
"client_id": self.client_id,
"client_secret": self.client_secret,
"grant_type": "authorization_code", # Ensure grant_type is correct
**params,
}
headers = {
"Content-Type": "application/x-www-form-urlencoded"
} # Correct header for token request
response = requests.post(self.token_url, data=request_body, headers=headers)
if not response.ok:
try:
error_data = response.json()
error_message = error_data.get("error", "Unknown error")
except json.JSONDecodeError:
error_message = response.text
raise LinearAPIException(
f"Failed to fetch Linear tokens ({response.status_code}): {error_message}",
response.status_code,
)
token_data = response.json()
# Note: Linear access tokens do not expire, so we set expires_at to None
new_credentials = OAuth2Credentials(
provider=self.PROVIDER_NAME,
title=current_credentials.title if current_credentials else None,
username=token_data.get("user", {}).get(
"name", "Unknown User"
), # extract name or set appropriate
access_token=token_data["access_token"],
scopes=token_data["scope"].split(
","
), # Linear returns comma-separated scopes
refresh_token=token_data.get(
"refresh_token"
), # Linear uses non-expiring tokens so this might be null
access_token_expires_at=None,
refresh_token_expires_at=None,
)
if current_credentials:
new_credentials.id = current_credentials.id
return new_credentials
def _request_username(self, access_token: str) -> Optional[str]:
# Use the LinearClient to fetch user details using GraphQL
from backend.blocks.linear._api import LinearClient
try:
linear_client = LinearClient(
APIKeyCredentials(
api_key=SecretStr(access_token),
title="temp",
provider=self.PROVIDER_NAME,
expires_at=None,
)
) # Temporary credentials for this request
query = """
query Viewer {
viewer {
name
}
}
"""
response = linear_client.query(query)
return response["viewer"]["name"]
except Exception as e: # Handle any errors
print(f"Error fetching username: {e}")
return None

View File

@@ -0,0 +1,81 @@
import urllib.parse
from typing import ClassVar, Optional
import requests
from backend.data.model import OAuth2Credentials, ProviderName
from backend.integrations.oauth.base import BaseOAuthHandler
class TodoistOAuthHandler(BaseOAuthHandler):
PROVIDER_NAME = ProviderName.TODOIST
DEFAULT_SCOPES: ClassVar[list[str]] = [
"task:add",
"data:read",
"data:read_write",
"data:delete",
"project:delete",
]
AUTHORIZE_URL = "https://todoist.com/oauth/authorize"
TOKEN_URL = "https://todoist.com/oauth/access_token"
def __init__(self, client_id: str, client_secret: str, redirect_uri: str):
self.client_id = client_id
self.client_secret = client_secret
self.redirect_uri = redirect_uri
def get_login_url(
self, scopes: list[str], state: str, code_challenge: Optional[str]
) -> str:
params = {
"client_id": self.client_id,
"scope": ",".join(self.DEFAULT_SCOPES),
"state": state,
}
return f"{self.AUTHORIZE_URL}?{urllib.parse.urlencode(params)}"
def exchange_code_for_tokens(
self, code: str, scopes: list[str], code_verifier: Optional[str]
) -> OAuth2Credentials:
"""Exchange authorization code for access tokens"""
data = {
"client_id": self.client_id,
"client_secret": self.client_secret,
"code": code,
"redirect_uri": self.redirect_uri,
}
response = requests.post(self.TOKEN_URL, data=data)
response.raise_for_status()
tokens = response.json()
response = requests.post(
"https://api.todoist.com/sync/v9/sync",
headers={"Authorization": f"Bearer {tokens['access_token']}"},
data={"sync_token": "*", "resource_types": '["user"]'},
)
response.raise_for_status()
user_info = response.json()
user_email = user_info["user"].get("email")
return OAuth2Credentials(
provider=self.PROVIDER_NAME,
title=None,
username=user_email,
access_token=tokens["access_token"],
refresh_token=None,
access_token_expires_at=None,
refresh_token_expires_at=None,
scopes=scopes,
)
def _refresh_tokens(self, credentials: OAuth2Credentials) -> OAuth2Credentials:
# Todoist does not support token refresh
return credentials
def revoke_tokens(self, credentials: OAuth2Credentials) -> bool:
return False

View File

@@ -4,6 +4,7 @@ from enum import Enum
# --8<-- [start:ProviderName]
class ProviderName(str, Enum):
ANTHROPIC = "anthropic"
APOLLO = "apollo"
COMPASS = "compass"
DISCORD = "discord"
D_ID = "d_id"
@@ -17,7 +18,9 @@ class ProviderName(str, Enum):
HUBSPOT = "hubspot"
IDEOGRAM = "ideogram"
JINA = "jina"
LINEAR = "linear"
MEDIUM = "medium"
MEM0 = "mem0"
NOTION = "notion"
NVIDIA = "nvidia"
OLLAMA = "ollama"
@@ -25,9 +28,15 @@ class ProviderName(str, Enum):
OPENWEATHERMAP = "openweathermap"
OPEN_ROUTER = "open_router"
PINECONE = "pinecone"
REDDIT = "reddit"
REPLICATE = "replicate"
REVID = "revid"
SCREENSHOTONE = "screenshotone"
SLANT3D = "slant3d"
SMARTLEAD = "smartlead"
SMTP = "smtp"
TWITTER = "twitter"
TODOIST = "todoist"
UNREAL_SPEECH = "unreal_speech"
ZEROBOUNCE = "zerobounce"
# --8<-- [end:ProviderName]

View File

@@ -168,7 +168,7 @@ class BaseWebhooksManager(ABC, Generic[WT]):
id = str(uuid4())
secret = secrets.token_hex(32)
provider_name = self.PROVIDER_NAME
provider_name: ProviderName = self.PROVIDER_NAME
ingress_url = webhook_ingress_url(provider_name=provider_name, webhook_id=id)
if register:
if not credentials:

View File

@@ -1,7 +1,7 @@
import logging
from backend.data import integrations
from backend.data.model import APIKeyCredentials, Credentials, OAuth2Credentials
from backend.data.model import Credentials
from ._base import WT, BaseWebhooksManager
@@ -25,6 +25,6 @@ class ManualWebhookManagerBase(BaseWebhooksManager[WT]):
async def _deregister_webhook(
self,
webhook: integrations.Webhook,
credentials: OAuth2Credentials | APIKeyCredentials,
credentials: Credentials,
) -> None:
pass

View File

@@ -67,7 +67,7 @@ class GithubWebhooksManager(BaseWebhooksManager):
headers = {
**self.GITHUB_API_DEFAULT_HEADERS,
"Authorization": credentials.bearer(),
"Authorization": credentials.auth_header(),
}
repo, github_hook_id = webhook.resource, webhook.provider_webhook_id
@@ -96,7 +96,7 @@ class GithubWebhooksManager(BaseWebhooksManager):
headers = {
**self.GITHUB_API_DEFAULT_HEADERS,
"Authorization": credentials.bearer(),
"Authorization": credentials.auth_header(),
}
webhook_data = {
"name": "web",
@@ -142,7 +142,7 @@ class GithubWebhooksManager(BaseWebhooksManager):
headers = {
**self.GITHUB_API_DEFAULT_HEADERS,
"Authorization": credentials.bearer(),
"Authorization": credentials.auth_header(),
}
if webhook_type == self.WebhookType.REPO:

View File

@@ -0,0 +1,5 @@
from .notifications import NotificationManager
__all__ = [
"NotificationManager",
]

View File

@@ -0,0 +1,103 @@
import logging
import pathlib
from postmarker.core import PostmarkClient
from postmarker.models.emails import EmailManager
from prisma.enums import NotificationType
from pydantic import BaseModel
from backend.data.notifications import (
NotificationEventModel,
NotificationTypeOverride,
T_co,
)
from backend.util.settings import Settings
from backend.util.text import TextFormatter
logger = logging.getLogger(__name__)
settings = Settings()
# The following is a workaround to get the type checker to recognize the EmailManager type
# This is a temporary solution and should be removed once the Postmark library is updated
# to support type annotations.
class TypedPostmarkClient(PostmarkClient):
emails: EmailManager
class Template(BaseModel):
subject_template: str
body_template: str
base_template: str
class EmailSender:
def __init__(self):
if settings.secrets.postmark_server_api_token:
self.postmark = TypedPostmarkClient(
server_token=settings.secrets.postmark_server_api_token
)
else:
logger.warning(
"Postmark server API token not found, email sending disabled"
)
self.postmark = None
self.formatter = TextFormatter()
def send_templated(
self,
notification: NotificationType,
user_email: str,
data: NotificationEventModel[T_co] | list[NotificationEventModel[T_co]],
):
"""Send an email to a user using a template pulled from the notification type"""
if not self.postmark:
logger.warning("Postmark client not initialized, email not sent")
return
template = self._get_template(notification)
try:
subject, full_message = self.formatter.format_email(
base_template=template.base_template,
subject_template=template.subject_template,
content_template=template.body_template,
data=data,
unsubscribe_link="https://platform.agpt.co/profile/settings",
)
except Exception as e:
logger.error(f"Error formatting full message: {e}")
raise e
self._send_email(user_email, subject, full_message)
def _get_template(self, notification: NotificationType):
# convert the notification type to a notification type override
notification_type_override = NotificationTypeOverride(notification)
# find the template in templates/name.html (the .template returns with the .html)
template_path = f"templates/{notification_type_override.template}.jinja2"
logger.debug(
f"Template full path: {pathlib.Path(__file__).parent / template_path}"
)
base_template_path = "templates/base.html.jinja2"
with open(pathlib.Path(__file__).parent / base_template_path, "r") as file:
base_template = file.read()
with open(pathlib.Path(__file__).parent / template_path, "r") as file:
template = file.read()
return Template(
subject_template=notification_type_override.subject,
body_template=template,
base_template=base_template,
)
def _send_email(self, user_email: str, subject: str, body: str):
if not self.postmark:
logger.warning("Email tried to send without postmark configured")
return
logger.debug(f"Sending email to {user_email} with subject {subject}")
self.postmark.emails.send(
From=settings.config.postmark_sender_email,
To=user_email,
Subject=subject,
HtmlBody=body,
)

View File

@@ -0,0 +1,275 @@
import logging
import time
from typing import Callable
import aio_pika
from aio_pika.exceptions import QueueEmpty
from prisma.enums import NotificationType
from pydantic import BaseModel
from backend.data.notifications import (
NotificationEventDTO,
NotificationEventModel,
NotificationResult,
QueueType,
get_data_type,
)
from backend.data.rabbitmq import Exchange, ExchangeType, Queue, RabbitMQConfig
from backend.data.user import (
get_user_email_by_id,
get_user_email_verification,
get_user_notification_preference,
)
from backend.notifications.email import EmailSender
from backend.util.service import AppService, expose
from backend.util.settings import Settings
logger = logging.getLogger(__name__)
settings = Settings()
class NotificationEvent(BaseModel):
event: NotificationEventDTO
model: NotificationEventModel
def create_notification_config() -> RabbitMQConfig:
"""Create RabbitMQ configuration for notifications"""
notification_exchange = Exchange(name="notifications", type=ExchangeType.TOPIC)
dead_letter_exchange = Exchange(name="dead_letter", type=ExchangeType.TOPIC)
queues = [
# Main notification queues
Queue(
name="immediate_notifications",
exchange=notification_exchange,
routing_key="notification.immediate.#",
arguments={
"x-dead-letter-exchange": dead_letter_exchange.name,
"x-dead-letter-routing-key": "failed.immediate",
},
),
Queue(
name="admin_notifications",
exchange=notification_exchange,
routing_key="notification.admin.#",
arguments={
"x-dead-letter-exchange": dead_letter_exchange.name,
"x-dead-letter-routing-key": "failed.admin",
},
),
# Failed notifications queue
Queue(
name="failed_notifications",
exchange=dead_letter_exchange,
routing_key="failed.#",
),
]
return RabbitMQConfig(
exchanges=[
notification_exchange,
dead_letter_exchange,
],
queues=queues,
)
class NotificationManager(AppService):
"""Service for handling notifications with batching support"""
def __init__(self):
super().__init__()
self.use_db = True
self.rabbitmq_config = create_notification_config()
self.running = True
self.email_sender = EmailSender()
@classmethod
def get_port(cls) -> int:
return settings.config.notification_service_port
def get_routing_key(self, event: NotificationEventModel) -> str:
"""Get the appropriate routing key for an event"""
if event.strategy == QueueType.IMMEDIATE:
return f"notification.immediate.{event.type.value}"
elif event.strategy == QueueType.BACKOFF:
return f"notification.backoff.{event.type.value}"
elif event.strategy == QueueType.ADMIN:
return f"notification.admin.{event.type.value}"
elif event.strategy == QueueType.HOURLY:
return f"notification.hourly.{event.type.value}"
elif event.strategy == QueueType.DAILY:
return f"notification.daily.{event.type.value}"
return f"notification.{event.type.value}"
@expose
def queue_notification(self, event: NotificationEventDTO) -> NotificationResult:
"""Queue a notification - exposed method for other services to call"""
try:
logger.info(f"Received Request to queue {event=}")
# Workaround for not being able to serialize generics over the expose bus
parsed_event = NotificationEventModel[
get_data_type(event.type)
].model_validate(event.model_dump())
routing_key = self.get_routing_key(parsed_event)
message = parsed_event.model_dump_json()
logger.info(f"Received Request to queue {message=}")
exchange = "notifications"
# Publish to RabbitMQ
self.run_and_wait(
self.rabbit.publish_message(
routing_key=routing_key,
message=message,
exchange=next(
ex for ex in self.rabbit_config.exchanges if ex.name == exchange
),
)
)
return NotificationResult(
success=True,
message=f"Notification queued with routing key: {routing_key}",
)
except Exception as e:
logger.exception(f"Error queueing notification: {e}")
return NotificationResult(success=False, message=str(e))
def _should_email_user_based_on_preference(
self, user_id: str, event_type: NotificationType
) -> bool:
"""Check if a user wants to receive a notification based on their preferences and email verification status"""
validated_email = self.run_and_wait(get_user_email_verification(user_id))
preference = self.run_and_wait(
get_user_notification_preference(user_id)
).preferences.get(event_type, True)
# only if both are true, should we email this person
return validated_email and preference
def _parse_message(self, message: str) -> NotificationEvent | None:
try:
event = NotificationEventDTO.model_validate_json(message)
model = NotificationEventModel[
get_data_type(event.type)
].model_validate_json(message)
return NotificationEvent(event=event, model=model)
except Exception as e:
logger.error(f"Error parsing message due to non matching schema {e}")
return None
def _process_admin_message(self, message: str) -> bool:
"""Process a single notification, sending to an admin, returning whether to put into the failed queue"""
try:
parsed = self._parse_message(message)
if not parsed:
return False
event = parsed.event
model = parsed.model
logger.debug(f"Processing notification for admin: {model}")
recipient_email = settings.config.refund_notification_email
self.email_sender.send_templated(event.type, recipient_email, model)
return True
except Exception as e:
logger.exception(f"Error processing notification: {e}")
return False
def _process_immediate(self, message: str) -> bool:
"""Process a single notification immediately, returning whether to put into the failed queue"""
try:
parsed = self._parse_message(message)
if not parsed:
return False
event = parsed.event
model = parsed.model
logger.debug(f"Processing immediate notification: {model}")
recipient_email = self.run_and_wait(get_user_email_by_id(event.user_id))
if not recipient_email:
logger.error(f"User email not found for user {event.user_id}")
return False
should_send = self._should_email_user_based_on_preference(
event.user_id, event.type
)
if not should_send:
logger.debug(
f"User {event.user_id} does not want to receive {event.type} notifications"
)
return True
self.email_sender.send_templated(event.type, recipient_email, model)
return True
except Exception as e:
logger.exception(f"Error processing notification: {e}")
return False
def _run_queue(
self,
queue: aio_pika.abc.AbstractQueue,
process_func: Callable[[str], bool],
error_queue_name: str,
):
message: aio_pika.abc.AbstractMessage | None = None
try:
# This parameter "no_ack" is named like shit, think of it as "auto_ack"
message = self.run_and_wait(queue.get(timeout=1.0, no_ack=False))
result = process_func(message.body.decode())
if result:
self.run_and_wait(message.ack())
else:
self.run_and_wait(message.reject(requeue=False))
except QueueEmpty:
logger.debug(f"Queue {error_queue_name} empty")
except Exception as e:
if message:
logger.error(
f"Error in notification service loop, message rejected {e}"
)
self.run_and_wait(message.reject(requeue=False))
else:
logger.error(
f"Error in notification service loop, message unable to be rejected, and will have to be manually removed to free space in the queue: {e}"
)
def run_service(self):
logger.info(f"[{self.service_name}] Started notification service")
# Set up queue consumers
channel = self.run_and_wait(self.rabbit.get_channel())
immediate_queue = self.run_and_wait(
channel.get_queue("immediate_notifications")
)
admin_queue = self.run_and_wait(channel.get_queue("admin_notifications"))
while self.running:
try:
self._run_queue(
queue=immediate_queue,
process_func=self._process_immediate,
error_queue_name="immediate_notifications",
)
self._run_queue(
queue=admin_queue,
process_func=self._process_admin_message,
error_queue_name="admin_notifications",
)
time.sleep(0.1)
except QueueEmpty as e:
logger.debug(f"Queue empty: {e}")
except Exception as e:
logger.error(f"Error in notification service loop: {e}")
def cleanup(self):
"""Cleanup service resources"""
self.running = False
super().cleanup()

View File

@@ -0,0 +1,96 @@
{# Agent Run #}
{# Template variables:
data.agent_name: the name of the agent
data.credits_used: the number of credits used by the agent
data.node_count: the number of nodes the agent ran on
data.execution_time: the time it took to run the agent
data.graph_id: the id of the graph the agent ran on
data.outputs: the list of outputs of the agent
#}
<p style="
font-family: 'Poppins', sans-serif;
color: #070629;
font-size: 16px;
line-height: 165%;
margin-top: 0;
margin-bottom: 10px;
">
Your agent, <strong>{{ data.agent_name }}</strong>, has completed its run!
</p>
<p style="
font-family: 'Poppins', sans-serif;
color: #070629;
font-size: 16px;
line-height: 165%;
margin-top: 0;
margin-bottom: 20px;
padding-left: 20px;
">
<p style="margin-bottom: 10px;"><strong>Time Taken:</strong> {{ data.execution_time | int }} seconds</p>
<p style="margin-bottom: 10px;"><strong>Nodes Used:</strong> {{ data.node_count }}</p>
<p style="margin-bottom: 10px;"><strong>Cost:</strong> ${{ "{:.2f}".format((data.credits_used|float)/100) }}</p>
</p>
{% if data.outputs and data.outputs|length > 0 %}
<div style="
margin-left: 15px;
margin-bottom: 20px;
">
<p style="
font-family: 'Poppins', sans-serif;
color: #070629;
font-weight: 600;
font-size: 16px;
margin-bottom: 10px;
">
Results:
</p>
{% for output in data.outputs %}
<div style="
margin-left: 15px;
margin-bottom: 15px;
">
<p style="
font-family: 'Poppins', sans-serif;
color: #5D23BB;
font-weight: 500;
font-size: 16px;
margin-top: 0;
margin-bottom: 8px;
">
{{ output.name }}
</p>
{% for key, value in output.items() %}
{% if key != 'name' %}
<div style="
margin-left: 15px;
background-color: #f5f5ff;
padding: 8px 12px;
border-radius: 4px;
font-family: 'Roboto Mono', monospace;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: break-word;
max-width: 100%;
overflow-x: auto;
margin-top: 5px;
margin-bottom: 10px;
line-height: 1.4;
">
{% if value is iterable and value is not string %}
{% if value|length == 1 %}
{{ value[0] }}
{% else %}
[{% for item in value %}{{ item }}{% if not loop.last %}, {% endif %}{% endfor %}]
{% endif %}
{% else %}
{{ value }}
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
{% endif %}

View File

@@ -0,0 +1,343 @@
{# Base Template #}
{# Template variables:
data.message: the message to display in the email
data.title: the title of the email
data.unsubscribe_link: the link to unsubscribe from the email
#}
<!doctype html>
<html lang="ltr" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
<meta name="x-apple-disable-message-reformatting">
<!--[if !mso]>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<![endif]-->
<!--[if mso]>
<style>
* { font-family: sans-serif !important; }
</style>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<style type="text/css">
/* RESET STYLES */
html,
body {
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
height: 100% !important;
}
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
.document {
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
}
img {
border: 0;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
table {
border-collapse: collapse;
}
table,
td {
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
body,
table,
td,
a {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
h1,
h2,
h3,
h4,
h5,
p {
margin: 0;
word-break: break-word;
}
/* iOS BLUE LINKS */
a[x-apple-data-detectors] {
color: inherit !important;
text-decoration: none !important;
font-size: inherit !important;
font-family: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
}
/* ANDROID CENTER FIX */
div[style*="margin: 16px 0;"] {
margin: 0 !important;
}
/* MEDIA QUERIES */
@media all and (max-width:639px) {
.wrapper {
width: 100% !important;
}
.container {
width: 100% !important;
min-width: 100% !important;
padding: 0 !important;
}
.row {
padding-left: 20px !important;
padding-right: 20px !important;
}
.col-mobile {
width: 20px !important;
}
.col {
display: block !important;
width: 100% !important;
}
.mobile-center {
text-align: center !important;
float: none !important;
}
.mobile-mx-auto {
margin: 0 auto !important;
float: none !important;
}
.mobile-left {
text-align: center !important;
float: left !important;
}
.mobile-hide {
display: none !important;
}
.img {
width: 100% !important;
height: auto !important;
}
.ml-btn {
width: 100% !important;
max-width: 100% !important;
}
.ml-btn-container {
width: 100% !important;
max-width: 100% !important;
}
}
</style>
<style type="text/css">
@import url("https://assets.mlcdn.com/fonts-v2.css?version=1729862");
</style>
<style type="text/css">
@media screen {
body {
font-family: 'Poppins', sans-serif;
}
}
</style>
<title>{{data.title}}</title>
</head>
<body style="margin: 0 !important; padding: 0 !important; background-color:#070629;">
<div class="document" role="article" aria-roledescription="email" aria-label lang dir="ltr"
style="background-color:#070629; line-height: 100%; font-size:medium; font-size:max(16px, 1rem);">
<!-- Main Content -->
<table width="100%" align="center" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="background" bgcolor="#070629" align="center" valign="top" style="padding: 0 8px;">
<!-- Email Content -->
<table class="container" align="center" width="640" cellpadding="0" cellspacing="0" border="0"
style="max-width: 640px;">
<tr>
<td align="center">
<!-- Logo Section -->
<table class="container ml-4 ml-default-border" width="640" bgcolor="#E2ECFD" align="center" border="0"
cellspacing="0" cellpadding="0" style="width: 640px; min-width: 640px;">
<tr>
<td class="ml-default-border container" height="40" style="line-height: 40px; min-width: 640px;">
</td>
</tr>
<tr>
<td>
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="row" align="center" style="padding: 0 50px;">
<img
src="https://storage.mlcdn.com/account_image/597379/8QJ8kOjXakVvfe1kJLY2wWCObU1mp5EiDLfBlbQa.png"
border="0" alt="" width="120" class="logo"
style="max-width: 120px; display: inline-block;">
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Main Content Section -->
<table class="container ml-6 ml-default-border" width="640" bgcolor="#E2ECFD" align="center" border="0"
cellspacing="0" cellpadding="0" style="color: #070629; width: 640px; min-width: 640px;">
<tr>
<td class="row" style="padding: 0 50px;">
{{data.message|safe}}
</td>
</tr>
</table>
<!-- Signature Section -->
<table class="container ml-8 ml-default-border" width="640" bgcolor="#E2ECFD" align="center" border="0"
cellspacing="0" cellpadding="0" style="color: #070629; width: 640px; min-width: 640px;">
<tr>
<td class="row mobile-center" align="left" style="padding: 0 50px;">
<table class="ml-8 wrapper" border="0" cellspacing="0" cellpadding="0"
style="color: #070629; text-align: left;">
<tr>
<td class="col center mobile-center" align>
<p
style="font-family: 'Poppins', sans-serif; color: #070629; font-size: 16px; line-height: 165%; margin-top: 0; margin-bottom: 0;">
Thank you for being a part of the AutoGPT community! Join the conversation on our Discord <a href="https://discord.gg/autogpt" style="color: #4285F4; text-decoration: underline;">here</a> and share your thoughts with us anytime.
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Footer Section -->
<table class="container ml-10 ml-default-border" width="640" bgcolor="#ffffff" align="center" border="0"
cellspacing="0" cellpadding="0" style="width: 640px; min-width: 640px;">
<tr>
<td class="row" style="padding: 0 50px;">
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!-- Footer Content -->
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="col" align="left" valign="middle" width="120">
<img
src="https://storage.mlcdn.com/account_image/597379/8QJ8kOjXakVvfe1kJLY2wWCObU1mp5EiDLfBlbQa.png"
border="0" alt="" width="120" class="logo"
style="max-width: 120px; display: inline-block;">
</td>
<td class="col" width="40" height="30" style="line-height: 30px;"></td>
<td class="col mobile-left" align="right" valign="middle" width="250">
<table role="presentation" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" valign="middle" width="18" style="padding: 0 5px 0 0;">
<a href="https://x.com/auto_gpt" target="blank" style="text-decoration: none;">
<img
src="https://assets.mlcdn.com/ml/images/icons/default/rounded_corners/black/x.png"
width="18" alt="x">
</a>
</td>
<td align="center" valign="middle" width="18" style="padding: 0 5px;">
<a href="https://discord.gg/autogpt" target="blank"
style="text-decoration: none;">
<img
src="https://assets.mlcdn.com/ml/images/icons/default/rounded_corners/black/discord.png"
width="18" alt="discord">
</a>
</td>
<td align="center" valign="middle" width="18" style="padding: 0 0 0 5px;">
<a href="https://agpt.co/" target="blank" style="text-decoration: none;">
<img
src="https://assets.mlcdn.com/ml/images/icons/default/rounded_corners/black/website.png"
width="18" alt="website">
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="text-align: left!important;">
<h5
style="font-family: 'Poppins', sans-serif; color: #070629; font-size: 15px; line-height: 125%; font-weight: bold; font-style: normal; text-decoration: none; margin-bottom: 6px;">
AutoGPT
</h5>
</td>
</tr>
<tr>
<td align="center" style="text-align: left!important;">
<p
style="font-family: 'Poppins', sans-serif; color: #070629; font-size: 14px; line-height: 150%; display: inline-block; margin-bottom: 0;">
3rd Floor 1 Ashley Road, Cheshire, United Kingdom, WA14 2DT, Altrincham<br>United Kingdom
</p>
</td>
</tr>
<tr>
<td height="8" style="line-height: 8px;"></td>
</tr>
<tr>
<td align="left" style="text-align: left!important;">
<p
style="font-family: 'Poppins', sans-serif; color: #070629; font-size: 14px; line-height: 150%; display: inline-block; margin-bottom: 0;">
You received this email because you signed up on our website.</p>
</td>
</tr>
<tr>
<td height="1" style="line-height: 12px;"></td>
</tr>
<tr>
<td align="left">
<p
style="font-family: 'Poppins', sans-serif; color: #070629; font-size: 14px; line-height: 150%; display: inline-block; margin-bottom: 0;">
<a href="{{data.unsubscribe_link}}"
style="color: #4285F4; font-weight: normal; font-style: normal; text-decoration: underline;">Unsubscribe</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More