Commit Graph

39 Commits (858dc7adc3d2b2ff174ea34a2572ae74b30c206f)

Author SHA1 Message Date
Zamil Majdy a646e60d2f
fix(backend): Added locking status check before releasing to avoid releasing timing out lock (#9135)
Exception:
```
nid:ce829f66-14b0-4bd3-b748-791e46666cb6|-] Failed node execution ce829f66-14b0-4bd3-b748-791e46666cb6: Cannot release an unlocked lock {}\u001b[0m",
Traceback (most recent call last):\n  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 145, in _locked\n    yield\n  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 115, in acquire\n    lock = self._acquire_lock(user_id, credentials_id)",
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 139, in _acquire_lock",
    return self._locks.acquire(key)",
           ^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/autogpt_libs/autogpt_libs/utils/synchronize.py\", line 44, in acquire",
    lock.acquire()",
  File \"/usr/local/lib/python3.11/site-packages/redis/lock.py\", line 218, in acquire",
    mod_time.sleep(sleep)",
  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 471, in <lambda>",
    signal.SIGTERM, lambda _, __: cls.on_node_executor_sigterm()",
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 498, in on_node_executor_sigterm",
    sys.exit(0)",
SystemExit: 0",
During handling of the above exception, another exception occurred:",
Traceback (most recent call last):\n  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 539, in _on_node_execution\n    for execution in execute_node(\n  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 175, in execute_node\n    credentials, creds_lock = creds_manager.acquire(user_id, credentials_meta.id)",
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 114, in acquire",
    with self._locked(user_id, credentials_id, \"!time_sensitive\"):",
  File \"/usr/local/lib/python3.11/contextlib.py\", line 158, in __exit__",
    self.gen.throw(typ, value, traceback)",
  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 147, in _locked",
    lock.release()",
  File \"/usr/local/lib/python3.11/site-packages/redis/lock.py\", line 254, in release",
    raise LockError(\"Cannot release an unlocked lock\", lock_name=self.name)",
redis.exceptions.LockError: Cannot release an unlocked lock",
```

### Changes 🏗️

```
try:
   lock.acquire()
   ...
finally:
   lock.release()
```

pattern can cause an error where the lock is already released due to
timeout.

The scope of the change is to manually check the lock status before
releasing.


### 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>
2024-12-31 08:48:04 +01:00
SwiftyOS 41be88f0bf Update dependencies 2024-12-17 11:07:13 +01:00
dependabot[bot] 59f52fb656
build(deps-dev): bump ruff from 0.8.2 to 0.8.3 in /autogpt_platform/autogpt_libs in the development-dependencies group (#9008)
Bumps the development-dependencies group in
/autogpt_platform/autogpt_libs with 1 update:
[ruff](https://github.com/astral-sh/ruff).

Updates `ruff` from 0.8.2 to 0.8.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.8.3</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>Fix fstring formatting removing overlong implicit concatenated
string in expression part (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14811">#14811</a>)</li>
<li>[<code>airflow</code>] Add fix to remove deprecated keyword
arguments (<code>AIR302</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14887">#14887</a>)</li>
<li>[<code>airflow</code>]: Extend rule to include deprecated names for
Airflow 3.0 (<code>AIR302</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14765">#14765</a>
and <a
href="https://redirect.github.com/astral-sh/ruff/pull/14804">#14804</a>)</li>
<li>[<code>flake8-bugbear</code>] Improve error messages for
<code>except*</code> (<code>B025</code>, <code>B029</code>,
<code>B030</code>, <code>B904</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14815">#14815</a>)</li>
<li>[<code>flake8-bugbear</code>] <code>itertools.batched()</code>
without explicit <code>strict</code> (<code>B911</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14408">#14408</a>)</li>
<li>[<code>flake8-use-pathlib</code>] Dotless suffix passed to
<code>Path.with_suffix()</code> (<code>PTH210</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14779">#14779</a>)</li>
<li>[<code>pylint</code>] Include parentheses and multiple comparators
in check for <code>boolean-chained-comparison</code>
(<code>PLR1716</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14781">#14781</a>)</li>
<li>[<code>ruff</code>] Do not simplify <code>round()</code> calls
(<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14832">#14832</a>)</li>
<li>[<code>ruff</code>] Don't emit <code>used-dummy-variable</code> on
function parameters (<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14818">#14818</a>)</li>
<li>[<code>ruff</code>] Implement <code>if-key-in-dict-del</code>
(<code>RUF051</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14553">#14553</a>)</li>
<li>[<code>ruff</code>] Mark autofix for <code>RUF052</code> as always
unsafe (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14824">#14824</a>)</li>
<li>[<code>ruff</code>] Teach autofix for
<code>used-dummy-variable</code> about TypeVars etc.
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14819">#14819</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Offer unsafe autofix for
<code>no-explicit-stacklevel</code> (<code>B028</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14829">#14829</a>)</li>
<li>[<code>flake8-pyi</code>] Skip all type definitions in
<code>string-or-bytes-too-long</code> (<code>PYI053</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14797">#14797</a>)</li>
<li>[<code>pyupgrade</code>] Do not report when a UTF-8 comment is
followed by a non-UTF-8 one (<code>UP009</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14728">#14728</a>)</li>
<li>[<code>pyupgrade</code>] Mark fixes for
<code>convert-typed-dict-functional-to-class</code> and
<code>convert-named-tuple-functional-to-class</code> as unsafe if they
will remove comments (<code>UP013</code>, <code>UP014</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14842">#14842</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Raise syntax error for mixing <code>except</code> and
<code>except*</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14895">#14895</a>)</li>
<li>[<code>flake8-bugbear</code>] Fix <code>B028</code> to allow
<code>stacklevel</code> to be explicitly assigned as a positional
argument (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14868">#14868</a>)</li>
<li>[<code>flake8-bugbear</code>] Skip <code>B028</code> if
<code>warnings.warn</code> is called with <code>*args</code> or
<code>**kwargs</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14870">#14870</a>)</li>
<li>[<code>flake8-comprehensions</code>] Skip iterables with named
expressions in <code>unnecessary-map</code> (<code>C417</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14827">#14827</a>)</li>
<li>[<code>flake8-pyi</code>] Also remove <code>self</code> and
<code>cls</code>'s annotation (<code>PYI034</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14801">#14801</a>)</li>
<li>[<code>flake8-pytest-style</code>] Fix
<code>pytest-parametrize-names-wrong-type</code> (<code>PT006</code>) to
edit both <code>argnames</code> and <code>argvalues</code> if both of
them are single-element tuples/lists (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14699">#14699</a>)</li>
<li>[<code>perflint</code>] Improve autofix for <code>PERF401</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14369">#14369</a>)</li>
<li>[<code>pylint</code>] Fix <code>PLW1508</code> false positive for
default string created via a mult operation (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14841">#14841</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/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</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/UnknownPlatypus"><code>@​UnknownPlatypus</code></a></li>
<li><a href="https://github.com/carljm"><code>@​carljm</code></a></li>
<li><a href="https://github.com/cclauss"><code>@​cclauss</code></a></li>
<li><a
href="https://github.com/dcreager"><code>@​dcreager</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>
</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.8.3</h2>
<h3>Preview features</h3>
<ul>
<li>Fix fstring formatting removing overlong implicit concatenated
string in expression part (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14811">#14811</a>)</li>
<li>[<code>airflow</code>] Add fix to remove deprecated keyword
arguments (<code>AIR302</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14887">#14887</a>)</li>
<li>[<code>airflow</code>]: Extend rule to include deprecated names for
Airflow 3.0 (<code>AIR302</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14765">#14765</a>
and <a
href="https://redirect.github.com/astral-sh/ruff/pull/14804">#14804</a>)</li>
<li>[<code>flake8-bugbear</code>] Improve error messages for
<code>except*</code> (<code>B025</code>, <code>B029</code>,
<code>B030</code>, <code>B904</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14815">#14815</a>)</li>
<li>[<code>flake8-bugbear</code>] <code>itertools.batched()</code>
without explicit <code>strict</code> (<code>B911</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14408">#14408</a>)</li>
<li>[<code>flake8-use-pathlib</code>] Dotless suffix passed to
<code>Path.with_suffix()</code> (<code>PTH210</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14779">#14779</a>)</li>
<li>[<code>pylint</code>] Include parentheses and multiple comparators
in check for <code>boolean-chained-comparison</code>
(<code>PLR1716</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14781">#14781</a>)</li>
<li>[<code>ruff</code>] Do not simplify <code>round()</code> calls
(<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14832">#14832</a>)</li>
<li>[<code>ruff</code>] Don't emit <code>used-dummy-variable</code> on
function parameters (<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14818">#14818</a>)</li>
<li>[<code>ruff</code>] Implement <code>if-key-in-dict-del</code>
(<code>RUF051</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14553">#14553</a>)</li>
<li>[<code>ruff</code>] Mark autofix for <code>RUF052</code> as always
unsafe (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14824">#14824</a>)</li>
<li>[<code>ruff</code>] Teach autofix for
<code>used-dummy-variable</code> about TypeVars etc.
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14819">#14819</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Offer unsafe autofix for
<code>no-explicit-stacklevel</code> (<code>B028</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14829">#14829</a>)</li>
<li>[<code>flake8-pyi</code>] Skip all type definitions in
<code>string-or-bytes-too-long</code> (<code>PYI053</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14797">#14797</a>)</li>
<li>[<code>pyupgrade</code>] Do not report when a UTF-8 comment is
followed by a non-UTF-8 one (<code>UP009</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14728">#14728</a>)</li>
<li>[<code>pyupgrade</code>] Mark fixes for
<code>convert-typed-dict-functional-to-class</code> and
<code>convert-named-tuple-functional-to-class</code> as unsafe if they
will remove comments (<code>UP013</code>, <code>UP014</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14842">#14842</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Raise syntax error for mixing <code>except</code> and
<code>except*</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14895">#14895</a>)</li>
<li>[<code>flake8-bugbear</code>] Fix <code>B028</code> to allow
<code>stacklevel</code> to be explicitly assigned as a positional
argument (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14868">#14868</a>)</li>
<li>[<code>flake8-bugbear</code>] Skip <code>B028</code> if
<code>warnings.warn</code> is called with <code>*args</code> or
<code>**kwargs</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14870">#14870</a>)</li>
<li>[<code>flake8-comprehensions</code>] Skip iterables with named
expressions in <code>unnecessary-map</code> (<code>C417</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14827">#14827</a>)</li>
<li>[<code>flake8-pyi</code>] Also remove <code>self</code> and
<code>cls</code>'s annotation (<code>PYI034</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14801">#14801</a>)</li>
<li>[<code>flake8-pytest-style</code>] Fix
<code>pytest-parametrize-names-wrong-type</code> (<code>PT006</code>) to
edit both <code>argnames</code> and <code>argvalues</code> if both of
them are single-element tuples/lists (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14699">#14699</a>)</li>
<li>[<code>perflint</code>] Improve autofix for <code>PERF401</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14369">#14369</a>)</li>
<li>[<code>pylint</code>] Fix <code>PLW1508</code> false positive for
default string created via a mult operation (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14841">#14841</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="53f2d72e02"><code>53f2d72</code></a>
Revert certain double quotes from workflow shell script (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14939">#14939</a>)</li>
<li><a
href="3629cbf35a"><code>3629cbf</code></a>
Use double quotes consistently for shell scripts (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14938">#14938</a>)</li>
<li><a
href="37f433814c"><code>37f4338</code></a>
Bump version to 0.8.3 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14937">#14937</a>)</li>
<li><a
href="45b565cbb5"><code>45b565c</code></a>
[red-knot] <code>Any</code> cannot be parameterized (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14933">#14933</a>)</li>
<li><a
href="82faa9bb62"><code>82faa9b</code></a>
Add tests demonstrating f-strings with debug expressions in replacements
that...</li>
<li><a
href="2eac00c60f"><code>2eac00c</code></a>
[<code>perflint</code>] fix invalid hoist in <code>perf401</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14369">#14369</a>)</li>
<li><a
href="033ecf5a4b"><code>033ecf5</code></a>
Also have zizmor check for low-severity security issues (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14893">#14893</a>)</li>
<li><a
href="5509a3d7ae"><code>5509a3d</code></a>
Add LSP settings example for Zed editor (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14894">#14894</a>)</li>
<li><a
href="e4885a2fb2"><code>e4885a2</code></a>
[red-knot] Understand <code>typing.Tuple</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14927">#14927</a>)</li>
<li><a
href="a7e5e42b88"><code>a7e5e42</code></a>
[red-knot] Make <code>attributes.md</code> test future-proof (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14923">#14923</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.8.2...0.8.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.8.2&new-version=0.8.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>
2024-12-17 08:47:56 +00:00
Swifty 2de5e3dd83
feat(platform): Agent Store V2 (#8874)
# 🌎 Overview

AutoGPT Store Version 2 expands on the Pre-Store by enhancing agent
discovery, providing richer content presentation, and introducing new
user engagement features. The focus is on creating a visually appealing
and interactive marketplace that allows users to explore and evaluate
agents through images, videos, and detailed descriptions.

### Vision

To create a visually compelling and interactive open-source marketplace
for autonomous AI agents, where users can easily discover, evaluate, and
interact with agents through media-rich listings, ratings, and version
history.

### Objectives

📊 Incorporate visuals (icons, images, videos) into agent listings.
 Introduce a rating system and agent run count.
🔄 Provide version history and update logs from creators.
🔍 Improve user experience with advanced search and filtering features.

### 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: Bently <tomnoon9@gmail.com>
Co-authored-by: Aarushi <aarushik93@gmail.com>
2024-12-13 16:35:02 +00:00
dependabot[bot] e6d728b081
build(deps-dev): bump the development-dependencies group in /autogpt_platform/autogpt_libs with 2 updates (#8924)
Bumps the development-dependencies group in
/autogpt_platform/autogpt_libs with 2 updates:
[redis](https://github.com/redis/redis-py) and
[ruff](https://github.com/astral-sh/ruff).

Updates `redis` from 5.2.0 to 5.2.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/redis/redis-py/releases">redis's
releases</a>.</em></p>
<blockquote>
<h2>5.2.1</h2>
<h1>Changes</h1>
<h2>🐛 Bug Fixes</h2>
<ul>
<li>Fixed unsecured tempfile.mktemp() command usage (<a
href="https://redirect.github.com/redis/redis-py/issues/3446">#3446</a>)</li>
<li>Fixed bug with SLOWLOG GET response parsing on Redis Software (<a
href="https://redirect.github.com/redis/redis-py/issues/3441">#3441</a>)</li>
<li>Fixed issue with invoking _close() on closed event loop (<a
href="https://redirect.github.com/redis/redis-py/issues/3438">#3438</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>Migrate test infrastructure to new custom docker images (<a
href="https://redirect.github.com/redis/redis-py/issues/3415">#3415</a>)</li>
<li>Fixed flacky test with HEXPIREAT command (<a
href="https://redirect.github.com/redis/redis-py/issues/3437">#3437</a>)</li>
</ul>
<h2>Contributors</h2>
<p>We'd like to thank all the contributors who worked on this
release!</p>
<p><a href="https://github.com/IlianIliev"><code>@​IlianIliev</code></a>
<a href="https://github.com/uglide"><code>@​uglide</code></a> <a
href="https://github.com/vladvildanov"><code>@​vladvildanov</code></a>
<a href="https://github.com/teodorfn"><code>@​teodorfn</code></a> <a
href="https://github.com/akx"><code>@​akx</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a74fa6a3dc"><code>a74fa6a</code></a>
Release 5.2.1 (<a
href="https://redirect.github.com/redis/redis-py/issues/3451">#3451</a>)</li>
<li>See full diff in <a
href="https://github.com/redis/redis-py/compare/v5.2.0...v5.2.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `ruff` from 0.8.1 to 0.8.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.8.2</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Avoid deprecated values (<code>AIR302</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14582">#14582</a>)</li>
<li>[<code>airflow</code>] Extend removed names for <code>AIR302</code>
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14734">#14734</a>)</li>
<li>[<code>ruff</code>] Extend
<code>unnecessary-regular-expression</code> to non-literal strings
(<code>RUF055</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14679">#14679</a>)</li>
<li>[<code>ruff</code>] Implement <code>used-dummy-variable</code>
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14611">#14611</a>)</li>
<li>[<code>ruff</code>] Implement <code>unnecessary-cast-to-int</code>
(<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14697">#14697</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>airflow</code>] Check <code>AIR001</code> from builtin or
providers <code>operators</code> module (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14631">#14631</a>)</li>
<li>[<code>flake8-pytest-style</code>] Remove <code>@</code> in
<code>pytest.mark.parametrize</code> rule messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14770">#14770</a>)</li>
<li>[<code>pandas-vet</code>] Skip rules if the <code>panda</code>
module hasn't been seen (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14671">#14671</a>)</li>
<li>[<code>pylint</code>] Fix false negatives for <code>ascii</code> and
<code>sorted</code> in <code>len-as-condition</code>
(<code>PLC1802</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14692">#14692</a>)</li>
<li>[<code>refurb</code>] Guard <code>hashlib</code> imports and mark
<code>hashlib-digest-hex</code> fix as safe (<code>FURB181</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14694">#14694</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>[<code>flake8-import-conventions</code>] Improve syntax check for
aliases supplied in configuration for
<code>unconventional-import-alias</code> (<code>ICN001</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14745">#14745</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Revert: [pyflakes] Avoid false positives in
<code>@no_type_check</code> contexts (<code>F821</code>,
<code>F722</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14615">#14615</a>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14726">#14726</a>)</li>
<li>[<code>pep8-naming</code>] Avoid false positive for <code>class
Bar(type(foo))</code> (<code>N804</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14683">#14683</a>)</li>
<li>[<code>pycodestyle</code>] Handle f-strings properly for
<code>invalid-escape-sequence</code> (<code>W605</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14748">#14748</a>)</li>
<li>[<code>pylint</code>] Ignore <code>@overload</code> in
<code>PLR0904</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14730">#14730</a>)</li>
<li>[<code>refurb</code>] Handle non-finite decimals in
<code>verbose-decimal-constructor</code> (<code>FURB157</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14596">#14596</a>)</li>
<li>[<code>ruff</code>] Avoid emitting <code>assignment-in-assert</code>
when all references to the assigned variable are themselves inside
<code>assert</code>s (<code>RUF018</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14661">#14661</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Improve docs for <code>flake8-use-pathlib</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14741">#14741</a>)</li>
<li>Improve error messages and docs for
<code>flake8-comprehensions</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14729">#14729</a>)</li>
<li>[<code>flake8-type-checking</code>] Expands <code>TC006</code> docs
to better explain itself (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14749">#14749</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/Lokejoke"><code>@​Lokejoke</code></a></li>
<li><a
href="https://github.com/Matt-Ord"><code>@​Matt-Ord</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/Well2333"><code>@​Well2333</code></a></li>
<li><a
href="https://github.com/connorskees"><code>@​connorskees</code></a></li>
<li><a
href="https://github.com/dcreager"><code>@​dcreager</code></a></li>
<li><a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</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.8.2</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Avoid deprecated values (<code>AIR302</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14582">#14582</a>)</li>
<li>[<code>airflow</code>] Extend removed names for <code>AIR302</code>
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14734">#14734</a>)</li>
<li>[<code>ruff</code>] Extend
<code>unnecessary-regular-expression</code> to non-literal strings
(<code>RUF055</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14679">#14679</a>)</li>
<li>[<code>ruff</code>] Implement <code>used-dummy-variable</code>
(<code>RUF052</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14611">#14611</a>)</li>
<li>[<code>ruff</code>] Implement <code>unnecessary-cast-to-int</code>
(<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14697">#14697</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>airflow</code>] Check <code>AIR001</code> from builtin or
providers <code>operators</code> module (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14631">#14631</a>)</li>
<li>[<code>flake8-pytest-style</code>] Remove <code>@</code> in
<code>pytest.mark.parametrize</code> rule messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14770">#14770</a>)</li>
<li>[<code>pandas-vet</code>] Skip rules if the <code>panda</code>
module hasn't been seen (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14671">#14671</a>)</li>
<li>[<code>pylint</code>] Fix false negatives for <code>ascii</code> and
<code>sorted</code> in <code>len-as-condition</code>
(<code>PLC1802</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14692">#14692</a>)</li>
<li>[<code>refurb</code>] Guard <code>hashlib</code> imports and mark
<code>hashlib-digest-hex</code> fix as safe (<code>FURB181</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14694">#14694</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>[<code>flake8-import-conventions</code>] Improve syntax check for
aliases supplied in configuration for
<code>unconventional-import-alias</code> (<code>ICN001</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14745">#14745</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Revert: [pyflakes] Avoid false positives in
<code>@no_type_check</code> contexts (<code>F821</code>,
<code>F722</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14615">#14615</a>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14726">#14726</a>)</li>
<li>[<code>pep8-naming</code>] Avoid false positive for <code>class
Bar(type(foo))</code> (<code>N804</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14683">#14683</a>)</li>
<li>[<code>pycodestyle</code>] Handle f-strings properly for
<code>invalid-escape-sequence</code> (<code>W605</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14748">#14748</a>)</li>
<li>[<code>pylint</code>] Ignore <code>@overload</code> in
<code>PLR0904</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14730">#14730</a>)</li>
<li>[<code>refurb</code>] Handle non-finite decimals in
<code>verbose-decimal-constructor</code> (<code>FURB157</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14596">#14596</a>)</li>
<li>[<code>ruff</code>] Avoid emitting <code>assignment-in-assert</code>
when all references to the assigned variable are themselves inside
<code>assert</code>s (<code>RUF018</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14661">#14661</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Improve docs for <code>flake8-use-pathlib</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14741">#14741</a>)</li>
<li>Improve error messages and docs for
<code>flake8-comprehensions</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14729">#14729</a>)</li>
<li>[<code>flake8-type-checking</code>] Expands <code>TC006</code> docs
to better explain itself (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14749">#14749</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b0e26e6fc8"><code>b0e26e6</code></a>
Bump version to 0.8.2 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14789">#14789</a>)</li>
<li><a
href="e9941cd714"><code>e9941cd</code></a>
[red-knot] Move standalone expr inference to <code>for</code> non-name
target (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14788">#14788</a>)</li>
<li><a
href="43bf1a8907"><code>43bf1a8</code></a>
Add tests for &quot;keyword as identifier&quot; syntax errors (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14754">#14754</a>)</li>
<li><a
href="fda8b1f884"><code>fda8b1f</code></a>
[<code>ruff</code>] Unnecessary cast to <code>int</code>
(<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14697">#14697</a>)</li>
<li><a
href="2d3f557875"><code>2d3f557</code></a>
[red-knot] Fallback for <code>typing._NoDefaultType</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14783">#14783</a>)</li>
<li><a
href="bd27bfab5d"><code>bd27bfa</code></a>
[red-knot] Unify <code>setup_db()</code> functions, add
<code>TestDb</code> builder (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14777">#14777</a>)</li>
<li><a
href="155d34bbb9"><code>155d34b</code></a>
[red-knot] Infer precise types for <code>len()</code> calls (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14599">#14599</a>)</li>
<li><a
href="04c887c8fc"><code>04c887c</code></a>
Fix references for <code>async-busy-wait</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14775">#14775</a>)</li>
<li><a
href="af43bd4b0f"><code>af43bd4</code></a>
[red-knot] Gradual forms do not participate in equivalence/subtyping (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14758">#14758</a>)</li>
<li><a
href="614917769e"><code>6149177</code></a>
Remove <code>@</code> in <code>pytest.mark.parametrize</code> rule
messages (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14770">#14770</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.8.1...0.8.2">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>
2024-12-09 20:50:53 +00:00
Reinier van der Leer 0272d87af3
ci(backend): Add `poetry.lock` check (#8885)
- Resolves #8884

We need to prevent breaking updates to dependency version requirements
of `autogpt_libs`.
`autogpt_libs/pytroject.toml` and `backend/poetry.lock` are loosely
coupled, and to ensure they stay in sync we need an extra check.

For now I'm also reverting the breaking update of #8787, otherwise this
added CI check will immediately fail.

### Changes
- ci(backend): Add `poetry.lock` check
- Revert "build(deps): bump pydantic from 2.9.2 to 2.10.2 in
/autogpt_platform/autogpt_libs in the production-dependencies group
across 1 directory (#8787)"
2024-12-05 18:41:59 +00:00
dependabot[bot] 0a604a5746
build(deps-dev): bump ruff from 0.8.0 to 0.8.1 in /autogpt_platform/autogpt_libs in the development-dependencies group (#8864)
Bumps the development-dependencies group in
/autogpt_platform/autogpt_libs with 1 update:
[ruff](https://github.com/astral-sh/ruff).

Updates `ruff` from 0.8.0 to 0.8.1
<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.8.1</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>Formatter: Avoid invalid syntax for format-spec with quotes for all
Python versions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14625">#14625</a>)</li>
<li>Formatter: Consider quotes inside format-specs when choosing the
quotes for an f-string (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14493">#14493</a>)</li>
<li>Formatter: Do not consider f-strings with escaped newlines as
multiline (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14624">#14624</a>)</li>
<li>Formatter: Fix f-string formatting in assignment statement (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14454">#14454</a>)</li>
<li>Formatter: Fix unnecessary space around power operator
(<code>**</code>) in overlong f-string expressions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14489">#14489</a>)</li>
<li>[<code>airflow</code>] Avoid implicit <code>schedule</code> argument
to <code>DAG</code> and <code>@dag</code> (<code>AIR301</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14581">#14581</a>)</li>
<li>[<code>flake8-builtins</code>] Exempt private built-in modules
(<code>A005</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14505">#14505</a>)</li>
<li>[<code>flake8-pytest-style</code>] Fix
<code>pytest.mark.parametrize</code> rules to check calls instead of
decorators (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14515">#14515</a>)</li>
<li>[<code>flake8-type-checking</code>] Implement
<code>runtime-cast-value</code> (<code>TC006</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14511">#14511</a>)</li>
<li>[<code>flake8-type-checking</code>] Implement
<code>unquoted-type-alias</code> (<code>TC007</code>) and
<code>quoted-type-alias</code> (<code>TC008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/12927">#12927</a>)</li>
<li>[<code>flake8-use-pathlib</code>] Recommend
<code>Path.iterdir()</code> over <code>os.listdir()</code>
(<code>PTH208</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14509">#14509</a>)</li>
<li>[<code>pylint</code>] Extend <code>invalid-envvar-default</code> to
detect <code>os.environ.get</code> (<code>PLW1508</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14512">#14512</a>)</li>
<li>[<code>pylint</code>] Implement <code>len-test</code>
(<code>PLC1802</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14309">#14309</a>)</li>
<li>[<code>refurb</code>] Fix bug where methods defined using lambdas
were flagged by <code>FURB118</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14639">#14639</a>)</li>
<li>[<code>ruff</code>] Auto-add <code>r</code> prefix when string has
no backslashes for <code>unraw-re-pattern</code> (<code>RUF039</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14536">#14536</a>)</li>
<li>[<code>ruff</code>] Implement
<code>invalid-assert-message-literal-argument</code>
(<code>RUF040</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14488">#14488</a>)</li>
<li>[<code>ruff</code>] Implement
<code>unnecessary-nested-literal</code> (<code>RUF041</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14323">#14323</a>)</li>
<li>[<code>ruff</code>] Implement
<code>unnecessary-regular-expression</code> (<code>RUF055</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14659">#14659</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>Ignore more rules for stub files (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14541">#14541</a>)</li>
<li>[<code>pep8-naming</code>] Eliminate false positives for
single-letter names (<code>N811</code>, <code>N814</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14584">#14584</a>)</li>
<li>[<code>pyflakes</code>] Avoid false positives in
<code>@no_type_check</code> contexts (<code>F821</code>,
<code>F722</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14615">#14615</a>)</li>
<li>[<code>ruff</code>] Detect redirected-noqa in file-level comments
(<code>RUF101</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14635">#14635</a>)</li>
<li>[<code>ruff</code>] Mark fixes for <code>unsorted-dunder-all</code>
and <code>unsorted-dunder-slots</code> as unsafe when there are complex
comments in the sequence (<code>RUF022</code>, <code>RUF023</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14560">#14560</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Avoid fixing code to <code>None | None</code> for
<code>redundant-none-literal</code> (<code>PYI061</code>) and
<code>never-union</code> (<code>RUF020</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14583">#14583</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/14589">#14589</a>)</li>
<li>[<code>flake8-bugbear</code>] Fix
<code>mutable-contextvar-default</code> to resolve annotated function
calls properly (<code>B039</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14532">#14532</a>)</li>
<li>[<code>flake8-pyi</code>, <code>ruff</code>] Fix traversal of nested
literals and unions (<code>PYI016</code>, <code>PYI051</code>,
<code>PYI055</code>, <code>PYI062</code>, <code>RUF041</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14641">#14641</a>)</li>
<li>[<code>flake8-pyi</code>] Avoid rewriting invalid type expressions
in <code>unnecessary-type-union</code> (<code>PYI055</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14660">#14660</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid syntax errors and type
checking problem for quoted annotations autofix (<code>TC003</code>,
<code>TC006</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14634">#14634</a>)</li>
<li>[<code>pylint</code>] Do not wrap function calls in parentheses in
the fix for unnecessary-dunder-call (<code>PLC2801</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14601">#14601</a>)</li>
<li>[<code>ruff</code>] Handle <code>attrs</code>'s
<code>auto_attribs</code> correctly (<code>RUF009</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14520">#14520</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/Glyphack"><code>@​Glyphack</code></a></li>
<li><a
href="https://github.com/InSyncWithFoo"><code>@​InSyncWithFoo</code></a></li>
<li><a
href="https://github.com/Lokejoke"><code>@​Lokejoke</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.8.1</h2>
<h3>Preview features</h3>
<ul>
<li>Formatter: Avoid invalid syntax for format-spec with quotes for all
Python versions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14625">#14625</a>)</li>
<li>Formatter: Consider quotes inside format-specs when choosing the
quotes for an f-string (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14493">#14493</a>)</li>
<li>Formatter: Do not consider f-strings with escaped newlines as
multiline (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14624">#14624</a>)</li>
<li>Formatter: Fix f-string formatting in assignment statement (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14454">#14454</a>)</li>
<li>Formatter: Fix unnecessary space around power operator
(<code>**</code>) in overlong f-string expressions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14489">#14489</a>)</li>
<li>[<code>airflow</code>] Avoid implicit <code>schedule</code> argument
to <code>DAG</code> and <code>@dag</code> (<code>AIR301</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14581">#14581</a>)</li>
<li>[<code>flake8-builtins</code>] Exempt private built-in modules
(<code>A005</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14505">#14505</a>)</li>
<li>[<code>flake8-pytest-style</code>] Fix
<code>pytest.mark.parametrize</code> rules to check calls instead of
decorators (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14515">#14515</a>)</li>
<li>[<code>flake8-type-checking</code>] Implement
<code>runtime-cast-value</code> (<code>TC006</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14511">#14511</a>)</li>
<li>[<code>flake8-type-checking</code>] Implement
<code>unquoted-type-alias</code> (<code>TC007</code>) and
<code>quoted-type-alias</code> (<code>TC008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/12927">#12927</a>)</li>
<li>[<code>flake8-use-pathlib</code>] Recommend
<code>Path.iterdir()</code> over <code>os.listdir()</code>
(<code>PTH208</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14509">#14509</a>)</li>
<li>[<code>pylint</code>] Extend <code>invalid-envvar-default</code> to
detect <code>os.environ.get</code> (<code>PLW1508</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14512">#14512</a>)</li>
<li>[<code>pylint</code>] Implement <code>len-test</code>
(<code>PLC1802</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14309">#14309</a>)</li>
<li>[<code>refurb</code>] Fix bug where methods defined using lambdas
were flagged by <code>FURB118</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14639">#14639</a>)</li>
<li>[<code>ruff</code>] Auto-add <code>r</code> prefix when string has
no backslashes for <code>unraw-re-pattern</code> (<code>RUF039</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/14536">#14536</a>)</li>
<li>[<code>ruff</code>] Implement
<code>invalid-assert-message-literal-argument</code>
(<code>RUF040</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14488">#14488</a>)</li>
<li>[<code>ruff</code>] Implement
<code>unnecessary-nested-literal</code> (<code>RUF041</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14323">#14323</a>)</li>
<li>[<code>ruff</code>] Implement
<code>unnecessary-regular-expression</code> (<code>RUF055</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14659">#14659</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>Ignore more rules for stub files (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14541">#14541</a>)</li>
<li>[<code>pep8-naming</code>] Eliminate false positives for
single-letter names (<code>N811</code>, <code>N814</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14584">#14584</a>)</li>
<li>[<code>pyflakes</code>] Avoid false positives in
<code>@no_type_check</code> contexts (<code>F821</code>,
<code>F722</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14615">#14615</a>)</li>
<li>[<code>ruff</code>] Detect redirected-noqa in file-level comments
(<code>RUF101</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14635">#14635</a>)</li>
<li>[<code>ruff</code>] Mark fixes for <code>unsorted-dunder-all</code>
and <code>unsorted-dunder-slots</code> as unsafe when there are complex
comments in the sequence (<code>RUF022</code>, <code>RUF023</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14560">#14560</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Avoid fixing code to <code>None | None</code> for
<code>redundant-none-literal</code> (<code>PYI061</code>) and
<code>never-union</code> (<code>RUF020</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14583">#14583</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/14589">#14589</a>)</li>
<li>[<code>flake8-bugbear</code>] Fix
<code>mutable-contextvar-default</code> to resolve annotated function
calls properly (<code>B039</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14532">#14532</a>)</li>
<li>[<code>flake8-pyi</code>, <code>ruff</code>] Fix traversal of nested
literals and unions (<code>PYI016</code>, <code>PYI051</code>,
<code>PYI055</code>, <code>PYI062</code>, <code>RUF041</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14641">#14641</a>)</li>
<li>[<code>flake8-pyi</code>] Avoid rewriting invalid type expressions
in <code>unnecessary-type-union</code> (<code>PYI055</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14660">#14660</a>)</li>
<li>[<code>flake8-type-checking</code>] Avoid syntax errors and type
checking problem for quoted annotations autofix (<code>TC003</code>,
<code>TC006</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14634">#14634</a>)</li>
<li>[<code>pylint</code>] Do not wrap function calls in parentheses in
the fix for unnecessary-dunder-call (<code>PLC2801</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14601">#14601</a>)</li>
<li>[<code>ruff</code>] Handle <code>attrs</code>'s
<code>auto_attribs</code> correctly (<code>RUF009</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14520">#14520</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b3b2c982cd"><code>b3b2c98</code></a>
Update CHANGELOG.md with the new commits for 0.8.1 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14664">#14664</a>)</li>
<li><a
href="abb3c6ea95"><code>abb3c6e</code></a>
[<code>flake8-pyi</code>] Avoid rewriting invalid type expressions in
`unnecessary-type-...</li>
<li><a
href="224fe75a76"><code>224fe75</code></a>
[<code>ruff</code>] Implement
<code>unnecessary-regular-expression</code> (<code>RUF055</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14659">#14659</a>)</li>
<li><a
href="dc29f52750"><code>dc29f52</code></a>
[<code>flake8-pyi</code>, <code>ruff</code>] Fix traversal of nested
literals and unions (<code>PYI016</code>,...</li>
<li><a
href="d9cbf2fe44"><code>d9cbf2f</code></a>
Avoids unnecessary overhead for <code>TC004</code>, when
<code>TC001-003</code> are disabled (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14657">#14657</a>)</li>
<li><a
href="3f6c65e78c"><code>3f6c65e</code></a>
[red-knot] Fix merged type after if-else without explicit else branch
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/14621">#14621</a>)</li>
<li><a
href="976c37a849"><code>976c37a</code></a>
Bump version to 0.8.1 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14655">#14655</a>)</li>
<li><a
href="a378ff38dc"><code>a378ff3</code></a>
[red-knot] Fix Boolean flags in mdtests (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14654">#14654</a>)</li>
<li><a
href="d8bca0d3a2"><code>d8bca0d</code></a>
Fix bug where methods defined using lambdas were flagged by FURB118 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14639">#14639</a>)</li>
<li><a
href="6f1cf5b686"><code>6f1cf5b</code></a>
[red-knot] Minor fix in MRO tests (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14652">#14652</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.8.0...0.8.1">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.0&new-version=0.8.1)](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>
2024-12-03 11:35:15 +00:00
Aarushi de1cd6c295
chore(blocks/fal): Use dict instead of Dict (#8855)
Replace Dict with dict

### Changes 🏗️

Replace Dict with dict

### 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>
2024-12-03 11:09:38 +00:00
Aarushi 3bca279b35
feat(libs): Add API key rate limit middleware (#8850)
Once we release api key feature, we will want to be able to rate limit
as well. This is the foundation for that.
For now it is a blanket rate limit, later we will be able to add tiered
rate limits

### Changes 🏗️

Added new middleware libary in autogpt_libs which contains the logic for
getting the api key, storing it's details in redis and checking how many
requests it's done, how many are left and what the reset time is.

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-12-03 09:25:29 +00:00
Zamil Majdy 5c49fc87fd
refactor(backend): Apply lint on autogpt_lib folder on backend/linter.py (#8751)
linter.py, only applies in the `backend` module, not `autogpt_libs`.

The scope of this PR is to clear this out.

### Changes 🏗️

* Add a linting scope to both the `backend` & `autogpt_libs` modules,
and apply the linter.


### 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: Reinier van der Leer <pwuts@agpt.co>
2024-12-02 09:57:53 +00:00
dependabot[bot] 7d48eebc78
build(deps): bump pydantic from 2.9.2 to 2.10.2 in /autogpt_platform/autogpt_libs in the production-dependencies group across 1 directory (#8787)
Bumps the production-dependencies group with 1 update in the
/autogpt_platform/autogpt_libs directory:
[pydantic](https://github.com/pydantic/pydantic).

Updates `pydantic` from 2.9.2 to 2.10.2
<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.2 2024-11-26</h2>
<h2>What's Changed</h2>
<h3>Fixes</h3>
<ul>
<li>Only evaluate <code>FieldInfo</code> annotations if required during
schema building by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10769">#10769</a></li>
<li>Do not evaluate annotations for private fields by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10962">#10962</a></li>
<li>Support serialization as any for <code>Secret</code> types and
<code>Url</code> types by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10947">#10947</a></li>
<li>Fix type hint of <code>Field.default</code> to be compatible with
Python 3.8 and 3.9 by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10972">#10972</a></li>
<li>Add hashing support for URL types by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10975">#10975</a></li>
<li>Hide <code>BaseModel.__replace__</code> definition from type
checkers by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10979">10979</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic/compare/v2.10.1...v2.10.2">https://github.com/pydantic/pydantic/compare/v2.10.1...v2.10.2</a></p>
<h2>v2.10.1 2024-11-21</h2>
<h2>What's Changed</h2>
<h3>Packaging</h3>
<ul>
<li>Bump <code>pydantic-core</code> version to <code>v2.27.1</code> by
<a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10938">#10938</a></li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Use the correct frame when instantiating a parametrized
<code>TypeAdapter</code> by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10893">#10893</a></li>
<li>Relax check for validated data in <code>default_factory</code> utils
by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10909">#10909</a></li>
<li>Fix type checking issue with <code>model_fields</code> and
<code>model_computed_fields</code> by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10911">#10911</a></li>
<li>Use the parent configuration during schema generation for stdlib
<code>dataclass</code>es by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10928">#10928</a></li>
<li>Use the <code>globals</code> of the function when evaluating the
return type of serializers and <code>computed_field</code>s by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10929">#10929</a></li>
<li>Fix URL constraint application by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10922">#10922</a></li>
<li>Fix URL equality with different validation methods by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10934">#10934</a></li>
<li>Fix JSON schema title when specified as <code>''</code> by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10936">#10936</a></li>
<li>Fix <code>python</code> mode serialization for <code>complex</code>
inference by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1549">pydantic-core#1549</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic/compare/v2.10.0...v2.10.1">https://github.com/pydantic/pydantic/compare/v2.10.0...v2.10.1</a></p>
<h2>v2.10.0 2024-11-20</h2>
<p>The code released in v2.10.0 is practically identical to that of
v2.10.0b2.
See the <a
href="https://pydantic.dev/articles/pydantic-v2-10-release">v2.10
release blog post</a> for the highlights!</p>
<h2>What's Changed</h2>
<h3>Packaging</h3>
<ul>
<li>Bump <code>pydantic-core</code> to <code>v2.27.0</code> by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10825">#10825</a></li>
<li>Replaced pdm with uv by <a
href="https://github.com/frfahim"><code>@​frfahim</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10727">#10727</a></li>
</ul>
<h3>New Features</h3>
<ul>
<li>Support <code>fractions.Fraction</code> by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10318">#10318</a></li>
<li>Support <code>Hashable</code> for json validation by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10324">#10324</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</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.2 (2024-11-25)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.10.2">GitHub
release</a></p>
<h3>What's Changed</h3>
<h4>Fixes</h4>
<ul>
<li>Only evaluate FieldInfo annotations if required during schema
building by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10769">#10769</a></li>
<li>Do not evaluate annotations for private fields by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10962">#10962</a></li>
<li>Support serialization as any for <code>Secret</code> types and
<code>Url</code> types by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10947">#10947</a></li>
<li>Fix type hint of <code>Field.default</code> to be compatible with
Python 3.8 and 3.9 by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10972">#10972</a></li>
<li>Add hashing support for URL types by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10975">#10975</a></li>
<li>Hide <code>BaseModel.__replace__</code> definition from type
checkers by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10979">10979</a></li>
</ul>
<h2>v2.10.1 (2024-11-21)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.10.1">GitHub
release</a></p>
<h3>What's Changed</h3>
<h4>Packaging</h4>
<ul>
<li>Bump <code>pydantic-core</code> version to <code>v2.27.1</code> by
<a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10938">#10938</a></li>
</ul>
<h4>Fixes</h4>
<ul>
<li>Use the correct frame when instantiating a parametrized
<code>TypeAdapter</code> by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10893">#10893</a></li>
<li>Relax check for validated data in <code>default_factory</code> utils
by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10909">#10909</a></li>
<li>Fix type checking issue with <code>model_fields</code> and
<code>model_computed_fields</code> by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10911">#10911</a></li>
<li>Use the parent configuration during schema generation for stdlib
<code>dataclass</code>es by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10928">#10928</a></li>
<li>Use the <code>globals</code> of the function when evaluating the
return type of serializers and <code>computed_field</code>s by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10929">#10929</a></li>
<li>Fix URL constraint application by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10922">#10922</a></li>
<li>Fix URL equality with different validation methods by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10934">#10934</a></li>
<li>Fix JSON schema title when specified as <code>''</code> by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/10936">#10936</a></li>
<li>Fix <code>python</code> mode serialization for <code>complex</code>
inference by <a
href="https://github.com/sydney-runkle"><code>@​sydney-runkle</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1549">pydantic-core#1549</a></li>
</ul>
<h3>New Contributors</h3>
<h2>v2.10.0 (2024-11-20)</h2>
<p>The code released in v2.10.0 is practically identical to that of
v2.10.0b2.</p>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.10.0">GitHub
release</a></p>
<p>See the <a
href="https://pydantic.dev/articles/pydantic-v2-10-release">v2.10
release blog post</a> for the highlights!</p>
<h3>What's Changed</h3>
<h4>Packaging</h4>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fe32515498"><code>fe32515</code></a>
Prepare for v2.10.2 release (<a
href="https://redirect.github.com/pydantic/pydantic/issues/10982">#10982</a>)</li>
<li><a
href="226cfaf62b"><code>226cfaf</code></a>
Hide <code>BaseModel.__replace__</code> definition from type checkers
(<a
href="https://redirect.github.com/pydantic/pydantic/issues/10979">#10979</a>)</li>
<li><a
href="02229a6ab1"><code>02229a6</code></a>
hashing support for urls (<a
href="https://redirect.github.com/pydantic/pydantic/issues/10975">#10975</a>)</li>
<li><a
href="a9cf39c32a"><code>a9cf39c</code></a>
Fix type hint of <code>Field.default</code> to be compatible with Python
3.8 and 3.9 (<a
href="https://redirect.github.com/pydantic/pydantic/issues/1">#1</a>...</li>
<li><a
href="869eafd70b"><code>869eafd</code></a>
Support serialization as any for <code>Secret</code> types and
<code>Url</code> types (<a
href="https://redirect.github.com/pydantic/pydantic/issues/10947">#10947</a>)</li>
<li><a
href="7c0ed72aa2"><code>7c0ed72</code></a>
Do not evaluate annotations for private fields (<a
href="https://redirect.github.com/pydantic/pydantic/issues/10962">#10962</a>)</li>
<li><a
href="d6fc7fce7d"><code>d6fc7fc</code></a>
Only evaluate <code>FieldInfo</code> annotations if required during
schema building (<a
href="https://redirect.github.com/pydantic/pydantic/issues/10">#10</a>...</li>
<li><a
href="17e60fafd6"><code>17e60fa</code></a>
spacing</li>
<li><a
href="369b355dba"><code>369b355</code></a>
remove typo</li>
<li><a
href="4c75404d6b"><code>4c75404</code></a>
Prepare for v2.10.1 release (<a
href="https://redirect.github.com/pydantic/pydantic/issues/10939">#10939</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pydantic/pydantic/compare/v2.9.2...v2.10.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pydantic&package-manager=pip&previous-version=2.9.2&new-version=2.10.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>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2024-11-29 13:41:00 +00:00
Nicholas Tindle 75f9b072a6
refactor(backend): Rename & move `IntegrationCredentialsStore` to backend (#8648)
- Move `autogpt_libs.supabase_integration_credentials_store` into
`backend`
   - `.store` -> `backend.integrations.credentials_store`
   - `.types` -> added to `backend.data.model`
- Rename `SupabaseIntegrationCredentialsStore` to
`IntegrationCredentialsStore`

We wanted to get a few security things in quickly in #8403 and had to
make some compromises to do so. This picks those up and fixes them.

- Resolves #8540

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

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2024-11-29 11:48:04 +00:00
Aarushi 4b8087c067
feat(platform/featureflags): Setting up feature flagging (#8718)
* feature flag formatting and linting

* add tests

* update poetry lock

* remove unneeded changes

* fix pyproject

* fix formatting and linting

* pydantic settings

* address comments and format

* alphabetize

* fix lockfile

* fix conflicts
2024-11-27 19:29:57 +00:00
Zamil Majdy ae9bd87161
fix(backend): Spin-up Database manager on rest.py (#8832) 2024-11-27 16:39:08 +00:00
dependabot[bot] effd1e35a3
chore(libs): Update dev dependency Ruff from 0.7.4 to 0.8.0 (#8760)
build(deps-dev): bump ruff

Bumps the development-dependencies group in /autogpt_platform/autogpt_libs with 1 update: [ruff](https://github.com/astral-sh/ruff).


Updates `ruff` from 0.7.4 to 0.8.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.7.4...0.8.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 22:43:06 +00:00
dependabot[bot] c1c3345bc0
build(deps-dev): bump ruff from 0.7.3 to 0.7.4 in /autogpt_platform/autogpt_libs in the development-dependencies group (#8701)
build(deps-dev): bump ruff

Bumps the development-dependencies group in /autogpt_platform/autogpt_libs with 1 update: [ruff](https://github.com/astral-sh/ruff).


Updates `ruff` from 0.7.3 to 0.7.4
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.7.3...0.7.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 10:10:26 +00:00
dependabot[bot] fb9a543e35
build(deps): bump pyjwt from 2.9.0 to 2.10.0 in /autogpt_platform/autogpt_libs in the production-dependencies group (#8700)
build(deps): bump pyjwt

Bumps the production-dependencies group in /autogpt_platform/autogpt_libs with 1 update: [pyjwt](https://github.com/jpadilla/pyjwt).


Updates `pyjwt` from 2.9.0 to 2.10.0
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.9.0...2.10.0)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 10:06:05 +00:00
Toran Bruce Richards 29cff1bb4e
feat(blocks): Add Open Router integration with a large selection of new models (#8653)
* feat: Add Open Router integration credentials

- Added support for Open Router integration credentials in the Supabase integration credentials store.
- Updated the LLM provider field to include "open_router" as a valid provider option.
- Added Open Router API key field to the backend settings.
- Updated the profile page to display the Open Router integration credentials.
- Updated the credentials input and provider components to include Open Router as a provider option.
- Updated the autogpt-server-api types to include "open_router" as a provider name.
- Updated the LLM provider schema to include "open_router" as a valid provider name.

- Added GEMINI_FLASH_1_5_8B as the first Open Router LLM

* Add type ignore to new llm prompt to match the rest of them.

* Update LlmModel with a selection of new OpenRouter models

* format
2024-11-18 14:03:50 +00:00
Zamil Majdy f36d95aaa8
fix(backend): Avoid falling back to default user unless ENABLED_AUTH is set to False (#8691) 2024-11-18 13:01:21 +00:00
Abhimanyu Yadav bbbdb5665b
feat(platform): Add api generator functions and endpoints (#8597)
* add: api generator functions and endpoints

* Rebase onto dev, refactor API manager location, remove suspended key revoke, and update API code for Prisma compatibility

* add: key_manager

* reversing changes og poetry.lock

* add: changing hash mexhansim in API Manager

* add: changing hash mexhansim in API Manager

* fixing some simple bugs

* fix linting and adding better error handling

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2024-11-14 14:33:27 +00:00
Toran Bruce Richards aafc101224
tweak(backend): Update all block costs (#8639)
* Add support for default credentials to unreal block

* Refactor block cost configuration and add new blocks

This commit refactors the block cost configuration file and adds support for new blocks. The changes include:
- Importing the `AIMusicGeneratorBlock`, `JinaEmbeddingBlock`, and `UnrealTextToSpeechBlock` classes
- Updating the `BLOCK_COSTS` dictionary to include costs for the new blocks

These changes enable the usage of the newly introduced blocks.
2024-11-13 16:05:32 +00:00
Krzysztof Czerwinski e907ffda6e
feat(platform): Simplify Credentials UX (#8524)
- Change `provider` of default credentials to actual provider names (e.g. `anthropic`), remove `llm` provider
- Add `discriminator` and `discriminator_mapping` to `CredentialsField` that allows to filter credentials input to only allow  providers for matching models in `useCredentials` hook (thanks @ntindle for the idea!); e.g. user chooses `GPT4_TURBO` so then only OpenAI credentials are allowed
- Choose credentials automatically and hide credentials input on the node completely if there's only one possible option
- Move `getValue` and `parseKeys` to utils
- Add `ANTHROPIC`, `GROQ` and `OLLAMA` to providers in frontend `types.ts`
- Add `hidden` field to credentials that is used for default system keys to hide them in user profile
- Now `provider` field in `CredentialsField` can accept multiple providers as a list

-----------------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-11-12 16:55:48 +01:00
dependabot[bot] ce3539ff16
build(deps-dev): bump ruff from 0.7.2 to 0.7.3 in /autogpt_platform/autogpt_libs in the development-dependencies group (#8618)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 16:10:08 -06:00
dependabot[bot] ea8f164b93
build(deps): bump supabase from 2.9.1 to 2.10.0 in /autogpt_platform/autogpt_libs in the production-dependencies group (#8617)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 21:48:57 +00:00
Aarushi e6e47373ac
feat(blocks/jina): Add default credentials for Jina (#8603)
add jina defaults
2024-11-10 17:18:53 +00:00
Reinier van der Leer dfb7cf19f7
dx: Fix `pre-commit` config (#8584)
- fix naming of hooks
- fix `pyright` hooks (b0rked by repo restructure)
- fix `forge` path (b0rked by faulty replace-all when the repo was restructured)
- fix `black` hook to work on all Python versions
- add `poetry install` hooks
- add `ruff`, `isort`, `pyright`, `pytest`, and `prisma generate` hooks for `backend/`
- add `ruff` and `pyright` hooks for `autogpt_libs/`
2024-11-08 16:06:23 +00:00
dependabot[bot] ab0aaf55a9
build(deps-dev): bump redis from 5.1.1 to 5.2.0 in /autogpt_platform/autogpt_libs in the development-dependencies group (#8433)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-11-04 20:37:22 -06:00
dependabot[bot] 57eb7db93c
build(deps): bump pydantic-settings from 2.6.0 to 2.6.1 in /autogpt_platform/autogpt_libs in the production-dependencies group (#8542)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 20:34:26 -06:00
Nicholas Tindle 3aebed61d2
feat(backend): credential swap to api keys in cred store (#8403)
* feat(backend): credential swap

* ci: formatting

* fix: importing is hard okay

* fix: spelln' is hard

* feat: better credential provider handling

* docs: update the imports locations

* fix: test credentials + formatting

* feat: drop continuous read mode

* fix: lint

* feat: fallback credentials

* feat: charge for credential useage and have a bad backup mechnism

* fix: don't save default credentials + add d_id

* fix: formatting

* feat: basic encryption/decryption

* ref: move files around

* ref: sign all blocks out of their credentials

* ref: update target to match a new, and encrypted future

* wip: llm provider merger

* don't delete `credentials` input on nodes

* fix llm block ci issues

* updated get AICredentials

* fix fix

* insert migration to move integration credentials from `auth.user` metadata to `platform.User.metadata`

* fixed migration

* add migration for existing user integration credentials

* disabled reddit and email block

* fix credential handling in LLM blocks

* add other secret fields to credential scrubber migration

* add other secret fields to credential scrubber migration (vol. 2)

* fix: pr fixes

* fix: mock funciton

* add encrypted values

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: SwiftyOS <craigswift13@gmail.com>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
Co-authored-by: Aarushi <aarushik93@gmail.com>
2024-10-31 02:36:38 +00:00
Zamil Majdy 8938209d0d
fix(backend): Avoid long synchronous call to block FastAPI event-loop (#8429) 2024-10-27 23:54:38 +07:00
dependabot[bot] 8a68516f0b
build(deps): bump the production-dependencies group in /autogpt_platform/autogpt_libs with 4 updates (#8432)
build(deps): bump the production-dependencies group

Bumps the production-dependencies group in /autogpt_platform/autogpt_libs with 4 updates: [google-cloud-logging](https://github.com/googleapis/python-logging), [pydantic](https://github.com/pydantic/pydantic), [pydantic-settings](https://github.com/pydantic/pydantic-settings) and [supabase](https://github.com/supabase/supabase-py).


Updates `google-cloud-logging` from 3.11.2 to 3.11.3
- [Release notes](https://github.com/googleapis/python-logging/releases)
- [Changelog](https://github.com/googleapis/python-logging/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/python-logging/compare/v3.11.2...v3.11.3)

Updates `pydantic` from 2.9.1 to 2.9.2
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.9.1...v2.9.2)

Updates `pydantic-settings` from 2.5.2 to 2.6.0
- [Release notes](https://github.com/pydantic/pydantic-settings/releases)
- [Commits](https://github.com/pydantic/pydantic-settings/compare/v2.5.2...v2.6.0)

Updates `supabase` from 2.7.4 to 2.9.1
- [Release notes](https://github.com/supabase/supabase-py/releases)
- [Changelog](https://github.com/supabase/supabase-py/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supabase/supabase-py/compare/v2.7.4...v2.9.1)

---
updated-dependencies:
- dependency-name: google-cloud-logging
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: pydantic-settings
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: supabase
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-25 23:08:34 +00:00
Zamil Majdy 17e79ad88d
fix(backend): Fix DatabaseManager usage by calling it on-demand (#8404) 2024-10-23 10:09:23 +07:00
Zamil Majdy 7f318685af Revert "fix(backend): Fix DatabaseManager usage by calling it on-demand"
This reverts commit e5f5005ab8.
2024-10-23 07:41:59 +07:00
Zamil Majdy e5f5005ab8 fix(backend): Fix DatabaseManager usage by calling it on-demand 2024-10-23 07:39:15 +07:00
Nicholas Tindle 1622a4aaa8
refactor(backend): Move credentials storage to prisma user (#8283)
* feat(frontend,backend): testing

* feat: testing

* feat(backend): it works for reading email

* feat(backend): more docs on google

* fix(frontend,backend): formatting

* feat(backend): more logigin (i know this should be debug)

* feat(backend): make real the default scopes

* feat(backend): tests and linting

* fix: code review prep

* feat: sheets block

* feat: liniting

* Update route.ts

* Update autogpt_platform/backend/backend/integrations/oauth/google.py

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>

* Update autogpt_platform/backend/backend/server/routers/integrations.py

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>

* fix: revert opener change

* feat(frontend): add back opener

required to work on mac edge

* feat(frontend): drop typing list import from gmail

* fix: code review comments

* feat: code review changes

* feat: code review changes

* fix(backend): move from asserts to checks so they don't get optimized away in the future

* fix(backend): code review changes

* fix(backend): remove google specific check

* fix: add typing

* fix: only enable google blocks when oauth is configured for google

* fix: errors are real and valid outputs always when output

* fix(backend): add provider detail for debuging scope declines

* Update autogpt_platform/frontend/src/components/integrations/credentials-input.tsx

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>

* fix(frontend): enhance with comment, typeof error isn't known so this is best way to ensure the stringifyication will work

* feat: code review change requests

* fix: linting

* fix: reduce error catching

* fix: doc messages in code

* fix: check the correct scopes object 😄

* fix: remove double (and not needed) try catch

* fix: lint

* fix: scopes

* feat: handle the default scopes better

* feat: better email objectification

* feat: process attachements

turns out an email doesn't need a body

* fix: lint

* Update google.py

* Update autogpt_platform/backend/backend/data/block.py

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>

* fix: quit trying and except failure

* Update autogpt_platform/backend/backend/server/routers/integrations.py

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>

* feat: don't allow expired states

* fix: clarify function name and purpose

* feat: code links updates

* feat: additional docs on adding a block

* fix: type hint missing which means the block won't work

* fix: linting

* fix: docs formatting

* Update issues.py

* fix: improve the naming

* fix: formatting

* Update new_blocks.md

* Update new_blocks.md

* feat: better docs on what the args mean

* feat: more details on yield

* Update new_blocks.md

* fix: remove ignore from docs build

* feat: initial migration

* feat: migration tested with supabase-> prisma data location

* add custom migrations and script

* update migration command

* formatting and linting

* updated migration script

* add direct db url

* add find files

* rename

* use binary instead of source

* temp adding supabase

* remove unused functions

* adding missed merge

* fix: commit hash for lock

* ci: fix lint

* fix: minor bugs that prevented connecting and migrating to dbs and auth

* fix: linting

* fix: missed await

* fix(backend): phase one pr updates

* fix: handle error with returning user object from database_manager

* fix: linting

* Address comments

* Make the migration safe

* Update migration doc

* Move misplaced model functions

* Grammar

* Revert lock

* Remove irrelevant changes

* Remove irrelevant changes

* Avoid adding trigger on public schema

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Co-authored-by: Aarushi <aarushik93@gmail.com>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2024-10-22 13:33:54 +01:00
Reinier van der Leer 992989ee71
feat(backend): Ensure validity of OAuth credentials during graph execution (#8191)
- feat(backend/executor): Change credential injection mechanism to acquire credentials from `AgentServer` just before execution
  - Also locks the credentials for the duration of the execution

- feat(backend/server): Add thread-safe `IntegrationCredentialsManager` to handle and synchronize credentials-related operations

- feat(libs): Add mutexes to `SupabaseIntegrationCredentialsStore` to ensure thread-safety

Also:
- feat(backend): Added Pydantic model (de)serialization support to `@expose` decorator

Refactorings:
- refactor(backend, libs): Move `KeyedMutex` to `autogpt_libs.utils.synchronize`
- refactor(backend/server): Make `backend.server.integrations` module with `router`, `creds_manager`, and `utils` in it
2024-10-10 16:45:43 +00:00
Nicholas Tindle 6dbc0f7270
feat(frontend,backend): fix google auth and add gmail, sheets (#8236)
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-10-03 16:36:30 +00:00
Reinier van der Leer 5e2874c315
feat(platform): OAuth support + API key management + GitHub blocks (#8044)
## Config
- For Supabase, the back end needs `SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`, and `SUPABASE_JWT_SECRET`
- For the GitHub integration to work, the back end needs `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`
- For integrations OAuth flows to work in local development, the back end needs `FRONTEND_BASE_URL` to generate login URLs with accurate redirect URLs

## REST API
- Tweak output of OAuth `/login` endpoint: add `state_token` separately in response
- Add `POST /integrations/{provider}/credentials` (for API keys)
- Add `DELETE /integrations/{provider}/credentials/{cred_id}`

## Back end
- Add Supabase support to `AppService`
- Add `FRONTEND_BASE_URL` config option, mainly for local development use

### `autogpt_libs.supabase_integration_credentials_store`
- Add `CredentialsType` alias
- Add `.bearer()` helper methods to `APIKeyCredentials` and `OAuth2Credentials`

### Blocks
- Add `CredentialsField(..) -> CredentialsMetaInput`

## Front end
### UI components
- `CredentialsInput` for use on `CustomNode`: allows user to add/select credentials for a service.
  - `APIKeyCredentialsModal`: a dialog for creating API keys
  - `OAuth2FlowWaitingModal`: a dialog to indicate that the application is waiting for the user to log in to the 3rd party service in the provided pop-up window
- `NodeCredentialsInput`: wrapper for `CredentialsInput` with the "usual" interface of node input components
- New icons: `IconKey`, `IconKeyPlus`, `IconUser`, `IconUserPlus`

### Data model
- `CredentialsProvider`: introduces the app-level `CredentialsProvidersContext`, which acts as an application-wide store and cache for credentials metadata.
- `useCredentials` for use on `CustomNode`: uses `CredentialsProvidersContext` and provides node-specific credential data and provider-specific data/functions
- `/auth/integrations/oauth_callback` route to close the loop to the `CredentialsInput` after a user completes sign-in to the external service
- Add `BlockIOCredentialsSubSchema`

### API client
- Add `isAuthenticated` method
- Add methods for integration OAuth flow: `oAuthLogin`, `oAuthCallback`
- Add CRD methods for credentials: `createAPIKeyCredentials`, `listCredentials`, `getCredentials`, `deleteCredentials`
- Add mirrored types `CredentialsMetaResponse`, `CredentialsMetaInput`, `OAuth2Credentials`, `APIKeyCredentials`
- Add GitHub blocks + "DEVELOPER_TOOLS" category
- Add `**kwargs` to `Block.run(..)` signature to support additional kwargs
- Add support for loading blocks from nested modules (e.g. `blocks/github/issues.py`)

#### Executor
- Add strict support for `credentials` fields on blocks
- Fetch credentials for graph execution and pass them down through to the node execution
2024-09-26 00:36:29 +02:00
Swifty ef7cfbb860
refactor: AutoGPT Platform Stealth Launch Repo Re-Org (#8113)
Restructuring the Repo to make it clear the difference between classic autogpt and the autogpt platform:
* Move the "classic" projects `autogpt`, `forge`, `frontend`, and `benchmark` into a `classic` folder
  * Also rename `autogpt` to `original_autogpt` for absolute clarity
* Rename `rnd/` to `autogpt_platform/`
  * `rnd/autogpt_builder` -> `autogpt_platform/frontend`
  * `rnd/autogpt_server` -> `autogpt_platform/backend`
* Adjust any paths accordingly
2024-09-20 16:50:43 +02:00